diff --git a/docs/changelog-latest.md b/docs/changelog-latest.md index 22a2629c8..3ce3ad442 100644 --- a/docs/changelog-latest.md +++ b/docs/changelog-latest.md @@ -3,7 +3,7 @@ id: changelog-latest title: Changelog (v3) --- -3.7.2 +3.7.3 ===== - Fixes @@ -11,6 +11,8 @@ title: Changelog (v3) - Fix scriptBuilder to ScriptParams error parsing nonce - Use generateRandomArray in attachAttributes - Fix timeout setting for api calls + - Correct semantic API for verify + - Typings update 3.7.0 ===== diff --git a/lib/browser.js b/lib/browser.js index 8fc3a29d2..3ebb85817 100644 --- a/lib/browser.js +++ b/lib/browser.js @@ -1,11 +1,11 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Neon=t():e.Neon=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=187)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fixed8=t.sha256=t.hash256=t.hash160=t.StringStream=t.ensureHex=t.isHex=t.reverseHex=t.reverseArray=t.hexXor=t.num2VarInt=t.fixed82num=t.num2fixed8=t.num2hexstring=t.int2hex=t.hexstring2str=t.str2hexstring=t.ab2hexstring=t.hexstring2ab=t.str2ab=t.ab2str=void 0;var n=f(r(60)),i=f(r(59)),a=f(r(117)),o=f(r(116)),s=f(r(33));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function d(e){return(d=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new Error("num must be numeric");if(e<0)throw new RangeError("num is unsigned (>= 0)");if(t%1!=0)throw new Error("size must be a whole integer");if(!Number.isSafeInteger(e))throw new RangeError("num (".concat(e,") must be a safe integer"));t*=2;var n=e.toString(16);return n=n.length%t==0?n:("0".repeat(t)+n).substring(n.length),r&&(n=S(n)),n};t.num2hexstring=_;t.num2fixed8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;if("number"!=typeof e)throw new Error("num must be numeric");if(t%1!=0)throw new Error("size must be a whole integer");return new E(e.toFixed(8)).toReverseHex().slice(0,2*t)};t.fixed82num=function(e){return A(e),""===e?0:E.fromReverseHex(e).toNumber()};t.num2VarInt=function(e){return e<253?_(e):e<=65535?"fd"+_(e,2,!0):e<=4294967295?"fe"+_(e,4,!0):"ff"+_(e,8,!0)};t.hexXor=function(e,t){if(A(e),A(t),e.length!==t.length)throw new Error("strings are disparate lengths");for(var r=[],n=0;n=0;r-=2)t+=e.substr(r,2);return t};t.reverseHex=S;var k=/^([0-9A-Fa-f]{2})*$/,x=function(e){try{return k.test(e)}catch(e){return!1}};t.isHex=x;var A=function(e){if(!x(e))throw new Error("Expected a hexstring but got ".concat(e))};t.ensureHex=A;var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";h(this,e),this.str=t,this.pter=0}return b(e,[{key:"isEmpty",value:function(){return this.pter>=this.str.length}},{key:"peek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.isEmpty()?"":this.substr(this.ptr,2*e)}},{key:"read",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.isEmpty())throw new Error;var t=this.str.substr(this.pter,2*e);return this.pter+=2*e,t}},{key:"readVarBytes",value:function(){return this.read(this.readVarInt())}},{key:"readVarInt",value:function(){var e=parseInt(this.read(1),16);return 253===e?e=parseInt(S(this.read(2)),16):254===e?e=parseInt(S(this.read(4)),16):255===e&&(e=parseInt(S(this.read(8)),16)),e}},{key:"reset",value:function(){this.pter=0}}]),e}();t.StringStream=M;t.hash160=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,a.default)(r).toString()};t.hash256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,i.default)(r).toString()};t.sha256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e);return(0,i.default)(t).toString()};var E=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return h(this,t),"number"==typeof e&&(e=e.toFixed(8)),c(this,d(t).call(this,e,r))}return b(t,[{key:"toHex",value:function(){var e=this.times(1e8).round(0).toString(16);return"0".repeat(16-e.length)+e}},{key:"toReverseHex",value:function(){return S(this.toHex())}},{key:s.default.inspect.custom,value:function(e,t){return this.toFixed(8)}},{key:"ceil",value:function(){return new t(l(d(t.prototype),"ceil",this).call(this))}},{key:"floor",value:function(){return new t(l(d(t.prototype),"floor",this).call(this))}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"round",this).call(this,e,r))}},{key:"div",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.dividedBy(e,t)}},{key:"dividedBy",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"dividedBy",this).call(this,e,r))}},{key:"mul",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.times(e,t)}},{key:"times",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"times",this).call(this,e,r))}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.plus(e,t)}},{key:"plus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"plus",this).call(this,e,r))}},{key:"sub",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.minus(e,t)}},{key:"minus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"minus",this).call(this,e,r))}}],[{key:"fromHex",value:function(e){return new t(e,16).div(1e8)}},{key:"fromReverseHex",value:function(e){return this.fromHex(S(e))}}]),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");u(e.prototype,t&&t.prototype),t&&u(e,t)}(t,e),t}(o.default);t.Fixed8=E},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.default=void 0;var n=a(r(95)),i=a(r(94));function a(e){return e&&e.__esModule?e:{default:e}}i.default.reg(n.default),n.default.setDefaultLevel("silent"),n.default.setAll=function(e){Object.keys(n.default.getLoggers()).map(function(t){n.default.getLogger(t).setLevel(e)})};var o=function(e,t){var r=(new Date).toUTCString();e=e.toUpperCase();var n=t;return"[".concat(r,"] (").concat(n,") ").concat(e,": ")};t.default=function(e){var t=n.default.getLogger(e);return i.default.apply(t,{format:o}),t};var s=n.default;t.logger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TX_VERSION=t.RPC_VERSION=t.NEP_FLAG=t.NEP_HEADER=t.NEO_NETWORK=t.DEFAULT_ACCOUNT_CONTRACT=t.DEFAULT_WALLET=t.DEFAULT_SYSFEE=t.DEFAULT_SCRYPT=t.DEFAULT_REQ=t.DEFAULT_RPC=t.CONTRACTS=t.ASSET_ID=t.ASSETS=t.ADDR_VERSION=void 0;t.ADDR_VERSION="17";t.ASSETS={NEO:"NEO",c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b:"NEO",GAS:"GAS","602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7":"GAS"};t.ASSET_ID={NEO:"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",GAS:"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7"};t.CONTRACTS={RPX:"ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9",TEST_RPX:"5b7074e873973a6ed3708862f219a6fbf4d1c411",TEST_LWTF:"d7678dd97c000be3f33e9362e673101bac4ca654",TEST_NXT:"0b6c1f919e95fe61c17a7612aebfaf4fda3a2214",TEST_RHTT4:"f9572c5b119a6b5775a6af07f1cef5d310038f55"};t.DEFAULT_RPC={MAIN:"https://seed1.neo.org:10331",TEST:"https://seed1.neo.org:20331"};t.DEFAULT_REQ={jsonrpc:"2.0",method:"getblockcount",params:[],id:1234};t.DEFAULT_SCRYPT={cost:16384,blockSize:8,parallel:8,size:64};t.DEFAULT_SYSFEE={enrollmentTransaction:1e3,issueTransaction:500,publishTransaction:500,registerTransaction:1e4};t.DEFAULT_WALLET={name:"myWallet",version:"1.0",scrypt:{},accounts:[],extra:null};t.DEFAULT_ACCOUNT_CONTRACT={script:"",parameters:[{name:"signature",type:"Signature"}],deployed:!1};t.NEO_NETWORK={MAIN:"MainNet",TEST:"TestNet"};t.NEP_HEADER="0142";t.NEP_FLAG="e0";t.RPC_VERSION="2.3.2";t.TX_VERSION={CLAIM:0,CONTRACT:0,INVOCATION:1}},function(e,t,r){var n=r(5),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";(function(e){ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Neon=t():e.Neon=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=186)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fixed8=t.sha256=t.hash256=t.hash160=t.StringStream=t.ensureHex=t.isHex=t.reverseHex=t.reverseArray=t.hexXor=t.num2VarInt=t.fixed82num=t.num2fixed8=t.num2hexstring=t.int2hex=t.hexstring2str=t.str2hexstring=t.ab2hexstring=t.hexstring2ab=t.str2ab=t.ab2str=void 0;var n=f(r(60)),i=f(r(59)),a=f(r(118)),o=f(r(117)),s=f(r(33));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function h(e){return(h=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new Error("num must be numeric");if(e<0)throw new RangeError("num is unsigned (>= 0)");if(t%1!=0)throw new Error("size must be a whole integer");if(!Number.isSafeInteger(e))throw new RangeError("num (".concat(e,") must be a safe integer"));t*=2;var n=e.toString(16);return n=n.length%t==0?n:("0".repeat(t)+n).substring(n.length),r&&(n=S(n)),n};t.num2hexstring=_;t.num2fixed8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;if("number"!=typeof e)throw new Error("num must be numeric");if(t%1!=0)throw new Error("size must be a whole integer");return new E(e.toFixed(8)).toReverseHex().slice(0,2*t)};t.fixed82num=function(e){return A(e),""===e?0:E.fromReverseHex(e).toNumber()};t.num2VarInt=function(e){return e<253?_(e):e<=65535?"fd"+_(e,2,!0):e<=4294967295?"fe"+_(e,4,!0):"ff"+_(e,8,!0)};t.hexXor=function(e,t){if(A(e),A(t),e.length!==t.length)throw new Error("strings are disparate lengths");for(var r=[],n=0;n=0;r-=2)t+=e.substr(r,2);return t};t.reverseHex=S;var k=/^([0-9A-Fa-f]{2})*$/,x=function(e){try{return k.test(e)}catch(e){return!1}};t.isHex=x;var A=function(e){if(!x(e))throw new Error("Expected a hexstring but got ".concat(e))};t.ensureHex=A;var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";d(this,e),this.str=t,this.pter=0}return b(e,[{key:"isEmpty",value:function(){return this.pter>=this.str.length}},{key:"peek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.isEmpty()?"":this.substr(this.ptr,2*e)}},{key:"read",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.isEmpty())throw new Error;var t=this.str.substr(this.pter,2*e);return this.pter+=2*e,t}},{key:"readVarBytes",value:function(){return this.read(this.readVarInt())}},{key:"readVarInt",value:function(){var e=parseInt(this.read(1),16);return 253===e?e=parseInt(S(this.read(2)),16):254===e?e=parseInt(S(this.read(4)),16):255===e&&(e=parseInt(S(this.read(8)),16)),e}},{key:"reset",value:function(){this.pter=0}}]),e}();t.StringStream=M;t.hash160=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,a.default)(r).toString()};t.hash256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,i.default)(r).toString()};t.sha256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e);return(0,i.default)(t).toString()};var E=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return d(this,t),"number"==typeof e&&(e=e.toFixed(8)),c(this,h(t).call(this,e,r))}return b(t,[{key:"toHex",value:function(){var e=this.times(1e8).round(0).toString(16);return"0".repeat(16-e.length)+e}},{key:"toReverseHex",value:function(){return S(this.toHex())}},{key:s.default.inspect.custom,value:function(e,t){return this.toFixed(8)}},{key:"ceil",value:function(){return new t(l(h(t.prototype),"ceil",this).call(this))}},{key:"floor",value:function(){return new t(l(h(t.prototype),"floor",this).call(this))}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"round",this).call(this,e,r))}},{key:"div",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.dividedBy(e,t)}},{key:"dividedBy",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"dividedBy",this).call(this,e,r))}},{key:"mul",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.times(e,t)}},{key:"times",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"times",this).call(this,e,r))}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.plus(e,t)}},{key:"plus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"plus",this).call(this,e,r))}},{key:"sub",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.minus(e,t)}},{key:"minus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"minus",this).call(this,e,r))}}],[{key:"fromHex",value:function(e){return new t(e,16).div(1e8)}},{key:"fromReverseHex",value:function(e){return this.fromHex(S(e))}}]),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");u(e.prototype,t&&t.prototype),t&&u(e,t)}(t,e),t}(o.default);t.Fixed8=E},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.default=void 0;var n=a(r(96)),i=a(r(95));function a(e){return e&&e.__esModule?e:{default:e}}i.default.reg(n.default),n.default.setDefaultLevel("silent"),n.default.setAll=function(e){Object.keys(n.default.getLoggers()).map(function(t){n.default.getLogger(t).setLevel(e)})};var o=function(e,t){var r=(new Date).toUTCString();e=e.toUpperCase();var n=t;return"[".concat(r,"] (").concat(n,") ").concat(e,": ")};t.default=function(e){var t=n.default.getLogger(e);return i.default.apply(t,{format:o}),t};var s=n.default;t.logger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TX_VERSION=t.RPC_VERSION=t.NEP_FLAG=t.NEP_HEADER=t.NEO_NETWORK=t.DEFAULT_ACCOUNT_CONTRACT=t.DEFAULT_WALLET=t.DEFAULT_SYSFEE=t.DEFAULT_SCRYPT=t.DEFAULT_REQ=t.DEFAULT_RPC=t.CONTRACTS=t.ASSET_ID=t.ASSETS=t.ADDR_VERSION=void 0;t.ADDR_VERSION="17";t.ASSETS={NEO:"NEO",c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b:"NEO",GAS:"GAS","602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7":"GAS"};t.ASSET_ID={NEO:"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",GAS:"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7"};t.CONTRACTS={RPX:"ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9",TEST_RPX:"5b7074e873973a6ed3708862f219a6fbf4d1c411",TEST_LWTF:"d7678dd97c000be3f33e9362e673101bac4ca654",TEST_NXT:"0b6c1f919e95fe61c17a7612aebfaf4fda3a2214",TEST_RHTT4:"f9572c5b119a6b5775a6af07f1cef5d310038f55"};t.DEFAULT_RPC={MAIN:"https://seed1.neo.org:10331",TEST:"https://seed1.neo.org:20331"};t.DEFAULT_REQ={jsonrpc:"2.0",method:"getblockcount",params:[],id:1234};t.DEFAULT_SCRYPT={cost:16384,blockSize:8,parallel:8,size:64};t.DEFAULT_SYSFEE={enrollmentTransaction:1e3,issueTransaction:500,publishTransaction:500,registerTransaction:1e4};t.DEFAULT_WALLET={name:"myWallet",version:"1.0",scrypt:{},accounts:[],extra:null};t.DEFAULT_ACCOUNT_CONTRACT={script:"",parameters:[{name:"signature",type:"Signature"}],deployed:!1};t.NEO_NETWORK={MAIN:"MainNet",TEST:"TestNet"};t.NEP_HEADER="0142";t.NEP_FLAG="e0";t.RPC_VERSION="2.3.2";t.TX_VERSION={CLAIM:0,CONTRACT:0,INVOCATION:1}},function(e,t,r){var n=r(7),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},a=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=4*a,f=i/s,u=(f=t?e.ceil(f):e.max((0|f)-this._minBufferSize,0))*a,c=e.min(4*u,i);if(u){for(var l=0;l * @license MIT */ -var n=r(167),i=r(166),a=r(74);function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return H(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var a,o=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,f/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-f),a=r;a>=0;a--){for(var l=!0,d=0;di&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[i+1]))&&(f=(31&u)<<6|63&a)>127&&(c=f);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(f=(15&u)<<12|(63&a)<<6|63&o)>2047&&(f<55296||f>57343)&&(c=f);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(f=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&f<1114112&&(c=f)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return E(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},f.prototype.compare=function(e,t,r,n,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,s=Math.min(a,o),u=this.slice(n,i),c=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,a){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function j(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,a){return a||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,a){return a||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},f.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function D(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(15))},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},a=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=4*a,f=i/s,u=(f=t?e.ceil(f):e.max((0|f)-this._minBufferSize,0))*a,c=e.min(4*u,i);if(u){for(var l=0;l1)for(var r=1;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,f,u){var c=0,l=t;return c+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,f,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(139).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function f(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,f=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,l=67108863&f,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;c+=(o=(i=0|e.words[p])*(a=0|t.words[h])+l)/67108864|0,l=67108863&o}r.words[u]=0|l,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:u[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,f="le"===t,u=new e(a),c=this.clone();if(f){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,v=0|o[2],m=8191&v,g=v>>>13,y=0|o[3],w=8191&y,_=y>>>13,S=0|o[4],k=8191&S,x=S>>>13,A=0|o[5],M=8191&A,E=A>>>13,T=0|o[6],I=8191&T,P=T>>>13,O=0|o[7],R=8191&O,C=O>>>13,B=0|o[8],j=8191&B,N=B>>>13,L=0|o[9],F=8191&L,z=L>>>13,H=0|s[0],D=8191&H,U=H>>>13,q=0|s[1],Y=8191&q,K=q>>>13,V=0|s[2],W=8191&V,X=V>>>13,Z=0|s[3],G=8191&Z,Q=Z>>>13,J=0|s[4],$=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],fe=8191&se,ue=se>>>13,ce=0|s[8],le=8191&ce,de=ce>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(u+(n=Math.imul(l,D))|0)+((8191&(i=(i=Math.imul(l,U))+Math.imul(d,D)|0))<<13)|0;u=((a=Math.imul(d,U))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,U))+Math.imul(b,D)|0,a=Math.imul(b,U);var me=(u+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,Y)|0))<<13)|0;u=((a=a+Math.imul(d,K)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,D),i=(i=Math.imul(m,U))+Math.imul(g,D)|0,a=Math.imul(g,U),n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,Y)|0,a=a+Math.imul(b,K)|0;var ge=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(d,W)|0))<<13)|0;u=((a=a+Math.imul(d,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,U))+Math.imul(_,D)|0,a=Math.imul(_,U),n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,K)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,X)|0;var ye=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,G)|0))<<13)|0;u=((a=a+Math.imul(d,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,U))+Math.imul(x,D)|0,a=Math.imul(x,U),n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,Q)|0;var we=(u+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,$)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,D),i=(i=Math.imul(M,U))+Math.imul(E,D)|0,a=Math.imul(E,U),n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(x,Y)|0,a=a+Math.imul(x,K)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((a=a+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,U))+Math.imul(P,D)|0,a=Math.imul(P,U),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,K)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(l,ae)|0)|0)+((8191&(i=(i=i+Math.imul(l,oe)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,D),i=(i=Math.imul(R,U))+Math.imul(C,D)|0,a=Math.imul(C,U),n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,K)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var ke=(u+(n=n+Math.imul(l,fe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(d,fe)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,U))+Math.imul(N,D)|0,a=Math.imul(N,U),n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(C,Y)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,X)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,$)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(m,ae)|0,i=(i=i+Math.imul(m,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,ue)|0;var xe=(u+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(F,D),i=(i=Math.imul(F,U))+Math.imul(z,D)|0,a=Math.imul(z,U),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(N,Y)|0,a=a+Math.imul(N,K)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,Q)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,ue)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,le)|0,a=a+Math.imul(b,de)|0;var Ae=(u+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,K))+Math.imul(z,Y)|0,a=Math.imul(z,K),n=n+Math.imul(j,W)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(C,G)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,ue)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(g,le)|0,a=a+Math.imul(g,de)|0;var Me=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((a=a+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,X))+Math.imul(z,W)|0,a=Math.imul(z,X),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,Q)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,ue)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,le)|0,a=a+Math.imul(_,de)|0;var Ee=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(g,pe)|0))<<13)|0;u=((a=a+Math.imul(g,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,Q))+Math.imul(z,G)|0,a=Math.imul(z,Q),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,ue)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(x,le)|0,a=a+Math.imul(x,de)|0;var Te=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((a=a+Math.imul(_,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,ee))+Math.imul(z,$)|0,a=Math.imul(z,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(N,re)|0,a=a+Math.imul(N,ne)|0,n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,ue)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(E,le)|0,a=a+Math.imul(E,de)|0;var Ie=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(x,pe)|0))<<13)|0;u=((a=a+Math.imul(x,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(N,ae)|0,a=a+Math.imul(N,oe)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(C,fe)|0,a=a+Math.imul(C,ue)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(P,le)|0,a=a+Math.imul(P,de)|0;var Pe=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(E,pe)|0))<<13)|0;u=((a=a+Math.imul(E,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,ae),i=(i=Math.imul(F,oe))+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(N,fe)|0,a=a+Math.imul(N,ue)|0,n=n+Math.imul(R,le)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(C,le)|0,a=a+Math.imul(C,de)|0;var Oe=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((a=a+Math.imul(P,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,fe),i=(i=Math.imul(F,ue))+Math.imul(z,fe)|0,a=Math.imul(z,ue),n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(N,le)|0,a=a+Math.imul(N,de)|0;var Re=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(C,pe)|0))<<13)|0;u=((a=a+Math.imul(C,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,de))+Math.imul(z,le)|0,a=Math.imul(z,de);var Ce=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(N,pe)|0))<<13)|0;u=((a=a+Math.imul(N,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Be=(u+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,be))+Math.imul(z,pe)|0))<<13)|0;return u=((a=Math.imul(z,be))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=ve,f[1]=me,f[2]=ge,f[3]=ye,f[4]=we,f[5]=_e,f[6]=Se,f[7]=ke,f[8]=xe,f[9]=Ae,f[10]=Me,f[11]=Ee,f[12]=Te,f[13]=Ie,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ce,f[18]=Be,0!==u&&(f[19]=u,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var l=0|this.words[u];this.words[u]=c<<26-a|l>>>a,c=l&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),f=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(l)),i.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(l)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(f)):(r.isub(t),s.isub(i),f.isub(o))}return{a:s,b:f,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(g,m),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var l=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var b=h,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var u=t.words[n],c=f-1;c>=0;c--){var l=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==o?(o<<=1,o|=l,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,r(65)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Account:!0,Balance:!0,Wallet:!0,Claims:!0,AssetBalance:!0,Coin:!0,ClaimItem:!0};Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Balance",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Claims",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"AssetBalance",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"Coin",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"ClaimItem",{enumerable:!0,get:function(){return p.ClaimItem}}),t.default=void 0;var i=v(r(26));Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))});var a=v(r(32));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=v(r(58));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=v(r(93));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=b(r(30)),u=b(r(92)),c=b(r(84)),l=b(r(83)),d=b(r(55)),h=b(r(54)),p=r(45);function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var m={create:{account:function(e){return new f.default(e)},privateKey:i.generatePrivateKey,signature:i.generateSignature,wallet:function(e){return new c.default(e)}},is:{address:a.isAddress,publicKey:a.isPublicKey,encryptedKey:a.isNEP2,privateKey:a.isPrivateKey,wif:a.isWIF},encrypt:{privateKey:o.encrypt},decrypt:{privateKey:o.decrypt},get:{privateKeyFromWIF:i.getPrivateKeyFromWIF,WIFFromPrivateKey:i.getWIFFromPrivateKey,publicKeyFromPrivateKey:i.getPublicKeyFromPrivateKey,scriptHashFromPublicKey:i.getScriptHashFromPublicKey,addressFromScriptHash:i.getAddressFromScriptHash,scriptHashFromAddress:i.getScriptHashFromAddress},sign:{message:s.signMessage},verify:{message:s.verifyMessage}};t.default=m},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=r(25),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var a=r(22);a.inherits=r(1);var o=r(71),s=r(38);a.inherits(l,o);for(var f=i(s.prototype),u=0;u1&&void 0!==arguments[1]&&arguments[1]&&s[e.name])&&(s[e.name]=e,!0)};t.addNetwork=u;var c=function(e){return!!s[e]&&(delete s[e],!0)};t.removeNetwork=c;var l={add:{network:function(e,t){return u(e,t)}},remove:{network:function(e){return c(e)}}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Transaction:!0,calculationStrategy:!0,TxAttrUsage:!0};Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"TxAttrUsage",{enumerable:!0,get:function(){return u.default}}),t.calculationStrategy=t.default=void 0;var i=l(r(91)),a=c(r(50));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=c(r(23));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=c(r(28));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=c(r(48));t.calculationStrategy=f;var u=l(r(51));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){return(d="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&h(i,r.prototype),i}).apply(null,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={create:{tx:function(){for(var e=arguments.length,t=new Array(e),r=0;r=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={RPCClient:!0,Query:!0,queryRPC:!0,Network:!0};Object.defineProperty(t,"RPCClient",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Query",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"queryRPC",{enumerable:!0,get:function(){return a.queryRPC}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(47)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(46)),o=f(r(49)),s=r(85);function f(e){return e&&e.__esModule?e:{default:e}}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var u={create:{rpcClient:function(e){return new i.default(e)},query:function(e){return new a.default(e)}}};t.default=u},function(e,t){},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(){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}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a65535)throw new Error;var t=(0,n.num2hexstring)(e.usage);return 129===e.usage?t+=(0,n.num2hexstring)(e.data.length/2):(144===e.usage||e.usage>=240)&&(t+=(0,n.num2VarInt)(e.data.length/2)),2===e.usage||3===e.usage?t+=e.data.substr(2,64):t+=e.data,t};t.deserializeTransactionAttribute=function(e){var t={usage:parseInt(e.read(1),16)};if(0===t.usage||48===t.usage||t.usage>=161&&t.usage<=175)t.data=e.read(32);else if(2===t.usage||3===t.usage)t.data=(0,n.num2hexstring)(t.usage)+e.read(32);else if(32===t.usage)t.data=e.read(20);else if(129===t.usage)t.data=e.read(parseInt(e.read(1),16));else{if(!(144===t.usage||t.usage>=240))throw new Error;t.data=e.readVarBytes()}return t};t.serializeWitness=function(e){var t=(0,n.num2VarInt)(e.invocationScript.length/2),r=(0,n.num2VarInt)(e.verificationScript.length/2);return t+e.invocationScript+r+e.verificationScript};t.deserializeWitness=function(e){return{invocationScript:e.readVarBytes(),verificationScript:e.readVarBytes()}}},function(e,t,r){"use strict";var n=t;n.base=r(136),n.short=r(135),n.mont=r(134),n.edwards=r(133)},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(a=new Array(s-1),o=0;o1&&void 0!==arguments[1])||arguments[1],r=new i.ec("p256").keyFromPrivate(e,"hex").getPublic().encode("hex");return t?parseInt(r.substr(128,2),16)%2==1?"03"+r.substr(2,64):"02"+r.substr(2,64):r};var d=function(e){return"21"+e+"ac"};t.getVerificationScriptFromPublicKey=d;t.getScriptHashFromPublicKey=function(e){"04"===e.substring(0,2)&&(e=l(e));var t=d(e);return(0,o.reverseHex)((0,o.hash160)(t))};t.getAddressFromScriptHash=function(t){t=(0,o.reverseHex)(t);var r=(0,o.hash256)(s.ADDR_VERSION+t).substr(0,8);return a.default.encode(e.from(s.ADDR_VERSION+t+r,"hex"))};t.getScriptHashFromAddress=function(e){var t=(0,o.ab2hexstring)(a.default.decode(e));return(0,o.reverseHex)(t.substr(2,40))};t.generateSignature=function(t,r){var n=(0,o.sha256)(t),a=e.from(n,"hex"),s=new i.ec("p256").sign(a,r,null);return e.concat([s.r.toArrayLike(e,"be",32),s.s.toArrayLike(e,"be",32)]).toString("hex")};t.generatePrivateKey=function(){return(0,o.ab2hexstring)((0,f.default)(32))};t.generateRandomArray=function(e){return(0,f.default)(e)}}).call(this,r(5).Buffer)},function(e,t,r){e.exports=r(185)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExclusive=t.deserializeExclusive=t.serializeExclusive=void 0;var n=r(0),i=r(23),a={2:function(e){if(2!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.claims.length),r=!0,a=!1,o=void 0;try{for(var s,f=e.claims[Symbol.iterator]();!(r=(s=f.next()).done);r=!0){var u=s.value;t+=(0,i.serializeTransactionInput)(u)}}catch(e){a=!0,o=e}finally{try{r||null==f.return||f.return()}finally{if(a)throw o}}return t},128:function(e){if(128!==e.type)throw new Error;return""},209:function(e){if(209!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.script.length/2);return t+=e.script,e.version>=1&&(t+=(0,n.num2fixed8)(e.gas)),t}};t.serializeExclusive=a;var o={2:function(e){for(var t={claims:[]},r=e.readVarInt(),n=0;n=1?(0,n.fixed82num)(e.read(8)):0}}};t.deserializeExclusive=o;var s={2:function(e){return Object.assign({claims:[]},{claims:e.claims})},128:function(e){return{}},209:function(e){return{script:e.script||"",gas:e.gas||0}}};t.getExclusive=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={OpCode:!0,ScriptBuilder:!0,ContractParam:!0};Object.defineProperty(t,"OpCode",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ScriptBuilder",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ContractParam",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(53)),a=f(r(52)),o=f(r(90)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(89));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t,r){return(u="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&c(i,r.prototype),i}).apply(null,arguments)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var l={create:{contractParam:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0])return this.publicKey;var e=this.publicKey;return n.getPublicKeyUnencoded(e)}},{key:"encrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._encrypted=(0,a.encrypt)(this.privateKey,e,t),this}},{key:"decrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._WIF=(0,a.decrypt)(this.encrypted,e,t),this._updateContractScript(),this}},{key:"export",value:function(){var e=null;if(this._privateKey&&!this._encrypted)throw new Error("Encrypt private key first!");return this._encrypted&&(e=this._encrypted),{address:this.address,label:this.label,isDefault:this.isDefault,lock:this.lock,key:e,contract:this.contract,extra:this.extra}}},{key:Symbol.toStringTag,get:function(){return"Account"}},{key:"encrypted",get:function(){if(this._encrypted)return this._encrypted;throw new Error("No encrypted key found")}},{key:"WIF",get:function(){return this._WIF?this._WIF:(this._WIF=n.getWIFFromPrivateKey(this._privateKey),this._WIF)}},{key:"privateKey",get:function(){if(this._privateKey)return this._privateKey;if(this._WIF)return this._privateKey=n.getPrivateKeyFromWIF(this._WIF),this._privateKey;throw this._encrypted?new ReferenceError("Private Key encrypted!"):new ReferenceError("No Private Key provided!")}},{key:"publicKey",get:function(){return this._publicKey?this._publicKey:(this._publicKey=n.getPublicKeyFromPrivateKey(this.privateKey),this._publicKey)}},{key:"scriptHash",get:function(){return this._scriptHash?this._scriptHash:this._address?(this._scriptHash=n.getScriptHashFromAddress(this.address),this._scriptHash):(this._scriptHash=n.getScriptHashFromPublicKey(this.publicKey),this._scriptHash)}},{key:"address",get:function(){return this._address?this._address:(this._address=n.getAddressFromScriptHash(this.scriptHash),this._address)}}])&&c(t.prototype,r),f&&c(t,f),e}();t.default=d},function(e,t,r){var n;e.exports=(n=r(6),r(57),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=t.enc,f=(s.Utf8,s.Base64),u=t.algo,c=u.EvpKDF,l=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:w}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),d=(r.StreamCipher=l.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),h=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=d.CBC=function(){var t=h.extend();function r(t,r,n){var i=this._iv;if(i){var a=i;this._iv=e}else var a=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:v}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=t.format={},y=g.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else var n=t;return n.toString(f)},parse:function(e){var t=f.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return m.create({ciphertext:t,salt:n})}},w=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=t.kdf={},S=_.OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=c.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},k=r.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=w.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);n.iv=i.iv;var a=w.decrypt.call(this,e,t,i.key,n);return a}})}()))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=t.isScriptHash=t.isPublicKey=t.isPrivateKey=t.isWIF=t.isNEP2=void 0;var n,i=(n=r(35))&&n.__esModule?n:{default:n},a=r(0),o=r(26);t.isNEP2=function(e){try{if(58!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return!!t&&86===t.length&&"01"===t.substr(0,2)&&"42"===t.substr(2,2)&&"e0"===t.substr(4,2)}catch(e){return!1}};t.isWIF=function(e){try{if(52!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return(0,a.hash256)(t.substr(0,t.length-8)).substr(0,8)===t.substr(t.length-8,8)}catch(e){return!1}};t.isPrivateKey=function(e){return/^[0-9A-Fa-f]{64}$/.test(e)};t.isPublicKey=function(e,t){try{var r;switch(e.substr(0,2)){case"04":if(!0===t)return!1;r=(0,o.getPublicKeyEncoded)(e);break;case"02":case"03":if(!1===t)return!1;r=e;break;default:return!1}var n=(0,o.getPublicKeyUnencoded)(r),i=parseInt(n.substr(n.length-2,2),16);if("02"===r.substr(0,2)&&i%2==0)return!0;if("03"===r.substr(0,2)&&i%2==1)return!0}catch(e){}return!1};t.isScriptHash=function(e){return(0,a.isHex)(e)&&40===e.length};t.isAddress=function(e){try{var t=(0,a.ab2hexstring)(i.default.decode(e));if((0,a.hash256)(t.slice(0,42)).substr(0,8)!==t.substr(42,8))return!1;var r=(0,a.reverseHex)(t.slice(2,42));return(0,o.getAddressFromScriptHash)(r)===e}catch(e){return!1}}},function(e,t,r){(function(e,n){var i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),f=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),c(n,e,n.depth)}function f(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function u(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=c(e,i,n)),i}var a=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),S(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(k(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(y(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var u,w="",x=!1,A=["{","}"];(h(r)&&(x=!0,A=["[","]"]),k(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),S(r)&&(w=" "+l(r)),0!==o.length||x&&0!=r.length?n<0?y(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=x?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,a){var o,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),E(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=b(r)?c(e,f.value,null):c(e,f.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),g(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function v(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===x(e)}function S(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function k(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=y,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(115);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(114),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,r(15),r(9))},function(e,t,r){var n=t;n.utils=r(10),n.common=r(21),n.sha=r(131),n.ripemd=r(127),n.hmac=r(126),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){var n=r(142);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,r){"use strict";var n=r(4).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=l,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(156),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(15))},function(e,t,r){"use strict";(function(t,n,i){var a=r(25);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:a.nextTick;g.WritableState=m;var u=r(22);u.inherits=r(1);var c={deprecate:r(155)},l=r(70),d=r(4).Buffer,h=i.Uint8Array||function(){};var p,b=r(69);function v(){}function m(e,t){s=s||r(14),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(a.nextTick(i,n),a.nextTick(x,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),x(e,t))}(e,r,n,t,i);else{var o=S(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?f(w,e,r,o,i):w(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(e){if(s=s||r(14),!(p.call(g,this)||this instanceof s))return new g(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function y(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,y(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback;if(y(e,t,!1,t.objectMode?1:u.length,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),x(e,t)})}function x(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=v),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),a.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(n,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=b.destroy,g.prototype._undestroy=b.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(9),r(37).setImmediate,r(15))},function(e,t,r){(t=e.exports=r(71)).Stream=t,t.Readable=t,t.Writable=r(38),t.Duplex=r(14),t.Transform=r(68),t.PassThrough=r(154)},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,f,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(a(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),o=(u=r.slice()).length,f=0;f0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,a,o,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,a=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";(function(t){var n=r(8),i=r(182),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,f={adapter:("undefined"!=typeof XMLHttpRequest?s=r(78):void 0!==t&&(s=r(78)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){f.headers[e]={}}),n.forEach(["post","put","patch"],function(e){f.headers[e]=n.merge(a)}),e.exports=f}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doSendAsset=t.doMintTokens=t.doClaimAllGas=t.getWalletDBHeight=t.getTransactionHistory=t.getRPCEndpoint=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(17),o=r(19),s=r(3),f=r(0),u=r(16);function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,c(r(2)).default)("api");t.name="neonDB";var d=null,h=function(e){return u.networks[e]?u.networks[e].extra.neonDB:e};t.getAPIEndpoint=h;var p=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/balance/"+t).then(function(r){var n=new i.Balance({net:e,address:r.data.address});return Object.keys(r.data).map(function(e){"net"!==e&&"address"!==e&&n.addAsset(e,r.data[e])}),l.info("Retrieved Balance for ".concat(t," from neonDB ").concat(e)),n})};t.getBalance=p;var b=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){var n=r.data;return n.claims=n.claims.map(function(e){return{claim:new f.Fixed8(e.claim).div(1e8),index:e.index,txid:e.txid,start:new f.Fixed8(e.start),end:new f.Fixed8(e.end),value:e.value}}),l.info("Retrieved Claims for ".concat(t," from neonDB ").concat(e)),new i.Claims(n)})};t.getClaims=b;t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neonDB ").concat(e)),new f.Fixed8(r.data.total_claim+r.data.total_unspent_claim).div(1e8)})};var v=function e(t){var r=h(t);return n.default.get(r+"/v2/network/nodes").then(function(r){var n=r.data.nodes.filter(function(e){return e.status}),i=0,a=[],s=!0,f=!1,c=void 0;try{for(var l,h=n[Symbol.iterator]();!(s=(l=h.next()).done);s=!0){var p=l.value;u.httpsOnly&&!p.url.includes("https://")||(p.block_height>i?(i=p.block_height,a=[p]):p.block_height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{s||null==h.return||h.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(d))return new o.RPCClient(d).ping().then(function(r){return r<=u.timeout.ping?d:(d=null,e(t))});var v=b.map(function(e){return new o.RPCClient(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return d=e,e})};t.getRPCEndpoint=v;t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/history/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neonDB ").concat(e)),r.data.history.map(function(e){return{change:{NEO:new f.Fixed8(e.NEO||0),GAS:new f.Fixed8(e.GAS||0)},blockHeight:new f.Fixed8(e.block_index),txid:e.txid}})})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v2/block/height").then(function(e){return parseInt(e.data.block_height)})};t.doClaimAllGas=function(e,t,r){l.warn("doClaimAllGas will be deprecated in favor of claimGas");var n,s,f=new i.Account(t),u=v(e),c=b(e,f.address);return Promise.all([u,c]).then(function(e){s=e[0];var t=e[1];if(0===t.length)throw new Error("No claimable gas!");var n=a.Transaction.createClaimTx(f.publicKey,t);return r?r(n,f.publicKey):n.sign(f.privateKey)}).then(function(e){return n=e,o.Query.sendRawTransaction(n).execute(s)}).then(function(e){return!0===e.result?e.txid=n:l.error("Transaction failed: ".concat(n.serialize())),e})};t.doMintTokens=function(e,t,r,n,u,c){l.warn("doMintTokens will be deprecated in favor of doInvoke");var d,h,b=new i.Account(r),m=[{assetId:s.ASSET_ID.NEO,value:n,scriptHash:t}],g={operation:"mintTokens",scriptHash:t,args:[]},y=v(e),w=p(e,b.address);return Promise.all([y,w]).then(function(e){h=e[0];var r=e[1],n=[{data:(0,f.reverseHex)(t),usage:a.TxAttrUsage.Script}],i=a.Transaction.createInvocationTx(r,m,g,u,{attributes:n});return c?c(i,b.publicKey):i.sign(b.privateKey)}).then(function(e){return d=e,o.Query.getContractState(t).execute(h)}).then(function(e){var t={invocationScript:"0000",verificationScript:e.result.script};return d.scripts.unshift(t),o.Query.sendRawTransaction(d).execute(h)}).then(function(e){return!0===e.result?e.txid=d.hash:l.error("Transaction failed: ".concat(d.serialize())),e})};t.doSendAsset=function(e,t,r,n,f){l.warn("doSendAsset will be deprecated in favor of sendAsset");var u,c,d=new i.Account(r),h=new i.Account(t),b=v(e),m=p(e,d.address),g=Object.keys(n).map(function(e){return{assetId:s.ASSET_ID[e],value:n[e],scriptHash:h.scriptHash}});return Promise.all([b,m]).then(function(e){c=e[0];var t=e[1],r=a.Transaction.createContractTx(t,g);return f?f(r,d.publicKey):r.sign(d.privateKey)}).then(function(e){return u=e,o.Query.sendRawTransaction(u).execute(c)}).then(function(e){return!0===e.result?e.txid=u.hash:l.error("Transaction failed: ".concat(u.serialize())),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadBalance=t.setSwitchFreeze=t.setApiSwitch=void 0;var n,i=o(r(42)),a=o(r(44));function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var s=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("api"),f=0,u=!1;t.setApiSwitch=function(e){e>=0&&e<=1&&(f=e)};t.setSwitchFreeze=function(e){u=!!e,s.info("core/setSwitchFreeze API switch is frozen: ".concat(u))};var c=function(){!u&&f>0&&(f-=.2,s.info("core API Switch increasing weight towards neoscan"))},l=function(){!u&&f<1&&(f+=.2,s.info("core API Switch increasing weight towards neonDB"))};t.loadBalance=function(e,t){return Math.random()>f?e(t,a).then(function(e){return c(),e}).catch(function(){return l(),e(t,i)}):e(t,i).then(function(e){return l(),e}).catch(function(){return c(),e(t,a)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHistory=t.getWalletDBHeight=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getRPCEndpoint=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(3),o=r(0),s=r(16),f=c(r(2)),u=c(r(47));function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,f.default)("api");t.name="neoscan";var d=null,h=function(e){return s.networks[e]?s.networks[e].extra.neoscan:e};t.getAPIEndpoint=h;t.getRPCEndpoint=function e(t){var r=h(t);return n.default.get(r+"/v1/get_all_nodes").then(function(r){var n=r.data,i=0,a=[],o=!0,f=!1,c=void 0;try{for(var l,h=n[Symbol.iterator]();!(o=(l=h.next()).done);o=!0){var p=l.value;s.httpsOnly&&!p.url.includes("https://")||(p.height>i?(i=p.height,a=[p]):p.height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{o||null==h.return||h.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(d))return new u.default(d).ping().then(function(r){return r<=s.timeout.ping?d:(d=null,e(t))});var v=b.map(function(e){return new u.default(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return d=e,e})};t.getBalance=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_balance/"+t).then(function(r){if(r.data.address!==t&&null===r.data.balance)return new i.Balance({address:r.data.address});var n=new i.Balance({address:r.data.address,net:e});return r.data.balance.map(function(e){n.addAsset(e.asset,{balance:e.amount,unspent:p(e.unspent)})}),l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),n})};t.getClaims=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_claimable/"+t).then(function(r){if(r.address!==t&&null===r.data.claimable)return new i.Claims({address:r.data.address});var n=b(r.data.claimable);return l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),new i.Claims({net:e,address:r.data.address,claims:n})})};t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_unclaimed/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neoscan ").concat(e)),new o.Fixed8(r.data.unclaimed||0)})};var p=function(e){return e.map(function(e){return{index:e.n,txid:e.txid,value:e.value}})},b=function(e){return e.map(function(e){return{start:new o.Fixed8(e.start_height),end:new o.Fixed8(e.end_height),index:e.n,claim:new o.Fixed8(e.unclaimed),txid:e.txid,value:e.value}})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v1/get_height").then(function(e){return parseInt(e.data.height)})};t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_address_neon/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neoscan ").concat(e)),v(r.data.txids)})};var v=function(e){var t=[],r=e.length-1;return e.forEach(function(n,i){var s,f,u,c;if(i!==r){var l=e[i+1],d=m(n.balance),h=m(l.balance);s={NEO:new o.Fixed8(d.NEO||0).minus(h.NEO||0),GAS:new o.Fixed8(d.GAS||0).minus(h.GAS||0)}}else{var p=n.asset_moved===a.ASSET_ID.NEO?"NEO":"GAS";f={},u=p,c=new o.Fixed8(n.amount_moved),u in f?Object.defineProperty(f,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[u]=c,s=f}t.push({txid:n.txid,blockHeight:n.block_height,change:s})}),t},m=function(e){return e.reduce(function(e,t){return e[t.asset]=new o.Fixed8(t.amount),e},{})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportClaimItem=t.ClaimItem=void 0;var n=r(0);t.ClaimItem=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{claim:e.claim?new n.Fixed8(e.claim):new n.Fixed8(0),txid:e.txid||"",index:e.index||0,value:e.value||0,start:e.start?new n.Fixed8(e.start):null,end:e.end?new n.Fixed8(e.end):null}};t.exportClaimItem=function(e){return{claim:e.claim.toNumber(),txid:e.txid,index:e.index,value:e.value,start:e.start?e.start.toNumber():null,end:e.end?e.end.toNumber():null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryRPC=t.default=void 0;var n=f(r(27)),i=r(17),a=r(3),o=f(r(2)),s=r(16);function f(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getBlockHash",value:function(t){return new e({method:"getblockhash",params:[t]})}},{key:"getBestBlockHash",value:function(){return new e({method:"getbestblockhash"})}},{key:"getBlockCount",value:function(){return new e({method:"getblockcount"})}},{key:"getBlockSysFee",value:function(t){return new e({method:"getblocksysfee",params:[t]})}},{key:"getConnectionCount",value:function(){return new e({method:"getconnectioncount"})}},{key:"getContractState",value:function(t){return new e({method:"getcontractstate",params:[t]})}},{key:"getPeers",value:function(){return new e({method:"getpeers"})}},{key:"getRawMemPool",value:function(){return new e({method:"getrawmempool"})}},{key:"getRawTransaction",value:function(t){return new e({method:"getrawtransaction",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getStorage",value:function(t,r){return new e({method:"getstorage",params:[t,r]})}},{key:"getTxOut",value:function(t,r){return new e({method:"gettxout",params:[t,r]})}},{key:"getVersion",value:function(){return new e({method:"getversion"})}},{key:"invoke",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2?n-2:0),a=2;a1&&void 0!==arguments[1]?arguments[1]:o.RPC_VERSION;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t===o.NEO_NETWORK.MAIN?this.net=o.DEFAULT_RPC.MAIN:t===o.NEO_NETWORK.TEST?this.net=o.DEFAULT_RPC.TEST:this.net=t,this.history=[],this.lastSeenHeight=0,this._latencies=[],this.version="",!a.default.valid(r))throw new Error("Invalid Version: ".concat(r));this.version=a.default.clean(r)}var t,r,s;return t=e,(r=[{key:"ping",value:function(){var e=this,t=Date.now(),r=n.default.getBlockCount();return this.execute(r,{timeout:f.timeout.ping}).then(function(r){e.lastSeenHeight=r.result;var n=Date.now()-t;return e.latency=n,n}).catch(function(t){return e.latency=f.timeout.ping,f.timeout.ping})}},{key:"execute",value:function(e,t){return this.history.push(e),l.info("RPC: ".concat(this.net," executing Query[").concat(e.req.method,"]")),e.execute(this.net,t)}},{key:"query",value:function(e,t){var r=new n.default(e);return this.execute(r,t)}},{key:"getAccountState",value:function(e){if(!(0,i.isAddress)(e))throw new Error("Invalid address given: ".concat(e));return this.execute(n.default.getAccountState(e)).then(function(e){return e.result})}},{key:"getAssetState",value:function(e){return this.execute(n.default.getAssetState(e)).then(function(e){return e.result})}},{key:"getBlock",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getBlock(e,t)).then(function(e){return e.result})}},{key:"getBlockHash",value:function(e){return this.execute(n.default.getBlockHash(e)).then(function(e){return e.result})}},{key:"getBestBlockHash",value:function(){return this.execute(n.default.getBestBlockHash()).then(function(e){return e.result})}},{key:"getBlockCount",value:function(){return this.execute(n.default.getBlockCount()).then(function(e){return e.result})}},{key:"getBlockSysFee",value:function(e){return this.execute(n.default.getBlockSysFee(e)).then(function(e){return e.result})}},{key:"getConnectionCount",value:function(){return this.execute(n.default.getConnectionCount()).then(function(e){return e.result})}},{key:"getContractState",value:function(e){return this.execute(n.default.getContractState(e)).then(function(e){return e.result})}},{key:"getPeers",value:function(){return this.execute(n.default.getPeers()).then(function(e){return e.result})}},{key:"getRawMemPool",value:function(){return this.execute(n.default.getRawMemPool()).then(function(e){return e.result})}},{key:"getRawTransaction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getRawTransaction(e,t)).then(function(e){return e.result})}},{key:"getStorage",value:function(e,t){return this.execute(n.default.getStorage(e,t)).then(function(e){return e.result})}},{key:"getTxOut",value:function(e,t){return this.execute(n.default.getTxOut(e,t)).then(function(e){return e.result})}},{key:"getVersion",value:function(){var e=this;return this.execute(n.default.getVersion()).then(function(t){var r=t.result.useragent.match(d)[1];return e.version=a.default.clean(r),e.version}).catch(function(t){if(t.message.includes("Method not found"))return e.version=o.RPC_VERSION,e.version;throw t})}},{key:"invoke",value:function(e,t){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invoke(e,t)).then(function(e){return e.result})}},{key:"invokeFunction",value:function(e,t,r){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeFunction(e,t,r)).then(function(e){return e.result})}},{key:"invokeScript",value:function(e){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeScript(e)).then(function(e){return e.result})}},{key:"sendRawTransaction",value:function(e){return this.execute(n.default.sendRawTransaction(e)).then(function(e){return e.result})}},{key:"submitBlock",value:function(e){return this.execute(n.default.submitBlock(e)).then(function(e){return e.result})}},{key:"validateAddress",value:function(e){return this.execute(n.default.validateAddress(e)).then(function(e){return e.result.isvalid})}},{key:Symbol.toStringTag,get:function(){return"RPC Client"}},{key:"latency",get:function(){return 0===this._latencies.length?99999:Math.floor(this._latencies.reduce(function(e,t){return e+t},0)/this._latencies.length)},set:function(e){this._latencies.length>4&&this._latencies.shift(),this._latencies.push(e)}}])&&c(t.prototype,r),s&&c(t,s),e}();t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.balancedApproach=t.biggestFirst=t.smallestFirst=void 0;var n=r(0);t.smallestFirst=function(e,t){return e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()}),i(t,e.unspent)};t.biggestFirst=function(e,t){return e.unspent.sort(function(e,t){return t.value.sub(e.value).toNumber()}),i(t,e.unspent)};t.balancedApproach=function(e,t){e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()});var r=e.unspent.filter(function(e){return e.value.lte(t)});if(0===r.length)return[e.unspent[0]];var n=r.findIndex(function(e){return t.eq(e.value)});if(n>=0)return[r[n]];var a=e.unspent.slice(r.length),o=[];r.length>0&&o.push(r.pop());var s=t.minus(o.length>0?o[0].value:0),f=i(s,r.concat(a));return o.concat(f)};var i=function(e,t){for(var r=0,i=new n.Fixed8(0);i.lt(e);){if((r+=1)>t.length)throw new Error("Insufficient assets! Reached end of unspent coins! ".concat(t.length));i=i.add(t[r-1].value)}return t.slice(0,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(87)),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.Name||t.name||r||"RandomNet",r&&(this.name=r);var i=t.protocol||t.ProtocolConfiguration||{};this.protocol=new n.default(i),this.nodes=t.Nodes||t.nodes||[],this.extra=t.ExtraConfiguration||t.extra||{}}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new e("string"==typeof jsonString?JSON.parse(t):t,r)}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing Network file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"export",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?JSON.stringify({ProtocolConfiguration:this.protocol.export()}):{Name:this.name,ProtocolConfiguration:this.protocol.export(),ExtraConfiguration:this.extra,Nodes:this.nodes}}},{key:"writeFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.default.writeFile(e,this.export(t),function(e){if(e)throw e;return s.info("Network file written!"),!0})}},{key:"update",value:function(){return this}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHash=t.signTransaction=t.deserializeTransaction=t.serializeTransaction=t.calculateInputs=void 0;var n,i=r(0),a=r(12),o=r(28),s=r(3),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(23)),u=r(16);var c=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("tx");t.calculateInputs=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===t&&(t=[]),null===n&&(n=u.defaultCalculationStrategy);var o=t.reduce(function(e,t){return e[t.assetId]?e[t.assetId]=e[t.assetId].add(t.value):e[t.assetId]=t.value,e},{});return(r=new i.Fixed8(r)).gt(0)&&(o[s.ASSET_ID.GAS]?o[s.ASSET_ID.GAS]=o[s.ASSET_ID.GAS].add(r):o[s.ASSET_ID.GAS]=r),Object.keys(o).map(function(t){var r=o[t],i=s.ASSETS[t];if(-1===e.assetSymbols.indexOf(i))throw new Error("This balance does not contain any ".concat(i,"!"));var f=e.assets[i];if(f.balance.lt(r))throw new Error("Insufficient ".concat(s.ASSETS[t],"! Need ").concat(r.toString()," but only found ").concat(f.balance.toString()));return l((0,a.AssetBalance)(f),r,t,e.address,n)}).reduce(function(e,t){return{inputs:e.inputs.concat(t.inputs),change:e.change.concat(t.change)}},{inputs:[],change:[]})};var l=function(e,t,r,n,o){var s=o(e,t),f=s.reduce(function(e,t){return e.add(t.value)},new i.Fixed8(0)),u=[];return f.gt(t)&&u.push({assetId:r,value:f.sub(t),scriptHash:(0,a.getScriptHashFromAddress)(n)}),{inputs:s.map(function(e){return{prevHash:e.txid,prevIndex:e.index}}),change:u}},d=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";r+=(0,i.num2hexstring)(e.type),r+=(0,i.num2hexstring)(e.version),r+=o.serializeExclusive[e.type](e),r+=(0,i.num2VarInt)(e.attributes.length);var n=!0,a=!1,s=void 0;try{for(var u,c=e.attributes[Symbol.iterator]();!(n=(u=c.next()).done);n=!0){var l=u.value;r+=f.serializeTransactionAttribute(l)}}catch(e){a=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw s}}r+=(0,i.num2VarInt)(e.inputs.length);var d=!0,h=!1,p=void 0;try{for(var b,v=e.inputs[Symbol.iterator]();!(d=(b=v.next()).done);d=!0){var m=b.value;r+=f.serializeTransactionInput(m)}}catch(e){h=!0,p=e}finally{try{d||null==v.return||v.return()}finally{if(h)throw p}}r+=(0,i.num2VarInt)(e.outputs.length);var g=!0,y=!1,w=void 0;try{for(var _,S=e.outputs[Symbol.iterator]();!(g=(_=S.next()).done);g=!0){var k=_.value;r+=f.serializeTransactionOutput(k)}}catch(e){y=!0,w=e}finally{try{g||null==S.return||S.return()}finally{if(y)throw w}}if(t&&e.scripts&&e.scripts.length>0){r+=(0,i.num2VarInt)(e.scripts.length);var x=!0,A=!1,M=void 0;try{for(var E,T=e.scripts[Symbol.iterator]();!(x=(E=T.next()).done);x=!0){var I=E.value;r+=f.serializeWitness(I)}}catch(e){A=!0,M=e}finally{try{x||null==T.return||T.return()}finally{if(A)throw M}}}return r};t.serializeTransaction=d;t.deserializeTransaction=function(e){var t=new i.StringStream(e),r={};r.type=parseInt(t.read(1),16),r.version=parseInt(t.read(1),16);var n=o.deserializeExclusive[r.type](t);r.attributes=[],r.inputs=[],r.outputs=[],r.scripts=[];for(var a=t.readVarInt(),s=0;s1&&void 0!==arguments[1]&&arguments[1];if((0,i.ensureHex)(e),40!==e.length)throw new Error("ScriptHash should be 20 bytes long!");return this.emit(t?a.default.TAILCALL:a.default.APPCALL,(0,i.reverseHex)(e))}},{key:"_emitArray",value:function(e){for(var t=e.length-1;t>=0;t--)this.emitPush(e[t]);return this.emitPush(e.length).emit(a.default.PACK)}},{key:"_emitString",value:function(e){(0,i.ensureHex)(e);var t=e.length/2;if(t<=a.default.PUSHBYTES75)this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<256)this.emit(a.default.PUSHDATA1),this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<65536)this.emit(a.default.PUSHDATA2),this.str+=(0,i.num2hexstring)(t,2,!0),this.str+=e;else{if(!(t<4294967296))throw new Error("String too big to emit!");this.emit(a.default.PUSHDATA4),this.str+=(0,i.num2hexstring)(t,4,!0),this.str+=e}return this}},{key:"_emitNum",value:function(e){if(-1===e)return this.emit(a.default.PUSHM1);if(0===e)return this.emit(a.default.PUSH0);if(e>0&&e<=16)return this.emit(a.default.PUSH1-1+e);var t=(0,i.int2hex)(e);return this.emitPush((0,i.reverseHex)("0".repeat(16-t.length)+t))}},{key:"_emitParam",value:function(e){if(!e.type)throw new Error("No type available!");if(!d(e.value))throw new Error("Invalid value provided!");switch(e.type){case"String":return this._emitString((0,i.str2hexstring)(e.value));case"Boolean":return this.emit(e.value?a.default.PUSHT:a.default.PUSHF);case"Integer":return this._emitNum(e.value);case"ByteArray":return this._emitString(e.value);case"Array":return this._emitArray(e.value);case"Hash160":return this._emitString((0,i.reverseHex)(e.value))}}},{key:"emit",value:function(e,t){return this.str+=(0,i.num2hexstring)(e),t&&(this.str+=t),this}},{key:"emitAppCall",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.emitPush(r),t){for(var a="",o=0;o=81&&n<=96:t.args.unshift(n-80);break;case 193===n:for(var a=t.args.shift(),o=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index||0,txid:e.txid||"",value:e.value?new n.Fixed8(e.value):new n.Fixed8(0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(0),a=(n=r(54))&&n.__esModule?n:{default:n};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.balance,r=e.unspent,n=e.spent,o=e.unconfirmed;return{balance:t?new i.Fixed8(t):new i.Fixed8(0),unspent:r?r.map(function(e){return(0,a.default)(e)}):[],spent:n?n.map(function(e){return(0,a.default)(e)}):[],unconfirmed:o?o.map(function(e){return(0,a.default)(e)}):[]}}},function(e,t,r){(function(t){function r(e){return"function"==typeof e?t("","utf8"):e instanceof t?e:new t("string"==typeof e?e:String(e||""),"utf8")}function n(e){return"number"!=typeof e?null:(e=Math.round(e))<1?null:e>256?null:e}e.exports=function(e,t,i,a){return{password:r(e),salt:r(t),options:function(e){return{maxmem:function(e){if("number"!=typeof e)return null;for(var t=4;t<=2048;t*=2){var r=1048576*t;if(r>e)return null;if(r==e)return r}return null}((e=null!==e&&"object"==typeof e?e:{}).maxmem)||33554432,cost:function(e){if("number"!=typeof e)return null;for(var t=8;t<=64;t++){var r=Math.pow(2,t);if(r>e)return null;if(r==e)return r}return null}(e.cost)||Math.pow(2,14),blockSize:n(e.blockSize)||8,parallel:n(e.parallel)||1,size:(t=e.size,("number"!=typeof t?null:(t=Math.round(t))<1?null:t>2048?null:t)||64)};var t}(i),callback:function(e){return"function"==typeof e?e:null}(arguments[arguments.length-1])}}}).call(this,r(5).Buffer)},function(e,t,r){var n,i,a,o,s,f,u,c;e.exports=(n=r(6),r(107),r(106),a=(i=n).lib,o=a.Base,s=a.WordArray,f=i.algo,u=f.MD5,c=f.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=s.create(),a=i.words,o=r.keySize,f=r.iterations;a.length2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by encryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=new d.default(t),u=(0,o.default)((0,o.default)(m.Latin1.parse(f.address))).toString().slice(0,8),l=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),b=l.slice(0,64),v=l.slice(64),_=(0,h.hexXor)(f.privateKey,b),S=s.default.encrypt(m.Hex.parse(_),m.Hex.parse(v),g),k=p.NEP_HEADER+p.NEP_FLAG+u+S.ciphertext.toString(),x=n.default.encode(e.from(k,"hex"));return y.info("Successfully encrypted key to ".concat(x)),x};t.encryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to encrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,b=u.r,v=u.p,_=new d.default(t),S=(0,o.default)((0,o.default)(m.Latin1.parse(_.address))).toString().slice(0,8);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(S,"hex"),c,b,v,64,function(t,r,i){if(null!=t)f(t);else if(i){var o=e.from(i).toString("hex"),u=o.slice(0,64),c=o.slice(64),l=(0,h.hexXor)(_.privateKey,u),d=s.default.encrypt(m.Hex.parse(l),m.Hex.parse(c),g),b=p.NEP_HEADER+p.NEP_FLAG+S+d.ciphertext.toString(),v=n.default.encode(e.from(b,"hex"));y.info("Successfully encrypted key to ".concat(v)),a(v)}})})};t.decrypt=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by decryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=(0,h.ab2hexstring)(n.default.decode(t)),u=f.substr(6,8),l=f.substr(-64),b=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),v=b.slice(0,64),_=b.slice(64),S={ciphertext:m.Hex.parse(l),salt:""},k=s.default.decrypt(S,m.Hex.parse(_),g),x=(0,h.hexXor)(k.toString(),v),A=new d.default(x);if(u!==(0,o.default)((0,o.default)(m.Latin1.parse(A.address))).toString().slice(0,8))throw new Error("Wrong Password!");return y.info("Successfully decrypted ".concat(t)),A.WIF};t.decryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to decrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,p=u.r,b=u.p,v=(0,h.ab2hexstring)(n.default.decode(t)),_=v.substr(6,8),S=v.substr(-64);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(_,"hex"),c,p,b,64,function(r,n,i){if(null!=r)f(r);else if(i){var u=e.from(i).toString("hex"),c=u.slice(0,64),l=u.slice(64),p={ciphertext:m.Hex.parse(S),salt:""},b=s.default.decrypt(p,m.Hex.parse(l),g),v=(0,h.hexXor)(b.toString(),c),w=new d.default(v),k=(0,o.default)((0,o.default)(m.Latin1.parse(w.address))).toString().slice(0,8);_!==k&&f(new Error("Wrong Password or scrypt parameters!")),y.info("Successfully decrypted ".concat(t)),a(w.WIF)}})})};var w=function(e){var t=Object.assign({},p.DEFAULT_SCRYPT,e);return{n:t.n||t.cost,r:t.r||t.blockSize,p:t.p||t.parallel}}}).call(this,r(5).Buffer)},function(e,t,r){var n;e.exports=(n=r(6),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],f=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),f[i]=r(e.pow(n,1/3)),i++),n++}();var u=[],c=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6],d=r[7],h=0;h<64;h++){if(h<16)u[h]=0|e[t+h];else{var p=u[h-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=u[h-2],m=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[h]=b+u[h-7]+m+u[h-16]}var g=n&i^n&a^i&a,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&l)+f[h]+u[h];d=l,l=c,c=s,s=o+w|0,o=a,a=i,i=n,n=w+(y+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+c|0,r[6]=r[6]+l|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(c),t.HmacSHA256=a._createHmacHelper(c)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(6),n.enc.Hex)},function(e,t,r){"use strict";var n=r(10),i=r(21),a=r(13),o=n.rotr64_hi,s=n.rotr64_lo,f=n.shr64_hi,u=n.shr64_lo,c=n.sum64,l=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,v=n.sum64_5_lo,m=i.BlockHash,g=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function S(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function x(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=o(e,t,1)^o(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=o(e,t,19)^o(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&i;a?r.push(a,o):r.push(o)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,f=0|this._fh,g=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,x=0|this._el,A=0|this._fl,M=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var I=t[T-30],P=t[T-30+1],O=h(I,P),R=p(P,I),C=b(I=t[T-4],P=t[T-4+1]),B=v(P,I),j=t[T-14],N=t[T-14+1],L=t[T-32],F=t[T-32+1],z=R+N|0,H=O+j+m(z,R)|0;H=(H=H+C+m(z=z+B|0,B)|0)+L+m(z=z+F|0,F)|0,t[T]=H,t[T+1]=z}for(var D=0;D<160;D+=2){H=t[D],z=t[D+1];var U=c(r,n,i),q=c(w,_,S),Y=l(r,w),K=l(w,r),V=d(s,x),W=d(x,s),X=o[D],Z=o[D+1],G=u(s,f,g),Q=u(x,A,M),J=E+W|0,$=y+V+m(J,E)|0;$=($=($=$+G+m(J=J+Q|0,Q)|0)+X+m(J=J+Z|0,Z)|0)+H+m(J=J+z|0,z)|0;var ee=K+q|0,te=Y+U+m(ee,K)|0;y=g,E=M,g=f,M=A,f=s,A=x,s=a+$+m(x=k+J|0,k)|0,a=i,k=S,i=n,S=_,n=r,_=w,r=$+te+m(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+x|0,this._fl=this._fl+A|0,this._gl=this._gl+M|0,this._hl=this._hl+E|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+a+m(this._dl,k)|0,this._eh=this._eh+s+m(this._el,x)|0,this._fh=this._fh+f+m(this._fl,A)|0,this._gh=this._gh+g+m(this._gl,M)|0,this._hh=this._hh+y+m(this._hl,E)|0},f.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+h(r[m-15])+r[m-16];for(var g=0;g<64;++g){var y=v+d(f)+u(f,p,b)+o[g]+r[g]|0,w=l(n)+c(n,i,a)|0;v=b,b=p,p=f,f=s+y|0,s=a,a=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},f.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";e.exports=a;var n=r(14),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?_(e,o,t,!1):M(e,o)):_(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){h("emit readable"),e.emit("readable"),P(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(E,e,t))}function E(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function R(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):x(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,h("pipe count=%d opts=%j",a.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:y;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",v),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",b),d=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}a.endEmitted?i.nextTick(f):r.once("end",f),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",l);var d=!1;var p=!1;function b(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==B(a.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function v(t){h("onerror",t),y(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",g),y()}function g(){h("onfinish"),e.removeListener("close",m),y()}function y(){h("unpipe"),r.unpipe(e)}return r.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",v),e.once("close",m),e.once("finish",g),e.emit("pipe",r),a.flowing||(h("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;aparseInt(a.scriptHash,16)?e.tx.scripts.push(n):e.tx.scripts.unshift(n),e}):Promise.resolve(e)},_=function(e){if(e.override||(e.override={}),e.sendingFromSmartContract){var t=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)(t.scriptHash))}return Promise.resolve(e)},S=function(e){if(e.sendingFromSmartContract){var t=(0,i.getScriptHashFromAddress)(e.address);return o.Query.getContractState(t).execute(e.url).then(function(r){var n=r.result.parameters,a={invocationScript:"00".repeat(n.length),verificationScript:""},o=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);return parseInt(t,16)>parseInt(o.scriptHash,16)?e.tx.scripts.push(a):e.tx.scripts.unshift(a),e})}return Promise.resolve(e)},k=function(e){return 0===e.tx.inputs.length&&0===e.tx.outputs.length&&(e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)((0,i.getScriptHashFromAddress)(e.address))),e.tx.addRemark(Date.now().toString()+(0,f.ab2hexstring)((0,i.generateRandomArray)(4)))),Promise.resolve(e)},x=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n5&&void 0!==arguments[5]?arguments[5]:0,h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;l.warn("doTransferToken will be deprecated in favor of doInvoke");var p,b,v=new a.Account(r),m=(0,f.getRPCEndpoint)(e),g=(0,f.getBalance)(e,v.address);return Promise.all([m,g]).then(function(e){b=e[0];var r=e[1],o=(0,a.getScriptHashFromAddress)(v.address),f=(0,s.reverseHex)((0,a.getScriptHashFromAddress)(n)),l=[{assetId:c.ASSET_ID.GAS,value:1e-8,scriptHash:o}],p={scriptHash:t,operation:"transfer",args:[(0,s.reverseHex)(o),f,i]},m=u.Transaction.createInvocationTx(r,l,p,d,{version:1});return h?h(m,v.publicKey):m.sign(v.privateKey)}).then(function(e){return p=e,o.Query.sendRawTransaction(p).execute(b)}).then(function(e){return!0===e.result&&(e.txid=p.hash),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrices=t.getPrice=void 0;var n=i(r(27));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"NEO",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd";return o.warn("This is deprecated in favor of getPrices. There is a known bug for NEP5 tokens with this function."),f("https://api.coinmarketcap.com/v1/ticker/".concat(e.toLowerCase(),"/"),t).then(function(t){var r=t[e.toUpperCase()];if(r)return r;throw new Error("Something went wrong with the CoinMarketCap API!")}).catch(function(e){throw o.error(e.message),e})};function f(e,t){return t=t.toLowerCase(),s.includes(t)?n.default.get("".concat(e,"?limit=0&convert=").concat(t)).then(function(e){var r=e.data;if(r.error)throw new Error(r.error);return function(e,t){var r={};return e.forEach(function(e){r[e.symbol]=parseFloat(e["price_".concat(t.toLowerCase())])}),r}(r,t)}):Promise.reject(new ReferenceError("".concat(t," is not one of the accepted currencies!")))}t.getPrices=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["NEO"];return f("https://api.coinmarketcap.com/v1/ticker/",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd").then(function(t){e=e.map(function(e){return e.toUpperCase()});var r=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t.address||"",this.net=t.net||"NoNet",this.claims=t.claims?t.claims.map(function(e){return(0,i.ClaimItem)(e)}):[]}var t,r,n;return t=e,(r=[{key:a.default.inspect.custom,value:function(e,t){var r=this.claims.map(function(e){return"".concat(e.txid," <").concat(e.index,">: ").concat(e.claim.toString())});return"[Claims(".concat(this.net,"): ").concat(this.address,"]\n").concat(JSON.stringify(r,null,2))}},{key:"export",value:function(){return{address:this.address,net:this.net,claims:this.claims.map(i.exportClaimItem)}}},{key:"slice",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new e({address:this.address,net:this.net,claims:this.claims.slice(t,r)})}},{key:Symbol.toStringTag,get:function(){return"Claims"}}])&&o(t.prototype,r),n&&o(t,n),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(20)),i=o(r(30)),a=r(3);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:a.DEFAULT_WALLET,r=t.name,n=void 0===r?"myWallet":r,i=t.version,o=void 0===i?a.DEFAULT_WALLET.version:i,s=t.scrypt,u=void 0===s?a.DEFAULT_SCRYPT:s,c=t.accounts,l=void 0===c?[]:c,d=t.extra,h=void 0===d?null:d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=n,this.version=o,this.scrypt={n:u.n||u.cost,r:u.r||u.blockSize,p:u.p||u.parallel},this.accounts=[];var p=!0,b=!1,v=void 0;try{for(var m,g=l[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var y=m.value;this.addAccount(y)}}catch(e){b=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(b)throw v}}this.extra=h,f.info("New Wallet created: ".concat(this.name))}var t,r,o;return t=e,r=[{key:"addAccount",value:function(e){var t=this.accounts.length;e instanceof i.default||(e=new i.default(e)),this.accounts.push(e);try{var r=e.address;f.info("Added Account: ".concat(r," to Wallet ").concat(this.name))}catch(e){f.warn("Encrypted account added to Wallet ".concat(this.name,". You will not be able to export this wallet without first decrypting this account"))}return t}},{key:"decrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].decrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"decryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.decrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"encrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].encrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"encryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.encrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"export",value:function(){return{name:this.name,version:this.version,scrypt:this.scrypt,accounts:this.accounts.map(function(e){return e.export()}),extra:this.extra}}},{key:"setDefault",value:function(e){for(var t=0;t)?=?)";var A=f++;s[A]=s[c]+"|x|X|\\*";var M=f++;s[M]=s[u]+"|x|X|\\*";var E=f++;s[E]="[v=\\s]*("+s[M]+")(?:\\.("+s[M]+")(?:\\.("+s[M]+")(?:"+s[v]+")?"+s[y]+"?)?)?";var T=f++;s[T]="[v=\\s]*("+s[A]+")(?:\\.("+s[A]+")(?:\\.("+s[A]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var I=f++;s[I]="^"+s[x]+"\\s*"+s[E]+"$";var P=f++;s[P]="^"+s[x]+"\\s*"+s[T]+"$";var O=f++;s[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var R=f++;s[R]="(?:~>?)";var C=f++;s[C]="(\\s*)"+s[R]+"\\s+",o[C]=new RegExp(s[C],"g");var B=f++;s[B]="^"+s[R]+s[E]+"$";var j=f++;s[j]="^"+s[R]+s[T]+"$";var N=f++;s[N]="(?:\\^)";var L=f++;s[L]="(\\s*)"+s[N]+"\\s+",o[L]=new RegExp(s[L],"g");var F=f++;s[F]="^"+s[N]+s[E]+"$";var z=f++;s[z]="^"+s[N]+s[T]+"$";var H=f++;s[H]="^"+s[x]+"\\s*("+S+")$|^$";var D=f++;s[D]="^"+s[x]+"\\s*("+_+")$|^$";var U=f++;s[U]="(\\s*)"+s[x]+"\\s*("+S+"|"+s[E]+")",o[U]=new RegExp(s[U],"g");var q=f++;s[q]="^\\s*("+s[E]+")\\s+-\\s+("+s[E]+")\\s*$";var Y=f++;s[Y]="^\\s*("+s[T]+")\\s+-\\s+("+s[T]+")\\s*$";var K=f++;s[K]="(<|>)?=?\\s*\\*";for(var V=0;Vi)return null;if(!(t?o[k]:o[w]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(e instanceof X){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof X))return new X(e,t);n("SemVer",e,t),this.loose=t;var r=e.trim().match(t?o[k]:o[w]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new X(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(ee(e,t))return null;var r=W(e),n=W(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=G;var Z=/^[0-9]+$/;function G(e,t){var r=Z.test(e),n=Z.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function Q(e,t,r){return new X(e,r).compare(new X(t,r))}function J(e,t,r){return Q(e,t,r)>0}function $(e,t,r){return Q(e,t,r)<0}function ee(e,t,r){return 0===Q(e,t,r)}function te(e,t,r){return 0!==Q(e,t,r)}function re(e,t,r){return Q(e,t,r)>=0}function ne(e,t,r){return Q(e,t,r)<=0}function ie(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=ee(e,r,n);break;case"!=":i=te(e,r,n);break;case">":i=J(e,r,n);break;case">=":i=re(e,r,n);break;case"<":i=$(e,r,n);break;case"<=":i=ne(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ae(e,t){if(e instanceof ae){if(e.loose===t)return e;e=e.value}if(!(this instanceof ae))return new ae(e,t);n("comparator",e,t),this.loose=t,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new X(e,t).major},t.minor=function(e,t){return new X(e,t).minor},t.patch=function(e,t){return new X(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=J,t.lt=$,t.eq=ee,t.neq=te,t.gte=re,t.lte=ne,t.cmp=ie,t.Comparator=ae;var oe={};function se(e,t){if(e instanceof se)return e.loose===t?e:new se(e.raw,t);if(e instanceof ae)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function fe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ue(e,t,r,n,i,a,o,s,f,u,c,l,d){return((t=fe(r)?"":fe(n)?">="+r+".0.0":fe(i)?">="+r+"."+n+".0":">="+t)+" "+(s=fe(f)?"":fe(u)?"<"+(+f+1)+".0.0":fe(c)?"<"+f+"."+(+u+1)+".0":l?"<="+f+"."+u+"."+c+"-"+l:"<="+s)).trim()}function ce(e,t){for(var r=0;r0){var i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new se(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,a,o,s,f;switch(e=new X(e,n),t=new se(t,n),r){case">":i=J,a=ne,o=$,s=">",f=">=";break;case"<":i=$,a=re,o=J,s="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var u=0;u=0.0.0")),c=c||e,l=l||e,i(e.semver,c.semver,n)?c=e:o(e.semver,l.semver,n)&&(l=e)}),c.operator===s||c.operator===f)return!1;if((!l.operator||l.operator===s)&&a(e,l.semver))return!1;if(l.operator===f&&o(e,l.semver))return!1}return!0}ae.prototype.parse=function(e){var t=this.loose?o[H]:o[D],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new X(r[2],this.loose):this.semver=oe},ae.prototype.toString=function(){return this.value},ae.prototype.test=function(e){return n("Comparator.test",e,this.loose),this.semver===oe||("string"==typeof e&&(e=new X(e,this.loose)),ie(e,this.operator,this.semver,this.loose))},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new se(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),f=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||f},t.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),n("range",e,t);var r=t?o[Y]:o[q];e=e.replace(r,ue),n("hyphen replace",e),e=e.replace(o[U],"$1$2$3"),n("comparator trim",e,o[U]),e=(e=(e=e.replace(o[C],"$1~")).replace(o[L],"$1^")).split(/\s+/).join(" ");var i=t?o[H]:o[D],a=e.split(" ").map(function(e){return function(e,t){return n("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t?o[z]:o[F];return e.replace(r,function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t?o[j]:o[B];return e.replace(r,function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t?o[P]:o[I];return e.replace(r,function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var f=fe(i),u=f||fe(a),c=u||fe(o),l=c;return"="===r&&l&&(r=""),f?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(a=0),c&&(o=0),">"===r?(r=">=",u?(i=+i+1,a=0,o=0):c&&(a=+a+1,o=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[K],"")}(e,t),n("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(a=a.filter(function(e){return!!e.match(i)})),a=a.map(function(e){return new ae(e,t)})},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.loose));for(var t=0;t",r)},t.outside=de,t.prerelease=function(e,t){var r=W(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(o[O]);return null==t?null:W((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.magic=t.magic||t.Magic||0,this.addressVersion=t.addressVersion||t.AddressVersion||23,this.standbyValidators=t.standbyValidators||t.StandbyValidators||[],this.seedList=t.seedList||t.SeedList||[],this.systemFee=t.systemFee||t.SystemFee||n.DEFAULT_SYSFEE}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?JSON.parse(t):t;return new e(Object.assign(n,{extra:n.extra||n.Extra,name:n.name||n.Name||r}))}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing protocol file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"writeFile",value:function(e){return i.default.writeFile(e,this.export(),function(e){if(e)throw e;return console.log("Protocol file written!"),!0})}},{key:"export",value:function(){return{Magic:this.magic,AddressVersion:this.addressVersion,StandbyValidators:this.standbyValidators,SeedList:this.seedList,SystemFee:this.systemFee}}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e){e.exports={MainNet:{Name:"MainNet",ProtocolConfiguration:{Magic:7630401,AddressVersion:23,StandbyValidators:["03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c","02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093","03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a","02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554","024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d","02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e","02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70"],SeedList:["seed1.neo.org:10333","seed2.neo.org:10333","seed3.neo.org:10333","seed4.neo.org:10333","seed5.neo.org:10333"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neonDB:"http://api.wallet.cityofzion.io",neoscan:"https://api.neoscan.io/api/main_net"}},TestNet:{Name:"TestNet",ProtocolConfiguration:{Magic:1953787457,AddressVersion:23,StandbyValidators:["0327da12b5c40200e9f65569476bbff2218da4f32548ff43b6387ec1416a231ee8","026ce35b29147ad09e4afe4ec4a7319095f08198fa8babbe3c56e970b143528d22","0209e7fd41dfb5c2f8dc72eb30358ac100ea8c72da18847befe06eade68cebfcb9","039dafd8571a641058ccc832c5e2111ea39b09c0bde36050914384f7a48bce9bf9","038dddc06ce687677a53d54f096d2591ba2302068cf123c1f2d75c2dddc5425579","02d02b1873a0863cd042cc717da31cea0d7cf9db32b74d4c72c01b0011503e2e22","034ff5ceeac41acf22cd5ed2da17a6df4dd8358fcb2bfb1a43208ad0feaab2746b"],SeedList:["seed1.neo.org:20333","seed2.neo.org:20333","seed3.neo.org:20333","seed4.neo.org:20333","seed5.neo.org:20333"],SystemFee:{EnrollmentTransaction:10,IssueTransaction:5,PublishTransaction:5,RegisterTransaction:100}},ExtraConfiguration:{neonDB:"http://testnet-api.wallet.cityofzion.io",neoscan:"https://neoscan-testnet.io/api/test_net"}},CozNet:{Name:"CozNet",ProtocolConfiguration:{Magic:1010102,AddressVersion:23,StandbyValidators:["032d9e51c7d48b0f5cc63d63deb89767685832cf69eb7113900290f217ae0504ee","022a5b7ccf03166a95e1750f0c350c734c34fe7aac66622eecdb5a529d2e69b1df","03c478d43271c297696ee3ab5a7946ee60287015c7dca6cba867819c7f271bc4ea","0393ef777d01fb60eef1da3474b975c6a393b464bcfe588e2ad7dbc4dbdfa2c244"],SeedList:["188.68.34.29:10330","188.68.34.29:10332","188.68.34.29:10334","188.68.34.29:10336"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neoscan:"https://coz.neoscan-testnet.io/api/main_net"}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDeployScript=t.createScript=void 0;var n,i=r(0),a=(n=r(52))&&n.__esModule?n:{default:n};t.createScript=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.type||128,this.version=r.version||i.TX_VERSION.CONTRACT,this.attributes=r.attributes||[],this.inputs=r.inputs||[],this.outputs=r.outputs?r.outputs.map(function(e){return f.TransactionOutput(e)}):[],this.scripts=r.scripts||[];var n=c.getExclusive[this.type](r);Object.keys(n).map(function(e){t[e]=n[e]})}var t,r,l;return t=e,r=[{key:"addOutput",value:function(e,t,r){if(3===arguments.length)this.outputs.push(f.createTransactionOutput(e,t,r));else{if("object"!==h(arguments[0]))throw new Error("Invalid input given! Give either 1 or 3 arguments!");this.outputs.push(arguments[0])}return this}},{key:"addAttribute",value:function(e,t){if("string"!=typeof t)throw new TypeError("data should be formatted as string!");return this.attributes.push({usage:e,data:t}),this}},{key:"addRemark",value:function(e){var t=(0,o.str2hexstring)(e);return this.addAttribute(s.default.Remark,t)}},{key:"calculate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=u.calculateInputs(e,this.outputs,this.gas,t),n=r.inputs,i=r.change;return this.inputs=n,this.outputs=this.outputs.concat(i),e.applyTx(this),b.info("Calculated the inputs required for Transaction with Balance: ".concat(e.address)),this}},{key:"serialize",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return u.serializeTransaction(this,e)}},{key:"serializeExclusiveData",value:function(){return c.serializeExclusive[this.type](this)}},{key:"sign",value:function(e){return"string"==typeof e&&(e=new n.Account(e)),u.signTransaction(this,e.privateKey),b.info("Signed Transaction with Account: ".concat(e.label)),this}},{key:Symbol.toStringTag,get:function(){return"Transaction"}},{key:"exclusiveData",get:function(){return c.getExclusive[this.type](this)}},{key:"hash",get:function(){return u.getTransactionHash(this)}}],l=[{key:"createClaimTx",value:function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.claims.length)throw new Error("Useless transaction! There is no claims!");var s=new n.Account(t),f=Object.assign({type:2,version:i.TX_VERSION.CLAIM},a),u=new o.Fixed8(0);f.claims=r.claims.slice(0,255).map(function(e){return u=u.add(e.claim),{prevHash:e.txid,prevIndex:e.index}}),f.outputs=[{assetId:i.ASSET_ID.GAS,value:u,scriptHash:s.scriptHash}];var c=new e(Object.assign(f,a));return b.info("New ClaimTransaction for ".concat(s.address)),c}},{key:"createContractTx",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===r)throw new Error("Useless transaction! You are not sending anything!");var a=new e(Object.assign({type:128,version:i.TX_VERSION.CONTRACT,outputs:r},n)).calculate(t);return b.info("New ContractTransaction for ".concat(t.address)),a}},{key:"createInvocationTx",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};null===r&&(r=[]);var f=new e(Object.assign({type:209,version:i.TX_VERSION.INVOCATION,outputs:r,script:"string"==typeof n?n:(0,a.createScript)(n),gas:o},s)).calculate(t);return b.info("New InvocationTransaction for ".concat(t.address)),f}},{key:"deserialize",value:function(t){var r=u.deserializeTransaction(t),n=c.getExclusive[r.type](r);return new e(Object.assign(r,n))}}],r&&p(t.prototype,r),l&&p(t,l),e}();t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(55))&&n.__esModule?n:{default:n},a=r(17),o=r(3),s=r(0),f=r(19);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=r.address||"",this.net=r.net||"NoNet",this.assetSymbols=r.assetSymbols?r.assetSymbols:[],this.assets={},r.assets&&Object.keys(r.assets).map(function(e){"object"===u(r.assets[e])&&t.addAsset(e,r.assets[e])}),this.tokenSymbols=r.tokenSymbols?r.tokenSymbols:[],this.tokens=r.tokens?r.tokens:{}}var t,r,n;return t=e,r=[{key:"addAsset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.default)();e=e.toUpperCase(),this.assetSymbols.push(e);var r=(0,i.default)(t);return this.assets[e]=r,this}},{key:"addToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e=e.toUpperCase(),this.tokenSymbols.push(e),this.tokens[e]=new s.Fixed8(t),this}},{key:"applyTx",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e instanceof a.Transaction?e:a.Transaction.deserialize(e);var n=this.assetSymbols,i=!0,s=!1,f=void 0;try{for(var u,c=function(){var e=u.value,r=function(t){return t.txid===e.prevHash&&t.index===e.prevIndex},i=!0,a=!1,o=void 0;try{for(var s,f=n[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var c=s.value,l=t.assets[c],d=l.unspent.findIndex(r);if(d>=0){var h=l.unspent.splice(d,1);l.spent=l.spent.concat(h);break}}}catch(e){a=!0,o=e}finally{try{i||null==f.return||f.return()}finally{if(a)throw o}}},l=e.inputs[Symbol.iterator]();!(i=(u=l.next()).done);i=!0)c()}catch(e){s=!0,f=e}finally{try{i||null==l.return||l.return()}finally{if(s)throw f}}for(var d=e.hash,h=function(n){var i=e.outputs[n],a=o.ASSETS[i.assetId],s=t.assets[a];s||t.addAsset(a);var f={index:n,txid:d,value:i.value};if(r){var u=s.unconfirmed.findIndex(function(e){return e.txid===f.txid&&e.index===f.index});u>=0&&s.unconfirmed.splice(u,1),s.balance=s.balance.add(i.value),s.unspent||(s.unspent=[]),s.unspent.push(f)}else s.unconfirmed||(s.unconfirmed=[]),s.unconfirmed.push(f);t.assets[a]=s},p=0;p=0&&n<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[u]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(e){}}(n),i.call(f,n,e),typeof console===t&&n=64;){var h,p,b,v,m,g=r,y=n,w=i,_=a,S=o,k=s,x=f,A=u;for(p=0;p<16;p++)b=l+4*p,c[p]=(255&e[b])<<24|(255&e[b+1])<<16|(255&e[b+2])<<8|255&e[b+3];for(p=16;p<64;p++)v=((h=c[p-2])>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,m=((h=c[p-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,c[p]=(v+c[p-7]|0)+(m+c[p-16]|0)|0;for(p=0;p<64;p++)v=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&k^~S&x)|0)+(A+(t[p]+c[p]|0)|0)|0,m=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&y^g&w^y&w)|0,A=x,x=k,k=S,S=_+v|0,_=w,w=y,y=g,g=v+m|0;r=r+g|0,n=n+y|0,i=i+w|0,a=a+_|0,o=o+S|0,s=s+k|0,f=f+x|0,u=u+A|0,l+=64,d-=64}}l(e);var d,h=e.length%64,p=e.length/536870912|0,b=e.length<<3,v=h<56?56:120,m=e.slice(e.length-h,e.length);for(m.push(128),d=h+1;d>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(b>>>24&255),m.push(b>>>16&255),m.push(b>>>8&255),m.push(b>>>0&255),l(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function a(e,t,r){var n;e=e.length<=64?e:i(e);var a=64+t.length+4,o=new Array(a),s=new Array(64),f=[];for(n=0;n<64;n++)o[n]=54;for(n=0;n=a-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)u(),f=f.concat(i(s.concat(i(o)))),r-=32;return r>0&&(u(),f=f.concat(i(s.concat(i(o))).slice(0,r))),f}function o(e,t,r,n,i){var a;for(c(e,16*(2*r-1),i,0,16),a=0;a<2*r;a++)u(e,16*a,i,16),f(i,n),c(i,0,e,t+16*a,16);for(a=0;a>>32-t}function f(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(r=0;r<16;++r)e[r]+=t[r]}function u(e,t,r,n){for(var i=0;i=256)return!1}return!0}function d(e,t){var r=parseInt(e);if(e!=r)throw new Error("invalid "+t);return r}e.exports=function(e,r,i,s,f,h,p){if(!p)throw new Error("missing callback");if(i=d(i,"N"),s=d(s,"r"),f=d(f,"p"),h=d(h,"dkLen"),0===i||0!=(i&i-1))throw new Error("N must be power of 2");if(i>n/128/s)throw new Error("N too large");if(s>n/128/f)throw new Error("r too large");if(!l(e))throw new Error("password must be an array or buffer");if(!l(r))throw new Error("salt must be an array or buffer");for(var b=a(e,r,128*f*s),v=new Uint32Array(32*f*s),m=0;mR&&(r=R);for(var t=0;tR&&(r=R),t=0;t>0&255),b.push(v[t]>>8&255),b.push(v[t]>>16&255),b.push(v[t]>>24&255);var d=a(e,b,h);return p(null,1,d)}C(B)};B()}}()}).call(this,r(37).setImmediate)},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function a(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var o=i>=0?arguments[i]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return t=r(a(t.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===o(e,-1);return(e=r(a(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(a(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),a=n(r.split("/")),o=Math.min(i.length,a.length),s=o,f=0;fr?String.fromCharCode(r):(e.push(r),t=191r?1:2,"");if(0r?String.fromCharCode((31&r)<<6|63&n):String.fromCharCode((15&r)<<12|(63&n)<<6|63&i);return e.length=0,r},this.yb=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>3<<3,t}function ra(e){var t=sa;return sa=(sa=sa+e|0)+7>>3<<3,t}function ua(e){var t=z;return(z=(z=z+e|0)+7>>3<<3)>=va&&wa("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs."),t}function xa(e,t){return Math.ceil(e/(t||8))*(t||8)}var ma=4,ya={},za=p,Aa;function w(e,t){e||wa("Assertion failed: "+t)}function Ca(a){try{var b=s["_"+a];b||(b=eval("_"+a))}catch(e){}return w(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function Ba(e,t,r,n){var i=0,a=0;n=n?n.map(function(e){return function(e,t){if("string"==t){if(e===m||e===k||0===e)return 0;i||(i=ja());var r=qa(e.length+1);return Da(e,r),r}return"array"==t?(i||(i=ja()),Ea(e,r=qa(e.length)),r):e}(e,r[a++])}):[];return e=e.apply(m,n),"string"==t?t=Fa(e):(w("array"!=t),t=e),i&&ka(i),t}function Ga(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":A[e]=t;break;case"i16":Ha[e>>1]=t;break;case"i32":B[e>>2]=t;break;case"i64":Aa=[t>>>0,(0|Math.min(+Math.floor(t/4294967296),4294967295))>>>0],B[e>>2]=Aa[0],B[e+4>>2]=Aa[1];break;case"float":Ia[e>>2]=t;break;case"double":Ja[e>>3]=t;break;default:wa("invalid type for setValue: "+r)}}s.ccall=function(e,t,r,n){return Ba(Ca(e),t,r,n)},s.cwrap=function(e,t,r){var n=Ca(e);return function(){return Ba(n,t,r,Array.prototype.slice.call(arguments))}},s.setValue=Ga,s.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return A[e];case"i16":return Ha[e>>1];case"i32":case"i64":return B[e>>2];case"float":return Ia[e>>2];case"double":return Ja[e>>3];default:wa("invalid type for setValue: "+t)}return m};var Ka=0,La=1,E=2,Na=4;function F(e,t,r,n){var i,a;"number"==typeof e?(i=l,a=e):(i=p,a=e.length);var o="string"==typeof t?t:m;r=r==Na?n:[Oa,qa,ra,ua][r===k?E:r](Math.max(a,o?1:t.length));if(i){for(n=r,w(0==(3&r)),e=r+(-4&a);n>2]=0;for(e=r+a;n=t?2*Math.abs(1<=e)return e;var r=32>=t?Math.abs(1<=r&&(32>=t||e>r)&&(e=-2*r+e),e}s.addOnPreRun=s.Vd=bb,s.addOnInit=s.Sd=function(e){Xa.unshift(e)},s.addOnPreMain=s.Ud=function(e){Ya.unshift(e)},s.addOnExit=s.Rd=function(e){Za.unshift(e)},s.addOnPostRun=s.Td=cb,s.intArrayFromString=J,s.intArrayToString=function(e){for(var t=[],r=0;r>>16)*n+r*(t>>>16)<<16)|0}),Math.ie=Math.imul;var L=0,fb={},gb=p,hb=m,nb,ob,pb;function ib(e){L++,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(!fb[e]),fb[e]=1):s.P("warning: run dependency added without ID")}function jb(e){L--,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(fb[e]),delete fb[e]):s.P("warning: run dependency removed without ID"),0==L&&(hb!==m&&(clearInterval(hb),hb=m),!gb&&kb&&lb())}s.addRunDependency=ib,s.removeRunDependency=jb,s.preloadedImages={},s.preloadedAudios={},Ra=8,sa=Ra+1312,Xa.push({V:function(){mb()}}),nb=nb=F([0,0,0,0,0,0,0,0],"i8",E),ob=ob=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),pb=pb=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),F([111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,115,0,0,0,0,0,0,0,111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,99,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,56,3,0,0,0,0,0,0,63,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,111,112,116,105,111,110,32,100,111,101,115,110,39,116,32,116,97,107,101,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,46,42,115,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,115,0,0,0,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,99,0,0,0,0,255,255,255,255,0,0,0,0,97,109,98,105,103,117,111,117,115,32,111,112,116,105,111,110,32,45,45,32,37,46,42,115,0,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,80,79,83,73,88,76,89,95,67,79,82,82,69,67,84,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,37,115,58,32,0,0,0,0,37,115,10,0,0,0,0,0,37,115,10,0,0,0,0,0,105,110,32,117,115,101,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,37,115,58,32,0,0,0,0,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,58,32,0,0,0,0,0,0,58,32,0,0,0,0,0,0,115,121,115,116,101,109,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,109,97,120,32,115,121,115,116,101,109,32,98,121,116,101,115,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,0,0,0,0,176,2,0,0,6,0,0,0,10,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,2,0,0,6,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,116,57,101,120,99,101,112,116,105,111,110,0,0,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,83,116,50,48,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,0,0,0,0,120,2,0,0,168,2,0,0,0,0,0,0,0,0,0,0,136,2,0,0,176,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",Na,8);var qb=xa(F(12,"i8",E),8);w(0==qb%8);var rb=0;function M(e){return B[rb>>2]=e}s._memcpy=sb,s._memset=tb;var N={L:1,ca:2,Bd:3,sc:4,I:5,za:6,Jb:7,Sc:8,$:9,Zb:10,ua:11,Ld:11,$a:12,Ya:13,kc:14,ed:15,Wb:16,va:17,Md:18,wa:19,gd:20,aa:21,A:22,Mc:23,Za:24,ld:25,Id:26,lc:27,ad:28,da:29,yd:30,Fc:31,rd:32,hc:33,ab:34,Wc:35,pc:36,$b:37,vc:38,wc:39,xc:40,Ec:41,Jd:42,Qc:43,uc:44,ec:45,Tc:46,Pb:50,Sb:51,Nd:52,Oc:53,Tb:54,Ub:55,fc:56,Vb:57,cd:60,Rc:61,Fd:62,bd:63,Xc:64,Yc:65,xd:66,Uc:67,Mb:68,Cd:69,ac:70,td:71,Hc:74,yc:75,ic:76,Rb:77,mc:79,md:80,Qb:81,wd:82,zc:83,Ac:84,Dc:85,Cc:86,Bc:87,dd:88,Nc:89,ya:90,Ic:91,ba:92,nd:95,qd:96,dc:104,Pc:105,Nb:106,vd:107,jd:108,Zc:109,zd:110,cc:111,Kb:112,bc:113,Lc:114,Jc:115,Gd:116,nc:117,oc:118,rc:119,Ob:120,gc:121,Gc:122,ud:123,Ad:124,Lb:125,Kc:126,tc:127,fd:128,Hd:129,sd:130,Kd:131,jc:132,Dd:133,kd:134,Vc:135,$c:136,Yb:137,qc:138,od:139,Xb:140,hd:141,pd:142,Ed:143},ub={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"No message of desired type",36:"Identifier removed",37:"Channel number out of range",38:"Level 2 not synchronized",39:"Level 3 halted",40:"Level 3 reset",41:"Link number out of range",42:"Protocol driver not attached",43:"No CSI structure available",44:"Level 2 halted",45:"Deadlock condition",46:"No record locks available",50:"Invalid exchange",51:"Invalid request descriptor",52:"Exchange full",53:"No anode",54:"Invalid request code",55:"Invalid slot",56:"File locking deadlock error",57:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",74:"Multihop attempted",75:"Inode is remote (not really error)",76:"Cross mount point (not really error)",77:"Trying to read unreadable message",79:"Inappropriate file type or format",80:"Given log. name not unique",81:"f.d. invalid for this operation",82:"Remote address changed",83:"Can\t access a needed shared lib",84:"Accessing a corrupted shared lib",85:".lib section in a.out corrupted",86:"Attempting to link in too many libs",87:"Attempting to exec a shared library",88:"Function not implemented",89:"No more files",90:"Directory not empty",91:"File or path name too long",92:"Too many symbolic links",95:"Operation not supported on transport endpoint",96:"Protocol family not supported",104:"Connection reset by peer",105:"No buffer space available",106:"Address family not supported by protocol family",107:"Protocol wrong type for socket",108:"Socket operation on non-socket",109:"Protocol not available",110:"Can't send after socket shutdown",111:"Connection refused",112:"Address already in use",113:"Connection aborted",114:"Network is unreachable",115:"Network interface is not configured",116:"Connection timed out",117:"Host is down",118:"Host is unreachable",119:"Connection already in progress",120:"Socket already connected",121:"Destination address required",122:"Message too long",123:"Unknown protocol",124:"Socket type not supported",125:"Address not available",126:"ENETRESET",127:"Socket is already connected",128:"Socket is not connected",129:"TOOMANYREFS",130:"EPROCLIM",131:"EUSERS",132:"EDQUOT",133:"ESTALE",134:"Not supported",135:"No medium (in tape drive)",136:"No such host or network path",137:"Filename exists with different case",138:"EILSEQ",139:"Value too large for defined data type",140:"Operation canceled",141:"State not recoverable",142:"Previous owner died",143:"Streams pipe error"};function vb(e,t,r){var n=O(e,{parent:l}).d,i=xb(n,e="/"===e?"/":wb(e)[2]);return i&&g(new Q(i)),n.l.Ta||g(new Q(N.L)),n.l.Ta(n,e,t,r)}function yb(e,t){return vb(e,t=4095&t|32768,0)}function zb(e,t){return vb(e,t=1023&t|16384,0)}function Ab(e,t,r){return vb(e,8192|t,r)}function Bb(e,t){var r=O(t,{parent:l}).d,n="/"===t?"/":wb(t)[2],i=xb(r,n);return i&&g(new Q(i)),r.l.Wa||g(new Q(N.L)),r.l.Wa(r,n,e)}function Cb(e,t){var r;(r="string"==typeof e?O(e,{N:l}).d:e).l.Y||g(new Q(N.L)),r.l.Y(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function Db(e,t){var r,n,i;e=Eb(e);"string"==typeof t?void 0===(n=Fb[t])&&g(Error("Unknown file open mode: "+t)):n=t,r=512&(t=n)?4095&r|32768:0;try{var a=O(e,{N:!(65536&t)});i=a.d,e=a.path}catch(e){}512&t&&(i?2048&t&&g(new Q(N.va)):i=vb(e,r,0)),i||g(new Q(N.ca)),8192==(61440&i.mode)&&(t&=-1025),i?40960==(61440&i.mode)?r=N.ba:16384==(61440&i.mode)&&(0!=(3&t)||1024&t)?r=N.aa:(r=["r","w","rw"][3&t],1024&t&&(r+="w"),r=Gb(i,r)):r=N.ca,r&&g(new Q(r)),1024&t&&((r="string"==typeof(r=i)?O(r,{N:l}).d:r).l.Y||g(new Q(N.L)),16384==(61440&r.mode)&&g(new Q(N.aa)),32768!=(61440&r.mode)&&g(new Q(N.A)),(a=Gb(r,"w"))&&g(new Q(a)),r.l.Y(r,{size:0,timestamp:Date.now()}));var o,s={path:e,d:i,M:t,seekable:l,position:0,e:i.e,Gb:[],error:p};e:{for(i=k||4096,r=k||1;r<=i;r++)if(!R[r]){o=r;break e}g(new Q(N.Za))}return s.s=o,Object.defineProperty(s,"object",{get:function(){return s.d},set:function(e){s.d=e}}),Object.defineProperty(s,"isRead",{get:function(){return 1!=(3&s.M)}}),Object.defineProperty(s,"isWrite",{get:function(){return 0!=(3&s.M)}}),Object.defineProperty(s,"isAppend",{get:function(){return 8&s.M}}),R[o]=s,s.e.open&&s.e.open(s),s}function Hb(e){try{e.e.close&&e.e.close(e)}catch(e){g(e)}finally{R[e.s]=m}}function Ib(e,t,r,n,i){(0>n||0>i)&&g(new Q(N.A)),0==(3&e.M)&&g(new Q(N.$)),16384==(61440&e.d.mode)&&g(new Q(N.aa)),e.e.write||g(new Q(N.A));var a=l;return void 0===i?(i=e.position,a=p):e.seekable||g(new Q(N.da)),8&e.M&&((!e.seekable||!e.e.na)&&g(new Q(N.da)),e.e.na(e,0,2)),t=e.e.write(e,t,r,n,i),a||(e.position+=t),t}function wb(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)}function Jb(e,t){for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function Eb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return!(e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"))&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function S(){return Eb(Array.prototype.slice.call(arguments,0).filter(function(e){return"string"!=typeof e&&g(new TypeError("Arguments to path.join must be strings")),e}).join("/"))}function Kb(){for(var e="",t=p,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:"/";"string"!=typeof n&&g(new TypeError("Arguments to path.resolve must be strings")),n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}var Lb=[];function Mb(e,t){Lb[e]={input:[],H:[],O:t},Nb[e]={e:Ob}}var Ob={open:function(e){Pb||(Pb=new pa);var t=Lb[e.d.X];t||g(new Q(N.wa)),e.q=t,e.seekable=p},close:function(e){e.q.H.length&&e.q.O.W(e.q,10)},Q:function(e,t,r,n){(!e.q||!e.q.O.Na)&&g(new Q(N.za));for(var i=0,a=0;ar.length;)r.push(0)}},tb:function(){g(new Q(N.ca))},Ta:function(e,t,r,n){return T.ka(e,t,r,n)},rename:function(e,t,r){if(16384==(61440&e.mode)){var n;try{n=Sb(t,r)}catch(e){}if(n)for(var i in n.g)g(new Q(N.ya))}delete e.parent.g[e.name],e.name=r,t.g[r]=e},ze:function(e,t){delete e.g[t]},ve:function(e,t){var r,n=Sb(e,t);for(r in n.g)g(new Q(N.ya));delete e.g[t]},Wa:function(e,t,r){return(e=T.ka(e,t,41471,0)).link=r,e},Va:function(e){return 40960!=(61440&e.mode)&&g(new Q(N.A)),e.link}},e:{open:function(e){if(16384==(61440&e.d.mode)){var t,r=[".",".."];for(t in e.d.g)e.d.g.hasOwnProperty(t)&&r.push(t);e.lb=r}},Q:function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.subarray)t.set(e.subarray(i,i+n),r);else for(var a=0;at&&g(new Q(N.A)),e.Gb=[],e.position=t},ue:function(e){return e.lb},Wd:function(e,t,r){for(e=e.d.g,t+=r;t>e.length;)e.push(0)},ne:function(e,t,r,n,i,a,o){return 32768!=(61440&e.d.mode)&&g(new Q(N.wa)),e=e.d.g,2&o?((0e||0===e&&-1/0==1/e}function kc(e,t){function r(e){var r;return"double"===e?r=Ja[t+o>>3]:"i64"==e?(r=[B[t+o>>2],B[t+(o+8)>>2]],o+=8):(e="i32",r=B[t+o>>2]),o+=Math.max(Math.max(la(e),ma),8),r}for(var n,i,a=e,o=0,s=[];;){var f=a;if(0===(n=A[a]))break;if(i=A[a+1|0],37==n){var u=p,c=p,d=p,h=p;e:for(;;){switch(i){case 43:u=l;break;case 45:c=l;break;case 35:d=l;break;case 48:if(h)break e;h=l;break;default:break e}i=A[++a+1|0]}var b=0;if(42==i)b=r("i32"),i=A[++a+1|0];else for(;48<=i&&57>=i;)b=10*b+(i-48),i=A[++a+1|0];var v,g=p;if(46==i){var y=0;g=l;if(42==(i=A[++a+1|0]))y=r("i32"),a++;else for(;!(48>(i=A[a+1|0])||57>>0)+4294967296*+(n[1]>>>0):+(n[0]>>>0)+4294967296*+(0|n[1])),4>=v&&(n=(f?eb:db)(n&Math.pow(256,v)-1,8*v));var S=Math.abs(n);f="";if(100==i||105==i)w=8==v&&lc?lc.stringify(_[0],_[1],m):eb(n,8*v).toString(10);else if(117==i)w=8==v&&lc?lc.stringify(_[0],_[1],l):db(n,8*v).toString(10),n=Math.abs(n);else if(111==i)w=(d?"0":"")+S.toString(8);else if(120==i||88==i){if(f=d&&0!=n?"0x":"",8==v&&lc)if(_[1]){for(w=(_[1]>>>0).toString(16),d=(_[0]>>>0).toString(16);8>d.length;)d="0"+d;w+=d}else w=(_[0]>>>0).toString(16);else if(0>n){for(n=-n,w=(S-1).toString(16),_=[],d=0;dn?"-"+f:"+"+f);f.length+w.length(v=parseInt(n.toExponential(v).split("e")[1],10))&&-4<=v?(i=(103==i?"f":"F").charCodeAt(0),y-=v+1):(i=(103==i?"e":"E").charCodeAt(0),y--),v=Math.min(y,20)),101==i||69==i?(w=n.toExponential(v),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):102!=i&&70!=i||(w=n.toFixed(v),0===n&&jc(n)&&(w="-"+w)),f=w.split("e"),g&&!d)for(;1v++;)f[0]+="0";w=f[0]+(1n?"-":"")+"inf",h=p;for(;w.lengthi&&(w=w.toUpperCase()),w.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":if(h=(u=r("i8*"))?ic(u):6,g&&(h=Math.min(h,y)),!c)for(;h>2]=s.length;break;case"%":s.push(n);break;default:for(d=f;d>12<<12,nc.ia=l,w(ua),nc.hb=ua,ua=function(){wa("cannot dynamically allocate, sbrk now has control")});var t=z;return 0!=e&&nc.hb(e),t}function U(){return B[U.m>>2]}function oc(){return!!oc.ta}function pc(e){var t=p;try{e==__ZTIi&&(t=l)}catch(e){}try{e==__ZTIj&&(t=l)}catch(e){}try{e==__ZTIl&&(t=l)}catch(e){}try{e==__ZTIm&&(t=l)}catch(e){}try{e==__ZTIx&&(t=l)}catch(e){}try{e==__ZTIy&&(t=l)}catch(e){}try{e==__ZTIf&&(t=l)}catch(e){}try{e==__ZTId&&(t=l)}catch(e){}try{e==__ZTIe&&(t=l)}catch(e){}try{e==__ZTIc&&(t=l)}catch(e){}try{e==__ZTIa&&(t=l)}catch(e){}try{e==__ZTIh&&(t=l)}catch(e){}try{e==__ZTIs&&(t=l)}catch(e){}try{e==__ZTIt&&(t=l)}catch(e){}return t}function qc(e,t,r){if(0==r)return p;if(0==t||t==e)return l;switch(pc(t)?t:B[B[t>>2]-8>>2]){case 0:return 0==B[B[e>>2]-8>>2]?qc(B[e+8>>2],B[t+8>>2],r):p;case 1:return p;case 2:return qc(e,B[t+8>>2],r);default:return p}}function rc(e,t,r){if(!rc.sb){try{B[__ZTVN10__cxxabiv119__pointer_type_infoE>>2]=0}catch(e){}try{B[pb>>2]=1}catch(e){}try{B[ob>>2]=2}catch(e){}rc.sb=l}B[U.m>>2]=e,B[U.m+4>>2]=t,B[U.m+8>>2]=r,"uncaught_exception"in oc?oc.ta++:oc.ta=1,g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")}function sc(e){try{return tc(e)}catch(e){}}function uc(){if(uc.Bb)uc.Bb=p;else{V.setThrew(0),B[U.m+4>>2]=0;var e=B[U.m>>2],t=B[U.m+8>>2];t&&(na("vi",t,[e]),B[U.m+8>>2]=0),e&&(sc(e),B[U.m>>2]=0)}}s._strlen=ic;var vc=F(1,"i32*",E);function wc(e){var t,r;wc.ia?(r=B[vc>>2],t=B[r>>2]):(wc.ia=l,W.USER="root",W.PATH="/",W.PWD="/",W.HOME="/home/emscripten",W.LANG="en_US.UTF-8",W._="./this.program",t=F(1024,"i8",E),r=F(256,"i8*",E),B[r>>2]=t,B[vc>>2]=r);var n,i=[],a=0;for(n in e)if("string"==typeof e[n]){var o=n+"="+e[n];i.push(o),a+=o.length}for(1024>2]=t,t+=o.length+1}B[r+4*i.length>>2]=0}var W={};function xc(e){return 0===e?0:(e=Fa(e),W.hasOwnProperty(e)?(xc.J&&tc(xc.J),xc.J=F(J(W[e]),"i8",Ka),xc.J):0)}function yc(e,t,r){if(e in ub){if(ub[e].length>r-1)return M(N.ab);for(e=ub[e],r=0;r>2],B[SDL.screen+0*ma>>2]=8388608|e),Kc()}function Mc(){var e=s.canvas;e.width=this.Ib,e.height=this.Hb,"undefined"!=typeof SDL&&(e=Qa[SDL.screen+0*ma>>2],B[SDL.screen+0*ma>>2]=-8388609&e),Kc()}var Nc,Oc,Pc,Qc,rb=ra(4);B[rb>>2]=0;var Vb=Qb(m,"/",16895,0),Rc=T,Sc={type:Rc,se:{},Ua:"/",root:m},Tc;Tc=O("/",{N:p});var Uc=Rc.z(Sc);Uc.z=Sc,Sc.root=Uc,Tc&&(Tc.d.z=Sc,Tc.d.ub=l,Vb=Sc.root),zb("/tmp",511),zb("/dev",511),Nb[259]={e:{Q:function(){return 0},write:function(){return 0}}},Ab("/dev/null",438,259),Mb(1280,{Na:function(e){if(!e.input.length){var t=m;if(ca){if(process.Eb.be)return;t=process.Eb.Q()}else"undefined"!=typeof window&&"function"==typeof window.prompt?(t=window.prompt("Input: "))!==m&&(t+="\n"):"function"==typeof readline&&((t=readline())!==m&&(t+="\n"));if(!t)return m;e.input=J(t,l)}return e.input.shift()},W:function(e,t){t===m||10===t?(s.print(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Mb(1536,{W:function(e,t){t===m||10===t?(s.printErr(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Ab("/dev/tty",438,1280),Ab("/dev/tty1",438,1536),zb("/dev/shm",511),zb("/dev/shm/tmp",511),Xa.unshift({V:function(){if(!s.noFSInit&&!bc){w(!bc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),bc=l,s.stdin=s.stdin,s.stdout=s.stdout,s.stderr=s.stderr,s.stdin?ec("/dev","stdin",s.stdin):Bb("/dev/tty","/dev/stdin"),s.stdout?ec("/dev","stdout",m,s.stdout):Bb("/dev/tty","/dev/stdout"),s.stderr?ec("/dev","stderr",m,s.stderr):Bb("/dev/tty1","/dev/stderr");var e=Db("/dev/stdin","r");B[Tb>>2]=e.s,w(1===e.s,"invalid handle for stdin ("+e.s+")"),e=Db("/dev/stdout","w"),B[Ub>>2]=e.s,w(2===e.s,"invalid handle for stdout ("+e.s+")"),e=Db("/dev/stderr","w"),B[nb>>2]=e.s,w(3===e.s,"invalid handle for stderr ("+e.s+")")}}}),Ya.push({V:function(){Yb=p}}),Za.push({V:function(){bc=p;for(var e=0;e>a-6&63;a=a-6,r=r+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),u.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(u)}},u.src=f,setTimeout(function(){za||i(u)},1e4)}});var d=s.canvas;d.qa=d.requestPointerLock||d.mozRequestPointerLock||d.webkitRequestPointerLock,d.La=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||aa(),d.La=d.La.bind(document),document.addEventListener("pointerlockchange",u,p),document.addEventListener("mozpointerlockchange",u,p),document.addEventListener("webkitpointerlockchange",u,p),s.elementPointerLock&&d.addEventListener("click",function(e){!Ec&&d.qa&&(d.qa(),e.preventDefault())},p)}var h,b=S.apply(m,[e,t]);if("/"==b[0]&&(b=b.substr(1)),ib("cp "+(h=b)),"string"==typeof r){var v=o,y=function(){v?v():g('Loading data file "'+r+'" failed.')},_=new XMLHttpRequest;_.open("GET",r,l),_.responseType="arraybuffer",_.onload=function(){if(200==_.status||0==_.status&&_.response){var e=_.response;w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),c(e=new Uint8Array(e)),jb("al "+r)}else y()},_.onerror=y,_.send(m),ib("al "+r)}else c(r)},s.FS_createLazyFile=function(e,t,r,n,i){var a,o;"undefined"!=typeof XMLHttpRequest?(ea||g("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),(a=function(){this.ma=p,this.T=[]}).prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.S;return this.pb(Math.floor(e/this.S))[t]}},a.prototype.Cb=function(e){this.pb=e},a.prototype.Fa=function(){var e=new XMLHttpRequest;e.open("HEAD",r,p),e.send(m),200<=e.status&&300>e.status||304===e.status||g(Error("Couldn't load "+r+". Status: "+e.status));var t,n=Number(e.getResponseHeader("Content-length")),i=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(i=n);var a=this;a.Cb(function(e){var t=e*i,o=(e+1)*i-1;o=Math.min(o,n-1);if(void 0===a.T[e]){var s=a.T;t>o&&g(Error("invalid range ("+t+", "+o+") or no bytes requested!")),o>n-1&&g(Error("only "+n+" bytes available! programmer error!"));var f=new XMLHttpRequest;f.open("GET",r,p),n!==i&&f.setRequestHeader("Range","bytes="+t+"-"+o),"undefined"!=typeof Uint8Array&&(f.responseType="arraybuffer"),f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(m),200<=f.status&&300>f.status||304===f.status||g(Error("Couldn't load "+r+". Status: "+f.status)),t=f.response!==k?new Uint8Array(f.response||[]):J(f.responseText||"",l),s[e]=t}return void 0===a.T[e]&&g(Error("doXHR failed!")),a.T[e]}),this.gb=n,this.fb=i,this.ma=l},a=new a,Object.defineProperty(a,"length",{get:function(){return this.ma||this.Fa(),this.gb}}),Object.defineProperty(a,"chunkSize",{get:function(){return this.ma||this.Fa(),this.fb}}),o=k):(o=r,a=k);var f;e=S("string"==typeof e?e:ac(e),t);f=yb(e,cc(n,i)),a?f.g=a:o&&(f.g=m,f.url=o);var u={};return Object.keys(f.e).forEach(function(e){var t=f.e[e];u[e]=function(){var e;if(f.ke||f.le||f.link||f.g)e=l;else{if(e=l,"undefined"!=typeof XMLHttpRequest&&g(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")),s.read)try{f.g=J(s.read(f.url),l)}catch(t){e=p}else g(Error("Cannot load without read() or XMLHttpRequest."));e||M(N.I)}return e||g(new Q(N.I)),t.apply(m,arguments)}}),u.Q=function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.slice)for(var a=0;a>3<<3;return t|0}function at(){return l|0}function ot(e){e=e|0;l=e}function st(e,t){e=e|0;t=t|0;if((k|0)==0){k=e;x=t}}function ft(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0]}function ut(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0];n[h+4|0]=n[e+4|0];n[h+5|0]=n[e+5|0];n[h+6|0]=n[e+6|0];n[h+7|0]=n[e+7|0]}function ct(e){e=e|0;N=e}function lt(e){e=e|0;L=e}function dt(e){e=e|0;F=e}function ht(e){e=e|0;z=e}function pt(e){e=e|0;H=e}function bt(e){e=e|0;D=e}function vt(e){e=e|0;U=e}function mt(e){e=e|0;q=e}function gt(e){e=e|0;Y=e}function yt(e){e=e|0;K=e}function wt(){a[170]=y+8;a[172]=g+8;a[176]=g+8}function _t(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)==0){return}else{i=0}do{n[e+i|0]=n[t+i|0]|0;i=i+1|0}while(i>>>0>>0);return}function St(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0;if((r|0)==0){return}else{i=0}do{a=e+i|0;n[a]=n[a]^n[t+i|0];i=i+1|0}while(i>>>0>>0);return}function kt(e){e=e|0;var t=0,r=0,n=0,i=0;t=o[e+1|0]|0;r=o[e+2|0]|0;n=o[e+3|0]|0;i=rn(t<<8|0>>>24|(o[e]|0)|(r<<16|0>>>16)|(n<<24|0>>>8)|(0<<8|0>>>24),0<<8|t>>>24|(0<<16|r>>>16)|(0<<24|n>>>8)|(o[e+4|0]|0)|((o[e+5|0]|0)<<8|0>>>24),0<<16|0>>>16,(o[e+6|0]|0)<<16|0>>>16)|0;n=rn(i,N,0<<24|0>>>8,(o[e+7|0]|0)<<24|0>>>8)|0;return(N=N,n)|0}function xt(e){e=e|0;return(o[e+1|0]|0)<<8|(o[e]|0)|(o[e+2|0]|0)<<16|(o[e+3|0]|0)<<24|0}function At(e,t){e=e|0;t=t|0;n[e]=t&255;n[e+1|0]=t>>>8&255;n[e+2|0]=t>>>16&255;n[e+3|0]=t>>>24&255;return}function Mt(e){e=e|0;a[e+36>>2]=0;a[e+32>>2]=0;a[e>>2]=1779033703;a[e+4>>2]=-1150833019;a[e+8>>2]=1013904242;a[e+12>>2]=-1521486534;a[e+16>>2]=1359893119;a[e+20>>2]=-1694144372;a[e+24>>2]=528734635;a[e+28>>2]=1541459225;return}function Et(e,t,r,n,i,o,s,f,u,c){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;o=o|0;s=s|0;f=f|0;u=u|0;c=c|0;var l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0;l=hn(f,0,s,0)|0;d=N;h=0;if(d>>>0>h>>>0|d>>>0==h>>>0&l>>>0>1073741823>>>0){a[(Je()|0)>>2]=27;p=-1;return p|0}l=rn(i,o,-1,-1)|0;if((l&i|0)!=0|(N&o|0)!=0|(i|0)==0&(o|0)==0){a[(Je()|0)>>2]=22;p=-1;return p|0}do{if(!((33554431/(f>>>0)|0)>>>0>>0|s>>>0>16777215)){l=0;if(l>>>0>>0|l>>>0==o>>>0&(33554431/(s>>>0)|0)>>>0>>0){break}l=s<<7;h=Yt(oe(l,f)|0)|0;if((h|0)==0){p=-1;return p|0}d=Yt(s<<8)|0;do{if((d|0)!=0){b=hn(l,0,i,o)|0;v=Yt(b)|0;if((v|0)==0){Kt(d);break}b=oe(f<<7,s)|0;Ut(e,t,r,n,1,0,h,b);if((f|0)!=0){m=s<<7;g=0;do{Tt(h+(oe(m,g)|0)|0,s,i,o,v,d);g=g+1|0}while(g>>>0>>0)}Ut(e,t,h,b,1,0,u,c);Kt(v);Kt(d);Kt(h);p=0;return p|0}}while(0);Kt(h);p=-1;return p|0}}while(0);a[(Je()|0)>>2]=12;p=-1;return p|0}function Tt(e,t,r,n,i,a){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;a=a|0;var o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0;o=t<<7;s=a+o|0;_t(a,e,o);if((r|0)==0&(n|0)==0){_t(e,a,o);return}f=o;u=0;c=0;l=0;do{d=hn(l,c,f,u)|0;_t(i+d|0,a,o);It(a,s,t);l=rn(l,c,1,0)|0;c=N}while(c>>>0>>0|c>>>0==n>>>0&l>>>0>>0);if((r|0)==0&(n|0)==0){_t(e,a,o);return}l=rn(r,n,-1,-1)|0;c=N;u=o;f=0;d=0;h=0;do{p=Pt(a,t)|0;b=hn(p&l,N&c,u,f)|0;St(a,i+b|0,o);It(a,s,t);h=rn(h,d,1,0)|0;d=N}while(d>>>0>>0|d>>>0==n>>>0&h>>>0>>0);_t(e,a,o);return}function It(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,a=0,o=0,s=0,f=0,u=0;n=l;l=l+64|0;i=n|0;a=r<<1;_t(i,e+((r<<7)-64)|0,64);if((a|0)!=0){o=0;do{s=o<<6;St(i,e+s|0,64);Ot(i);_t(t+s|0,i,64);o=o+1|0}while(o>>>0>>0)}if((r|0)==0){l=n;return}else{f=0}do{_t(e+(f<<6)|0,t+(f<<7)|0,64);f=f+1|0}while(f>>>0>>0);if((r|0)==0){l=n;return}else{u=0}do{_t(e+(u+r<<6)|0,t+(u<<7|64)|0,64);u=u+1|0}while(u>>>0>>0);l=n;return}function Pt(e,t){e=e|0;t=t|0;var r=0;r=kt(e+((t<<7)-64)|0)|0;return(N=N,r)|0}function Ot(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,D=0,U=0,q=0,Y=0,K=0,V=0,W=0,X=0,Z=0,G=0,Q=0,J=0,$=0,ee=0,te=0;t=l;l=l+128|0;r=t|0;n=t+64|0;i=0;do{a[r+(i<<2)>>2]=xt(e+(i<<2)|0)|0;i=i+1|0}while(i>>>0<16);i=r;o=n;$r(o|0,i|0,64)|0;i=n|0;o=n+48|0;s=n+16|0;f=n+32|0;u=n+20|0;c=n+4|0;d=n+36|0;h=n+52|0;p=n+40|0;b=n+24|0;v=n+56|0;m=n+8|0;g=n+60|0;y=n+44|0;w=n+12|0;_=n+28|0;S=0;k=a[i>>2]|0;x=a[o>>2]|0;A=a[s>>2]|0;M=a[f>>2]|0;E=a[u>>2]|0;T=a[c>>2]|0;I=a[d>>2]|0;P=a[h>>2]|0;O=a[p>>2]|0;R=a[b>>2]|0;C=a[v>>2]|0;B=a[m>>2]|0;j=a[g>>2]|0;N=a[y>>2]|0;L=a[w>>2]|0;F=a[_>>2]|0;do{z=x+k|0;H=(z<<7|z>>>25)^A;z=H+k|0;D=(z<<9|z>>>23)^M;z=D+H|0;U=(z<<13|z>>>19)^x;z=U+D|0;q=(z<<18|z>>>14)^k;z=T+E|0;Y=(z<<7|z>>>25)^I;z=Y+E|0;K=(z<<9|z>>>23)^P;z=K+Y|0;V=(z<<13|z>>>19)^T;z=V+K|0;W=(z<<18|z>>>14)^E;z=R+O|0;X=(z<<7|z>>>25)^C;z=X+O|0;Z=(z<<9|z>>>23)^B;z=Z+X|0;G=(z<<13|z>>>19)^R;z=G+Z|0;Q=(z<<18|z>>>14)^O;z=N+j|0;J=(z<<7|z>>>25)^L;z=J+j|0;$=(z<<9|z>>>23)^F;z=$+J|0;ee=(z<<13|z>>>19)^N;z=ee+$|0;te=(z<<18|z>>>14)^j;z=J+q|0;T=(z<<7|z>>>25)^V;V=T+q|0;B=(V<<9|V>>>23)^Z;Z=B+T|0;L=(Z<<13|Z>>>19)^J;J=L+B|0;k=(J<<18|J>>>14)^q;q=H+W|0;R=(q<<7|q>>>25)^G;G=R+W|0;F=(G<<9|G>>>23)^$;$=F+R|0;A=($<<13|$>>>19)^H;H=A+F|0;E=(H<<18|H>>>14)^W;W=Y+Q|0;N=(W<<7|W>>>25)^ee;ee=N+Q|0;M=(ee<<9|ee>>>23)^D;D=M+N|0;I=(D<<13|D>>>19)^Y;Y=I+M|0;O=(Y<<18|Y>>>14)^Q;Q=X+te|0;x=(Q<<7|Q>>>25)^U;U=x+te|0;P=(U<<9|U>>>23)^K;K=P+x|0;C=(K<<13|K>>>19)^X;X=C+P|0;j=(X<<18|X>>>14)^te;S=S+2|0}while(S>>>0<8);a[i>>2]=k;a[o>>2]=x;a[s>>2]=A;a[f>>2]=M;a[u>>2]=E;a[c>>2]=T;a[d>>2]=I;a[h>>2]=P;a[p>>2]=O;a[b>>2]=R;a[v>>2]=C;a[m>>2]=B;a[g>>2]=j;a[y>>2]=N;a[w>>2]=L;a[_>>2]=F;F=r|0;a[F>>2]=(a[F>>2]|0)+(a[n>>2]|0);F=r+4|0;a[F>>2]=(a[F>>2]|0)+(a[n+4>>2]|0);F=r+8|0;a[F>>2]=(a[F>>2]|0)+(a[n+8>>2]|0);F=r+12|0;a[F>>2]=(a[F>>2]|0)+(a[n+12>>2]|0);F=r+16|0;a[F>>2]=(a[F>>2]|0)+(a[n+16>>2]|0);F=r+20|0;a[F>>2]=(a[F>>2]|0)+(a[n+20>>2]|0);F=r+24|0;a[F>>2]=(a[F>>2]|0)+(a[n+24>>2]|0);F=r+28|0;a[F>>2]=(a[F>>2]|0)+(a[n+28>>2]|0);F=r+32|0;a[F>>2]=(a[F>>2]|0)+(a[n+32>>2]|0);F=r+36|0;a[F>>2]=(a[F>>2]|0)+(a[n+36>>2]|0);F=r+40|0;a[F>>2]=(a[F>>2]|0)+(a[n+40>>2]|0);F=r+44|0;a[F>>2]=(a[F>>2]|0)+(a[n+44>>2]|0);F=r+48|0;a[F>>2]=(a[F>>2]|0)+(a[n+48>>2]|0);F=r+52|0;a[F>>2]=(a[F>>2]|0)+(a[n+52>>2]|0);F=r+56|0;a[F>>2]=(a[F>>2]|0)+(a[n+56>>2]|0);F=r+60|0;a[F>>2]=(a[F>>2]|0)+(a[n+60>>2]|0);n=0;do{At(e+(n<<2)|0,a[r+(n<<2)>>2]|0);n=n+1|0}while(n>>>0<16);l=t;return}function Rt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0,s=0,f=0,u=0,c=0;n=e+32|0;i=e+36|0;o=a[i>>2]|0;s=o>>>3&63;f=Ue(o|0,r<<3|0)|0;a[i>>2]=f;if(N){f=n|0;a[f>>2]=(a[f>>2]|0)+1}f=n|0;a[f>>2]=(a[f>>2]|0)+(r>>>29);f=64-s|0;n=e+40+s|0;if(f>>>0>r>>>0){$r(n|0,t|0,r)|0;return}$r(n|0,t|0,f)|0;n=e|0;s=e+40|0;Ct(n,s);e=t+f|0;t=r-f|0;if(t>>>0>63){f=t;r=e;while(1){Ct(n,r);i=r+64|0;o=f-64|0;if(o>>>0>63){f=o;r=i}else{u=o;c=i;break}}}else{u=t;c=e}$r(s|0,c|0,u)|0;return}function Ct(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0;r=l;l=l+288|0;n=r|0;i=r+256|0;o=n|0;qt(o,t);t=16;do{s=a[n+(t-2<<2)>>2]|0;f=a[n+(t-15<<2)>>2]|0;a[n+(t<<2)>>2]=(a[n+(t-16<<2)>>2]|0)+(a[n+(t-7<<2)>>2]|0)+((s>>>19|s<<13)^s>>>10^(s>>>17|s<<15))+((f>>>18|f<<14)^f>>>3^(f>>>7|f<<25));t=t+1|0}while((t|0)<64);t=i;f=e;$r(t|0,f|0,32)|0;f=i+28|0;t=i+16|0;s=a[t>>2]|0;u=i+20|0;c=i+24|0;d=a[c>>2]|0;h=(a[f>>2]|0)+1116352408+(a[o>>2]|0)+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+((d^a[u>>2])&s^d)|0;d=i|0;s=a[d>>2]|0;o=i+4|0;p=a[o>>2]|0;b=i+8|0;v=a[b>>2]|0;m=i+12|0;a[m>>2]=(a[m>>2]|0)+h;g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+h+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+1899447441+(a[n+4>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1245643825+(a[n+8>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-373957723+(a[n+12>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[d>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+961987163+(a[n+16>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1508970993+(a[n+20>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[d>>2]|0;h=(a[o>>2]|0)-1841331548+(a[n+24>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[d>>2]|0)-1424204075+(a[n+28>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[d>>2]=h;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)-670586216+(a[n+32>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;h=(a[c>>2]|0)+310598401+(a[n+36>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+607225278+(a[n+40>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1426881987+(a[n+44>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[d>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1925078388+(a[n+48>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-2132889090+(a[n+52>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[c>>2]|0;p=a[d>>2]|0;g=(a[o>>2]|0)-1680079193+(a[n+56>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;h=(a[d>>2]|0)-1046744716+(a[n+60>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[d>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-459576895+(a[n+64>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-272742522+(a[n+68>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[u>>2]|0)+264347078+(a[n+72>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)+604807628+(a[n+76>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[d>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)+770255983+(a[n+80>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)+1249150122+(a[n+84>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[d>>2]|0;s=(a[o>>2]|0)+1555081692+(a[n+88>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[d>>2]|0)+1996064986+(a[n+92>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[d>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;h=(a[f>>2]|0)-1740746414+(a[n+96>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)-1473132947+(a[n+100>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1341970488+(a[n+104>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-1084653625+(a[n+108>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[d>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)-958395405+(a[n+112>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)-710438585+(a[n+116>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[d>>2]|0;h=(a[o>>2]|0)+113926993+(a[n+120>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[d>>2]|0)+338241895+(a[n+124>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[d>>2]=h;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+666307205+(a[n+128>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;h=(a[c>>2]|0)+773529912+(a[n+132>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+1294757372+(a[n+136>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1396182291+(a[n+140>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[d>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1695183700+(a[n+144>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)+1986661051+(a[n+148>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[c>>2]|0;p=a[d>>2]|0;g=(a[o>>2]|0)-2117940946+(a[n+152>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;h=(a[d>>2]|0)-1838011259+(a[n+156>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[d>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-1564481375+(a[n+160>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-1474664885+(a[n+164>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[u>>2]|0)-1035236496+(a[n+168>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)-949202525+(a[n+172>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[d>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)-778901479+(a[n+176>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)-694614492+(a[n+180>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[d>>2]|0;s=(a[o>>2]|0)-200395387+(a[n+184>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[d>>2]|0)+275423344+(a[n+188>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[d>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;h=(a[f>>2]|0)+430227734+(a[n+192>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+506948616+(a[n+196>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)+659060556+(a[n+200>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)+883997877+(a[n+204>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[d>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+958139571+(a[n+208>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1322822218+(a[n+212>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[d>>2]|0;h=(a[o>>2]|0)+1537002063+(a[n+216>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[d>>2]|0)+1747873779+(a[n+220>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[d>>2]=h;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+1955562222+(a[n+224>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;h=(a[c>>2]|0)+2024104815+(a[n+228>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)-2067236844+(a[n+232>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)-1933114872+(a[n+236>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[d>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)-1866530822+(a[n+240>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-1538233109+(a[n+244>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[c>>2]|0;p=a[d>>2]|0;g=(a[o>>2]|0)-1090935817+(a[n+248>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;o=a[u>>2]|0;u=a[f>>2]|0;f=(a[d>>2]|0)-965641998+(a[n+252>>2]|0)+((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+((u^a[c>>2])&o^u)|0;u=a[b>>2]|0;b=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+f;t=f+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((b|u)&s|b&u)|0;a[d>>2]=t;a[e>>2]=(a[e>>2]|0)+t;t=e+4|0;a[t>>2]=(a[t>>2]|0)+(a[i+4>>2]|0);t=e+8|0;a[t>>2]=(a[t>>2]|0)+(a[i+8>>2]|0);t=e+12|0;a[t>>2]=(a[t>>2]|0)+(a[i+12>>2]|0);t=e+16|0;a[t>>2]=(a[t>>2]|0)+(a[i+16>>2]|0);t=e+20|0;a[t>>2]=(a[t>>2]|0)+(a[i+20>>2]|0);t=e+24|0;a[t>>2]=(a[t>>2]|0)+(a[i+24>>2]|0);t=e+28|0;a[t>>2]=(a[t>>2]|0)+(a[i+28>>2]|0);l=r;return}function Bt(e,t){e=e|0;t=t|0;n[e+3|0]=t&255;n[e+2|0]=t>>>8&255;n[e+1|0]=t>>>16&255;n[e]=t>>>24&255;return}function jt(e){e=e|0;return(o[e+2|0]|0)<<8|(o[e+3|0]|0)|(o[e+1|0]|0)<<16|(o[e]|0)<<24|0}function Nt(e,t){e=e|0;t=t|0;Lt(t);Ft(e,t|0,32);en(t|0,0,104);return}function Lt(e){e=e|0;var t=0,r=0,n=0;t=l;l=l+8|0;r=t|0;Ft(r,e+32|0,8);n=(a[e+36>>2]|0)>>>3&63;Rt(e,720,(n>>>0<56?56:120)-n|0);Rt(e,r,8);l=t;return}function Ft(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=r>>>2;if((n|0)==0){return}else{i=0}do{Bt(e+(i<<2)|0,a[t+(i<<2)>>2]|0);i=i+1|0}while(i>>>0>>0);return}function zt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0,o=0,s=0,f=0,u=0,c=0;i=l;l=l+96|0;a=i|0;if(r>>>0>64){o=e|0;Mt(o);Rt(o,t,r);s=i+64|0;Nt(s,o);f=s;u=32}else{f=t;u=r}r=e|0;Mt(r);t=a|0;en(t|0,54,64);if((u|0)!=0){s=0;do{o=a+s|0;n[o]=n[o]^n[f+s|0];s=s+1|0}while(s>>>0>>0)}Rt(r,t,64);r=e+104|0;Mt(r);en(t|0,92,64);if((u|0)==0){Rt(r,t,64);l=i;return}else{c=0}do{e=a+c|0;n[e]=n[e]^n[f+c|0];c=c+1|0}while(c>>>0>>0);Rt(r,t,64);l=i;return}function Ht(e,t,r){e=e|0;t=t|0;r=r|0;Rt(e|0,t,r);return}function Dt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+32|0;n=r|0;Nt(n,t|0);i=t+104|0;Rt(i,n,32);Nt(e,i);l=r;return}function Ut(e,t,r,i,a,o,s,f){e=e|0;t=t|0;r=r|0;i=i|0;a=a|0;o=o|0;s=s|0;f=f|0;var u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;u=l;l=l+488|0;c=u|0;d=u+208|0;h=u+424|0;p=u+456|0;zt(c,e,t);Ht(c,r,i);if((f|0)==0){l=u;return}i=u+416|0;r=d;b=c;c=h|0;v=p|0;m=0;g=o>>>0>>0|o>>>0==m>>>0&a>>>0<2>>>0;m=0;y=0;do{m=m+1|0;Bt(i,m);$r(r|0,b|0,208)|0;Ht(d,i,4);Dt(c,d);$r(v|0,c|0,32)|0;if(!g){w=0;_=2;do{zt(d,e,t);Ht(d,c,32);Dt(c,d);S=0;do{k=p+S|0;n[k]=n[k]^n[h+S|0];S=S+1|0}while((S|0)<32);_=rn(_,w,1,0)|0;w=N}while(!(w>>>0>o>>>0|w>>>0==o>>>0&_>>>0>a>>>0))}_=f-y|0;w=_>>>0>32?32:_;_=s+y|0;$r(_|0,v|0,w)|0;y=m<<5}while(y>>>0>>0);l=u;return}function qt(e,t){e=e|0;t=t|0;var r=0;r=0;do{a[e+(r<<2)>>2]=jt(t+(r<<2)|0)|0;r=r+1|0}while(r>>>0<16);return}function Yt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,D=0,U=0,q=0,Y=0,K=0,V=0,W=0,X=0,Z=0,G=0,Q=0,J=0,$=0,ee=0,te=0,re=0,ne=0,ie=0,ae=0,oe=0,se=0,fe=0,ue=0,ce=0,le=0,de=0,he=0,pe=0,be=0,ve=0,me=0,ge=0,ye=0,_e=0,Se=0,xe=0,Ae=0,Me=0,Ee=0,Te=0,Ie=0,Pe=0,Oe=0,Re=0,Ce=0,Be=0;do{if(e>>>0<245){if(e>>>0<11){t=16}else{t=e+11&-8}r=t>>>3;n=a[208]|0;i=n>>>(r>>>0);if((i&3|0)!=0){o=(i&1^1)+r|0;s=o<<1;f=872+(s<<2)|0;u=872+(s+2<<2)|0;s=a[u>>2]|0;c=s+8|0;l=a[c>>2]|0;do{if((f|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}d=l+12|0;if((a[d>>2]|0)==(s|0)){a[d>>2]=f;a[u>>2]=l;break}else{ke();return 0}}}while(0);l=o<<3;a[s+4>>2]=l|3;u=s+(l|4)|0;a[u>>2]=a[u>>2]|1;h=c;return h|0}if(t>>>0<=(a[210]|0)>>>0){p=t;break}if((i|0)!=0){u=2<>>12&16;f=u>>>(l>>>0);u=f>>>5&8;d=f>>>(u>>>0);f=d>>>2&4;b=d>>>(f>>>0);d=b>>>1&2;v=b>>>(d>>>0);b=v>>>1&1;m=(u|l|f|d|b)+(v>>>(b>>>0))|0;b=m<<1;v=872+(b<<2)|0;d=872+(b+2<<2)|0;b=a[d>>2]|0;f=b+8|0;l=a[f>>2]|0;do{if((v|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}u=l+12|0;if((a[u>>2]|0)==(b|0)){a[u>>2]=v;a[d>>2]=l;break}else{ke();return 0}}}while(0);l=m<<3;d=l-t|0;a[b+4>>2]=t|3;v=b;n=v+t|0;a[v+(t|4)>>2]=d|1;a[v+l>>2]=d;l=a[210]|0;if((l|0)!=0){v=a[213]|0;r=l>>>3;l=r<<1;i=872+(l<<2)|0;c=a[208]|0;s=1<>2]|0;if(o>>>0>=(a[212]|0)>>>0){g=o;y=r;break}ke();return 0}}while(0);a[y>>2]=v;a[g+12>>2]=v;a[v+8>>2]=g;a[v+12>>2]=i}a[210]=d;a[213]=n;h=f;return h|0}l=a[209]|0;if((l|0)==0){p=t;break}s=(l&-l)-1|0;l=s>>>12&16;c=s>>>(l>>>0);s=c>>>5&8;b=c>>>(s>>>0);c=b>>>2&4;m=b>>>(c>>>0);b=m>>>1&2;r=m>>>(b>>>0);m=r>>>1&1;o=a[1136+((s|l|c|b|m)+(r>>>(m>>>0))<<2)>>2]|0;m=o;r=o;b=(a[o+4>>2]&-8)-t|0;while(1){o=a[m+16>>2]|0;if((o|0)==0){c=a[m+20>>2]|0;if((c|0)==0){break}else{w=c}}else{w=o}o=(a[w+4>>2]&-8)-t|0;c=o>>>0>>0;m=w;r=c?w:r;b=c?o:b}m=r;f=a[212]|0;if(m>>>0>>0){ke();return 0}n=m+t|0;d=n;if(m>>>0>=n>>>0){ke();return 0}n=a[r+24>>2]|0;i=a[r+12>>2]|0;do{if((i|0)==(r|0)){v=r+20|0;o=a[v>>2]|0;if((o|0)==0){c=r+16|0;l=a[c>>2]|0;if((l|0)==0){_=0;break}else{S=l;k=c}}else{S=o;k=v}while(1){v=S+20|0;o=a[v>>2]|0;if((o|0)!=0){S=o;k=v;continue}v=S+16|0;o=a[v>>2]|0;if((o|0)==0){break}else{S=o;k=v}}if(k>>>0>>0){ke();return 0}else{a[k>>2]=0;_=S;break}}else{v=a[r+8>>2]|0;if(v>>>0>>0){ke();return 0}o=v+12|0;if((a[o>>2]|0)!=(r|0)){ke();return 0}c=i+8|0;if((a[c>>2]|0)==(r|0)){a[o>>2]=i;a[c>>2]=v;_=i;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){i=r+28|0;f=1136+(a[i>>2]<<2)|0;do{if((r|0)==(a[f>>2]|0)){a[f>>2]=_;if((_|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}v=n+16|0;if((a[v>>2]|0)==(r|0)){a[v>>2]=_}else{a[n+20>>2]=_}if((_|0)==0){break e}}}while(0);if(_>>>0<(a[212]|0)>>>0){ke();return 0}a[_+24>>2]=n;i=a[r+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+16>>2]=i;a[i+24>>2]=_;break}}}while(0);i=a[r+20>>2]|0;if((i|0)==0){break}if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+20>>2]=i;a[i+24>>2]=_;break}}}while(0);if(b>>>0<16){n=b+t|0;a[r+4>>2]=n|3;i=m+(n+4)|0;a[i>>2]=a[i>>2]|1}else{a[r+4>>2]=t|3;a[m+(t|4)>>2]=b|1;a[m+(b+t)>>2]=b;i=a[210]|0;if((i|0)!=0){n=a[213]|0;f=i>>>3;i=f<<1;v=872+(i<<2)|0;c=a[208]|0;o=1<>2]|0;if(l>>>0>=(a[212]|0)>>>0){x=l;A=f;break}ke();return 0}}while(0);a[A>>2]=n;a[x+12>>2]=n;a[n+8>>2]=x;a[n+12>>2]=v}a[210]=b;a[213]=d}i=r+8|0;if((i|0)==0){p=t;break}else{h=i}return h|0}else{if(e>>>0>4294967231){p=-1;break}i=e+11|0;o=i&-8;c=a[209]|0;if((c|0)==0){p=o;break}m=-o|0;f=i>>>8;do{if((f|0)==0){M=0}else{if(o>>>0>16777215){M=31;break}i=(f+1048320|0)>>>16&8;l=f<>>16&4;u=l<>>16&2;E=14-(s|i|l)+(u<>>15)|0;M=o>>>((E+7|0)>>>0)&1|E<<1}}while(0);f=a[1136+(M<<2)>>2]|0;e:do{if((f|0)==0){T=0;I=m;P=0}else{if((M|0)==31){O=0}else{O=25-(M>>>1)|0}r=0;d=m;b=f;v=o<>2]&-8;l=E-o|0;if(l>>>0>>0){if((E|0)==(o|0)){T=b;I=l;P=b;break e}else{R=b;C=l}}else{R=r;C=d}l=a[b+20>>2]|0;E=a[b+16+(v>>>31<<2)>>2]|0;u=(l|0)==0|(l|0)==(E|0)?n:l;if((E|0)==0){T=R;I=C;P=u;break}else{r=R;d=C;b=E;v=v<<1;n=u}}}}while(0);if((P|0)==0&(T|0)==0){f=2<>>12&16;n=f>>>(m>>>0);f=n>>>5&8;v=n>>>(f>>>0);n=v>>>2&4;b=v>>>(n>>>0);v=b>>>1&2;d=b>>>(v>>>0);b=d>>>1&1;B=a[1136+((f|m|n|v|b)+(d>>>(b>>>0))<<2)>>2]|0}else{B=P}if((B|0)==0){j=I;N=T}else{b=B;d=I;v=T;while(1){n=(a[b+4>>2]&-8)-o|0;m=n>>>0>>0;f=m?n:d;n=m?b:v;m=a[b+16>>2]|0;if((m|0)!=0){b=m;d=f;v=n;continue}m=a[b+20>>2]|0;if((m|0)==0){j=f;N=n;break}else{b=m;d=f;v=n}}}if((N|0)==0){p=o;break}if(j>>>0>=((a[210]|0)-o|0)>>>0){p=o;break}v=N;d=a[212]|0;if(v>>>0>>0){ke();return 0}b=v+o|0;c=b;if(v>>>0>=b>>>0){ke();return 0}n=a[N+24>>2]|0;f=a[N+12>>2]|0;do{if((f|0)==(N|0)){m=N+20|0;r=a[m>>2]|0;if((r|0)==0){u=N+16|0;E=a[u>>2]|0;if((E|0)==0){L=0;break}else{F=E;z=u}}else{F=r;z=m}while(1){m=F+20|0;r=a[m>>2]|0;if((r|0)!=0){F=r;z=m;continue}m=F+16|0;r=a[m>>2]|0;if((r|0)==0){break}else{F=r;z=m}}if(z>>>0>>0){ke();return 0}else{a[z>>2]=0;L=F;break}}else{m=a[N+8>>2]|0;if(m>>>0>>0){ke();return 0}r=m+12|0;if((a[r>>2]|0)!=(N|0)){ke();return 0}u=f+8|0;if((a[u>>2]|0)==(N|0)){a[r>>2]=f;a[u>>2]=m;L=f;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){f=N+28|0;d=1136+(a[f>>2]<<2)|0;do{if((N|0)==(a[d>>2]|0)){a[d>>2]=L;if((L|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}m=n+16|0;if((a[m>>2]|0)==(N|0)){a[m>>2]=L}else{a[n+20>>2]=L}if((L|0)==0){break e}}}while(0);if(L>>>0<(a[212]|0)>>>0){ke();return 0}a[L+24>>2]=n;f=a[N+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+16>>2]=f;a[f+24>>2]=L;break}}}while(0);f=a[N+20>>2]|0;if((f|0)==0){break}if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+20>>2]=f;a[f+24>>2]=L;break}}}while(0);do{if(j>>>0<16){n=j+o|0;a[N+4>>2]=n|3;f=v+(n+4)|0;a[f>>2]=a[f>>2]|1}else{a[N+4>>2]=o|3;a[v+(o|4)>>2]=j|1;a[v+(j+o)>>2]=j;f=j>>>3;if(j>>>0<256){n=f<<1;d=872+(n<<2)|0;m=a[208]|0;u=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){H=r;D=f;break}ke();return 0}}while(0);a[D>>2]=c;a[H+12>>2]=c;a[v+(o+8)>>2]=H;a[v+(o+12)>>2]=d;break}n=b;u=j>>>8;do{if((u|0)==0){U=0}else{if(j>>>0>16777215){U=31;break}m=(u+1048320|0)>>>16&8;f=u<>>16&4;E=f<>>16&2;l=14-(r|m|f)+(E<>>15)|0;U=j>>>((l+7|0)>>>0)&1|l<<1}}while(0);u=1136+(U<<2)|0;a[v+(o+28)>>2]=U;a[v+(o+20)>>2]=0;a[v+(o+16)>>2]=0;d=a[209]|0;l=1<>2]=n;a[v+(o+24)>>2]=u;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}if((U|0)==31){q=0}else{q=25-(U>>>1)|0}l=j<>2]|0;while(1){if((a[d+4>>2]&-8|0)==(j|0)){break}Y=d+16+(l>>>31<<2)|0;u=a[Y>>2]|0;if((u|0)==0){K=262;break}else{l=l<<1;d=u}}if((K|0)==262){if(Y>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Y>>2]=n;a[v+(o+24)>>2]=d;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}}l=d+8|0;u=a[l>>2]|0;f=a[212]|0;if(d>>>0>>0){ke();return 0}if(u>>>0>>0){ke();return 0}else{a[u+12>>2]=n;a[l>>2]=n;a[v+(o+8)>>2]=u;a[v+(o+12)>>2]=d;a[v+(o+24)>>2]=0;break}}}while(0);v=N+8|0;if((v|0)==0){p=o;break}else{h=v}return h|0}}while(0);N=a[210]|0;if(p>>>0<=N>>>0){Y=N-p|0;j=a[213]|0;if(Y>>>0>15){q=j;a[213]=q+p;a[210]=Y;a[q+(p+4)>>2]=Y|1;a[q+N>>2]=Y;a[j+4>>2]=p|3}else{a[210]=0;a[213]=0;a[j+4>>2]=N|3;Y=j+(N+4)|0;a[Y>>2]=a[Y>>2]|1}h=j+8|0;return h|0}j=a[211]|0;if(p>>>0>>0){Y=j-p|0;a[211]=Y;j=a[214]|0;N=j;a[214]=N+p;a[N+(p+4)>>2]=Y|1;a[j+4>>2]=p|3;h=j+8|0;return h|0}do{if((a[200]|0)==0){j=we(8)|0;if((j-1&j|0)==0){a[202]=j;a[201]=j;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);j=p+48|0;Y=a[202]|0;N=p+47|0;q=Y+N|0;U=-Y|0;Y=q&U;if(Y>>>0<=p>>>0){h=0;return h|0}H=a[318]|0;do{if((H|0)!=0){D=a[316]|0;L=D+Y|0;if(L>>>0<=D>>>0|L>>>0>H>>>0){h=0}else{break}return h|0}}while(0);e:do{if((a[319]&4|0)==0){H=a[214]|0;t:do{if((H|0)==0){K=292}else{L=H;D=1280;while(1){V=D|0;F=a[V>>2]|0;if(F>>>0<=L>>>0){W=D+4|0;if((F+(a[W>>2]|0)|0)>>>0>L>>>0){break}}F=a[D+8>>2]|0;if((F|0)==0){K=292;break t}else{D=F}}if((D|0)==0){K=292;break}L=q-(a[211]|0)&U;if(L>>>0>=2147483647){X=0;break}d=Ge(L|0)|0;n=(d|0)==((a[V>>2]|0)+(a[W>>2]|0)|0);Z=n?d:-1;G=n?L:0;Q=d;J=L;K=301}}while(0);do{if((K|0)==292){H=Ge(0)|0;if((H|0)==-1){X=0;break}o=H;L=a[201]|0;d=L-1|0;if((d&o|0)==0){$=Y}else{$=Y-o+(d+o&-L)|0}L=a[316]|0;o=L+$|0;if(!($>>>0>p>>>0&$>>>0<2147483647)){X=0;break}d=a[318]|0;if((d|0)!=0){if(o>>>0<=L>>>0|o>>>0>d>>>0){X=0;break}}d=Ge($|0)|0;o=(d|0)==(H|0);Z=o?H:-1;G=o?$:0;Q=d;J=$;K=301}}while(0);t:do{if((K|0)==301){d=-J|0;if((Z|0)!=-1){ee=G;te=Z;K=312;break e}do{if((Q|0)!=-1&J>>>0<2147483647&J>>>0>>0){o=a[202]|0;H=N-J+o&-o;if(H>>>0>=2147483647){re=J;break}if((Ge(H|0)|0)==-1){Ge(d|0)|0;X=G;break t}else{re=H+J|0;break}}else{re=J}}while(0);if((Q|0)==-1){X=G}else{ee=re;te=Q;K=312;break e}}}while(0);a[319]=a[319]|4;ne=X;K=309}else{ne=0;K=309}}while(0);do{if((K|0)==309){if(Y>>>0>=2147483647){break}X=Ge(Y|0)|0;Q=Ge(0)|0;if(!((Q|0)!=-1&(X|0)!=-1&X>>>0>>0)){break}re=Q-X|0;Q=re>>>0>(p+40|0)>>>0;G=Q?X:-1;if((G|0)!=-1){ee=Q?re:ne;te=G;K=312}}}while(0);do{if((K|0)==312){ne=(a[316]|0)+ee|0;a[316]=ne;if(ne>>>0>(a[317]|0)>>>0){a[317]=ne}ne=a[214]|0;e:do{if((ne|0)==0){Y=a[212]|0;if((Y|0)==0|te>>>0>>0){a[212]=te}a[320]=te;a[321]=ee;a[323]=0;a[217]=a[200];a[216]=-1;Y=0;do{G=Y<<1;re=872+(G<<2)|0;a[872+(G+3<<2)>>2]=re;a[872+(G+2<<2)>>2]=re;Y=Y+1|0}while(Y>>>0<32);Y=te+8|0;if((Y&7|0)==0){ie=0}else{ie=-Y&7}Y=ee-40-ie|0;a[214]=te+ie;a[211]=Y;a[te+(ie+4)>>2]=Y|1;a[te+(ee-36)>>2]=40;a[215]=a[204]}else{Y=1280;while(1){ae=a[Y>>2]|0;oe=Y+4|0;se=a[oe>>2]|0;if((te|0)==(ae+se|0)){K=324;break}re=a[Y+8>>2]|0;if((re|0)==0){break}else{Y=re}}do{if((K|0)==324){if((a[Y+12>>2]&8|0)!=0){break}re=ne;if(!(re>>>0>=ae>>>0&re>>>0>>0)){break}a[oe>>2]=se+ee;re=a[214]|0;G=(a[211]|0)+ee|0;Q=re;X=re+8|0;if((X&7|0)==0){fe=0}else{fe=-X&7}X=G-fe|0;a[214]=Q+fe;a[211]=X;a[Q+(fe+4)>>2]=X|1;a[Q+(G+4)>>2]=40;a[215]=a[204];break e}}while(0);if(te>>>0<(a[212]|0)>>>0){a[212]=te}Y=te+ee|0;G=1280;while(1){ue=G|0;if((a[ue>>2]|0)==(Y|0)){K=334;break}Q=a[G+8>>2]|0;if((Q|0)==0){break}else{G=Q}}do{if((K|0)==334){if((a[G+12>>2]&8|0)!=0){break}a[ue>>2]=te;Y=G+4|0;a[Y>>2]=(a[Y>>2]|0)+ee;Y=te+8|0;if((Y&7|0)==0){ce=0}else{ce=-Y&7}Y=te+(ee+8)|0;if((Y&7|0)==0){le=0}else{le=-Y&7}Y=te+(le+ee)|0;Q=Y;X=ce+p|0;re=te+X|0;J=re;N=Y-(te+ce)-p|0;a[te+(ce+4)>>2]=p|3;do{if((Q|0)==(a[214]|0)){j=(a[211]|0)+N|0;a[211]=j;a[214]=J;a[te+(X+4)>>2]=j|1}else{if((Q|0)==(a[213]|0)){j=(a[210]|0)+N|0;a[210]=j;a[213]=J;a[te+(X+4)>>2]=j|1;a[te+(j+X)>>2]=j;break}j=ee+4|0;Z=a[te+(j+le)>>2]|0;if((Z&3|0)==1){$=Z&-8;W=Z>>>3;t:do{if(Z>>>0<256){V=a[te+((le|8)+ee)>>2]|0;U=a[te+(ee+12+le)>>2]|0;q=872+(W<<1<<2)|0;do{if((V|0)!=(q|0)){if(V>>>0<(a[212]|0)>>>0){ke();return 0}if((a[V+12>>2]|0)==(Q|0)){break}ke();return 0}}while(0);if((U|0)==(V|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke();return 0}d=U+8|0;if((a[d>>2]|0)==(Q|0)){de=d;break}ke();return 0}}while(0);a[V+12>>2]=U;a[de>>2]=V}else{q=Y;d=a[te+((le|24)+ee)>>2]|0;D=a[te+(ee+12+le)>>2]|0;do{if((D|0)==(q|0)){H=le|16;o=te+(j+H)|0;L=a[o>>2]|0;if((L|0)==0){n=te+(H+ee)|0;H=a[n>>2]|0;if((H|0)==0){he=0;break}else{pe=H;be=n}}else{pe=L;be=o}while(1){o=pe+20|0;L=a[o>>2]|0;if((L|0)!=0){pe=L;be=o;continue}o=pe+16|0;L=a[o>>2]|0;if((L|0)==0){break}else{pe=L;be=o}}if(be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[be>>2]=0;he=pe;break}}else{o=a[te+((le|8)+ee)>>2]|0;if(o>>>0<(a[212]|0)>>>0){ke();return 0}L=o+12|0;if((a[L>>2]|0)!=(q|0)){ke();return 0}n=D+8|0;if((a[n>>2]|0)==(q|0)){a[L>>2]=D;a[n>>2]=o;he=D;break}else{ke();return 0}}}while(0);if((d|0)==0){break}D=te+(ee+28+le)|0;V=1136+(a[D>>2]<<2)|0;do{if((q|0)==(a[V>>2]|0)){a[V>>2]=he;if((he|0)!=0){break}a[209]=a[209]&~(1<>2]);break t}else{if(d>>>0<(a[212]|0)>>>0){ke();return 0}U=d+16|0;if((a[U>>2]|0)==(q|0)){a[U>>2]=he}else{a[d+20>>2]=he}if((he|0)==0){break t}}}while(0);if(he>>>0<(a[212]|0)>>>0){ke();return 0}a[he+24>>2]=d;q=le|16;D=a[te+(q+ee)>>2]|0;do{if((D|0)!=0){if(D>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+16>>2]=D;a[D+24>>2]=he;break}}}while(0);D=a[te+(j+q)>>2]|0;if((D|0)==0){break}if(D>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+20>>2]=D;a[D+24>>2]=he;break}}}while(0);ve=te+(($|le)+ee)|0;me=$+N|0}else{ve=Q;me=N}j=ve+4|0;a[j>>2]=a[j>>2]&-2;a[te+(X+4)>>2]=me|1;a[te+(me+X)>>2]=me;j=me>>>3;if(me>>>0<256){W=j<<1;Z=872+(W<<2)|0;D=a[208]|0;d=1<>2]|0;if(V>>>0>=(a[212]|0)>>>0){ge=V;ye=j;break}ke();return 0}}while(0);a[ye>>2]=J;a[ge+12>>2]=J;a[te+(X+8)>>2]=ge;a[te+(X+12)>>2]=Z;break}W=re;d=me>>>8;do{if((d|0)==0){_e=0}else{if(me>>>0>16777215){_e=31;break}D=(d+1048320|0)>>>16&8;$=d<>>16&4;V=$<>>16&2;U=14-(j|D|$)+(V<<$>>>15)|0;_e=me>>>((U+7|0)>>>0)&1|U<<1}}while(0);d=1136+(_e<<2)|0;a[te+(X+28)>>2]=_e;a[te+(X+20)>>2]=0;a[te+(X+16)>>2]=0;Z=a[209]|0;U=1<<_e;if((Z&U|0)==0){a[209]=Z|U;a[d>>2]=W;a[te+(X+24)>>2]=d;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}if((_e|0)==31){Se=0}else{Se=25-(_e>>>1)|0}U=me<>2]|0;while(1){if((a[Z+4>>2]&-8|0)==(me|0)){break}xe=Z+16+(U>>>31<<2)|0;d=a[xe>>2]|0;if((d|0)==0){K=407;break}else{U=U<<1;Z=d}}if((K|0)==407){if(xe>>>0<(a[212]|0)>>>0){ke();return 0}else{a[xe>>2]=W;a[te+(X+24)>>2]=Z;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}}U=Z+8|0;d=a[U>>2]|0;$=a[212]|0;if(Z>>>0<$>>>0){ke();return 0}if(d>>>0<$>>>0){ke();return 0}else{a[d+12>>2]=W;a[U>>2]=W;a[te+(X+8)>>2]=d;a[te+(X+12)>>2]=Z;a[te+(X+24)>>2]=0;break}}}while(0);h=te+(ce|8)|0;return h|0}}while(0);G=ne;X=1280;while(1){Ae=a[X>>2]|0;if(Ae>>>0<=G>>>0){Me=a[X+4>>2]|0;Ee=Ae+Me|0;if(Ee>>>0>G>>>0){break}}X=a[X+8>>2]|0}X=Ae+(Me-39)|0;if((X&7|0)==0){Te=0}else{Te=-X&7}X=Ae+(Me-47+Te)|0;re=X>>>0<(ne+16|0)>>>0?G:X;X=re+8|0;J=te+8|0;if((J&7|0)==0){Ie=0}else{Ie=-J&7}J=ee-40-Ie|0;a[214]=te+Ie;a[211]=J;a[te+(Ie+4)>>2]=J|1;a[te+(ee-36)>>2]=40;a[215]=a[204];a[re+4>>2]=27;a[X>>2]=a[320];a[X+4>>2]=a[1284>>2];a[X+8>>2]=a[1288>>2];a[X+12>>2]=a[1292>>2];a[320]=te;a[321]=ee;a[323]=0;a[322]=X;X=re+28|0;a[X>>2]=7;if((re+32|0)>>>0>>0){J=X;while(1){X=J+4|0;a[X>>2]=7;if((J+8|0)>>>0>>0){J=X}else{break}}}if((re|0)==(G|0)){break}J=re-ne|0;X=G+(J+4)|0;a[X>>2]=a[X>>2]&-2;a[ne+4>>2]=J|1;a[G+J>>2]=J;X=J>>>3;if(J>>>0<256){N=X<<1;Q=872+(N<<2)|0;Y=a[208]|0;d=1<>2]|0;if(U>>>0>=(a[212]|0)>>>0){Pe=U;Oe=X;break}ke();return 0}}while(0);a[Oe>>2]=ne;a[Pe+12>>2]=ne;a[ne+8>>2]=Pe;a[ne+12>>2]=Q;break}N=ne;d=J>>>8;do{if((d|0)==0){Re=0}else{if(J>>>0>16777215){Re=31;break}Y=(d+1048320|0)>>>16&8;G=d<>>16&4;X=G<>>16&2;U=14-(re|Y|G)+(X<>>15)|0;Re=J>>>((U+7|0)>>>0)&1|U<<1}}while(0);d=1136+(Re<<2)|0;a[ne+28>>2]=Re;a[ne+20>>2]=0;a[ne+16>>2]=0;Q=a[209]|0;U=1<>2]=N;a[ne+24>>2]=d;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}if((Re|0)==31){Ce=0}else{Ce=25-(Re>>>1)|0}U=J<>2]|0;while(1){if((a[Q+4>>2]&-8|0)==(J|0)){break}Be=Q+16+(U>>>31<<2)|0;d=a[Be>>2]|0;if((d|0)==0){K=442;break}else{U=U<<1;Q=d}}if((K|0)==442){if(Be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Be>>2]=N;a[ne+24>>2]=Q;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}}U=Q+8|0;J=a[U>>2]|0;d=a[212]|0;if(Q>>>0>>0){ke();return 0}if(J>>>0>>0){ke();return 0}else{a[J+12>>2]=N;a[U>>2]=N;a[ne+8>>2]=J;a[ne+12>>2]=Q;a[ne+24>>2]=0;break}}}while(0);ne=a[211]|0;if(ne>>>0<=p>>>0){break}J=ne-p|0;a[211]=J;ne=a[214]|0;U=ne;a[214]=U+p;a[U+(p+4)>>2]=J|1;a[ne+4>>2]=p|3;h=ne+8|0;return h|0}}while(0);a[(Je()|0)>>2]=12;h=0;return h|0}function Kt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0;if((e|0)==0){return}t=e-8|0;r=t;n=a[212]|0;if(t>>>0>>0){ke()}i=a[e-4>>2]|0;o=i&3;if((o|0)==1){ke()}s=i&-8;f=e+(s-8)|0;u=f;e:do{if((i&1|0)==0){c=a[t>>2]|0;if((o|0)==0){return}l=-8-c|0;d=e+l|0;h=d;p=c+s|0;if(d>>>0>>0){ke()}if((h|0)==(a[213]|0)){b=e+(s-4)|0;if((a[b>>2]&3|0)!=3){v=h;m=p;break}a[210]=p;a[b>>2]=a[b>>2]&-2;a[e+(l+4)>>2]=p|1;a[f>>2]=p;return}b=c>>>3;if(c>>>0<256){c=a[e+(l+8)>>2]|0;g=a[e+(l+12)>>2]|0;y=872+(b<<1<<2)|0;do{if((c|0)!=(y|0)){if(c>>>0>>0){ke()}if((a[c+12>>2]|0)==(h|0)){break}ke()}}while(0);if((g|0)==(c|0)){a[208]=a[208]&~(1<>>0>>0){ke()}_=g+8|0;if((a[_>>2]|0)==(h|0)){w=_;break}ke()}}while(0);a[c+12>>2]=g;a[w>>2]=c;v=h;m=p;break}y=d;b=a[e+(l+24)>>2]|0;_=a[e+(l+12)>>2]|0;do{if((_|0)==(y|0)){S=e+(l+20)|0;k=a[S>>2]|0;if((k|0)==0){x=e+(l+16)|0;A=a[x>>2]|0;if((A|0)==0){M=0;break}else{E=A;T=x}}else{E=k;T=S}while(1){S=E+20|0;k=a[S>>2]|0;if((k|0)!=0){E=k;T=S;continue}S=E+16|0;k=a[S>>2]|0;if((k|0)==0){break}else{E=k;T=S}}if(T>>>0>>0){ke()}else{a[T>>2]=0;M=E;break}}else{S=a[e+(l+8)>>2]|0;if(S>>>0>>0){ke()}k=S+12|0;if((a[k>>2]|0)!=(y|0)){ke()}x=_+8|0;if((a[x>>2]|0)==(y|0)){a[k>>2]=_;a[x>>2]=S;M=_;break}else{ke()}}}while(0);if((b|0)==0){v=h;m=p;break}_=e+(l+28)|0;d=1136+(a[_>>2]<<2)|0;do{if((y|0)==(a[d>>2]|0)){a[d>>2]=M;if((M|0)!=0){break}a[209]=a[209]&~(1<>2]);v=h;m=p;break e}else{if(b>>>0<(a[212]|0)>>>0){ke()}c=b+16|0;if((a[c>>2]|0)==(y|0)){a[c>>2]=M}else{a[b+20>>2]=M}if((M|0)==0){v=h;m=p;break e}}}while(0);if(M>>>0<(a[212]|0)>>>0){ke()}a[M+24>>2]=b;y=a[e+(l+16)>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+16>>2]=y;a[y+24>>2]=M;break}}}while(0);y=a[e+(l+20)>>2]|0;if((y|0)==0){v=h;m=p;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+20>>2]=y;a[y+24>>2]=M;v=h;m=p;break}}else{v=r;m=s}}while(0);r=v;if(r>>>0>=f>>>0){ke()}M=e+(s-4)|0;n=a[M>>2]|0;if((n&1|0)==0){ke()}do{if((n&2|0)==0){if((u|0)==(a[214]|0)){E=(a[211]|0)+m|0;a[211]=E;a[214]=v;a[v+4>>2]=E|1;if((v|0)==(a[213]|0)){a[213]=0;a[210]=0}if(E>>>0<=(a[215]|0)>>>0){return}Qt(0)|0;return}if((u|0)==(a[213]|0)){E=(a[210]|0)+m|0;a[210]=E;a[213]=v;a[v+4>>2]=E|1;a[r+E>>2]=E;return}E=(n&-8)+m|0;T=n>>>3;e:do{if(n>>>0<256){w=a[e+s>>2]|0;o=a[e+(s|4)>>2]|0;t=872+(T<<1<<2)|0;do{if((w|0)!=(t|0)){if(w>>>0<(a[212]|0)>>>0){ke()}if((a[w+12>>2]|0)==(u|0)){break}ke()}}while(0);if((o|0)==(w|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke()}i=o+8|0;if((a[i>>2]|0)==(u|0)){I=i;break}ke()}}while(0);a[w+12>>2]=o;a[I>>2]=w}else{t=f;i=a[e+(s+16)>>2]|0;y=a[e+(s|4)>>2]|0;do{if((y|0)==(t|0)){b=e+(s+12)|0;_=a[b>>2]|0;if((_|0)==0){d=e+(s+8)|0;c=a[d>>2]|0;if((c|0)==0){P=0;break}else{O=c;R=d}}else{O=_;R=b}while(1){b=O+20|0;_=a[b>>2]|0;if((_|0)!=0){O=_;R=b;continue}b=O+16|0;_=a[b>>2]|0;if((_|0)==0){break}else{O=_;R=b}}if(R>>>0<(a[212]|0)>>>0){ke()}else{a[R>>2]=0;P=O;break}}else{b=a[e+s>>2]|0;if(b>>>0<(a[212]|0)>>>0){ke()}_=b+12|0;if((a[_>>2]|0)!=(t|0)){ke()}d=y+8|0;if((a[d>>2]|0)==(t|0)){a[_>>2]=y;a[d>>2]=b;P=y;break}else{ke()}}}while(0);if((i|0)==0){break}y=e+(s+20)|0;w=1136+(a[y>>2]<<2)|0;do{if((t|0)==(a[w>>2]|0)){a[w>>2]=P;if((P|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(i>>>0<(a[212]|0)>>>0){ke()}o=i+16|0;if((a[o>>2]|0)==(t|0)){a[o>>2]=P}else{a[i+20>>2]=P}if((P|0)==0){break e}}}while(0);if(P>>>0<(a[212]|0)>>>0){ke()}a[P+24>>2]=i;t=a[e+(s+8)>>2]|0;do{if((t|0)!=0){if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+16>>2]=t;a[t+24>>2]=P;break}}}while(0);t=a[e+(s+12)>>2]|0;if((t|0)==0){break}if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+20>>2]=t;a[t+24>>2]=P;break}}}while(0);a[v+4>>2]=E|1;a[r+E>>2]=E;if((v|0)!=(a[213]|0)){C=E;break}a[210]=E;return}else{a[M>>2]=n&-2;a[v+4>>2]=m|1;a[r+m>>2]=m;C=m}}while(0);m=C>>>3;if(C>>>0<256){r=m<<1;n=872+(r<<2)|0;M=a[208]|0;P=1<>2]|0;if(s>>>0>=(a[212]|0)>>>0){B=s;j=m;break}ke()}}while(0);a[j>>2]=v;a[B+12>>2]=v;a[v+8>>2]=B;a[v+12>>2]=n;return}n=v;B=C>>>8;do{if((B|0)==0){N=0}else{if(C>>>0>16777215){N=31;break}j=(B+1048320|0)>>>16&8;r=B<>>16&4;M=r<>>16&2;m=14-(P|j|r)+(M<>>15)|0;N=C>>>((m+7|0)>>>0)&1|m<<1}}while(0);B=1136+(N<<2)|0;a[v+28>>2]=N;a[v+20>>2]=0;a[v+16>>2]=0;m=a[209]|0;r=1<>2]=n;a[v+24>>2]=B;a[v+12>>2]=v;a[v+8>>2]=v}else{if((N|0)==31){L=0}else{L=25-(N>>>1)|0}M=C<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(C|0)){break}F=j+16+(M>>>31<<2)|0;P=a[F>>2]|0;if((P|0)==0){z=621;break}else{M=M<<1;j=P}}if((z|0)==621){if(F>>>0<(a[212]|0)>>>0){ke()}else{a[F>>2]=n;a[v+24>>2]=j;a[v+12>>2]=v;a[v+8>>2]=v;break}}M=j+8|0;E=a[M>>2]|0;P=a[212]|0;if(j>>>0

>>0){ke()}if(E>>>0

>>0){ke()}if(E>>>0

>>0){ke()}else{a[E+12>>2]=n;a[M>>2]=n;a[v+8>>2]=E;a[v+12>>2]=j;a[v+24>>2]=0;break}}}while(0);v=(a[216]|0)-1|0;a[216]=v;if((v|0)==0){H=1288}else{return}while(1){v=a[H>>2]|0;if((v|0)==0){break}else{H=v+8|0}}a[216]=-1;return}function Vt(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((e|0)==0){r=0}else{n=oe(t,e)|0;if((t|e)>>>0<=65535){r=n;break}r=((n>>>0)/(e>>>0)|0|0)==(t|0)?n:-1}}while(0);t=Kt(r)|0;if((t|0)==0){return t|0}if((a[t-4>>2]&3|0)==0){return t|0}en(t|0,0,r|0);return t|0}function Wt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0;if((e|0)==0){r=Kt(t)|0;return r|0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;r=0;return r|0}if(t>>>0<11){n=16}else{n=t+11&-8}i=$t(e-8|0,n)|0;if((i|0)!=0){r=i+8|0;return r|0}i=Kt(t)|0;if((i|0)==0){r=0;return r|0}n=a[e-4>>2]|0;o=(n&-8)-((n&3|0)==0?8:4)|0;n=o>>>0>>0?o:t;Jr(i|0,e|0,n)|0;Yt(e);r=i;return r|0}function Xt(e,t){e=e|0;t=t|0;var r=0;if((e|0)==0){return 0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;return 0}if(t>>>0<11){r=16}else{r=t+11&-8}t=e-8|0;return(($t(t,r)|0)==(t|0)?e:0)|0}function Zt(e,t){e=e|0;t=t|0;var r=0;if(e>>>0<9){r=Kt(t)|0;return r|0}else{r=Gt(e,t)|0;return r|0}return 0}function Gt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0;r=e>>>0<16?16:e;if((r-1&r|0)==0){n=r}else{e=16;while(1){if(e>>>0>>0){e=e<<1}else{n=e;break}}}if((-64-n|0)>>>0<=t>>>0){a[($e()|0)>>2]=12;i=0;return i|0}if(t>>>0<11){o=16}else{o=t+11&-8}t=Kt(n+12+o|0)|0;if((t|0)==0){i=0;return i|0}e=t-8|0;r=e;s=n-1|0;do{if((t&s|0)==0){f=r}else{u=t+s&-n;c=u-8|0;l=e;if((c-l|0)>>>0>15){h=c}else{h=u+(n-8)|0}u=h;c=h-l|0;l=t-4|0;d=a[l>>2]|0;p=(d&-8)-c|0;if((d&3|0)==0){a[h>>2]=(a[e>>2]|0)+c;a[h+4>>2]=p;f=u;break}else{d=h+4|0;a[d>>2]=p|a[d>>2]&1|2;d=h+(p+4)|0;a[d>>2]=a[d>>2]|1;a[l>>2]=c|a[l>>2]&1|2;l=t+(c-4)|0;a[l>>2]=a[l>>2]|1;vr(r,c);f=u;break}}}while(0);r=f+4|0;t=a[r>>2]|0;do{if((t&3|0)!=0){h=t&-8;if(h>>>0<=(o+16|0)>>>0){break}e=h-o|0;n=f;a[r>>2]=o|t&1|2;a[n+(o|4)>>2]=e|3;s=n+(h|4)|0;a[s>>2]=a[s>>2]|1;vr(n+o|0,e)}}while(0);i=f+8|0;return i|0}function Qt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if(e>>>0>=4294967232){r=0;return r|0}t=a[214]|0;if((t|0)==0){r=0;return r|0}n=a[211]|0;do{if(n>>>0>(e+40|0)>>>0){i=a[202]|0;o=oe((((-40-e-1+n+i|0)>>>0)/(i>>>0)|0)-1|0,i)|0;s=t;f=1280;while(1){u=a[f>>2]|0;if(u>>>0<=s>>>0){if((u+(a[f+4>>2]|0)|0)>>>0>s>>>0){c=f;break}}u=a[f+8>>2]|0;if((u|0)==0){c=0;break}else{f=u}}if((a[c+12>>2]&8|0)!=0){break}f=Ge(0)|0;s=c+4|0;if((f|0)!=((a[c>>2]|0)+(a[s>>2]|0)|0)){break}u=Ge(-(o>>>0>2147483646?-2147483648-i|0:o)|0)|0;l=Ge(0)|0;if(!((u|0)!=-1&l>>>0>>0)){break}u=f-l|0;if((f|0)==(l|0)){break}a[s>>2]=(a[s>>2]|0)-u;a[316]=(a[316]|0)-u;s=a[214]|0;h=(a[211]|0)-u|0;u=s;d=s+8|0;if((d&7|0)==0){p=0}else{p=-d&7}d=h-p|0;a[214]=u+p;a[211]=d;a[u+(p+4)>>2]=d|1;a[u+(h+4)>>2]=40;a[215]=a[204];r=(f|0)!=(l|0)|0;return r|0}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){r=0;return r|0}a[215]=-1;r=0;return r|0}function $t(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0;r=e+4|0;n=a[r>>2]|0;i=n&-8;o=e;s=o+i|0;f=s;u=a[212]|0;if(o>>>0>>0){ke();return 0}c=n&3;if(!((c|0)!=1&o>>>0>>0)){ke();return 0}l=o+(i|4)|0;h=a[l>>2]|0;if((h&1|0)==0){ke();return 0}if((c|0)==0){if(t>>>0<256){d=0;return d|0}do{if(i>>>0>=(t+4|0)>>>0){if((i-t|0)>>>0>a[202]<<1>>>0){break}else{d=e}return d|0}}while(0);d=0;return d|0}if(i>>>0>=t>>>0){c=i-t|0;if(c>>>0<=15){d=e;return d|0}a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|3;a[l>>2]=a[l>>2]|1;vr(o+t|0,c);d=e;return d|0}if((f|0)==(a[214]|0)){c=(a[211]|0)+i|0;if(c>>>0<=t>>>0){d=0;return d|0}l=c-t|0;a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=l|1;a[214]=o+t;a[211]=l;d=e;return d|0}if((f|0)==(a[213]|0)){l=(a[210]|0)+i|0;if(l>>>0>>0){d=0;return d|0}c=l-t|0;if(c>>>0>15){a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|1;a[o+l>>2]=c;p=o+(l+4)|0;a[p>>2]=a[p>>2]&-2;b=o+t|0;v=c}else{a[r>>2]=n&1|l|2;n=o+(l+4)|0;a[n>>2]=a[n>>2]|1;b=0;v=0}a[210]=v;a[213]=b;d=e;return d|0}if((h&2|0)!=0){d=0;return d|0}b=(h&-8)+i|0;if(b>>>0>>0){d=0;return d|0}v=b-t|0;n=h>>>3;e:do{if(h>>>0<256){l=a[o+(i+8)>>2]|0;c=a[o+(i+12)>>2]|0;p=872+(n<<1<<2)|0;do{if((l|0)!=(p|0)){if(l>>>0>>0){ke();return 0}if((a[l+12>>2]|0)==(f|0)){break}ke();return 0}}while(0);if((c|0)==(l|0)){a[208]=a[208]&~(1<>>0>>0){ke();return 0}g=c+8|0;if((a[g>>2]|0)==(f|0)){m=g;break}ke();return 0}}while(0);a[l+12>>2]=c;a[m>>2]=l}else{p=s;g=a[o+(i+24)>>2]|0;y=a[o+(i+12)>>2]|0;do{if((y|0)==(p|0)){w=o+(i+20)|0;_=a[w>>2]|0;if((_|0)==0){S=o+(i+16)|0;k=a[S>>2]|0;if((k|0)==0){x=0;break}else{A=k;M=S}}else{A=_;M=w}while(1){w=A+20|0;_=a[w>>2]|0;if((_|0)!=0){A=_;M=w;continue}w=A+16|0;_=a[w>>2]|0;if((_|0)==0){break}else{A=_;M=w}}if(M>>>0>>0){ke();return 0}else{a[M>>2]=0;x=A;break}}else{w=a[o+(i+8)>>2]|0;if(w>>>0>>0){ke();return 0}_=w+12|0;if((a[_>>2]|0)!=(p|0)){ke();return 0}S=y+8|0;if((a[S>>2]|0)==(p|0)){a[_>>2]=y;a[S>>2]=w;x=y;break}else{ke();return 0}}}while(0);if((g|0)==0){break}y=o+(i+28)|0;l=1136+(a[y>>2]<<2)|0;do{if((p|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(g>>>0<(a[212]|0)>>>0){ke();return 0}c=g+16|0;if((a[c>>2]|0)==(p|0)){a[c>>2]=x}else{a[g+20>>2]=x}if((x|0)==0){break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke();return 0}a[x+24>>2]=g;p=a[o+(i+16)>>2]|0;do{if((p|0)!=0){if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+16>>2]=p;a[p+24>>2]=x;break}}}while(0);p=a[o+(i+20)>>2]|0;if((p|0)==0){break}if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+20>>2]=p;a[p+24>>2]=x;break}}}while(0);if(v>>>0<16){a[r>>2]=b|a[r>>2]&1|2;x=o+(b|4)|0;a[x>>2]=a[x>>2]|1;d=e;return d|0}else{a[r>>2]=a[r>>2]&1|t|2;a[o+(t+4)>>2]=v|3;r=o+(b|4)|0;a[r>>2]=a[r>>2]|1;vr(o+t|0,v);d=e;return d|0}return 0}function Jt(){return a[316]|0}function er(){return a[317]|0}function tr(){var e=0;e=a[318]|0;return((e|0)==0?-1:e)|0}function rr(e){e=e|0;var t=0,r=0;if((e|0)==-1){t=0}else{r=a[202]|0;t=e-1+r&-r}a[318]=t;return t|0}function nr(e){e=e|0;var t=0,r=0,n=0;do{if((e|0)==0){t=0}else{r=a[e-4>>2]|0;n=r&3;if((n|0)==1){t=0;break}t=(r&-8)-((n|0)==0?8:4)|0}}while(0);return t|0}function ir(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0;do{if((t|0)==8){n=Kt(r)|0}else{i=t>>>2;if((t&3|0)!=0|(i|0)==0){o=22;return o|0}if((i+1073741823&i|0)!=0){o=22;return o|0}if((-64-t|0)>>>0>>0){o=12;return o|0}else{n=Gt(t>>>0<16?16:t,r)|0;break}}}while(0);if((n|0)==0){o=12;return o|0}a[e>>2]=n;o=0;return o|0}function ar(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+8|0;i=n|0;a[i>>2]=t;t=ur(e,i,3,r)|0;l=n;return t|0}function or(e,t,r){e=e|0;t=t|0;r=r|0;return ur(e,t,0,r)|0}function sr(e){e=e|0;var t=0,r=0,n=0;if((a[200]|0)!=0){t=a[201]|0;r=Zt(t,e)|0;return r|0}n=we(8)|0;if((n-1&n|0)!=0){ke();return 0}a[202]=n;a[201]=n;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=a[201]|0;r=Zt(t,e)|0;return r|0}function fr(e){e=e|0;var t=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);t=a[201]|0;return Zt(t,e-1+t&-t)|0}function ur(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;do{if((a[200]|0)==0){i=we(8)|0;if((i-1&i|0)==0){a[202]=i;a[201]=i;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);i=(e|0)==0;do{if((n|0)==0){if(i){o=Kt(0)|0;return o|0}else{s=e<<2;if(s>>>0<11){f=0;u=16;break}f=0;u=s+11&-8;break}}else{if(i){o=n}else{f=n;u=0;break}return o|0}}while(0);do{if((r&1|0)==0){if(i){c=0;l=0;break}else{h=0;d=0}while(1){n=a[t+(d<<2)>>2]|0;if(n>>>0<11){p=16}else{p=n+11&-8}n=p+h|0;s=d+1|0;if((s|0)==(e|0)){c=0;l=n;break}else{h=n;d=s}}}else{s=a[t>>2]|0;if(s>>>0<11){b=16}else{b=s+11&-8}c=b;l=oe(b,e)|0}}while(0);b=Kt(u-4+l|0)|0;if((b|0)==0){o=0;return o|0}d=b-8|0;h=a[b-4>>2]&-8;if((r&2|0)!=0){en(b|0,0,-4-u+h|0)}if((f|0)==0){a[b+(l-4)>>2]=h-l|3;v=b+l|0;m=l}else{v=f;m=h}a[v>>2]=b;b=e-1|0;e:do{if((b|0)==0){g=d;y=m}else{if((c|0)==0){w=d;_=m;S=0}else{e=d;h=m;f=0;while(1){l=h-c|0;a[e+4>>2]=c|3;u=e+c|0;r=f+1|0;a[v+(r<<2)>>2]=e+(c+8);if((r|0)==(b|0)){g=u;y=l;break e}else{e=u;h=l;f=r}}}while(1){f=a[t+(S<<2)>>2]|0;if(f>>>0<11){k=16}else{k=f+11&-8}f=_-k|0;a[w+4>>2]=k|3;h=w+k|0;e=S+1|0;a[v+(e<<2)>>2]=w+(k+8);if((e|0)==(b|0)){g=h;y=f;break}else{w=h;_=f;S=e}}}}while(0);a[g+4>>2]=y|3;o=v;return o|0}function cr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0;r=e+(t<<2)|0;e:do{if((t|0)!=0){n=e;t:while(1){i=a[n>>2]|0;r:do{if((i|0)==0){o=n+4|0}else{s=i-8|0;f=s;u=i-4|0;c=a[u>>2]&-8;a[n>>2]=0;if(s>>>0<(a[212]|0)>>>0){l=935;break t}s=a[u>>2]|0;if((s&3|0)==1){l=936;break t}h=n+4|0;d=s-8&-8;do{if((h|0)!=(r|0)){if((a[h>>2]|0)!=(i+(d+8)|0)){break}p=(a[i+(d|4)>>2]&-8)+c|0;a[u>>2]=s&1|p|2;b=i+(p-4)|0;a[b>>2]=a[b>>2]|1;a[h>>2]=i;o=h;break r}}while(0);vr(f,c);o=h}}while(0);if((o|0)==(r|0)){break e}else{n=o}}if((l|0)==935){ke();return 0}else if((l|0)==936){ke();return 0}}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){return 0}Qt(0)|0;return 0}function lr(e){e=e|0;var t=0,r=0;if((a[200]|0)!=0){t=Qt(e)|0;return t|0}r=we(8)|0;if((r-1&r|0)!=0){ke();return 0}a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=Qt(e)|0;return t|0}function hr(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0;o=0;s=0;f=0;u=0}else{c=a[211]|0;l=c+40|0;h=1;d=l;p=l;l=1280;while(1){b=a[l>>2]|0;v=b+8|0;if((v&7|0)==0){m=0}else{m=-v&7}v=b+(a[l+4>>2]|0)|0;g=h;y=d;w=p;_=b+m|0;while(1){if(_>>>0>=v>>>0|(_|0)==(t|0)){S=g;k=y;x=w;break}A=a[_+4>>2]|0;if((A|0)==7){S=g;k=y;x=w;break}M=A&-8;E=M+w|0;if((A&3|0)==1){T=M+y|0;I=g+1|0}else{T=y;I=g}A=_+M|0;if(A>>>0>>0){S=I;k=T;x=E;break}else{g=I;y=T;w=E;_=A}}_=a[l+8>>2]|0;if((_|0)==0){break}else{h=S;d=k;p=x;l=_}}l=a[316]|0;r=c;n=x;i=S;o=l-x|0;s=a[317]|0;f=l-k|0;u=k}a[e>>2]=n;a[e+4>>2]=i;i=e+8|0;a[i>>2]=0;a[i+4>>2]=0;a[e+16>>2]=o;a[e+20>>2]=s;a[e+24>>2]=0;a[e+28>>2]=f;a[e+32>>2]=u;a[e+36>>2]=r;return}function dr(){var e=0,t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,g=0,y=0,w=0;e=l;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0}else{o=a[317]|0;s=a[316]|0;f=s-40-(a[211]|0)|0;u=1280;while(1){c=a[u>>2]|0;h=c+8|0;if((h&7|0)==0){d=0}else{d=-h&7}h=c+(a[u+4>>2]|0)|0;p=f;b=c+d|0;while(1){if(b>>>0>=h>>>0|(b|0)==(t|0)){v=p;break}g=a[b+4>>2]|0;if((g|0)==7){v=p;break}y=g&-8;w=p-((g&3|0)==1?y:0)|0;g=b+y|0;if(g>>>0>>0){v=w;break}else{p=w;b=g}}b=a[u+8>>2]|0;if((b|0)==0){r=v;n=s;i=o;break}else{f=v;u=b}}}xe(a[m>>2]|0,520,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;xe(a[m>>2]|0,488,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;xe(a[m>>2]|0,400,(E=l,l=l+8|0,a[E>>2]=r,E)|0)|0;l=e;return}function pr(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((a[200]|0)==0){r=we(8)|0;if((r-1&r|0)==0){a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if((e|0)==(-1|0)){a[204]=t;n=1;return n|0}else if((e|0)==(-2|0)){if((a[201]|0)>>>0>t>>>0){n=0;return n|0}if((t-1&t|0)!=0){n=0;return n|0}a[202]=t;n=1;return n|0}else if((e|0)==(-3|0)){a[203]=t;n=1;return n|0}else{n=0;return n|0}return 0}function br(){return(B=a[328]|0,a[328]=B+0,B)|0}function vr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0;r=e;n=r+t|0;i=n;o=a[e+4>>2]|0;e:do{if((o&1|0)==0){s=a[e>>2]|0;if((o&3|0)==0){return}f=r+(-s|0)|0;u=f;c=s+t|0;l=a[212]|0;if(f>>>0>>0){ke()}if((u|0)==(a[213]|0)){h=r+(t+4)|0;if((a[h>>2]&3|0)!=3){d=u;p=c;break}a[210]=c;a[h>>2]=a[h>>2]&-2;a[r+(4-s)>>2]=c|1;a[n>>2]=c;return}h=s>>>3;if(s>>>0<256){b=a[r+(8-s)>>2]|0;v=a[r+(12-s)>>2]|0;m=872+(h<<1<<2)|0;do{if((b|0)!=(m|0)){if(b>>>0>>0){ke()}if((a[b+12>>2]|0)==(u|0)){break}ke()}}while(0);if((v|0)==(b|0)){a[208]=a[208]&~(1<>>0>>0){ke()}y=v+8|0;if((a[y>>2]|0)==(u|0)){g=y;break}ke()}}while(0);a[b+12>>2]=v;a[g>>2]=b;d=u;p=c;break}m=f;h=a[r+(24-s)>>2]|0;y=a[r+(12-s)>>2]|0;do{if((y|0)==(m|0)){w=16-s|0;_=r+(w+4)|0;S=a[_>>2]|0;if((S|0)==0){k=r+w|0;w=a[k>>2]|0;if((w|0)==0){x=0;break}else{A=w;M=k}}else{A=S;M=_}while(1){_=A+20|0;S=a[_>>2]|0;if((S|0)!=0){A=S;M=_;continue}_=A+16|0;S=a[_>>2]|0;if((S|0)==0){break}else{A=S;M=_}}if(M>>>0>>0){ke()}else{a[M>>2]=0;x=A;break}}else{_=a[r+(8-s)>>2]|0;if(_>>>0>>0){ke()}S=_+12|0;if((a[S>>2]|0)!=(m|0)){ke()}k=y+8|0;if((a[k>>2]|0)==(m|0)){a[S>>2]=y;a[k>>2]=_;x=y;break}else{ke()}}}while(0);if((h|0)==0){d=u;p=c;break}y=r+(28-s)|0;l=1136+(a[y>>2]<<2)|0;do{if((m|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);d=u;p=c;break e}else{if(h>>>0<(a[212]|0)>>>0){ke()}f=h+16|0;if((a[f>>2]|0)==(m|0)){a[f>>2]=x}else{a[h+20>>2]=x}if((x|0)==0){d=u;p=c;break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke()}a[x+24>>2]=h;m=16-s|0;y=a[r+m>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+16>>2]=y;a[y+24>>2]=x;break}}}while(0);y=a[r+(m+4)>>2]|0;if((y|0)==0){d=u;p=c;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+20>>2]=y;a[y+24>>2]=x;d=u;p=c;break}}else{d=e;p=t}}while(0);e=a[212]|0;if(n>>>0>>0){ke()}x=r+(t+4)|0;A=a[x>>2]|0;do{if((A&2|0)==0){if((i|0)==(a[214]|0)){M=(a[211]|0)+p|0;a[211]=M;a[214]=d;a[d+4>>2]=M|1;if((d|0)!=(a[213]|0)){return}a[213]=0;a[210]=0;return}if((i|0)==(a[213]|0)){M=(a[210]|0)+p|0;a[210]=M;a[213]=d;a[d+4>>2]=M|1;a[d+M>>2]=M;return}M=(A&-8)+p|0;g=A>>>3;e:do{if(A>>>0<256){o=a[r+(t+8)>>2]|0;y=a[r+(t+12)>>2]|0;s=872+(g<<1<<2)|0;do{if((o|0)!=(s|0)){if(o>>>0>>0){ke()}if((a[o+12>>2]|0)==(i|0)){break}ke()}}while(0);if((y|0)==(o|0)){a[208]=a[208]&~(1<>>0>>0){ke()}h=y+8|0;if((a[h>>2]|0)==(i|0)){E=h;break}ke()}}while(0);a[o+12>>2]=y;a[E>>2]=o}else{s=n;h=a[r+(t+24)>>2]|0;l=a[r+(t+12)>>2]|0;do{if((l|0)==(s|0)){f=r+(t+20)|0;b=a[f>>2]|0;if((b|0)==0){v=r+(t+16)|0;_=a[v>>2]|0;if((_|0)==0){T=0;break}else{I=_;P=v}}else{I=b;P=f}while(1){f=I+20|0;b=a[f>>2]|0;if((b|0)!=0){I=b;P=f;continue}f=I+16|0;b=a[f>>2]|0;if((b|0)==0){break}else{I=b;P=f}}if(P>>>0>>0){ke()}else{a[P>>2]=0;T=I;break}}else{f=a[r+(t+8)>>2]|0;if(f>>>0>>0){ke()}b=f+12|0;if((a[b>>2]|0)!=(s|0)){ke()}v=l+8|0;if((a[v>>2]|0)==(s|0)){a[b>>2]=l;a[v>>2]=f;T=l;break}else{ke()}}}while(0);if((h|0)==0){break}l=r+(t+28)|0;o=1136+(a[l>>2]<<2)|0;do{if((s|0)==(a[o>>2]|0)){a[o>>2]=T;if((T|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(h>>>0<(a[212]|0)>>>0){ke()}y=h+16|0;if((a[y>>2]|0)==(s|0)){a[y>>2]=T}else{a[h+20>>2]=T}if((T|0)==0){break e}}}while(0);if(T>>>0<(a[212]|0)>>>0){ke()}a[T+24>>2]=h;s=a[r+(t+16)>>2]|0;do{if((s|0)!=0){if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+16>>2]=s;a[s+24>>2]=T;break}}}while(0);s=a[r+(t+20)>>2]|0;if((s|0)==0){break}if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+20>>2]=s;a[s+24>>2]=T;break}}}while(0);a[d+4>>2]=M|1;a[d+M>>2]=M;if((d|0)!=(a[213]|0)){O=M;break}a[210]=M;return}else{a[x>>2]=A&-2;a[d+4>>2]=p|1;a[d+p>>2]=p;O=p}}while(0);p=O>>>3;if(O>>>0<256){A=p<<1;x=872+(A<<2)|0;T=a[208]|0;t=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){R=r;C=p;break}ke()}}while(0);a[C>>2]=d;a[R+12>>2]=d;a[d+8>>2]=R;a[d+12>>2]=x;return}x=d;R=O>>>8;do{if((R|0)==0){B=0}else{if(O>>>0>16777215){B=31;break}C=(R+1048320|0)>>>16&8;A=R<>>16&4;T=A<>>16&2;p=14-(t|C|A)+(T<>>15)|0;B=O>>>((p+7|0)>>>0)&1|p<<1}}while(0);R=1136+(B<<2)|0;a[d+28>>2]=B;a[d+20>>2]=0;a[d+16>>2]=0;p=a[209]|0;A=1<>2]=x;a[d+24>>2]=R;a[d+12>>2]=d;a[d+8>>2]=d;return}if((B|0)==31){j=0}else{j=25-(B>>>1)|0}B=O<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(O|0)){break}N=j+16+(B>>>31<<2)|0;R=a[N>>2]|0;if((R|0)==0){L=1120;break}else{B=B<<1;j=R}}if((L|0)==1120){if(N>>>0<(a[212]|0)>>>0){ke()}a[N>>2]=x;a[d+24>>2]=j;a[d+12>>2]=d;a[d+8>>2]=d;return}N=j+8|0;L=a[N>>2]|0;B=a[212]|0;if(j>>>0>>0){ke()}if(L>>>0>>0){ke()}a[L+12>>2]=x;a[N>>2]=x;a[d+8>>2]=L;a[d+12>>2]=j;a[d+24>>2]=0;return}function mr(e){e=e|0;var t=0,r=0,n=0;t=(e|0)==0?1:e;while(1){r=Kt(t)|0;if((r|0)!=0){n=1164;break}e=(B=a[328]|0,a[328]=B+0,B);if((e|0)==0){break}Cn[e&1]()}if((n|0)==1164){return r|0}r=Fe(4)|0;a[r>>2]=560;_e(r|0,688,6);return 0}function gr(e,t){e=e|0;t=t|0;return mr(e)|0}function yr(e){e=e|0;return}function wr(e){e=e|0;return 360|0}function _r(e){e=e|0;return 448|0}function Sr(e){e=e|0;return(B=a[328]|0,a[328]=e,B)|0}function kr(e){e=e|0;a[e>>2]=560;return}function xr(e){e=e|0;a[e>>2]=592;return}function Ar(e){e=e|0;if((e|0)!=0){Yt(e)}return}function Mr(e,t){e=e|0;t=t|0;Ar(e);return}function Er(e){e=e|0;Ar(e);return}function Tr(e,t){e=e|0;t=t|0;Er(e);return}function Ir(e){e=e|0;Ar(e);return}function Pr(e){e=e|0;Ar(e);return}function Or(e,t,r){e=e|0;t=t|0;r=r|0;return Rr(e,t,r,0,0,0)|0}function Rr(e,t,r,i,o,s){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;s=s|0;var f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,U=0,D=0,q=0,K=0,Y=0,V=0,W=0,X=0,Z=0,G=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0;f=l;if((r|0)==0){u=-1;l=f;return u|0}c=a[44]|0;if((c|0)==0){a[196]=1;a[44]=1;h=1;d=1;p=1190}else{b=a[196]|0;v=a[74]|0;if((v|0)==-1|(b|0)!=0){h=b;d=c;p=1190}else{m=v;g=b;y=c}}if((p|0)==1190){c=(Ke(344)|0)!=0|0;a[74]=c;m=c;g=h;y=d}d=n[r]|0;if(d<<24>>24==45){w=s|2;p=1194}else{h=(m|0)!=0|d<<24>>24==43?s&-2:s;if(d<<24>>24==43){w=h;p=1194}else{_=r;S=h}}if((p|0)==1194){_=r+1|0;S=w}a[198]=0;if((g|0)==0){k=y;p=1198}else{a[50]=-1;a[48]=-1;x=y;A=g;p=1197}while(1){if((p|0)==1197){p=0;if((A|0)==0){k=x;p=1198;continue}else{M=x}}else if((p|0)==1198){p=0;g=a[40]|0;if((n[g]|0)==0){M=k}else{T=g;I=k;break}}a[196]=0;if((M|0)>=(e|0)){p=1200;break}P=t+(M<<2)|0;O=a[P>>2]|0;a[40]=O;if((n[O]|0)==45){R=O+1|0;C=n[R]|0;if(C<<24>>24!=0){p=1232;break}if((Pe(_|0,45)|0)!=0){p=1232;break}}a[40]=824;if((S&2|0)!=0){p=1217;break}if((S&1|0)==0){u=-1;p=1298;break}g=a[48]|0;do{if((g|0)==-1){a[48]=M;B=M;j=0}else{y=a[50]|0;if((y|0)==-1){B=M;j=0;break}w=y-g|0;r=M-y|0;h=(w|0)%(r|0)|0;if((h|0)==0){N=r}else{d=r;s=h;while(1){h=(d|0)%(s|0)|0;if((h|0)==0){N=s;break}else{d=s;s=h}}}s=(M-g|0)/(N|0)|0;do{if((N|0)>0){d=-w|0;if((s|0)>0){L=0}else{F=M;z=y;H=g;U=0;break}do{h=L+y|0;m=t+(h<<2)|0;c=0;b=h;h=a[m>>2]|0;while(1){v=((b|0)<(y|0)?r:d)+b|0;D=t+(v<<2)|0;q=a[D>>2]|0;a[D>>2]=h;a[m>>2]=q;D=c+1|0;if((D|0)<(s|0)){c=D;b=v;h=q}else{break}}L=L+1|0}while((L|0)<(N|0));F=a[44]|0;z=a[50]|0;H=a[48]|0;U=a[196]|0}else{F=M;z=y;H=g;U=0}}while(0);a[48]=F-z+H;a[50]=-1;B=F;j=U}}while(0);g=B+1|0;a[44]=g;x=g;A=j;p=1197}do{if((p|0)==1298){l=f;return u|0}else if((p|0)==1232){j=a[48]|0;A=a[50]|0;if((j|0)!=-1&(A|0)==-1){a[50]=M;K=n[R]|0;Y=M}else{K=C;Y=A}if(K<<24>>24==0){T=O;I=M;break}a[40]=R;if((n[R]|0)!=45){T=R;I=M;break}if((n[O+2|0]|0)!=0){T=R;I=M;break}A=M+1|0;a[44]=A;a[40]=824;if((Y|0)!=-1){x=Y-j|0;B=A-Y|0;U=(x|0)%(B|0)|0;if((U|0)==0){V=B}else{F=B;H=U;while(1){U=(F|0)%(H|0)|0;if((U|0)==0){V=H;break}else{F=H;H=U}}}H=(A-j|0)/(V|0)|0;do{if((V|0)>0){F=-x|0;if((H|0)>0){W=0}else{X=Y;Z=j;G=A;break}do{U=W+Y|0;z=t+(U<<2)|0;N=0;L=U;U=a[z>>2]|0;while(1){k=((L|0)<(Y|0)?B:F)+L|0;g=t+(k<<2)|0;y=a[g>>2]|0;a[g>>2]=U;a[z>>2]=y;g=N+1|0;if((g|0)<(H|0)){N=g;L=k;U=y}else{break}}W=W+1|0}while((W|0)<(V|0));X=a[50]|0;Z=a[48]|0;G=a[44]|0}else{X=Y;Z=j;G=A}}while(0);a[44]=Z-X+G}a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1200){a[40]=824;A=a[50]|0;j=a[48]|0;do{if((A|0)==-1){if((j|0)==-1){break}a[44]=j}else{H=A-j|0;B=M-A|0;x=(H|0)%(B|0)|0;if((x|0)==0){Q=B}else{F=B;U=x;while(1){x=(F|0)%(U|0)|0;if((x|0)==0){Q=U;break}else{F=U;U=x}}}U=(M-j|0)/(Q|0)|0;do{if((Q|0)>0){F=-H|0;if((U|0)>0){$=0}else{J=A;ee=j;te=M;break}do{x=$+A|0;L=t+(x<<2)|0;N=0;z=x;x=a[L>>2]|0;while(1){y=((z|0)<(A|0)?B:F)+z|0;k=t+(y<<2)|0;g=a[k>>2]|0;a[k>>2]=x;a[L>>2]=g;k=N+1|0;if((k|0)<(U|0)){N=k;z=y;x=g}else{break}}$=$+1|0}while(($|0)<(Q|0));J=a[50]|0;ee=a[48]|0;te=a[44]|0}else{J=A;ee=j;te=M}}while(0);a[44]=ee-J+te}}while(0);a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1217){a[44]=M+1;a[198]=a[P>>2];u=1;l=f;return u|0}}while(0);P=(i|0)!=0;e:do{if(P){if((T|0)==(a[t+(I<<2)>>2]|0)){re=T;break}M=n[T]|0;do{if(M<<24>>24==45){a[40]=T+1;ne=0}else{if((S&4|0)==0){re=T;break e}if(M<<24>>24==58){ne=0;break}ne=(Pe(_|0,M<<24>>24|0)|0)!=0|0}}while(0);M=Fr(t,_,i,o,ne)|0;if((M|0)==-1){re=a[40]|0;break}a[40]=824;u=M;l=f;return u|0}else{re=T}}while(0);T=re+1|0;a[40]=T;ne=n[re]|0;re=ne<<24>>24;if((ne<<24>>24|0)==45){if((n[T]|0)==0){p=1260}}else if((ne<<24>>24|0)==58){p=1263}else{p=1260}do{if((p|0)==1260){S=Pe(_|0,re|0)|0;if((S|0)==0){if(ne<<24>>24!=45){p=1263;break}if((n[T]|0)==0){u=-1}else{break}l=f;return u|0}I=n[S+1|0]|0;if(P&ne<<24>>24==87&I<<24>>24==59){do{if((n[T]|0)==0){M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[40]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}}while(0);M=Fr(t,_,i,o,0)|0;a[40]=824;u=M;l=f;return u|0}if(I<<24>>24!=58){if((n[T]|0)!=0){u=re;l=f;return u|0}a[44]=(a[44]|0)+1;u=re;l=f;return u|0}a[198]=0;do{if((n[T]|0)==0){if((n[S+2|0]|0)==58){break}M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[198]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}else{a[198]=T}}while(0);a[40]=824;a[44]=(a[44]|0)+1;u=re;l=f;return u|0}}while(0);do{if((p|0)==1263){if((n[T]|0)!=0){break}a[44]=(a[44]|0)+1}}while(0);do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(272,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=63;l=f;return u|0}function Cr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,1)|0}function Br(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,5)|0}function jr(e){e=e|0;return mr(e)|0}function Nr(e,t){e=e|0;t=t|0;return jr(e)|0}function Lr(){var e=0;e=Fe(4)|0;a[e>>2]=560;_e(e|0,688,6)}function Fr(e,t,r,i,o){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;var s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0;s=l;f=a[40]|0;u=a[44]|0;c=u+1|0;a[44]=c;h=Pe(f|0,61)|0;if((h|0)==0){d=tn(f|0)|0;p=0}else{d=h-f|0;p=h+1|0}h=a[r>>2]|0;e:do{if((h|0)!=0){t:do{if((o|0)!=0&(d|0)==1){b=0;v=h;while(1){if((n[f]|0)==(n[v]|0)){if((tn(v|0)|0)==1){m=b;break t}}b=b+1|0;v=a[r+(b<<4)>>2]|0;if((v|0)==0){break e}}}else{v=0;b=-1;g=h;while(1){if((ge(f|0,g|0,d|0)|0)==0){if((tn(g|0)|0)==(d|0)){m=v;break t}if((b|0)==-1){y=v}else{break}}else{y=b}w=v+1|0;_=a[r+(w<<4)>>2]|0;if((_|0)==0){m=y;break t}else{v=w;b=y;g=_}}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(304,(E=l,l=l+16|0,a[E>>2]=d,a[E+8>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}}while(0);if((m|0)==-1){break}g=r+(m<<4)+4|0;b=a[g>>2]|0;v=(p|0)==0;if(!((b|0)!=0|v)){do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(208,(E=l,l=l+16|0,a[E>>2]=d,a[E+8>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){k=a[r+(m<<4)+12>>2]|0}else{k=0}a[42]=k;S=(n[t]|0)==58?58:63;l=s;return S|0}do{if((b-1|0)>>>0<2){if(!v){a[198]=p;break}if((b|0)!=1){break}a[44]=u+2;a[198]=a[e+(c<<2)>>2]}}while(0);if(!((a[g>>2]|0)==1&(a[198]|0)==0)){if((i|0)!=0){a[i>>2]=m}b=a[r+(m<<4)+8>>2]|0;v=a[r+(m<<4)+12>>2]|0;if((b|0)==0){S=v;l=s;return S|0}a[b>>2]=v;S=0;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(8,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){x=a[r+(m<<4)+12>>2]|0}else{x=0}a[42]=x;a[44]=(a[44]|0)-1;S=(n[t]|0)==58?58:63;l=s;return S|0}}while(0);if((o|0)!=0){a[44]=u;S=-1;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(248,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}function zr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Ur(e,n|0);l=r;return}function Hr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Dr(e,n|0);l=r;return}function Ur(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,432,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((e|0)!=0){i=a[m>>2]|0;Ye(i|0,e|0,t|0)|0;t=a[m>>2]|0;Ce(472,2,1,t|0)|0}t=a[m>>2]|0;e=Se(n|0)|0;xe(t|0,384,(E=l,l=l+8|0,a[E>>2]=e,E)|0)|0;l=r;return}function Dr(e,t){e=e|0;t=t|0;var r=0,n=0;r=l;n=a[w>>2]|0;xe(a[m>>2]|0,376,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((e|0)!=0){n=a[m>>2]|0;Ye(n|0,e|0,t|0)|0}Oe(10,a[m>>2]|0)|0;l=r;return}function qr(e,t){e=e|0;t=t|0;var r=0,i=0,o=0,s=0,f=0,u=0,l=0,h=0,d=0,p=0,b=0,v=0.0,m=0,g=0,y=0,w=0,_=0.0,S=0,k=0,x=0,A=0.0,M=0.0,E=0,T=0,I=0,P=0.0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0.0,H=0,U=0,D=0.0,q=0.0,K=0.0;r=e;while(1){i=r+1|0;if((ze(n[r]|0)|0)==0){break}else{r=i}}o=n[r]|0;if((o<<24>>24|0)==45){s=i;f=1}else if((o<<24>>24|0)==43){s=i;f=0}else{s=r;f=0}r=-1;i=0;o=s;while(1){u=n[o]|0;if(((u<<24>>24)-48|0)>>>0<10){l=r}else{if(u<<24>>24!=46|(r|0)>-1){break}else{l=i}}r=l;i=i+1|0;o=o+1|0}l=o+(-i|0)|0;s=(r|0)<0;h=((s^1)<<31>>31)+i|0;d=(h|0)>18;p=(d?-18:-h|0)+(s?i:r)|0;r=d?18:h;do{if((r|0)==0){b=e;v=0.0}else{if((r|0)>9){h=l;d=r;i=0;while(1){s=n[h]|0;m=h+1|0;if(s<<24>>24==46){g=n[m]|0;y=h+2|0}else{g=s;y=m}w=(i*10|0)-48+(g<<24>>24)|0;m=d-1|0;if((m|0)>9){h=y;d=m;i=w}else{break}}_=+(w|0)*1.0e9;S=9;k=y;x=1393}else{if((r|0)>0){_=0.0;S=r;k=l;x=1393}else{A=0.0;M=0.0}}if((x|0)==1393){i=k;d=S;h=0;while(1){m=n[i]|0;s=i+1|0;if(m<<24>>24==46){E=n[s]|0;T=i+2|0}else{E=m;T=s}I=(h*10|0)-48+(E<<24>>24)|0;s=d-1|0;if((s|0)>0){i=T;d=s;h=I}else{break}}A=+(I|0);M=_}P=M+A;do{if((u<<24>>24|0)==69|(u<<24>>24|0)==101){h=o+1|0;d=n[h]|0;if((d<<24>>24|0)==43){O=o+2|0;R=0}else if((d<<24>>24|0)==45){O=o+2|0;R=1}else{O=h;R=0}h=n[O]|0;if(((h<<24>>24)-48|0)>>>0<10){C=O;B=0;j=h}else{N=0;L=O;F=R;break}while(1){h=(B*10|0)-48+(j<<24>>24)|0;d=C+1|0;i=n[d]|0;if(((i<<24>>24)-48|0)>>>0<10){C=d;B=h;j=i}else{N=h;L=d;F=R;break}}}else{N=0;L=o;F=0}}while(0);d=p+((F|0)==0?N:-N|0)|0;h=(d|0)<0?-d|0:d;if((h|0)>511){a[($e()|0)>>2]=34;z=1.0;H=88;U=511;x=1410}else{if((h|0)==0){D=1.0}else{z=1.0;H=88;U=h;x=1410}}if((x|0)==1410){while(1){x=0;if((U&1|0)==0){q=z}else{q=z*+c[H>>3]}h=U>>1;if((h|0)==0){D=q;break}else{z=q;H=H+8|0;U=h;x=1410}}}if((d|0)>-1){b=L;v=P*D;break}else{b=L;v=P/D;break}}}while(0);if((t|0)!=0){a[t>>2]=b}if((f|0)==0){K=v;return+K}K=-0.0-v;return+K}function Kr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Yr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Vr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Wr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Xr(e){e=e|0;return+ +qr(e,0)}function Zr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Qr(e,t,i|0)}function Gr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;$r(e,t,i|0)}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,336,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((t|0)!=0){i=a[m>>2]|0;Ye(i|0,t|0,r|0)|0;r=a[m>>2]|0;Ce(480,2,1,r|0)|0}r=a[m>>2]|0;t=Se(n|0)|0;xe(r|0,392,(E=l,l=l+8|0,a[E>>2]=t,E)|0)|0;Ne(e|0)}function $r(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;n=a[w>>2]|0;xe(a[m>>2]|0,440,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((t|0)!=0){n=a[m>>2]|0;Ye(n|0,t|0,r|0)|0}Oe(10,a[m>>2]|0)|0;Ne(e|0)}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;i=e|0;if((e&3)==(t&3)){while(e&3){if((r|0)==0)return i|0;n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){a[e>>2]=a[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function en(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,o=0,s=0;i=e+r|0;if((r|0)>=20){t=t&255;r=e&3;o=t|t<<8|t<<16|t<<24;s=i&~3;if(r){r=e+4-r|0;while((e|0)<(r|0)){n[e]=t;e=e+1|0}}while((e|0)<(s|0)){a[e>>2]=o;e=e+4|0}}while((e|0)<(i|0)){n[e]=t;e=e+1|0}}function tn(e){e=e|0;var t=0;t=e;while(n[t]|0){t=t+1|0}return t-e|0}function rn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=e+r>>>0;return(N=t+n+(i>>>0>>0|0)>>>0,i|0)|0}function nn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=t-n>>>0;i=t-n-(r>>>0>e>>>0|0)>>>0;return(N=i,e-r>>>0|0)|0}function an(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t<>>32-r;return e<>>r;return e>>>r|(t&(1<>>r-32|0}function sn(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t>>r;return e>>>r|(t&(1<>r-32|0}function fn(e){e=e|0;var t=0;t=n[v+(e>>>24)|0]|0;if((t|0)<8)return t|0;t=n[v+(e>>16&255)|0]|0;if((t|0)<8)return t+8|0;t=n[v+(e>>8&255)|0]|0;if((t|0)<8)return t+16|0;return(n[v+(e&255)|0]|0)+24|0}function un(e){e=e|0;var t=0;t=n[b+(e&255)|0]|0;if((t|0)<8)return t|0;t=n[b+(e>>8&255)|0]|0;if((t|0)<8)return t+8|0;t=n[b+(e>>16&255)|0]|0;if((t|0)<8)return t+16|0;return(n[b+(e>>>24)|0]|0)+24|0}function cn(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,a=0;r=e&65535;n=t&65535;i=oe(n,r)|0;a=e>>>16;e=(i>>>16)+(oe(n,a)|0)|0;n=t>>>16;t=oe(n,r)|0;return(N=(e>>>16)+(oe(n,a)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|i&65535|0)|0}function ln(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,s=0,f=0;i=t>>31|((t|0)<0?-1:0)<<1;a=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=n>>31|((n|0)<0?-1:0)<<1;s=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;f=nn(i^e,a^t,i,a)|0;t=N;e=o^i;i=s^a;a=nn((vn(f,t,nn(o^r,s^n,o,s)|0,N,0)|0)^e,N^i,e,i)|0;return(N=N,a)|0}function hn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,h=0;i=l;l=l+8|0;o=i|0;s=t>>31|((t|0)<0?-1:0)<<1;f=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;u=n>>31|((n|0)<0?-1:0)<<1;c=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;h=nn(s^e,f^t,s,f)|0;t=N;e=nn(u^r,c^n,u,c)|0;vn(h,t,e,N,o)|0;e=nn(a[o>>2]^s,a[o+4>>2]^f,s,f)|0;f=N;l=i;return(N=f,e)|0}function dn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0;i=e;e=r;r=cn(i,e)|0;a=N;return(N=(oe(t,e)|0)+(oe(n,i)|0)+a|a&0,r|0|0)|0}function pn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=vn(e,t,r,n,0)|0;return(N=N,i)|0}function bn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0;i=l;l=l+8|0;o=i|0;vn(e,t,r,n,o)|0;l=i;return(N=a[o+4>>2]|0,a[o>>2]|0)|0}function vn(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,L=0,F=0;o=e;s=t;f=s;u=r;c=n;l=c;if((f|0)==0){h=(i|0)!=0;if((l|0)==0){if(h){a[i>>2]=(o>>>0)%(u>>>0);a[i+4>>2]=0}d=0;p=(o>>>0)/(u>>>0)>>>0;return(N=d,p)|0}else{if(!h){d=0;p=0;return(N=d,p)|0}a[i>>2]=e|0;a[i+4>>2]=t&0;d=0;p=0;return(N=d,p)|0}}h=(l|0)==0;do{if((u|0)==0){if(h){if((i|0)!=0){a[i>>2]=(f>>>0)%(u>>>0);a[i+4>>2]=0}d=0;p=(f>>>0)/(u>>>0)>>>0;return(N=d,p)|0}if((o|0)==0){if((i|0)!=0){a[i>>2]=0;a[i+4>>2]=(f>>>0)%(l>>>0)}d=0;p=(f>>>0)/(l>>>0)>>>0;return(N=d,p)|0}b=l-1|0;if((b&l|0)==0){if((i|0)!=0){a[i>>2]=e|0;a[i+4>>2]=b&f|t&0}d=0;p=f>>>((un(l|0)|0)>>>0);return(N=d,p)|0}b=(fn(l|0)|0)-(fn(f|0)|0)|0;if(b>>>0<=30){v=b+1|0;m=31-b|0;g=v;y=f<>>(v>>>0);w=f>>>(v>>>0);_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;d=0;p=0;return(N=d,p)|0}else{if(!h){m=(fn(l|0)|0)-(fn(f|0)|0)|0;if(m>>>0<=31){v=m+1|0;b=31-m|0;k=m-31>>31;g=v;y=o>>>(v>>>0)&k|f<>>(v>>>0)&k;_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;d=0;p=0;return(N=d,p)|0}b=u-1|0;if((b&u|0)!=0){k=(fn(u|0)|0)+33-(fn(f|0)|0)|0;v=64-k|0;m=32-k|0;x=m>>31;A=k-32|0;M=A>>31;g=k;y=m-1>>31&f>>>(A>>>0)|(f<>>(k>>>0))&M;w=M&f>>>(k>>>0);_=o<>>(A>>>0))&x|o<>31;break}if((i|0)!=0){a[i>>2]=b&o;a[i+4>>2]=0}if((u|0)==1){d=s|t&0;p=e|0|0;return(N=d,p)|0}else{b=un(u|0)|0;d=f>>>(b>>>0)|0;p=f<<32-b|o>>>(b>>>0)|0;return(N=d,p)|0}}}while(0);if((g|0)==0){E=S;T=_;I=w;P=y;O=0;R=0}else{o=r|0|0;r=c|n&0;n=rn(o,r,-1,-1)|0;c=N;f=S;S=_;_=w;w=y;y=g;g=0;while(1){C=S>>>31|f<<1;B=g|S<<1;u=w<<1|f>>>31|0;e=w>>>31|_<<1|0;nn(n,c,u,e)|0;t=N;s=t>>31|((t|0)<0?-1:0)<<1;j=s&1;L=nn(u,e,s&o,(((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1)&r)|0;F=N;t=y-1|0;if((t|0)==0){break}else{f=C;S=B;_=F;w=L;y=t;g=j}}E=C;T=B;I=F;P=L;O=0;R=j}j=T;T=0;if((i|0)!=0){a[i>>2]=P;a[i+4>>2]=I}d=(j|0)>>>31|(E|T)<<1|(T<<1|j>>>31)&0|O;p=(j<<1|0>>>31)&-2|R;return(N=d,p)|0}function mn(e,t){e=e|0;t=t|0;In[e&15](t|0)}function gn(e,t,r){e=e|0;t=t|0;r=r|0;Pn[e&15](t|0,r|0)}function yn(e,t){e=e|0;t=t|0;return On[e&7](t|0)|0}function wn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;Rn[e&15](t|0,r|0,n|0)}function _n(e){e=e|0;Cn[e&1]()}function Sn(e,t,r){e=e|0;t=t|0;r=r|0;return Bn[e&1](t|0,r|0)|0}function kn(e){e=e|0;se(0)}function xn(e,t){e=e|0;t=t|0;se(1)}function An(e){e=e|0;se(2);return 0}function Mn(e,t,r){e=e|0;t=t|0;r=r|0;se(3)}function En(){se(4)}function Tn(e,t){e=e|0;t=t|0;se(5);return 0}var In=[kn,kn,xr,kn,Pr,kn,yr,kn,kr,kn,Ir,kn,kn,kn,kn,kn];var Pn=[xn,xn,zr,xn,Ur,xn,Hr,xn,Dr,xn,xn,xn,xn,xn,xn,xn];var On=[An,An,wr,An,_r,An,An,An];var Rn=[Mn,Mn,$r,Mn,Qr,Mn,Zr,Mn,Gr,Mn,Mn,Mn,Mn,Mn,Mn,Mn];var Cn=[En,En];var Bn=[Tn,Tn];return{_crypto_scrypt:Et,_strlen:tn,_free:Yt,_realloc:Wt,_memset:en,_malloc:Kt,_memcpy:Jr,_calloc:Vt,runPostSets:wt,stackAlloc:it,stackSave:at,stackRestore:ot,setThrew:st,setTempRet0:ct,setTempRet1:lt,setTempRet2:ht,setTempRet3:dt,setTempRet4:pt,setTempRet5:bt,setTempRet6:vt,setTempRet7:mt,setTempRet8:gt,setTempRet9:yt,dynCall_vi:mn,dynCall_vii:gn,dynCall_ii:yn,dynCall_viii:wn,dynCall_v:_n,dynCall_iii:Sn}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:wa,assert:w,asmPrintInt:function(e,t){s.print("int "+e+","+t)},asmPrintFloat:function(e,t){s.print("float "+e+","+t)},min:Xc,invoke_vi:function(e,t){try{s.dynCall_vi(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_vii:function(e,t,r){try{s.dynCall_vii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_ii:function(e,t){try{return s.dynCall_ii(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_viii:function(e,t,r,n){try{s.dynCall_viii(e,t,r,n)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_v:function(e){try{s.dynCall_v(e)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_iii:function(e,t,r){try{return s.dynCall_iii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},_strncmp:function(e,t,r){for(var n=0;na?1:-1;n++}return 0},_llvm_va_end:aa(),_sysconf:function(e){switch(e){case 8:return 4096;case 54:case 56:case 21:case 61:case 63:case 22:case 67:case 23:case 24:case 25:case 26:case 27:case 69:case 28:case 101:case 70:case 71:case 29:case 30:case 199:case 75:case 76:case 32:case 43:case 44:case 80:case 46:case 47:case 45:case 48:case 49:case 42:case 82:case 33:case 7:case 108:case 109:case 107:case 112:case 119:case 121:return 200809;case 13:case 104:case 94:case 95:case 34:case 35:case 77:case 81:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:case 94:case 95:case 110:case 111:case 113:case 114:case 115:case 116:case 117:case 118:case 120:case 40:case 16:case 79:case 19:return-1;case 92:case 93:case 5:case 72:case 6:case 74:case 92:case 93:case 96:case 97:case 98:case 99:case 102:case 103:case 105:return 1;case 38:case 66:case 50:case 51:case 4:return 1024;case 15:case 64:case 41:return 32;case 55:case 37:case 17:return 2147483647;case 18:case 1:return 47839;case 59:case 57:return 99;case 68:case 58:return 2048;case 0:return 2097152;case 3:return 65536;case 14:return 32768;case 73:return 32767;case 39:return 16384;case 60:return 1e3;case 106:return 700;case 52:return 256;case 62:return 255;case 2:return 100;case 65:return 64;case 36:return 20;case 100:return 16;case 20:return 6;case 53:return 4;case 10:return 1}return M(N.A),-1},___cxa_throw:rc,_strerror:zc,_abort:function(){s.abort()},_fprintf:mc,_llvm_eh_exception:U,___cxa_free_exception:sc,_fflush:aa(),___buildEnvironment:wc,__reallyNegative:jc,_strchr:function(e,t){e--;do{var r=A[++e];if(r==t)return e}while(r);return 0},_fputc:Bc,___setErrNo:M,_fwrite:hc,_send:fc,_write:gc,_exit:function(e){Ac(e)},___cxa_find_matching_catch:function(e,t){-1==e&&(e=B[U.m>>2]),-1==t&&(t=B[U.m+4>>2]);var r=Array.prototype.slice.call(arguments,2);0!=t&&!pc(t)&&0==B[B[t>>2]-8>>2]&&(e=B[e>>2]);for(var n=0;n=e},__formatString:kc,___resumeException:function(e){0==B[U.m>>2]&&(B[U.m>>2]=e),g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")},_llvm_uadd_with_overflow_i32:function(e,t){return e>>>=0,t>>>=0,0|(V.setTempRet0(4294967295>>0)},___cxa_does_inherit:qc,_getenv:xc,_vfprintf:function(e,t,r){return mc(e,t,B[r>>2])},___cxa_begin_catch:function(e){return oc.ta--,e},__ZSt18uncaught_exceptionv:oc,_pwrite:function(e,t,r,n){if(!(e=R[e]))return M(N.$),-1;try{return Ib(e,A,t,r,n)}catch(e){return Zb(e),-1}},___cxa_call_unexpected:function(e){s.P("Unexpected exception thrown, this is not properly supported - aborting"),za=l,g(e)},_sbrk:nc,_strerror_r:yc,___errno_location:function(){return rb},___gxx_personality_v0:aa(),___cxa_is_number_type:pc,_time:function(e){var t=Math.floor(Date.now()/1e3);return e&&(B[e>>2]=t),t},__exit:Ac,___cxa_end_catch:uc,STACKTOP:u,STACK_MAX:Ta,tempDoublePtr:qb,ABORT:za,cttz_i8:Wc,ctlz_i8:Vc,NaN:NaN,Infinity:1/0,_stderr:nb,__ZTVN10__cxxabiv120__si_class_type_infoE:ob,__ZTVN10__cxxabiv117__class_type_infoE:pb,___progname:k},I);s._crypto_scrypt=V._crypto_scrypt;var ic=s._strlen=V._strlen,tc=s._free=V._free;s._realloc=V._realloc;var tb=s._memset=V._memset,Oa=s._malloc=V._malloc,sb=s._memcpy=V._memcpy;s._calloc=V._calloc;var mb=s.runPostSets=V.runPostSets;s.dynCall_vi=V.dynCall_vi,s.dynCall_vii=V.dynCall_vii,s.dynCall_ii=V.dynCall_ii,s.dynCall_viii=V.dynCall_viii,s.dynCall_v=V.dynCall_v,s.dynCall_iii=V.dynCall_iii;var qa=function(e){return V.stackAlloc(e)},ja=function(){return V.stackSave()},ka=function(e){V.stackRestore(e)},lc;function X(e,t){e!=m&&("number"==typeof e?this.p(e):t==m&&"string"!=typeof e?this.k(e,256):this.k(e,t))}function Yc(){return new X(m)}function Zc(e,t){var r=$c[e.charCodeAt(t)];return r==m?-1:r}function ad(e){var t=Yc();return t.D(e),t}function Y(e,t){this.h=0|e,this.j=0|t}Y.Ca={},Y.D=function(e){if(-128<=e&&128>e){var t=Y.Ca[e];if(t)return t}return t=new Y(0|e,0>e?-1:0),-128<=e&&128>e&&(Y.Ca[e]=t),t},Y.p=function(e){return isNaN(e)||!isFinite(e)?Y.ZERO:e<=-Y.Ea?Y.MIN_VALUE:e+1>=Y.Ea?Y.MAX_VALUE:0>e?Y.p(-e).i():new Y(e%Y.B|0,e/Y.B|0)},Y.v=function(e,t){return new Y(e,t)},Y.k=function(e,t){0==e.length&&g(Error("number format error: empty string"));var r=t||10;if((2>r||36o?(o=Y.p(Math.pow(r,o)),i=i.multiply(o).add(Y.p(s))):i=(i=i.multiply(n)).add(Y.p(s))}return i},Y.ea=65536,Y.Od=16777216,Y.B=Y.ea*Y.ea,Y.Pd=Y.B/2,Y.Qd=Y.B*Y.ea,Y.eb=Y.B*Y.B,Y.Ea=Y.eb/2,Y.ZERO=Y.D(0),Y.ONE=Y.D(1),Y.Da=Y.D(-1),Y.MAX_VALUE=Y.v(-1,2147483647),Y.MIN_VALUE=Y.v(0,-2147483648),Y.cb=Y.D(16777216),q=Y.prototype,q.Z=function(){return this.j*Y.B+this.ob()},q.toString=function(e){if((2>(e=e||10)||36a.length;)a="0"+a;n=""+a+n}},q.ob=function(){return 0<=this.h?this.h:Y.B+this.h},q.G=function(){return 0==this.j&&0==this.h},q.n=function(){return 0>this.j},q.Pa=function(){return 1==(1&this.h)},q.o=function(e){return this.j==e.j&&this.h==e.h},q.Ra=function(){return 0>this.ja(Y.cb)},q.qb=function(e){return 0>>16,n=65535&this.j,i=this.h>>>16,a=e.j>>>16,o=65535&e.j,s=e.h>>>16;return e=0+((t=(65535&this.h)+(65535&e.h)+0)>>>16),i=0+((e+=i+s)>>>16),n=(n=0+((i+=n+o)>>>16))+(r+a)&65535,Y.v((65535&e)<<16|65535&t,n<<16|65535&i)},q.R=function(e){return this.add(e.i())},q.multiply=function(e){if(this.G()||e.G())return Y.ZERO;if(this.o(Y.MIN_VALUE))return e.Pa()?Y.MIN_VALUE:Y.ZERO;if(e.o(Y.MIN_VALUE))return this.Pa()?Y.MIN_VALUE:Y.ZERO;if(this.n())return e.n()?this.i().multiply(e.i()):this.i().multiply(e).i();if(e.n())return this.multiply(e.i()).i();if(this.Ra()&&e.Ra())return Y.p(this.Z()*e.Z());var t,r,n,i,a=this.j>>>16,o=65535&this.j,s=this.h>>>16,f=65535&this.h,u=e.j>>>16,c=65535&e.j,l=e.h>>>16;return n=0+((i=0+f*(e=65535&e.h))>>>16),r=0+((n+=s*e)>>>16),r+=(n=(65535&n)+f*l)>>>16,n&=65535,t=0+((r+=o*e)>>>16),t+=(r=(65535&r)+s*l)>>>16,r&=65535,t+=(r+=f*c)>>>16,r&=65535,t=t+(a*e+o*l+s*c+f*u)&65535,Y.v(n<<16|65535&i,t<<16|r)},q.F=function(e){if(e.G()&&g(Error("division by zero")),this.G())return Y.ZERO;if(this.o(Y.MIN_VALUE)){if(e.o(Y.ONE)||e.o(Y.Da))return Y.MIN_VALUE;if(e.o(Y.MIN_VALUE))return Y.ONE;if((n=this.Db().F(e).shiftLeft(1)).o(Y.ZERO))return e.n()?Y.ONE:Y.Da;var t=this.R(e.multiply(n));return n.add(t.F(e))}if(e.o(Y.MIN_VALUE))return Y.ZERO;if(this.n())return e.n()?this.i().F(e.i()):this.i().F(e).i();if(e.n())return this.F(e.i()).i();var r=Y.ZERO;for(t=this;t.rb(e);){for(var n=Math.max(1,Math.floor(t.Z()/e.Z())),i=48>=(i=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,i-48),a=Y.p(n),o=a.multiply(e);o.n()||o.qb(t);)n-=i,o=(a=Y.p(n)).multiply(e);a.G()&&(a=Y.ONE),r=r.add(a),t=t.R(o)}return r},q.xb=function(){return Y.v(~this.h,~this.j)},q.shiftLeft=function(e){if(0==(e&=63))return this;var t=this.h;return 32>e?Y.v(t<>>32-e):Y.v(0,t<>>1|e<<31,e>>1)},q=X.prototype,q.ga=function(e,t,r,n){for(var i=0,a=0;0<=--n;){var o=e*this[i++]+t[r]+a;a=Math.floor(o/67108864);t[r++]=67108863&o}return a},q.f=26,q.u=67108863,q.K=67108864,q.bb=Math.pow(2,52),q.Aa=26,q.Ba=0;var $c=[],bd,Z;for(bd=48,Z=0;9>=Z;++Z)$c[bd++]=Z;for(bd=97,Z=10;36>Z;++Z)$c[bd++]=Z;for(bd=65,Z=10;36>Z;++Z)$c[bd++]=Z;q=X.prototype,q.copyTo=function(e){for(var t=this.b-1;0<=t;--t)e[t]=this[t];e.b=this.b,e.c=this.c},q.D=function(e){this.b=1,this.c=0>e?-1:0,0e?this[0]=e+DV:this.b=0},q.k=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.nb(e,t);r=2}this.c=this.b=0;for(var n=e.length,i=p,a=0;0<=--n;){var o=8==r?255&e[n]:Zc(e,n);0>o?"-"==e.charAt(n)&&(i=l):(i=p,0==a?this[this.b++]=o:a+r>this.f?(this[this.b-1]|=(o&(1<>this.f-a):this[this.b-1]|=o<=this.f&&(a-=this.f))}8==r&&0!=(128&e[0])&&(this.c=-1,0>i|s,s=(this[r]&a)<=this.b)t.b=0;else{var n=e%this.f,i=this.f-n,a=(1<>n;for(var o=r+1;o>n;0>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n-=e.c}t.c=0>n?-1:0,-1>n?t[r++]=this.K+n:0=n.b)){var i=this.abs();if(i.b>>16)&&(f=a,u+=16),0!=(a=f>>8)&&(f=a,u+=8),0!=(a=f>>4)&&(f=a,u+=4),0!=(a=f>>2)&&(f=a,u+=2),0!=f>>1&&(u+=1),0<(f=this.f-u)?(n.Qa(f,o),i.Qa(f,r)):(n.copyTo(o),i.copyTo(r)),0!=(i=o[(n=o.b)-1])){a=i*(1<>this.Ba:0),u=this.bb/a,a=(1<s&&X.ZERO.t(r,r)}}}},q.toString=function(e){if(0>this.c)return"-"+this.i().toString(e);if(16==e)e=4;else if(8==e)e=3;else if(2==e)e=1;else if(32==e)e=5;else{if(4!=e)return this.Fb(e);e=2}var t,r=(1<>o)&&(n=l,i="0123456789abcdefghijklmnopqrstuvwxyz".charAt(t));0<=a;)o>(o+=this.f-e)):(t=this[a]>>(o-=e)&r,0>=o&&(o+=this.f,--a)),0this.c?this.i():this},q.U=function(e){if(0!=(t=this.c-e.c))return t;var t,r=this.b;if(0!=(t=r-e.b))return 0>this.c?-t:t;for(;0<=--r;)if(0!=(t=this[r]-e[r]))return t;return 0},X.ZERO=ad(0),X.ONE=ad(1),q=X.prototype,q.nb=function(e,t){this.D(0),t==m&&(t=10);for(var r=this.S(t),n=Math.pow(t,r),i=p,a=0,o=0,s=0;sf?"-"==e.charAt(s)&&0==this.ra()&&(i=l):(o=t*o+f,++a>=r&&(this.Ia(n),this.Ha(o),o=a=0))}0this.c?-1:0>=this.b||1==this.b&&0>=this[0]?0:1},q.Ia=function(e){this[this.b]=this.ga(e-1,this,0,this.b),++this.b,this.C()},q.Ha=function(e){var t=0;if(0!=e){for(;this.b<=t;)this[this.b++]=0;for(this[t]+=e;this[t]>=this.K;)this[t]-=this.K,++t>=this.b&&(this[this.b++]=0),++this[t]}},q.Fb=function(e){if(e==m&&(e=10),0==this.ra()||2>e||36this.c){if(1==this.b)return this[0]-this.K;if(0==this.b)return-1}else{if(1==this.b)return this[0];if(0==this.b)return 0}return(this[1]&(1<<32-this.f)-1)<>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n+=e.c}t.c=0>n?-1:0,0n&&(t[r++]=this.K+n),t.b=r,t.C()};var $={abs:function(e,t){var r=(r=new Y(e,t)).n()?r.i():r;B[qb>>2]=r.h,B[qb+4>>2]=r.j},Ka:function(){$.kb||($.kb=l,$.Xa=new X,$.Xa.k("4294967296",10),$.sa=new X,$.sa.k("18446744073709551616",10),$.xe=new X,$.ye=new X)},me:function(e,t){var r=new X;r.k(t.toString(),10);var n=new X;r.vb(n),(r=new X).k(e.toString(),10);var i=new X;return r.fa(n,i),i},stringify:function(e,t,r){return e=new Y(e,t).toString(),r&&"-"==e[0]&&($.Ka(),(r=new X).k(e,10),e=new X,$.sa.fa(r,e),e=e.toString(10)),e},k:function(e,t,r,n,i){$.Ka();var a=new X;a.k(e,t),(e=new X).k(r,10),(r=new X).k(n,10),i&&0>a.U(X.ZERO)&&(n=new X,a.fa($.sa,n),a=n),n=p,0>a.U(e)?(a=e,n=l):0>2]=a.h,B[qb+4>>2]=a.j,n&&g("range error")}},cd,dd;function lb(e){function t(){if(ab||(ab=l,Va(Xa)),Va(Ya),gb=l,s._main&&kb&&s.callMain(e),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)cb(s.postRun.shift());Va($a)}if(e=e||s.arguments,0e;e++)i.push(0)}w(0==L,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),w(0==Wa.length,"cannot call main when preRun functions remain to be called"),e=e||[],ab||(ab=l,Va(Xa));var r,n=e.length+1,i=[F(J("/bin/this.program"),"i8",Ka)];t();for(var a=0;a>4&15]),t.push("0123456789abcdef"[15&e[r]]);return t.join("")},e.crypto_scrypt=function(e,t,r,a,o,s){var f=new i(s),u=n(e),c=n(t);return function(e,t){if(0!==t)throw{message:"scrypt_raw."+e+" signalled an error"}}("_crypto_scrypt",scrypt_raw._crypto_scrypt(u,e.length,c,t.length,r,0,a,o,f.address,f.length)),function(e){for(var t=0;t=e)&&(n=e-1,console.error("invalid priority: "+a+" must be between 0 and "+n))),t[n].push(r)},n.dequeue=function(e){var r,n=null,a=t.length;for(i=null,r=0;rc.length);e+=1)l>=(s=o[e].timeout)&&(h("removeIdle() destroying obj - now:"+l+" timeout:"+s,"verbose"),c.push(o[e].obj));for(e=0,i=c.length;e0?(h("availableObjects.length="+n,"verbose"),p()):h("removeIdle() all objects removed","verbose")}function p(){u||(u=!0,c=setTimeout(d,i))}function b(){var e=null,n=s.size();if(h("dispense() clients="+n+" available="+o.length,"info"),n>0){for(;o.length>0;){if(h("dispense() - reusing obj","verbose"),e=o[0],t.validate(e.obj))return o.shift(),s.dequeue()(null,e.obj);r.destroy(e.obj)}f1?(t=arguments[0],n=arguments[1]):(t=arguments[0]instanceof Error?arguments[0]:null,n=arguments[0]instanceof Error?null:arguments[0]),t?(f-=1,i&&i(t,n),e.nextTick(function(){b()})):i?i(t,n):r.release(n)})}function m(){var e,r;if(!l&&f0?setTimeout(t,100):o.length!=f?setTimeout(t,100):e&&e()};t()},r.destroyAllNow=function(e){h("force destroying all objects","info");var t=o;o=[];for(var n=t.shift();null!==n&&void 0!==n;)r.destroy(n.obj),n=t.shift();u=!1,clearTimeout(c),e&&e()},r.pooled=function(e,t){return function(){var n=arguments,i=n[n.length-1],a="function"==typeof i;r.acquire(function(t,o){if(t)a&&i(t);else{var s=[o].concat(Array.prototype.slice.call(n,0,a?-1:void 0));s.push(function(){r.release(o),a&&i.apply(null,arguments)}),e.apply(null,s)}},t)}},r.getPoolSize=function(){return f},r.getName=function(){return t.name},r.availableObjectsCount=function(){return o.length},r.waitingClientsCount=function(){return s.size()},m(),r}}).call(this,r(9))},function(e,t,r){(function(t,n,i){var a=r(56),o=r(20).fork,s=r(102),f=r(101).cpus().length,u=u=new s.Pool({name:"scrypt-worker",create:function(e){var r=o(t+"/scrypt-async-worker.js");r.controlledExit=!1,r.on("exit",function(){r.controlledExit||n(u.destroy.bind(u,r))}),e(r)},destroy:function(e){try{e.controlledExit=!0,e.disconnect()}catch(e){}},max:Math.max(2,f-1),min:0,idleTimeoutMillis:15e3,log:!1});e.exports=function(e,t,r,n){var o=a.apply(null,arguments),s=o.callback||function(){};delete o.callback,o.password=o.password.toString("base64"),o.salt=o.salt.toString("base64");new Date;u.acquire(function(e,t){if(e)return u.release(t),s(e);t.once("message",function(e){new Date;u.release(t),e.error&&s(e.error),s(null,new i(e.data,"base64"))}),t.send(o)})}}).call(this,"/",r(37).setImmediate,r(7).Buffer)},function(e,t,r){e.exports={hash:r(103),hashSync:r(100)}},function(e,t,r){var n;e.exports=(n=r(5),r(31),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){var n,i;e.exports=(n=r(5),r(31),n.mode.ECB=((i=n.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),n.mode.ECB)},function(e,t,r){var n,i,a,o,s,f,u;e.exports=(n=r(5),a=(i=n).lib,o=a.Base,s=i.enc,f=s.Utf8,u=i.algo,void(u.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=f.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,s=a.words,u=0;u>>31}var l=(n<<5|n>>>27)+s+f[u];l+=u<20?1518500249+(i&a|~i&o):u<40?1859775393+(i^a^o):u<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=s._createHelper(u),i.HmacSHA1=s._createHmacHelper(u),n.SHA1)},function(e,t,r){var n;e.exports=(n=r(5),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var f=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],f=e[t+1],d=e[t+2],p=e[t+3],b=e[t+4],v=e[t+5],m=e[t+6],g=e[t+7],y=e[t+8],w=e[t+9],_=e[t+10],S=e[t+11],k=e[t+12],x=e[t+13],A=e[t+14],M=e[t+15],E=a[0],T=a[1],I=a[2],P=a[3];T=h(T=h(T=h(T=h(T=l(T=l(T=l(T=l(T=c(T=c(T=c(T=c(T=u(T=u(T=u(T=u(T,I=u(I,P=u(P,E=u(E,T,I,P,o,7,s[0]),T,I,f,12,s[1]),E,T,d,17,s[2]),P,E,p,22,s[3]),I=u(I,P=u(P,E=u(E,T,I,P,b,7,s[4]),T,I,v,12,s[5]),E,T,m,17,s[6]),P,E,g,22,s[7]),I=u(I,P=u(P,E=u(E,T,I,P,y,7,s[8]),T,I,w,12,s[9]),E,T,_,17,s[10]),P,E,S,22,s[11]),I=u(I,P=u(P,E=u(E,T,I,P,k,7,s[12]),T,I,x,12,s[13]),E,T,A,17,s[14]),P,E,M,22,s[15]),I=c(I,P=c(P,E=c(E,T,I,P,f,5,s[16]),T,I,m,9,s[17]),E,T,S,14,s[18]),P,E,o,20,s[19]),I=c(I,P=c(P,E=c(E,T,I,P,v,5,s[20]),T,I,_,9,s[21]),E,T,M,14,s[22]),P,E,b,20,s[23]),I=c(I,P=c(P,E=c(E,T,I,P,w,5,s[24]),T,I,A,9,s[25]),E,T,p,14,s[26]),P,E,y,20,s[27]),I=c(I,P=c(P,E=c(E,T,I,P,x,5,s[28]),T,I,d,9,s[29]),E,T,g,14,s[30]),P,E,k,20,s[31]),I=l(I,P=l(P,E=l(E,T,I,P,v,4,s[32]),T,I,y,11,s[33]),E,T,S,16,s[34]),P,E,A,23,s[35]),I=l(I,P=l(P,E=l(E,T,I,P,f,4,s[36]),T,I,b,11,s[37]),E,T,g,16,s[38]),P,E,_,23,s[39]),I=l(I,P=l(P,E=l(E,T,I,P,x,4,s[40]),T,I,o,11,s[41]),E,T,p,16,s[42]),P,E,m,23,s[43]),I=l(I,P=l(P,E=l(E,T,I,P,w,4,s[44]),T,I,k,11,s[45]),E,T,M,16,s[46]),P,E,d,23,s[47]),I=h(I,P=h(P,E=h(E,T,I,P,o,6,s[48]),T,I,g,10,s[49]),E,T,A,15,s[50]),P,E,v,21,s[51]),I=h(I,P=h(P,E=h(E,T,I,P,k,6,s[52]),T,I,p,10,s[53]),E,T,_,15,s[54]),P,E,f,21,s[55]),I=h(I,P=h(P,E=h(E,T,I,P,y,6,s[56]),T,I,M,10,s[57]),E,T,m,15,s[58]),P,E,x,21,s[59]),I=h(I,P=h(P,E=h(E,T,I,P,b,6,s[60]),T,I,S,10,s[61]),E,T,d,15,s[62]),P,E,w,21,s[63]),a[0]=a[0]+E|0,a[1]=a[1]+T|0,a[2]=a[2]+I|0,a[3]=a[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var a=e.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,u=0;u<4;u++){var c=f[u];f[u]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<>>32-a)+t}function c(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<>>32-a)+t}function h(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(f),t.HmacMD5=a._createHmacHelper(f)}(Math),n.MD5)},function(e,t,r){var n,i,a;e.exports=(n=r(5),a=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var f=n.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-o%4*2;n[i>>>2]|=(s|f)<<24-i%4*8,i++}return a.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},function(e,t,r){var n;e.exports=(n=r(5),r(110),r(109),r(57),r(31),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],f=[],u=[],c=[],l=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,a[p]=r;var b=e[r],v=e[b],m=e[v],g=257*e[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,u[r]=g,g=16843009*m^65537*v^257*b^16843008*r,c[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,h[p]=g<<8|g>>>24,d[p]=g,r?(r=b^e[e[e[m^b]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],b=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o6&&o%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[o/r|0]<<24),a[o]=a[o-r]^s}for(var f=this._invKeySchedule=[],u=0;u>>24]]^l[i[s>>>16&255]]^h[i[s>>>8&255]]^d[i[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,f,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,c,l,h,d,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var f=this._nRounds,u=e[t]^r[0],c=e[t+1]^r[1],l=e[t+2]^r[2],h=e[t+3]^r[3],d=4,p=1;p>>24]^i[c>>>16&255]^a[l>>>8&255]^o[255&h]^r[d++],v=n[c>>>24]^i[l>>>16&255]^a[h>>>8&255]^o[255&u]^r[d++],m=n[l>>>24]^i[h>>>16&255]^a[u>>>8&255]^o[255&c]^r[d++],g=n[h>>>24]^i[u>>>16&255]^a[c>>>8&255]^o[255&l]^r[d++];u=b,c=v,l=m,h=g}b=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[d++],v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[d++],m=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^r[d++],g=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[d++],e[t]=b,e[t+1]=v,e[t+2]=m,e[t+3]=g},keySize:8});e.AES=t._createHelper(b)}(),n.AES)},function(e,t,r){var n;e.exports=(n=r(5),n.enc.Latin1)},function(e,t){},function(e,t,r){(function(n,i){var a;!function(o){"use strict";function s(e,t){if(t=t||{type:"Array"},void 0!==n&&"number"==typeof n.pid)return function(e,t){var n=r(113).randomBytes(e);switch(t.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(e),a=0;a0||e===t?t:t-1}function w(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(f=i.length)<(u=a.length)?f:u,o=0;oa[o]^r?1:-1;return f==u?0:f>u^r?1:-1}function S(e,t,r){return(e=E(e))>=t&&e<=r}function k(e){return"[object Array]"==Object.prototype.toString.call(e)}function x(e,t,r){for(var n,i,a=[0],o=0,s=e.length;or-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function M(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t15&&J(R,l,e),s=!1):d.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=X(c,10,t,d.s)}else{if(e instanceof W)return d.s=e.s,d.e=e.e,d.c=(e=e.c)?e.slice():e,void(R=0);if((s="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;a>=10;a/=10,i++);return d.e=i,d.c=[e],void(R=0)}c=e+""}else{if(!o.test(c=e+""))return n(d,c,s);d.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((i=c.indexOf("."))>-1&&(c=c.replace(".","")),(a=c.search(/e/i))>0?(i<0&&(i=a),i+=+c.slice(a+1),c=c.substring(0,a)):i<0&&(i=c.length),a=0;48===c.charCodeAt(a);a++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(a,u+1))if(u=c.length,s&&U&&u>15&&(e>b||e!==f(e))&&J(R,l,d.s*e),(i=i-a-1)>H)d.c=d.e=null;else if(i=0&&(s=Y,Y=0,e=e.replace(".",""),u=(l=new W(n)).pow(e.length-d),Y=s,l.c=x(M(w(u.c),u.e),10,t),l.e=l.c.length),o=s=(c=x(e,n,t)).length;0==c[--s];c.pop());if(!c[0])return"0";if(d<0?--o:(u.c=c,u.e=o,u.s=i,c=(u=r(u,l,p,b,t)).c,f=u.r,o=u.e),d=c[a=o+p+1],s=t/2,f=f||a<0||null!=c[a+1],f=b<4?(null!=d||f)&&(0==b||b==(u.s<0?3:2)):d>s||d==s&&(4==b||f||6==b&&1&c[a-1]||b==(u.s<0?8:7)),a<1||!c[0])e=f?M("1",-p):"0";else{if(c.length=a,f)for(--t;++c[--a]>t;)c[a]=0,a||(++o,c=[1].concat(c));for(s=c.length;!c[--s];);for(d=0,e="";d<=s;e+=h.charAt(c[d++]));e=M(e,o)}return e}function Z(e,t,r,n){var i,a,o,s,f;if(r=null!=r&&D(r,0,8,n,c)?0|r:N,!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)f=w(e.c),f=19==n||24==n&&o<=L?A(f,o):M(f,o);else if(a=(e=ee(new W(e),t,r)).e,s=(f=w(e.c)).length,19==n||24==n&&(t<=a||a<=L)){for(;ss){if(--t>0)for(f+=".";t--;f+="0");}else if((t+=a-s)>0)for(a+1==s&&(f+=".");t--;f+="0");return e.s<0&&i?"-"+f:f}function G(e,t){var r,n,i=0;for(k(e[0])&&(e=e[0]),r=new W(e[0]);++ir||e!=E(e))&&J(n,(i||"decimal places")+(er?" out of range":" not an integer"),e),!0}function $(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*p-1)>H?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=p,o=t,h=(c=b[l=0])/m[i-o-1]%10|0;else if((l=s((a+1)/p))>=b.length){if(!n)break e;for(;b.length<=l;b.push(0));c=h=0,i=1,o=(a%=p)-p+1}else{for(c=u=b[l],i=1;u>=10;u/=10,i++);h=(o=(a%=p)-p+i)<0?0:c/m[i-o-1]%10|0}if(n=n||t<0||null!=b[l+1]||(o<0?c:c%m[i-o-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(a>0?o>0?c/m[i-o]:0:b[l-1])%10&1||r==(e.s<0?8:7)),t<1||!b[0])return b.length=0,n?(t-=e.e+1,b[0]=m[(p-t%p)%p],e.e=-t||0):b[0]=e.e=0,e;if(0==a?(b.length=l,u=1,l--):(b.length=l+1,u=m[p-a],b[l]=o>0?f(c/m[i-o]%m[o])*u:0),n)for(;;){if(0==l){for(a=1,o=b[0];o>=10;o/=10,a++);for(o=b[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,b[0]==d&&(b[0]=1));break}if(b[l]+=u,b[l]!=d)break;b[l--]=0,u=1}for(a=b.length;0===b[--a];b.pop());}e.e>H?e.c=e.e=null:e.er)return null!=(e=i[r++])};return o(t="DECIMAL_PLACES")&&D(e,0,g,2,t)&&(j=0|e),n[t]=j,o(t="ROUNDING_MODE")&&D(e,0,8,2,t)&&(N=0|e),n[t]=N,o(t="EXPONENTIAL_AT")&&(k(e)?D(e[0],-g,0,2,t)&&D(e[1],0,g,2,t)&&(L=0|e[0],F=0|e[1]):D(e,-g,g,2,t)&&(L=-(F=0|(e<0?-e:e)))),n[t]=[L,F],o(t="RANGE")&&(k(e)?D(e[0],-g,-1,2,t)&&D(e[1],1,g,2,t)&&(z=0|e[0],H=0|e[1]):D(e,-g,g,2,t)&&(0|e?z=-(H=0|(e<0?-e:e)):U&&J(2,t+" cannot be zero",e))),n[t]=[z,H],o(t="ERRORS")&&(e===!!e||1===e||0===e?(R=0,D=(U=!!e)?Q:S):U&&J(2,t+u,e)),n[t]=U,o(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?q=!0:U?J(2,"crypto unavailable",e?void 0:crypto):q=!1:q=!1:U&&J(2,t+u,e)),n[t]=q,o(t="MODULO_MODE")&&D(e,0,9,2,t)&&(K=0|e),n[t]=K,o(t="POW_PRECISION")&&D(e,0,g,2,t)&&(Y=0|e),n[t]=Y,o(t="FORMAT")&&("object"==typeof e?V=e:U&&J(2,t+" not an object",e)),n[t]=V,n},W.max=function(){return G(arguments,C.lt)},W.min=function(){return G(arguments,C.gt)},W.random=(i=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,o,u=0,c=[],l=new W(B);if(e=null!=e&&D(e,0,g,14)?0|e:j,a=s(e/p),q)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(c.push(o%1e14),u+=2);u=a/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(a*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(c.push(o%1e14),u+=7);u=a/7}else q=!1,U&&J(14,"crypto unavailable",crypto);if(!q)for(;u=10;o/=10,u++);un?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,c,l,h,b,v,m,g,w,_,S,k,x,A,M,E,T,I=n.s==i.s?1:-1,P=n.c,O=i.c;if(!(P&&P[0]&&O&&O[0]))return new W(n.s&&i.s&&(P?!O||P[0]!=O[0]:O)?P&&0==P[0]||!O?0*I:I/0:NaN);for(w=(g=new W(I)).c=[],I=a+(c=n.e-i.e)+1,s||(s=d,c=y(n.e/p)-y(i.e/p),I=I/p|0),l=0;O[l]==(P[l]||0);l++);if(O[l]>(P[l]||0)&&c--,I<0)w.push(1),h=!0;else{for(A=P.length,E=O.length,l=0,I+=2,(b=f(s/(O[0]+1)))>1&&(O=e(O,b,s),P=e(P,b,s),E=O.length,A=P.length),x=E,S=(_=P.slice(0,E)).length;S=s/2&&M++;do{if(b=0,(u=t(O,_,E,S))<0){if(k=_[0],E!=S&&(k=k*s+(_[1]||0)),(b=f(k/M))>1)for(b>=s&&(b=s-1),m=(v=e(O,b,s)).length,S=_.length;1==t(v,_,m,S);)b--,r(v,E=10;I/=10,l++);ee(g,a+(g.e=l+c*p-1)+1,o,h)}else g.e=c,g.r=+h;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,I=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(P.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(T,"$1").replace(I,"0.$1")),t!=o))return new W(o,i);U&&J(R,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,R=0},C.absoluteValue=C.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},C.ceil=function(){return ee(new W(this),this.e+1,2)},C.comparedTo=C.cmp=function(e,t){return R=1,_(this,new W(e,t))},C.decimalPlaces=C.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-y(this.e/p))*p,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},C.dividedBy=C.div=function(e,t){return R=3,r(this,new W(e,t),j,N)},C.dividedToIntegerBy=C.divToInt=function(e,t){return R=4,r(this,new W(e,t),0,1)},C.equals=C.eq=function(e,t){return R=5,0===_(this,new W(e,t))},C.floor=function(){return ee(new W(this),this.e+1,3)},C.greaterThan=C.gt=function(e,t){return R=6,_(this,new W(e,t))>0},C.greaterThanOrEqualTo=C.gte=function(e,t){return R=7,1===(t=_(this,new W(e,t)))||0===t},C.isFinite=function(){return!!this.c},C.isInteger=C.isInt=function(){return!!this.c&&y(this.e/p)>this.c.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.lessThan=C.lt=function(e,t){return R=8,_(this,new W(e,t))<0},C.lessThanOrEqualTo=C.lte=function(e,t){return R=9,-1===(t=_(this,new W(e,t)))||0===t},C.minus=C.sub=function(e,t){var r,n,i,a,o=this,s=o.s;if(R=10,t=(e=new W(e,t)).s,!s||!t)return new W(NaN);if(s!=t)return e.s=-t,o.plus(e);var f=o.e/p,u=e.e/p,c=o.c,l=e.c;if(!f||!u){if(!c||!l)return c?(e.s=-t,e):new W(l?o:NaN);if(!c[0]||!l[0])return l[0]?(e.s=-t,e):new W(c[0]?o:3==N?-0:0)}if(f=y(f),u=y(u),c=c.slice(),s=f-u){for((a=s<0)?(s=-s,i=c):(u=f,i=l),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=c.length)<(t=l.length))?s:t,s=t=0;t0)for(;t--;c[r++]=0);for(t=d-1;n>s;){if(c[--n]0?(o=a,r=f):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=f.length)<0&&(r=f,f=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+f[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++o),$(e,s,o)},C.precision=C.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(U&&J(13,"argument"+u,e),e!=!!e&&(e=null)),!i)return null;if(t=(r=i.length-1)*p+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},C.round=function(e,t){var r=new W(this);return(null==e||D(e,0,g,15))&&ee(r,~~e+this.e+1,null!=t&&D(t,0,8,15,c)?0|t:N),r},C.shift=function(e){var t=this;return D(e,-b,b,16,"argument")?t.times("1e"+E(e)):new W(t.c&&t.c[0]&&(e<-b||e>b)?t.s*(e<0?0:1/0):t)},C.squareRoot=C.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,f=o.s,u=o.e,c=j+4,l=new W("0.5");if(1!==f||!s||!s[0])return new W(!f||f<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(f=Math.sqrt(+o))||f==1/0?(((t=w(s)).length+u)%2==0&&(t+="0"),f=Math.sqrt(t),u=y((u+1)/2)-(u<0||u%2),n=new W(t=f==1/0?"1e"+u:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new W(f+""),n.c[0])for((f=(u=n.e)+c)<3&&(f=0);;)if(a=n,n=l.times(a.plus(r(o,a,c,1))),w(a.c).slice(0,f)===(t=w(n.c)).slice(0,f)){if(n.e=0;){for(r=0,h=k[i]%w,b=k[i]/w|0,a=i+(o=f);a>i;)r=((u=h*(u=S[--o]%w)+(s=b*u+(c=S[o]/w|0)*h)%w*w+v[a]+r)/g|0)+(s/w|0)+b*c,v[a--]=u%g;v[a]=r}return r?++n:v.splice(0,1),$(e,v,n)},C.toDigits=function(e,t){var r=new W(this);return e=null!=e&&D(e,1,g,18,"precision")?0|e:null,t=null!=t&&D(t,0,8,18,c)?0|t:N,e?ee(r,e,t):r},C.toExponential=function(e,t){return Z(this,null!=e&&D(e,0,g,19)?1+~~e:null,t,19)},C.toFixed=function(e,t){return Z(this,null!=e&&D(e,0,g,20)?~~e+this.e+1:null,t,20)},C.toFormat=function(e,t){var r=Z(this,null!=e&&D(e,0,g,21)?~~e+this.e+1:null,t,21);if(this.c){var n,i=r.split("."),a=+V.groupSize,o=+V.secondaryGroupSize,s=V.groupSeparator,f=i[0],u=i[1],c=this.s<0,l=c?f.slice(1):f,h=l.length;if(o&&(n=a,a=o,o=n,h-=n),a>0&&h>0){for(n=h%a||a,f=l.substr(0,n);n0&&(f+=s+l.slice(n)),c&&(f="-"+f)}r=u?f+V.decimalSeparator+((o=+V.fractionGroupSize)?u.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+V.fractionGroupSeparator):u):f}return r},C.toFraction=function(e){var t,n,i,a,o,s,f,u,c,l=U,h=this,d=h.c,b=new W(B),m=n=new W(B),g=f=new W(B);if(null!=e&&(U=!1,s=new W(e),U=l,(l=s.isInt())&&!s.lt(B)||(U&&J(22,"max denominator "+(l?"out of range":"not an integer"),e),e=!l&&s.c&&ee(s,s.e+1,1).gte(B)?s:null)),!d)return h.toString();for(c=w(d),a=b.e=c.length-h.e-1,b.c[0]=v[(o=a%p)<0?p+o:o],e=!e||s.cmp(b)>0?a>0?b:m:s,o=H,H=1/0,s=new W(c),f.c[0]=0;u=r(s,b,0,1),1!=(i=n.plus(u.times(g))).cmp(e);)n=g,g=i,m=f.plus(u.times(i=m)),f=i,b=s.minus(u.times(i=b)),s=i;return i=r(e.minus(n),g,0,1),f=f.plus(i.times(m)),n=n.plus(i.times(g)),f.s=m.s=h.s,t=r(m,g,a*=2,N).minus(h).abs().cmp(r(f,n,a,N).minus(h).abs())<1?[m.toString(),g.toString()]:[f.toString(),n.toString()],H=o,t},C.toNumber=function(){return+this},C.toPower=C.pow=function(e,t){var r,n,i,a=f(e<0?-e:+e),o=this;if(null!=t&&(R=23,t=new W(t)),!D(e,-b,b,23,"exponent")&&(!isFinite(e)||a>b&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+o,e),new W(t?r%t:r);for(t?e>1&&o.gt(B)&&o.isInt()&&t.gt(B)&&t.isInt()?o=o.mod(t):(i=t,t=null):Y&&(r=s(Y/p+2)),n=new W(B);;){if(a%2){if(!(n=n.times(o)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(a=f(a/2)))break;o=o.times(o),r?o.c&&o.c.length>r&&(o.c.length=r):t&&(o=o.mod(t))}return t?n:(e<0&&(n=B.div(n)),i?n.mod(i):r?ee(n,Y,N):n)},C.toPrecision=function(e,t){return Z(this,null!=e&&D(e,1,g,24,"precision")?0|e:null,t,24)},C.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=w(r.c),t=null!=e&&D(e,2,64,25,"base")?X(M(t,i),0|e,10,n):i<=L||i>=F?A(t,i):M(t,i),n<0&&r.c[0]&&(t="-"+t)),t},C.truncated=C.trunc=function(){return ee(new W(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=w(t.c),e=r<=L||r>=F?A(e,r):M(e,r),t.s<0?"-"+e:e)},C.isBigNumber=!0,null!=t&&W.config(t),W}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n;e.exports=(n=r(5), /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. @@ -16,11 +16,11 @@ var n=r(167),i=r(166),a=r(74);function o(){return f.TYPED_ARRAY_SUPPORT?21474836 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([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]),f=i.create([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]),u=i.create([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]),c=i.create([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]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,h,w,_,S,k,x,A,M,E,T=this._hash.words,I=l.words,P=d.words,O=s.words,R=f.words,C=u.words,B=c.words;for(S=a=T[0],k=o=T[1],x=h=T[2],A=w=T[3],M=_=T[4],r=0;r<80;r+=1)E=a+e[t+O[r]]|0,E+=r<16?p(o,h,w)+I[0]:r<32?b(o,h,w)+I[1]:r<48?v(o,h,w)+I[2]:r<64?m(o,h,w)+I[3]:g(o,h,w)+I[4],E=(E=y(E|=0,C[r]))+_|0,a=_,_=w,w=y(h,10),h=o,o=E,E=S+e[t+R[r]]|0,E+=r<16?g(k,x,A)+P[0]:r<32?m(k,x,A)+P[1]:r<48?v(k,x,A)+P[2]:r<64?b(k,x,A)+P[3]:p(k,x,A)+P[4],E=(E=y(E|=0,B[r]))+M|0,S=M,M=A,A=y(x,10),x=k,k=E;E=T[1]+h+A|0,T[1]=T[2]+w+M|0,T[2]=T[3]+_+S|0,T[3]=T[4]+a+k|0,T[4]=T[0]+o+x|0,T[0]=E},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function b(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function y(e,t){return e<>>32-t}t.RIPEMD160=a._createHelper(h),t.HmacRIPEMD160=a._createHmacHelper(h)}(Math),n.RIPEMD160)},function(e,t,r){"use strict";var n=r(11),i=r(7).utils,a=i.assert,o=i.cachedProperty,s=i.parseBytes;function f(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=f},function(e,t,r){"use strict";var n=r(7).utils,i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(34),i=r(7),a=i.utils,o=a.assert,s=a.parseBytes,f=r(119),u=r(118);function c(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:a})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=s(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=s(e,r);if(e.length!==f+r.place)return!1;var u=e.slice(r.place,f+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new n(o),this.s=new n(u),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var a=n.concat(r),o=[48];return u(o,a.length),o=o.concat(a),i.encode(o,e)}},function(e,t,r){"use strict";var n=r(11),i=r(7).utils.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},function(e,t,r){"use strict";var n=r(34),i=r(64),a=r(13);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),c=new i({hash:this.hash,entropy:s,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new n(1)),d=0;;d++){var h=a.k?a.k(d):new n(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var m=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new f({r:v,s:m,recoveryParam:g})}}}}}},u.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var a=(t=new f(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,u=o.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},u.prototype.recoverPubKey=function(e,t,r,i){o((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var a=this.n,s=new n(e),u=t.r,c=t.s,l=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var h=t.r.invm(a),p=a.sub(s).mul(h).umod(a),b=c.mul(h).umod(a);return this.g.mulAdd(p,u,b)},u.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),f=i.redMul(o),u=a.redMul(s),c=i.redMul(s),l=o.redMul(a);return this.curve.point(f,u,l,c)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(u=this.curve._mulA(i)).redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(u.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=n.redSub(i).redISub(a).redMul(f),t=o.redMul(u.redSub(a)),r=o.redMul(f)}}else{var u=i.redAdd(a);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=u.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(u)).redMul(f),t=this.curve._mulC(u).redMul(i.redISub(a)),r=u.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=a.redMul(o),c=s.redMul(f),l=a.redMul(f),d=o.redMul(s);return this.curve.point(u,c,d,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(u)):(t=n.redMul(u).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(u)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";var n=r(24),i=r(11),a=r(1),o=n.base,s=r(7).utils;function f(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(f,o),e.exports=f,f.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(u,o.BasePoint),f.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},f.prototype.point=function(e,t){return new u(this,e,t)},f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(24),i=r(7),a=r(11),o=r(1),s=n.base,f=i.utils.assert;function u(e){s.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],f(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,f,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),m=new a(1),g=0;0!==d.cmpn(0);){var y=h.div(d);u=h.sub(y.mul(d)),c=v.sub(y.mul(p));var w=m.sub(y.mul(b));if(!n&&u.cmp(l)<0)t=f.neg(),r=p,n=u.neg(),i=c;else if(n&&2==++g)break;f=u,h=d,d=u,v=p,p=c,m=b,b=w}o=u.neg(),s=c;var _=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(_)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),f=i.mul(r.b),u=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:f.add(u).neg()}},u.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=n.redMul(u),d=f.redSqr().redIAdd(c).redISub(l).redISub(l),h=f.redMul(l.redISub(d)).redISub(a.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),c=r.redMul(f),l=s.redSqr().redIAdd(u).redISub(c).redISub(c),d=s.redMul(c.redISub(l)).redISub(i.redMul(u)),h=this.z.redMul(o);return this.curve.jpoint(l,d,h)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(11),i=r(7).utils,a=i.getNAF,o=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<=f;t--)u=(u<<1)+n[t];o.push(u)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(f=0;f=0;u--){for(t=0;u>=0&&0===o[u];u--)t++;if(u>=0&&t++,f=f.dblp(t),u<0)break;var c=o[u];s(0!==c),f="affine"===e.type?c>0?f.mixedAdd(i[c-1>>1]):f.mixedAdd(i[-c-1>>1].neg()):c>0?f.add(i[c-1>>1]):f.add(i[-c-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,u=this._wnafT3,c=0,l=0;l=1;l-=2){var h=l-1,p=l;if(1===s[h]&&1===s[p]){var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],m=o(r[h],r[p]);c=Math.max(m[0].length,c),u[h]=new Array(c),u[p]=new Array(c);for(var g=0;g=0;l--){for(var k=0;l>=0;){var x=!0;for(g=0;g=0&&k++,_=_.dblp(k),l<0)break;for(g=0;g0?A=f[g][M-1>>1]:M<0&&(A=f[g][-M-1>>1].neg()),_="affine"===A.type?_.mixedAdd(A):_.add(A))}}for(l=0;l=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,f=1;f0||t.cmpn(-i)>0;){var a,o,s,f=e.andln(3)+n&3,u=t.andln(3)+i&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==u?f:-f,r[0].push(a),o=0==(1&u)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?u:-u,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e){e.exports={_from:"elliptic@^6.4.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.4.0",saveSpec:null,fetchSpec:"^6.4.0"},_requiredBy:["/","/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.4.0",_where:"C:\\Users\\JunXiang\\Desktop\\neon-js",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},function(e,t,r){var n=r(4).Buffer;e.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),a=0;a>=8;for(;u>0;)a.push(255&u),u>>=8}for(var c=0;e[c]===i&&c0;)n.push(s%r),s=s/r|0}for(var f="",u=0;0===t[u]&&u=0;--c)f+=e[n[c]];return f},decodeUnsafe:s,decode:function(e){var t=s(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";var n=r(35),i=r(4).Buffer;e.exports=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return n.encode(i.concat([t,r],t.length+4))},decode:function(e){var r=t(n.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=n.decodeUnsafe(e);if(r)return t(r)}}}},function(e,t,r){var n=r(4).Buffer,i=r(72).Transform,a=r(36).StringDecoder;function o(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1)(o,i),o.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=o},function(e,t,r){var n=r(1),i=r(66),a=r(18),o=r(4).Buffer,s=new Array(160);function f(){this.init(),this._w=s,a.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t,r){var n=r(1),i=r(67),a=r(18),o=r(4).Buffer,s=new Array(64);function f(){this.init(),this._w=s,a.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+l(p,i,a,s)+f+r[h]+o[p]|0;f=s,s=a,a=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+c(h,i,a,s)+f+r[d]+o[h];f=s,s=a,a=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(148),t.sha1=r(147),t.sha224=r(146),t.sha256=r(67),t.sha384=r(145),t.sha512=r(66)},function(e,t,r){e.exports=r(39).PassThrough},function(e,t,r){e.exports=r(39).Transform},function(e,t,r){e.exports=r(14)},function(e,t,r){e.exports=r(38)},function(e,t,r){"use strict";e.exports=a;var n=r(68),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r(1),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(15))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,o,s,f=1,u={},c=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){a.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,a=n.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=a,i=s,t.copy(r,i),s+=o.data.length,o=o.next;return a},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";(function(t){var n=r(72).Transform;function i(e){n.call(this),this._block=new t(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(i,n),i.prototype._transform=function(e,r,n){var i=null;try{"buffer"!==r&&(e=new t(e,r)),this.update(e)}catch(e){i=e}n(i)},i.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,r){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");t.isBuffer(e)||(e=new t(e,r||"binary"));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i}).call(this,r(5).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(160);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function o(e,t){return e<>>32-t}function s(e,t,r,n,i,a,s,f){return o(e+(t^r^n)+a+s|0,f)+i|0}function f(e,t,r,n,i,a,s,f){return o(e+(t&r|~t&n)+a+s|0,f)+i|0}function u(e,t,r,n,i,a,s,f){return o(e+((t|~r)^n)+a+s|0,f)+i|0}function c(e,t,r,n,i,a,s,f){return o(e+(t&n|r&~n)+a+s|0,f)+i|0}function l(e,t,r,n,i,a,s,f){return o(e+(t^(r|~n))+a+s|0,f)+i|0}n(a,i),a.prototype._update=function(){for(var e=new Array(16),t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d,d=this._e;d=s(d,r=s(r,n,i,a,d,e[0],0,11),n,i=o(i,10),a,e[1],0,14),n=s(n=o(n,10),i=s(i,a=s(a,d,r,n,i,e[2],0,15),d,r=o(r,10),n,e[3],0,12),a,d=o(d,10),r,e[4],0,5),a=s(a=o(a,10),d=s(d,r=s(r,n,i,a,d,e[5],0,8),n,i=o(i,10),a,e[6],0,7),r,n=o(n,10),i,e[7],0,9),r=s(r=o(r,10),n=s(n,i=s(i,a,d,r,n,e[8],0,11),a,d=o(d,10),r,e[9],0,13),i,a=o(a,10),d,e[10],0,14),i=s(i=o(i,10),a=s(a,d=s(d,r,n,i,a,e[11],0,15),r,n=o(n,10),i,e[12],0,6),d,r=o(r,10),n,e[13],0,7),d=f(d=o(d,10),r=s(r,n=s(n,i,a,d,r,e[14],0,9),i,a=o(a,10),d,e[15],0,8),n,i=o(i,10),a,e[7],1518500249,7),n=f(n=o(n,10),i=f(i,a=f(a,d,r,n,i,e[4],1518500249,6),d,r=o(r,10),n,e[13],1518500249,8),a,d=o(d,10),r,e[1],1518500249,13),a=f(a=o(a,10),d=f(d,r=f(r,n,i,a,d,e[10],1518500249,11),n,i=o(i,10),a,e[6],1518500249,9),r,n=o(n,10),i,e[15],1518500249,7),r=f(r=o(r,10),n=f(n,i=f(i,a,d,r,n,e[3],1518500249,15),a,d=o(d,10),r,e[12],1518500249,7),i,a=o(a,10),d,e[0],1518500249,12),i=f(i=o(i,10),a=f(a,d=f(d,r,n,i,a,e[9],1518500249,15),r,n=o(n,10),i,e[5],1518500249,9),d,r=o(r,10),n,e[2],1518500249,11),d=f(d=o(d,10),r=f(r,n=f(n,i,a,d,r,e[14],1518500249,7),i,a=o(a,10),d,e[11],1518500249,13),n,i=o(i,10),a,e[8],1518500249,12),n=u(n=o(n,10),i=u(i,a=u(a,d,r,n,i,e[3],1859775393,11),d,r=o(r,10),n,e[10],1859775393,13),a,d=o(d,10),r,e[14],1859775393,6),a=u(a=o(a,10),d=u(d,r=u(r,n,i,a,d,e[4],1859775393,7),n,i=o(i,10),a,e[9],1859775393,14),r,n=o(n,10),i,e[15],1859775393,9),r=u(r=o(r,10),n=u(n,i=u(i,a,d,r,n,e[8],1859775393,13),a,d=o(d,10),r,e[1],1859775393,15),i,a=o(a,10),d,e[2],1859775393,14),i=u(i=o(i,10),a=u(a,d=u(d,r,n,i,a,e[7],1859775393,8),r,n=o(n,10),i,e[0],1859775393,13),d,r=o(r,10),n,e[6],1859775393,6),d=u(d=o(d,10),r=u(r,n=u(n,i,a,d,r,e[13],1859775393,5),i,a=o(a,10),d,e[11],1859775393,12),n,i=o(i,10),a,e[5],1859775393,7),n=c(n=o(n,10),i=c(i,a=u(a,d,r,n,i,e[12],1859775393,5),d,r=o(r,10),n,e[1],2400959708,11),a,d=o(d,10),r,e[9],2400959708,12),a=c(a=o(a,10),d=c(d,r=c(r,n,i,a,d,e[11],2400959708,14),n,i=o(i,10),a,e[10],2400959708,15),r,n=o(n,10),i,e[0],2400959708,14),r=c(r=o(r,10),n=c(n,i=c(i,a,d,r,n,e[8],2400959708,15),a,d=o(d,10),r,e[12],2400959708,9),i,a=o(a,10),d,e[4],2400959708,8),i=c(i=o(i,10),a=c(a,d=c(d,r,n,i,a,e[13],2400959708,9),r,n=o(n,10),i,e[3],2400959708,14),d,r=o(r,10),n,e[7],2400959708,5),d=c(d=o(d,10),r=c(r,n=c(n,i,a,d,r,e[15],2400959708,6),i,a=o(a,10),d,e[14],2400959708,8),n,i=o(i,10),a,e[5],2400959708,6),n=l(n=o(n,10),i=c(i,a=c(a,d,r,n,i,e[6],2400959708,5),d,r=o(r,10),n,e[2],2400959708,12),a,d=o(d,10),r,e[4],2840853838,9),a=l(a=o(a,10),d=l(d,r=l(r,n,i,a,d,e[0],2840853838,15),n,i=o(i,10),a,e[5],2840853838,5),r,n=o(n,10),i,e[9],2840853838,11),r=l(r=o(r,10),n=l(n,i=l(i,a,d,r,n,e[7],2840853838,6),a,d=o(d,10),r,e[12],2840853838,8),i,a=o(a,10),d,e[2],2840853838,13),i=l(i=o(i,10),a=l(a,d=l(d,r,n,i,a,e[10],2840853838,12),r,n=o(n,10),i,e[14],2840853838,5),d,r=o(r,10),n,e[1],2840853838,12),d=l(d=o(d,10),r=l(r,n=l(n,i,a,d,r,e[3],2840853838,13),i,a=o(a,10),d,e[8],2840853838,14),n,i=o(i,10),a,e[11],2840853838,11),n=l(n=o(n,10),i=l(i,a=l(a,d,r,n,i,e[6],2840853838,8),d,r=o(r,10),n,e[15],2840853838,5),a,d=o(d,10),r,e[13],2840853838,6),a=o(a,10);var h=this._a,p=this._b,b=this._c,v=this._d,m=this._e;m=l(m,h=l(h,p,b,v,m,e[5],1352829926,8),p,b=o(b,10),v,e[14],1352829926,9),p=l(p=o(p,10),b=l(b,v=l(v,m,h,p,b,e[7],1352829926,9),m,h=o(h,10),p,e[0],1352829926,11),v,m=o(m,10),h,e[9],1352829926,13),v=l(v=o(v,10),m=l(m,h=l(h,p,b,v,m,e[2],1352829926,15),p,b=o(b,10),v,e[11],1352829926,15),h,p=o(p,10),b,e[4],1352829926,5),h=l(h=o(h,10),p=l(p,b=l(b,v,m,h,p,e[13],1352829926,7),v,m=o(m,10),h,e[6],1352829926,7),b,v=o(v,10),m,e[15],1352829926,8),b=l(b=o(b,10),v=l(v,m=l(m,h,p,b,v,e[8],1352829926,11),h,p=o(p,10),b,e[1],1352829926,14),m,h=o(h,10),p,e[10],1352829926,14),m=c(m=o(m,10),h=l(h,p=l(p,b,v,m,h,e[3],1352829926,12),b,v=o(v,10),m,e[12],1352829926,6),p,b=o(b,10),v,e[6],1548603684,9),p=c(p=o(p,10),b=c(b,v=c(v,m,h,p,b,e[11],1548603684,13),m,h=o(h,10),p,e[3],1548603684,15),v,m=o(m,10),h,e[7],1548603684,7),v=c(v=o(v,10),m=c(m,h=c(h,p,b,v,m,e[0],1548603684,12),p,b=o(b,10),v,e[13],1548603684,8),h,p=o(p,10),b,e[5],1548603684,9),h=c(h=o(h,10),p=c(p,b=c(b,v,m,h,p,e[10],1548603684,11),v,m=o(m,10),h,e[14],1548603684,7),b,v=o(v,10),m,e[15],1548603684,7),b=c(b=o(b,10),v=c(v,m=c(m,h,p,b,v,e[8],1548603684,12),h,p=o(p,10),b,e[12],1548603684,7),m,h=o(h,10),p,e[4],1548603684,6),m=c(m=o(m,10),h=c(h,p=c(p,b,v,m,h,e[9],1548603684,15),b,v=o(v,10),m,e[1],1548603684,13),p,b=o(b,10),v,e[2],1548603684,11),p=u(p=o(p,10),b=u(b,v=u(v,m,h,p,b,e[15],1836072691,9),m,h=o(h,10),p,e[5],1836072691,7),v,m=o(m,10),h,e[1],1836072691,15),v=u(v=o(v,10),m=u(m,h=u(h,p,b,v,m,e[3],1836072691,11),p,b=o(b,10),v,e[7],1836072691,8),h,p=o(p,10),b,e[14],1836072691,6),h=u(h=o(h,10),p=u(p,b=u(b,v,m,h,p,e[6],1836072691,6),v,m=o(m,10),h,e[9],1836072691,14),b,v=o(v,10),m,e[11],1836072691,12),b=u(b=o(b,10),v=u(v,m=u(m,h,p,b,v,e[8],1836072691,13),h,p=o(p,10),b,e[12],1836072691,5),m,h=o(h,10),p,e[2],1836072691,14),m=u(m=o(m,10),h=u(h,p=u(p,b,v,m,h,e[10],1836072691,13),b,v=o(v,10),m,e[0],1836072691,13),p,b=o(b,10),v,e[4],1836072691,7),p=f(p=o(p,10),b=f(b,v=u(v,m,h,p,b,e[13],1836072691,5),m,h=o(h,10),p,e[8],2053994217,15),v,m=o(m,10),h,e[6],2053994217,5),v=f(v=o(v,10),m=f(m,h=f(h,p,b,v,m,e[4],2053994217,8),p,b=o(b,10),v,e[1],2053994217,11),h,p=o(p,10),b,e[3],2053994217,14),h=f(h=o(h,10),p=f(p,b=f(b,v,m,h,p,e[11],2053994217,14),v,m=o(m,10),h,e[15],2053994217,6),b,v=o(v,10),m,e[0],2053994217,14),b=f(b=o(b,10),v=f(v,m=f(m,h,p,b,v,e[5],2053994217,6),h,p=o(p,10),b,e[12],2053994217,9),m,h=o(h,10),p,e[2],2053994217,12),m=f(m=o(m,10),h=f(h,p=f(p,b,v,m,h,e[13],2053994217,9),b,v=o(v,10),m,e[9],2053994217,12),p,b=o(b,10),v,e[7],2053994217,5),p=s(p=o(p,10),b=f(b,v=f(v,m,h,p,b,e[10],2053994217,15),m,h=o(h,10),p,e[14],2053994217,8),v,m=o(m,10),h,e[12],0,8),v=s(v=o(v,10),m=s(m,h=s(h,p,b,v,m,e[15],0,5),p,b=o(b,10),v,e[10],0,12),h,p=o(p,10),b,e[4],0,9),h=s(h=o(h,10),p=s(p,b=s(b,v,m,h,p,e[1],0,12),v,m=o(m,10),h,e[5],0,5),b,v=o(v,10),m,e[8],0,14),b=s(b=o(b,10),v=s(v,m=s(m,h,p,b,v,e[7],0,6),h,p=o(p,10),b,e[6],0,8),m,h=o(h,10),p,e[2],0,13),m=s(m=o(m,10),h=s(h,p=s(p,b,v,m,h,e[13],0,6),b,v=o(v,10),m,e[14],0,5),p,b=o(b,10),v,e[0],0,15),p=s(p=o(p,10),b=s(b,v=s(v,m,h,p,b,e[3],0,13),m,h=o(h,10),p,e[9],0,11),v,m=o(m,10),h,e[11],0,11),v=o(v,10);var g=this._b+i+v|0;this._b=this._c+a+m|0,this._c=this._d+d+h|0,this._d=this._e+r+p|0,this._e=this._a+n+b|0,this._a=g},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=a}).call(this,r(5).Buffer)},function(e,t,r){"use strict";(function(t){var r=4,n=new t(r);n.fill(0);e.exports=function(e,i){var a=i(function(e){if(e.length%r!=0){var i=e.length+(r-e.length%r);e=t.concat([e,n],i)}for(var a=new Array(e.length>>>2),o=0,s=0;o>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,a=271733878,l=0;l>>32-s,r);var o,s}function o(e,t,r,n,i,o,s){return a(t&r|~t&n,e,t,i,o,s)}function s(e,t,r,n,i,o,s){return a(t&n|r&~n,e,t,i,o,s)}function f(e,t,r,n,i,o,s){return a(t^r^n,e,t,i,o,s)}function u(e,t,r,n,i,o,s){return a(r^(t|~n),e,t,i,o,s)}function c(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}e.exports=function(e){return n(e,i)}},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(163),a=r(161),o=r(149),s=r(144);function f(e){s.call(this,"digest"),this._hash=e,this.buffers=[]}function u(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this.buffers.push(e)},f.prototype._final=function(){var e=t.concat(this.buffers),r=this._hash(e);return this.buffers=null,r},n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new f(i):new u("rmd160"===e||"ripemd160"===e?new a:o(e))}}).call(this,r(5).Buffer)},function(e,t,r){(function(t){var n=r(73);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,r,n){var i=new t(n?34:33);return i.writeUInt8(e,0),r.copy(i,1),n&&(i[33]=1),i}e.exports={decode:function(e,t){return i(n.decode(e),t)},decodeRaw:i,encode:function(e,t,r){return"number"==typeof e?n.encode(a(e,t,r)):n.encode(a(e.version,e.privateKey,e.compressed))},encodeRaw:a}}).call(this,r(5).Buffer)},function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,f=(1<>1,c=-7,l=r?i-1:0,d=r?-1:1,h=e[t+l];for(l+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+l],l+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+l],l+=d,c-=8);if(0===a)a=1-u;else{if(a===f)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,f,u=8*a-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),(t+=o+l>=1?d/f:d*Math.pow(2,1-l))*f>=2&&(o++,f/=2),o+l>=c?(s=0,o=c):o+l>=1?(s=(t*f-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=p,o/=256,u-=8);e[r+h-p]|=128*b}},function(e,t,r){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=u(e),n=r[0],o=r[1],s=new a(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),f=0,c=o>0?n-4:n,l=0;l>16&255,s[f++]=t>>8&255,s[f++]=255&t;2===o&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,s[f++]=255&t);1===o&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,s[f++]=t>>8&255,s[f++]=255&t);return s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(75);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(8),i=r(172),a=r(76),o=r(41),s=r(171),f=r(170);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!s(e.url)&&(e.url=f(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return u(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(u(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(8);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,a=String(e),o="",s=0,f=n;a.charAt(0|s)||(f="=",s%1);o+=f.charAt(63&t>>8-s%1*8)){if((r=a.charCodeAt(s+=.75))>255)throw new i;t=t<<8|r}return o}},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(8),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,o={};return e?(n.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o):o}},function(e,t,r){"use strict";var n=r(8);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))}))}),a=o.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},function(e,t,r){"use strict";var n=r(77);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(41),i=r(8),a=r(174),o=r(173);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[o,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=s},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} +function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([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]),f=i.create([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]),u=i.create([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]),c=i.create([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]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,d,w,_,S,k,x,A,M,E,T=this._hash.words,I=l.words,P=h.words,O=s.words,R=f.words,C=u.words,B=c.words;for(S=a=T[0],k=o=T[1],x=d=T[2],A=w=T[3],M=_=T[4],r=0;r<80;r+=1)E=a+e[t+O[r]]|0,E+=r<16?p(o,d,w)+I[0]:r<32?b(o,d,w)+I[1]:r<48?v(o,d,w)+I[2]:r<64?m(o,d,w)+I[3]:g(o,d,w)+I[4],E=(E=y(E|=0,C[r]))+_|0,a=_,_=w,w=y(d,10),d=o,o=E,E=S+e[t+R[r]]|0,E+=r<16?g(k,x,A)+P[0]:r<32?m(k,x,A)+P[1]:r<48?v(k,x,A)+P[2]:r<64?b(k,x,A)+P[3]:p(k,x,A)+P[4],E=(E=y(E|=0,B[r]))+M|0,S=M,M=A,A=y(x,10),x=k,k=E;E=T[1]+d+A|0,T[1]=T[2]+w+M|0,T[2]=T[3]+_+S|0,T[3]=T[4]+a+k|0,T[4]=T[0]+o+x|0,T[0]=E},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function b(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function y(e,t){return e<>>32-t}t.RIPEMD160=a._createHelper(d),t.HmacRIPEMD160=a._createHmacHelper(d)}(Math),n.RIPEMD160)},function(e,t,r){"use strict";var n=r(11),i=r(6).utils,a=i.assert,o=i.cachedProperty,s=i.parseBytes;function f(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=f},function(e,t,r){"use strict";var n=r(6).utils,i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(34),i=r(6),a=i.utils,o=a.assert,s=a.parseBytes,f=r(120),u=r(119);function c(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:a})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=s(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=s(e,r);if(e.length!==f+r.place)return!1;var u=e.slice(r.place,f+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new n(o),this.s=new n(u),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var a=n.concat(r),o=[48];return u(o,a.length),o=o.concat(a),i.encode(o,e)}},function(e,t,r){"use strict";var n=r(11),i=r(6).utils.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},function(e,t,r){"use strict";var n=r(34),i=r(64),a=r(13);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),c=new i({hash:this.hash,entropy:s,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=a.k?a.k(h):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var m=d.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new f({r:v,s:m,recoveryParam:g})}}}}}},u.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var a=(t=new f(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,u=o.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},u.prototype.recoverPubKey=function(e,t,r,i){o((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var a=this.n,s=new n(e),u=t.r,c=t.s,l=1&r,h=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");u=h?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var d=t.r.invm(a),p=a.sub(s).mul(d).umod(a),b=c.mul(d).umod(a);return this.g.mulAdd(p,u,b)},u.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),f=i.redMul(o),u=a.redMul(s),c=i.redMul(s),l=o.redMul(a);return this.curve.point(f,u,l,c)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(u=this.curve._mulA(i)).redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(u.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=n.redSub(i).redISub(a).redMul(f),t=o.redMul(u.redSub(a)),r=o.redMul(f)}}else{var u=i.redAdd(a);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=u.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(u)).redMul(f),t=this.curve._mulC(u).redMul(i.redISub(a)),r=u.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=a.redMul(o),c=s.redMul(f),l=a.redMul(f),h=o.redMul(s);return this.curve.point(u,c,h,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(u)):(t=n.redMul(u).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(u)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";var n=r(24),i=r(11),a=r(1),o=n.base,s=r(6).utils;function f(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(f,o),e.exports=f,f.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(u,o.BasePoint),f.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},f.prototype.point=function(e,t){return new u(this,e,t)},f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(24),i=r(6),a=r(11),o=r(1),s=n.base,f=i.utils.assert;function u(e){s.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],f(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,f,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),m=new a(1),g=0;0!==h.cmpn(0);){var y=d.div(h);u=d.sub(y.mul(h)),c=v.sub(y.mul(p));var w=m.sub(y.mul(b));if(!n&&u.cmp(l)<0)t=f.neg(),r=p,n=u.neg(),i=c;else if(n&&2==++g)break;f=u,d=h,h=u,v=p,p=c,m=b,b=w}o=u.neg(),s=c;var _=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(_)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),f=i.mul(r.b),u=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:f.add(u).neg()}},u.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=n.redMul(u),h=f.redSqr().redIAdd(c).redISub(l).redISub(l),d=f.redMul(l.redISub(h)).redISub(a.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),c=r.redMul(f),l=s.redSqr().redIAdd(u).redISub(c).redISub(c),h=s.redMul(c.redISub(l)).redISub(i.redMul(u)),d=this.z.redMul(o);return this.curve.jpoint(l,h,d)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(11),i=r(6).utils,a=i.getNAF,o=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<=f;t--)u=(u<<1)+n[t];o.push(u)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(f=0;f=0;u--){for(t=0;u>=0&&0===o[u];u--)t++;if(u>=0&&t++,f=f.dblp(t),u<0)break;var c=o[u];s(0!==c),f="affine"===e.type?c>0?f.mixedAdd(i[c-1>>1]):f.mixedAdd(i[-c-1>>1].neg()):c>0?f.add(i[c-1>>1]):f.add(i[-c-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,u=this._wnafT3,c=0,l=0;l=1;l-=2){var d=l-1,p=l;if(1===s[d]&&1===s[p]){var b=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(b[1]=t[d].add(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].add(t[p].neg())):(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],m=o(r[d],r[p]);c=Math.max(m[0].length,c),u[d]=new Array(c),u[p]=new Array(c);for(var g=0;g=0;l--){for(var k=0;l>=0;){var x=!0;for(g=0;g=0&&k++,_=_.dblp(k),l<0)break;for(g=0;g0?A=f[g][M-1>>1]:M<0&&(A=f[g][-M-1>>1].neg()),_="affine"===A.type?_.mixedAdd(A):_.add(A))}}for(l=0;l=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,f=1;f0||t.cmpn(-i)>0;){var a,o,s,f=e.andln(3)+n&3,u=t.andln(3)+i&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==u?f:-f,r[0].push(a),o=0==(1&u)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?u:-u,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e){e.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(e,t,r){var n=r(4).Buffer;e.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),a=0;a>=8;for(;u>0;)a.push(255&u),u>>=8}for(var c=0;e[c]===i&&c0;)n.push(s%r),s=s/r|0}for(var f="",u=0;0===t[u]&&u=0;--c)f+=e[n[c]];return f},decodeUnsafe:s,decode:function(e){var t=s(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";var n=r(35),i=r(4).Buffer;e.exports=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return n.encode(i.concat([t,r],t.length+4))},decode:function(e){var r=t(n.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=n.decodeUnsafe(e);if(r)return t(r)}}}},function(e,t,r){var n=r(4).Buffer,i=r(72).Transform,a=r(36).StringDecoder;function o(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1)(o,i),o.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=o},function(e,t,r){var n=r(1),i=r(66),a=r(18),o=r(4).Buffer,s=new Array(160);function f(){this.init(),this._w=s,a.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t,r){var n=r(1),i=r(67),a=r(18),o=r(4).Buffer,s=new Array(64);function f(){this.init(),this._w=s,a.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),b=u(n)+l(p,i,a,s)+f+r[d]+o[p]|0;f=s,s=a,a=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((t=n)<<5|t>>>27)+c(d,i,a,s)+f+r[h]+o[d];f=s,s=a,a=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(149),t.sha1=r(148),t.sha224=r(147),t.sha256=r(67),t.sha384=r(146),t.sha512=r(66)},function(e,t,r){"use strict";var n=r(7).Buffer,i=r(1),a=r(73),o=new Array(16),s=[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],f=[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],u=[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],c=[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],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function b(e,t,r,n,i,a,o,s){return p(e+(t^r^n)+a+o|0,s)+i|0}function v(e,t,r,n,i,a,o,s){return p(e+(t&r|~t&n)+a+o|0,s)+i|0}function m(e,t,r,n,i,a,o,s){return p(e+((t|~r)^n)+a+o|0,s)+i|0}function g(e,t,r,n,i,a,o,s){return p(e+(t&n|r&~n)+a+o|0,s)+i|0}function y(e,t,r,n,i,a,o,s){return p(e+(t^(r|~n))+a+o|0,s)+i|0}i(d,a),d.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,k=0|this._d,x=0|this._e,A=0;A<80;A+=1){var M,E;A<16?(M=b(r,n,i,a,d,e[s[A]],l[0],u[A]),E=y(w,_,S,k,x,e[f[A]],h[0],c[A])):A<32?(M=v(r,n,i,a,d,e[s[A]],l[1],u[A]),E=g(w,_,S,k,x,e[f[A]],h[1],c[A])):A<48?(M=m(r,n,i,a,d,e[s[A]],l[2],u[A]),E=m(w,_,S,k,x,e[f[A]],h[2],c[A])):A<64?(M=g(r,n,i,a,d,e[s[A]],l[3],u[A]),E=v(w,_,S,k,x,e[f[A]],h[3],c[A])):(M=y(r,n,i,a,d,e[s[A]],l[4],u[A]),E=b(w,_,S,k,x,e[f[A]],h[4],c[A])),r=d,d=a,a=p(i,10),i=n,n=M,w=x,x=k,k=p(S,10),S=_,_=E}var T=this._b+i+k|0;this._b=this._c+a+x|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},function(e,t,r){e.exports=r(39).PassThrough},function(e,t,r){e.exports=r(39).Transform},function(e,t,r){e.exports=r(14)},function(e,t,r){e.exports=r(38)},function(e,t,r){"use strict";e.exports=a;var n=r(68),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r(1),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(15))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,o,s,f=1,u={},c=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){a.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,a=n.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=a,i=s,t.copy(r,i),s+=o.data.length,o=o.next;return a},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(73),a=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<>>32-t}function f(e,t,r,n,i,a,o){return s(e+(t&r|~t&n)+i+a|0,o)+t|0}function u(e,t,r,n,i,a,o){return s(e+(t&n|r&~n)+i+a|0,o)+t|0}function c(e,t,r,n,i,a,o){return s(e+(t^r^n)+i+a|0,o)+t|0}function l(e,t,r,n,i,a,o){return s(e+(r^(t|~n))+i+a|0,o)+t|0}n(o,i),o.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;n=l(n=l(n=l(n=l(n=c(n=c(n=c(n=c(n=u(n=u(n=u(n=u(n=f(n=f(n=f(n=f(n,i=f(i,o=f(o,r=f(r,n,i,o,e[0],3614090360,7),n,i,e[1],3905402710,12),r,n,e[2],606105819,17),o,r,e[3],3250441966,22),i=f(i,o=f(o,r=f(r,n,i,o,e[4],4118548399,7),n,i,e[5],1200080426,12),r,n,e[6],2821735955,17),o,r,e[7],4249261313,22),i=f(i,o=f(o,r=f(r,n,i,o,e[8],1770035416,7),n,i,e[9],2336552879,12),r,n,e[10],4294925233,17),o,r,e[11],2304563134,22),i=f(i,o=f(o,r=f(r,n,i,o,e[12],1804603682,7),n,i,e[13],4254626195,12),r,n,e[14],2792965006,17),o,r,e[15],1236535329,22),i=u(i,o=u(o,r=u(r,n,i,o,e[1],4129170786,5),n,i,e[6],3225465664,9),r,n,e[11],643717713,14),o,r,e[0],3921069994,20),i=u(i,o=u(o,r=u(r,n,i,o,e[5],3593408605,5),n,i,e[10],38016083,9),r,n,e[15],3634488961,14),o,r,e[4],3889429448,20),i=u(i,o=u(o,r=u(r,n,i,o,e[9],568446438,5),n,i,e[14],3275163606,9),r,n,e[3],4107603335,14),o,r,e[8],1163531501,20),i=u(i,o=u(o,r=u(r,n,i,o,e[13],2850285829,5),n,i,e[2],4243563512,9),r,n,e[7],1735328473,14),o,r,e[12],2368359562,20),i=c(i,o=c(o,r=c(r,n,i,o,e[5],4294588738,4),n,i,e[8],2272392833,11),r,n,e[11],1839030562,16),o,r,e[14],4259657740,23),i=c(i,o=c(o,r=c(r,n,i,o,e[1],2763975236,4),n,i,e[4],1272893353,11),r,n,e[7],4139469664,16),o,r,e[10],3200236656,23),i=c(i,o=c(o,r=c(r,n,i,o,e[13],681279174,4),n,i,e[0],3936430074,11),r,n,e[3],3572445317,16),o,r,e[6],76029189,23),i=c(i,o=c(o,r=c(r,n,i,o,e[9],3654602809,4),n,i,e[12],3873151461,11),r,n,e[15],530742520,16),o,r,e[2],3299628645,23),i=l(i,o=l(o,r=l(r,n,i,o,e[0],4096336452,6),n,i,e[7],1126891415,10),r,n,e[14],2878612391,15),o,r,e[5],4237533241,21),i=l(i,o=l(o,r=l(r,n,i,o,e[12],1700485571,6),n,i,e[3],2399980690,10),r,n,e[10],4293915773,15),o,r,e[1],2240044497,21),i=l(i,o=l(o,r=l(r,n,i,o,e[8],1873313359,6),n,i,e[15],4264355552,10),r,n,e[6],2734768916,15),o,r,e[13],1309151649,21),i=l(i,o=l(o,r=l(r,n,i,o,e[4],4149444226,6),n,i,e[11],3174756917,10),r,n,e[2],718787259,15),o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=o}).call(this,r(7).Buffer)},function(e,t,r){"use strict";var n=r(1),i=r(162),a=r(151),o=r(150),s=r(145);function f(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new a:new f(o(e))}},function(e,t,r){(function(t){var n=r(74);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,r,n){var i=new t(n?34:33);return i.writeUInt8(e,0),r.copy(i,1),n&&(i[33]=1),i}e.exports={decode:function(e,t){return i(n.decode(e),t)},decodeRaw:i,encode:function(e,t,r){return"number"==typeof e?n.encode(a(e,t,r)):n.encode(a(e.version,e.privateKey,e.compressed))},encodeRaw:a}}).call(this,r(7).Buffer)},function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,f=(1<>1,c=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+l],l+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+l],l+=h,c-=8);if(0===a)a=1-u;else{if(a===f)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,f,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),(t+=o+l>=1?h/f:h*Math.pow(2,1-l))*f>=2&&(o++,f/=2),o+l>=c?(s=0,o=c):o+l>=1?(s=(t*f-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*b}},function(e,t,r){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=u(e),n=r[0],o=r[1],s=new a(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),f=0,c=o>0?n-4:n,l=0;l>16&255,s[f++]=t>>8&255,s[f++]=255&t;2===o&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,s[f++]=255&t);1===o&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,s[f++]=t>>8&255,s[f++]=255&t);return s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(76);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(8),i=r(171),a=r(77),o=r(41),s=r(170),f=r(169);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!s(e.url)&&(e.url=f(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return u(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(u(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(8);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,a=String(e),o="",s=0,f=n;a.charAt(0|s)||(f="=",s%1);o+=f.charAt(63&t>>8-s%1*8)){if((r=a.charCodeAt(s+=.75))>255)throw new i;t=t<<8|r}return o}},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(8),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,o={};return e?(n.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o):o}},function(e,t,r){"use strict";var n=r(8);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))}))}),a=o.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},function(e,t,r){"use strict";var n=r(78);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(41),i=r(8),a=r(173),o=r(172);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[o,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=s},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ -e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";var n=r(8),i=r(79),a=r(183),o=r(41);function s(e){var t=new a(e),r=i(a.prototype.request,t);return n.extend(r,a.prototype,t),n.extend(r,t),r}var f=s(o);f.Axios=a,f.create=function(e){return s(n.merge(o,e))},f.Cancel=r(75),f.CancelToken=r(169),f.isCancel=r(76),f.all=function(e){return Promise.all(e)},f.spread=r(168),e.exports=f,e.exports.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={neonDB:!0,cmc:!0,nep5:!0,neoscan:!0};t.neoscan=t.nep5=t.cmc=t.neonDB=t.default=void 0;var i=c(r(42));t.neonDB=i;var a=c(r(82));t.cmc=a;var o=c(r(81));t.nep5=o;var s=c(r(44));t.neoscan=s;var f=c(r(80));Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))});var u=r(43);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))});var l={get:{price:a.getPrice,prices:a.getPrices,balance:i.getBalance,claims:i.getClaims,transactionHistory:i.getTransactionHistory,tokenBalance:o.getTokenBalance,tokenInfo:o.getTokenInfo,token:o.getToken},do:{sendAsset:i.doSendAsset,claimAllGas:i.doClaimAllGas,mintTokens:i.doMintTokens},sendAsset:function(e){return f.sendAsset(e)},claimGas:function(e){return f.claimGas(e)},doInvoke:function(e){return f.doInvoke(e)}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logging=t.settings=t.u=t.wallet=t.tx=t.sc=t.CONST=t.rpc=t.api=t.default=void 0;var n=d(r(186));t.api=n;var i=d(r(19));t.rpc=i;var a=d(r(3));t.CONST=a;var o=d(r(29));t.sc=o;var s=d(r(17));t.tx=s;var f=d(r(12));t.wallet=f;var u=d(r(0));t.u=u;var c=d(r(16));t.settings=c;var l=d(r(2));function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}t.logging=l;var h=[o.default,s.default,f.default,n.default,i.default,c.default].reduce(function(e,t){return Object.keys(t).map(function(r){e[r]?Object.assign(e[r],t[r]):e[r]=t[r]}),e},{CONST:a,u:u});t.default=h}])}); \ No newline at end of file +e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";var n=r(8),i=r(80),a=r(182),o=r(41);function s(e){var t=new a(e),r=i(a.prototype.request,t);return n.extend(r,a.prototype,t),n.extend(r,t),r}var f=s(o);f.Axios=a,f.create=function(e){return s(n.merge(o,e))},f.Cancel=r(76),f.CancelToken=r(168),f.isCancel=r(77),f.all=function(e){return Promise.all(e)},f.spread=r(167),e.exports=f,e.exports.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={neonDB:!0,cmc:!0,nep5:!0,neoscan:!0};t.neoscan=t.nep5=t.cmc=t.neonDB=t.default=void 0;var i=c(r(42));t.neonDB=i;var a=c(r(83));t.cmc=a;var o=c(r(82));t.nep5=o;var s=c(r(44));t.neoscan=s;var f=c(r(81));Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))});var u=r(43);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))});var l={get:{price:a.getPrice,prices:a.getPrices,balance:i.getBalance,claims:i.getClaims,transactionHistory:i.getTransactionHistory,tokenBalance:o.getTokenBalance,tokenInfo:o.getTokenInfo,token:o.getToken},do:{sendAsset:i.doSendAsset,claimAllGas:i.doClaimAllGas,mintTokens:i.doMintTokens},sendAsset:function(e){return f.sendAsset(e)},claimGas:function(e){return f.claimGas(e)},doInvoke:function(e){return f.doInvoke(e)}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logging=t.settings=t.u=t.wallet=t.tx=t.sc=t.CONST=t.rpc=t.api=t.default=void 0;var n=h(r(185));t.api=n;var i=h(r(19));t.rpc=i;var a=h(r(3));t.CONST=a;var o=h(r(29));t.sc=o;var s=h(r(17));t.tx=s;var f=h(r(12));t.wallet=f;var u=h(r(0));t.u=u;var c=h(r(16));t.settings=c;var l=h(r(2));function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}t.logging=l;var d=[o.default,s.default,f.default,n.default,i.default,c.default].reduce(function(e,t){return Object.keys(t).map(function(r){e[r]?Object.assign(e[r],t[r]):e[r]=t[r]}),e},{CONST:a,u:u});t.default=d}])}); \ No newline at end of file diff --git a/lib/browser.js.gz b/lib/browser.js.gz index 5096ff5b9..9473158aa 100644 Binary files a/lib/browser.js.gz and b/lib/browser.js.gz differ diff --git a/lib/index.js b/lib/index.js index f09bf504e..1151ec013 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=161)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fixed8=t.sha256=t.hash256=t.hash160=t.StringStream=t.ensureHex=t.isHex=t.reverseHex=t.reverseArray=t.hexXor=t.num2VarInt=t.fixed82num=t.num2fixed8=t.num2hexstring=t.int2hex=t.hexstring2str=t.str2hexstring=t.ab2hexstring=t.hexstring2ab=t.str2ab=t.ab2str=void 0;var n=f(r(49)),i=f(r(48)),a=f(r(104)),o=f(r(103)),s=f(r(14));function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t,r){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function l(e){return(l=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new Error("num must be numeric");if(e<0)throw new RangeError("num is unsigned (>= 0)");if(t%1!=0)throw new Error("size must be a whole integer");if(!Number.isSafeInteger(e))throw new RangeError("num (".concat(e,") must be a safe integer"));t*=2;var n=e.toString(16);return n=n.length%t==0?n:("0".repeat(t)+n).substring(n.length),r&&(n=x(n)),n};t.num2hexstring=_;t.num2fixed8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;if("number"!=typeof e)throw new Error("num must be numeric");if(t%1!=0)throw new Error("size must be a whole integer");return new E(e.toFixed(8)).toReverseHex().slice(0,2*t)};t.fixed82num=function(e){return A(e),""===e?0:E.fromReverseHex(e).toNumber()};t.num2VarInt=function(e){return e<253?_(e):e<=65535?"fd"+_(e,2,!0):e<=4294967295?"fe"+_(e,4,!0):"ff"+_(e,8,!0)};t.hexXor=function(e,t){if(A(e),A(t),e.length!==t.length)throw new Error("strings are disparate lengths");for(var r=[],n=0;n=0;r-=2)t+=e.substr(r,2);return t};t.reverseHex=x;var k=/^([0-9A-Fa-f]{2})*$/,S=function(e){try{return k.test(e)}catch(e){return!1}};t.isHex=S;var A=function(e){if(!S(e))throw new Error("Expected a hexstring but got ".concat(e))};t.ensureHex=A;var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";h(this,e),this.str=t,this.pter=0}return b(e,[{key:"isEmpty",value:function(){return this.pter>=this.str.length}},{key:"peek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.isEmpty()?"":this.substr(this.ptr,2*e)}},{key:"read",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.isEmpty())throw new Error;var t=this.str.substr(this.pter,2*e);return this.pter+=2*e,t}},{key:"readVarBytes",value:function(){return this.read(this.readVarInt())}},{key:"readVarInt",value:function(){var e=parseInt(this.read(1),16);return 253===e?e=parseInt(x(this.read(2)),16):254===e?e=parseInt(x(this.read(4)),16):255===e&&(e=parseInt(x(this.read(8)),16)),e}},{key:"reset",value:function(){this.pter=0}}]),e}();t.StringStream=M;t.hash160=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,a.default)(r).toString()};t.hash256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,i.default)(r).toString()};t.sha256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e);return(0,i.default)(t).toString()};var E=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return h(this,t),"number"==typeof e&&(e=e.toFixed(8)),u(this,l(t).call(this,e,r))}return b(t,[{key:"toHex",value:function(){var e=this.times(1e8).round(0).toString(16);return"0".repeat(16-e.length)+e}},{key:"toReverseHex",value:function(){return x(this.toHex())}},{key:s.default.inspect.custom,value:function(e,t){return this.toFixed(8)}},{key:"ceil",value:function(){return new t(d(l(t.prototype),"ceil",this).call(this))}},{key:"floor",value:function(){return new t(d(l(t.prototype),"floor",this).call(this))}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"round",this).call(this,e,r))}},{key:"div",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.dividedBy(e,t)}},{key:"dividedBy",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"dividedBy",this).call(this,e,r))}},{key:"mul",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.times(e,t)}},{key:"times",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"times",this).call(this,e,r))}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.plus(e,t)}},{key:"plus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"plus",this).call(this,e,r))}},{key:"sub",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.minus(e,t)}},{key:"minus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"minus",this).call(this,e,r))}}],[{key:"fromHex",value:function(e){return new t(e,16).div(1e8)}},{key:"fromReverseHex",value:function(e){return this.fromHex(x(e))}}]),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");c(e.prototype,t&&t.prototype),t&&c(e,t)}(t,e),t}(o.default);t.Fixed8=E},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.default=void 0;var n=a(r(85)),i=a(r(84));function a(e){return e&&e.__esModule?e:{default:e}}i.default.reg(n.default),n.default.setDefaultLevel("silent"),n.default.setAll=function(e){Object.keys(n.default.getLoggers()).map(function(t){n.default.getLogger(t).setLevel(e)})};var o=function(e,t){var r=(new Date).toUTCString();e=e.toUpperCase();var n=t;return"[".concat(r,"] (").concat(n,") ").concat(e,": ")};t.default=function(e){var t=n.default.getLogger(e);return i.default.apply(t,{format:o}),t};var s=n.default;t.logger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TX_VERSION=t.RPC_VERSION=t.NEP_FLAG=t.NEP_HEADER=t.NEO_NETWORK=t.DEFAULT_ACCOUNT_CONTRACT=t.DEFAULT_WALLET=t.DEFAULT_SYSFEE=t.DEFAULT_SCRYPT=t.DEFAULT_REQ=t.DEFAULT_RPC=t.CONTRACTS=t.ASSET_ID=t.ASSETS=t.ADDR_VERSION=void 0;t.ADDR_VERSION="17";t.ASSETS={NEO:"NEO",c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b:"NEO",GAS:"GAS","602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7":"GAS"};t.ASSET_ID={NEO:"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",GAS:"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7"};t.CONTRACTS={RPX:"ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9",TEST_RPX:"5b7074e873973a6ed3708862f219a6fbf4d1c411",TEST_LWTF:"d7678dd97c000be3f33e9362e673101bac4ca654",TEST_NXT:"0b6c1f919e95fe61c17a7612aebfaf4fda3a2214",TEST_RHTT4:"f9572c5b119a6b5775a6af07f1cef5d310038f55"};t.DEFAULT_RPC={MAIN:"https://seed1.neo.org:10331",TEST:"https://seed1.neo.org:20331"};t.DEFAULT_REQ={jsonrpc:"2.0",method:"getblockcount",params:[],id:1234};t.DEFAULT_SCRYPT={cost:16384,blockSize:8,parallel:8,size:64};t.DEFAULT_SYSFEE={enrollmentTransaction:1e3,issueTransaction:500,publishTransaction:500,registerTransaction:1e4};t.DEFAULT_WALLET={name:"myWallet",version:"1.0",scrypt:{},accounts:[],extra:null};t.DEFAULT_ACCOUNT_CONTRACT={script:"",parameters:[{name:"signature",type:"Signature"}],deployed:!1};t.NEO_NETWORK={MAIN:"MainNet",TEST:"TestNet"};t.NEP_HEADER="0142";t.NEP_FLAG="e0";t.RPC_VERSION="2.3.2";t.TX_VERSION={CLAIM:0,CONTRACT:0,INVOCATION:1}},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},a=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=4*a,f=i/s,c=(f=t?e.ceil(f):e.max((0|f)-this._minBufferSize,0))*a,u=e.min(4*c,i);if(c){for(var d=0;d>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var f=0,c=t;return f+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,f,c){var u=0,d=t;return u+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,f,c){return t+n+a+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(55).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function f(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,f=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&f,l=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=l;h++){var p=c-h|0;u+=(o=(i=0|e.words[p])*(a=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[c]=0|d,f=0|u}return 0!==f?r.words[c]=0|f:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=u[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:c[l-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,f="le"===t,c=new e(a),u=this.clone();if(f){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,v=0|o[2],m=8191&v,g=v>>>13,y=0|o[3],w=8191&y,_=y>>>13,x=0|o[4],k=8191&x,S=x>>>13,A=0|o[5],M=8191&A,E=A>>>13,P=0|o[6],I=8191&P,C=P>>>13,O=0|o[7],T=8191&O,R=O>>>13,N=0|o[8],F=8191&N,j=N>>>13,B=0|o[9],z=8191&B,H=B>>>13,L=0|s[0],q=8191&L,D=L>>>13,U=0|s[1],K=8191&U,V=U>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,G=0|s[3],Z=8191&G,Q=G>>>13,$=0|s[4],J=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],fe=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,le=ue>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(c+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,D))+Math.imul(l,q)|0))<<13)|0;c=((a=Math.imul(l,D))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,D))+Math.imul(b,q)|0,a=Math.imul(b,D);var me=(c+(n=n+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(l,K)|0))<<13)|0;c=((a=a+Math.imul(l,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,D))+Math.imul(g,q)|0,a=Math.imul(g,D),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,V)|0;var ge=(c+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(l,W)|0))<<13)|0;c=((a=a+Math.imul(l,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,D))+Math.imul(_,q)|0,a=Math.imul(_,D),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,X)|0;var ye=(c+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(l,Z)|0))<<13)|0;c=((a=a+Math.imul(l,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,D))+Math.imul(S,q)|0,a=Math.imul(S,D),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,Z)|0,a=a+Math.imul(b,Q)|0;var we=(c+(n=n+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,J)|0))<<13)|0;c=((a=a+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,D))+Math.imul(E,q)|0,a=Math.imul(E,D),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(g,Z)|0,a=a+Math.imul(g,Q)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((a=a+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,D))+Math.imul(C,q)|0,a=Math.imul(C,D),n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0;var xe=(c+(n=n+Math.imul(d,ae)|0)|0)+((8191&(i=(i=i+Math.imul(d,oe)|0)+Math.imul(l,ae)|0))<<13)|0;c=((a=a+Math.imul(l,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,D))+Math.imul(R,q)|0,a=Math.imul(R,D),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var ke=(c+(n=n+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(l,fe)|0))<<13)|0;c=((a=a+Math.imul(l,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,D))+Math.imul(j,q)|0,a=Math.imul(j,D),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,V)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(m,ae)|0,i=(i=i+Math.imul(m,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,ce)|0;var Se=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;c=((a=a+Math.imul(l,le)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(z,q),i=(i=Math.imul(z,D))+Math.imul(H,q)|0,a=Math.imul(H,D),n=n+Math.imul(F,K)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(j,K)|0,a=a+Math.imul(j,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(C,Z)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,ce)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,a=a+Math.imul(b,le)|0;var Ae=(c+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;c=((a=a+Math.imul(l,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(z,K),i=(i=Math.imul(z,V))+Math.imul(H,K)|0,a=Math.imul(H,V),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(j,W)|0,a=a+Math.imul(j,X)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(R,Z)|0,a=a+Math.imul(R,Q)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,ce)|0,n=n+Math.imul(m,de)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(g,de)|0,a=a+Math.imul(g,le)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((a=a+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(z,W),i=(i=Math.imul(z,X))+Math.imul(H,W)|0,a=Math.imul(H,X),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,Q)|0)+Math.imul(j,Z)|0,a=a+Math.imul(j,Q)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,de)|0,a=a+Math.imul(_,le)|0;var Ee=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(g,pe)|0))<<13)|0;c=((a=a+Math.imul(g,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(z,Z),i=(i=Math.imul(z,Q))+Math.imul(H,Z)|0,a=Math.imul(H,Q),n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(j,J)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(S,de)|0,a=a+Math.imul(S,le)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;c=((a=a+Math.imul(_,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,J),i=(i=Math.imul(z,ee))+Math.imul(H,J)|0,a=Math.imul(H,ee),n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(j,re)|0,a=a+Math.imul(j,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(C,fe)|0,a=a+Math.imul(C,ce)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(E,de)|0,a=a+Math.imul(E,le)|0;var Ie=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(S,pe)|0))<<13)|0;c=((a=a+Math.imul(S,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(z,re),i=(i=Math.imul(z,ne))+Math.imul(H,re)|0,a=Math.imul(H,ne),n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,oe)|0)+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(R,fe)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(C,de)|0,a=a+Math.imul(C,le)|0;var Ce=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(E,pe)|0))<<13)|0;c=((a=a+Math.imul(E,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,ae),i=(i=Math.imul(z,oe))+Math.imul(H,ae)|0,a=Math.imul(H,oe),n=n+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,ce)|0)+Math.imul(j,fe)|0,a=a+Math.imul(j,ce)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(R,de)|0,a=a+Math.imul(R,le)|0;var Oe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(C,pe)|0))<<13)|0;c=((a=a+Math.imul(C,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(z,fe),i=(i=Math.imul(z,ce))+Math.imul(H,fe)|0,a=Math.imul(H,ce),n=n+Math.imul(F,de)|0,i=(i=i+Math.imul(F,le)|0)+Math.imul(j,de)|0,a=a+Math.imul(j,le)|0;var Te=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(R,pe)|0))<<13)|0;c=((a=a+Math.imul(R,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(z,de),i=(i=Math.imul(z,le))+Math.imul(H,de)|0,a=Math.imul(H,le);var Re=(c+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,be)|0)+Math.imul(j,pe)|0))<<13)|0;c=((a=a+Math.imul(j,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(n=Math.imul(z,pe))|0)+((8191&(i=(i=Math.imul(z,be))+Math.imul(H,pe)|0))<<13)|0;return c=((a=Math.imul(H,be))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,f[0]=ve,f[1]=me,f[2]=ge,f[3]=ye,f[4]=we,f[5]=_e,f[6]=xe,f[7]=ke,f[8]=Se,f[9]=Ae,f[10]=Me,f[11]=Ee,f[12]=Pe,f[13]=Ie,f[14]=Ce,f[15]=Oe,f[16]=Te,f[17]=Re,f[18]=Ne,0!==c&&(f[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=l),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return f&&0!==u&&(f.words[f.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),f=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(u),f.isub(d)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(f)):(r.isub(t),s.isub(i),f.isub(o))}return{a:s,b:f,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new x(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(g,m),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),f=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(f);)u.redIAdd(f);for(var d=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var b=h,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var c=t.words[n],u=f-1;u>=0;u--){var d=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,x),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,r(54)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Account:!0,Balance:!0,Wallet:!0,Claims:!0,AssetBalance:!0,Coin:!0,ClaimItem:!0};Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Balance",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Claims",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"AssetBalance",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Coin",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"ClaimItem",{enumerable:!0,get:function(){return p.ClaimItem}}),t.default=void 0;var i=v(r(19));Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))});var a=v(r(25));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=v(r(47));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=v(r(83));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=b(r(23)),c=b(r(82)),u=b(r(74)),d=b(r(73)),l=b(r(44)),h=b(r(43)),p=r(34);function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var m={create:{account:function(e){return new f.default(e)},privateKey:i.generatePrivateKey,signature:i.generateSignature,wallet:function(e){return new u.default(e)}},is:{address:a.isAddress,publicKey:a.isPublicKey,encryptedKey:a.isNEP2,privateKey:a.isPrivateKey,wif:a.isWIF},encrypt:{privateKey:o.encrypt},decrypt:{privateKey:o.decrypt},get:{privateKeyFromWIF:i.getPrivateKeyFromWIF,WIFFromPrivateKey:i.getWIFFromPrivateKey,publicKeyFromPrivateKey:i.getPublicKeyFromPrivateKey,scriptHashFromPublicKey:i.getScriptHashFromPublicKey,addressFromScriptHash:i.getAddressFromScriptHash,scriptHashFromAddress:i.getScriptHashFromAddress},sign:{message:s.signMessage},verify:{message:s.verifyMessage}};t.default=m},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.removeNetwork=t.addNetwork=t.timeout=t.defaultCalculationStrategy=t.httpsOnly=t.networks=void 0;var n=o(r(78)),i=o(r(38)),a=r(37);function o(e){return e&&e.__esModule?e:{default:e}}var s={};t.networks=s,Object.keys(n.default).map(function(e){s[e]=i.default.import(n.default[e])});t.httpsOnly=!1;var f=a.balancedApproach;t.defaultCalculationStrategy=f;t.timeout={ping:2e3,rpc:5e3};var c=function(e){return!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&s[e.name])&&(s[e.name]=e,!0)};t.addNetwork=c;var u=function(e){return!!s[e]&&(delete s[e],!0)};t.removeNetwork=u;var d={add:{network:function(e,t){return c(e,t)}},remove:{network:function(e){return u(e)}}};t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Transaction:!0,calculationStrategy:!0,TxAttrUsage:!0};Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"TxAttrUsage",{enumerable:!0,get:function(){return c.default}}),t.calculationStrategy=t.default=void 0;var i=d(r(81)),a=u(r(39));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=u(r(15));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=u(r(21));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=u(r(37));t.calculationStrategy=f;var c=d(r(40));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&h(i,r.prototype),i}).apply(null,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={create:{tx:function(){for(var e=arguments.length,t=new Array(e),r=0;r=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a65535)throw new Error;var t=(0,n.num2hexstring)(e.usage);return 129===e.usage?t+=(0,n.num2hexstring)(e.data.length/2):(144===e.usage||e.usage>=240)&&(t+=(0,n.num2VarInt)(e.data.length/2)),2===e.usage||3===e.usage?t+=e.data.substr(2,64):t+=e.data,t};t.deserializeTransactionAttribute=function(e){var t={usage:parseInt(e.read(1),16)};if(0===t.usage||48===t.usage||t.usage>=161&&t.usage<=175)t.data=e.read(32);else if(2===t.usage||3===t.usage)t.data=(0,n.num2hexstring)(t.usage)+e.read(32);else if(32===t.usage)t.data=e.read(20);else if(129===t.usage)t.data=e.read(parseInt(e.read(1),16));else{if(!(144===t.usage||t.usage>=240))throw new Error;t.data=e.readVarBytes()}return t};t.serializeWitness=function(e){var t=(0,n.num2VarInt)(e.invocationScript.length/2),r=(0,n.num2VarInt)(e.verificationScript.length/2);return t+e.invocationScript+r+e.verificationScript};t.deserializeWitness=function(e){return{invocationScript:e.readVarBytes(),verificationScript:e.readVarBytes()}}},function(e,t){e.exports=require("fs")},function(e,t,r){try{var n=r(14);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(122)}},function(e,t,r){"use strict";var n=t;n.base=r(124),n.short=r(123),n.mont=r(121),n.edwards=r(120)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomArray=t.generatePrivateKey=t.generateSignature=t.getScriptHashFromAddress=t.getAddressFromScriptHash=t.getScriptHashFromPublicKey=t.getVerificationScriptFromPublicKey=t.getPublicKeyFromPrivateKey=t.getWIFFromPrivateKey=t.getPrivateKeyFromWIF=t.getPublicKeyUnencoded=t.getPublicKeyEncoded=void 0;var n=c(r(131)),i=r(4),a=c(r(27)),o=r(0),s=r(2),f=c(r(102));function c(e){return e&&e.__esModule?e:{default:e}}var u=new i.ec("p256"),d=function(e){var t=(0,o.hexstring2ab)(e);return t[64]%2==1?"03"+(0,o.ab2hexstring)(t.slice(1,33)):"02"+(0,o.ab2hexstring)(t.slice(1,33))};t.getPublicKeyEncoded=d;t.getPublicKeyUnencoded=function(e){return u.keyFromPublic(e,"hex").getPublic().encode("hex")};t.getPrivateKeyFromWIF=function(e){return(0,o.ab2hexstring)(n.default.decode(e,128).privateKey)};t.getWIFFromPrivateKey=function(e){return n.default.encode(128,Buffer.from(e,"hex"),!0)};t.getPublicKeyFromPrivateKey=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=new i.ec("p256").keyFromPrivate(e,"hex").getPublic().encode("hex");return t?parseInt(r.substr(128,2),16)%2==1?"03"+r.substr(2,64):"02"+r.substr(2,64):r};var l=function(e){return"21"+e+"ac"};t.getVerificationScriptFromPublicKey=l;t.getScriptHashFromPublicKey=function(e){"04"===e.substring(0,2)&&(e=d(e));var t=l(e);return(0,o.reverseHex)((0,o.hash160)(t))};t.getAddressFromScriptHash=function(e){e=(0,o.reverseHex)(e);var t=(0,o.hash256)(s.ADDR_VERSION+e).substr(0,8);return a.default.encode(Buffer.from(s.ADDR_VERSION+e+t,"hex"))};t.getScriptHashFromAddress=function(e){var t=(0,o.ab2hexstring)(a.default.decode(e));return(0,o.reverseHex)(t.substr(2,40))};t.generateSignature=function(e,t){var r=(0,o.sha256)(e),n=Buffer.from(r,"hex"),a=new i.ec("p256").sign(n,t,null);return Buffer.concat([a.r.toArrayLike(Buffer,"be",32),a.s.toArrayLike(Buffer,"be",32)]).toString("hex")};t.generatePrivateKey=function(){return(0,o.ab2hexstring)((0,f.default)(32))};t.generateRandomArray=function(e){return(0,f.default)(e)}},function(e,t,r){e.exports=r(159)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExclusive=t.deserializeExclusive=t.serializeExclusive=void 0;var n=r(0),i=r(15),a={2:function(e){if(2!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.claims.length),r=!0,a=!1,o=void 0;try{for(var s,f=e.claims[Symbol.iterator]();!(r=(s=f.next()).done);r=!0){var c=s.value;t+=(0,i.serializeTransactionInput)(c)}}catch(e){a=!0,o=e}finally{try{r||null==f.return||f.return()}finally{if(a)throw o}}return t},128:function(e){if(128!==e.type)throw new Error;return""},209:function(e){if(209!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.script.length/2);return t+=e.script,e.version>=1&&(t+=(0,n.num2fixed8)(e.gas)),t}};t.serializeExclusive=a;var o={2:function(e){for(var t={claims:[]},r=e.readVarInt(),n=0;n=1?(0,n.fixed82num)(e.read(8)):0}}};t.deserializeExclusive=o;var s={2:function(e){return Object.assign({claims:[]},{claims:e.claims})},128:function(e){return{}},209:function(e){return{script:e.script||"",gas:e.gas||0}}};t.getExclusive=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={OpCode:!0,ScriptBuilder:!0,ContractParam:!0};Object.defineProperty(t,"OpCode",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ScriptBuilder",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ContractParam",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(42)),a=f(r(41)),o=f(r(80)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(79));function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t,r){return(c="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&u(i,r.prototype),i}).apply(null,arguments)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var d={create:{contractParam:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0])return this.publicKey;var e=this.publicKey;return n.getPublicKeyUnencoded(e)}},{key:"encrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._encrypted=(0,a.encrypt)(this.privateKey,e,t),this}},{key:"decrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._WIF=(0,a.decrypt)(this.encrypted,e,t),this._updateContractScript(),this}},{key:"export",value:function(){var e=null;if(this._privateKey&&!this._encrypted)throw new Error("Encrypt private key first!");return this._encrypted&&(e=this._encrypted),{address:this.address,label:this.label,isDefault:this.isDefault,lock:this.lock,key:e,contract:this.contract,extra:this.extra}}},{key:Symbol.toStringTag,get:function(){return"Account"}},{key:"encrypted",get:function(){if(this._encrypted)return this._encrypted;throw new Error("No encrypted key found")}},{key:"WIF",get:function(){return this._WIF?this._WIF:(this._WIF=n.getWIFFromPrivateKey(this._privateKey),this._WIF)}},{key:"privateKey",get:function(){if(this._privateKey)return this._privateKey;if(this._WIF)return this._privateKey=n.getPrivateKeyFromWIF(this._WIF),this._privateKey;throw this._encrypted?new ReferenceError("Private Key encrypted!"):new ReferenceError("No Private Key provided!")}},{key:"publicKey",get:function(){return this._publicKey?this._publicKey:(this._publicKey=n.getPublicKeyFromPrivateKey(this.privateKey),this._publicKey)}},{key:"scriptHash",get:function(){return this._scriptHash?this._scriptHash:this._address?(this._scriptHash=n.getScriptHashFromAddress(this.address),this._scriptHash):(this._scriptHash=n.getScriptHashFromPublicKey(this.publicKey),this._scriptHash)}},{key:"address",get:function(){return this._address?this._address:(this._address=n.getAddressFromScriptHash(this.scriptHash),this._address)}}])&&u(t.prototype,r),f&&u(t,f),e}();t.default=l},function(e,t,r){var n;e.exports=(n=r(3),r(46),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=t.enc,f=(s.Utf8,s.Base64),c=t.algo,u=c.EvpKDF,d=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:w}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),l=(r.StreamCipher=d.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),h=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=l.CBC=function(){var t=h.extend();function r(t,r,n){var i=this._iv;if(i){var a=i;this._iv=e}else var a=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(r.BlockCipher=d.extend({cfg:d.cfg.extend({mode:p,padding:v}),reset:function(){d.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=t.format={},y=g.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else var n=t;return n.toString(f)},parse:function(e){var t=f.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return m.create({ciphertext:t,salt:n})}},w=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=t.kdf={},x=_.OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=u.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},k=r.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:x}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=w.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);n.iv=i.iv;var a=w.decrypt.call(this,e,t,i.key,n);return a}})}()))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=t.isScriptHash=t.isPublicKey=t.isPrivateKey=t.isWIF=t.isNEP2=void 0;var n,i=(n=r(27))&&n.__esModule?n:{default:n},a=r(0),o=r(19);t.isNEP2=function(e){try{if(58!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return!!t&&86===t.length&&"01"===t.substr(0,2)&&"42"===t.substr(2,2)&&"e0"===t.substr(4,2)}catch(e){return!1}};t.isWIF=function(e){try{if(52!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return(0,a.hash256)(t.substr(0,t.length-8)).substr(0,8)===t.substr(t.length-8,8)}catch(e){return!1}};t.isPrivateKey=function(e){return/^[0-9A-Fa-f]{64}$/.test(e)};t.isPublicKey=function(e,t){try{var r;switch(e.substr(0,2)){case"04":if(!0===t)return!1;r=(0,o.getPublicKeyEncoded)(e);break;case"02":case"03":if(!1===t)return!1;r=e;break;default:return!1}var n=(0,o.getPublicKeyUnencoded)(r),i=parseInt(n.substr(n.length-2,2),16);if("02"===r.substr(0,2)&&i%2==0)return!0;if("03"===r.substr(0,2)&&i%2==1)return!0}catch(e){}return!1};t.isScriptHash=function(e){return(0,a.isHex)(e)&&40===e.length};t.isAddress=function(e){try{var t=(0,a.ab2hexstring)(i.default.decode(e));if((0,a.hash256)(t.slice(0,42)).substr(0,8)!==t.substr(42,8))return!1;var r=(0,a.reverseHex)(t.slice(2,42));return(0,o.getAddressFromScriptHash)(r)===e}catch(e){return!1}}},function(e,t,r){var n=t;n.utils=r(6),n.common=r(13),n.sha=r(118),n.ripemd=r(114),n.hmac=r(113),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){var n=r(128);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t){e.exports=require("crypto")},function(e,t,r){"use strict";var n=r(67);e.exports=function(e,t,r,i,a){var o=new Error(e);return n(o,t,r,i,a)}},function(e,t,r){"use strict";var n=r(5),i=r(156),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,f={adapter:("undefined"!=typeof XMLHttpRequest?s=r(155):"undefined"!=typeof process&&(s=r(150)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){f.headers[e]={}}),n.forEach(["post","put","patch"],function(e){f.headers[e]=n.merge(a)}),e.exports=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doSendAsset=t.doMintTokens=t.doClaimAllGas=t.getWalletDBHeight=t.getTransactionHistory=t.getRPCEndpoint=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getAPIEndpoint=t.name=void 0;var n=u(r(20)),i=r(8),a=r(11),o=r(12),s=r(2),f=r(0),c=r(10);function u(e){return e&&e.__esModule?e:{default:e}}var d=(0,u(r(1)).default)("api");t.name="neonDB";var l=null,h=function(e){return c.networks[e]?c.networks[e].extra.neonDB:e};t.getAPIEndpoint=h;var p=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/balance/"+t).then(function(r){var n=new i.Balance({net:e,address:r.data.address});return Object.keys(r.data).map(function(e){"net"!==e&&"address"!==e&&n.addAsset(e,r.data[e])}),d.info("Retrieved Balance for ".concat(t," from neonDB ").concat(e)),n})};t.getBalance=p;var b=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){var n=r.data;return n.claims=n.claims.map(function(e){return{claim:new f.Fixed8(e.claim).div(1e8),index:e.index,txid:e.txid,start:new f.Fixed8(e.start),end:new f.Fixed8(e.end),value:e.value}}),d.info("Retrieved Claims for ".concat(t," from neonDB ").concat(e)),new i.Claims(n)})};t.getClaims=b;t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){return d.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neonDB ").concat(e)),new f.Fixed8(r.data.total_claim+r.data.total_unspent_claim).div(1e8)})};var v=function e(t){var r=h(t);return n.default.get(r+"/v2/network/nodes").then(function(r){var n=r.data.nodes.filter(function(e){return e.status}),i=0,a=[],s=!0,f=!1,u=void 0;try{for(var d,h=n[Symbol.iterator]();!(s=(d=h.next()).done);s=!0){var p=d.value;c.httpsOnly&&!p.url.includes("https://")||(p.block_height>i?(i=p.block_height,a=[p]):p.block_height===i&&a.push(p))}}catch(e){f=!0,u=e}finally{try{s||null==h.return||h.return()}finally{if(f)throw u}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(l))return new o.RPCClient(l).ping().then(function(r){return r<=c.timeout.ping?l:(l=null,e(t))});var v=b.map(function(e){return new o.RPCClient(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return l=e,e})};t.getRPCEndpoint=v;t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/history/"+t).then(function(r){return d.info("Retrieved History for ".concat(t," from neonDB ").concat(e)),r.data.history.map(function(e){return{change:{NEO:new f.Fixed8(e.NEO||0),GAS:new f.Fixed8(e.GAS||0)},blockHeight:new f.Fixed8(e.block_index),txid:e.txid}})})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v2/block/height").then(function(e){return parseInt(e.data.block_height)})};t.doClaimAllGas=function(e,t,r){d.warn("doClaimAllGas will be deprecated in favor of claimGas");var n,s,f=new i.Account(t),c=v(e),u=b(e,f.address);return Promise.all([c,u]).then(function(e){s=e[0];var t=e[1];if(0===t.length)throw new Error("No claimable gas!");var n=a.Transaction.createClaimTx(f.publicKey,t);return r?r(n,f.publicKey):n.sign(f.privateKey)}).then(function(e){return n=e,o.Query.sendRawTransaction(n).execute(s)}).then(function(e){return!0===e.result?e.txid=n:d.error("Transaction failed: ".concat(n.serialize())),e})};t.doMintTokens=function(e,t,r,n,c,u){d.warn("doMintTokens will be deprecated in favor of doInvoke");var l,h,b=new i.Account(r),m=[{assetId:s.ASSET_ID.NEO,value:n,scriptHash:t}],g={operation:"mintTokens",scriptHash:t,args:[]},y=v(e),w=p(e,b.address);return Promise.all([y,w]).then(function(e){h=e[0];var r=e[1],n=[{data:(0,f.reverseHex)(t),usage:a.TxAttrUsage.Script}],i=a.Transaction.createInvocationTx(r,m,g,c,{attributes:n});return u?u(i,b.publicKey):i.sign(b.privateKey)}).then(function(e){return l=e,o.Query.getContractState(t).execute(h)}).then(function(e){var t={invocationScript:"0000",verificationScript:e.result.script};return l.scripts.unshift(t),o.Query.sendRawTransaction(l).execute(h)}).then(function(e){return!0===e.result?e.txid=l.hash:d.error("Transaction failed: ".concat(l.serialize())),e})};t.doSendAsset=function(e,t,r,n,f){d.warn("doSendAsset will be deprecated in favor of sendAsset");var c,u,l=new i.Account(r),h=new i.Account(t),b=v(e),m=p(e,l.address),g=Object.keys(n).map(function(e){return{assetId:s.ASSET_ID[e],value:n[e],scriptHash:h.scriptHash}});return Promise.all([b,m]).then(function(e){u=e[0];var t=e[1],r=a.Transaction.createContractTx(t,g);return f?f(r,l.publicKey):r.sign(l.privateKey)}).then(function(e){return c=e,o.Query.sendRawTransaction(c).execute(u)}).then(function(e){return!0===e.result?e.txid=c.hash:d.error("Transaction failed: ".concat(c.serialize())),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadBalance=t.setSwitchFreeze=t.setApiSwitch=void 0;var n,i=o(r(31)),a=o(r(33));function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var s=(0,((n=r(1))&&n.__esModule?n:{default:n}).default)("api"),f=0,c=!1;t.setApiSwitch=function(e){e>=0&&e<=1&&(f=e)};t.setSwitchFreeze=function(e){c=!!e,s.info("core/setSwitchFreeze API switch is frozen: ".concat(c))};var u=function(){!c&&f>0&&(f-=.2,s.info("core API Switch increasing weight towards neoscan"))},d=function(){!c&&f<1&&(f+=.2,s.info("core API Switch increasing weight towards neonDB"))};t.loadBalance=function(e,t){return Math.random()>f?e(t,a).then(function(e){return u(),e}).catch(function(){return d(),e(t,i)}):e(t,i).then(function(e){return d(),e}).catch(function(){return u(),e(t,a)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHistory=t.getWalletDBHeight=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getRPCEndpoint=t.getAPIEndpoint=t.name=void 0;var n=u(r(20)),i=r(8),a=r(2),o=r(0),s=r(10),f=u(r(1)),c=u(r(36));function u(e){return e&&e.__esModule?e:{default:e}}var d=(0,f.default)("api");t.name="neoscan";var l=null,h=function(e){return s.networks[e]?s.networks[e].extra.neoscan:e};t.getAPIEndpoint=h;t.getRPCEndpoint=function e(t){var r=h(t);return n.default.get(r+"/v1/get_all_nodes").then(function(r){var n=r.data,i=0,a=[],o=!0,f=!1,u=void 0;try{for(var d,h=n[Symbol.iterator]();!(o=(d=h.next()).done);o=!0){var p=d.value;s.httpsOnly&&!p.url.includes("https://")||(p.height>i?(i=p.height,a=[p]):p.height===i&&a.push(p))}}catch(e){f=!0,u=e}finally{try{o||null==h.return||h.return()}finally{if(f)throw u}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(l))return new c.default(l).ping().then(function(r){return r<=s.timeout.ping?l:(l=null,e(t))});var v=b.map(function(e){return new c.default(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return l=e,e})};t.getBalance=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_balance/"+t).then(function(r){if(r.data.address!==t&&null===r.data.balance)return new i.Balance({address:r.data.address});var n=new i.Balance({address:r.data.address,net:e});return r.data.balance.map(function(e){n.addAsset(e.asset,{balance:e.amount,unspent:p(e.unspent)})}),d.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),n})};t.getClaims=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_claimable/"+t).then(function(r){if(r.address!==t&&null===r.data.claimable)return new i.Claims({address:r.data.address});var n=b(r.data.claimable);return d.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),new i.Claims({net:e,address:r.data.address,claims:n})})};t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_unclaimed/"+t).then(function(r){return d.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neoscan ").concat(e)),new o.Fixed8(r.data.unclaimed||0)})};var p=function(e){return e.map(function(e){return{index:e.n,txid:e.txid,value:e.value}})},b=function(e){return e.map(function(e){return{start:new o.Fixed8(e.start_height),end:new o.Fixed8(e.end_height),index:e.n,claim:new o.Fixed8(e.unclaimed),txid:e.txid,value:e.value}})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v1/get_height").then(function(e){return parseInt(e.data.height)})};t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_address_neon/"+t).then(function(r){return d.info("Retrieved History for ".concat(t," from neoscan ").concat(e)),v(r.data.txids)})};var v=function(e){var t=[],r=e.length-1;return e.forEach(function(n,i){var s,f,c,u;if(i!==r){var d=e[i+1],l=m(n.balance),h=m(d.balance);s={NEO:new o.Fixed8(l.NEO||0).minus(h.NEO||0),GAS:new o.Fixed8(l.GAS||0).minus(h.GAS||0)}}else{var p=n.asset_moved===a.ASSET_ID.NEO?"NEO":"GAS";f={},c=p,u=new o.Fixed8(n.amount_moved),c in f?Object.defineProperty(f,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):f[c]=u,s=f}t.push({txid:n.txid,blockHeight:n.block_height,change:s})}),t},m=function(e){return e.reduce(function(e,t){return e[t.asset]=new o.Fixed8(t.amount),e},{})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportClaimItem=t.ClaimItem=void 0;var n=r(0);t.ClaimItem=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{claim:e.claim?new n.Fixed8(e.claim):new n.Fixed8(0),txid:e.txid||"",index:e.index||0,value:e.value||0,start:e.start?new n.Fixed8(e.start):null,end:e.end?new n.Fixed8(e.end):null}};t.exportClaimItem=function(e){return{claim:e.claim.toNumber(),txid:e.txid,index:e.index,value:e.value,start:e.start?e.start.toNumber():null,end:e.end?e.end.toNumber():null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryRPC=t.default=void 0;var n=f(r(20)),i=r(11),a=r(2),o=f(r(1)),s=r(10);function f(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getBlockHash",value:function(t){return new e({method:"getblockhash",params:[t]})}},{key:"getBestBlockHash",value:function(){return new e({method:"getbestblockhash"})}},{key:"getBlockCount",value:function(){return new e({method:"getblockcount"})}},{key:"getBlockSysFee",value:function(t){return new e({method:"getblocksysfee",params:[t]})}},{key:"getConnectionCount",value:function(){return new e({method:"getconnectioncount"})}},{key:"getContractState",value:function(t){return new e({method:"getcontractstate",params:[t]})}},{key:"getPeers",value:function(){return new e({method:"getpeers"})}},{key:"getRawMemPool",value:function(){return new e({method:"getrawmempool"})}},{key:"getRawTransaction",value:function(t){return new e({method:"getrawtransaction",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getStorage",value:function(t,r){return new e({method:"getstorage",params:[t,r]})}},{key:"getTxOut",value:function(t,r){return new e({method:"gettxout",params:[t,r]})}},{key:"getVersion",value:function(){return new e({method:"getversion"})}},{key:"invoke",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2?n-2:0),a=2;a1&&void 0!==arguments[1]?arguments[1]:o.RPC_VERSION;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t===o.NEO_NETWORK.MAIN?this.net=o.DEFAULT_RPC.MAIN:t===o.NEO_NETWORK.TEST?this.net=o.DEFAULT_RPC.TEST:this.net=t,this.history=[],this.lastSeenHeight=0,this._latencies=[],this.version="",!a.default.valid(r))throw new Error("Invalid Version: ".concat(r));this.version=a.default.clean(r)}var t,r,s;return t=e,(r=[{key:"ping",value:function(){var e=this,t=Date.now(),r=n.default.getBlockCount();return this.execute(r,{timeout:f.timeout.ping}).then(function(r){e.lastSeenHeight=r.result;var n=Date.now()-t;return e.latency=n,n}).catch(function(t){return e.latency=f.timeout.ping,f.timeout.ping})}},{key:"execute",value:function(e,t){return this.history.push(e),d.info("RPC: ".concat(this.net," executing Query[").concat(e.req.method,"]")),e.execute(this.net,t)}},{key:"query",value:function(e,t){var r=new n.default(e);return this.execute(r,t)}},{key:"getAccountState",value:function(e){if(!(0,i.isAddress)(e))throw new Error("Invalid address given: ".concat(e));return this.execute(n.default.getAccountState(e)).then(function(e){return e.result})}},{key:"getAssetState",value:function(e){return this.execute(n.default.getAssetState(e)).then(function(e){return e.result})}},{key:"getBlock",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getBlock(e,t)).then(function(e){return e.result})}},{key:"getBlockHash",value:function(e){return this.execute(n.default.getBlockHash(e)).then(function(e){return e.result})}},{key:"getBestBlockHash",value:function(){return this.execute(n.default.getBestBlockHash()).then(function(e){return e.result})}},{key:"getBlockCount",value:function(){return this.execute(n.default.getBlockCount()).then(function(e){return e.result})}},{key:"getBlockSysFee",value:function(e){return this.execute(n.default.getBlockSysFee(e)).then(function(e){return e.result})}},{key:"getConnectionCount",value:function(){return this.execute(n.default.getConnectionCount()).then(function(e){return e.result})}},{key:"getContractState",value:function(e){return this.execute(n.default.getContractState(e)).then(function(e){return e.result})}},{key:"getPeers",value:function(){return this.execute(n.default.getPeers()).then(function(e){return e.result})}},{key:"getRawMemPool",value:function(){return this.execute(n.default.getRawMemPool()).then(function(e){return e.result})}},{key:"getRawTransaction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getRawTransaction(e,t)).then(function(e){return e.result})}},{key:"getStorage",value:function(e,t){return this.execute(n.default.getStorage(e,t)).then(function(e){return e.result})}},{key:"getTxOut",value:function(e,t){return this.execute(n.default.getTxOut(e,t)).then(function(e){return e.result})}},{key:"getVersion",value:function(){var e=this;return this.execute(n.default.getVersion()).then(function(t){var r=t.result.useragent.match(l)[1];return e.version=a.default.clean(r),e.version}).catch(function(t){if(t.message.includes("Method not found"))return e.version=o.RPC_VERSION,e.version;throw t})}},{key:"invoke",value:function(e,t){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invoke(e,t)).then(function(e){return e.result})}},{key:"invokeFunction",value:function(e,t,r){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeFunction(e,t,r)).then(function(e){return e.result})}},{key:"invokeScript",value:function(e){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeScript(e)).then(function(e){return e.result})}},{key:"sendRawTransaction",value:function(e){return this.execute(n.default.sendRawTransaction(e)).then(function(e){return e.result})}},{key:"submitBlock",value:function(e){return this.execute(n.default.submitBlock(e)).then(function(e){return e.result})}},{key:"validateAddress",value:function(e){return this.execute(n.default.validateAddress(e)).then(function(e){return e.result.isvalid})}},{key:Symbol.toStringTag,get:function(){return"RPC Client"}},{key:"latency",get:function(){return 0===this._latencies.length?99999:Math.floor(this._latencies.reduce(function(e,t){return e+t},0)/this._latencies.length)},set:function(e){this._latencies.length>4&&this._latencies.shift(),this._latencies.push(e)}}])&&u(t.prototype,r),s&&u(t,s),e}();t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.balancedApproach=t.biggestFirst=t.smallestFirst=void 0;var n=r(0);t.smallestFirst=function(e,t){return e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()}),i(t,e.unspent)};t.biggestFirst=function(e,t){return e.unspent.sort(function(e,t){return t.value.sub(e.value).toNumber()}),i(t,e.unspent)};t.balancedApproach=function(e,t){e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()});var r=e.unspent.filter(function(e){return e.value.lte(t)});if(0===r.length)return[e.unspent[0]];var n=r.findIndex(function(e){return t.eq(e.value)});if(n>=0)return[r[n]];var a=e.unspent.slice(r.length),o=[];r.length>0&&o.push(r.pop());var s=t.minus(o.length>0?o[0].value:0),f=i(s,r.concat(a));return o.concat(f)};var i=function(e,t){for(var r=0,i=new n.Fixed8(0);i.lt(e);){if((r+=1)>t.length)throw new Error("Insufficient assets! Reached end of unspent coins! ".concat(t.length));i=i.add(t[r-1].value)}return t.slice(0,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(77)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.Name||t.name||r||"RandomNet",r&&(this.name=r);var i=t.protocol||t.ProtocolConfiguration||{};this.protocol=new n.default(i),this.nodes=t.Nodes||t.nodes||[],this.extra=t.ExtraConfiguration||t.extra||{}}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new e("string"==typeof jsonString?JSON.parse(t):t,r)}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing Network file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"export",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?JSON.stringify({ProtocolConfiguration:this.protocol.export()}):{Name:this.name,ProtocolConfiguration:this.protocol.export(),ExtraConfiguration:this.extra,Nodes:this.nodes}}},{key:"writeFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.default.writeFile(e,this.export(t),function(e){if(e)throw e;return s.info("Network file written!"),!0})}},{key:"update",value:function(){return this}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHash=t.signTransaction=t.deserializeTransaction=t.serializeTransaction=t.calculateInputs=void 0;var n,i=r(0),a=r(8),o=r(21),s=r(2),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(15)),c=r(10);var u=(0,((n=r(1))&&n.__esModule?n:{default:n}).default)("tx");t.calculateInputs=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===t&&(t=[]),null===n&&(n=c.defaultCalculationStrategy);var o=t.reduce(function(e,t){return e[t.assetId]?e[t.assetId]=e[t.assetId].add(t.value):e[t.assetId]=t.value,e},{});return(r=new i.Fixed8(r)).gt(0)&&(o[s.ASSET_ID.GAS]?o[s.ASSET_ID.GAS]=o[s.ASSET_ID.GAS].add(r):o[s.ASSET_ID.GAS]=r),Object.keys(o).map(function(t){var r=o[t],i=s.ASSETS[t];if(-1===e.assetSymbols.indexOf(i))throw new Error("This balance does not contain any ".concat(i,"!"));var f=e.assets[i];if(f.balance.lt(r))throw new Error("Insufficient ".concat(s.ASSETS[t],"! Need ").concat(r.toString()," but only found ").concat(f.balance.toString()));return d((0,a.AssetBalance)(f),r,t,e.address,n)}).reduce(function(e,t){return{inputs:e.inputs.concat(t.inputs),change:e.change.concat(t.change)}},{inputs:[],change:[]})};var d=function(e,t,r,n,o){var s=o(e,t),f=s.reduce(function(e,t){return e.add(t.value)},new i.Fixed8(0)),c=[];return f.gt(t)&&c.push({assetId:r,value:f.sub(t),scriptHash:(0,a.getScriptHashFromAddress)(n)}),{inputs:s.map(function(e){return{prevHash:e.txid,prevIndex:e.index}}),change:c}},l=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";r+=(0,i.num2hexstring)(e.type),r+=(0,i.num2hexstring)(e.version),r+=o.serializeExclusive[e.type](e),r+=(0,i.num2VarInt)(e.attributes.length);var n=!0,a=!1,s=void 0;try{for(var c,u=e.attributes[Symbol.iterator]();!(n=(c=u.next()).done);n=!0){var d=c.value;r+=f.serializeTransactionAttribute(d)}}catch(e){a=!0,s=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw s}}r+=(0,i.num2VarInt)(e.inputs.length);var l=!0,h=!1,p=void 0;try{for(var b,v=e.inputs[Symbol.iterator]();!(l=(b=v.next()).done);l=!0){var m=b.value;r+=f.serializeTransactionInput(m)}}catch(e){h=!0,p=e}finally{try{l||null==v.return||v.return()}finally{if(h)throw p}}r+=(0,i.num2VarInt)(e.outputs.length);var g=!0,y=!1,w=void 0;try{for(var _,x=e.outputs[Symbol.iterator]();!(g=(_=x.next()).done);g=!0){var k=_.value;r+=f.serializeTransactionOutput(k)}}catch(e){y=!0,w=e}finally{try{g||null==x.return||x.return()}finally{if(y)throw w}}if(t&&e.scripts&&e.scripts.length>0){r+=(0,i.num2VarInt)(e.scripts.length);var S=!0,A=!1,M=void 0;try{for(var E,P=e.scripts[Symbol.iterator]();!(S=(E=P.next()).done);S=!0){var I=E.value;r+=f.serializeWitness(I)}}catch(e){A=!0,M=e}finally{try{S||null==P.return||P.return()}finally{if(A)throw M}}}return r};t.serializeTransaction=l;t.deserializeTransaction=function(e){var t=new i.StringStream(e),r={};r.type=parseInt(t.read(1),16),r.version=parseInt(t.read(1),16);var n=o.deserializeExclusive[r.type](t);r.attributes=[],r.inputs=[],r.outputs=[],r.scripts=[];for(var a=t.readVarInt(),s=0;s1&&void 0!==arguments[1]&&arguments[1];if((0,i.ensureHex)(e),40!==e.length)throw new Error("ScriptHash should be 20 bytes long!");return this.emit(t?a.default.TAILCALL:a.default.APPCALL,(0,i.reverseHex)(e))}},{key:"_emitArray",value:function(e){for(var t=e.length-1;t>=0;t--)this.emitPush(e[t]);return this.emitPush(e.length).emit(a.default.PACK)}},{key:"_emitString",value:function(e){(0,i.ensureHex)(e);var t=e.length/2;if(t<=a.default.PUSHBYTES75)this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<256)this.emit(a.default.PUSHDATA1),this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<65536)this.emit(a.default.PUSHDATA2),this.str+=(0,i.num2hexstring)(t,2,!0),this.str+=e;else{if(!(t<4294967296))throw new Error("String too big to emit!");this.emit(a.default.PUSHDATA4),this.str+=(0,i.num2hexstring)(t,4,!0),this.str+=e}return this}},{key:"_emitNum",value:function(e){if(-1===e)return this.emit(a.default.PUSHM1);if(0===e)return this.emit(a.default.PUSH0);if(e>0&&e<=16)return this.emit(a.default.PUSH1-1+e);var t=(0,i.int2hex)(e);return this.emitPush((0,i.reverseHex)("0".repeat(16-t.length)+t))}},{key:"_emitParam",value:function(e){if(!e.type)throw new Error("No type available!");if(!l(e.value))throw new Error("Invalid value provided!");switch(e.type){case"String":return this._emitString((0,i.str2hexstring)(e.value));case"Boolean":return this.emit(e.value?a.default.PUSHT:a.default.PUSHF);case"Integer":return this._emitNum(e.value);case"ByteArray":return this._emitString(e.value);case"Array":return this._emitArray(e.value);case"Hash160":return this._emitString((0,i.reverseHex)(e.value))}}},{key:"emit",value:function(e,t){return this.str+=(0,i.num2hexstring)(e),t&&(this.str+=t),this}},{key:"emitAppCall",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.emitPush(r),t){for(var a="",o=0;o=81&&n<=96:t.args.unshift(n-80);break;case 193===n:for(var a=t.args.shift(),o=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index||0,txid:e.txid||"",value:e.value?new n.Fixed8(e.value):new n.Fixed8(0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(0),a=(n=r(43))&&n.__esModule?n:{default:n};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.balance,r=e.unspent,n=e.spent,o=e.unconfirmed;return{balance:t?new i.Fixed8(t):new i.Fixed8(0),unspent:r?r.map(function(e){return(0,a.default)(e)}):[],spent:n?n.map(function(e){return(0,a.default)(e)}):[],unconfirmed:o?o.map(function(e){return(0,a.default)(e)}):[]}}},function(e,t){function r(e){return"function"==typeof e?Buffer("","utf8"):e instanceof Buffer?e:"string"==typeof e?new Buffer(e,"utf8"):new Buffer(String(e||""),"utf8")}function n(e){return"number"!=typeof e?null:(e=Math.round(e))<1?null:e>256?null:e}e.exports=function(e,t,i,a){return{password:r(e),salt:r(t),options:function(e){return{maxmem:function(e){if("number"!=typeof e)return null;for(var t=4;t<=2048;t*=2){var r=1048576*t;if(r>e)return null;if(r==e)return r}return null}((e=null!==e&&"object"==typeof e?e:{}).maxmem)||33554432,cost:function(e){if("number"!=typeof e)return null;for(var t=8;t<=64;t++){var r=Math.pow(2,t);if(r>e)return null;if(r==e)return r}return null}(e.cost)||Math.pow(2,14),blockSize:n(e.blockSize)||8,parallel:n(e.parallel)||1,size:(t=e.size,("number"!=typeof t?null:(t=Math.round(t))<1?null:t>2048?null:t)||64)};var t}(i),callback:function(e){return"function"==typeof e?e:null}(arguments[arguments.length-1])}}},function(e,t,r){var n,i,a,o,s,f,c,u;e.exports=(n=r(3),r(97),r(96),a=(i=n).lib,o=a.Base,s=a.WordArray,f=i.algo,c=f.MD5,u=f.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=s.create(),a=i.words,o=r.keySize,f=r.iterations;a.length2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by encryptAsync in the next major version bump");var i={cost:(r=w(r)).n,blockSize:r.r,parallel:r.p},a=new l.default(e),f=(0,o.default)((0,o.default)(m.Latin1.parse(a.address))).toString().slice(0,8),c=u.default.hashSync(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(f,"hex"),i).toString("hex"),d=c.slice(0,64),b=c.slice(64),v=(0,h.hexXor)(a.privateKey,d),_=s.default.encrypt(m.Hex.parse(v),m.Hex.parse(b),g),x=p.NEP_HEADER+p.NEP_FLAG+f+_.ciphertext.toString(),k=n.default.encode(Buffer.from(x,"hex"));return y.info("Successfully encrypted key to ".concat(k)),k};t.encryptAsync=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to encrypt in the next major version bump"),new Promise(function(i,a){var f=r=w(r),c=f.n,u=f.r,b=f.p,v=new l.default(e),_=(0,o.default)((0,o.default)(m.Latin1.parse(v.address))).toString().slice(0,8);(0,d.default)(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(_,"hex"),c,u,b,64,function(e,t,r){if(null!=e)a(e);else if(r){var o=Buffer.from(r).toString("hex"),f=o.slice(0,64),c=o.slice(64),u=(0,h.hexXor)(v.privateKey,f),d=s.default.encrypt(m.Hex.parse(u),m.Hex.parse(c),g),l=p.NEP_HEADER+p.NEP_FLAG+_+d.ciphertext.toString(),b=n.default.encode(Buffer.from(l,"hex"));y.info("Successfully encrypted key to ".concat(b)),i(b)}})})};t.decrypt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by decryptAsync in the next major version bump");var i={cost:(r=w(r)).n,blockSize:r.r,parallel:r.p},a=(0,h.ab2hexstring)(n.default.decode(e)),f=a.substr(6,8),c=a.substr(-64),d=u.default.hashSync(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(f,"hex"),i).toString("hex"),b=d.slice(0,64),v=d.slice(64),_={ciphertext:m.Hex.parse(c),salt:""},x=s.default.decrypt(_,m.Hex.parse(v),g),k=(0,h.hexXor)(x.toString(),b),S=new l.default(k);if(f!==(0,o.default)((0,o.default)(m.Latin1.parse(S.address))).toString().slice(0,8))throw new Error("Wrong Password!");return y.info("Successfully decrypted ".concat(e)),S.WIF};t.decryptAsync=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to decrypt in the next major version bump"),new Promise(function(i,a){var f=r=w(r),c=f.n,u=f.r,p=f.p,b=(0,h.ab2hexstring)(n.default.decode(e)),v=b.substr(6,8),_=b.substr(-64);(0,d.default)(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(v,"hex"),c,u,p,64,function(t,r,n){if(null!=t)a(t);else if(n){var f=Buffer.from(n).toString("hex"),c=f.slice(0,64),u=f.slice(64),d={ciphertext:m.Hex.parse(_),salt:""},p=s.default.decrypt(d,m.Hex.parse(u),g),b=(0,h.hexXor)(p.toString(),c),w=new l.default(b),x=(0,o.default)((0,o.default)(m.Latin1.parse(w.address))).toString().slice(0,8);v!==x&&a(new Error("Wrong Password or scrypt parameters!")),y.info("Successfully decrypted ".concat(e)),i(w.WIF)}})})};var w=function(e){var t=Object.assign({},p.DEFAULT_SCRYPT,e);return{n:t.n||t.cost,r:t.r||t.blockSize,p:t.p||t.parallel}}},function(e,t,r){var n;e.exports=(n=r(3),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],f=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),f[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],u=r[5],d=r[6],l=r[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[h-2],m=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[h]=b+c[h-7]+m+c[h-16]}var g=n&i^n&a^i&a,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=l+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&d)+f[h]+c[h];l=d,d=u,u=s,s=o+w|0,o=a,a=i,i=n,n=w+(y+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+u|0,r[6]=r[6]+d|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(u),t.HmacSHA256=a._createHmacHelper(u)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(3),n.enc.Hex)},function(e,t,r){"use strict";var n=r(6),i=r(13),a=r(9),o=n.rotr64_hi,s=n.rotr64_lo,f=n.shr64_hi,c=n.shr64_lo,u=n.sum64,d=n.sum64_hi,l=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,v=n.sum64_5_lo,m=i.BlockHash,g=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function x(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function S(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=o(e,t,1)^o(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function C(e,t){var r=o(e,t,19)^o(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&i;a?r.push(a,o):r.push(o)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=require("buffer")},function(e,t,r){var n=r(55),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";var n=r(130),i=r(129);e.exports=i(function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()})},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){e.exports=require("os")},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,a=i-(r||i);e.diff=a,e.prev=r,e.curr=i,r=i;for(var o=new Array(arguments.length),s=0;s=300&&e.statusCode<400){if(++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Error("Max redirects exceeded."));var r,i=this._options.headers;if(307!==e.statusCode&&!(this._options.method in c))for(r in this._options.method="GET",this._requestBodyBuffers=[],i)/^content-/i.test(r)&&delete i[r];if(!this._isRedirect)for(r in i)/^host$/i.test(r)&&delete i[r];var a=n.resolve(this._currentUrl,t);f("redirecting to",a),Object.assign(this._options,n.parse(a)),this._isRedirect=!0,this._performRequest()}else e.responseUrl=this._currentUrl,this.emit("response",e),this._requestBodyBuffers=[]},e.exports=l({http:i,https:a}),e.exports.wrap=l},function(e,t){e.exports=require("https")},function(e,t){e.exports=require("http")},function(e,t,r){"use strict";var n=r(5);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))}))}),a=o.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},function(e,t,r){"use strict";var n=r(29);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;nparseInt(a.scriptHash,16)?e.tx.scripts.push(n):e.tx.scripts.unshift(n),e}):Promise.resolve(e)},_=function(e){if(e.override||(e.override={}),e.sendingFromSmartContract){var t=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)(t.scriptHash))}return Promise.resolve(e)},x=function(e){if(e.sendingFromSmartContract){var t=(0,i.getScriptHashFromAddress)(e.address);return o.Query.getContractState(t).execute(e.url).then(function(r){var n=r.result.parameters,a={invocationScript:"00".repeat(n.length),verificationScript:""},o=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);return parseInt(t,16)>parseInt(o.scriptHash,16)?e.tx.scripts.push(a):e.tx.scripts.unshift(a),e})}return Promise.resolve(e)},k=function(e){return 0===e.tx.inputs.length&&0===e.tx.outputs.length&&(e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)((0,i.getScriptHashFromAddress)(e.address))),e.tx.addRemark(Date.now().toString()+(0,f.ab2hexstring)((0,i.generateRandomArray)(4)))),Promise.resolve(e)},S=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n5&&void 0!==arguments[5]?arguments[5]:0,h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;d.warn("doTransferToken will be deprecated in favor of doInvoke");var p,b,v=new a.Account(r),m=(0,f.getRPCEndpoint)(e),g=(0,f.getBalance)(e,v.address);return Promise.all([m,g]).then(function(e){b=e[0];var r=e[1],o=(0,a.getScriptHashFromAddress)(v.address),f=(0,s.reverseHex)((0,a.getScriptHashFromAddress)(n)),d=[{assetId:u.ASSET_ID.GAS,value:1e-8,scriptHash:o}],p={scriptHash:t,operation:"transfer",args:[(0,s.reverseHex)(o),f,i]},m=c.Transaction.createInvocationTx(r,d,p,l,{version:1});return h?h(m,v.publicKey):m.sign(v.privateKey)}).then(function(e){return p=e,o.Query.sendRawTransaction(p).execute(b)}).then(function(e){return!0===e.result&&(e.txid=p.hash),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrices=t.getPrice=void 0;var n=i(r(20));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"NEO",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd";return o.warn("This is deprecated in favor of getPrices. There is a known bug for NEP5 tokens with this function."),f("https://api.coinmarketcap.com/v1/ticker/".concat(e.toLowerCase(),"/"),t).then(function(t){var r=t[e.toUpperCase()];if(r)return r;throw new Error("Something went wrong with the CoinMarketCap API!")}).catch(function(e){throw o.error(e.message),e})};function f(e,t){return t=t.toLowerCase(),s.includes(t)?n.default.get("".concat(e,"?limit=0&convert=").concat(t)).then(function(e){var r=e.data;if(r.error)throw new Error(r.error);return function(e,t){var r={};return e.forEach(function(e){r[e.symbol]=parseFloat(e["price_".concat(t.toLowerCase())])}),r}(r,t)}):Promise.reject(new ReferenceError("".concat(t," is not one of the accepted currencies!")))}t.getPrices=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["NEO"];return f("https://api.coinmarketcap.com/v1/ticker/",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd").then(function(t){e=e.map(function(e){return e.toUpperCase()});var r=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t.address||"",this.net=t.net||"NoNet",this.claims=t.claims?t.claims.map(function(e){return(0,i.ClaimItem)(e)}):[]}var t,r,n;return t=e,(r=[{key:a.default.inspect.custom,value:function(e,t){var r=this.claims.map(function(e){return"".concat(e.txid," <").concat(e.index,">: ").concat(e.claim.toString())});return"[Claims(".concat(this.net,"): ").concat(this.address,"]\n").concat(JSON.stringify(r,null,2))}},{key:"export",value:function(){return{address:this.address,net:this.net,claims:this.claims.map(i.exportClaimItem)}}},{key:"slice",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new e({address:this.address,net:this.net,claims:this.claims.slice(t,r)})}},{key:Symbol.toStringTag,get:function(){return"Claims"}}])&&o(t.prototype,r),n&&o(t,n),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(16)),i=o(r(23)),a=r(2);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:a.DEFAULT_WALLET,r=t.name,n=void 0===r?"myWallet":r,i=t.version,o=void 0===i?a.DEFAULT_WALLET.version:i,s=t.scrypt,c=void 0===s?a.DEFAULT_SCRYPT:s,u=t.accounts,d=void 0===u?[]:u,l=t.extra,h=void 0===l?null:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=n,this.version=o,this.scrypt={n:c.n||c.cost,r:c.r||c.blockSize,p:c.p||c.parallel},this.accounts=[];var p=!0,b=!1,v=void 0;try{for(var m,g=d[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var y=m.value;this.addAccount(y)}}catch(e){b=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(b)throw v}}this.extra=h,f.info("New Wallet created: ".concat(this.name))}var t,r,o;return t=e,r=[{key:"addAccount",value:function(e){var t=this.accounts.length;e instanceof i.default||(e=new i.default(e)),this.accounts.push(e);try{var r=e.address;f.info("Added Account: ".concat(r," to Wallet ").concat(this.name))}catch(e){f.warn("Encrypted account added to Wallet ".concat(this.name,". You will not be able to export this wallet without first decrypting this account"))}return t}},{key:"decrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].decrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"decryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.decrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"encrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].encrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"encryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.encrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"export",value:function(){return{name:this.name,version:this.version,scrypt:this.scrypt,accounts:this.accounts.map(function(e){return e.export()}),extra:this.extra}}},{key:"setDefault",value:function(e){for(var t=0;t)?=?)";var S=s++;o[S]=o[c]+"|x|X|\\*";var A=s++;o[A]=o[f]+"|x|X|\\*";var M=s++;o[M]="[v=\\s]*("+o[A]+")(?:\\.("+o[A]+")(?:\\.("+o[A]+")(?:"+o[b]+")?"+o[g]+"?)?)?";var E=s++;o[E]="[v=\\s]*("+o[S]+")(?:\\.("+o[S]+")(?:\\.("+o[S]+")(?:"+o[v]+")?"+o[g]+"?)?)?";var P=s++;o[P]="^"+o[k]+"\\s*"+o[M]+"$";var I=s++;o[I]="^"+o[k]+"\\s*"+o[E]+"$";var C=s++;o[C]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=s++;o[O]="(?:~>?)";var T=s++;o[T]="(\\s*)"+o[O]+"\\s+",a[T]=new RegExp(o[T],"g");var R=s++;o[R]="^"+o[O]+o[M]+"$";var N=s++;o[N]="^"+o[O]+o[E]+"$";var F=s++;o[F]="(?:\\^)";var j=s++;o[j]="(\\s*)"+o[F]+"\\s+",a[j]=new RegExp(o[j],"g");var B=s++;o[B]="^"+o[F]+o[M]+"$";var z=s++;o[z]="^"+o[F]+o[E]+"$";var H=s++;o[H]="^"+o[k]+"\\s*("+_+")$|^$";var L=s++;o[L]="^"+o[k]+"\\s*("+w+")$|^$";var q=s++;o[q]="(\\s*)"+o[k]+"\\s*("+_+"|"+o[M]+")",a[q]=new RegExp(o[q],"g");var D=s++;o[D]="^\\s*("+o[M]+")\\s+-\\s+("+o[M]+")\\s*$";var U=s++;o[U]="^\\s*("+o[E]+")\\s+-\\s+("+o[E]+")\\s*$";var K=s++;o[K]="(<|>)?=?\\s*\\*";for(var V=0;Vn)return null;if(!(t?a[x]:a[y]).test(e))return null;try{return new W(e,t)}catch(e){return null}}function W(e,t){if(e instanceof W){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof W))return new W(e,t);r("SemVer",e,t),this.loose=t;var o=e.trim().match(t?a[x]:a[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new W(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(J(e,t))return null;var r=Y(e),n=Y(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=G;var X=/^[0-9]+$/;function G(e,t){var r=X.test(e),n=X.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function Z(e,t,r){return new W(e,r).compare(new W(t,r))}function Q(e,t,r){return Z(e,t,r)>0}function $(e,t,r){return Z(e,t,r)<0}function J(e,t,r){return 0===Z(e,t,r)}function ee(e,t,r){return 0!==Z(e,t,r)}function te(e,t,r){return Z(e,t,r)>=0}function re(e,t,r){return Z(e,t,r)<=0}function ne(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=J(e,r,n);break;case"!=":i=ee(e,r,n);break;case">":i=Q(e,r,n);break;case">=":i=te(e,r,n);break;case"<":i=$(e,r,n);break;case"<=":i=re(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ie(e,t){if(e instanceof ie){if(e.loose===t)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);r("comparator",e,t),this.loose=t,this.parse(e),this.semver===ae?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new W(e,t).major},t.minor=function(e,t){return new W(e,t).minor},t.patch=function(e,t){return new W(e,t).patch},t.compare=Z,t.compareLoose=function(e,t){return Z(e,t,!0)},t.rcompare=function(e,t,r){return Z(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=Q,t.lt=$,t.eq=J,t.neq=ee,t.gte=te,t.lte=re,t.cmp=ne,t.Comparator=ie;var ae={};function oe(e,t){if(e instanceof oe)return e.loose===t?e:new oe(e.raw,t);if(e instanceof ie)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function fe(e,t,r,n,i,a,o,s,f,c,u,d,l){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(s=se(f)?"":se(c)?"<"+(+f+1)+".0.0":se(u)?"<"+f+"."+(+c+1)+".0":d?"<="+f+"."+c+"."+u+"-"+d:"<="+s)).trim()}function ce(e,t){for(var n=0;n0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,a,o,s,f;switch(e=new W(e,n),t=new oe(t,n),r){case">":i=Q,a=re,o=$,s=">",f=">=";break;case"<":i=$,a=te,o=Q,s="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var c=0;c=0.0.0")),u=u||e,d=d||e,i(e.semver,u.semver,n)?u=e:o(e.semver,d.semver,n)&&(d=e)}),u.operator===s||u.operator===f)return!1;if((!d.operator||d.operator===s)&&a(e,d.semver))return!1;if(d.operator===f&&o(e,d.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.loose?a[H]:a[L],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new W(r[2],this.loose):this.semver=ae},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return r("Comparator.test",e,this.loose),this.semver===ae||("string"==typeof e&&(e=new W(e,this.loose)),ne(e,this.operator,this.semver,this.loose))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new oe(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),f=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||f},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),r("range",e,t);var n=t?a[U]:a[D];e=e.replace(n,fe),r("hyphen replace",e),e=e.replace(a[q],"$1$2$3"),r("comparator trim",e,a[q]),e=(e=(e=e.replace(a[T],"$1~")).replace(a[j],"$1^")).split(/\s+/).join(" ");var i=t?a[H]:a[L],o=e.split(" ").map(function(e){return function(e,t){return r("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t?a[z]:a[B];return e.replace(n,function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),se(n)?s="":se(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":se(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t?a[N]:a[R];return e.replace(n,function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),se(n)?s="":se(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":se(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t?a[I]:a[P];return e.replace(n,function(t,n,i,a,o,s){r("xRange",e,t,n,i,a,o,s);var f=se(i),c=f||se(a),u=c||se(o),d=u;return"="===n&&d&&(n=""),f?t=">"===n||"<"===n?"<0.0.0":"*":n&&d?(c&&(a=0),u&&(o=0),">"===n?(n=">=",c?(i=+i+1,a=0,o=0):u&&(a=+a+1,o=0)):"<="===n&&(n="<",c?i=+i+1:a=+a+1),t=n+i+"."+a+"."+o):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),r("xRange return",t),t})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[K],"")}(e,t),r("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(o=o.filter(function(e){return!!e.match(i)})),o=o.map(function(e){return new ie(e,t)})},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new oe(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.loose));for(var t=0;t",r)},t.outside=de,t.prerelease=function(e,t){var r=Y(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(a[C]);return null==t?null:Y((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.magic=t.magic||t.Magic||0,this.addressVersion=t.addressVersion||t.AddressVersion||23,this.standbyValidators=t.standbyValidators||t.StandbyValidators||[],this.seedList=t.seedList||t.SeedList||[],this.systemFee=t.systemFee||t.SystemFee||n.DEFAULT_SYSFEE}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?JSON.parse(t):t;return new e(Object.assign(n,{extra:n.extra||n.Extra,name:n.name||n.Name||r}))}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing protocol file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"writeFile",value:function(e){return i.default.writeFile(e,this.export(),function(e){if(e)throw e;return console.log("Protocol file written!"),!0})}},{key:"export",value:function(){return{Magic:this.magic,AddressVersion:this.addressVersion,StandbyValidators:this.standbyValidators,SeedList:this.seedList,SystemFee:this.systemFee}}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e){e.exports={MainNet:{Name:"MainNet",ProtocolConfiguration:{Magic:7630401,AddressVersion:23,StandbyValidators:["03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c","02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093","03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a","02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554","024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d","02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e","02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70"],SeedList:["seed1.neo.org:10333","seed2.neo.org:10333","seed3.neo.org:10333","seed4.neo.org:10333","seed5.neo.org:10333"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neonDB:"http://api.wallet.cityofzion.io",neoscan:"https://api.neoscan.io/api/main_net"}},TestNet:{Name:"TestNet",ProtocolConfiguration:{Magic:1953787457,AddressVersion:23,StandbyValidators:["0327da12b5c40200e9f65569476bbff2218da4f32548ff43b6387ec1416a231ee8","026ce35b29147ad09e4afe4ec4a7319095f08198fa8babbe3c56e970b143528d22","0209e7fd41dfb5c2f8dc72eb30358ac100ea8c72da18847befe06eade68cebfcb9","039dafd8571a641058ccc832c5e2111ea39b09c0bde36050914384f7a48bce9bf9","038dddc06ce687677a53d54f096d2591ba2302068cf123c1f2d75c2dddc5425579","02d02b1873a0863cd042cc717da31cea0d7cf9db32b74d4c72c01b0011503e2e22","034ff5ceeac41acf22cd5ed2da17a6df4dd8358fcb2bfb1a43208ad0feaab2746b"],SeedList:["seed1.neo.org:20333","seed2.neo.org:20333","seed3.neo.org:20333","seed4.neo.org:20333","seed5.neo.org:20333"],SystemFee:{EnrollmentTransaction:10,IssueTransaction:5,PublishTransaction:5,RegisterTransaction:100}},ExtraConfiguration:{neonDB:"http://testnet-api.wallet.cityofzion.io",neoscan:"https://neoscan-testnet.io/api/test_net"}},CozNet:{Name:"CozNet",ProtocolConfiguration:{Magic:1010102,AddressVersion:23,StandbyValidators:["032d9e51c7d48b0f5cc63d63deb89767685832cf69eb7113900290f217ae0504ee","022a5b7ccf03166a95e1750f0c350c734c34fe7aac66622eecdb5a529d2e69b1df","03c478d43271c297696ee3ab5a7946ee60287015c7dca6cba867819c7f271bc4ea","0393ef777d01fb60eef1da3474b975c6a393b464bcfe588e2ad7dbc4dbdfa2c244"],SeedList:["188.68.34.29:10330","188.68.34.29:10332","188.68.34.29:10334","188.68.34.29:10336"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neoscan:"https://coz.neoscan-testnet.io/api/main_net"}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDeployScript=t.createScript=void 0;var n,i=r(0),a=(n=r(41))&&n.__esModule?n:{default:n};t.createScript=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.type||128,this.version=r.version||i.TX_VERSION.CONTRACT,this.attributes=r.attributes||[],this.inputs=r.inputs||[],this.outputs=r.outputs?r.outputs.map(function(e){return f.TransactionOutput(e)}):[],this.scripts=r.scripts||[];var n=u.getExclusive[this.type](r);Object.keys(n).map(function(e){t[e]=n[e]})}var t,r,d;return t=e,r=[{key:"addOutput",value:function(e,t,r){if(3===arguments.length)this.outputs.push(f.createTransactionOutput(e,t,r));else{if("object"!==h(arguments[0]))throw new Error("Invalid input given! Give either 1 or 3 arguments!");this.outputs.push(arguments[0])}return this}},{key:"addAttribute",value:function(e,t){if("string"!=typeof t)throw new TypeError("data should be formatted as string!");return this.attributes.push({usage:e,data:t}),this}},{key:"addRemark",value:function(e){var t=(0,o.str2hexstring)(e);return this.addAttribute(s.default.Remark,t)}},{key:"calculate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=c.calculateInputs(e,this.outputs,this.gas,t),n=r.inputs,i=r.change;return this.inputs=n,this.outputs=this.outputs.concat(i),e.applyTx(this),b.info("Calculated the inputs required for Transaction with Balance: ".concat(e.address)),this}},{key:"serialize",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return c.serializeTransaction(this,e)}},{key:"serializeExclusiveData",value:function(){return u.serializeExclusive[this.type](this)}},{key:"sign",value:function(e){return"string"==typeof e&&(e=new n.Account(e)),c.signTransaction(this,e.privateKey),b.info("Signed Transaction with Account: ".concat(e.label)),this}},{key:Symbol.toStringTag,get:function(){return"Transaction"}},{key:"exclusiveData",get:function(){return u.getExclusive[this.type](this)}},{key:"hash",get:function(){return c.getTransactionHash(this)}}],d=[{key:"createClaimTx",value:function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.claims.length)throw new Error("Useless transaction! There is no claims!");var s=new n.Account(t),f=Object.assign({type:2,version:i.TX_VERSION.CLAIM},a),c=new o.Fixed8(0);f.claims=r.claims.slice(0,255).map(function(e){return c=c.add(e.claim),{prevHash:e.txid,prevIndex:e.index}}),f.outputs=[{assetId:i.ASSET_ID.GAS,value:c,scriptHash:s.scriptHash}];var u=new e(Object.assign(f,a));return b.info("New ClaimTransaction for ".concat(s.address)),u}},{key:"createContractTx",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===r)throw new Error("Useless transaction! You are not sending anything!");var a=new e(Object.assign({type:128,version:i.TX_VERSION.CONTRACT,outputs:r},n)).calculate(t);return b.info("New ContractTransaction for ".concat(t.address)),a}},{key:"createInvocationTx",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};null===r&&(r=[]);var f=new e(Object.assign({type:209,version:i.TX_VERSION.INVOCATION,outputs:r,script:"string"==typeof n?n:(0,a.createScript)(n),gas:o},s)).calculate(t);return b.info("New InvocationTransaction for ".concat(t.address)),f}},{key:"deserialize",value:function(t){var r=c.deserializeTransaction(t),n=u.getExclusive[r.type](r);return new e(Object.assign(r,n))}}],r&&p(t.prototype,r),d&&p(t,d),e}();t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(44))&&n.__esModule?n:{default:n},a=r(11),o=r(2),s=r(0),f=r(12);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=r.address||"",this.net=r.net||"NoNet",this.assetSymbols=r.assetSymbols?r.assetSymbols:[],this.assets={},r.assets&&Object.keys(r.assets).map(function(e){"object"===c(r.assets[e])&&t.addAsset(e,r.assets[e])}),this.tokenSymbols=r.tokenSymbols?r.tokenSymbols:[],this.tokens=r.tokens?r.tokens:{}}var t,r,n;return t=e,r=[{key:"addAsset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.default)();e=e.toUpperCase(),this.assetSymbols.push(e);var r=(0,i.default)(t);return this.assets[e]=r,this}},{key:"addToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e=e.toUpperCase(),this.tokenSymbols.push(e),this.tokens[e]=new s.Fixed8(t),this}},{key:"applyTx",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e instanceof a.Transaction?e:a.Transaction.deserialize(e);var n=this.assetSymbols,i=!0,s=!1,f=void 0;try{for(var c,u=function(){var e=c.value,r=function(t){return t.txid===e.prevHash&&t.index===e.prevIndex},i=!0,a=!1,o=void 0;try{for(var s,f=n[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var u=s.value,d=t.assets[u],l=d.unspent.findIndex(r);if(l>=0){var h=d.unspent.splice(l,1);d.spent=d.spent.concat(h);break}}}catch(e){a=!0,o=e}finally{try{i||null==f.return||f.return()}finally{if(a)throw o}}},d=e.inputs[Symbol.iterator]();!(i=(c=d.next()).done);i=!0)u()}catch(e){s=!0,f=e}finally{try{i||null==d.return||d.return()}finally{if(s)throw f}}for(var l=e.hash,h=function(n){var i=e.outputs[n],a=o.ASSETS[i.assetId],s=t.assets[a];s||t.addAsset(a);var f={index:n,txid:l,value:i.value};if(r){var c=s.unconfirmed.findIndex(function(e){return e.txid===f.txid&&e.index===f.index});c>=0&&s.unconfirmed.splice(c,1),s.balance=s.balance.add(i.value),s.unspent||(s.unspent=[]),s.unspent.push(f)}else s.unconfirmed||(s.unconfirmed=[]),s.unconfirmed.push(f);t.assets[a]=s},p=0;p=0&&n<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[c]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(e){}}(n),i.call(f,n,e),typeof console===t&&n=64;){var h,p,b,v,m,g=r,y=n,w=i,_=a,x=o,k=s,S=f,A=c;for(p=0;p<16;p++)b=d+4*p,u[p]=(255&e[b])<<24|(255&e[b+1])<<16|(255&e[b+2])<<8|255&e[b+3];for(p=16;p<64;p++)v=((h=u[p-2])>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,m=((h=u[p-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,u[p]=(v+u[p-7]|0)+(m+u[p-16]|0)|0;for(p=0;p<64;p++)v=(((x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7))+(x&k^~x&S)|0)+(A+(t[p]+u[p]|0)|0)|0,m=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&y^g&w^y&w)|0,A=S,S=k,k=x,x=_+v|0,_=w,w=y,y=g,g=v+m|0;r=r+g|0,n=n+y|0,i=i+w|0,a=a+_|0,o=o+x|0,s=s+k|0,f=f+S|0,c=c+A|0,d+=64,l-=64}}d(e);var l,h=e.length%64,p=e.length/536870912|0,b=e.length<<3,v=h<56?56:120,m=e.slice(e.length-h,e.length);for(m.push(128),l=h+1;l>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(b>>>24&255),m.push(b>>>16&255),m.push(b>>>8&255),m.push(b>>>0&255),d(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(e,t,r){var i;e=e.length<=64?e:n(e);var a=64+t.length+4,o=new Array(a),s=new Array(64),f=[];for(i=0;i<64;i++)o[i]=54;for(i=0;i=a-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)c(),f=f.concat(n(s.concat(n(o)))),r-=32;return r>0&&(c(),f=f.concat(n(s.concat(n(o))).slice(0,r))),f}function a(e,t,r,n,i){var a;for(c(e,16*(2*r-1),i,0,16),a=0;a<2*r;a++)f(e,16*a,i,16),s(i,n),c(i,0,e,t+16*a,16);for(a=0;a>>32-t}function s(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(r=0;r<16;++r)e[r]+=t[r]}function f(e,t,r,n){for(var i=0;i=256)return!1}return!0}function d(e,t){var r=parseInt(e);if(e!=r)throw new Error("invalid "+t);return r}e.exports=function(e,t,n,o,s,l,h){if(!h)throw new Error("missing callback");if(n=d(n,"N"),o=d(o,"r"),s=d(s,"p"),l=d(l,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>r/128/o)throw new Error("N too large");if(o>r/128/s)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(!u(t))throw new Error("salt must be an array or buffer");for(var p=i(e,t,128*s*o),b=new Uint32Array(32*s*o),v=0;vO&&(r=O);for(var t=0;tO&&(r=O),t=0;t>0&255),p.push(b[t]>>8&255),p.push(b[t]>>16&255),p.push(b[t]>>24&255);var v=i(e,p,l);return h(null,1,v)}T(R)};R()}}()},function(e,t){e.exports=require("path")},function(module,exports,__webpack_require__){(function(__dirname,module){module.exports=function(requested_total_memory){var Module={TOTAL_MEMORY:requested_total_memory||33554432},scrypt_raw=Module;function g(e){throw e}var k=void 0,l=!0,m=null,p=!1,q,s;function aa(){return function(){}}s||(s=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var ba={},t;for(t in s)s.hasOwnProperty(t)&&(ba[t]=s[t]);var ca="object"==typeof process&&!0,da="object"==typeof window,ea="function"==typeof importScripts,fa=!da&&!ca&&!ea,oa;if(ca){s.print=function(e){process.stdout.write(e+"\n")},s.printErr=function(e){process.stderr.write(e+"\n")};var ga=__webpack_require__(16),ha=__webpack_require__(87);s.read=function(e,t){e=ha.normalize(e);var r=ga.readFileSync(e);return!r&&e!=ha.resolve(e)&&(e=path.join(__dirname,"..","src",e),r=ga.readFileSync(e)),r&&!t&&(r=r.toString()),r},s.readBinary=function(e){return s.read(e,l)},s.load=function(e){ia(read(e))},s.arguments=process.argv.slice(2),module.ee=s}else fa?(s.print=print,"undefined"!=typeof printErr&&(s.printErr=printErr),s.read=read,s.readBinary=function(e){return read(e,"binary")},"undefined"!=typeof scriptArgs?s.arguments=scriptArgs:void 0!==arguments&&(s.arguments=arguments),this.Module=s):da||ea?(s.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,p),t.send(m),t.responseText},void 0!==arguments&&(s.arguments=arguments),da?(s.print=function(e){console.log(e)},s.printErr=function(e){console.log(e)},this.Module=s):ea&&(s.print=aa(),s.load=importScripts)):g("Unknown runtime environment. Where are we?");function ia(e){eval.call(m,e)}for(t in"undefined"==!s.load&&s.read&&(s.load=function(e){ia(s.read(e))}),s.print||(s.print=aa()),s.printErr||(s.printErr=s.print),s.arguments||(s.arguments=[]),s.print=s.print,s.P=s.printErr,s.preRun=[],s.postRun=[],ba)ba.hasOwnProperty(t)&&(s[t]=ba[t]);function ja(){return u}function ka(e){u=e}function la(e){if(1==ma)return 1;var t={"%i1":1,"%i8":1,"%i16":2,"%i32":4,"%i64":8,"%float":4,"%double":8}["%"+e];return t||("*"==e.charAt(e.length-1)?t=ma:"i"==e[0]&&(w(0==(e=parseInt(e.substr(1)))%8),t=e/8)),t}function na(e,t,r){r&&r.length?(r.splice||(r=Array.prototype.slice.call(r)),r.splice(0,0,t),s["dynCall_"+e].apply(m,r)):s["dynCall_"+e].call(m,t)}function pa(){var e=[],t=0;this.oa=function(r){if(r&=255,t&&(e.push(r),t--),0==e.length)return 128>r?String.fromCharCode(r):(e.push(r),t=191r?1:2,"");if(0r?String.fromCharCode((31&r)<<6|63&n):String.fromCharCode((15&r)<<12|(63&n)<<6|63&i);return e.length=0,r},this.yb=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>3<<3,t}function ra(e){var t=sa;return sa=(sa=sa+e|0)+7>>3<<3,t}function ua(e){var t=z;return(z=(z=z+e|0)+7>>3<<3)>=va&&wa("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs."),t}function xa(e,t){return Math.ceil(e/(t||8))*(t||8)}var ma=4,ya={},za=p,Aa;function w(e,t){e||wa("Assertion failed: "+t)}function Ca(a){try{var b=s["_"+a];b||(b=eval("_"+a))}catch(e){}return w(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function Ba(e,t,r,n){var i=0,a=0;n=n?n.map(function(e){return function(e,t){if("string"==t){if(e===m||e===k||0===e)return 0;i||(i=ja());var r=qa(e.length+1);return Da(e,r),r}return"array"==t?(i||(i=ja()),Ea(e,r=qa(e.length)),r):e}(e,r[a++])}):[];return e=e.apply(m,n),"string"==t?t=Fa(e):(w("array"!=t),t=e),i&&ka(i),t}function Ga(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":A[e]=t;break;case"i16":Ha[e>>1]=t;break;case"i32":B[e>>2]=t;break;case"i64":Aa=[t>>>0,(0|Math.min(+Math.floor(t/4294967296),4294967295))>>>0],B[e>>2]=Aa[0],B[e+4>>2]=Aa[1];break;case"float":Ia[e>>2]=t;break;case"double":Ja[e>>3]=t;break;default:wa("invalid type for setValue: "+r)}}s.ccall=function(e,t,r,n){return Ba(Ca(e),t,r,n)},s.cwrap=function(e,t,r){var n=Ca(e);return function(){return Ba(n,t,r,Array.prototype.slice.call(arguments))}},s.setValue=Ga,s.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return A[e];case"i16":return Ha[e>>1];case"i32":case"i64":return B[e>>2];case"float":return Ia[e>>2];case"double":return Ja[e>>3];default:wa("invalid type for setValue: "+t)}return m};var Ka=0,La=1,E=2,Na=4;function F(e,t,r,n){var i,a;"number"==typeof e?(i=l,a=e):(i=p,a=e.length);var o="string"==typeof t?t:m;r=r==Na?n:[Oa,qa,ra,ua][r===k?E:r](Math.max(a,o?1:t.length));if(i){for(n=r,w(0==(3&r)),e=r+(-4&a);n>2]=0;for(e=r+a;n=t?2*Math.abs(1<=e)return e;var r=32>=t?Math.abs(1<=r&&(32>=t||e>r)&&(e=-2*r+e),e}s.addOnPreRun=s.Vd=bb,s.addOnInit=s.Sd=function(e){Xa.unshift(e)},s.addOnPreMain=s.Ud=function(e){Ya.unshift(e)},s.addOnExit=s.Rd=function(e){Za.unshift(e)},s.addOnPostRun=s.Td=cb,s.intArrayFromString=J,s.intArrayToString=function(e){for(var t=[],r=0;r>>16)*n+r*(t>>>16)<<16)|0}),Math.ie=Math.imul;var L=0,fb={},gb=p,hb=m,nb,ob,pb;function ib(e){L++,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(!fb[e]),fb[e]=1):s.P("warning: run dependency added without ID")}function jb(e){L--,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(fb[e]),delete fb[e]):s.P("warning: run dependency removed without ID"),0==L&&(hb!==m&&(clearInterval(hb),hb=m),!gb&&kb&&lb())}s.addRunDependency=ib,s.removeRunDependency=jb,s.preloadedImages={},s.preloadedAudios={},Ra=8,sa=Ra+1312,Xa.push({V:function(){mb()}}),nb=nb=F([0,0,0,0,0,0,0,0],"i8",E),ob=ob=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),pb=pb=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),F([111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,115,0,0,0,0,0,0,0,111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,99,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,56,3,0,0,0,0,0,0,63,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,111,112,116,105,111,110,32,100,111,101,115,110,39,116,32,116,97,107,101,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,46,42,115,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,115,0,0,0,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,99,0,0,0,0,255,255,255,255,0,0,0,0,97,109,98,105,103,117,111,117,115,32,111,112,116,105,111,110,32,45,45,32,37,46,42,115,0,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,80,79,83,73,88,76,89,95,67,79,82,82,69,67,84,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,37,115,58,32,0,0,0,0,37,115,10,0,0,0,0,0,37,115,10,0,0,0,0,0,105,110,32,117,115,101,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,37,115,58,32,0,0,0,0,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,58,32,0,0,0,0,0,0,58,32,0,0,0,0,0,0,115,121,115,116,101,109,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,109,97,120,32,115,121,115,116,101,109,32,98,121,116,101,115,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,0,0,0,0,176,2,0,0,6,0,0,0,10,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,2,0,0,6,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,116,57,101,120,99,101,112,116,105,111,110,0,0,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,83,116,50,48,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,0,0,0,0,120,2,0,0,168,2,0,0,0,0,0,0,0,0,0,0,136,2,0,0,176,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",Na,8);var qb=xa(F(12,"i8",E),8);w(0==qb%8);var rb=0;function M(e){return B[rb>>2]=e}s._memcpy=sb,s._memset=tb;var N={L:1,ca:2,Bd:3,sc:4,I:5,za:6,Jb:7,Sc:8,$:9,Zb:10,ua:11,Ld:11,$a:12,Ya:13,kc:14,ed:15,Wb:16,va:17,Md:18,wa:19,gd:20,aa:21,A:22,Mc:23,Za:24,ld:25,Id:26,lc:27,ad:28,da:29,yd:30,Fc:31,rd:32,hc:33,ab:34,Wc:35,pc:36,$b:37,vc:38,wc:39,xc:40,Ec:41,Jd:42,Qc:43,uc:44,ec:45,Tc:46,Pb:50,Sb:51,Nd:52,Oc:53,Tb:54,Ub:55,fc:56,Vb:57,cd:60,Rc:61,Fd:62,bd:63,Xc:64,Yc:65,xd:66,Uc:67,Mb:68,Cd:69,ac:70,td:71,Hc:74,yc:75,ic:76,Rb:77,mc:79,md:80,Qb:81,wd:82,zc:83,Ac:84,Dc:85,Cc:86,Bc:87,dd:88,Nc:89,ya:90,Ic:91,ba:92,nd:95,qd:96,dc:104,Pc:105,Nb:106,vd:107,jd:108,Zc:109,zd:110,cc:111,Kb:112,bc:113,Lc:114,Jc:115,Gd:116,nc:117,oc:118,rc:119,Ob:120,gc:121,Gc:122,ud:123,Ad:124,Lb:125,Kc:126,tc:127,fd:128,Hd:129,sd:130,Kd:131,jc:132,Dd:133,kd:134,Vc:135,$c:136,Yb:137,qc:138,od:139,Xb:140,hd:141,pd:142,Ed:143},ub={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"No message of desired type",36:"Identifier removed",37:"Channel number out of range",38:"Level 2 not synchronized",39:"Level 3 halted",40:"Level 3 reset",41:"Link number out of range",42:"Protocol driver not attached",43:"No CSI structure available",44:"Level 2 halted",45:"Deadlock condition",46:"No record locks available",50:"Invalid exchange",51:"Invalid request descriptor",52:"Exchange full",53:"No anode",54:"Invalid request code",55:"Invalid slot",56:"File locking deadlock error",57:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",74:"Multihop attempted",75:"Inode is remote (not really error)",76:"Cross mount point (not really error)",77:"Trying to read unreadable message",79:"Inappropriate file type or format",80:"Given log. name not unique",81:"f.d. invalid for this operation",82:"Remote address changed",83:"Can\t access a needed shared lib",84:"Accessing a corrupted shared lib",85:".lib section in a.out corrupted",86:"Attempting to link in too many libs",87:"Attempting to exec a shared library",88:"Function not implemented",89:"No more files",90:"Directory not empty",91:"File or path name too long",92:"Too many symbolic links",95:"Operation not supported on transport endpoint",96:"Protocol family not supported",104:"Connection reset by peer",105:"No buffer space available",106:"Address family not supported by protocol family",107:"Protocol wrong type for socket",108:"Socket operation on non-socket",109:"Protocol not available",110:"Can't send after socket shutdown",111:"Connection refused",112:"Address already in use",113:"Connection aborted",114:"Network is unreachable",115:"Network interface is not configured",116:"Connection timed out",117:"Host is down",118:"Host is unreachable",119:"Connection already in progress",120:"Socket already connected",121:"Destination address required",122:"Message too long",123:"Unknown protocol",124:"Socket type not supported",125:"Address not available",126:"ENETRESET",127:"Socket is already connected",128:"Socket is not connected",129:"TOOMANYREFS",130:"EPROCLIM",131:"EUSERS",132:"EDQUOT",133:"ESTALE",134:"Not supported",135:"No medium (in tape drive)",136:"No such host or network path",137:"Filename exists with different case",138:"EILSEQ",139:"Value too large for defined data type",140:"Operation canceled",141:"State not recoverable",142:"Previous owner died",143:"Streams pipe error"};function vb(e,t,r){var n=O(e,{parent:l}).d,i=xb(n,e="/"===e?"/":wb(e)[2]);return i&&g(new Q(i)),n.l.Ta||g(new Q(N.L)),n.l.Ta(n,e,t,r)}function yb(e,t){return vb(e,t=4095&t|32768,0)}function zb(e,t){return vb(e,t=1023&t|16384,0)}function Ab(e,t,r){return vb(e,8192|t,r)}function Bb(e,t){var r=O(t,{parent:l}).d,n="/"===t?"/":wb(t)[2],i=xb(r,n);return i&&g(new Q(i)),r.l.Wa||g(new Q(N.L)),r.l.Wa(r,n,e)}function Cb(e,t){var r;(r="string"==typeof e?O(e,{N:l}).d:e).l.Y||g(new Q(N.L)),r.l.Y(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function Db(e,t){var r,n,i;e=Eb(e);"string"==typeof t?void 0===(n=Fb[t])&&g(Error("Unknown file open mode: "+t)):n=t,r=512&(t=n)?4095&r|32768:0;try{var a=O(e,{N:!(65536&t)});i=a.d,e=a.path}catch(e){}512&t&&(i?2048&t&&g(new Q(N.va)):i=vb(e,r,0)),i||g(new Q(N.ca)),8192==(61440&i.mode)&&(t&=-1025),i?40960==(61440&i.mode)?r=N.ba:16384==(61440&i.mode)&&(0!=(3&t)||1024&t)?r=N.aa:(r=["r","w","rw"][3&t],1024&t&&(r+="w"),r=Gb(i,r)):r=N.ca,r&&g(new Q(r)),1024&t&&((r="string"==typeof(r=i)?O(r,{N:l}).d:r).l.Y||g(new Q(N.L)),16384==(61440&r.mode)&&g(new Q(N.aa)),32768!=(61440&r.mode)&&g(new Q(N.A)),(a=Gb(r,"w"))&&g(new Q(a)),r.l.Y(r,{size:0,timestamp:Date.now()}));var o,s={path:e,d:i,M:t,seekable:l,position:0,e:i.e,Gb:[],error:p};e:{for(i=k||4096,r=k||1;r<=i;r++)if(!R[r]){o=r;break e}g(new Q(N.Za))}return s.s=o,Object.defineProperty(s,"object",{get:function(){return s.d},set:function(e){s.d=e}}),Object.defineProperty(s,"isRead",{get:function(){return 1!=(3&s.M)}}),Object.defineProperty(s,"isWrite",{get:function(){return 0!=(3&s.M)}}),Object.defineProperty(s,"isAppend",{get:function(){return 8&s.M}}),R[o]=s,s.e.open&&s.e.open(s),s}function Hb(e){try{e.e.close&&e.e.close(e)}catch(e){g(e)}finally{R[e.s]=m}}function Ib(e,t,r,n,i){(0>n||0>i)&&g(new Q(N.A)),0==(3&e.M)&&g(new Q(N.$)),16384==(61440&e.d.mode)&&g(new Q(N.aa)),e.e.write||g(new Q(N.A));var a=l;return void 0===i?(i=e.position,a=p):e.seekable||g(new Q(N.da)),8&e.M&&((!e.seekable||!e.e.na)&&g(new Q(N.da)),e.e.na(e,0,2)),t=e.e.write(e,t,r,n,i),a||(e.position+=t),t}function wb(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)}function Jb(e,t){for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function Eb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return!(e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"))&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function S(){return Eb(Array.prototype.slice.call(arguments,0).filter(function(e){return"string"!=typeof e&&g(new TypeError("Arguments to path.join must be strings")),e}).join("/"))}function Kb(){for(var e="",t=p,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:"/";"string"!=typeof n&&g(new TypeError("Arguments to path.resolve must be strings")),n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}var Lb=[];function Mb(e,t){Lb[e]={input:[],H:[],O:t},Nb[e]={e:Ob}}var Ob={open:function(e){Pb||(Pb=new pa);var t=Lb[e.d.X];t||g(new Q(N.wa)),e.q=t,e.seekable=p},close:function(e){e.q.H.length&&e.q.O.W(e.q,10)},Q:function(e,t,r,n){(!e.q||!e.q.O.Na)&&g(new Q(N.za));for(var i=0,a=0;ar.length;)r.push(0)}},tb:function(){g(new Q(N.ca))},Ta:function(e,t,r,n){return T.ka(e,t,r,n)},rename:function(e,t,r){if(16384==(61440&e.mode)){var n;try{n=Sb(t,r)}catch(e){}if(n)for(var i in n.g)g(new Q(N.ya))}delete e.parent.g[e.name],e.name=r,t.g[r]=e},ze:function(e,t){delete e.g[t]},ve:function(e,t){var r,n=Sb(e,t);for(r in n.g)g(new Q(N.ya));delete e.g[t]},Wa:function(e,t,r){return(e=T.ka(e,t,41471,0)).link=r,e},Va:function(e){return 40960!=(61440&e.mode)&&g(new Q(N.A)),e.link}},e:{open:function(e){if(16384==(61440&e.d.mode)){var t,r=[".",".."];for(t in e.d.g)e.d.g.hasOwnProperty(t)&&r.push(t);e.lb=r}},Q:function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.subarray)t.set(e.subarray(i,i+n),r);else for(var a=0;at&&g(new Q(N.A)),e.Gb=[],e.position=t},ue:function(e){return e.lb},Wd:function(e,t,r){for(e=e.d.g,t+=r;t>e.length;)e.push(0)},ne:function(e,t,r,n,i,a,o){return 32768!=(61440&e.d.mode)&&g(new Q(N.wa)),e=e.d.g,2&o?((0e||0===e&&-1/0==1/e}function kc(e,t){function r(e){var r;return"double"===e?r=Ja[t+o>>3]:"i64"==e?(r=[B[t+o>>2],B[t+(o+8)>>2]],o+=8):(e="i32",r=B[t+o>>2]),o+=Math.max(Math.max(la(e),ma),8),r}for(var n,i,a=e,o=0,s=[];;){var f=a;if(0===(n=A[a]))break;if(i=A[a+1|0],37==n){var c=p,u=p,d=p,h=p;e:for(;;){switch(i){case 43:c=l;break;case 45:u=l;break;case 35:d=l;break;case 48:if(h)break e;h=l;break;default:break e}i=A[++a+1|0]}var b=0;if(42==i)b=r("i32"),i=A[++a+1|0];else for(;48<=i&&57>=i;)b=10*b+(i-48),i=A[++a+1|0];var v,g=p;if(46==i){var y=0;g=l;if(42==(i=A[++a+1|0]))y=r("i32"),a++;else for(;!(48>(i=A[a+1|0])||57>>0)+4294967296*+(n[1]>>>0):+(n[0]>>>0)+4294967296*+(0|n[1])),4>=v&&(n=(f?eb:db)(n&Math.pow(256,v)-1,8*v));var x=Math.abs(n);f="";if(100==i||105==i)w=8==v&&lc?lc.stringify(_[0],_[1],m):eb(n,8*v).toString(10);else if(117==i)w=8==v&&lc?lc.stringify(_[0],_[1],l):db(n,8*v).toString(10),n=Math.abs(n);else if(111==i)w=(d?"0":"")+x.toString(8);else if(120==i||88==i){if(f=d&&0!=n?"0x":"",8==v&&lc)if(_[1]){for(w=(_[1]>>>0).toString(16),d=(_[0]>>>0).toString(16);8>d.length;)d="0"+d;w+=d}else w=(_[0]>>>0).toString(16);else if(0>n){for(n=-n,w=(x-1).toString(16),_=[],d=0;dn?"-"+f:"+"+f);f.length+w.length(v=parseInt(n.toExponential(v).split("e")[1],10))&&-4<=v?(i=(103==i?"f":"F").charCodeAt(0),y-=v+1):(i=(103==i?"e":"E").charCodeAt(0),y--),v=Math.min(y,20)),101==i||69==i?(w=n.toExponential(v),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):102!=i&&70!=i||(w=n.toFixed(v),0===n&&jc(n)&&(w="-"+w)),f=w.split("e"),g&&!d)for(;1v++;)f[0]+="0";w=f[0]+(1n?"-":"")+"inf",h=p;for(;w.lengthi&&(w=w.toUpperCase()),w.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":if(h=(c=r("i8*"))?ic(c):6,g&&(h=Math.min(h,y)),!u)for(;h>2]=s.length;break;case"%":s.push(n);break;default:for(d=f;d>12<<12,nc.ia=l,w(ua),nc.hb=ua,ua=function(){wa("cannot dynamically allocate, sbrk now has control")});var t=z;return 0!=e&&nc.hb(e),t}function U(){return B[U.m>>2]}function oc(){return!!oc.ta}function pc(e){var t=p;try{e==__ZTIi&&(t=l)}catch(e){}try{e==__ZTIj&&(t=l)}catch(e){}try{e==__ZTIl&&(t=l)}catch(e){}try{e==__ZTIm&&(t=l)}catch(e){}try{e==__ZTIx&&(t=l)}catch(e){}try{e==__ZTIy&&(t=l)}catch(e){}try{e==__ZTIf&&(t=l)}catch(e){}try{e==__ZTId&&(t=l)}catch(e){}try{e==__ZTIe&&(t=l)}catch(e){}try{e==__ZTIc&&(t=l)}catch(e){}try{e==__ZTIa&&(t=l)}catch(e){}try{e==__ZTIh&&(t=l)}catch(e){}try{e==__ZTIs&&(t=l)}catch(e){}try{e==__ZTIt&&(t=l)}catch(e){}return t}function qc(e,t,r){if(0==r)return p;if(0==t||t==e)return l;switch(pc(t)?t:B[B[t>>2]-8>>2]){case 0:return 0==B[B[e>>2]-8>>2]?qc(B[e+8>>2],B[t+8>>2],r):p;case 1:return p;case 2:return qc(e,B[t+8>>2],r);default:return p}}function rc(e,t,r){if(!rc.sb){try{B[__ZTVN10__cxxabiv119__pointer_type_infoE>>2]=0}catch(e){}try{B[pb>>2]=1}catch(e){}try{B[ob>>2]=2}catch(e){}rc.sb=l}B[U.m>>2]=e,B[U.m+4>>2]=t,B[U.m+8>>2]=r,"uncaught_exception"in oc?oc.ta++:oc.ta=1,g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")}function sc(e){try{return tc(e)}catch(e){}}function uc(){if(uc.Bb)uc.Bb=p;else{V.setThrew(0),B[U.m+4>>2]=0;var e=B[U.m>>2],t=B[U.m+8>>2];t&&(na("vi",t,[e]),B[U.m+8>>2]=0),e&&(sc(e),B[U.m>>2]=0)}}s._strlen=ic;var vc=F(1,"i32*",E);function wc(e){var t,r;wc.ia?(r=B[vc>>2],t=B[r>>2]):(wc.ia=l,W.USER="root",W.PATH="/",W.PWD="/",W.HOME="/home/emscripten",W.LANG="en_US.UTF-8",W._="./this.program",t=F(1024,"i8",E),r=F(256,"i8*",E),B[r>>2]=t,B[vc>>2]=r);var n,i=[],a=0;for(n in e)if("string"==typeof e[n]){var o=n+"="+e[n];i.push(o),a+=o.length}for(1024>2]=t,t+=o.length+1}B[r+4*i.length>>2]=0}var W={};function xc(e){return 0===e?0:(e=Fa(e),W.hasOwnProperty(e)?(xc.J&&tc(xc.J),xc.J=F(J(W[e]),"i8",Ka),xc.J):0)}function yc(e,t,r){if(e in ub){if(ub[e].length>r-1)return M(N.ab);for(e=ub[e],r=0;r>2],B[SDL.screen+0*ma>>2]=8388608|e),Kc()}function Mc(){var e=s.canvas;e.width=this.Ib,e.height=this.Hb,"undefined"!=typeof SDL&&(e=Qa[SDL.screen+0*ma>>2],B[SDL.screen+0*ma>>2]=-8388609&e),Kc()}var Nc,Oc,Pc,Qc,rb=ra(4);B[rb>>2]=0;var Vb=Qb(m,"/",16895,0),Rc=T,Sc={type:Rc,se:{},Ua:"/",root:m},Tc;Tc=O("/",{N:p});var Uc=Rc.z(Sc);Uc.z=Sc,Sc.root=Uc,Tc&&(Tc.d.z=Sc,Tc.d.ub=l,Vb=Sc.root),zb("/tmp",511),zb("/dev",511),Nb[259]={e:{Q:function(){return 0},write:function(){return 0}}},Ab("/dev/null",438,259),Mb(1280,{Na:function(e){if(!e.input.length){var t=m;if(ca){if(process.Eb.be)return;t=process.Eb.Q()}else"undefined"!=typeof window&&"function"==typeof window.prompt?(t=window.prompt("Input: "))!==m&&(t+="\n"):"function"==typeof readline&&((t=readline())!==m&&(t+="\n"));if(!t)return m;e.input=J(t,l)}return e.input.shift()},W:function(e,t){t===m||10===t?(s.print(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Mb(1536,{W:function(e,t){t===m||10===t?(s.printErr(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Ab("/dev/tty",438,1280),Ab("/dev/tty1",438,1536),zb("/dev/shm",511),zb("/dev/shm/tmp",511),Xa.unshift({V:function(){if(!s.noFSInit&&!bc){w(!bc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),bc=l,s.stdin=s.stdin,s.stdout=s.stdout,s.stderr=s.stderr,s.stdin?ec("/dev","stdin",s.stdin):Bb("/dev/tty","/dev/stdin"),s.stdout?ec("/dev","stdout",m,s.stdout):Bb("/dev/tty","/dev/stdout"),s.stderr?ec("/dev","stderr",m,s.stderr):Bb("/dev/tty1","/dev/stderr");var e=Db("/dev/stdin","r");B[Tb>>2]=e.s,w(1===e.s,"invalid handle for stdin ("+e.s+")"),e=Db("/dev/stdout","w"),B[Ub>>2]=e.s,w(2===e.s,"invalid handle for stdout ("+e.s+")"),e=Db("/dev/stderr","w"),B[nb>>2]=e.s,w(3===e.s,"invalid handle for stderr ("+e.s+")")}}}),Ya.push({V:function(){Yb=p}}),Za.push({V:function(){bc=p;for(var e=0;e>a-6&63;a=a-6,r=r+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),c.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(c)}},c.src=f,setTimeout(function(){za||i(c)},1e4)}});var d=s.canvas;d.qa=d.requestPointerLock||d.mozRequestPointerLock||d.webkitRequestPointerLock,d.La=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||aa(),d.La=d.La.bind(document),document.addEventListener("pointerlockchange",c,p),document.addEventListener("mozpointerlockchange",c,p),document.addEventListener("webkitpointerlockchange",c,p),s.elementPointerLock&&d.addEventListener("click",function(e){!Ec&&d.qa&&(d.qa(),e.preventDefault())},p)}var h,b=S.apply(m,[e,t]);if("/"==b[0]&&(b=b.substr(1)),ib("cp "+(h=b)),"string"==typeof r){var v=o,y=function(){v?v():g('Loading data file "'+r+'" failed.')},_=new XMLHttpRequest;_.open("GET",r,l),_.responseType="arraybuffer",_.onload=function(){if(200==_.status||0==_.status&&_.response){var e=_.response;w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),u(e=new Uint8Array(e)),jb("al "+r)}else y()},_.onerror=y,_.send(m),ib("al "+r)}else u(r)},s.FS_createLazyFile=function(e,t,r,n,i){var a,o;"undefined"!=typeof XMLHttpRequest?(ea||g("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),(a=function(){this.ma=p,this.T=[]}).prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.S;return this.pb(Math.floor(e/this.S))[t]}},a.prototype.Cb=function(e){this.pb=e},a.prototype.Fa=function(){var e=new XMLHttpRequest;e.open("HEAD",r,p),e.send(m),200<=e.status&&300>e.status||304===e.status||g(Error("Couldn't load "+r+". Status: "+e.status));var t,n=Number(e.getResponseHeader("Content-length")),i=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(i=n);var a=this;a.Cb(function(e){var t=e*i,o=(e+1)*i-1;o=Math.min(o,n-1);if(void 0===a.T[e]){var s=a.T;t>o&&g(Error("invalid range ("+t+", "+o+") or no bytes requested!")),o>n-1&&g(Error("only "+n+" bytes available! programmer error!"));var f=new XMLHttpRequest;f.open("GET",r,p),n!==i&&f.setRequestHeader("Range","bytes="+t+"-"+o),"undefined"!=typeof Uint8Array&&(f.responseType="arraybuffer"),f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(m),200<=f.status&&300>f.status||304===f.status||g(Error("Couldn't load "+r+". Status: "+f.status)),t=f.response!==k?new Uint8Array(f.response||[]):J(f.responseText||"",l),s[e]=t}return void 0===a.T[e]&&g(Error("doXHR failed!")),a.T[e]}),this.gb=n,this.fb=i,this.ma=l},a=new a,Object.defineProperty(a,"length",{get:function(){return this.ma||this.Fa(),this.gb}}),Object.defineProperty(a,"chunkSize",{get:function(){return this.ma||this.Fa(),this.fb}}),o=k):(o=r,a=k);var f;e=S("string"==typeof e?e:ac(e),t);f=yb(e,cc(n,i)),a?f.g=a:o&&(f.g=m,f.url=o);var c={};return Object.keys(f.e).forEach(function(e){var t=f.e[e];c[e]=function(){var e;if(f.ke||f.le||f.link||f.g)e=l;else{if(e=l,"undefined"!=typeof XMLHttpRequest&&g(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")),s.read)try{f.g=J(s.read(f.url),l)}catch(t){e=p}else g(Error("Cannot load without read() or XMLHttpRequest."));e||M(N.I)}return e||g(new Q(N.I)),t.apply(m,arguments)}}),c.Q=function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.slice)for(var a=0;a>3<<3;return t|0}function at(){return d|0}function ot(e){e=e|0;d=e}function st(e,t){e=e|0;t=t|0;if((k|0)==0){k=e;S=t}}function ft(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0]}function ct(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0];n[h+4|0]=n[e+4|0];n[h+5|0]=n[e+5|0];n[h+6|0]=n[e+6|0];n[h+7|0]=n[e+7|0]}function ut(e){e=e|0;j=e}function dt(e){e=e|0;B=e}function lt(e){e=e|0;z=e}function ht(e){e=e|0;H=e}function pt(e){e=e|0;L=e}function bt(e){e=e|0;q=e}function vt(e){e=e|0;D=e}function mt(e){e=e|0;U=e}function gt(e){e=e|0;K=e}function yt(e){e=e|0;V=e}function wt(){a[170]=y+8;a[172]=g+8;a[176]=g+8}function _t(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)==0){return}else{i=0}do{n[e+i|0]=n[t+i|0]|0;i=i+1|0}while(i>>>0>>0);return}function xt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0;if((r|0)==0){return}else{i=0}do{a=e+i|0;n[a]=n[a]^n[t+i|0];i=i+1|0}while(i>>>0>>0);return}function kt(e){e=e|0;var t=0,r=0,n=0,i=0;t=o[e+1|0]|0;r=o[e+2|0]|0;n=o[e+3|0]|0;i=rn(t<<8|0>>>24|(o[e]|0)|(r<<16|0>>>16)|(n<<24|0>>>8)|(0<<8|0>>>24),0<<8|t>>>24|(0<<16|r>>>16)|(0<<24|n>>>8)|(o[e+4|0]|0)|((o[e+5|0]|0)<<8|0>>>24),0<<16|0>>>16,(o[e+6|0]|0)<<16|0>>>16)|0;n=rn(i,j,0<<24|0>>>8,(o[e+7|0]|0)<<24|0>>>8)|0;return(j=j,n)|0}function St(e){e=e|0;return(o[e+1|0]|0)<<8|(o[e]|0)|(o[e+2|0]|0)<<16|(o[e+3|0]|0)<<24|0}function At(e,t){e=e|0;t=t|0;n[e]=t&255;n[e+1|0]=t>>>8&255;n[e+2|0]=t>>>16&255;n[e+3|0]=t>>>24&255;return}function Mt(e){e=e|0;a[e+36>>2]=0;a[e+32>>2]=0;a[e>>2]=1779033703;a[e+4>>2]=-1150833019;a[e+8>>2]=1013904242;a[e+12>>2]=-1521486534;a[e+16>>2]=1359893119;a[e+20>>2]=-1694144372;a[e+24>>2]=528734635;a[e+28>>2]=1541459225;return}function Et(e,t,r,n,i,o,s,f,c,u){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;o=o|0;s=s|0;f=f|0;c=c|0;u=u|0;var d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0;d=hn(f,0,s,0)|0;l=j;h=0;if(l>>>0>h>>>0|l>>>0==h>>>0&d>>>0>1073741823>>>0){a[($e()|0)>>2]=27;p=-1;return p|0}d=rn(i,o,-1,-1)|0;if((d&i|0)!=0|(j&o|0)!=0|(i|0)==0&(o|0)==0){a[($e()|0)>>2]=22;p=-1;return p|0}do{if(!((33554431/(f>>>0)|0)>>>0>>0|s>>>0>16777215)){d=0;if(d>>>0>>0|d>>>0==o>>>0&(33554431/(s>>>0)|0)>>>0>>0){break}d=s<<7;h=Kt(oe(d,f)|0)|0;if((h|0)==0){p=-1;return p|0}l=Kt(s<<8)|0;do{if((l|0)!=0){b=hn(d,0,i,o)|0;v=Kt(b)|0;if((v|0)==0){Vt(l);break}b=oe(f<<7,s)|0;Dt(e,t,r,n,1,0,h,b);if((f|0)!=0){m=s<<7;g=0;do{Pt(h+(oe(m,g)|0)|0,s,i,o,v,l);g=g+1|0}while(g>>>0>>0)}Dt(e,t,h,b,1,0,c,u);Vt(v);Vt(l);Vt(h);p=0;return p|0}}while(0);Vt(h);p=-1;return p|0}}while(0);a[($e()|0)>>2]=12;p=-1;return p|0}function Pt(e,t,r,n,i,a){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;a=a|0;var o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0;o=t<<7;s=a+o|0;_t(a,e,o);if((r|0)==0&(n|0)==0){_t(e,a,o);return}f=o;c=0;u=0;d=0;do{l=hn(d,u,f,c)|0;_t(i+l|0,a,o);It(a,s,t);d=rn(d,u,1,0)|0;u=j}while(u>>>0>>0|u>>>0==n>>>0&d>>>0>>0);if((r|0)==0&(n|0)==0){_t(e,a,o);return}d=rn(r,n,-1,-1)|0;u=j;c=o;f=0;l=0;h=0;do{p=Ct(a,t)|0;b=hn(p&d,j&u,c,f)|0;xt(a,i+b|0,o);It(a,s,t);h=rn(h,l,1,0)|0;l=j}while(l>>>0>>0|l>>>0==n>>>0&h>>>0>>0);_t(e,a,o);return}function It(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,a=0,o=0,s=0,f=0,c=0;n=d;d=d+64|0;i=n|0;a=r<<1;_t(i,e+((r<<7)-64)|0,64);if((a|0)!=0){o=0;do{s=o<<6;xt(i,e+s|0,64);Ot(i);_t(t+s|0,i,64);o=o+1|0}while(o>>>0>>0)}if((r|0)==0){d=n;return}else{f=0}do{_t(e+(f<<6)|0,t+(f<<7)|0,64);f=f+1|0}while(f>>>0>>0);if((r|0)==0){d=n;return}else{c=0}do{_t(e+(c+r<<6)|0,t+(c<<7|64)|0,64);c=c+1|0}while(c>>>0>>0);d=n;return}function Ct(e,t){e=e|0;t=t|0;var r=0;r=kt(e+((t<<7)-64)|0)|0;return(j=j,r)|0}function Ot(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0,q=0,D=0,U=0,K=0,V=0,Y=0,W=0,X=0,G=0,Z=0,Q=0,$=0,J=0,ee=0,te=0;t=d;d=d+128|0;r=t|0;n=t+64|0;i=0;do{a[r+(i<<2)>>2]=St(e+(i<<2)|0)|0;i=i+1|0}while(i>>>0<16);i=r;o=n;Jr(o|0,i|0,64)|0;i=n|0;o=n+48|0;s=n+16|0;f=n+32|0;c=n+20|0;u=n+4|0;l=n+36|0;h=n+52|0;p=n+40|0;b=n+24|0;v=n+56|0;m=n+8|0;g=n+60|0;y=n+44|0;w=n+12|0;_=n+28|0;x=0;k=a[i>>2]|0;S=a[o>>2]|0;A=a[s>>2]|0;M=a[f>>2]|0;E=a[c>>2]|0;P=a[u>>2]|0;I=a[l>>2]|0;C=a[h>>2]|0;O=a[p>>2]|0;T=a[b>>2]|0;R=a[v>>2]|0;N=a[m>>2]|0;F=a[g>>2]|0;j=a[y>>2]|0;B=a[w>>2]|0;z=a[_>>2]|0;do{H=S+k|0;L=(H<<7|H>>>25)^A;H=L+k|0;q=(H<<9|H>>>23)^M;H=q+L|0;D=(H<<13|H>>>19)^S;H=D+q|0;U=(H<<18|H>>>14)^k;H=P+E|0;K=(H<<7|H>>>25)^I;H=K+E|0;V=(H<<9|H>>>23)^C;H=V+K|0;Y=(H<<13|H>>>19)^P;H=Y+V|0;W=(H<<18|H>>>14)^E;H=T+O|0;X=(H<<7|H>>>25)^R;H=X+O|0;G=(H<<9|H>>>23)^N;H=G+X|0;Z=(H<<13|H>>>19)^T;H=Z+G|0;Q=(H<<18|H>>>14)^O;H=j+F|0;$=(H<<7|H>>>25)^B;H=$+F|0;J=(H<<9|H>>>23)^z;H=J+$|0;ee=(H<<13|H>>>19)^j;H=ee+J|0;te=(H<<18|H>>>14)^F;H=$+U|0;P=(H<<7|H>>>25)^Y;Y=P+U|0;N=(Y<<9|Y>>>23)^G;G=N+P|0;B=(G<<13|G>>>19)^$;$=B+N|0;k=($<<18|$>>>14)^U;U=L+W|0;T=(U<<7|U>>>25)^Z;Z=T+W|0;z=(Z<<9|Z>>>23)^J;J=z+T|0;A=(J<<13|J>>>19)^L;L=A+z|0;E=(L<<18|L>>>14)^W;W=K+Q|0;j=(W<<7|W>>>25)^ee;ee=j+Q|0;M=(ee<<9|ee>>>23)^q;q=M+j|0;I=(q<<13|q>>>19)^K;K=I+M|0;O=(K<<18|K>>>14)^Q;Q=X+te|0;S=(Q<<7|Q>>>25)^D;D=S+te|0;C=(D<<9|D>>>23)^V;V=C+S|0;R=(V<<13|V>>>19)^X;X=R+C|0;F=(X<<18|X>>>14)^te;x=x+2|0}while(x>>>0<8);a[i>>2]=k;a[o>>2]=S;a[s>>2]=A;a[f>>2]=M;a[c>>2]=E;a[u>>2]=P;a[l>>2]=I;a[h>>2]=C;a[p>>2]=O;a[b>>2]=T;a[v>>2]=R;a[m>>2]=N;a[g>>2]=F;a[y>>2]=j;a[w>>2]=B;a[_>>2]=z;z=r|0;a[z>>2]=(a[z>>2]|0)+(a[n>>2]|0);z=r+4|0;a[z>>2]=(a[z>>2]|0)+(a[n+4>>2]|0);z=r+8|0;a[z>>2]=(a[z>>2]|0)+(a[n+8>>2]|0);z=r+12|0;a[z>>2]=(a[z>>2]|0)+(a[n+12>>2]|0);z=r+16|0;a[z>>2]=(a[z>>2]|0)+(a[n+16>>2]|0);z=r+20|0;a[z>>2]=(a[z>>2]|0)+(a[n+20>>2]|0);z=r+24|0;a[z>>2]=(a[z>>2]|0)+(a[n+24>>2]|0);z=r+28|0;a[z>>2]=(a[z>>2]|0)+(a[n+28>>2]|0);z=r+32|0;a[z>>2]=(a[z>>2]|0)+(a[n+32>>2]|0);z=r+36|0;a[z>>2]=(a[z>>2]|0)+(a[n+36>>2]|0);z=r+40|0;a[z>>2]=(a[z>>2]|0)+(a[n+40>>2]|0);z=r+44|0;a[z>>2]=(a[z>>2]|0)+(a[n+44>>2]|0);z=r+48|0;a[z>>2]=(a[z>>2]|0)+(a[n+48>>2]|0);z=r+52|0;a[z>>2]=(a[z>>2]|0)+(a[n+52>>2]|0);z=r+56|0;a[z>>2]=(a[z>>2]|0)+(a[n+56>>2]|0);z=r+60|0;a[z>>2]=(a[z>>2]|0)+(a[n+60>>2]|0);n=0;do{At(e+(n<<2)|0,a[r+(n<<2)>>2]|0);n=n+1|0}while(n>>>0<16);d=t;return}function Tt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0,s=0,f=0,c=0,u=0;n=e+32|0;i=e+36|0;o=a[i>>2]|0;s=o>>>3&63;f=De(o|0,r<<3|0)|0;a[i>>2]=f;if(j){f=n|0;a[f>>2]=(a[f>>2]|0)+1}f=n|0;a[f>>2]=(a[f>>2]|0)+(r>>>29);f=64-s|0;n=e+40+s|0;if(f>>>0>r>>>0){Jr(n|0,t|0,r)|0;return}Jr(n|0,t|0,f)|0;n=e|0;s=e+40|0;Rt(n,s);e=t+f|0;t=r-f|0;if(t>>>0>63){f=t;r=e;while(1){Rt(n,r);i=r+64|0;o=f-64|0;if(o>>>0>63){f=o;r=i}else{c=o;u=i;break}}}else{c=t;u=e}Jr(s|0,u|0,c)|0;return}function Rt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0;r=d;d=d+288|0;n=r|0;i=r+256|0;o=n|0;Ut(o,t);t=16;do{s=a[n+(t-2<<2)>>2]|0;f=a[n+(t-15<<2)>>2]|0;a[n+(t<<2)>>2]=(a[n+(t-16<<2)>>2]|0)+(a[n+(t-7<<2)>>2]|0)+((s>>>19|s<<13)^s>>>10^(s>>>17|s<<15))+((f>>>18|f<<14)^f>>>3^(f>>>7|f<<25));t=t+1|0}while((t|0)<64);t=i;f=e;Jr(t|0,f|0,32)|0;f=i+28|0;t=i+16|0;s=a[t>>2]|0;c=i+20|0;u=i+24|0;l=a[u>>2]|0;h=(a[f>>2]|0)+1116352408+(a[o>>2]|0)+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+((l^a[c>>2])&s^l)|0;l=i|0;s=a[l>>2]|0;o=i+4|0;p=a[o>>2]|0;b=i+8|0;v=a[b>>2]|0;m=i+12|0;a[m>>2]=(a[m>>2]|0)+h;g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+h+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[c>>2]|0;s=(a[u>>2]|0)+1899447441+(a[n+4>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[u>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[c>>2]|0)-1245643825+(a[n+8>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[c>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-373957723+(a[n+12>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[l>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+961987163+(a[n+16>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1508970993+(a[n+20>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[u>>2]|0;p=a[l>>2]|0;h=(a[o>>2]|0)-1841331548+(a[n+24>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[c>>2]|0;v=a[f>>2]|0;s=(a[l>>2]|0)-1424204075+(a[n+28>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[l>>2]=h;v=a[t>>2]|0;p=a[u>>2]|0;g=(a[f>>2]|0)-670586216+(a[n+32>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[c>>2]|0;h=(a[u>>2]|0)+310598401+(a[n+36>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[u>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[c>>2]|0)+607225278+(a[n+40>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[c>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1426881987+(a[n+44>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[l>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1925078388+(a[n+48>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-2132889090+(a[n+52>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[u>>2]|0;p=a[l>>2]|0;g=(a[o>>2]|0)-1680079193+(a[n+56>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[c>>2]|0;v=a[f>>2]|0;h=(a[l>>2]|0)-1046744716+(a[n+60>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[l>>2]=g;v=a[t>>2]|0;p=a[u>>2]|0;s=(a[f>>2]|0)-459576895+(a[n+64>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[c>>2]|0;g=(a[u>>2]|0)-272742522+(a[n+68>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[u>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[c>>2]|0)+264347078+(a[n+72>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[c>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)+604807628+(a[n+76>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[l>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)+770255983+(a[n+80>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)+1249150122+(a[n+84>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[u>>2]|0;p=a[l>>2]|0;s=(a[o>>2]|0)+1555081692+(a[n+88>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[c>>2]|0;v=a[f>>2]|0;g=(a[l>>2]|0)+1996064986+(a[n+92>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[l>>2]=s;v=a[t>>2]|0;p=a[u>>2]|0;h=(a[f>>2]|0)-1740746414+(a[n+96>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[c>>2]|0;s=(a[u>>2]|0)-1473132947+(a[n+100>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[u>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[c>>2]|0)-1341970488+(a[n+104>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[c>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-1084653625+(a[n+108>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[l>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)-958395405+(a[n+112>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)-710438585+(a[n+116>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[u>>2]|0;p=a[l>>2]|0;h=(a[o>>2]|0)+113926993+(a[n+120>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[c>>2]|0;v=a[f>>2]|0;s=(a[l>>2]|0)+338241895+(a[n+124>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[l>>2]=h;v=a[t>>2]|0;p=a[u>>2]|0;g=(a[f>>2]|0)+666307205+(a[n+128>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[c>>2]|0;h=(a[u>>2]|0)+773529912+(a[n+132>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[u>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[c>>2]|0)+1294757372+(a[n+136>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[c>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1396182291+(a[n+140>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[l>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1695183700+(a[n+144>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)+1986661051+(a[n+148>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[u>>2]|0;p=a[l>>2]|0;g=(a[o>>2]|0)-2117940946+(a[n+152>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[c>>2]|0;v=a[f>>2]|0;h=(a[l>>2]|0)-1838011259+(a[n+156>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[l>>2]=g;v=a[t>>2]|0;p=a[u>>2]|0;s=(a[f>>2]|0)-1564481375+(a[n+160>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[c>>2]|0;g=(a[u>>2]|0)-1474664885+(a[n+164>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[u>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[c>>2]|0)-1035236496+(a[n+168>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[c>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)-949202525+(a[n+172>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[l>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)-778901479+(a[n+176>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)-694614492+(a[n+180>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[u>>2]|0;p=a[l>>2]|0;s=(a[o>>2]|0)-200395387+(a[n+184>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[c>>2]|0;v=a[f>>2]|0;g=(a[l>>2]|0)+275423344+(a[n+188>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[l>>2]=s;v=a[t>>2]|0;p=a[u>>2]|0;h=(a[f>>2]|0)+430227734+(a[n+192>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[c>>2]|0;s=(a[u>>2]|0)+506948616+(a[n+196>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[u>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[c>>2]|0)+659060556+(a[n+200>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[c>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)+883997877+(a[n+204>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[l>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+958139571+(a[n+208>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1322822218+(a[n+212>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[u>>2]|0;p=a[l>>2]|0;h=(a[o>>2]|0)+1537002063+(a[n+216>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[c>>2]|0;v=a[f>>2]|0;s=(a[l>>2]|0)+1747873779+(a[n+220>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[l>>2]=h;v=a[t>>2]|0;p=a[u>>2]|0;g=(a[f>>2]|0)+1955562222+(a[n+224>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[c>>2]|0;h=(a[u>>2]|0)+2024104815+(a[n+228>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[u>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[c>>2]|0)-2067236844+(a[n+232>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[c>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)-1933114872+(a[n+236>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[l>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)-1866530822+(a[n+240>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-1538233109+(a[n+244>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[u>>2]|0;p=a[l>>2]|0;g=(a[o>>2]|0)-1090935817+(a[n+248>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;o=a[c>>2]|0;c=a[f>>2]|0;f=(a[l>>2]|0)-965641998+(a[n+252>>2]|0)+((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+((c^a[u>>2])&o^c)|0;c=a[b>>2]|0;b=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+f;t=f+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((b|c)&s|b&c)|0;a[l>>2]=t;a[e>>2]=(a[e>>2]|0)+t;t=e+4|0;a[t>>2]=(a[t>>2]|0)+(a[i+4>>2]|0);t=e+8|0;a[t>>2]=(a[t>>2]|0)+(a[i+8>>2]|0);t=e+12|0;a[t>>2]=(a[t>>2]|0)+(a[i+12>>2]|0);t=e+16|0;a[t>>2]=(a[t>>2]|0)+(a[i+16>>2]|0);t=e+20|0;a[t>>2]=(a[t>>2]|0)+(a[i+20>>2]|0);t=e+24|0;a[t>>2]=(a[t>>2]|0)+(a[i+24>>2]|0);t=e+28|0;a[t>>2]=(a[t>>2]|0)+(a[i+28>>2]|0);d=r;return}function Nt(e,t){e=e|0;t=t|0;n[e+3|0]=t&255;n[e+2|0]=t>>>8&255;n[e+1|0]=t>>>16&255;n[e]=t>>>24&255;return}function Ft(e){e=e|0;return(o[e+2|0]|0)<<8|(o[e+3|0]|0)|(o[e+1|0]|0)<<16|(o[e]|0)<<24|0}function jt(e,t){e=e|0;t=t|0;Bt(t);zt(e,t|0,32);en(t|0,0,104);return}function Bt(e){e=e|0;var t=0,r=0,n=0;t=d;d=d+8|0;r=t|0;zt(r,e+32|0,8);n=(a[e+36>>2]|0)>>>3&63;Tt(e,720,(n>>>0<56?56:120)-n|0);Tt(e,r,8);d=t;return}function zt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=r>>>2;if((n|0)==0){return}else{i=0}do{Nt(e+(i<<2)|0,a[t+(i<<2)>>2]|0);i=i+1|0}while(i>>>0>>0);return}function Ht(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0,o=0,s=0,f=0,c=0,u=0;i=d;d=d+96|0;a=i|0;if(r>>>0>64){o=e|0;Mt(o);Tt(o,t,r);s=i+64|0;jt(s,o);f=s;c=32}else{f=t;c=r}r=e|0;Mt(r);t=a|0;en(t|0,54,64);if((c|0)!=0){s=0;do{o=a+s|0;n[o]=n[o]^n[f+s|0];s=s+1|0}while(s>>>0>>0)}Tt(r,t,64);r=e+104|0;Mt(r);en(t|0,92,64);if((c|0)==0){Tt(r,t,64);d=i;return}else{u=0}do{e=a+u|0;n[e]=n[e]^n[f+u|0];u=u+1|0}while(u>>>0>>0);Tt(r,t,64);d=i;return}function Lt(e,t,r){e=e|0;t=t|0;r=r|0;Tt(e|0,t,r);return}function qt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;d=d+32|0;n=r|0;jt(n,t|0);i=t+104|0;Tt(i,n,32);jt(e,i);d=r;return}function Dt(e,t,r,i,a,o,s,f){e=e|0;t=t|0;r=r|0;i=i|0;a=a|0;o=o|0;s=s|0;f=f|0;var c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0;c=d;d=d+488|0;u=c|0;l=c+208|0;h=c+424|0;p=c+456|0;Ht(u,e,t);Lt(u,r,i);if((f|0)==0){d=c;return}i=c+416|0;r=l;b=u;u=h|0;v=p|0;m=0;g=o>>>0>>0|o>>>0==m>>>0&a>>>0<2>>>0;m=0;y=0;do{m=m+1|0;Nt(i,m);Jr(r|0,b|0,208)|0;Lt(l,i,4);qt(u,l);Jr(v|0,u|0,32)|0;if(!g){w=0;_=2;do{Ht(l,e,t);Lt(l,u,32);qt(u,l);x=0;do{k=p+x|0;n[k]=n[k]^n[h+x|0];x=x+1|0}while((x|0)<32);_=rn(_,w,1,0)|0;w=j}while(!(w>>>0>o>>>0|w>>>0==o>>>0&_>>>0>a>>>0))}_=f-y|0;w=_>>>0>32?32:_;_=s+y|0;Jr(_|0,v|0,w)|0;y=m<<5}while(y>>>0>>0);d=c;return}function Ut(e,t){e=e|0;t=t|0;var r=0;r=0;do{a[e+(r<<2)>>2]=Ft(t+(r<<2)|0)|0;r=r+1|0}while(r>>>0<16);return}function Kt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0,q=0,D=0,U=0,K=0,V=0,Y=0,W=0,X=0,G=0,Z=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0,ie=0,ae=0,oe=0,se=0,fe=0,ce=0,ue=0,de=0,le=0,he=0,pe=0,be=0,ve=0,me=0,ge=0,ye=0,_e=0,xe=0,Se=0,Ae=0,Me=0,Ee=0,Pe=0,Ie=0,Ce=0,Oe=0,Te=0,Re=0,Ne=0;do{if(e>>>0<245){if(e>>>0<11){t=16}else{t=e+11&-8}r=t>>>3;n=a[208]|0;i=n>>>(r>>>0);if((i&3|0)!=0){o=(i&1^1)+r|0;s=o<<1;f=872+(s<<2)|0;c=872+(s+2<<2)|0;s=a[c>>2]|0;u=s+8|0;d=a[u>>2]|0;do{if((f|0)==(d|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}l=d+12|0;if((a[l>>2]|0)==(s|0)){a[l>>2]=f;a[c>>2]=d;break}else{ke();return 0}}}while(0);d=o<<3;a[s+4>>2]=d|3;c=s+(d|4)|0;a[c>>2]=a[c>>2]|1;h=u;return h|0}if(t>>>0<=(a[210]|0)>>>0){p=t;break}if((i|0)!=0){c=2<>>12&16;f=c>>>(d>>>0);c=f>>>5&8;l=f>>>(c>>>0);f=l>>>2&4;b=l>>>(f>>>0);l=b>>>1&2;v=b>>>(l>>>0);b=v>>>1&1;m=(c|d|f|l|b)+(v>>>(b>>>0))|0;b=m<<1;v=872+(b<<2)|0;l=872+(b+2<<2)|0;b=a[l>>2]|0;f=b+8|0;d=a[f>>2]|0;do{if((v|0)==(d|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}c=d+12|0;if((a[c>>2]|0)==(b|0)){a[c>>2]=v;a[l>>2]=d;break}else{ke();return 0}}}while(0);d=m<<3;l=d-t|0;a[b+4>>2]=t|3;v=b;n=v+t|0;a[v+(t|4)>>2]=l|1;a[v+d>>2]=l;d=a[210]|0;if((d|0)!=0){v=a[213]|0;r=d>>>3;d=r<<1;i=872+(d<<2)|0;u=a[208]|0;s=1<>2]|0;if(o>>>0>=(a[212]|0)>>>0){g=o;y=r;break}ke();return 0}}while(0);a[y>>2]=v;a[g+12>>2]=v;a[v+8>>2]=g;a[v+12>>2]=i}a[210]=l;a[213]=n;h=f;return h|0}d=a[209]|0;if((d|0)==0){p=t;break}s=(d&-d)-1|0;d=s>>>12&16;u=s>>>(d>>>0);s=u>>>5&8;b=u>>>(s>>>0);u=b>>>2&4;m=b>>>(u>>>0);b=m>>>1&2;r=m>>>(b>>>0);m=r>>>1&1;o=a[1136+((s|d|u|b|m)+(r>>>(m>>>0))<<2)>>2]|0;m=o;r=o;b=(a[o+4>>2]&-8)-t|0;while(1){o=a[m+16>>2]|0;if((o|0)==0){u=a[m+20>>2]|0;if((u|0)==0){break}else{w=u}}else{w=o}o=(a[w+4>>2]&-8)-t|0;u=o>>>0>>0;m=w;r=u?w:r;b=u?o:b}m=r;f=a[212]|0;if(m>>>0>>0){ke();return 0}n=m+t|0;l=n;if(m>>>0>=n>>>0){ke();return 0}n=a[r+24>>2]|0;i=a[r+12>>2]|0;do{if((i|0)==(r|0)){v=r+20|0;o=a[v>>2]|0;if((o|0)==0){u=r+16|0;d=a[u>>2]|0;if((d|0)==0){_=0;break}else{x=d;k=u}}else{x=o;k=v}while(1){v=x+20|0;o=a[v>>2]|0;if((o|0)!=0){x=o;k=v;continue}v=x+16|0;o=a[v>>2]|0;if((o|0)==0){break}else{x=o;k=v}}if(k>>>0>>0){ke();return 0}else{a[k>>2]=0;_=x;break}}else{v=a[r+8>>2]|0;if(v>>>0>>0){ke();return 0}o=v+12|0;if((a[o>>2]|0)!=(r|0)){ke();return 0}u=i+8|0;if((a[u>>2]|0)==(r|0)){a[o>>2]=i;a[u>>2]=v;_=i;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){i=r+28|0;f=1136+(a[i>>2]<<2)|0;do{if((r|0)==(a[f>>2]|0)){a[f>>2]=_;if((_|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}v=n+16|0;if((a[v>>2]|0)==(r|0)){a[v>>2]=_}else{a[n+20>>2]=_}if((_|0)==0){break e}}}while(0);if(_>>>0<(a[212]|0)>>>0){ke();return 0}a[_+24>>2]=n;i=a[r+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+16>>2]=i;a[i+24>>2]=_;break}}}while(0);i=a[r+20>>2]|0;if((i|0)==0){break}if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+20>>2]=i;a[i+24>>2]=_;break}}}while(0);if(b>>>0<16){n=b+t|0;a[r+4>>2]=n|3;i=m+(n+4)|0;a[i>>2]=a[i>>2]|1}else{a[r+4>>2]=t|3;a[m+(t|4)>>2]=b|1;a[m+(b+t)>>2]=b;i=a[210]|0;if((i|0)!=0){n=a[213]|0;f=i>>>3;i=f<<1;v=872+(i<<2)|0;u=a[208]|0;o=1<>2]|0;if(d>>>0>=(a[212]|0)>>>0){S=d;A=f;break}ke();return 0}}while(0);a[A>>2]=n;a[S+12>>2]=n;a[n+8>>2]=S;a[n+12>>2]=v}a[210]=b;a[213]=l}i=r+8|0;if((i|0)==0){p=t;break}else{h=i}return h|0}else{if(e>>>0>4294967231){p=-1;break}i=e+11|0;o=i&-8;u=a[209]|0;if((u|0)==0){p=o;break}m=-o|0;f=i>>>8;do{if((f|0)==0){M=0}else{if(o>>>0>16777215){M=31;break}i=(f+1048320|0)>>>16&8;d=f<>>16&4;c=d<>>16&2;E=14-(s|i|d)+(c<>>15)|0;M=o>>>((E+7|0)>>>0)&1|E<<1}}while(0);f=a[1136+(M<<2)>>2]|0;e:do{if((f|0)==0){P=0;I=m;C=0}else{if((M|0)==31){O=0}else{O=25-(M>>>1)|0}r=0;l=m;b=f;v=o<>2]&-8;d=E-o|0;if(d>>>0>>0){if((E|0)==(o|0)){P=b;I=d;C=b;break e}else{T=b;R=d}}else{T=r;R=l}d=a[b+20>>2]|0;E=a[b+16+(v>>>31<<2)>>2]|0;c=(d|0)==0|(d|0)==(E|0)?n:d;if((E|0)==0){P=T;I=R;C=c;break}else{r=T;l=R;b=E;v=v<<1;n=c}}}}while(0);if((C|0)==0&(P|0)==0){f=2<>>12&16;n=f>>>(m>>>0);f=n>>>5&8;v=n>>>(f>>>0);n=v>>>2&4;b=v>>>(n>>>0);v=b>>>1&2;l=b>>>(v>>>0);b=l>>>1&1;N=a[1136+((f|m|n|v|b)+(l>>>(b>>>0))<<2)>>2]|0}else{N=C}if((N|0)==0){F=I;j=P}else{b=N;l=I;v=P;while(1){n=(a[b+4>>2]&-8)-o|0;m=n>>>0>>0;f=m?n:l;n=m?b:v;m=a[b+16>>2]|0;if((m|0)!=0){b=m;l=f;v=n;continue}m=a[b+20>>2]|0;if((m|0)==0){F=f;j=n;break}else{b=m;l=f;v=n}}}if((j|0)==0){p=o;break}if(F>>>0>=((a[210]|0)-o|0)>>>0){p=o;break}v=j;l=a[212]|0;if(v>>>0>>0){ke();return 0}b=v+o|0;u=b;if(v>>>0>=b>>>0){ke();return 0}n=a[j+24>>2]|0;f=a[j+12>>2]|0;do{if((f|0)==(j|0)){m=j+20|0;r=a[m>>2]|0;if((r|0)==0){c=j+16|0;E=a[c>>2]|0;if((E|0)==0){B=0;break}else{z=E;H=c}}else{z=r;H=m}while(1){m=z+20|0;r=a[m>>2]|0;if((r|0)!=0){z=r;H=m;continue}m=z+16|0;r=a[m>>2]|0;if((r|0)==0){break}else{z=r;H=m}}if(H>>>0>>0){ke();return 0}else{a[H>>2]=0;B=z;break}}else{m=a[j+8>>2]|0;if(m>>>0>>0){ke();return 0}r=m+12|0;if((a[r>>2]|0)!=(j|0)){ke();return 0}c=f+8|0;if((a[c>>2]|0)==(j|0)){a[r>>2]=f;a[c>>2]=m;B=f;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){f=j+28|0;l=1136+(a[f>>2]<<2)|0;do{if((j|0)==(a[l>>2]|0)){a[l>>2]=B;if((B|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}m=n+16|0;if((a[m>>2]|0)==(j|0)){a[m>>2]=B}else{a[n+20>>2]=B}if((B|0)==0){break e}}}while(0);if(B>>>0<(a[212]|0)>>>0){ke();return 0}a[B+24>>2]=n;f=a[j+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[B+16>>2]=f;a[f+24>>2]=B;break}}}while(0);f=a[j+20>>2]|0;if((f|0)==0){break}if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[B+20>>2]=f;a[f+24>>2]=B;break}}}while(0);do{if(F>>>0<16){n=F+o|0;a[j+4>>2]=n|3;f=v+(n+4)|0;a[f>>2]=a[f>>2]|1}else{a[j+4>>2]=o|3;a[v+(o|4)>>2]=F|1;a[v+(F+o)>>2]=F;f=F>>>3;if(F>>>0<256){n=f<<1;l=872+(n<<2)|0;m=a[208]|0;c=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){L=r;q=f;break}ke();return 0}}while(0);a[q>>2]=u;a[L+12>>2]=u;a[v+(o+8)>>2]=L;a[v+(o+12)>>2]=l;break}n=b;c=F>>>8;do{if((c|0)==0){D=0}else{if(F>>>0>16777215){D=31;break}m=(c+1048320|0)>>>16&8;f=c<>>16&4;E=f<>>16&2;d=14-(r|m|f)+(E<>>15)|0;D=F>>>((d+7|0)>>>0)&1|d<<1}}while(0);c=1136+(D<<2)|0;a[v+(o+28)>>2]=D;a[v+(o+20)>>2]=0;a[v+(o+16)>>2]=0;l=a[209]|0;d=1<>2]=n;a[v+(o+24)>>2]=c;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}if((D|0)==31){U=0}else{U=25-(D>>>1)|0}d=F<>2]|0;while(1){if((a[l+4>>2]&-8|0)==(F|0)){break}K=l+16+(d>>>31<<2)|0;c=a[K>>2]|0;if((c|0)==0){V=262;break}else{d=d<<1;l=c}}if((V|0)==262){if(K>>>0<(a[212]|0)>>>0){ke();return 0}else{a[K>>2]=n;a[v+(o+24)>>2]=l;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}}d=l+8|0;c=a[d>>2]|0;f=a[212]|0;if(l>>>0>>0){ke();return 0}if(c>>>0>>0){ke();return 0}else{a[c+12>>2]=n;a[d>>2]=n;a[v+(o+8)>>2]=c;a[v+(o+12)>>2]=l;a[v+(o+24)>>2]=0;break}}}while(0);v=j+8|0;if((v|0)==0){p=o;break}else{h=v}return h|0}}while(0);j=a[210]|0;if(p>>>0<=j>>>0){K=j-p|0;F=a[213]|0;if(K>>>0>15){U=F;a[213]=U+p;a[210]=K;a[U+(p+4)>>2]=K|1;a[U+j>>2]=K;a[F+4>>2]=p|3}else{a[210]=0;a[213]=0;a[F+4>>2]=j|3;K=F+(j+4)|0;a[K>>2]=a[K>>2]|1}h=F+8|0;return h|0}F=a[211]|0;if(p>>>0>>0){K=F-p|0;a[211]=K;F=a[214]|0;j=F;a[214]=j+p;a[j+(p+4)>>2]=K|1;a[F+4>>2]=p|3;h=F+8|0;return h|0}do{if((a[200]|0)==0){F=we(8)|0;if((F-1&F|0)==0){a[202]=F;a[201]=F;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);F=p+48|0;K=a[202]|0;j=p+47|0;U=K+j|0;D=-K|0;K=U&D;if(K>>>0<=p>>>0){h=0;return h|0}L=a[318]|0;do{if((L|0)!=0){q=a[316]|0;B=q+K|0;if(B>>>0<=q>>>0|B>>>0>L>>>0){h=0}else{break}return h|0}}while(0);e:do{if((a[319]&4|0)==0){L=a[214]|0;t:do{if((L|0)==0){V=292}else{B=L;q=1280;while(1){Y=q|0;z=a[Y>>2]|0;if(z>>>0<=B>>>0){W=q+4|0;if((z+(a[W>>2]|0)|0)>>>0>B>>>0){break}}z=a[q+8>>2]|0;if((z|0)==0){V=292;break t}else{q=z}}if((q|0)==0){V=292;break}B=U-(a[211]|0)&D;if(B>>>0>=2147483647){X=0;break}l=Ze(B|0)|0;n=(l|0)==((a[Y>>2]|0)+(a[W>>2]|0)|0);G=n?l:-1;Z=n?B:0;Q=l;$=B;V=301}}while(0);do{if((V|0)==292){L=Ze(0)|0;if((L|0)==-1){X=0;break}o=L;B=a[201]|0;l=B-1|0;if((l&o|0)==0){J=K}else{J=K-o+(l+o&-B)|0}B=a[316]|0;o=B+J|0;if(!(J>>>0>p>>>0&J>>>0<2147483647)){X=0;break}l=a[318]|0;if((l|0)!=0){if(o>>>0<=B>>>0|o>>>0>l>>>0){X=0;break}}l=Ze(J|0)|0;o=(l|0)==(L|0);G=o?L:-1;Z=o?J:0;Q=l;$=J;V=301}}while(0);t:do{if((V|0)==301){l=-$|0;if((G|0)!=-1){ee=Z;te=G;V=312;break e}do{if((Q|0)!=-1&$>>>0<2147483647&$>>>0>>0){o=a[202]|0;L=j-$+o&-o;if(L>>>0>=2147483647){re=$;break}if((Ze(L|0)|0)==-1){Ze(l|0)|0;X=Z;break t}else{re=L+$|0;break}}else{re=$}}while(0);if((Q|0)==-1){X=Z}else{ee=re;te=Q;V=312;break e}}}while(0);a[319]=a[319]|4;ne=X;V=309}else{ne=0;V=309}}while(0);do{if((V|0)==309){if(K>>>0>=2147483647){break}X=Ze(K|0)|0;Q=Ze(0)|0;if(!((Q|0)!=-1&(X|0)!=-1&X>>>0>>0)){break}re=Q-X|0;Q=re>>>0>(p+40|0)>>>0;Z=Q?X:-1;if((Z|0)!=-1){ee=Q?re:ne;te=Z;V=312}}}while(0);do{if((V|0)==312){ne=(a[316]|0)+ee|0;a[316]=ne;if(ne>>>0>(a[317]|0)>>>0){a[317]=ne}ne=a[214]|0;e:do{if((ne|0)==0){K=a[212]|0;if((K|0)==0|te>>>0>>0){a[212]=te}a[320]=te;a[321]=ee;a[323]=0;a[217]=a[200];a[216]=-1;K=0;do{Z=K<<1;re=872+(Z<<2)|0;a[872+(Z+3<<2)>>2]=re;a[872+(Z+2<<2)>>2]=re;K=K+1|0}while(K>>>0<32);K=te+8|0;if((K&7|0)==0){ie=0}else{ie=-K&7}K=ee-40-ie|0;a[214]=te+ie;a[211]=K;a[te+(ie+4)>>2]=K|1;a[te+(ee-36)>>2]=40;a[215]=a[204]}else{K=1280;while(1){ae=a[K>>2]|0;oe=K+4|0;se=a[oe>>2]|0;if((te|0)==(ae+se|0)){V=324;break}re=a[K+8>>2]|0;if((re|0)==0){break}else{K=re}}do{if((V|0)==324){if((a[K+12>>2]&8|0)!=0){break}re=ne;if(!(re>>>0>=ae>>>0&re>>>0>>0)){break}a[oe>>2]=se+ee;re=a[214]|0;Z=(a[211]|0)+ee|0;Q=re;X=re+8|0;if((X&7|0)==0){fe=0}else{fe=-X&7}X=Z-fe|0;a[214]=Q+fe;a[211]=X;a[Q+(fe+4)>>2]=X|1;a[Q+(Z+4)>>2]=40;a[215]=a[204];break e}}while(0);if(te>>>0<(a[212]|0)>>>0){a[212]=te}K=te+ee|0;Z=1280;while(1){ce=Z|0;if((a[ce>>2]|0)==(K|0)){V=334;break}Q=a[Z+8>>2]|0;if((Q|0)==0){break}else{Z=Q}}do{if((V|0)==334){if((a[Z+12>>2]&8|0)!=0){break}a[ce>>2]=te;K=Z+4|0;a[K>>2]=(a[K>>2]|0)+ee;K=te+8|0;if((K&7|0)==0){ue=0}else{ue=-K&7}K=te+(ee+8)|0;if((K&7|0)==0){de=0}else{de=-K&7}K=te+(de+ee)|0;Q=K;X=ue+p|0;re=te+X|0;$=re;j=K-(te+ue)-p|0;a[te+(ue+4)>>2]=p|3;do{if((Q|0)==(a[214]|0)){F=(a[211]|0)+j|0;a[211]=F;a[214]=$;a[te+(X+4)>>2]=F|1}else{if((Q|0)==(a[213]|0)){F=(a[210]|0)+j|0;a[210]=F;a[213]=$;a[te+(X+4)>>2]=F|1;a[te+(F+X)>>2]=F;break}F=ee+4|0;G=a[te+(F+de)>>2]|0;if((G&3|0)==1){J=G&-8;W=G>>>3;t:do{if(G>>>0<256){Y=a[te+((de|8)+ee)>>2]|0;D=a[te+(ee+12+de)>>2]|0;U=872+(W<<1<<2)|0;do{if((Y|0)!=(U|0)){if(Y>>>0<(a[212]|0)>>>0){ke();return 0}if((a[Y+12>>2]|0)==(Q|0)){break}ke();return 0}}while(0);if((D|0)==(Y|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke();return 0}l=D+8|0;if((a[l>>2]|0)==(Q|0)){le=l;break}ke();return 0}}while(0);a[Y+12>>2]=D;a[le>>2]=Y}else{U=K;l=a[te+((de|24)+ee)>>2]|0;q=a[te+(ee+12+de)>>2]|0;do{if((q|0)==(U|0)){L=de|16;o=te+(F+L)|0;B=a[o>>2]|0;if((B|0)==0){n=te+(L+ee)|0;L=a[n>>2]|0;if((L|0)==0){he=0;break}else{pe=L;be=n}}else{pe=B;be=o}while(1){o=pe+20|0;B=a[o>>2]|0;if((B|0)!=0){pe=B;be=o;continue}o=pe+16|0;B=a[o>>2]|0;if((B|0)==0){break}else{pe=B;be=o}}if(be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[be>>2]=0;he=pe;break}}else{o=a[te+((de|8)+ee)>>2]|0;if(o>>>0<(a[212]|0)>>>0){ke();return 0}B=o+12|0;if((a[B>>2]|0)!=(U|0)){ke();return 0}n=q+8|0;if((a[n>>2]|0)==(U|0)){a[B>>2]=q;a[n>>2]=o;he=q;break}else{ke();return 0}}}while(0);if((l|0)==0){break}q=te+(ee+28+de)|0;Y=1136+(a[q>>2]<<2)|0;do{if((U|0)==(a[Y>>2]|0)){a[Y>>2]=he;if((he|0)!=0){break}a[209]=a[209]&~(1<>2]);break t}else{if(l>>>0<(a[212]|0)>>>0){ke();return 0}D=l+16|0;if((a[D>>2]|0)==(U|0)){a[D>>2]=he}else{a[l+20>>2]=he}if((he|0)==0){break t}}}while(0);if(he>>>0<(a[212]|0)>>>0){ke();return 0}a[he+24>>2]=l;U=de|16;q=a[te+(U+ee)>>2]|0;do{if((q|0)!=0){if(q>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+16>>2]=q;a[q+24>>2]=he;break}}}while(0);q=a[te+(F+U)>>2]|0;if((q|0)==0){break}if(q>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+20>>2]=q;a[q+24>>2]=he;break}}}while(0);ve=te+((J|de)+ee)|0;me=J+j|0}else{ve=Q;me=j}F=ve+4|0;a[F>>2]=a[F>>2]&-2;a[te+(X+4)>>2]=me|1;a[te+(me+X)>>2]=me;F=me>>>3;if(me>>>0<256){W=F<<1;G=872+(W<<2)|0;q=a[208]|0;l=1<>2]|0;if(Y>>>0>=(a[212]|0)>>>0){ge=Y;ye=F;break}ke();return 0}}while(0);a[ye>>2]=$;a[ge+12>>2]=$;a[te+(X+8)>>2]=ge;a[te+(X+12)>>2]=G;break}W=re;l=me>>>8;do{if((l|0)==0){_e=0}else{if(me>>>0>16777215){_e=31;break}q=(l+1048320|0)>>>16&8;J=l<>>16&4;Y=J<>>16&2;D=14-(F|q|J)+(Y<>>15)|0;_e=me>>>((D+7|0)>>>0)&1|D<<1}}while(0);l=1136+(_e<<2)|0;a[te+(X+28)>>2]=_e;a[te+(X+20)>>2]=0;a[te+(X+16)>>2]=0;G=a[209]|0;D=1<<_e;if((G&D|0)==0){a[209]=G|D;a[l>>2]=W;a[te+(X+24)>>2]=l;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}if((_e|0)==31){xe=0}else{xe=25-(_e>>>1)|0}D=me<>2]|0;while(1){if((a[G+4>>2]&-8|0)==(me|0)){break}Se=G+16+(D>>>31<<2)|0;l=a[Se>>2]|0;if((l|0)==0){V=407;break}else{D=D<<1;G=l}}if((V|0)==407){if(Se>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Se>>2]=W;a[te+(X+24)>>2]=G;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}}D=G+8|0;l=a[D>>2]|0;J=a[212]|0;if(G>>>0>>0){ke();return 0}if(l>>>0>>0){ke();return 0}else{a[l+12>>2]=W;a[D>>2]=W;a[te+(X+8)>>2]=l;a[te+(X+12)>>2]=G;a[te+(X+24)>>2]=0;break}}}while(0);h=te+(ue|8)|0;return h|0}}while(0);Z=ne;X=1280;while(1){Ae=a[X>>2]|0;if(Ae>>>0<=Z>>>0){Me=a[X+4>>2]|0;Ee=Ae+Me|0;if(Ee>>>0>Z>>>0){break}}X=a[X+8>>2]|0}X=Ae+(Me-39)|0;if((X&7|0)==0){Pe=0}else{Pe=-X&7}X=Ae+(Me-47+Pe)|0;re=X>>>0<(ne+16|0)>>>0?Z:X;X=re+8|0;$=te+8|0;if(($&7|0)==0){Ie=0}else{Ie=-$&7}$=ee-40-Ie|0;a[214]=te+Ie;a[211]=$;a[te+(Ie+4)>>2]=$|1;a[te+(ee-36)>>2]=40;a[215]=a[204];a[re+4>>2]=27;a[X>>2]=a[320];a[X+4>>2]=a[1284>>2];a[X+8>>2]=a[1288>>2];a[X+12>>2]=a[1292>>2];a[320]=te;a[321]=ee;a[323]=0;a[322]=X;X=re+28|0;a[X>>2]=7;if((re+32|0)>>>0>>0){$=X;while(1){X=$+4|0;a[X>>2]=7;if(($+8|0)>>>0>>0){$=X}else{break}}}if((re|0)==(Z|0)){break}$=re-ne|0;X=Z+($+4)|0;a[X>>2]=a[X>>2]&-2;a[ne+4>>2]=$|1;a[Z+$>>2]=$;X=$>>>3;if($>>>0<256){j=X<<1;Q=872+(j<<2)|0;K=a[208]|0;l=1<>2]|0;if(D>>>0>=(a[212]|0)>>>0){Ce=D;Oe=X;break}ke();return 0}}while(0);a[Oe>>2]=ne;a[Ce+12>>2]=ne;a[ne+8>>2]=Ce;a[ne+12>>2]=Q;break}j=ne;l=$>>>8;do{if((l|0)==0){Te=0}else{if($>>>0>16777215){Te=31;break}K=(l+1048320|0)>>>16&8;Z=l<>>16&4;X=Z<>>16&2;D=14-(re|K|Z)+(X<>>15)|0;Te=$>>>((D+7|0)>>>0)&1|D<<1}}while(0);l=1136+(Te<<2)|0;a[ne+28>>2]=Te;a[ne+20>>2]=0;a[ne+16>>2]=0;Q=a[209]|0;D=1<>2]=j;a[ne+24>>2]=l;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}if((Te|0)==31){Re=0}else{Re=25-(Te>>>1)|0}D=$<>2]|0;while(1){if((a[Q+4>>2]&-8|0)==($|0)){break}Ne=Q+16+(D>>>31<<2)|0;l=a[Ne>>2]|0;if((l|0)==0){V=442;break}else{D=D<<1;Q=l}}if((V|0)==442){if(Ne>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Ne>>2]=j;a[ne+24>>2]=Q;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}}D=Q+8|0;$=a[D>>2]|0;l=a[212]|0;if(Q>>>0>>0){ke();return 0}if($>>>0>>0){ke();return 0}else{a[$+12>>2]=j;a[D>>2]=j;a[ne+8>>2]=$;a[ne+12>>2]=Q;a[ne+24>>2]=0;break}}}while(0);ne=a[211]|0;if(ne>>>0<=p>>>0){break}$=ne-p|0;a[211]=$;ne=a[214]|0;D=ne;a[214]=D+p;a[D+(p+4)>>2]=$|1;a[ne+4>>2]=p|3;h=ne+8|0;return h|0}}while(0);a[($e()|0)>>2]=12;h=0;return h|0}function Vt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0;if((e|0)==0){return}t=e-8|0;r=t;n=a[212]|0;if(t>>>0>>0){ke()}i=a[e-4>>2]|0;o=i&3;if((o|0)==1){ke()}s=i&-8;f=e+(s-8)|0;c=f;e:do{if((i&1|0)==0){u=a[t>>2]|0;if((o|0)==0){return}d=-8-u|0;l=e+d|0;h=l;p=u+s|0;if(l>>>0>>0){ke()}if((h|0)==(a[213]|0)){b=e+(s-4)|0;if((a[b>>2]&3|0)!=3){v=h;m=p;break}a[210]=p;a[b>>2]=a[b>>2]&-2;a[e+(d+4)>>2]=p|1;a[f>>2]=p;return}b=u>>>3;if(u>>>0<256){u=a[e+(d+8)>>2]|0;g=a[e+(d+12)>>2]|0;y=872+(b<<1<<2)|0;do{if((u|0)!=(y|0)){if(u>>>0>>0){ke()}if((a[u+12>>2]|0)==(h|0)){break}ke()}}while(0);if((g|0)==(u|0)){a[208]=a[208]&~(1<>>0>>0){ke()}_=g+8|0;if((a[_>>2]|0)==(h|0)){w=_;break}ke()}}while(0);a[u+12>>2]=g;a[w>>2]=u;v=h;m=p;break}y=l;b=a[e+(d+24)>>2]|0;_=a[e+(d+12)>>2]|0;do{if((_|0)==(y|0)){x=e+(d+20)|0;k=a[x>>2]|0;if((k|0)==0){S=e+(d+16)|0;A=a[S>>2]|0;if((A|0)==0){M=0;break}else{E=A;P=S}}else{E=k;P=x}while(1){x=E+20|0;k=a[x>>2]|0;if((k|0)!=0){E=k;P=x;continue}x=E+16|0;k=a[x>>2]|0;if((k|0)==0){break}else{E=k;P=x}}if(P>>>0>>0){ke()}else{a[P>>2]=0;M=E;break}}else{x=a[e+(d+8)>>2]|0;if(x>>>0>>0){ke()}k=x+12|0;if((a[k>>2]|0)!=(y|0)){ke()}S=_+8|0;if((a[S>>2]|0)==(y|0)){a[k>>2]=_;a[S>>2]=x;M=_;break}else{ke()}}}while(0);if((b|0)==0){v=h;m=p;break}_=e+(d+28)|0;l=1136+(a[_>>2]<<2)|0;do{if((y|0)==(a[l>>2]|0)){a[l>>2]=M;if((M|0)!=0){break}a[209]=a[209]&~(1<>2]);v=h;m=p;break e}else{if(b>>>0<(a[212]|0)>>>0){ke()}u=b+16|0;if((a[u>>2]|0)==(y|0)){a[u>>2]=M}else{a[b+20>>2]=M}if((M|0)==0){v=h;m=p;break e}}}while(0);if(M>>>0<(a[212]|0)>>>0){ke()}a[M+24>>2]=b;y=a[e+(d+16)>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+16>>2]=y;a[y+24>>2]=M;break}}}while(0);y=a[e+(d+20)>>2]|0;if((y|0)==0){v=h;m=p;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+20>>2]=y;a[y+24>>2]=M;v=h;m=p;break}}else{v=r;m=s}}while(0);r=v;if(r>>>0>=f>>>0){ke()}M=e+(s-4)|0;n=a[M>>2]|0;if((n&1|0)==0){ke()}do{if((n&2|0)==0){if((c|0)==(a[214]|0)){E=(a[211]|0)+m|0;a[211]=E;a[214]=v;a[v+4>>2]=E|1;if((v|0)==(a[213]|0)){a[213]=0;a[210]=0}if(E>>>0<=(a[215]|0)>>>0){return}Qt(0)|0;return}if((c|0)==(a[213]|0)){E=(a[210]|0)+m|0;a[210]=E;a[213]=v;a[v+4>>2]=E|1;a[r+E>>2]=E;return}E=(n&-8)+m|0;P=n>>>3;e:do{if(n>>>0<256){w=a[e+s>>2]|0;o=a[e+(s|4)>>2]|0;t=872+(P<<1<<2)|0;do{if((w|0)!=(t|0)){if(w>>>0<(a[212]|0)>>>0){ke()}if((a[w+12>>2]|0)==(c|0)){break}ke()}}while(0);if((o|0)==(w|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke()}i=o+8|0;if((a[i>>2]|0)==(c|0)){I=i;break}ke()}}while(0);a[w+12>>2]=o;a[I>>2]=w}else{t=f;i=a[e+(s+16)>>2]|0;y=a[e+(s|4)>>2]|0;do{if((y|0)==(t|0)){b=e+(s+12)|0;_=a[b>>2]|0;if((_|0)==0){l=e+(s+8)|0;u=a[l>>2]|0;if((u|0)==0){C=0;break}else{O=u;T=l}}else{O=_;T=b}while(1){b=O+20|0;_=a[b>>2]|0;if((_|0)!=0){O=_;T=b;continue}b=O+16|0;_=a[b>>2]|0;if((_|0)==0){break}else{O=_;T=b}}if(T>>>0<(a[212]|0)>>>0){ke()}else{a[T>>2]=0;C=O;break}}else{b=a[e+s>>2]|0;if(b>>>0<(a[212]|0)>>>0){ke()}_=b+12|0;if((a[_>>2]|0)!=(t|0)){ke()}l=y+8|0;if((a[l>>2]|0)==(t|0)){a[_>>2]=y;a[l>>2]=b;C=y;break}else{ke()}}}while(0);if((i|0)==0){break}y=e+(s+20)|0;w=1136+(a[y>>2]<<2)|0;do{if((t|0)==(a[w>>2]|0)){a[w>>2]=C;if((C|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(i>>>0<(a[212]|0)>>>0){ke()}o=i+16|0;if((a[o>>2]|0)==(t|0)){a[o>>2]=C}else{a[i+20>>2]=C}if((C|0)==0){break e}}}while(0);if(C>>>0<(a[212]|0)>>>0){ke()}a[C+24>>2]=i;t=a[e+(s+8)>>2]|0;do{if((t|0)!=0){if(t>>>0<(a[212]|0)>>>0){ke()}else{a[C+16>>2]=t;a[t+24>>2]=C;break}}}while(0);t=a[e+(s+12)>>2]|0;if((t|0)==0){break}if(t>>>0<(a[212]|0)>>>0){ke()}else{a[C+20>>2]=t;a[t+24>>2]=C;break}}}while(0);a[v+4>>2]=E|1;a[r+E>>2]=E;if((v|0)!=(a[213]|0)){R=E;break}a[210]=E;return}else{a[M>>2]=n&-2;a[v+4>>2]=m|1;a[r+m>>2]=m;R=m}}while(0);m=R>>>3;if(R>>>0<256){r=m<<1;n=872+(r<<2)|0;M=a[208]|0;C=1<>2]|0;if(s>>>0>=(a[212]|0)>>>0){N=s;F=m;break}ke()}}while(0);a[F>>2]=v;a[N+12>>2]=v;a[v+8>>2]=N;a[v+12>>2]=n;return}n=v;N=R>>>8;do{if((N|0)==0){j=0}else{if(R>>>0>16777215){j=31;break}F=(N+1048320|0)>>>16&8;r=N<>>16&4;M=r<>>16&2;m=14-(C|F|r)+(M<>>15)|0;j=R>>>((m+7|0)>>>0)&1|m<<1}}while(0);N=1136+(j<<2)|0;a[v+28>>2]=j;a[v+20>>2]=0;a[v+16>>2]=0;m=a[209]|0;r=1<>2]=n;a[v+24>>2]=N;a[v+12>>2]=v;a[v+8>>2]=v}else{if((j|0)==31){B=0}else{B=25-(j>>>1)|0}M=R<>2]|0;while(1){if((a[F+4>>2]&-8|0)==(R|0)){break}z=F+16+(M>>>31<<2)|0;C=a[z>>2]|0;if((C|0)==0){H=621;break}else{M=M<<1;F=C}}if((H|0)==621){if(z>>>0<(a[212]|0)>>>0){ke()}else{a[z>>2]=n;a[v+24>>2]=F;a[v+12>>2]=v;a[v+8>>2]=v;break}}M=F+8|0;E=a[M>>2]|0;C=a[212]|0;if(F>>>0>>0){ke()}if(E>>>0>>0){ke()}else{a[E+12>>2]=n;a[M>>2]=n;a[v+8>>2]=E;a[v+12>>2]=F;a[v+24>>2]=0;break}}}while(0);v=(a[216]|0)-1|0;a[216]=v;if((v|0)==0){L=1288}else{return}while(1){v=a[L>>2]|0;if((v|0)==0){break}else{L=v+8|0}}a[216]=-1;return}function Yt(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((e|0)==0){r=0}else{n=oe(t,e)|0;if((t|e)>>>0<=65535){r=n;break}r=((n>>>0)/(e>>>0)|0|0)==(t|0)?n:-1}}while(0);t=Kt(r)|0;if((t|0)==0){return t|0}if((a[t-4>>2]&3|0)==0){return t|0}en(t|0,0,r|0);return t|0}function Wt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0;if((e|0)==0){r=Kt(t)|0;return r|0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;r=0;return r|0}if(t>>>0<11){n=16}else{n=t+11&-8}i=$t(e-8|0,n)|0;if((i|0)!=0){r=i+8|0;return r|0}i=Kt(t)|0;if((i|0)==0){r=0;return r|0}n=a[e-4>>2]|0;o=(n&-8)-((n&3|0)==0?8:4)|0;n=o>>>0>>0?o:t;Jr(i|0,e|0,n)|0;Vt(e);r=i;return r|0}function Xt(e,t){e=e|0;t=t|0;var r=0;if((e|0)==0){return 0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;return 0}if(t>>>0<11){r=16}else{r=t+11&-8}t=e-8|0;return(($t(t,r)|0)==(t|0)?e:0)|0}function Gt(e,t){e=e|0;t=t|0;var r=0;if(e>>>0<9){r=Kt(t)|0;return r|0}else{r=Zt(e,t)|0;return r|0}return 0}function Zt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0;r=e>>>0<16?16:e;if((r-1&r|0)==0){n=r}else{e=16;while(1){if(e>>>0>>0){e=e<<1}else{n=e;break}}}if((-64-n|0)>>>0<=t>>>0){a[($e()|0)>>2]=12;i=0;return i|0}if(t>>>0<11){o=16}else{o=t+11&-8}t=Kt(n+12+o|0)|0;if((t|0)==0){i=0;return i|0}e=t-8|0;r=e;s=n-1|0;do{if((t&s|0)==0){f=r}else{c=t+s&-n;u=c-8|0;d=e;if((u-d|0)>>>0>15){l=u}else{l=c+(n-8)|0}c=l;u=l-d|0;d=t-4|0;h=a[d>>2]|0;p=(h&-8)-u|0;if((h&3|0)==0){a[l>>2]=(a[e>>2]|0)+u;a[l+4>>2]=p;f=c;break}else{h=l+4|0;a[h>>2]=p|a[h>>2]&1|2;h=l+(p+4)|0;a[h>>2]=a[h>>2]|1;a[d>>2]=u|a[d>>2]&1|2;d=t+(u-4)|0;a[d>>2]=a[d>>2]|1;vr(r,u);f=c;break}}}while(0);r=f+4|0;t=a[r>>2]|0;do{if((t&3|0)!=0){l=t&-8;if(l>>>0<=(o+16|0)>>>0){break}e=l-o|0;n=f;a[r>>2]=o|t&1|2;a[n+(o|4)>>2]=e|3;s=n+(l|4)|0;a[s>>2]=a[s>>2]|1;vr(n+o|0,e)}}while(0);i=f+8|0;return i|0}function Qt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if(e>>>0>=4294967232){r=0;return r|0}t=a[214]|0;if((t|0)==0){r=0;return r|0}n=a[211]|0;do{if(n>>>0>(e+40|0)>>>0){i=a[202]|0;o=oe((((-40-e-1+n+i|0)>>>0)/(i>>>0)|0)-1|0,i)|0;s=t;f=1280;while(1){c=a[f>>2]|0;if(c>>>0<=s>>>0){if((c+(a[f+4>>2]|0)|0)>>>0>s>>>0){u=f;break}}c=a[f+8>>2]|0;if((c|0)==0){u=0;break}else{f=c}}if((a[u+12>>2]&8|0)!=0){break}f=Ze(0)|0;s=u+4|0;if((f|0)!=((a[u>>2]|0)+(a[s>>2]|0)|0)){break}c=Ze(-(o>>>0>2147483646?-2147483648-i|0:o)|0)|0;d=Ze(0)|0;if(!((c|0)!=-1&d>>>0>>0)){break}c=f-d|0;if((f|0)==(d|0)){break}a[s>>2]=(a[s>>2]|0)-c;a[316]=(a[316]|0)-c;s=a[214]|0;l=(a[211]|0)-c|0;c=s;h=s+8|0;if((h&7|0)==0){p=0}else{p=-h&7}h=l-p|0;a[214]=c+p;a[211]=h;a[c+(p+4)>>2]=h|1;a[c+(l+4)>>2]=40;a[215]=a[204];r=(f|0)!=(d|0)|0;return r|0}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){r=0;return r|0}a[215]=-1;r=0;return r|0}function $t(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0;r=e+4|0;n=a[r>>2]|0;i=n&-8;o=e;s=o+i|0;f=s;c=a[212]|0;if(o>>>0>>0){ke();return 0}u=n&3;if(!((u|0)!=1&o>>>0>>0)){ke();return 0}d=o+(i|4)|0;l=a[d>>2]|0;if((l&1|0)==0){ke();return 0}if((u|0)==0){if(t>>>0<256){h=0;return h|0}do{if(i>>>0>=(t+4|0)>>>0){if((i-t|0)>>>0>a[202]<<1>>>0){break}else{h=e}return h|0}}while(0);h=0;return h|0}if(i>>>0>=t>>>0){u=i-t|0;if(u>>>0<=15){h=e;return h|0}a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=u|3;a[d>>2]=a[d>>2]|1;vr(o+t|0,u);h=e;return h|0}if((f|0)==(a[214]|0)){u=(a[211]|0)+i|0;if(u>>>0<=t>>>0){h=0;return h|0}d=u-t|0;a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=d|1;a[214]=o+t;a[211]=d;h=e;return h|0}if((f|0)==(a[213]|0)){d=(a[210]|0)+i|0;if(d>>>0>>0){h=0;return h|0}u=d-t|0;if(u>>>0>15){a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=u|1;a[o+d>>2]=u;p=o+(d+4)|0;a[p>>2]=a[p>>2]&-2;b=o+t|0;v=u}else{a[r>>2]=n&1|d|2;n=o+(d+4)|0;a[n>>2]=a[n>>2]|1;b=0;v=0}a[210]=v;a[213]=b;h=e;return h|0}if((l&2|0)!=0){h=0;return h|0}b=(l&-8)+i|0;if(b>>>0>>0){h=0;return h|0}v=b-t|0;n=l>>>3;e:do{if(l>>>0<256){d=a[o+(i+8)>>2]|0;u=a[o+(i+12)>>2]|0;p=872+(n<<1<<2)|0;do{if((d|0)!=(p|0)){if(d>>>0>>0){ke();return 0}if((a[d+12>>2]|0)==(f|0)){break}ke();return 0}}while(0);if((u|0)==(d|0)){a[208]=a[208]&~(1<>>0>>0){ke();return 0}g=u+8|0;if((a[g>>2]|0)==(f|0)){m=g;break}ke();return 0}}while(0);a[d+12>>2]=u;a[m>>2]=d}else{p=s;g=a[o+(i+24)>>2]|0;y=a[o+(i+12)>>2]|0;do{if((y|0)==(p|0)){w=o+(i+20)|0;_=a[w>>2]|0;if((_|0)==0){x=o+(i+16)|0;k=a[x>>2]|0;if((k|0)==0){S=0;break}else{A=k;M=x}}else{A=_;M=w}while(1){w=A+20|0;_=a[w>>2]|0;if((_|0)!=0){A=_;M=w;continue}w=A+16|0;_=a[w>>2]|0;if((_|0)==0){break}else{A=_;M=w}}if(M>>>0>>0){ke();return 0}else{a[M>>2]=0;S=A;break}}else{w=a[o+(i+8)>>2]|0;if(w>>>0>>0){ke();return 0}_=w+12|0;if((a[_>>2]|0)!=(p|0)){ke();return 0}x=y+8|0;if((a[x>>2]|0)==(p|0)){a[_>>2]=y;a[x>>2]=w;S=y;break}else{ke();return 0}}}while(0);if((g|0)==0){break}y=o+(i+28)|0;d=1136+(a[y>>2]<<2)|0;do{if((p|0)==(a[d>>2]|0)){a[d>>2]=S;if((S|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(g>>>0<(a[212]|0)>>>0){ke();return 0}u=g+16|0;if((a[u>>2]|0)==(p|0)){a[u>>2]=S}else{a[g+20>>2]=S}if((S|0)==0){break e}}}while(0);if(S>>>0<(a[212]|0)>>>0){ke();return 0}a[S+24>>2]=g;p=a[o+(i+16)>>2]|0;do{if((p|0)!=0){if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[S+16>>2]=p;a[p+24>>2]=S;break}}}while(0);p=a[o+(i+20)>>2]|0;if((p|0)==0){break}if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[S+20>>2]=p;a[p+24>>2]=S;break}}}while(0);if(v>>>0<16){a[r>>2]=b|a[r>>2]&1|2;S=o+(b|4)|0;a[S>>2]=a[S>>2]|1;h=e;return h|0}else{a[r>>2]=a[r>>2]&1|t|2;a[o+(t+4)>>2]=v|3;r=o+(b|4)|0;a[r>>2]=a[r>>2]|1;vr(o+t|0,v);h=e;return h|0}return 0}function Jt(){return a[316]|0}function er(){return a[317]|0}function tr(){var e=0;e=a[318]|0;return((e|0)==0?-1:e)|0}function rr(e){e=e|0;var t=0,r=0;if((e|0)==-1){t=0}else{r=a[202]|0;t=e-1+r&-r}a[318]=t;return t|0}function nr(e){e=e|0;var t=0,r=0,n=0;do{if((e|0)==0){t=0}else{r=a[e-4>>2]|0;n=r&3;if((n|0)==1){t=0;break}t=(r&-8)-((n|0)==0?8:4)|0}}while(0);return t|0}function ir(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0;do{if((t|0)==8){n=Kt(r)|0}else{i=t>>>2;if((t&3|0)!=0|(i|0)==0){o=22;return o|0}if((i+1073741823&i|0)!=0){o=22;return o|0}if((-64-t|0)>>>0>>0){o=12;return o|0}else{n=Zt(t>>>0<16?16:t,r)|0;break}}}while(0);if((n|0)==0){o=12;return o|0}a[e>>2]=n;o=0;return o|0}function ar(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=d;d=d+8|0;i=n|0;a[i>>2]=t;t=cr(e,i,3,r)|0;d=n;return t|0}function or(e,t,r){e=e|0;t=t|0;r=r|0;return cr(e,t,0,r)|0}function sr(e){e=e|0;var t=0,r=0,n=0;if((a[200]|0)!=0){t=a[201]|0;r=Gt(t,e)|0;return r|0}n=we(8)|0;if((n-1&n|0)!=0){ke();return 0}a[202]=n;a[201]=n;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=a[201]|0;r=Gt(t,e)|0;return r|0}function fr(e){e=e|0;var t=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);t=a[201]|0;return Gt(t,e-1+t&-t)|0}function cr(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0;do{if((a[200]|0)==0){i=we(8)|0;if((i-1&i|0)==0){a[202]=i;a[201]=i;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);i=(e|0)==0;do{if((n|0)==0){if(i){o=Kt(0)|0;return o|0}else{s=e<<2;if(s>>>0<11){f=0;c=16;break}f=0;c=s+11&-8;break}}else{if(i){o=n}else{f=n;c=0;break}return o|0}}while(0);do{if((r&1|0)==0){if(i){u=0;d=0;break}else{l=0;h=0}while(1){n=a[t+(h<<2)>>2]|0;if(n>>>0<11){p=16}else{p=n+11&-8}n=p+l|0;s=h+1|0;if((s|0)==(e|0)){u=0;d=n;break}else{l=n;h=s}}}else{s=a[t>>2]|0;if(s>>>0<11){b=16}else{b=s+11&-8}u=b;d=oe(b,e)|0}}while(0);b=Kt(c-4+d|0)|0;if((b|0)==0){o=0;return o|0}h=b-8|0;l=a[b-4>>2]&-8;if((r&2|0)!=0){en(b|0,0,-4-c+l|0)}if((f|0)==0){a[b+(d-4)>>2]=l-d|3;v=b+d|0;m=d}else{v=f;m=l}a[v>>2]=b;b=e-1|0;e:do{if((b|0)==0){g=h;y=m}else{if((u|0)==0){w=h;_=m;x=0}else{e=h;l=m;f=0;while(1){d=l-u|0;a[e+4>>2]=u|3;c=e+u|0;r=f+1|0;a[v+(r<<2)>>2]=e+(u+8);if((r|0)==(b|0)){g=c;y=d;break e}else{e=c;l=d;f=r}}}while(1){f=a[t+(x<<2)>>2]|0;if(f>>>0<11){k=16}else{k=f+11&-8}f=_-k|0;a[w+4>>2]=k|3;l=w+k|0;e=x+1|0;a[v+(e<<2)>>2]=w+(k+8);if((e|0)==(b|0)){g=l;y=f;break}else{w=l;_=f;x=e}}}}while(0);a[g+4>>2]=y|3;o=v;return o|0}function ur(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0;r=e+(t<<2)|0;e:do{if((t|0)!=0){n=e;t:while(1){i=a[n>>2]|0;r:do{if((i|0)==0){o=n+4|0}else{s=i-8|0;f=s;c=i-4|0;u=a[c>>2]&-8;a[n>>2]=0;if(s>>>0<(a[212]|0)>>>0){d=935;break t}s=a[c>>2]|0;if((s&3|0)==1){d=936;break t}l=n+4|0;h=s-8&-8;do{if((l|0)!=(r|0)){if((a[l>>2]|0)!=(i+(h+8)|0)){break}p=(a[i+(h|4)>>2]&-8)+u|0;a[c>>2]=s&1|p|2;b=i+(p-4)|0;a[b>>2]=a[b>>2]|1;a[l>>2]=i;o=l;break r}}while(0);vr(f,u);o=l}}while(0);if((o|0)==(r|0)){break e}else{n=o}}if((d|0)==935){ke();return 0}else if((d|0)==936){ke();return 0}}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){return 0}Qt(0)|0;return 0}function dr(e){e=e|0;var t=0,r=0;if((a[200]|0)!=0){t=Qt(e)|0;return t|0}r=we(8)|0;if((r-1&r|0)!=0){ke();return 0}a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=Qt(e)|0;return t|0}function lr(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0;o=0;s=0;f=0;c=0}else{u=a[211]|0;d=u+40|0;l=1;h=d;p=d;d=1280;while(1){b=a[d>>2]|0;v=b+8|0;if((v&7|0)==0){m=0}else{m=-v&7}v=b+(a[d+4>>2]|0)|0;g=l;y=h;w=p;_=b+m|0;while(1){if(_>>>0>=v>>>0|(_|0)==(t|0)){x=g;k=y;S=w;break}A=a[_+4>>2]|0;if((A|0)==7){x=g;k=y;S=w;break}M=A&-8;E=M+w|0;if((A&3|0)==1){P=M+y|0;I=g+1|0}else{P=y;I=g}A=_+M|0;if(A>>>0>>0){x=I;k=P;S=E;break}else{g=I;y=P;w=E;_=A}}_=a[d+8>>2]|0;if((_|0)==0){break}else{l=x;h=k;p=S;d=_}}d=a[316]|0;r=u;n=S;i=x;o=d-S|0;s=a[317]|0;f=d-k|0;c=k}a[e>>2]=n;a[e+4>>2]=i;i=e+8|0;a[i>>2]=0;a[i+4>>2]=0;a[e+16>>2]=o;a[e+20>>2]=s;a[e+24>>2]=0;a[e+28>>2]=f;a[e+32>>2]=c;a[e+36>>2]=r;return}function hr(){var e=0,t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,g=0,y=0,w=0;e=d;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0}else{o=a[317]|0;s=a[316]|0;f=s-40-(a[211]|0)|0;c=1280;while(1){u=a[c>>2]|0;l=u+8|0;if((l&7|0)==0){h=0}else{h=-l&7}l=u+(a[c+4>>2]|0)|0;p=f;b=u+h|0;while(1){if(b>>>0>=l>>>0|(b|0)==(t|0)){v=p;break}g=a[b+4>>2]|0;if((g|0)==7){v=p;break}y=g&-8;w=p-((g&3|0)==1?y:0)|0;g=b+y|0;if(g>>>0>>0){v=w;break}else{p=w;b=g}}b=a[c+8>>2]|0;if((b|0)==0){r=v;n=s;i=o;break}else{f=v;c=b}}}Se(a[m>>2]|0,520,(E=d,d=d+8|0,a[E>>2]=i,E)|0)|0;Se(a[m>>2]|0,488,(E=d,d=d+8|0,a[E>>2]=n,E)|0)|0;Se(a[m>>2]|0,400,(E=d,d=d+8|0,a[E>>2]=r,E)|0)|0;d=e;return}function pr(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((a[200]|0)==0){r=we(8)|0;if((r-1&r|0)==0){a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if((e|0)==(-1|0)){a[204]=t;n=1;return n|0}else if((e|0)==(-2|0)){if((a[201]|0)>>>0>t>>>0){n=0;return n|0}if((t-1&t|0)!=0){n=0;return n|0}a[202]=t;n=1;return n|0}else if((e|0)==(-3|0)){a[203]=t;n=1;return n|0}else{n=0;return n|0}return 0}function br(){return(N=a[328]|0,a[328]=N+0,N)|0}function vr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0;r=e;n=r+t|0;i=n;o=a[e+4>>2]|0;e:do{if((o&1|0)==0){s=a[e>>2]|0;if((o&3|0)==0){return}f=r+(-s|0)|0;c=f;u=s+t|0;d=a[212]|0;if(f>>>0>>0){ke()}if((c|0)==(a[213]|0)){l=r+(t+4)|0;if((a[l>>2]&3|0)!=3){h=c;p=u;break}a[210]=u;a[l>>2]=a[l>>2]&-2;a[r+(4-s)>>2]=u|1;a[n>>2]=u;return}l=s>>>3;if(s>>>0<256){b=a[r+(8-s)>>2]|0;v=a[r+(12-s)>>2]|0;m=872+(l<<1<<2)|0;do{if((b|0)!=(m|0)){if(b>>>0>>0){ke()}if((a[b+12>>2]|0)==(c|0)){break}ke()}}while(0);if((v|0)==(b|0)){a[208]=a[208]&~(1<>>0>>0){ke()}y=v+8|0;if((a[y>>2]|0)==(c|0)){g=y;break}ke()}}while(0);a[b+12>>2]=v;a[g>>2]=b;h=c;p=u;break}m=f;l=a[r+(24-s)>>2]|0;y=a[r+(12-s)>>2]|0;do{if((y|0)==(m|0)){w=16-s|0;_=r+(w+4)|0;x=a[_>>2]|0;if((x|0)==0){k=r+w|0;w=a[k>>2]|0;if((w|0)==0){S=0;break}else{A=w;M=k}}else{A=x;M=_}while(1){_=A+20|0;x=a[_>>2]|0;if((x|0)!=0){A=x;M=_;continue}_=A+16|0;x=a[_>>2]|0;if((x|0)==0){break}else{A=x;M=_}}if(M>>>0>>0){ke()}else{a[M>>2]=0;S=A;break}}else{_=a[r+(8-s)>>2]|0;if(_>>>0>>0){ke()}x=_+12|0;if((a[x>>2]|0)!=(m|0)){ke()}k=y+8|0;if((a[k>>2]|0)==(m|0)){a[x>>2]=y;a[k>>2]=_;S=y;break}else{ke()}}}while(0);if((l|0)==0){h=c;p=u;break}y=r+(28-s)|0;d=1136+(a[y>>2]<<2)|0;do{if((m|0)==(a[d>>2]|0)){a[d>>2]=S;if((S|0)!=0){break}a[209]=a[209]&~(1<>2]);h=c;p=u;break e}else{if(l>>>0<(a[212]|0)>>>0){ke()}f=l+16|0;if((a[f>>2]|0)==(m|0)){a[f>>2]=S}else{a[l+20>>2]=S}if((S|0)==0){h=c;p=u;break e}}}while(0);if(S>>>0<(a[212]|0)>>>0){ke()}a[S+24>>2]=l;m=16-s|0;y=a[r+m>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[S+16>>2]=y;a[y+24>>2]=S;break}}}while(0);y=a[r+(m+4)>>2]|0;if((y|0)==0){h=c;p=u;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[S+20>>2]=y;a[y+24>>2]=S;h=c;p=u;break}}else{h=e;p=t}}while(0);e=a[212]|0;if(n>>>0>>0){ke()}S=r+(t+4)|0;A=a[S>>2]|0;do{if((A&2|0)==0){if((i|0)==(a[214]|0)){M=(a[211]|0)+p|0;a[211]=M;a[214]=h;a[h+4>>2]=M|1;if((h|0)!=(a[213]|0)){return}a[213]=0;a[210]=0;return}if((i|0)==(a[213]|0)){M=(a[210]|0)+p|0;a[210]=M;a[213]=h;a[h+4>>2]=M|1;a[h+M>>2]=M;return}M=(A&-8)+p|0;g=A>>>3;e:do{if(A>>>0<256){o=a[r+(t+8)>>2]|0;y=a[r+(t+12)>>2]|0;s=872+(g<<1<<2)|0;do{if((o|0)!=(s|0)){if(o>>>0>>0){ke()}if((a[o+12>>2]|0)==(i|0)){break}ke()}}while(0);if((y|0)==(o|0)){a[208]=a[208]&~(1<>>0>>0){ke()}l=y+8|0;if((a[l>>2]|0)==(i|0)){E=l;break}ke()}}while(0);a[o+12>>2]=y;a[E>>2]=o}else{s=n;l=a[r+(t+24)>>2]|0;d=a[r+(t+12)>>2]|0;do{if((d|0)==(s|0)){f=r+(t+20)|0;b=a[f>>2]|0;if((b|0)==0){v=r+(t+16)|0;_=a[v>>2]|0;if((_|0)==0){P=0;break}else{I=_;C=v}}else{I=b;C=f}while(1){f=I+20|0;b=a[f>>2]|0;if((b|0)!=0){I=b;C=f;continue}f=I+16|0;b=a[f>>2]|0;if((b|0)==0){break}else{I=b;C=f}}if(C>>>0>>0){ke()}else{a[C>>2]=0;P=I;break}}else{f=a[r+(t+8)>>2]|0;if(f>>>0>>0){ke()}b=f+12|0;if((a[b>>2]|0)!=(s|0)){ke()}v=d+8|0;if((a[v>>2]|0)==(s|0)){a[b>>2]=d;a[v>>2]=f;P=d;break}else{ke()}}}while(0);if((l|0)==0){break}d=r+(t+28)|0;o=1136+(a[d>>2]<<2)|0;do{if((s|0)==(a[o>>2]|0)){a[o>>2]=P;if((P|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(l>>>0<(a[212]|0)>>>0){ke()}y=l+16|0;if((a[y>>2]|0)==(s|0)){a[y>>2]=P}else{a[l+20>>2]=P}if((P|0)==0){break e}}}while(0);if(P>>>0<(a[212]|0)>>>0){ke()}a[P+24>>2]=l;s=a[r+(t+16)>>2]|0;do{if((s|0)!=0){if(s>>>0<(a[212]|0)>>>0){ke()}else{a[P+16>>2]=s;a[s+24>>2]=P;break}}}while(0);s=a[r+(t+20)>>2]|0;if((s|0)==0){break}if(s>>>0<(a[212]|0)>>>0){ke()}else{a[P+20>>2]=s;a[s+24>>2]=P;break}}}while(0);a[h+4>>2]=M|1;a[h+M>>2]=M;if((h|0)!=(a[213]|0)){O=M;break}a[210]=M;return}else{a[S>>2]=A&-2;a[h+4>>2]=p|1;a[h+p>>2]=p;O=p}}while(0);p=O>>>3;if(O>>>0<256){A=p<<1;S=872+(A<<2)|0;P=a[208]|0;t=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){T=r;R=p;break}ke()}}while(0);a[R>>2]=h;a[T+12>>2]=h;a[h+8>>2]=T;a[h+12>>2]=S;return}S=h;T=O>>>8;do{if((T|0)==0){N=0}else{if(O>>>0>16777215){N=31;break}R=(T+1048320|0)>>>16&8;A=T<>>16&4;P=A<>>16&2;p=14-(t|R|A)+(P<>>15)|0;N=O>>>((p+7|0)>>>0)&1|p<<1}}while(0);T=1136+(N<<2)|0;a[h+28>>2]=N;a[h+20>>2]=0;a[h+16>>2]=0;p=a[209]|0;A=1<>2]=S;a[h+24>>2]=T;a[h+12>>2]=h;a[h+8>>2]=h;return}if((N|0)==31){F=0}else{F=25-(N>>>1)|0}N=O<>2]|0;while(1){if((a[F+4>>2]&-8|0)==(O|0)){break}j=F+16+(N>>>31<<2)|0;T=a[j>>2]|0;if((T|0)==0){B=1120;break}else{N=N<<1;F=T}}if((B|0)==1120){if(j>>>0<(a[212]|0)>>>0){ke()}a[j>>2]=S;a[h+24>>2]=F;a[h+12>>2]=h;a[h+8>>2]=h;return}j=F+8|0;B=a[j>>2]|0;N=a[212]|0;if(F>>>0>>0){ke()}if(B>>>0>>0){ke()}a[B+12>>2]=S;a[j>>2]=S;a[h+8>>2]=B;a[h+12>>2]=F;a[h+24>>2]=0;return}function mr(e){e=e|0;var t=0,r=0,n=0;t=(e|0)==0?1:e;while(1){r=Kt(t)|0;if((r|0)!=0){n=1164;break}e=(N=a[328]|0,a[328]=N+0,N);if((e|0)==0){break}Rn[e&1]()}if((n|0)==1164){return r|0}r=ze(4)|0;a[r>>2]=560;_e(r|0,688,6);return 0}function gr(e,t){e=e|0;t=t|0;return mr(e)|0}function yr(e){e=e|0;return}function wr(e){e=e|0;return 360|0}function _r(e){e=e|0;return 448|0}function xr(e){e=e|0;return(N=a[328]|0,a[328]=e,N)|0}function kr(e){e=e|0;a[e>>2]=560;return}function Sr(e){e=e|0;a[e>>2]=592;return}function Ar(e){e=e|0;if((e|0)!=0){Vt(e)}return}function Mr(e,t){e=e|0;t=t|0;Ar(e);return}function Er(e){e=e|0;Ar(e);return}function Pr(e,t){e=e|0;t=t|0;Er(e);return}function Ir(e){e=e|0;Ar(e);return}function Cr(e){e=e|0;Ar(e);return}function Or(e,t,r){e=e|0;t=t|0;r=r|0;return Tr(e,t,r,0,0,0)|0}function Tr(e,t,r,i,o,s){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;s=s|0;var f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0,q=0,D=0,U=0,K=0,V=0,Y=0,W=0,X=0,G=0,Z=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0;f=d;if((r|0)==0){c=-1;d=f;return c|0}u=a[44]|0;if((u|0)==0){a[196]=1;a[44]=1;l=1;h=1;p=1190}else{b=a[196]|0;v=a[74]|0;if((v|0)==-1|(b|0)!=0){l=b;h=u;p=1190}else{m=v;g=b;y=u}}if((p|0)==1190){u=(Ke(344)|0)!=0|0;a[74]=u;m=u;g=l;y=h}h=n[r]|0;if(h<<24>>24==45){w=s|2;p=1194}else{l=(m|0)!=0|h<<24>>24==43?s&-2:s;if(h<<24>>24==43){w=l;p=1194}else{_=r;x=l}}if((p|0)==1194){_=r+1|0;x=w}a[198]=0;if((g|0)==0){k=y;p=1198}else{a[50]=-1;a[48]=-1;S=y;A=g;p=1197}while(1){if((p|0)==1197){p=0;if((A|0)==0){k=S;p=1198;continue}else{M=S}}else if((p|0)==1198){p=0;g=a[40]|0;if((n[g]|0)==0){M=k}else{P=g;I=k;break}}a[196]=0;if((M|0)>=(e|0)){p=1200;break}C=t+(M<<2)|0;O=a[C>>2]|0;a[40]=O;if((n[O]|0)==45){T=O+1|0;R=n[T]|0;if(R<<24>>24!=0){p=1232;break}if((Ce(_|0,45)|0)!=0){p=1232;break}}a[40]=824;if((x&2|0)!=0){p=1217;break}if((x&1|0)==0){c=-1;p=1298;break}g=a[48]|0;do{if((g|0)==-1){a[48]=M;N=M;F=0}else{y=a[50]|0;if((y|0)==-1){N=M;F=0;break}w=y-g|0;r=M-y|0;l=(w|0)%(r|0)|0;if((l|0)==0){j=r}else{h=r;s=l;while(1){l=(h|0)%(s|0)|0;if((l|0)==0){j=s;break}else{h=s;s=l}}}s=(M-g|0)/(j|0)|0;do{if((j|0)>0){h=-w|0;if((s|0)>0){B=0}else{z=M;H=y;L=g;q=0;break}do{l=B+y|0;m=t+(l<<2)|0;u=0;b=l;l=a[m>>2]|0;while(1){v=((b|0)<(y|0)?r:h)+b|0;D=t+(v<<2)|0;U=a[D>>2]|0;a[D>>2]=l;a[m>>2]=U;D=u+1|0;if((D|0)<(s|0)){u=D;b=v;l=U}else{break}}B=B+1|0}while((B|0)<(j|0));z=a[44]|0;H=a[50]|0;L=a[48]|0;q=a[196]|0}else{z=M;H=y;L=g;q=0}}while(0);a[48]=z-H+L;a[50]=-1;N=z;F=q}}while(0);g=N+1|0;a[44]=g;S=g;A=F;p=1197}do{if((p|0)==1298){d=f;return c|0}else if((p|0)==1232){F=a[48]|0;A=a[50]|0;if((F|0)!=-1&(A|0)==-1){a[50]=M;K=n[T]|0;V=M}else{K=R;V=A}if(K<<24>>24==0){P=O;I=M;break}a[40]=T;if((n[T]|0)!=45){P=T;I=M;break}if((n[O+2|0]|0)!=0){P=T;I=M;break}A=M+1|0;a[44]=A;a[40]=824;if((V|0)!=-1){S=V-F|0;N=A-V|0;q=(S|0)%(N|0)|0;if((q|0)==0){Y=N}else{z=N;L=q;while(1){q=(z|0)%(L|0)|0;if((q|0)==0){Y=L;break}else{z=L;L=q}}}L=(A-F|0)/(Y|0)|0;do{if((Y|0)>0){z=-S|0;if((L|0)>0){W=0}else{X=V;G=F;Z=A;break}do{q=W+V|0;H=t+(q<<2)|0;j=0;B=q;q=a[H>>2]|0;while(1){k=((B|0)<(V|0)?N:z)+B|0;g=t+(k<<2)|0;y=a[g>>2]|0;a[g>>2]=q;a[H>>2]=y;g=j+1|0;if((g|0)<(L|0)){j=g;B=k;q=y}else{break}}W=W+1|0}while((W|0)<(Y|0));X=a[50]|0;G=a[48]|0;Z=a[44]|0}else{X=V;G=F;Z=A}}while(0);a[44]=G-X+Z}a[50]=-1;a[48]=-1;c=-1;d=f;return c|0}else if((p|0)==1200){a[40]=824;A=a[50]|0;F=a[48]|0;do{if((A|0)==-1){if((F|0)==-1){break}a[44]=F}else{L=A-F|0;N=M-A|0;S=(L|0)%(N|0)|0;if((S|0)==0){Q=N}else{z=N;q=S;while(1){S=(z|0)%(q|0)|0;if((S|0)==0){Q=q;break}else{z=q;q=S}}}q=(M-F|0)/(Q|0)|0;do{if((Q|0)>0){z=-L|0;if((q|0)>0){$=0}else{J=A;ee=F;te=M;break}do{S=$+A|0;B=t+(S<<2)|0;j=0;H=S;S=a[B>>2]|0;while(1){y=((H|0)<(A|0)?N:z)+H|0;k=t+(y<<2)|0;g=a[k>>2]|0;a[k>>2]=S;a[B>>2]=g;k=j+1|0;if((k|0)<(q|0)){j=k;H=y;S=g}else{break}}$=$+1|0}while(($|0)<(Q|0));J=a[50]|0;ee=a[48]|0;te=a[44]|0}else{J=A;ee=F;te=M}}while(0);a[44]=ee-J+te}}while(0);a[50]=-1;a[48]=-1;c=-1;d=f;return c|0}else if((p|0)==1217){a[44]=M+1;a[198]=a[C>>2];c=1;d=f;return c|0}}while(0);C=(i|0)!=0;e:do{if(C){if((P|0)==(a[t+(I<<2)>>2]|0)){re=P;break}M=n[P]|0;do{if(M<<24>>24==45){a[40]=P+1;ne=0}else{if((x&4|0)==0){re=P;break e}if(M<<24>>24==58){ne=0;break}ne=(Ce(_|0,M<<24>>24|0)|0)!=0|0}}while(0);M=zr(t,_,i,o,ne)|0;if((M|0)==-1){re=a[40]|0;break}a[40]=824;c=M;d=f;return c|0}else{re=P}}while(0);P=re+1|0;a[40]=P;ne=n[re]|0;re=ne<<24>>24;if((ne<<24>>24|0)==45){if((n[P]|0)==0){p=1260}}else if((ne<<24>>24|0)==58){p=1263}else{p=1260}do{if((p|0)==1260){x=Ce(_|0,re|0)|0;if((x|0)==0){if(ne<<24>>24!=45){p=1263;break}if((n[P]|0)==0){c=-1}else{break}d=f;return c|0}I=n[x+1|0]|0;if(C&ne<<24>>24==87&I<<24>>24==59){do{if((n[P]|0)==0){M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[40]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Lr(48,(E=d,d=d+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;c=(n[_]|0)==58?58:63;d=f;return c|0}}while(0);M=zr(t,_,i,o,0)|0;a[40]=824;c=M;d=f;return c|0}if(I<<24>>24!=58){if((n[P]|0)!=0){c=re;d=f;return c|0}a[44]=(a[44]|0)+1;c=re;d=f;return c|0}a[198]=0;do{if((n[P]|0)==0){if((n[x+2|0]|0)==58){break}M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[198]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Lr(48,(E=d,d=d+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;c=(n[_]|0)==58?58:63;d=f;return c|0}else{a[198]=P}}while(0);a[40]=824;a[44]=(a[44]|0)+1;c=re;d=f;return c|0}}while(0);do{if((p|0)==1263){if((n[P]|0)!=0){break}a[44]=(a[44]|0)+1}}while(0);do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Lr(272,(E=d,d=d+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;c=63;d=f;return c|0}function Rr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Tr(e,t,r,n,i,1)|0}function Nr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Tr(e,t,r,n,i,5)|0}function Fr(e){e=e|0;return mr(e)|0}function jr(e,t){e=e|0;t=t|0;return Fr(e)|0}function Br(){var e=0;e=ze(4)|0;a[e>>2]=560;_e(e|0,688,6)}function zr(e,t,r,i,o){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;var s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0;s=d;f=a[40]|0;c=a[44]|0;u=c+1|0;a[44]=u;l=Ce(f|0,61)|0;if((l|0)==0){h=tn(f|0)|0;p=0}else{h=l-f|0;p=l+1|0}l=a[r>>2]|0;e:do{if((l|0)!=0){t:do{if((o|0)!=0&(h|0)==1){b=0;v=l;while(1){if((n[f]|0)==(n[v]|0)){if((tn(v|0)|0)==1){m=b;break t}}b=b+1|0;v=a[r+(b<<4)>>2]|0;if((v|0)==0){break e}}}else{v=0;b=-1;g=l;while(1){if((ge(f|0,g|0,h|0)|0)==0){if((tn(g|0)|0)==(h|0)){m=v;break t}if((b|0)==-1){y=v}else{break}}else{y=b}w=v+1|0;_=a[r+(w<<4)>>2]|0;if((_|0)==0){m=y;break t}else{v=w;b=y;g=_}}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(304,(E=d,d=d+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);a[42]=0;x=63;d=s;return x|0}}while(0);if((m|0)==-1){break}g=r+(m<<4)+4|0;b=a[g>>2]|0;v=(p|0)==0;if(!((b|0)!=0|v)){do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(208,(E=d,d=d+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){k=a[r+(m<<4)+12>>2]|0}else{k=0}a[42]=k;x=(n[t]|0)==58?58:63;d=s;return x|0}do{if((b-1|0)>>>0<2){if(!v){a[198]=p;break}if((b|0)!=1){break}a[44]=c+2;a[198]=a[e+(u<<2)>>2]}}while(0);if(!((a[g>>2]|0)==1&(a[198]|0)==0)){if((i|0)!=0){a[i>>2]=m}b=a[r+(m<<4)+8>>2]|0;v=a[r+(m<<4)+12>>2]|0;if((b|0)==0){x=v;d=s;return x|0}a[b>>2]=v;x=0;d=s;return x|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(8,(E=d,d=d+8|0,a[E>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){S=a[r+(m<<4)+12>>2]|0}else{S=0}a[42]=S;a[44]=(a[44]|0)-1;x=(n[t]|0)==58?58:63;d=s;return x|0}}while(0);if((o|0)!=0){a[44]=c;x=-1;d=s;return x|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(248,(E=d,d=d+8|0,a[E>>2]=f,E)|0)}}while(0);a[42]=0;x=63;d=s;return x|0}function Hr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;d=d+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;qr(e,n|0);d=r;return}function Lr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;d=d+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Dr(e,n|0);d=r;return}function qr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;Se(a[m>>2]|0,432,(E=d,d=d+8|0,a[E>>2]=i,E)|0)|0;if((e|0)!=0){i=a[m>>2]|0;Ve(i|0,e|0,t|0)|0;t=a[m>>2]|0;Re(472,2,1,t|0)|0}t=a[m>>2]|0;e=xe(n|0)|0;Se(t|0,384,(E=d,d=d+8|0,a[E>>2]=e,E)|0)|0;d=r;return}function Dr(e,t){e=e|0;t=t|0;var r=0,n=0;r=d;n=a[w>>2]|0;Se(a[m>>2]|0,376,(E=d,d=d+8|0,a[E>>2]=n,E)|0)|0;if((e|0)!=0){n=a[m>>2]|0;Ve(n|0,e|0,t|0)|0}Oe(10,a[m>>2]|0)|0;d=r;return}function Ur(e,t){e=e|0;t=t|0;var r=0,i=0,o=0,s=0,f=0,c=0,d=0,l=0,h=0,p=0,b=0,v=0.0,m=0,g=0,y=0,w=0,_=0.0,x=0,k=0,S=0,A=0.0,M=0.0,E=0,P=0,I=0,C=0.0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0.0,L=0,q=0,D=0.0,U=0.0,K=0.0;r=e;while(1){i=r+1|0;if((He(n[r]|0)|0)==0){break}else{r=i}}o=n[r]|0;if((o<<24>>24|0)==45){s=i;f=1}else if((o<<24>>24|0)==43){s=i;f=0}else{s=r;f=0}r=-1;i=0;o=s;while(1){c=n[o]|0;if(((c<<24>>24)-48|0)>>>0<10){d=r}else{if(c<<24>>24!=46|(r|0)>-1){break}else{d=i}}r=d;i=i+1|0;o=o+1|0}d=o+(-i|0)|0;s=(r|0)<0;l=((s^1)<<31>>31)+i|0;h=(l|0)>18;p=(h?-18:-l|0)+(s?i:r)|0;r=h?18:l;do{if((r|0)==0){b=e;v=0.0}else{if((r|0)>9){l=d;h=r;i=0;while(1){s=n[l]|0;m=l+1|0;if(s<<24>>24==46){g=n[m]|0;y=l+2|0}else{g=s;y=m}w=(i*10|0)-48+(g<<24>>24)|0;m=h-1|0;if((m|0)>9){l=y;h=m;i=w}else{break}}_=+(w|0)*1.0e9;x=9;k=y;S=1393}else{if((r|0)>0){_=0.0;x=r;k=d;S=1393}else{A=0.0;M=0.0}}if((S|0)==1393){i=k;h=x;l=0;while(1){m=n[i]|0;s=i+1|0;if(m<<24>>24==46){E=n[s]|0;P=i+2|0}else{E=m;P=s}I=(l*10|0)-48+(E<<24>>24)|0;s=h-1|0;if((s|0)>0){i=P;h=s;l=I}else{break}}A=+(I|0);M=_}C=M+A;do{if((c<<24>>24|0)==69|(c<<24>>24|0)==101){l=o+1|0;h=n[l]|0;if((h<<24>>24|0)==43){O=o+2|0;T=0}else if((h<<24>>24|0)==45){O=o+2|0;T=1}else{O=l;T=0}l=n[O]|0;if(((l<<24>>24)-48|0)>>>0<10){R=O;N=0;F=l}else{j=0;B=O;z=T;break}while(1){l=(N*10|0)-48+(F<<24>>24)|0;h=R+1|0;i=n[h]|0;if(((i<<24>>24)-48|0)>>>0<10){R=h;N=l;F=i}else{j=l;B=h;z=T;break}}}else{j=0;B=o;z=0}}while(0);h=p+((z|0)==0?j:-j|0)|0;l=(h|0)<0?-h|0:h;if((l|0)>511){a[($e()|0)>>2]=34;H=1.0;L=88;q=511;S=1410}else{if((l|0)==0){D=1.0}else{H=1.0;L=88;q=l;S=1410}}if((S|0)==1410){while(1){S=0;if((q&1|0)==0){U=H}else{U=H*+u[L>>3]}l=q>>1;if((l|0)==0){D=U;break}else{H=U;L=L+8|0;q=l;S=1410}}}if((h|0)>-1){b=B;v=C*D;break}else{b=B;v=C/D;break}}}while(0);if((t|0)!=0){a[t>>2]=b}if((f|0)==0){K=v;return+K}K=-0.0-v;return+K}function Kr(e,t){e=e|0;t=t|0;return+ +Ur(e,t)}function Vr(e,t){e=e|0;t=t|0;return+ +Ur(e,t)}function Yr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +Ur(e,t)}function Wr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +Ur(e,t)}function Xr(e){e=e|0;return+ +Ur(e,0)}function Gr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=d;d=d+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Qr(e,t,i|0)}function Zr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=d;d=d+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;$r(e,t,i|0)}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;Se(a[m>>2]|0,336,(E=d,d=d+8|0,a[E>>2]=i,E)|0)|0;if((t|0)!=0){i=a[m>>2]|0;Ve(i|0,t|0,r|0)|0;r=a[m>>2]|0;Re(480,2,1,r|0)|0}r=a[m>>2]|0;t=xe(n|0)|0;Se(r|0,392,(E=d,d=d+8|0,a[E>>2]=t,E)|0)|0;je(e|0)}function $r(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;n=a[w>>2]|0;Se(a[m>>2]|0,440,(E=d,d=d+8|0,a[E>>2]=n,E)|0)|0;if((t|0)!=0){n=a[m>>2]|0;Ve(n|0,t|0,r|0)|0}Oe(10,a[m>>2]|0)|0;je(e|0)}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;i=e|0;if((e&3)==(t&3)){while(e&3){if((r|0)==0)return i|0;n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){a[e>>2]=a[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function en(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,o=0,s=0;i=e+r|0;if((r|0)>=20){t=t&255;r=e&3;o=t|t<<8|t<<16|t<<24;s=i&~3;if(r){r=e+4-r|0;while((e|0)<(r|0)){n[e]=t;e=e+1|0}}while((e|0)<(s|0)){a[e>>2]=o;e=e+4|0}}while((e|0)<(i|0)){n[e]=t;e=e+1|0}}function tn(e){e=e|0;var t=0;t=e;while(n[t]|0){t=t+1|0}return t-e|0}function rn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=e+r>>>0;return(j=t+n+(i>>>0>>0|0)>>>0,i|0)|0}function nn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=t-n>>>0;i=t-n-(r>>>0>e>>>0|0)>>>0;return(j=i,e-r>>>0|0)|0}function an(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){j=t<>>32-r;return e<>>r;return e>>>r|(t&(1<>>r-32|0}function sn(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){j=t>>r;return e>>>r|(t&(1<>r-32|0}function fn(e){e=e|0;var t=0;t=n[v+(e>>>24)|0]|0;if((t|0)<8)return t|0;t=n[v+(e>>16&255)|0]|0;if((t|0)<8)return t+8|0;t=n[v+(e>>8&255)|0]|0;if((t|0)<8)return t+16|0;return(n[v+(e&255)|0]|0)+24|0}function cn(e){e=e|0;var t=0;t=n[b+(e&255)|0]|0;if((t|0)<8)return t|0;t=n[b+(e>>8&255)|0]|0;if((t|0)<8)return t+8|0;t=n[b+(e>>16&255)|0]|0;if((t|0)<8)return t+16|0;return(n[b+(e>>>24)|0]|0)+24|0}function un(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,a=0;r=e&65535;n=t&65535;i=oe(n,r)|0;a=e>>>16;e=(i>>>16)+(oe(n,a)|0)|0;n=t>>>16;t=oe(n,r)|0;return(j=(e>>>16)+(oe(n,a)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|i&65535|0)|0}function dn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,s=0,f=0;i=t>>31|((t|0)<0?-1:0)<<1;a=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=n>>31|((n|0)<0?-1:0)<<1;s=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;f=nn(i^e,a^t,i,a)|0;t=j;e=o^i;i=s^a;a=nn((vn(f,t,nn(o^r,s^n,o,s)|0,j,0)|0)^e,j^i,e,i)|0;return(j=j,a)|0}function ln(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,c=0,u=0,l=0;i=d;d=d+8|0;o=i|0;s=t>>31|((t|0)<0?-1:0)<<1;f=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;c=n>>31|((n|0)<0?-1:0)<<1;u=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;l=nn(s^e,f^t,s,f)|0;t=j;e=nn(c^r,u^n,c,u)|0;vn(l,t,e,j,o)|0;e=nn(a[o>>2]^s,a[o+4>>2]^f,s,f)|0;f=j;d=i;return(j=f,e)|0}function hn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0;i=e;e=r;r=un(i,e)|0;a=j;return(j=(oe(t,e)|0)+(oe(n,i)|0)+a|a&0,r|0|0)|0}function pn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=vn(e,t,r,n,0)|0;return(j=j,i)|0}function bn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0;i=d;d=d+8|0;o=i|0;vn(e,t,r,n,o)|0;d=i;return(j=a[o+4>>2]|0,a[o>>2]|0)|0}function vn(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,B=0,z=0;o=e;s=t;f=s;c=r;u=n;d=u;if((f|0)==0){l=(i|0)!=0;if((d|0)==0){if(l){a[i>>2]=(o>>>0)%(c>>>0);a[i+4>>2]=0}h=0;p=(o>>>0)/(c>>>0)>>>0;return(j=h,p)|0}else{if(!l){h=0;p=0;return(j=h,p)|0}a[i>>2]=e|0;a[i+4>>2]=t&0;h=0;p=0;return(j=h,p)|0}}l=(d|0)==0;do{if((c|0)==0){if(l){if((i|0)!=0){a[i>>2]=(f>>>0)%(c>>>0);a[i+4>>2]=0}h=0;p=(f>>>0)/(c>>>0)>>>0;return(j=h,p)|0}if((o|0)==0){if((i|0)!=0){a[i>>2]=0;a[i+4>>2]=(f>>>0)%(d>>>0)}h=0;p=(f>>>0)/(d>>>0)>>>0;return(j=h,p)|0}b=d-1|0;if((b&d|0)==0){if((i|0)!=0){a[i>>2]=e|0;a[i+4>>2]=b&f|t&0}h=0;p=f>>>((cn(d|0)|0)>>>0);return(j=h,p)|0}b=(fn(d|0)|0)-(fn(f|0)|0)|0;if(b>>>0<=30){v=b+1|0;m=31-b|0;g=v;y=f<>>(v>>>0);w=f>>>(v>>>0);_=0;x=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(j=h,p)|0}else{if(!l){m=(fn(d|0)|0)-(fn(f|0)|0)|0;if(m>>>0<=31){v=m+1|0;b=31-m|0;k=m-31>>31;g=v;y=o>>>(v>>>0)&k|f<>>(v>>>0)&k;_=0;x=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(j=h,p)|0}b=c-1|0;if((b&c|0)!=0){k=(fn(c|0)|0)+33-(fn(f|0)|0)|0;v=64-k|0;m=32-k|0;S=m>>31;A=k-32|0;M=A>>31;g=k;y=m-1>>31&f>>>(A>>>0)|(f<>>(k>>>0))&M;w=M&f>>>(k>>>0);_=o<>>(A>>>0))&S|o<>31;break}if((i|0)!=0){a[i>>2]=b&o;a[i+4>>2]=0}if((c|0)==1){h=s|t&0;p=e|0|0;return(j=h,p)|0}else{b=cn(c|0)|0;h=f>>>(b>>>0)|0;p=f<<32-b|o>>>(b>>>0)|0;return(j=h,p)|0}}}while(0);if((g|0)==0){E=x;P=_;I=w;C=y;O=0;T=0}else{o=r|0|0;r=u|n&0;n=rn(o,r,-1,-1)|0;u=j;f=x;x=_;_=w;w=y;y=g;g=0;while(1){R=x>>>31|f<<1;N=g|x<<1;c=w<<1|f>>>31|0;e=w>>>31|_<<1|0;nn(n,u,c,e)|0;t=j;s=t>>31|((t|0)<0?-1:0)<<1;F=s&1;B=nn(c,e,s&o,(((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1)&r)|0;z=j;t=y-1|0;if((t|0)==0){break}else{f=R;x=N;_=z;w=B;y=t;g=F}}E=R;P=N;I=z;C=B;O=0;T=F}F=P;P=0;if((i|0)!=0){a[i>>2]=C;a[i+4>>2]=I}h=(F|0)>>>31|(E|P)<<1|(P<<1|F>>>31)&0|O;p=(F<<1|0>>>31)&-2|T;return(j=h,p)|0}function mn(e,t){e=e|0;t=t|0;In[e&15](t|0)}function gn(e,t,r){e=e|0;t=t|0;r=r|0;Cn[e&15](t|0,r|0)}function yn(e,t){e=e|0;t=t|0;return On[e&7](t|0)|0}function wn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;Tn[e&15](t|0,r|0,n|0)}function _n(e){e=e|0;Rn[e&1]()}function xn(e,t,r){e=e|0;t=t|0;r=r|0;return Nn[e&1](t|0,r|0)|0}function kn(e){e=e|0;se(0)}function Sn(e,t){e=e|0;t=t|0;se(1)}function An(e){e=e|0;se(2);return 0}function Mn(e,t,r){e=e|0;t=t|0;r=r|0;se(3)}function En(){se(4)}function Pn(e,t){e=e|0;t=t|0;se(5);return 0}var In=[kn,kn,Sr,kn,Cr,kn,yr,kn,kr,kn,Ir,kn,kn,kn,kn,kn];var Cn=[Sn,Sn,Hr,Sn,qr,Sn,Lr,Sn,Dr,Sn,Sn,Sn,Sn,Sn,Sn,Sn];var On=[An,An,wr,An,_r,An,An,An];var Tn=[Mn,Mn,$r,Mn,Qr,Mn,Gr,Mn,Zr,Mn,Mn,Mn,Mn,Mn,Mn,Mn];var Rn=[En,En];var Nn=[Pn,Pn];return{_crypto_scrypt:Et,_strlen:tn,_free:Vt,_realloc:Wt,_memset:en,_malloc:Kt,_memcpy:Jr,_calloc:Yt,runPostSets:wt,stackAlloc:it,stackSave:at,stackRestore:ot,setThrew:st,setTempRet0:ut,setTempRet1:dt,setTempRet2:lt,setTempRet3:ht,setTempRet4:pt,setTempRet5:bt,setTempRet6:vt,setTempRet7:mt,setTempRet8:gt,setTempRet9:yt,dynCall_vi:mn,dynCall_vii:gn,dynCall_ii:yn,dynCall_viii:wn,dynCall_v:_n,dynCall_iii:xn}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:wa,assert:w,asmPrintInt:function(e,t){s.print("int "+e+","+t)},asmPrintFloat:function(e,t){s.print("float "+e+","+t)},min:Xc,invoke_vi:function(e,t){try{s.dynCall_vi(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_vii:function(e,t,r){try{s.dynCall_vii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_ii:function(e,t){try{return s.dynCall_ii(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_viii:function(e,t,r,n){try{s.dynCall_viii(e,t,r,n)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_v:function(e){try{s.dynCall_v(e)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_iii:function(e,t,r){try{return s.dynCall_iii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},_strncmp:function(e,t,r){for(var n=0;na?1:-1;n++}return 0},_llvm_va_end:aa(),_sysconf:function(e){switch(e){case 8:return 4096;case 54:case 56:case 21:case 61:case 63:case 22:case 67:case 23:case 24:case 25:case 26:case 27:case 69:case 28:case 101:case 70:case 71:case 29:case 30:case 199:case 75:case 76:case 32:case 43:case 44:case 80:case 46:case 47:case 45:case 48:case 49:case 42:case 82:case 33:case 7:case 108:case 109:case 107:case 112:case 119:case 121:return 200809;case 13:case 104:case 94:case 95:case 34:case 35:case 77:case 81:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:case 94:case 95:case 110:case 111:case 113:case 114:case 115:case 116:case 117:case 118:case 120:case 40:case 16:case 79:case 19:return-1;case 92:case 93:case 5:case 72:case 6:case 74:case 92:case 93:case 96:case 97:case 98:case 99:case 102:case 103:case 105:return 1;case 38:case 66:case 50:case 51:case 4:return 1024;case 15:case 64:case 41:return 32;case 55:case 37:case 17:return 2147483647;case 18:case 1:return 47839;case 59:case 57:return 99;case 68:case 58:return 2048;case 0:return 2097152;case 3:return 65536;case 14:return 32768;case 73:return 32767;case 39:return 16384;case 60:return 1e3;case 106:return 700;case 52:return 256;case 62:return 255;case 2:return 100;case 65:return 64;case 36:return 20;case 100:return 16;case 20:return 6;case 53:return 4;case 10:return 1}return M(N.A),-1},___cxa_throw:rc,_strerror:zc,_abort:function(){s.abort()},_fprintf:mc,_llvm_eh_exception:U,___cxa_free_exception:sc,_fflush:aa(),___buildEnvironment:wc,__reallyNegative:jc,_strchr:function(e,t){e--;do{var r=A[++e];if(r==t)return e}while(r);return 0},_fputc:Bc,___setErrNo:M,_fwrite:hc,_send:fc,_write:gc,_exit:function(e){Ac(e)},___cxa_find_matching_catch:function(e,t){-1==e&&(e=B[U.m>>2]),-1==t&&(t=B[U.m+4>>2]);var r=Array.prototype.slice.call(arguments,2);0!=t&&!pc(t)&&0==B[B[t>>2]-8>>2]&&(e=B[e>>2]);for(var n=0;n=e},__formatString:kc,___resumeException:function(e){0==B[U.m>>2]&&(B[U.m>>2]=e),g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")},_llvm_uadd_with_overflow_i32:function(e,t){return e>>>=0,t>>>=0,0|(V.setTempRet0(4294967295>>0)},___cxa_does_inherit:qc,_getenv:xc,_vfprintf:function(e,t,r){return mc(e,t,B[r>>2])},___cxa_begin_catch:function(e){return oc.ta--,e},__ZSt18uncaught_exceptionv:oc,_pwrite:function(e,t,r,n){if(!(e=R[e]))return M(N.$),-1;try{return Ib(e,A,t,r,n)}catch(e){return Zb(e),-1}},___cxa_call_unexpected:function(e){s.P("Unexpected exception thrown, this is not properly supported - aborting"),za=l,g(e)},_sbrk:nc,_strerror_r:yc,___errno_location:function(){return rb},___gxx_personality_v0:aa(),___cxa_is_number_type:pc,_time:function(e){var t=Math.floor(Date.now()/1e3);return e&&(B[e>>2]=t),t},__exit:Ac,___cxa_end_catch:uc,STACKTOP:u,STACK_MAX:Ta,tempDoublePtr:qb,ABORT:za,cttz_i8:Wc,ctlz_i8:Vc,NaN:NaN,Infinity:1/0,_stderr:nb,__ZTVN10__cxxabiv120__si_class_type_infoE:ob,__ZTVN10__cxxabiv117__class_type_infoE:pb,___progname:k},I);s._crypto_scrypt=V._crypto_scrypt;var ic=s._strlen=V._strlen,tc=s._free=V._free;s._realloc=V._realloc;var tb=s._memset=V._memset,Oa=s._malloc=V._malloc,sb=s._memcpy=V._memcpy;s._calloc=V._calloc;var mb=s.runPostSets=V.runPostSets;s.dynCall_vi=V.dynCall_vi,s.dynCall_vii=V.dynCall_vii,s.dynCall_ii=V.dynCall_ii,s.dynCall_viii=V.dynCall_viii,s.dynCall_v=V.dynCall_v,s.dynCall_iii=V.dynCall_iii;var qa=function(e){return V.stackAlloc(e)},ja=function(){return V.stackSave()},ka=function(e){V.stackRestore(e)},lc;function X(e,t){e!=m&&("number"==typeof e?this.p(e):t==m&&"string"!=typeof e?this.k(e,256):this.k(e,t))}function Yc(){return new X(m)}function Zc(e,t){var r=$c[e.charCodeAt(t)];return r==m?-1:r}function ad(e){var t=Yc();return t.D(e),t}function Y(e,t){this.h=0|e,this.j=0|t}Y.Ca={},Y.D=function(e){if(-128<=e&&128>e){var t=Y.Ca[e];if(t)return t}return t=new Y(0|e,0>e?-1:0),-128<=e&&128>e&&(Y.Ca[e]=t),t},Y.p=function(e){return isNaN(e)||!isFinite(e)?Y.ZERO:e<=-Y.Ea?Y.MIN_VALUE:e+1>=Y.Ea?Y.MAX_VALUE:0>e?Y.p(-e).i():new Y(e%Y.B|0,e/Y.B|0)},Y.v=function(e,t){return new Y(e,t)},Y.k=function(e,t){0==e.length&&g(Error("number format error: empty string"));var r=t||10;if((2>r||36o?(o=Y.p(Math.pow(r,o)),i=i.multiply(o).add(Y.p(s))):i=(i=i.multiply(n)).add(Y.p(s))}return i},Y.ea=65536,Y.Od=16777216,Y.B=Y.ea*Y.ea,Y.Pd=Y.B/2,Y.Qd=Y.B*Y.ea,Y.eb=Y.B*Y.B,Y.Ea=Y.eb/2,Y.ZERO=Y.D(0),Y.ONE=Y.D(1),Y.Da=Y.D(-1),Y.MAX_VALUE=Y.v(-1,2147483647),Y.MIN_VALUE=Y.v(0,-2147483648),Y.cb=Y.D(16777216),q=Y.prototype,q.Z=function(){return this.j*Y.B+this.ob()},q.toString=function(e){if((2>(e=e||10)||36a.length;)a="0"+a;n=""+a+n}},q.ob=function(){return 0<=this.h?this.h:Y.B+this.h},q.G=function(){return 0==this.j&&0==this.h},q.n=function(){return 0>this.j},q.Pa=function(){return 1==(1&this.h)},q.o=function(e){return this.j==e.j&&this.h==e.h},q.Ra=function(){return 0>this.ja(Y.cb)},q.qb=function(e){return 0>>16,n=65535&this.j,i=this.h>>>16,a=e.j>>>16,o=65535&e.j,s=e.h>>>16;return e=0+((t=(65535&this.h)+(65535&e.h)+0)>>>16),i=0+((e+=i+s)>>>16),n=(n=0+((i+=n+o)>>>16))+(r+a)&65535,Y.v((65535&e)<<16|65535&t,n<<16|65535&i)},q.R=function(e){return this.add(e.i())},q.multiply=function(e){if(this.G()||e.G())return Y.ZERO;if(this.o(Y.MIN_VALUE))return e.Pa()?Y.MIN_VALUE:Y.ZERO;if(e.o(Y.MIN_VALUE))return this.Pa()?Y.MIN_VALUE:Y.ZERO;if(this.n())return e.n()?this.i().multiply(e.i()):this.i().multiply(e).i();if(e.n())return this.multiply(e.i()).i();if(this.Ra()&&e.Ra())return Y.p(this.Z()*e.Z());var t,r,n,i,a=this.j>>>16,o=65535&this.j,s=this.h>>>16,f=65535&this.h,c=e.j>>>16,u=65535&e.j,d=e.h>>>16;return n=0+((i=0+f*(e=65535&e.h))>>>16),r=0+((n+=s*e)>>>16),r+=(n=(65535&n)+f*d)>>>16,n&=65535,t=0+((r+=o*e)>>>16),t+=(r=(65535&r)+s*d)>>>16,r&=65535,t+=(r+=f*u)>>>16,r&=65535,t=t+(a*e+o*d+s*u+f*c)&65535,Y.v(n<<16|65535&i,t<<16|r)},q.F=function(e){if(e.G()&&g(Error("division by zero")),this.G())return Y.ZERO;if(this.o(Y.MIN_VALUE)){if(e.o(Y.ONE)||e.o(Y.Da))return Y.MIN_VALUE;if(e.o(Y.MIN_VALUE))return Y.ONE;if((n=this.Db().F(e).shiftLeft(1)).o(Y.ZERO))return e.n()?Y.ONE:Y.Da;var t=this.R(e.multiply(n));return n.add(t.F(e))}if(e.o(Y.MIN_VALUE))return Y.ZERO;if(this.n())return e.n()?this.i().F(e.i()):this.i().F(e).i();if(e.n())return this.F(e.i()).i();var r=Y.ZERO;for(t=this;t.rb(e);){for(var n=Math.max(1,Math.floor(t.Z()/e.Z())),i=48>=(i=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,i-48),a=Y.p(n),o=a.multiply(e);o.n()||o.qb(t);)n-=i,o=(a=Y.p(n)).multiply(e);a.G()&&(a=Y.ONE),r=r.add(a),t=t.R(o)}return r},q.xb=function(){return Y.v(~this.h,~this.j)},q.shiftLeft=function(e){if(0==(e&=63))return this;var t=this.h;return 32>e?Y.v(t<>>32-e):Y.v(0,t<>>1|e<<31,e>>1)},q=X.prototype,q.ga=function(e,t,r,n){for(var i=0,a=0;0<=--n;){var o=e*this[i++]+t[r]+a;a=Math.floor(o/67108864);t[r++]=67108863&o}return a},q.f=26,q.u=67108863,q.K=67108864,q.bb=Math.pow(2,52),q.Aa=26,q.Ba=0;var $c=[],bd,Z;for(bd=48,Z=0;9>=Z;++Z)$c[bd++]=Z;for(bd=97,Z=10;36>Z;++Z)$c[bd++]=Z;for(bd=65,Z=10;36>Z;++Z)$c[bd++]=Z;q=X.prototype,q.copyTo=function(e){for(var t=this.b-1;0<=t;--t)e[t]=this[t];e.b=this.b,e.c=this.c},q.D=function(e){this.b=1,this.c=0>e?-1:0,0e?this[0]=e+DV:this.b=0},q.k=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.nb(e,t);r=2}this.c=this.b=0;for(var n=e.length,i=p,a=0;0<=--n;){var o=8==r?255&e[n]:Zc(e,n);0>o?"-"==e.charAt(n)&&(i=l):(i=p,0==a?this[this.b++]=o:a+r>this.f?(this[this.b-1]|=(o&(1<>this.f-a):this[this.b-1]|=o<=this.f&&(a-=this.f))}8==r&&0!=(128&e[0])&&(this.c=-1,0>i|s,s=(this[r]&a)<=this.b)t.b=0;else{var n=e%this.f,i=this.f-n,a=(1<>n;for(var o=r+1;o>n;0>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n-=e.c}t.c=0>n?-1:0,-1>n?t[r++]=this.K+n:0=n.b)){var i=this.abs();if(i.b>>16)&&(f=a,c+=16),0!=(a=f>>8)&&(f=a,c+=8),0!=(a=f>>4)&&(f=a,c+=4),0!=(a=f>>2)&&(f=a,c+=2),0!=f>>1&&(c+=1),0<(f=this.f-c)?(n.Qa(f,o),i.Qa(f,r)):(n.copyTo(o),i.copyTo(r)),0!=(i=o[(n=o.b)-1])){a=i*(1<>this.Ba:0),c=this.bb/a,a=(1<s&&X.ZERO.t(r,r)}}}},q.toString=function(e){if(0>this.c)return"-"+this.i().toString(e);if(16==e)e=4;else if(8==e)e=3;else if(2==e)e=1;else if(32==e)e=5;else{if(4!=e)return this.Fb(e);e=2}var t,r=(1<>o)&&(n=l,i="0123456789abcdefghijklmnopqrstuvwxyz".charAt(t));0<=a;)o>(o+=this.f-e)):(t=this[a]>>(o-=e)&r,0>=o&&(o+=this.f,--a)),0this.c?this.i():this},q.U=function(e){if(0!=(t=this.c-e.c))return t;var t,r=this.b;if(0!=(t=r-e.b))return 0>this.c?-t:t;for(;0<=--r;)if(0!=(t=this[r]-e[r]))return t;return 0},X.ZERO=ad(0),X.ONE=ad(1),q=X.prototype,q.nb=function(e,t){this.D(0),t==m&&(t=10);for(var r=this.S(t),n=Math.pow(t,r),i=p,a=0,o=0,s=0;sf?"-"==e.charAt(s)&&0==this.ra()&&(i=l):(o=t*o+f,++a>=r&&(this.Ia(n),this.Ha(o),o=a=0))}0this.c?-1:0>=this.b||1==this.b&&0>=this[0]?0:1},q.Ia=function(e){this[this.b]=this.ga(e-1,this,0,this.b),++this.b,this.C()},q.Ha=function(e){var t=0;if(0!=e){for(;this.b<=t;)this[this.b++]=0;for(this[t]+=e;this[t]>=this.K;)this[t]-=this.K,++t>=this.b&&(this[this.b++]=0),++this[t]}},q.Fb=function(e){if(e==m&&(e=10),0==this.ra()||2>e||36this.c){if(1==this.b)return this[0]-this.K;if(0==this.b)return-1}else{if(1==this.b)return this[0];if(0==this.b)return 0}return(this[1]&(1<<32-this.f)-1)<>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n+=e.c}t.c=0>n?-1:0,0n&&(t[r++]=this.K+n),t.b=r,t.C()};var $={abs:function(e,t){var r=(r=new Y(e,t)).n()?r.i():r;B[qb>>2]=r.h,B[qb+4>>2]=r.j},Ka:function(){$.kb||($.kb=l,$.Xa=new X,$.Xa.k("4294967296",10),$.sa=new X,$.sa.k("18446744073709551616",10),$.xe=new X,$.ye=new X)},me:function(e,t){var r=new X;r.k(t.toString(),10);var n=new X;r.vb(n),(r=new X).k(e.toString(),10);var i=new X;return r.fa(n,i),i},stringify:function(e,t,r){return e=new Y(e,t).toString(),r&&"-"==e[0]&&($.Ka(),(r=new X).k(e,10),e=new X,$.sa.fa(r,e),e=e.toString(10)),e},k:function(e,t,r,n,i){$.Ka();var a=new X;a.k(e,t),(e=new X).k(r,10),(r=new X).k(n,10),i&&0>a.U(X.ZERO)&&(n=new X,a.fa($.sa,n),a=n),n=p,0>a.U(e)?(a=e,n=l):0>2]=a.h,B[qb+4>>2]=a.j,n&&g("range error")}},cd,dd;function lb(e){function t(){if(ab||(ab=l,Va(Xa)),Va(Ya),gb=l,s._main&&kb&&s.callMain(e),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)cb(s.postRun.shift());Va($a)}if(e=e||s.arguments,0e;e++)i.push(0)}w(0==L,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),w(0==Wa.length,"cannot call main when preRun functions remain to be called"),e=e||[],ab||(ab=l,Va(Xa));var r,n=e.length+1,i=[F(J("/bin/this.program"),"i8",Ka)];t();for(var a=0;a>4&15]),t.push("0123456789abcdef"[15&e[r]]);return t.join("")},e.crypto_scrypt=function(e,t,r,a,o,s){var f=new i(s),c=n(e),u=n(t);return function(e,t){if(0!==t)throw{message:"scrypt_raw."+e+" signalled an error"}}("_crypto_scrypt",scrypt_raw._crypto_scrypt(c,e.length,u,t.length,r,0,a,o,f.address,f.length)),function(e){for(var t=0;t=e)&&(n=e-1,console.error("invalid priority: "+a+" must be between 0 and "+n))),t[n].push(r)},n.dequeue=function(e){var r,n=null,a=t.length;for(i=null,r=0;ru.length);r+=1)l>=(c=a[r].timeout)&&(d("removeIdle() destroying obj - now:"+l+" timeout:"+c,"verbose"),u.push(a[r].obj));for(r=0,o=u.length;r0?(d("availableObjects.length="+n,"verbose"),h()):d("removeIdle() all objects removed","verbose")}function h(){f||(f=!0,c=setTimeout(l,n))}function p(){var r=null,n=o.size();if(d("dispense() clients="+n+" available="+a.length,"info"),n>0){for(;a.length>0;){if(d("dispense() - reusing obj","verbose"),r=a[0],e.validate(r.obj))return a.shift(),o.dequeue()(null,r.obj);t.destroy(r.obj)}s1?(e=arguments[0],r=arguments[1]):(e=arguments[0]instanceof Error?arguments[0]:null,r=arguments[0]instanceof Error?null:arguments[0]),e?(s-=1,n&&n(e,r),process.nextTick(function(){p()})):n?n(e,r):t.release(r)})}function v(){var t,r;if(!u&&s0?setTimeout(t,100):a.length!=s?setTimeout(t,100):e&&e()};t()},t.destroyAllNow=function(e){d("force destroying all objects","info");var r=a;a=[];for(var n=r.shift();null!==n&&void 0!==n;)t.destroy(n.obj),n=r.shift();f=!1,clearTimeout(c),e&&e()},t.pooled=function(e,r){return function(){var n=arguments,i=n[n.length-1],a="function"==typeof i;t.acquire(function(r,o){if(r)a&&i(r);else{var s=[o].concat(Array.prototype.slice.call(n,0,a?-1:void 0));s.push(function(){t.release(o),a&&i.apply(null,arguments)}),e.apply(null,s)}},r)}},t.getPoolSize=function(){return s},t.getName=function(){return e.name},t.availableObjectsCount=function(){return a.length},t.waitingClientsCount=function(){return o.size()},v(),t}},function(e,t){e.exports=require("child_process")},function(e,t,r){(function(t){var n=r(45),i=r(91).fork,a=r(90),o=r(60).cpus().length,s=s=new a.Pool({name:"scrypt-worker",create:function(e){var r=i(t+"/scrypt-async-worker.js");r.controlledExit=!1,r.on("exit",function(){r.controlledExit||setImmediate(s.destroy.bind(s,r))}),e(r)},destroy:function(e){try{e.controlledExit=!0,e.disconnect()}catch(e){}},max:Math.max(2,o-1),min:0,idleTimeoutMillis:15e3,log:!1});e.exports=function(e,t,r,i){var a=n.apply(null,arguments),o=a.callback||function(){};delete a.callback,a.password=a.password.toString("base64"),a.salt=a.salt.toString("base64");new Date;s.acquire(function(e,t){if(e)return s.release(t),o(e);t.once("message",function(e){new Date;s.release(t),e.error&&o(e.error),o(null,new Buffer(e.data,"base64"))}),t.send(a)})}}).call(this,"/")},function(e,t,r){e.exports={hash:r(92),hashSync:r(89)}},function(e,t,r){var n;e.exports=(n=r(3),r(24),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){var n,i;e.exports=(n=r(3),r(24),n.mode.ECB=((i=n.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),n.mode.ECB)},function(e,t,r){var n,i,a,o,s,f,c;e.exports=(n=r(3),a=(i=n).lib,o=a.Base,s=i.enc,f=s.Utf8,c=i.algo,void(c.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=f.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,s=a.words,c=0;c>>31}var d=(n<<5|n>>>27)+s+f[c];d+=c<20?1518500249+(i&a|~i&o):c<40?1859775393+(i^a^o):c<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=n,n=d}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=s._createHelper(c),i.HmacSHA1=s._createHmacHelper(c),n.SHA1)},function(e,t,r){var n;e.exports=(n=r(3),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var f=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],f=e[t+1],h=e[t+2],p=e[t+3],b=e[t+4],v=e[t+5],m=e[t+6],g=e[t+7],y=e[t+8],w=e[t+9],_=e[t+10],x=e[t+11],k=e[t+12],S=e[t+13],A=e[t+14],M=e[t+15],E=a[0],P=a[1],I=a[2],C=a[3];P=l(P=l(P=l(P=l(P=d(P=d(P=d(P=d(P=u(P=u(P=u(P=u(P=c(P=c(P=c(P=c(P,I=c(I,C=c(C,E=c(E,P,I,C,o,7,s[0]),P,I,f,12,s[1]),E,P,h,17,s[2]),C,E,p,22,s[3]),I=c(I,C=c(C,E=c(E,P,I,C,b,7,s[4]),P,I,v,12,s[5]),E,P,m,17,s[6]),C,E,g,22,s[7]),I=c(I,C=c(C,E=c(E,P,I,C,y,7,s[8]),P,I,w,12,s[9]),E,P,_,17,s[10]),C,E,x,22,s[11]),I=c(I,C=c(C,E=c(E,P,I,C,k,7,s[12]),P,I,S,12,s[13]),E,P,A,17,s[14]),C,E,M,22,s[15]),I=u(I,C=u(C,E=u(E,P,I,C,f,5,s[16]),P,I,m,9,s[17]),E,P,x,14,s[18]),C,E,o,20,s[19]),I=u(I,C=u(C,E=u(E,P,I,C,v,5,s[20]),P,I,_,9,s[21]),E,P,M,14,s[22]),C,E,b,20,s[23]),I=u(I,C=u(C,E=u(E,P,I,C,w,5,s[24]),P,I,A,9,s[25]),E,P,p,14,s[26]),C,E,y,20,s[27]),I=u(I,C=u(C,E=u(E,P,I,C,S,5,s[28]),P,I,h,9,s[29]),E,P,g,14,s[30]),C,E,k,20,s[31]),I=d(I,C=d(C,E=d(E,P,I,C,v,4,s[32]),P,I,y,11,s[33]),E,P,x,16,s[34]),C,E,A,23,s[35]),I=d(I,C=d(C,E=d(E,P,I,C,f,4,s[36]),P,I,b,11,s[37]),E,P,g,16,s[38]),C,E,_,23,s[39]),I=d(I,C=d(C,E=d(E,P,I,C,S,4,s[40]),P,I,o,11,s[41]),E,P,p,16,s[42]),C,E,m,23,s[43]),I=d(I,C=d(C,E=d(E,P,I,C,w,4,s[44]),P,I,k,11,s[45]),E,P,M,16,s[46]),C,E,h,23,s[47]),I=l(I,C=l(C,E=l(E,P,I,C,o,6,s[48]),P,I,g,10,s[49]),E,P,A,15,s[50]),C,E,v,21,s[51]),I=l(I,C=l(C,E=l(E,P,I,C,k,6,s[52]),P,I,p,10,s[53]),E,P,_,15,s[54]),C,E,f,21,s[55]),I=l(I,C=l(C,E=l(E,P,I,C,y,6,s[56]),P,I,M,10,s[57]),E,P,m,15,s[58]),C,E,S,21,s[59]),I=l(I,C=l(C,E=l(E,P,I,C,b,6,s[60]),P,I,x,10,s[61]),E,P,h,15,s[62]),C,E,w,21,s[63]),a[0]=a[0]+E|0,a[1]=a[1]+P|0,a[2]=a[2]+I|0,a[3]=a[3]+C|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var a=e.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,c=0;c<4;c++){var u=f[c];f[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<>>32-a)+t}function u(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<>>32-a)+t}function d(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(f),t.HmacMD5=a._createHmacHelper(f)}(Math),n.MD5)},function(e,t,r){var n,i,a;e.exports=(n=r(3),a=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var f=n.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-o%4*2;n[i>>>2]|=(s|f)<<24-i%4*8,i++}return a.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},function(e,t,r){var n;e.exports=(n=r(3),r(99),r(98),r(46),r(24),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],f=[],c=[],u=[],d=[],l=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,a[p]=r;var b=e[r],v=e[b],m=e[v],g=257*e[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,c[r]=g,g=16843009*m^65537*v^257*b^16843008*r,u[p]=g<<24|g>>>8,d[p]=g<<16|g>>>16,l[p]=g<<8|g>>>24,h[p]=g,r?(r=b^e[e[e[m^b]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],b=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o6&&o%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[o/r|0]<<24),a[o]=a[o-r]^s}for(var f=this._invKeySchedule=[],c=0;c>>24]]^d[i[s>>>16&255]]^l[i[s>>>8&255]]^h[i[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,f,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,l,h,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var f=this._nRounds,c=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],l=e[t+3]^r[3],h=4,p=1;p>>24]^i[u>>>16&255]^a[d>>>8&255]^o[255&l]^r[h++],v=n[u>>>24]^i[d>>>16&255]^a[l>>>8&255]^o[255&c]^r[h++],m=n[d>>>24]^i[l>>>16&255]^a[c>>>8&255]^o[255&u]^r[h++],g=n[l>>>24]^i[c>>>16&255]^a[u>>>8&255]^o[255&d]^r[h++];c=b,u=v,d=m,l=g}b=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^r[h++],v=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&c])^r[h++],m=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^r[h++],g=(s[l>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=b,e[t+1]=v,e[t+2]=m,e[t+3]=g},keySize:8});e.AES=t._createHelper(b)}(),n.AES)},function(e,t,r){var n;e.exports=(n=r(3),n.enc.Latin1)},function(e,t,r){var n;!function(i){"use strict";function a(e,t){if(t=t||{type:"Array"},"undefined"!=typeof process&&"number"==typeof process.pid)return function(e,t){var n=r(28).randomBytes(e);switch(t.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(e),a=0;a0||e===t?t:t-1}function w(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nc^r?1:-1;for(s=(f=i.length)<(c=a.length)?f:c,o=0;oa[o]^r?1:-1;return f==c?0:f>c^r?1:-1}function x(e,t,r){return(e=E(e))>=t&&e<=r}function k(e){return"[object Array]"==Object.prototype.toString.call(e)}function S(e,t,r){for(var n,i,a=[0],o=0,s=e.length;or-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function M(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t15&&J(T,d,e),s=!1):h.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1,u=X(u,10,t,h.s)}else{if(e instanceof W)return h.s=e.s,h.e=e.e,h.c=(e=e.c)?e.slice():e,void(T=0);if((s="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;a>=10;a/=10,i++);return h.e=i,h.c=[e],void(T=0)}u=e+""}else{if(!o.test(u=e+""))return n(h,u,s);h.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1}}for((i=u.indexOf("."))>-1&&(u=u.replace(".","")),(a=u.search(/e/i))>0?(i<0&&(i=a),i+=+u.slice(a+1),u=u.substring(0,a)):i<0&&(i=u.length),a=0;48===u.charCodeAt(a);a++);for(c=u.length;48===u.charCodeAt(--c););if(u=u.slice(a,c+1))if(c=u.length,s&&q&&c>15&&(e>b||e!==f(e))&&J(T,d,h.s*e),(i=i-a-1)>L)h.c=h.e=null;else if(i=0&&(s=V,V=0,e=e.replace(".",""),c=(d=new W(n)).pow(e.length-h),V=s,d.c=S(M(w(c.c),c.e),10,t),d.e=d.c.length),o=s=(u=S(e,n,t)).length;0==u[--s];u.pop());if(!u[0])return"0";if(h<0?--o:(c.c=u,c.e=o,c.s=i,u=(c=r(c,d,p,b,t)).c,f=c.r,o=c.e),h=u[a=o+p+1],s=t/2,f=f||a<0||null!=u[a+1],f=b<4?(null!=h||f)&&(0==b||b==(c.s<0?3:2)):h>s||h==s&&(4==b||f||6==b&&1&u[a-1]||b==(c.s<0?8:7)),a<1||!u[0])e=f?M("1",-p):"0";else{if(u.length=a,f)for(--t;++u[--a]>t;)u[a]=0,a||(++o,u=[1].concat(u));for(s=u.length;!u[--s];);for(h=0,e="";h<=s;e+=l.charAt(u[h++]));e=M(e,o)}return e}function G(e,t,r,n){var i,a,o,s,f;if(r=null!=r&&D(r,0,8,n,u)?0|r:j,!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)f=w(e.c),f=19==n||24==n&&o<=B?A(f,o):M(f,o);else if(a=(e=ee(new W(e),t,r)).e,s=(f=w(e.c)).length,19==n||24==n&&(t<=a||a<=B)){for(;ss){if(--t>0)for(f+=".";t--;f+="0");}else if((t+=a-s)>0)for(a+1==s&&(f+=".");t--;f+="0");return e.s<0&&i?"-"+f:f}function Z(e,t){var r,n,i=0;for(k(e[0])&&(e=e[0]),r=new W(e[0]);++ir||e!=E(e))&&J(n,(i||"decimal places")+(er?" out of range":" not an integer"),e),!0}function $(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*p-1)>L?e.c=e.e=null:r=10;c/=10,i++);if((a=t-i)<0)a+=p,o=t,l=(u=b[d=0])/m[i-o-1]%10|0;else if((d=s((a+1)/p))>=b.length){if(!n)break e;for(;b.length<=d;b.push(0));u=l=0,i=1,o=(a%=p)-p+1}else{for(u=c=b[d],i=1;c>=10;c/=10,i++);l=(o=(a%=p)-p+i)<0?0:u/m[i-o-1]%10|0}if(n=n||t<0||null!=b[d+1]||(o<0?u:u%m[i-o-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(a>0?o>0?u/m[i-o]:0:b[d-1])%10&1||r==(e.s<0?8:7)),t<1||!b[0])return b.length=0,n?(t-=e.e+1,b[0]=m[(p-t%p)%p],e.e=-t||0):b[0]=e.e=0,e;if(0==a?(b.length=d,c=1,d--):(b.length=d+1,c=m[p-a],b[d]=o>0?f(u/m[i-o]%m[o])*c:0),n)for(;;){if(0==d){for(a=1,o=b[0];o>=10;o/=10,a++);for(o=b[0]+=c,c=1;o>=10;o/=10,c++);a!=c&&(e.e++,b[0]==h&&(b[0]=1));break}if(b[d]+=c,b[d]!=h)break;b[d--]=0,c=1}for(a=b.length;0===b[--a];b.pop());}e.e>L?e.c=e.e=null:e.er)return null!=(e=i[r++])};return o(t="DECIMAL_PLACES")&&D(e,0,g,2,t)&&(F=0|e),n[t]=F,o(t="ROUNDING_MODE")&&D(e,0,8,2,t)&&(j=0|e),n[t]=j,o(t="EXPONENTIAL_AT")&&(k(e)?D(e[0],-g,0,2,t)&&D(e[1],0,g,2,t)&&(B=0|e[0],z=0|e[1]):D(e,-g,g,2,t)&&(B=-(z=0|(e<0?-e:e)))),n[t]=[B,z],o(t="RANGE")&&(k(e)?D(e[0],-g,-1,2,t)&&D(e[1],1,g,2,t)&&(H=0|e[0],L=0|e[1]):D(e,-g,g,2,t)&&(0|e?H=-(L=0|(e<0?-e:e)):q&&J(2,t+" cannot be zero",e))),n[t]=[H,L],o(t="ERRORS")&&(e===!!e||1===e||0===e?(T=0,D=(q=!!e)?Q:x):q&&J(2,t+c,e)),n[t]=q,o(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?U=!0:q?J(2,"crypto unavailable",e?void 0:crypto):U=!1:U=!1:q&&J(2,t+c,e)),n[t]=U,o(t="MODULO_MODE")&&D(e,0,9,2,t)&&(K=0|e),n[t]=K,o(t="POW_PRECISION")&&D(e,0,g,2,t)&&(V=0|e),n[t]=V,o(t="FORMAT")&&("object"==typeof e?Y=e:q&&J(2,t+" not an object",e)),n[t]=Y,n},W.max=function(){return Z(arguments,R.lt)},W.min=function(){return Z(arguments,R.gt)},W.random=(i=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,o,c=0,u=[],d=new W(N);if(e=null!=e&&D(e,0,g,14)?0|e:F,a=s(e/p),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));c>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(u.push(o%1e14),c+=2);c=a/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(a*=7);c=9e15?crypto.randomBytes(7).copy(t,c):(u.push(o%1e14),c+=7);c=a/7}else U=!1,q&&J(14,"crypto unavailable",crypto);if(!U)for(;c=10;o/=10,c++);cn?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var c,u,d,l,b,v,m,g,w,_,x,k,S,A,M,E,P,I=n.s==i.s?1:-1,C=n.c,O=i.c;if(!(C&&C[0]&&O&&O[0]))return new W(n.s&&i.s&&(C?!O||C[0]!=O[0]:O)?C&&0==C[0]||!O?0*I:I/0:NaN);for(w=(g=new W(I)).c=[],I=a+(u=n.e-i.e)+1,s||(s=h,u=y(n.e/p)-y(i.e/p),I=I/p|0),d=0;O[d]==(C[d]||0);d++);if(O[d]>(C[d]||0)&&u--,I<0)w.push(1),l=!0;else{for(A=C.length,E=O.length,d=0,I+=2,(b=f(s/(O[0]+1)))>1&&(O=e(O,b,s),C=e(C,b,s),E=O.length,A=C.length),S=E,x=(_=C.slice(0,E)).length;x=s/2&&M++;do{if(b=0,(c=t(O,_,E,x))<0){if(k=_[0],E!=x&&(k=k*s+(_[1]||0)),(b=f(k/M))>1)for(b>=s&&(b=s-1),m=(v=e(O,b,s)).length,x=_.length;1==t(v,_,m,x);)b--,r(v,E=10;I/=10,d++);ee(g,a+(g.e=d+u*p-1)+1,o,l)}else g.e=u,g.r=+l;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,P=/^([^.]+)\.$/,I=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(C.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(P,"$1").replace(I,"0.$1")),t!=o))return new W(o,i);q&&J(T,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,T=0},R.absoluteValue=R.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},R.ceil=function(){return ee(new W(this),this.e+1,2)},R.comparedTo=R.cmp=function(e,t){return T=1,_(this,new W(e,t))},R.decimalPlaces=R.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-y(this.e/p))*p,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},R.dividedBy=R.div=function(e,t){return T=3,r(this,new W(e,t),F,j)},R.dividedToIntegerBy=R.divToInt=function(e,t){return T=4,r(this,new W(e,t),0,1)},R.equals=R.eq=function(e,t){return T=5,0===_(this,new W(e,t))},R.floor=function(){return ee(new W(this),this.e+1,3)},R.greaterThan=R.gt=function(e,t){return T=6,_(this,new W(e,t))>0},R.greaterThanOrEqualTo=R.gte=function(e,t){return T=7,1===(t=_(this,new W(e,t)))||0===t},R.isFinite=function(){return!!this.c},R.isInteger=R.isInt=function(){return!!this.c&&y(this.e/p)>this.c.length-2},R.isNaN=function(){return!this.s},R.isNegative=R.isNeg=function(){return this.s<0},R.isZero=function(){return!!this.c&&0==this.c[0]},R.lessThan=R.lt=function(e,t){return T=8,_(this,new W(e,t))<0},R.lessThanOrEqualTo=R.lte=function(e,t){return T=9,-1===(t=_(this,new W(e,t)))||0===t},R.minus=R.sub=function(e,t){var r,n,i,a,o=this,s=o.s;if(T=10,t=(e=new W(e,t)).s,!s||!t)return new W(NaN);if(s!=t)return e.s=-t,o.plus(e);var f=o.e/p,c=e.e/p,u=o.c,d=e.c;if(!f||!c){if(!u||!d)return u?(e.s=-t,e):new W(d?o:NaN);if(!u[0]||!d[0])return d[0]?(e.s=-t,e):new W(u[0]?o:3==j?-0:0)}if(f=y(f),c=y(c),u=u.slice(),s=f-c){for((a=s<0)?(s=-s,i=u):(c=f,i=d),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=u.length)<(t=d.length))?s:t,s=t=0;t0)for(;t--;u[r++]=0);for(t=h-1;n>s;){if(u[--n]0?(o=a,r=f):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=f.length)<0&&(r=f,f=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+f[t]+i)/h|0,s[t]=h===s[t]?0:s[t]%h;return i&&(s=[i].concat(s),++o),$(e,s,o)},R.precision=R.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(q&&J(13,"argument"+c,e),e!=!!e&&(e=null)),!i)return null;if(t=(r=i.length-1)*p+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},R.round=function(e,t){var r=new W(this);return(null==e||D(e,0,g,15))&&ee(r,~~e+this.e+1,null!=t&&D(t,0,8,15,u)?0|t:j),r},R.shift=function(e){var t=this;return D(e,-b,b,16,"argument")?t.times("1e"+E(e)):new W(t.c&&t.c[0]&&(e<-b||e>b)?t.s*(e<0?0:1/0):t)},R.squareRoot=R.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,f=o.s,c=o.e,u=F+4,d=new W("0.5");if(1!==f||!s||!s[0])return new W(!f||f<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(f=Math.sqrt(+o))||f==1/0?(((t=w(s)).length+c)%2==0&&(t+="0"),f=Math.sqrt(t),c=y((c+1)/2)-(c<0||c%2),n=new W(t=f==1/0?"1e"+c:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new W(f+""),n.c[0])for((f=(c=n.e)+u)<3&&(f=0);;)if(a=n,n=d.times(a.plus(r(o,a,u,1))),w(a.c).slice(0,f)===(t=w(n.c)).slice(0,f)){if(n.e=0;){for(r=0,l=k[i]%w,b=k[i]/w|0,a=i+(o=f);a>i;)r=((c=l*(c=x[--o]%w)+(s=b*c+(u=x[o]/w|0)*l)%w*w+v[a]+r)/g|0)+(s/w|0)+b*u,v[a--]=c%g;v[a]=r}return r?++n:v.splice(0,1),$(e,v,n)},R.toDigits=function(e,t){var r=new W(this);return e=null!=e&&D(e,1,g,18,"precision")?0|e:null,t=null!=t&&D(t,0,8,18,u)?0|t:j,e?ee(r,e,t):r},R.toExponential=function(e,t){return G(this,null!=e&&D(e,0,g,19)?1+~~e:null,t,19)},R.toFixed=function(e,t){return G(this,null!=e&&D(e,0,g,20)?~~e+this.e+1:null,t,20)},R.toFormat=function(e,t){var r=G(this,null!=e&&D(e,0,g,21)?~~e+this.e+1:null,t,21);if(this.c){var n,i=r.split("."),a=+Y.groupSize,o=+Y.secondaryGroupSize,s=Y.groupSeparator,f=i[0],c=i[1],u=this.s<0,d=u?f.slice(1):f,l=d.length;if(o&&(n=a,a=o,o=n,l-=n),a>0&&l>0){for(n=l%a||a,f=d.substr(0,n);n0&&(f+=s+d.slice(n)),u&&(f="-"+f)}r=c?f+Y.decimalSeparator+((o=+Y.fractionGroupSize)?c.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+Y.fractionGroupSeparator):c):f}return r},R.toFraction=function(e){var t,n,i,a,o,s,f,c,u,d=q,l=this,h=l.c,b=new W(N),m=n=new W(N),g=f=new W(N);if(null!=e&&(q=!1,s=new W(e),q=d,(d=s.isInt())&&!s.lt(N)||(q&&J(22,"max denominator "+(d?"out of range":"not an integer"),e),e=!d&&s.c&&ee(s,s.e+1,1).gte(N)?s:null)),!h)return l.toString();for(u=w(h),a=b.e=u.length-l.e-1,b.c[0]=v[(o=a%p)<0?p+o:o],e=!e||s.cmp(b)>0?a>0?b:m:s,o=L,L=1/0,s=new W(u),f.c[0]=0;c=r(s,b,0,1),1!=(i=n.plus(c.times(g))).cmp(e);)n=g,g=i,m=f.plus(c.times(i=m)),f=i,b=s.minus(c.times(i=b)),s=i;return i=r(e.minus(n),g,0,1),f=f.plus(i.times(m)),n=n.plus(i.times(g)),f.s=m.s=l.s,t=r(m,g,a*=2,j).minus(l).abs().cmp(r(f,n,a,j).minus(l).abs())<1?[m.toString(),g.toString()]:[f.toString(),n.toString()],L=o,t},R.toNumber=function(){return+this},R.toPower=R.pow=function(e,t){var r,n,i,a=f(e<0?-e:+e),o=this;if(null!=t&&(T=23,t=new W(t)),!D(e,-b,b,23,"exponent")&&(!isFinite(e)||a>b&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+o,e),new W(t?r%t:r);for(t?e>1&&o.gt(N)&&o.isInt()&&t.gt(N)&&t.isInt()?o=o.mod(t):(i=t,t=null):V&&(r=s(V/p+2)),n=new W(N);;){if(a%2){if(!(n=n.times(o)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(a=f(a/2)))break;o=o.times(o),r?o.c&&o.c.length>r&&(o.c.length=r):t&&(o=o.mod(t))}return t?n:(e<0&&(n=N.div(n)),i?n.mod(i):r?ee(n,V,j):n)},R.toPrecision=function(e,t){return G(this,null!=e&&D(e,1,g,24,"precision")?0|e:null,t,24)},R.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=w(r.c),t=null!=e&&D(e,2,64,25,"base")?X(M(t,i),0|e,10,n):i<=B||i>=z?A(t,i):M(t,i),n<0&&r.c[0]&&(t="-"+t)),t},R.truncated=R.trunc=function(){return ee(new W(this),this.e+1,1)},R.valueOf=R.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=w(t.c),e=r<=B||r>=z?A(e,r):M(e,r),t.s<0?"-"+e:e)},R.isBigNumber=!0,null!=t&&W.config(t),W}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n;e.exports=(n=r(3), +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=161)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fixed8=t.sha256=t.hash256=t.hash160=t.StringStream=t.ensureHex=t.isHex=t.reverseHex=t.reverseArray=t.hexXor=t.num2VarInt=t.fixed82num=t.num2fixed8=t.num2hexstring=t.int2hex=t.hexstring2str=t.str2hexstring=t.ab2hexstring=t.hexstring2ab=t.str2ab=t.ab2str=void 0;var n=f(r(49)),i=f(r(48)),a=f(r(104)),o=f(r(103)),s=f(r(14));function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e,t,r){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function l(e){return(l=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new Error("num must be numeric");if(e<0)throw new RangeError("num is unsigned (>= 0)");if(t%1!=0)throw new Error("size must be a whole integer");if(!Number.isSafeInteger(e))throw new RangeError("num (".concat(e,") must be a safe integer"));t*=2;var n=e.toString(16);return n=n.length%t==0?n:("0".repeat(t)+n).substring(n.length),r&&(n=x(n)),n};t.num2hexstring=_;t.num2fixed8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;if("number"!=typeof e)throw new Error("num must be numeric");if(t%1!=0)throw new Error("size must be a whole integer");return new E(e.toFixed(8)).toReverseHex().slice(0,2*t)};t.fixed82num=function(e){return A(e),""===e?0:E.fromReverseHex(e).toNumber()};t.num2VarInt=function(e){return e<253?_(e):e<=65535?"fd"+_(e,2,!0):e<=4294967295?"fe"+_(e,4,!0):"ff"+_(e,8,!0)};t.hexXor=function(e,t){if(A(e),A(t),e.length!==t.length)throw new Error("strings are disparate lengths");for(var r=[],n=0;n=0;r-=2)t+=e.substr(r,2);return t};t.reverseHex=x;var k=/^([0-9A-Fa-f]{2})*$/,S=function(e){try{return k.test(e)}catch(e){return!1}};t.isHex=S;var A=function(e){if(!S(e))throw new Error("Expected a hexstring but got ".concat(e))};t.ensureHex=A;var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";h(this,e),this.str=t,this.pter=0}return b(e,[{key:"isEmpty",value:function(){return this.pter>=this.str.length}},{key:"peek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.isEmpty()?"":this.substr(this.ptr,2*e)}},{key:"read",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.isEmpty())throw new Error;var t=this.str.substr(this.pter,2*e);return this.pter+=2*e,t}},{key:"readVarBytes",value:function(){return this.read(this.readVarInt())}},{key:"readVarInt",value:function(){var e=parseInt(this.read(1),16);return 253===e?e=parseInt(x(this.read(2)),16):254===e?e=parseInt(x(this.read(4)),16):255===e&&(e=parseInt(x(this.read(8)),16)),e}},{key:"reset",value:function(){this.pter=0}}]),e}();t.StringStream=M;t.hash160=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,a.default)(r).toString()};t.hash256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,i.default)(r).toString()};t.sha256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e);return(0,i.default)(t).toString()};var E=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return h(this,t),"number"==typeof e&&(e=e.toFixed(8)),u(this,l(t).call(this,e,r))}return b(t,[{key:"toHex",value:function(){var e=this.times(1e8).round(0).toString(16);return"0".repeat(16-e.length)+e}},{key:"toReverseHex",value:function(){return x(this.toHex())}},{key:s.default.inspect.custom,value:function(e,t){return this.toFixed(8)}},{key:"ceil",value:function(){return new t(d(l(t.prototype),"ceil",this).call(this))}},{key:"floor",value:function(){return new t(d(l(t.prototype),"floor",this).call(this))}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"round",this).call(this,e,r))}},{key:"div",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.dividedBy(e,t)}},{key:"dividedBy",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"dividedBy",this).call(this,e,r))}},{key:"mul",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.times(e,t)}},{key:"times",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"times",this).call(this,e,r))}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.plus(e,t)}},{key:"plus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"plus",this).call(this,e,r))}},{key:"sub",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.minus(e,t)}},{key:"minus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(d(l(t.prototype),"minus",this).call(this,e,r))}}],[{key:"fromHex",value:function(e){return new t(e,16).div(1e8)}},{key:"fromReverseHex",value:function(e){return this.fromHex(x(e))}}]),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");c(e.prototype,t&&t.prototype),t&&c(e,t)}(t,e),t}(o.default);t.Fixed8=E},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.default=void 0;var n=a(r(85)),i=a(r(84));function a(e){return e&&e.__esModule?e:{default:e}}i.default.reg(n.default),n.default.setDefaultLevel("silent"),n.default.setAll=function(e){Object.keys(n.default.getLoggers()).map(function(t){n.default.getLogger(t).setLevel(e)})};var o=function(e,t){var r=(new Date).toUTCString();e=e.toUpperCase();var n=t;return"[".concat(r,"] (").concat(n,") ").concat(e,": ")};t.default=function(e){var t=n.default.getLogger(e);return i.default.apply(t,{format:o}),t};var s=n.default;t.logger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TX_VERSION=t.RPC_VERSION=t.NEP_FLAG=t.NEP_HEADER=t.NEO_NETWORK=t.DEFAULT_ACCOUNT_CONTRACT=t.DEFAULT_WALLET=t.DEFAULT_SYSFEE=t.DEFAULT_SCRYPT=t.DEFAULT_REQ=t.DEFAULT_RPC=t.CONTRACTS=t.ASSET_ID=t.ASSETS=t.ADDR_VERSION=void 0;t.ADDR_VERSION="17";t.ASSETS={NEO:"NEO",c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b:"NEO",GAS:"GAS","602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7":"GAS"};t.ASSET_ID={NEO:"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",GAS:"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7"};t.CONTRACTS={RPX:"ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9",TEST_RPX:"5b7074e873973a6ed3708862f219a6fbf4d1c411",TEST_LWTF:"d7678dd97c000be3f33e9362e673101bac4ca654",TEST_NXT:"0b6c1f919e95fe61c17a7612aebfaf4fda3a2214",TEST_RHTT4:"f9572c5b119a6b5775a6af07f1cef5d310038f55"};t.DEFAULT_RPC={MAIN:"https://seed1.neo.org:10331",TEST:"https://seed1.neo.org:20331"};t.DEFAULT_REQ={jsonrpc:"2.0",method:"getblockcount",params:[],id:1234};t.DEFAULT_SCRYPT={cost:16384,blockSize:8,parallel:8,size:64};t.DEFAULT_SYSFEE={enrollmentTransaction:1e3,issueTransaction:500,publishTransaction:500,registerTransaction:1e4};t.DEFAULT_WALLET={name:"myWallet",version:"1.0",scrypt:{},accounts:[],extra:null};t.DEFAULT_ACCOUNT_CONTRACT={script:"",parameters:[{name:"signature",type:"Signature"}],deployed:!1};t.NEO_NETWORK={MAIN:"MainNet",TEST:"TestNet"};t.NEP_HEADER="0142";t.NEP_FLAG="e0";t.RPC_VERSION="2.3.2";t.TX_VERSION={CLAIM:0,CONTRACT:0,INVOCATION:1}},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},a=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=4*a,f=i/s,c=(f=t?e.ceil(f):e.max((0|f)-this._minBufferSize,0))*a,u=e.min(4*c,i);if(c){for(var d=0;d>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var f=0,c=t;return f+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,f,c){var u=0,d=t;return u+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,f,c){return t+n+a+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(55).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function f(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,f=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&f,l=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=l;h++){var p=c-h|0;u+=(o=(i=0|e.words[p])*(a=0|t.words[h])+d)/67108864|0,d=67108863&o}r.words[c]=0|d,f=0|u}return 0!==f?r.words[c]=0|f:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=u[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:c[l-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,f="le"===t,c=new e(a),u=this.clone();if(f){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,v=0|o[2],m=8191&v,g=v>>>13,y=0|o[3],w=8191&y,_=y>>>13,x=0|o[4],k=8191&x,S=x>>>13,A=0|o[5],M=8191&A,E=A>>>13,P=0|o[6],I=8191&P,C=P>>>13,O=0|o[7],T=8191&O,R=O>>>13,N=0|o[8],F=8191&N,j=N>>>13,B=0|o[9],z=8191&B,H=B>>>13,L=0|s[0],q=8191&L,D=L>>>13,U=0|s[1],K=8191&U,V=U>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,G=0|s[3],Z=8191&G,Q=G>>>13,$=0|s[4],J=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],fe=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,le=ue>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(c+(n=Math.imul(d,q))|0)+((8191&(i=(i=Math.imul(d,D))+Math.imul(l,q)|0))<<13)|0;c=((a=Math.imul(l,D))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,D))+Math.imul(b,q)|0,a=Math.imul(b,D);var me=(c+(n=n+Math.imul(d,K)|0)|0)+((8191&(i=(i=i+Math.imul(d,V)|0)+Math.imul(l,K)|0))<<13)|0;c=((a=a+Math.imul(l,V)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,q),i=(i=Math.imul(m,D))+Math.imul(g,q)|0,a=Math.imul(g,D),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,V)|0;var ge=(c+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(l,W)|0))<<13)|0;c=((a=a+Math.imul(l,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,D))+Math.imul(_,q)|0,a=Math.imul(_,D),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,V)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,X)|0;var ye=(c+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Q)|0)+Math.imul(l,Z)|0))<<13)|0;c=((a=a+Math.imul(l,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,D))+Math.imul(S,q)|0,a=Math.imul(S,D),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,Z)|0,a=a+Math.imul(b,Q)|0;var we=(c+(n=n+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,J)|0))<<13)|0;c=((a=a+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,q),i=(i=Math.imul(M,D))+Math.imul(E,q)|0,a=Math.imul(E,D),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(S,K)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,Z)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(g,Z)|0,a=a+Math.imul(g,Q)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,ee)|0;var _e=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((a=a+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,q),i=(i=Math.imul(I,D))+Math.imul(C,q)|0,a=Math.imul(C,D),n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,V)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0;var xe=(c+(n=n+Math.imul(d,ae)|0)|0)+((8191&(i=(i=i+Math.imul(d,oe)|0)+Math.imul(l,ae)|0))<<13)|0;c=((a=a+Math.imul(l,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,D))+Math.imul(R,q)|0,a=Math.imul(R,D),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,Q)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var ke=(c+(n=n+Math.imul(d,fe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(l,fe)|0))<<13)|0;c=((a=a+Math.imul(l,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,D))+Math.imul(j,q)|0,a=Math.imul(j,D),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,V)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(E,Z)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(m,ae)|0,i=(i=i+Math.imul(m,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,ce)|0;var Se=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;c=((a=a+Math.imul(l,le)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(z,q),i=(i=Math.imul(z,D))+Math.imul(H,q)|0,a=Math.imul(H,D),n=n+Math.imul(F,K)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(j,K)|0,a=a+Math.imul(j,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(C,Z)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,ce)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,a=a+Math.imul(b,le)|0;var Ae=(c+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;c=((a=a+Math.imul(l,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(z,K),i=(i=Math.imul(z,V))+Math.imul(H,K)|0,a=Math.imul(H,V),n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(j,W)|0,a=a+Math.imul(j,X)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(R,Z)|0,a=a+Math.imul(R,Q)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,ce)|0,n=n+Math.imul(m,de)|0,i=(i=i+Math.imul(m,le)|0)+Math.imul(g,de)|0,a=a+Math.imul(g,le)|0;var Me=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((a=a+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(z,W),i=(i=Math.imul(z,X))+Math.imul(H,W)|0,a=Math.imul(H,X),n=n+Math.imul(F,Z)|0,i=(i=i+Math.imul(F,Q)|0)+Math.imul(j,Z)|0,a=a+Math.imul(j,Q)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,de)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,de)|0,a=a+Math.imul(_,le)|0;var Ee=(c+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(g,pe)|0))<<13)|0;c=((a=a+Math.imul(g,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(z,Z),i=(i=Math.imul(z,Q))+Math.imul(H,Z)|0,a=Math.imul(H,Q),n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,ee)|0)+Math.imul(j,J)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,ce)|0,n=n+Math.imul(k,de)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(S,de)|0,a=a+Math.imul(S,le)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;c=((a=a+Math.imul(_,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,J),i=(i=Math.imul(z,ee))+Math.imul(H,J)|0,a=Math.imul(H,ee),n=n+Math.imul(F,re)|0,i=(i=i+Math.imul(F,ne)|0)+Math.imul(j,re)|0,a=a+Math.imul(j,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(C,fe)|0,a=a+Math.imul(C,ce)|0,n=n+Math.imul(M,de)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(E,de)|0,a=a+Math.imul(E,le)|0;var Ie=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(S,pe)|0))<<13)|0;c=((a=a+Math.imul(S,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(z,re),i=(i=Math.imul(z,ne))+Math.imul(H,re)|0,a=Math.imul(H,ne),n=n+Math.imul(F,ae)|0,i=(i=i+Math.imul(F,oe)|0)+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(R,fe)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(C,de)|0,a=a+Math.imul(C,le)|0;var Ce=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(E,pe)|0))<<13)|0;c=((a=a+Math.imul(E,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,ae),i=(i=Math.imul(z,oe))+Math.imul(H,ae)|0,a=Math.imul(H,oe),n=n+Math.imul(F,fe)|0,i=(i=i+Math.imul(F,ce)|0)+Math.imul(j,fe)|0,a=a+Math.imul(j,ce)|0,n=n+Math.imul(T,de)|0,i=(i=i+Math.imul(T,le)|0)+Math.imul(R,de)|0,a=a+Math.imul(R,le)|0;var Oe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(C,pe)|0))<<13)|0;c=((a=a+Math.imul(C,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(z,fe),i=(i=Math.imul(z,ce))+Math.imul(H,fe)|0,a=Math.imul(H,ce),n=n+Math.imul(F,de)|0,i=(i=i+Math.imul(F,le)|0)+Math.imul(j,de)|0,a=a+Math.imul(j,le)|0;var Te=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(R,pe)|0))<<13)|0;c=((a=a+Math.imul(R,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(z,de),i=(i=Math.imul(z,le))+Math.imul(H,de)|0,a=Math.imul(H,le);var Re=(c+(n=n+Math.imul(F,pe)|0)|0)+((8191&(i=(i=i+Math.imul(F,be)|0)+Math.imul(j,pe)|0))<<13)|0;c=((a=a+Math.imul(j,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(n=Math.imul(z,pe))|0)+((8191&(i=(i=Math.imul(z,be))+Math.imul(H,pe)|0))<<13)|0;return c=((a=Math.imul(H,be))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,f[0]=ve,f[1]=me,f[2]=ge,f[3]=ye,f[4]=we,f[5]=_e,f[6]=xe,f[7]=ke,f[8]=Se,f[9]=Ae,f[10]=Me,f[11]=Ee,f[12]=Pe,f[13]=Ie,f[14]=Ce,f[15]=Oe,f[16]=Te,f[17]=Re,f[18]=Ne,0!==c&&(f[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=l),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?l(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var d=0|this.words[c];this.words[c]=u<<26-a|d>>>a,u=d&s}return f&&0!==u&&(f.words[f.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/o|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),f=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(d)),i.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(u),f.isub(d)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(f)):(r.isub(t),s.isub(i),f.isub(o))}return{a:s,b:f,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new x(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(g,m),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),f=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(f);)u.redIAdd(f);for(var d=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var b=h,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var c=t.words[n],u=f-1;u>=0;u--){var d=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,x),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,r(54)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Account:!0,Balance:!0,Wallet:!0,Claims:!0,AssetBalance:!0,Coin:!0,ClaimItem:!0};Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Balance",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Claims",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"AssetBalance",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"Coin",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"ClaimItem",{enumerable:!0,get:function(){return p.ClaimItem}}),t.default=void 0;var i=v(r(19));Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))});var a=v(r(25));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=v(r(47));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=v(r(83));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=b(r(23)),c=b(r(82)),u=b(r(74)),d=b(r(73)),l=b(r(44)),h=b(r(43)),p=r(34);function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var m={create:{account:function(e){return new f.default(e)},privateKey:i.generatePrivateKey,signature:i.generateSignature,wallet:function(e){return new u.default(e)}},is:{address:a.isAddress,publicKey:a.isPublicKey,encryptedKey:a.isNEP2,privateKey:a.isPrivateKey,wif:a.isWIF,scriptHash:a.isScriptHash},encrypt:{privateKey:o.encrypt},decrypt:{privateKey:o.decrypt},get:{privateKeyFromWIF:i.getPrivateKeyFromWIF,WIFFromPrivateKey:i.getWIFFromPrivateKey,publicKeyFromPrivateKey:i.getPublicKeyFromPrivateKey,scriptHashFromPublicKey:i.getScriptHashFromPublicKey,addressFromScriptHash:i.getAddressFromScriptHash,scriptHashFromAddress:i.getScriptHashFromAddress},sign:{message:s.signMessage},verify:{message:s.verifyMessage}};t.default=m},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.removeNetwork=t.addNetwork=t.timeout=t.defaultCalculationStrategy=t.httpsOnly=t.networks=void 0;var n=o(r(78)),i=o(r(38)),a=r(37);function o(e){return e&&e.__esModule?e:{default:e}}var s={};t.networks=s,Object.keys(n.default).map(function(e){s[e]=i.default.import(n.default[e])});t.httpsOnly=!1;var f=a.balancedApproach;t.defaultCalculationStrategy=f;t.timeout={ping:2e3,rpc:5e3};var c=function(e){return!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&s[e.name])&&(s[e.name]=e,!0)};t.addNetwork=c;var u=function(e){return!!s[e]&&(delete s[e],!0)};t.removeNetwork=u;var d={add:{network:function(e,t){return c(e,t)}},remove:{network:function(e){return u(e)}}};t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Transaction:!0,calculationStrategy:!0,TxAttrUsage:!0};Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"TxAttrUsage",{enumerable:!0,get:function(){return c.default}}),t.calculationStrategy=t.default=void 0;var i=d(r(81)),a=u(r(39));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=u(r(15));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=u(r(21));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=u(r(37));t.calculationStrategy=f;var c=d(r(40));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&h(i,r.prototype),i}).apply(null,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={create:{tx:function(){for(var e=arguments.length,t=new Array(e),r=0;r=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a65535)throw new Error;var t=(0,n.num2hexstring)(e.usage);return 129===e.usage?t+=(0,n.num2hexstring)(e.data.length/2):(144===e.usage||e.usage>=240)&&(t+=(0,n.num2VarInt)(e.data.length/2)),2===e.usage||3===e.usage?t+=e.data.substr(2,64):t+=e.data,t};t.deserializeTransactionAttribute=function(e){var t={usage:parseInt(e.read(1),16)};if(0===t.usage||48===t.usage||t.usage>=161&&t.usage<=175)t.data=e.read(32);else if(2===t.usage||3===t.usage)t.data=(0,n.num2hexstring)(t.usage)+e.read(32);else if(32===t.usage)t.data=e.read(20);else if(129===t.usage)t.data=e.read(parseInt(e.read(1),16));else{if(!(144===t.usage||t.usage>=240))throw new Error;t.data=e.readVarBytes()}return t};t.serializeWitness=function(e){var t=(0,n.num2VarInt)(e.invocationScript.length/2),r=(0,n.num2VarInt)(e.verificationScript.length/2);return t+e.invocationScript+r+e.verificationScript};t.deserializeWitness=function(e){return{invocationScript:e.readVarBytes(),verificationScript:e.readVarBytes()}}},function(e,t){e.exports=require("fs")},function(e,t,r){try{var n=r(14);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(122)}},function(e,t,r){"use strict";var n=t;n.base=r(124),n.short=r(123),n.mont=r(121),n.edwards=r(120)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRandomArray=t.generatePrivateKey=t.generateSignature=t.getScriptHashFromAddress=t.getAddressFromScriptHash=t.getScriptHashFromPublicKey=t.getVerificationScriptFromPublicKey=t.getPublicKeyFromPrivateKey=t.getWIFFromPrivateKey=t.getPrivateKeyFromWIF=t.getPublicKeyUnencoded=t.getPublicKeyEncoded=void 0;var n=c(r(131)),i=r(4),a=c(r(27)),o=r(0),s=r(2),f=c(r(102));function c(e){return e&&e.__esModule?e:{default:e}}var u=new i.ec("p256"),d=function(e){var t=(0,o.hexstring2ab)(e);return t[64]%2==1?"03"+(0,o.ab2hexstring)(t.slice(1,33)):"02"+(0,o.ab2hexstring)(t.slice(1,33))};t.getPublicKeyEncoded=d;t.getPublicKeyUnencoded=function(e){return u.keyFromPublic(e,"hex").getPublic().encode("hex")};t.getPrivateKeyFromWIF=function(e){return(0,o.ab2hexstring)(n.default.decode(e,128).privateKey)};t.getWIFFromPrivateKey=function(e){return n.default.encode(128,Buffer.from(e,"hex"),!0)};t.getPublicKeyFromPrivateKey=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=new i.ec("p256").keyFromPrivate(e,"hex").getPublic().encode("hex");return t?parseInt(r.substr(128,2),16)%2==1?"03"+r.substr(2,64):"02"+r.substr(2,64):r};var l=function(e){return"21"+e+"ac"};t.getVerificationScriptFromPublicKey=l;t.getScriptHashFromPublicKey=function(e){"04"===e.substring(0,2)&&(e=d(e));var t=l(e);return(0,o.reverseHex)((0,o.hash160)(t))};t.getAddressFromScriptHash=function(e){e=(0,o.reverseHex)(e);var t=(0,o.hash256)(s.ADDR_VERSION+e).substr(0,8);return a.default.encode(Buffer.from(s.ADDR_VERSION+e+t,"hex"))};t.getScriptHashFromAddress=function(e){var t=(0,o.ab2hexstring)(a.default.decode(e));return(0,o.reverseHex)(t.substr(2,40))};t.generateSignature=function(e,t){var r=(0,o.sha256)(e),n=Buffer.from(r,"hex"),a=new i.ec("p256").sign(n,t,null);return Buffer.concat([a.r.toArrayLike(Buffer,"be",32),a.s.toArrayLike(Buffer,"be",32)]).toString("hex")};t.generatePrivateKey=function(){return(0,o.ab2hexstring)((0,f.default)(32))};t.generateRandomArray=function(e){return(0,f.default)(e)}},function(e,t,r){e.exports=r(159)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExclusive=t.deserializeExclusive=t.serializeExclusive=void 0;var n=r(0),i=r(15),a={2:function(e){if(2!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.claims.length),r=!0,a=!1,o=void 0;try{for(var s,f=e.claims[Symbol.iterator]();!(r=(s=f.next()).done);r=!0){var c=s.value;t+=(0,i.serializeTransactionInput)(c)}}catch(e){a=!0,o=e}finally{try{r||null==f.return||f.return()}finally{if(a)throw o}}return t},128:function(e){if(128!==e.type)throw new Error;return""},209:function(e){if(209!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.script.length/2);return t+=e.script,e.version>=1&&(t+=(0,n.num2fixed8)(e.gas)),t}};t.serializeExclusive=a;var o={2:function(e){for(var t={claims:[]},r=e.readVarInt(),n=0;n=1?(0,n.fixed82num)(e.read(8)):0}}};t.deserializeExclusive=o;var s={2:function(e){return Object.assign({claims:[]},{claims:e.claims})},128:function(e){return{}},209:function(e){return{script:e.script||"",gas:e.gas||0}}};t.getExclusive=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={OpCode:!0,ScriptBuilder:!0,ContractParam:!0};Object.defineProperty(t,"OpCode",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ScriptBuilder",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ContractParam",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(42)),a=f(r(41)),o=f(r(80)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(79));function f(e){return e&&e.__esModule?e:{default:e}}function c(e,t,r){return(c="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&u(i,r.prototype),i}).apply(null,arguments)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var d={create:{contractParam:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0])return this.publicKey;var e=this.publicKey;return n.getPublicKeyUnencoded(e)}},{key:"encrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._encrypted=(0,a.encrypt)(this.privateKey,e,t),this}},{key:"decrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._WIF=(0,a.decrypt)(this.encrypted,e,t),this._updateContractScript(),this}},{key:"export",value:function(){var e=null;if(this._privateKey&&!this._encrypted)throw new Error("Encrypt private key first!");return this._encrypted&&(e=this._encrypted),{address:this.address,label:this.label,isDefault:this.isDefault,lock:this.lock,key:e,contract:this.contract,extra:this.extra}}},{key:Symbol.toStringTag,get:function(){return"Account"}},{key:"encrypted",get:function(){if(this._encrypted)return this._encrypted;throw new Error("No encrypted key found")}},{key:"WIF",get:function(){return this._WIF?this._WIF:(this._WIF=n.getWIFFromPrivateKey(this._privateKey),this._WIF)}},{key:"privateKey",get:function(){if(this._privateKey)return this._privateKey;if(this._WIF)return this._privateKey=n.getPrivateKeyFromWIF(this._WIF),this._privateKey;throw this._encrypted?new ReferenceError("Private Key encrypted!"):new ReferenceError("No Private Key provided!")}},{key:"publicKey",get:function(){return this._publicKey?this._publicKey:(this._publicKey=n.getPublicKeyFromPrivateKey(this.privateKey),this._publicKey)}},{key:"scriptHash",get:function(){return this._scriptHash?this._scriptHash:this._address?(this._scriptHash=n.getScriptHashFromAddress(this.address),this._scriptHash):(this._scriptHash=n.getScriptHashFromPublicKey(this.publicKey),this._scriptHash)}},{key:"address",get:function(){return this._address?this._address:(this._address=n.getAddressFromScriptHash(this.scriptHash),this._address)}}])&&u(t.prototype,r),f&&u(t,f),e}();t.default=l},function(e,t,r){var n;e.exports=(n=r(3),r(46),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=t.enc,f=(s.Utf8,s.Base64),c=t.algo,u=c.EvpKDF,d=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:w}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),l=(r.StreamCipher=d.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),h=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=l.CBC=function(){var t=h.extend();function r(t,r,n){var i=this._iv;if(i){var a=i;this._iv=e}else var a=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(r.BlockCipher=d.extend({cfg:d.cfg.extend({mode:p,padding:v}),reset:function(){d.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=t.format={},y=g.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else var n=t;return n.toString(f)},parse:function(e){var t=f.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return m.create({ciphertext:t,salt:n})}},w=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=t.kdf={},x=_.OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=u.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},k=r.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:x}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=w.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);n.iv=i.iv;var a=w.decrypt.call(this,e,t,i.key,n);return a}})}()))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=t.isScriptHash=t.isPublicKey=t.isPrivateKey=t.isWIF=t.isNEP2=void 0;var n,i=(n=r(27))&&n.__esModule?n:{default:n},a=r(0),o=r(19);t.isNEP2=function(e){try{if(58!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return!!t&&86===t.length&&"01"===t.substr(0,2)&&"42"===t.substr(2,2)&&"e0"===t.substr(4,2)}catch(e){return!1}};t.isWIF=function(e){try{if(52!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return(0,a.hash256)(t.substr(0,t.length-8)).substr(0,8)===t.substr(t.length-8,8)}catch(e){return!1}};t.isPrivateKey=function(e){return/^[0-9A-Fa-f]{64}$/.test(e)};t.isPublicKey=function(e,t){try{var r;switch(e.substr(0,2)){case"04":if(!0===t)return!1;r=(0,o.getPublicKeyEncoded)(e);break;case"02":case"03":if(!1===t)return!1;r=e;break;default:return!1}var n=(0,o.getPublicKeyUnencoded)(r),i=parseInt(n.substr(n.length-2,2),16);if("02"===r.substr(0,2)&&i%2==0)return!0;if("03"===r.substr(0,2)&&i%2==1)return!0}catch(e){}return!1};t.isScriptHash=function(e){return(0,a.isHex)(e)&&40===e.length};t.isAddress=function(e){try{var t=(0,a.ab2hexstring)(i.default.decode(e));if((0,a.hash256)(t.slice(0,42)).substr(0,8)!==t.substr(42,8))return!1;var r=(0,a.reverseHex)(t.slice(2,42));return(0,o.getAddressFromScriptHash)(r)===e}catch(e){return!1}}},function(e,t,r){var n=t;n.utils=r(6),n.common=r(13),n.sha=r(118),n.ripemd=r(114),n.hmac=r(113),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){var n=r(128);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t){e.exports=require("crypto")},function(e,t,r){"use strict";var n=r(67);e.exports=function(e,t,r,i,a){var o=new Error(e);return n(o,t,r,i,a)}},function(e,t,r){"use strict";var n=r(5),i=r(156),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,f={adapter:("undefined"!=typeof XMLHttpRequest?s=r(155):"undefined"!=typeof process&&(s=r(150)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){f.headers[e]={}}),n.forEach(["post","put","patch"],function(e){f.headers[e]=n.merge(a)}),e.exports=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doSendAsset=t.doMintTokens=t.doClaimAllGas=t.getWalletDBHeight=t.getTransactionHistory=t.getRPCEndpoint=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getAPIEndpoint=t.name=void 0;var n=u(r(20)),i=r(8),a=r(11),o=r(12),s=r(2),f=r(0),c=r(10);function u(e){return e&&e.__esModule?e:{default:e}}var d=(0,u(r(1)).default)("api");t.name="neonDB";var l=null,h=function(e){return c.networks[e]?c.networks[e].extra.neonDB:e};t.getAPIEndpoint=h;var p=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/balance/"+t).then(function(r){var n=new i.Balance({net:e,address:r.data.address});return Object.keys(r.data).map(function(e){"net"!==e&&"address"!==e&&n.addAsset(e,r.data[e])}),d.info("Retrieved Balance for ".concat(t," from neonDB ").concat(e)),n})};t.getBalance=p;var b=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){var n=r.data;return n.claims=n.claims.map(function(e){return{claim:new f.Fixed8(e.claim).div(1e8),index:e.index,txid:e.txid,start:new f.Fixed8(e.start),end:new f.Fixed8(e.end),value:e.value}}),d.info("Retrieved Claims for ".concat(t," from neonDB ").concat(e)),new i.Claims(n)})};t.getClaims=b;t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){return d.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neonDB ").concat(e)),new f.Fixed8(r.data.total_claim+r.data.total_unspent_claim).div(1e8)})};var v=function e(t){var r=h(t);return n.default.get(r+"/v2/network/nodes").then(function(r){var n=r.data.nodes.filter(function(e){return e.status}),i=0,a=[],s=!0,f=!1,u=void 0;try{for(var d,h=n[Symbol.iterator]();!(s=(d=h.next()).done);s=!0){var p=d.value;c.httpsOnly&&!p.url.includes("https://")||(p.block_height>i?(i=p.block_height,a=[p]):p.block_height===i&&a.push(p))}}catch(e){f=!0,u=e}finally{try{s||null==h.return||h.return()}finally{if(f)throw u}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(l))return new o.RPCClient(l).ping().then(function(r){return r<=c.timeout.ping?l:(l=null,e(t))});var v=b.map(function(e){return new o.RPCClient(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return l=e,e})};t.getRPCEndpoint=v;t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/history/"+t).then(function(r){return d.info("Retrieved History for ".concat(t," from neonDB ").concat(e)),r.data.history.map(function(e){return{change:{NEO:new f.Fixed8(e.NEO||0),GAS:new f.Fixed8(e.GAS||0)},blockHeight:new f.Fixed8(e.block_index),txid:e.txid}})})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v2/block/height").then(function(e){return parseInt(e.data.block_height)})};t.doClaimAllGas=function(e,t,r){d.warn("doClaimAllGas will be deprecated in favor of claimGas");var n,s,f=new i.Account(t),c=v(e),u=b(e,f.address);return Promise.all([c,u]).then(function(e){s=e[0];var t=e[1];if(0===t.length)throw new Error("No claimable gas!");var n=a.Transaction.createClaimTx(f.publicKey,t);return r?r(n,f.publicKey):n.sign(f.privateKey)}).then(function(e){return n=e,o.Query.sendRawTransaction(n).execute(s)}).then(function(e){return!0===e.result?e.txid=n:d.error("Transaction failed: ".concat(n.serialize())),e})};t.doMintTokens=function(e,t,r,n,c,u){d.warn("doMintTokens will be deprecated in favor of doInvoke");var l,h,b=new i.Account(r),m=[{assetId:s.ASSET_ID.NEO,value:n,scriptHash:t}],g={operation:"mintTokens",scriptHash:t,args:[]},y=v(e),w=p(e,b.address);return Promise.all([y,w]).then(function(e){h=e[0];var r=e[1],n=[{data:(0,f.reverseHex)(t),usage:a.TxAttrUsage.Script}],i=a.Transaction.createInvocationTx(r,m,g,c,{attributes:n});return u?u(i,b.publicKey):i.sign(b.privateKey)}).then(function(e){return l=e,o.Query.getContractState(t).execute(h)}).then(function(e){var t={invocationScript:"0000",verificationScript:e.result.script};return l.scripts.unshift(t),o.Query.sendRawTransaction(l).execute(h)}).then(function(e){return!0===e.result?e.txid=l.hash:d.error("Transaction failed: ".concat(l.serialize())),e})};t.doSendAsset=function(e,t,r,n,f){d.warn("doSendAsset will be deprecated in favor of sendAsset");var c,u,l=new i.Account(r),h=new i.Account(t),b=v(e),m=p(e,l.address),g=Object.keys(n).map(function(e){return{assetId:s.ASSET_ID[e],value:n[e],scriptHash:h.scriptHash}});return Promise.all([b,m]).then(function(e){u=e[0];var t=e[1],r=a.Transaction.createContractTx(t,g);return f?f(r,l.publicKey):r.sign(l.privateKey)}).then(function(e){return c=e,o.Query.sendRawTransaction(c).execute(u)}).then(function(e){return!0===e.result?e.txid=c.hash:d.error("Transaction failed: ".concat(c.serialize())),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadBalance=t.setSwitchFreeze=t.setApiSwitch=void 0;var n,i=o(r(31)),a=o(r(33));function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var s=(0,((n=r(1))&&n.__esModule?n:{default:n}).default)("api"),f=0,c=!1;t.setApiSwitch=function(e){e>=0&&e<=1&&(f=e)};t.setSwitchFreeze=function(e){c=!!e,s.info("core/setSwitchFreeze API switch is frozen: ".concat(c))};var u=function(){!c&&f>0&&(f-=.2,s.info("core API Switch increasing weight towards neoscan"))},d=function(){!c&&f<1&&(f+=.2,s.info("core API Switch increasing weight towards neonDB"))};t.loadBalance=function(e,t){return Math.random()>f?e(t,a).then(function(e){return u(),e}).catch(function(){return d(),e(t,i)}):e(t,i).then(function(e){return d(),e}).catch(function(){return u(),e(t,a)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHistory=t.getWalletDBHeight=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getRPCEndpoint=t.getAPIEndpoint=t.name=void 0;var n=u(r(20)),i=r(8),a=r(2),o=r(0),s=r(10),f=u(r(1)),c=u(r(36));function u(e){return e&&e.__esModule?e:{default:e}}var d=(0,f.default)("api");t.name="neoscan";var l=null,h=function(e){return s.networks[e]?s.networks[e].extra.neoscan:e};t.getAPIEndpoint=h;t.getRPCEndpoint=function e(t){var r=h(t);return n.default.get(r+"/v1/get_all_nodes").then(function(r){var n=r.data,i=0,a=[],o=!0,f=!1,u=void 0;try{for(var d,h=n[Symbol.iterator]();!(o=(d=h.next()).done);o=!0){var p=d.value;s.httpsOnly&&!p.url.includes("https://")||(p.height>i?(i=p.height,a=[p]):p.height===i&&a.push(p))}}catch(e){f=!0,u=e}finally{try{o||null==h.return||h.return()}finally{if(f)throw u}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(l))return new c.default(l).ping().then(function(r){return r<=s.timeout.ping?l:(l=null,e(t))});var v=b.map(function(e){return new c.default(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return l=e,e})};t.getBalance=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_balance/"+t).then(function(r){if(r.data.address!==t&&null===r.data.balance)return new i.Balance({address:r.data.address});var n=new i.Balance({address:r.data.address,net:e});return r.data.balance.map(function(e){n.addAsset(e.asset,{balance:e.amount,unspent:p(e.unspent)})}),d.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),n})};t.getClaims=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_claimable/"+t).then(function(r){if(r.address!==t&&null===r.data.claimable)return new i.Claims({address:r.data.address});var n=b(r.data.claimable);return d.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),new i.Claims({net:e,address:r.data.address,claims:n})})};t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_unclaimed/"+t).then(function(r){return d.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neoscan ").concat(e)),new o.Fixed8(r.data.unclaimed||0)})};var p=function(e){return e.map(function(e){return{index:e.n,txid:e.txid,value:e.value}})},b=function(e){return e.map(function(e){return{start:new o.Fixed8(e.start_height),end:new o.Fixed8(e.end_height),index:e.n,claim:new o.Fixed8(e.unclaimed),txid:e.txid,value:e.value}})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v1/get_height").then(function(e){return parseInt(e.data.height)})};t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_address_neon/"+t).then(function(r){return d.info("Retrieved History for ".concat(t," from neoscan ").concat(e)),v(r.data.txids)})};var v=function(e){var t=[],r=e.length-1;return e.forEach(function(n,i){var s,f,c,u;if(i!==r){var d=e[i+1],l=m(n.balance),h=m(d.balance);s={NEO:new o.Fixed8(l.NEO||0).minus(h.NEO||0),GAS:new o.Fixed8(l.GAS||0).minus(h.GAS||0)}}else{var p=n.asset_moved===a.ASSET_ID.NEO?"NEO":"GAS";f={},c=p,u=new o.Fixed8(n.amount_moved),c in f?Object.defineProperty(f,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):f[c]=u,s=f}t.push({txid:n.txid,blockHeight:n.block_height,change:s})}),t},m=function(e){return e.reduce(function(e,t){return e[t.asset]=new o.Fixed8(t.amount),e},{})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportClaimItem=t.ClaimItem=void 0;var n=r(0);t.ClaimItem=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{claim:e.claim?new n.Fixed8(e.claim):new n.Fixed8(0),txid:e.txid||"",index:e.index||0,value:e.value||0,start:e.start?new n.Fixed8(e.start):null,end:e.end?new n.Fixed8(e.end):null}};t.exportClaimItem=function(e){return{claim:e.claim.toNumber(),txid:e.txid,index:e.index,value:e.value,start:e.start?e.start.toNumber():null,end:e.end?e.end.toNumber():null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryRPC=t.default=void 0;var n=f(r(20)),i=r(11),a=r(2),o=f(r(1)),s=r(10);function f(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(this.completed)throw new Error("This request has been sent");return h(e,this.req,r).then(function(e){if(t.res=e,t.completed=!0,e.error)throw new Error(e.error.message);return t.parse?(d.info("Query[".concat(t.req.method,"] successful")),t.parse(e)):e})}},{key:Symbol.toStringTag,get:function(){return"Query"}}],n=[{key:"getAccountState",value:function(t){return new e({method:"getaccountstate",params:[t]})}},{key:"getAssetState",value:function(t){return new e({method:"getassetstate",params:[t]})}},{key:"getBlock",value:function(t){return new e({method:"getblock",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getBlockHash",value:function(t){return new e({method:"getblockhash",params:[t]})}},{key:"getBestBlockHash",value:function(){return new e({method:"getbestblockhash"})}},{key:"getBlockCount",value:function(){return new e({method:"getblockcount"})}},{key:"getBlockSysFee",value:function(t){return new e({method:"getblocksysfee",params:[t]})}},{key:"getConnectionCount",value:function(){return new e({method:"getconnectioncount"})}},{key:"getContractState",value:function(t){return new e({method:"getcontractstate",params:[t]})}},{key:"getPeers",value:function(){return new e({method:"getpeers"})}},{key:"getRawMemPool",value:function(){return new e({method:"getrawmempool"})}},{key:"getRawTransaction",value:function(t){return new e({method:"getrawtransaction",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getStorage",value:function(t,r){return new e({method:"getstorage",params:[t,r]})}},{key:"getTxOut",value:function(t,r){return new e({method:"gettxout",params:[t,r]})}},{key:"getVersion",value:function(){return new e({method:"getversion"})}},{key:"invoke",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2?n-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:{},i=n.default.create({headers:{"Content-Type":"application/json"},timeout:s.timeout.rpc}),o=Object.assign({},a.DEFAULT_REQ,t);return i.post(e,o,r).then(function(e){return e.data})};t.queryRPC=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=c(r(35)),i=r(8),a=c(r(76)),o=r(2),s=c(r(1)),f=r(10);function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:o.RPC_VERSION;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t===o.NEO_NETWORK.MAIN?this.net=o.DEFAULT_RPC.MAIN:t===o.NEO_NETWORK.TEST?this.net=o.DEFAULT_RPC.TEST:this.net=t,this.history=[],this.lastSeenHeight=0,this._latencies=[],this.version="",!a.default.valid(r))throw new Error("Invalid Version: ".concat(r));this.version=a.default.clean(r)}var t,r,s;return t=e,(r=[{key:"ping",value:function(){var e=this,t=Date.now(),r=n.default.getBlockCount();return this.execute(r,{timeout:f.timeout.ping}).then(function(r){e.lastSeenHeight=r.result;var n=Date.now()-t;return e.latency=n,n}).catch(function(t){return e.latency=f.timeout.ping,f.timeout.ping})}},{key:"execute",value:function(e,t){return this.history.push(e),d.info("RPC: ".concat(this.net," executing Query[").concat(e.req.method,"]")),e.execute(this.net,t)}},{key:"query",value:function(e,t){var r=new n.default(e);return this.execute(r,t)}},{key:"getAccountState",value:function(e){if(!(0,i.isAddress)(e))throw new Error("Invalid address given: ".concat(e));return this.execute(n.default.getAccountState(e)).then(function(e){return e.result})}},{key:"getAssetState",value:function(e){return this.execute(n.default.getAssetState(e)).then(function(e){return e.result})}},{key:"getBlock",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getBlock(e,t)).then(function(e){return e.result})}},{key:"getBlockHash",value:function(e){return this.execute(n.default.getBlockHash(e)).then(function(e){return e.result})}},{key:"getBestBlockHash",value:function(){return this.execute(n.default.getBestBlockHash()).then(function(e){return e.result})}},{key:"getBlockCount",value:function(){return this.execute(n.default.getBlockCount()).then(function(e){return e.result})}},{key:"getBlockSysFee",value:function(e){return this.execute(n.default.getBlockSysFee(e)).then(function(e){return e.result})}},{key:"getConnectionCount",value:function(){return this.execute(n.default.getConnectionCount()).then(function(e){return e.result})}},{key:"getContractState",value:function(e){return this.execute(n.default.getContractState(e)).then(function(e){return e.result})}},{key:"getPeers",value:function(){return this.execute(n.default.getPeers()).then(function(e){return e.result})}},{key:"getRawMemPool",value:function(){return this.execute(n.default.getRawMemPool()).then(function(e){return e.result})}},{key:"getRawTransaction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getRawTransaction(e,t)).then(function(e){return e.result})}},{key:"getStorage",value:function(e,t){return this.execute(n.default.getStorage(e,t)).then(function(e){return e.result})}},{key:"getTxOut",value:function(e,t){return this.execute(n.default.getTxOut(e,t)).then(function(e){return e.result})}},{key:"getVersion",value:function(){var e=this;return this.execute(n.default.getVersion()).then(function(t){var r=t.result.useragent.match(l)[1];return e.version=a.default.clean(r),e.version}).catch(function(t){if(t.message.includes("Method not found"))return e.version=o.RPC_VERSION,e.version;throw t})}},{key:"invoke",value:function(e,t){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invoke(e,t)).then(function(e){return e.result})}},{key:"invokeFunction",value:function(e,t,r){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeFunction(e,t,r)).then(function(e){return e.result})}},{key:"invokeScript",value:function(e){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeScript(e)).then(function(e){return e.result})}},{key:"sendRawTransaction",value:function(e){return this.execute(n.default.sendRawTransaction(e)).then(function(e){return e.result})}},{key:"submitBlock",value:function(e){return this.execute(n.default.submitBlock(e)).then(function(e){return e.result})}},{key:"validateAddress",value:function(e){return this.execute(n.default.validateAddress(e)).then(function(e){return e.result.isvalid})}},{key:Symbol.toStringTag,get:function(){return"RPC Client"}},{key:"latency",get:function(){return 0===this._latencies.length?99999:Math.floor(this._latencies.reduce(function(e,t){return e+t},0)/this._latencies.length)},set:function(e){this._latencies.length>4&&this._latencies.shift(),this._latencies.push(e)}}])&&u(t.prototype,r),s&&u(t,s),e}();t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.balancedApproach=t.biggestFirst=t.smallestFirst=void 0;var n=r(0);t.smallestFirst=function(e,t){return e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()}),i(t,e.unspent)};t.biggestFirst=function(e,t){return e.unspent.sort(function(e,t){return t.value.sub(e.value).toNumber()}),i(t,e.unspent)};t.balancedApproach=function(e,t){e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()});var r=e.unspent.filter(function(e){return e.value.lte(t)});if(0===r.length)return[e.unspent[0]];var n=r.findIndex(function(e){return t.eq(e.value)});if(n>=0)return[r[n]];var a=e.unspent.slice(r.length),o=[];r.length>0&&o.push(r.pop());var s=t.minus(o.length>0?o[0].value:0),f=i(s,r.concat(a));return o.concat(f)};var i=function(e,t){for(var r=0,i=new n.Fixed8(0);i.lt(e);){if((r+=1)>t.length)throw new Error("Insufficient assets! Reached end of unspent coins! ".concat(t.length));i=i.add(t[r-1].value)}return t.slice(0,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(77)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.Name||t.name||r||"RandomNet",r&&(this.name=r);var i=t.protocol||t.ProtocolConfiguration||{};this.protocol=new n.default(i),this.nodes=t.Nodes||t.nodes||[],this.extra=t.ExtraConfiguration||t.extra||{}}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new e("string"==typeof jsonString?JSON.parse(t):t,r)}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing Network file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"export",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?JSON.stringify({ProtocolConfiguration:this.protocol.export()}):{Name:this.name,ProtocolConfiguration:this.protocol.export(),ExtraConfiguration:this.extra,Nodes:this.nodes}}},{key:"writeFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.default.writeFile(e,this.export(t),function(e){if(e)throw e;return s.info("Network file written!"),!0})}},{key:"update",value:function(){return this}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHash=t.signTransaction=t.deserializeTransaction=t.serializeTransaction=t.calculateInputs=void 0;var n,i=r(0),a=r(8),o=r(21),s=r(2),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(15)),c=r(10);var u=(0,((n=r(1))&&n.__esModule?n:{default:n}).default)("tx");t.calculateInputs=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===t&&(t=[]),null===n&&(n=c.defaultCalculationStrategy);var o=t.reduce(function(e,t){return e[t.assetId]?e[t.assetId]=e[t.assetId].add(t.value):e[t.assetId]=t.value,e},{});return(r=new i.Fixed8(r)).gt(0)&&(o[s.ASSET_ID.GAS]?o[s.ASSET_ID.GAS]=o[s.ASSET_ID.GAS].add(r):o[s.ASSET_ID.GAS]=r),Object.keys(o).map(function(t){var r=o[t],i=s.ASSETS[t];if(-1===e.assetSymbols.indexOf(i))throw new Error("This balance does not contain any ".concat(i,"!"));var f=e.assets[i];if(f.balance.lt(r))throw new Error("Insufficient ".concat(s.ASSETS[t],"! Need ").concat(r.toString()," but only found ").concat(f.balance.toString()));return d((0,a.AssetBalance)(f),r,t,e.address,n)}).reduce(function(e,t){return{inputs:e.inputs.concat(t.inputs),change:e.change.concat(t.change)}},{inputs:[],change:[]})};var d=function(e,t,r,n,o){var s=o(e,t),f=s.reduce(function(e,t){return e.add(t.value)},new i.Fixed8(0)),c=[];return f.gt(t)&&c.push({assetId:r,value:f.sub(t),scriptHash:(0,a.getScriptHashFromAddress)(n)}),{inputs:s.map(function(e){return{prevHash:e.txid,prevIndex:e.index}}),change:c}},l=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";r+=(0,i.num2hexstring)(e.type),r+=(0,i.num2hexstring)(e.version),r+=o.serializeExclusive[e.type](e),r+=(0,i.num2VarInt)(e.attributes.length);var n=!0,a=!1,s=void 0;try{for(var c,u=e.attributes[Symbol.iterator]();!(n=(c=u.next()).done);n=!0){var d=c.value;r+=f.serializeTransactionAttribute(d)}}catch(e){a=!0,s=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw s}}r+=(0,i.num2VarInt)(e.inputs.length);var l=!0,h=!1,p=void 0;try{for(var b,v=e.inputs[Symbol.iterator]();!(l=(b=v.next()).done);l=!0){var m=b.value;r+=f.serializeTransactionInput(m)}}catch(e){h=!0,p=e}finally{try{l||null==v.return||v.return()}finally{if(h)throw p}}r+=(0,i.num2VarInt)(e.outputs.length);var g=!0,y=!1,w=void 0;try{for(var _,x=e.outputs[Symbol.iterator]();!(g=(_=x.next()).done);g=!0){var k=_.value;r+=f.serializeTransactionOutput(k)}}catch(e){y=!0,w=e}finally{try{g||null==x.return||x.return()}finally{if(y)throw w}}if(t&&e.scripts&&e.scripts.length>0){r+=(0,i.num2VarInt)(e.scripts.length);var S=!0,A=!1,M=void 0;try{for(var E,P=e.scripts[Symbol.iterator]();!(S=(E=P.next()).done);S=!0){var I=E.value;r+=f.serializeWitness(I)}}catch(e){A=!0,M=e}finally{try{S||null==P.return||P.return()}finally{if(A)throw M}}}return r};t.serializeTransaction=l;t.deserializeTransaction=function(e){var t=new i.StringStream(e),r={};r.type=parseInt(t.read(1),16),r.version=parseInt(t.read(1),16);var n=o.deserializeExclusive[r.type](t);r.attributes=[],r.inputs=[],r.outputs=[],r.scripts=[];for(var a=t.readVarInt(),s=0;s1&&void 0!==arguments[1]&&arguments[1];if((0,i.ensureHex)(e),40!==e.length)throw new Error("ScriptHash should be 20 bytes long!");return this.emit(t?a.default.TAILCALL:a.default.APPCALL,(0,i.reverseHex)(e))}},{key:"_emitArray",value:function(e){for(var t=e.length-1;t>=0;t--)this.emitPush(e[t]);return this.emitPush(e.length).emit(a.default.PACK)}},{key:"_emitString",value:function(e){(0,i.ensureHex)(e);var t=e.length/2;if(t<=a.default.PUSHBYTES75)this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<256)this.emit(a.default.PUSHDATA1),this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<65536)this.emit(a.default.PUSHDATA2),this.str+=(0,i.num2hexstring)(t,2,!0),this.str+=e;else{if(!(t<4294967296))throw new Error("String too big to emit!");this.emit(a.default.PUSHDATA4),this.str+=(0,i.num2hexstring)(t,4,!0),this.str+=e}return this}},{key:"_emitNum",value:function(e){if(-1===e)return this.emit(a.default.PUSHM1);if(0===e)return this.emit(a.default.PUSH0);if(e>0&&e<=16)return this.emit(a.default.PUSH1-1+e);var t=(0,i.int2hex)(e);return this.emitPush((0,i.reverseHex)("0".repeat(16-t.length)+t))}},{key:"_emitParam",value:function(e){if(!e.type)throw new Error("No type available!");if(!l(e.value))throw new Error("Invalid value provided!");switch(e.type){case"String":return this._emitString((0,i.str2hexstring)(e.value));case"Boolean":return this.emit(e.value?a.default.PUSHT:a.default.PUSHF);case"Integer":return this._emitNum(e.value);case"ByteArray":return this._emitString(e.value);case"Array":return this._emitArray(e.value);case"Hash160":return this._emitString((0,i.reverseHex)(e.value))}}},{key:"emit",value:function(e,t){return this.str+=(0,i.num2hexstring)(e),t&&(this.str+=t),this}},{key:"emitAppCall",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.emitPush(r),t){for(var a="",o=0;o=81&&n<=96:t.args.unshift(n-80);break;case 193===n:for(var a=t.args.shift(),o=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index||0,txid:e.txid||"",value:e.value?new n.Fixed8(e.value):new n.Fixed8(0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(0),a=(n=r(43))&&n.__esModule?n:{default:n};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.balance,r=e.unspent,n=e.spent,o=e.unconfirmed;return{balance:t?new i.Fixed8(t):new i.Fixed8(0),unspent:r?r.map(function(e){return(0,a.default)(e)}):[],spent:n?n.map(function(e){return(0,a.default)(e)}):[],unconfirmed:o?o.map(function(e){return(0,a.default)(e)}):[]}}},function(e,t){function r(e){return"function"==typeof e?Buffer("","utf8"):e instanceof Buffer?e:"string"==typeof e?new Buffer(e,"utf8"):new Buffer(String(e||""),"utf8")}function n(e){return"number"!=typeof e?null:(e=Math.round(e))<1?null:e>256?null:e}e.exports=function(e,t,i,a){return{password:r(e),salt:r(t),options:function(e){return{maxmem:function(e){if("number"!=typeof e)return null;for(var t=4;t<=2048;t*=2){var r=1048576*t;if(r>e)return null;if(r==e)return r}return null}((e=null!==e&&"object"==typeof e?e:{}).maxmem)||33554432,cost:function(e){if("number"!=typeof e)return null;for(var t=8;t<=64;t++){var r=Math.pow(2,t);if(r>e)return null;if(r==e)return r}return null}(e.cost)||Math.pow(2,14),blockSize:n(e.blockSize)||8,parallel:n(e.parallel)||1,size:(t=e.size,("number"!=typeof t?null:(t=Math.round(t))<1?null:t>2048?null:t)||64)};var t}(i),callback:function(e){return"function"==typeof e?e:null}(arguments[arguments.length-1])}}},function(e,t,r){var n,i,a,o,s,f,c,u;e.exports=(n=r(3),r(97),r(96),a=(i=n).lib,o=a.Base,s=a.WordArray,f=i.algo,c=f.MD5,u=f.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:c,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=s.create(),a=i.words,o=r.keySize,f=r.iterations;a.length2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by encryptAsync in the next major version bump");var i={cost:(r=w(r)).n,blockSize:r.r,parallel:r.p},a=new l.default(e),f=(0,o.default)((0,o.default)(m.Latin1.parse(a.address))).toString().slice(0,8),c=u.default.hashSync(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(f,"hex"),i).toString("hex"),d=c.slice(0,64),b=c.slice(64),v=(0,h.hexXor)(a.privateKey,d),_=s.default.encrypt(m.Hex.parse(v),m.Hex.parse(b),g),x=p.NEP_HEADER+p.NEP_FLAG+f+_.ciphertext.toString(),k=n.default.encode(Buffer.from(x,"hex"));return y.info("Successfully encrypted key to ".concat(k)),k};t.encryptAsync=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to encrypt in the next major version bump"),new Promise(function(i,a){var f=r=w(r),c=f.n,u=f.r,b=f.p,v=new l.default(e),_=(0,o.default)((0,o.default)(m.Latin1.parse(v.address))).toString().slice(0,8);(0,d.default)(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(_,"hex"),c,u,b,64,function(e,t,r){if(null!=e)a(e);else if(r){var o=Buffer.from(r).toString("hex"),f=o.slice(0,64),c=o.slice(64),u=(0,h.hexXor)(v.privateKey,f),d=s.default.encrypt(m.Hex.parse(u),m.Hex.parse(c),g),l=p.NEP_HEADER+p.NEP_FLAG+_+d.ciphertext.toString(),b=n.default.encode(Buffer.from(l,"hex"));y.info("Successfully encrypted key to ".concat(b)),i(b)}})})};t.decrypt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by decryptAsync in the next major version bump");var i={cost:(r=w(r)).n,blockSize:r.r,parallel:r.p},a=(0,h.ab2hexstring)(n.default.decode(e)),f=a.substr(6,8),c=a.substr(-64),d=u.default.hashSync(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(f,"hex"),i).toString("hex"),b=d.slice(0,64),v=d.slice(64),_={ciphertext:m.Hex.parse(c),salt:""},x=s.default.decrypt(_,m.Hex.parse(v),g),k=(0,h.hexXor)(x.toString(),b),S=new l.default(k);if(f!==(0,o.default)((0,o.default)(m.Latin1.parse(S.address))).toString().slice(0,8))throw new Error("Wrong Password!");return y.info("Successfully decrypted ".concat(e)),S.WIF};t.decryptAsync=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to decrypt in the next major version bump"),new Promise(function(i,a){var f=r=w(r),c=f.n,u=f.r,p=f.p,b=(0,h.ab2hexstring)(n.default.decode(e)),v=b.substr(6,8),_=b.substr(-64);(0,d.default)(Buffer.from(t.normalize("NFC"),"utf8"),Buffer.from(v,"hex"),c,u,p,64,function(t,r,n){if(null!=t)a(t);else if(n){var f=Buffer.from(n).toString("hex"),c=f.slice(0,64),u=f.slice(64),d={ciphertext:m.Hex.parse(_),salt:""},p=s.default.decrypt(d,m.Hex.parse(u),g),b=(0,h.hexXor)(p.toString(),c),w=new l.default(b),x=(0,o.default)((0,o.default)(m.Latin1.parse(w.address))).toString().slice(0,8);v!==x&&a(new Error("Wrong Password or scrypt parameters!")),y.info("Successfully decrypted ".concat(e)),i(w.WIF)}})})};var w=function(e){var t=Object.assign({},p.DEFAULT_SCRYPT,e);return{n:t.n||t.cost,r:t.r||t.blockSize,p:t.p||t.parallel}}},function(e,t,r){var n;e.exports=(n=r(3),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],f=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),f[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],u=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],u=r[5],d=r[6],l=r[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[h-2],m=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[h]=b+c[h-7]+m+c[h-16]}var g=n&i^n&a^i&a,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=l+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&d)+f[h]+c[h];l=d,d=u,u=s,s=o+w|0,o=a,a=i,i=n,n=w+(y+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+u|0,r[6]=r[6]+d|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(u),t.HmacSHA256=a._createHmacHelper(u)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(3),n.enc.Hex)},function(e,t,r){"use strict";var n=r(6),i=r(13),a=r(9),o=n.rotr64_hi,s=n.rotr64_lo,f=n.shr64_hi,c=n.shr64_lo,u=n.sum64,d=n.sum64_hi,l=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,v=n.sum64_5_lo,m=i.BlockHash,g=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function x(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function S(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=o(e,t,1)^o(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function C(e,t){var r=o(e,t,19)^o(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&i;a?r.push(a,o):r.push(o)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=require("buffer")},function(e,t,r){var n=r(55),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";var n=r(130),i=r(129);e.exports=i(function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()})},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){e.exports=require("os")},function(e,t,r){function n(e){var r;function n(){if(n.enabled){var e=n,i=+new Date,a=i-(r||i);e.diff=a,e.prev=r,e.curr=i,r=i;for(var o=new Array(arguments.length),s=0;s=300&&e.statusCode<400){if(++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new Error("Max redirects exceeded."));var r,i=this._options.headers;if(307!==e.statusCode&&!(this._options.method in c))for(r in this._options.method="GET",this._requestBodyBuffers=[],i)/^content-/i.test(r)&&delete i[r];if(!this._isRedirect)for(r in i)/^host$/i.test(r)&&delete i[r];var a=n.resolve(this._currentUrl,t);f("redirecting to",a),Object.assign(this._options,n.parse(a)),this._isRedirect=!0,this._performRequest()}else e.responseUrl=this._currentUrl,this.emit("response",e),this._requestBodyBuffers=[]},e.exports=l({http:i,https:a}),e.exports.wrap=l},function(e,t){e.exports=require("https")},function(e,t){e.exports=require("http")},function(e,t,r){"use strict";var n=r(5);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))}))}),a=o.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},function(e,t,r){"use strict";var n=r(29);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;nparseInt(a.scriptHash,16)?e.tx.scripts.push(n):e.tx.scripts.unshift(n),e}):Promise.resolve(e)},_=function(e){if(e.override||(e.override={}),e.sendingFromSmartContract){var t=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)(t.scriptHash))}return Promise.resolve(e)},x=function(e){if(e.sendingFromSmartContract){var t=(0,i.getScriptHashFromAddress)(e.address);return o.Query.getContractState(t).execute(e.url).then(function(r){var n=r.result.parameters,a={invocationScript:"00".repeat(n.length),verificationScript:""},o=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);return parseInt(t,16)>parseInt(o.scriptHash,16)?e.tx.scripts.push(a):e.tx.scripts.unshift(a),e})}return Promise.resolve(e)},k=function(e){return 0===e.tx.inputs.length&&0===e.tx.outputs.length&&(e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)((0,i.getScriptHashFromAddress)(e.address))),e.tx.addRemark(Date.now().toString()+(0,f.ab2hexstring)((0,i.generateRandomArray)(4)))),Promise.resolve(e)},S=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n5&&void 0!==arguments[5]?arguments[5]:0,h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;d.warn("doTransferToken will be deprecated in favor of doInvoke");var p,b,v=new a.Account(r),m=(0,f.getRPCEndpoint)(e),g=(0,f.getBalance)(e,v.address);return Promise.all([m,g]).then(function(e){b=e[0];var r=e[1],o=(0,a.getScriptHashFromAddress)(v.address),f=(0,s.reverseHex)((0,a.getScriptHashFromAddress)(n)),d=[{assetId:u.ASSET_ID.GAS,value:1e-8,scriptHash:o}],p={scriptHash:t,operation:"transfer",args:[(0,s.reverseHex)(o),f,i]},m=c.Transaction.createInvocationTx(r,d,p,l,{version:1});return h?h(m,v.publicKey):m.sign(v.privateKey)}).then(function(e){return p=e,o.Query.sendRawTransaction(p).execute(b)}).then(function(e){return!0===e.result&&(e.txid=p.hash),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrices=t.getPrice=void 0;var n=i(r(20));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"NEO",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd";return o.warn("This is deprecated in favor of getPrices. There is a known bug for NEP5 tokens with this function."),f("https://api.coinmarketcap.com/v1/ticker/".concat(e.toLowerCase(),"/"),t).then(function(t){var r=t[e.toUpperCase()];if(r)return r;throw new Error("Something went wrong with the CoinMarketCap API!")}).catch(function(e){throw o.error(e.message),e})};function f(e,t){return t=t.toLowerCase(),s.includes(t)?n.default.get("".concat(e,"?limit=0&convert=").concat(t)).then(function(e){var r=e.data;if(r.error)throw new Error(r.error);return function(e,t){var r={};return e.forEach(function(e){r[e.symbol]=parseFloat(e["price_".concat(t.toLowerCase())])}),r}(r,t)}):Promise.reject(new ReferenceError("".concat(t," is not one of the accepted currencies!")))}t.getPrices=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["NEO"];return f("https://api.coinmarketcap.com/v1/ticker/",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd").then(function(t){e=e.map(function(e){return e.toUpperCase()});var r=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t.address||"",this.net=t.net||"NoNet",this.claims=t.claims?t.claims.map(function(e){return(0,i.ClaimItem)(e)}):[]}var t,r,n;return t=e,(r=[{key:a.default.inspect.custom,value:function(e,t){var r=this.claims.map(function(e){return"".concat(e.txid," <").concat(e.index,">: ").concat(e.claim.toString())});return"[Claims(".concat(this.net,"): ").concat(this.address,"]\n").concat(JSON.stringify(r,null,2))}},{key:"export",value:function(){return{address:this.address,net:this.net,claims:this.claims.map(i.exportClaimItem)}}},{key:"slice",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new e({address:this.address,net:this.net,claims:this.claims.slice(t,r)})}},{key:Symbol.toStringTag,get:function(){return"Claims"}}])&&o(t.prototype,r),n&&o(t,n),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(16)),i=o(r(23)),a=r(2);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:a.DEFAULT_WALLET,r=t.name,n=void 0===r?"myWallet":r,i=t.version,o=void 0===i?a.DEFAULT_WALLET.version:i,s=t.scrypt,c=void 0===s?a.DEFAULT_SCRYPT:s,u=t.accounts,d=void 0===u?[]:u,l=t.extra,h=void 0===l?null:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=n,this.version=o,this.scrypt={n:c.n||c.cost,r:c.r||c.blockSize,p:c.p||c.parallel},this.accounts=[];var p=!0,b=!1,v=void 0;try{for(var m,g=d[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var y=m.value;this.addAccount(y)}}catch(e){b=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(b)throw v}}this.extra=h,f.info("New Wallet created: ".concat(this.name))}var t,r,o;return t=e,r=[{key:"addAccount",value:function(e){var t=this.accounts.length;e instanceof i.default||(e=new i.default(e)),this.accounts.push(e);try{var r=e.address;f.info("Added Account: ".concat(r," to Wallet ").concat(this.name))}catch(e){f.warn("Encrypted account added to Wallet ".concat(this.name,". You will not be able to export this wallet without first decrypting this account"))}return t}},{key:"decrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].decrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"decryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.decrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"encrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].encrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"encryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.encrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"export",value:function(){return{name:this.name,version:this.version,scrypt:this.scrypt,accounts:this.accounts.map(function(e){return e.export()}),extra:this.extra}}},{key:"setDefault",value:function(e){for(var t=0;t)?=?)";var S=s++;o[S]=o[c]+"|x|X|\\*";var A=s++;o[A]=o[f]+"|x|X|\\*";var M=s++;o[M]="[v=\\s]*("+o[A]+")(?:\\.("+o[A]+")(?:\\.("+o[A]+")(?:"+o[b]+")?"+o[g]+"?)?)?";var E=s++;o[E]="[v=\\s]*("+o[S]+")(?:\\.("+o[S]+")(?:\\.("+o[S]+")(?:"+o[v]+")?"+o[g]+"?)?)?";var P=s++;o[P]="^"+o[k]+"\\s*"+o[M]+"$";var I=s++;o[I]="^"+o[k]+"\\s*"+o[E]+"$";var C=s++;o[C]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var O=s++;o[O]="(?:~>?)";var T=s++;o[T]="(\\s*)"+o[O]+"\\s+",a[T]=new RegExp(o[T],"g");var R=s++;o[R]="^"+o[O]+o[M]+"$";var N=s++;o[N]="^"+o[O]+o[E]+"$";var F=s++;o[F]="(?:\\^)";var j=s++;o[j]="(\\s*)"+o[F]+"\\s+",a[j]=new RegExp(o[j],"g");var B=s++;o[B]="^"+o[F]+o[M]+"$";var z=s++;o[z]="^"+o[F]+o[E]+"$";var H=s++;o[H]="^"+o[k]+"\\s*("+_+")$|^$";var L=s++;o[L]="^"+o[k]+"\\s*("+w+")$|^$";var q=s++;o[q]="(\\s*)"+o[k]+"\\s*("+_+"|"+o[M]+")",a[q]=new RegExp(o[q],"g");var D=s++;o[D]="^\\s*("+o[M]+")\\s+-\\s+("+o[M]+")\\s*$";var U=s++;o[U]="^\\s*("+o[E]+")\\s+-\\s+("+o[E]+")\\s*$";var K=s++;o[K]="(<|>)?=?\\s*\\*";for(var V=0;Vn)return null;if(!(t?a[x]:a[y]).test(e))return null;try{return new W(e,t)}catch(e){return null}}function W(e,t){if(e instanceof W){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof W))return new W(e,t);r("SemVer",e,t),this.loose=t;var o=e.trim().match(t?a[x]:a[y]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new W(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(J(e,t))return null;var r=Y(e),n=Y(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=G;var X=/^[0-9]+$/;function G(e,t){var r=X.test(e),n=X.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function Z(e,t,r){return new W(e,r).compare(new W(t,r))}function Q(e,t,r){return Z(e,t,r)>0}function $(e,t,r){return Z(e,t,r)<0}function J(e,t,r){return 0===Z(e,t,r)}function ee(e,t,r){return 0!==Z(e,t,r)}function te(e,t,r){return Z(e,t,r)>=0}function re(e,t,r){return Z(e,t,r)<=0}function ne(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=J(e,r,n);break;case"!=":i=ee(e,r,n);break;case">":i=Q(e,r,n);break;case">=":i=te(e,r,n);break;case"<":i=$(e,r,n);break;case"<=":i=re(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ie(e,t){if(e instanceof ie){if(e.loose===t)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);r("comparator",e,t),this.loose=t,this.parse(e),this.semver===ae?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new W(e,t).major},t.minor=function(e,t){return new W(e,t).minor},t.patch=function(e,t){return new W(e,t).patch},t.compare=Z,t.compareLoose=function(e,t){return Z(e,t,!0)},t.rcompare=function(e,t,r){return Z(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=Q,t.lt=$,t.eq=J,t.neq=ee,t.gte=te,t.lte=re,t.cmp=ne,t.Comparator=ie;var ae={};function oe(e,t){if(e instanceof oe)return e.loose===t?e:new oe(e.raw,t);if(e instanceof ie)return new oe(e.value,t);if(!(this instanceof oe))return new oe(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function se(e){return!e||"x"===e.toLowerCase()||"*"===e}function fe(e,t,r,n,i,a,o,s,f,c,u,d,l){return((t=se(r)?"":se(n)?">="+r+".0.0":se(i)?">="+r+"."+n+".0":">="+t)+" "+(s=se(f)?"":se(c)?"<"+(+f+1)+".0.0":se(u)?"<"+f+"."+(+c+1)+".0":d?"<="+f+"."+c+"."+u+"-"+d:"<="+s)).trim()}function ce(e,t){for(var n=0;n0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new oe(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,a,o,s,f;switch(e=new W(e,n),t=new oe(t,n),r){case">":i=Q,a=re,o=$,s=">",f=">=";break;case"<":i=$,a=te,o=Q,s="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var c=0;c=0.0.0")),u=u||e,d=d||e,i(e.semver,u.semver,n)?u=e:o(e.semver,d.semver,n)&&(d=e)}),u.operator===s||u.operator===f)return!1;if((!d.operator||d.operator===s)&&a(e,d.semver))return!1;if(d.operator===f&&o(e,d.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.loose?a[H]:a[L],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new W(r[2],this.loose):this.semver=ae},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return r("Comparator.test",e,this.loose),this.semver===ae||("string"==typeof e&&(e=new W(e,this.loose)),ne(e,this.operator,this.semver,this.loose))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new oe(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new oe(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),f=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||f},t.Range=oe,oe.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},oe.prototype.toString=function(){return this.range},oe.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),r("range",e,t);var n=t?a[U]:a[D];e=e.replace(n,fe),r("hyphen replace",e),e=e.replace(a[q],"$1$2$3"),r("comparator trim",e,a[q]),e=(e=(e=e.replace(a[T],"$1~")).replace(a[j],"$1^")).split(/\s+/).join(" ");var i=t?a[H]:a[L],o=e.split(" ").map(function(e){return function(e,t){return r("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t?a[z]:a[B];return e.replace(n,function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),se(n)?s="":se(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":se(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t?a[N]:a[R];return e.replace(n,function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),se(n)?s="":se(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":se(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+n+"."+i+"."+a+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t?a[I]:a[P];return e.replace(n,function(t,n,i,a,o,s){r("xRange",e,t,n,i,a,o,s);var f=se(i),c=f||se(a),u=c||se(o),d=u;return"="===n&&d&&(n=""),f?t=">"===n||"<"===n?"<0.0.0":"*":n&&d?(c&&(a=0),u&&(o=0),">"===n?(n=">=",c?(i=+i+1,a=0,o=0):u&&(a=+a+1,o=0)):"<="===n&&(n="<",c?i=+i+1:a=+a+1),t=n+i+"."+a+"."+o):c?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),r("xRange return",t),t})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[K],"")}(e,t),r("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(o=o.filter(function(e){return!!e.match(i)})),o=o.map(function(e){return new ie(e,t)})},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new oe(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},oe.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.loose));for(var t=0;t",r)},t.outside=de,t.prerelease=function(e,t){var r=Y(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new oe(e,r),t=new oe(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(a[C]);return null==t?null:Y((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.magic=t.magic||t.Magic||0,this.addressVersion=t.addressVersion||t.AddressVersion||23,this.standbyValidators=t.standbyValidators||t.StandbyValidators||[],this.seedList=t.seedList||t.SeedList||[],this.systemFee=t.systemFee||t.SystemFee||n.DEFAULT_SYSFEE}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?JSON.parse(t):t;return new e(Object.assign(n,{extra:n.extra||n.Extra,name:n.name||n.Name||r}))}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing protocol file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"writeFile",value:function(e){return i.default.writeFile(e,this.export(),function(e){if(e)throw e;return console.log("Protocol file written!"),!0})}},{key:"export",value:function(){return{Magic:this.magic,AddressVersion:this.addressVersion,StandbyValidators:this.standbyValidators,SeedList:this.seedList,SystemFee:this.systemFee}}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e){e.exports={MainNet:{Name:"MainNet",ProtocolConfiguration:{Magic:7630401,AddressVersion:23,StandbyValidators:["03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c","02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093","03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a","02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554","024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d","02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e","02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70"],SeedList:["seed1.neo.org:10333","seed2.neo.org:10333","seed3.neo.org:10333","seed4.neo.org:10333","seed5.neo.org:10333"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neonDB:"http://api.wallet.cityofzion.io",neoscan:"https://api.neoscan.io/api/main_net"}},TestNet:{Name:"TestNet",ProtocolConfiguration:{Magic:1953787457,AddressVersion:23,StandbyValidators:["0327da12b5c40200e9f65569476bbff2218da4f32548ff43b6387ec1416a231ee8","026ce35b29147ad09e4afe4ec4a7319095f08198fa8babbe3c56e970b143528d22","0209e7fd41dfb5c2f8dc72eb30358ac100ea8c72da18847befe06eade68cebfcb9","039dafd8571a641058ccc832c5e2111ea39b09c0bde36050914384f7a48bce9bf9","038dddc06ce687677a53d54f096d2591ba2302068cf123c1f2d75c2dddc5425579","02d02b1873a0863cd042cc717da31cea0d7cf9db32b74d4c72c01b0011503e2e22","034ff5ceeac41acf22cd5ed2da17a6df4dd8358fcb2bfb1a43208ad0feaab2746b"],SeedList:["seed1.neo.org:20333","seed2.neo.org:20333","seed3.neo.org:20333","seed4.neo.org:20333","seed5.neo.org:20333"],SystemFee:{EnrollmentTransaction:10,IssueTransaction:5,PublishTransaction:5,RegisterTransaction:100}},ExtraConfiguration:{neonDB:"http://testnet-api.wallet.cityofzion.io",neoscan:"https://neoscan-testnet.io/api/test_net"}},CozNet:{Name:"CozNet",ProtocolConfiguration:{Magic:1010102,AddressVersion:23,StandbyValidators:["032d9e51c7d48b0f5cc63d63deb89767685832cf69eb7113900290f217ae0504ee","022a5b7ccf03166a95e1750f0c350c734c34fe7aac66622eecdb5a529d2e69b1df","03c478d43271c297696ee3ab5a7946ee60287015c7dca6cba867819c7f271bc4ea","0393ef777d01fb60eef1da3474b975c6a393b464bcfe588e2ad7dbc4dbdfa2c244"],SeedList:["188.68.34.29:10330","188.68.34.29:10332","188.68.34.29:10334","188.68.34.29:10336"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neoscan:"https://coz.neoscan-testnet.io/api/main_net"}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDeployScript=t.createScript=void 0;var n,i=r(0),a=(n=r(41))&&n.__esModule?n:{default:n};t.createScript=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.type||128,this.version=r.version||i.TX_VERSION.CONTRACT,this.attributes=r.attributes||[],this.inputs=r.inputs||[],this.outputs=r.outputs?r.outputs.map(function(e){return f.TransactionOutput(e)}):[],this.scripts=r.scripts||[];var n=u.getExclusive[this.type](r);Object.keys(n).map(function(e){t[e]=n[e]})}var t,r,d;return t=e,r=[{key:"addOutput",value:function(e,t,r){if(3===arguments.length)this.outputs.push(f.createTransactionOutput(e,t,r));else{if("object"!==h(arguments[0]))throw new Error("Invalid input given! Give either 1 or 3 arguments!");this.outputs.push(arguments[0])}return this}},{key:"addAttribute",value:function(e,t){if("string"!=typeof t)throw new TypeError("data should be formatted as string!");return this.attributes.push({usage:e,data:t}),this}},{key:"addRemark",value:function(e){var t=(0,o.str2hexstring)(e);return this.addAttribute(s.default.Remark,t)}},{key:"calculate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=c.calculateInputs(e,this.outputs,this.gas,t),n=r.inputs,i=r.change;return this.inputs=n,this.outputs=this.outputs.concat(i),e.applyTx(this),b.info("Calculated the inputs required for Transaction with Balance: ".concat(e.address)),this}},{key:"serialize",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return c.serializeTransaction(this,e)}},{key:"serializeExclusiveData",value:function(){return u.serializeExclusive[this.type](this)}},{key:"sign",value:function(e){return"string"==typeof e&&(e=new n.Account(e)),c.signTransaction(this,e.privateKey),b.info("Signed Transaction with Account: ".concat(e.label)),this}},{key:Symbol.toStringTag,get:function(){return"Transaction"}},{key:"exclusiveData",get:function(){return u.getExclusive[this.type](this)}},{key:"hash",get:function(){return c.getTransactionHash(this)}}],d=[{key:"createClaimTx",value:function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.claims.length)throw new Error("Useless transaction! There is no claims!");var s=new n.Account(t),f=Object.assign({type:2,version:i.TX_VERSION.CLAIM},a),c=new o.Fixed8(0);f.claims=r.claims.slice(0,255).map(function(e){return c=c.add(e.claim),{prevHash:e.txid,prevIndex:e.index}}),f.outputs=[{assetId:i.ASSET_ID.GAS,value:c,scriptHash:s.scriptHash}];var u=new e(Object.assign(f,a));return b.info("New ClaimTransaction for ".concat(s.address)),u}},{key:"createContractTx",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===r)throw new Error("Useless transaction! You are not sending anything!");var a=new e(Object.assign({type:128,version:i.TX_VERSION.CONTRACT,outputs:r},n)).calculate(t);return b.info("New ContractTransaction for ".concat(t.address)),a}},{key:"createInvocationTx",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};null===r&&(r=[]);var f=new e(Object.assign({type:209,version:i.TX_VERSION.INVOCATION,outputs:r,script:"string"==typeof n?n:(0,a.createScript)(n),gas:o},s)).calculate(t);return b.info("New InvocationTransaction for ".concat(t.address)),f}},{key:"deserialize",value:function(t){var r=c.deserializeTransaction(t),n=u.getExclusive[r.type](r);return new e(Object.assign(r,n))}}],r&&p(t.prototype,r),d&&p(t,d),e}();t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(44))&&n.__esModule?n:{default:n},a=r(11),o=r(2),s=r(0),f=r(12);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=r.address||"",this.net=r.net||"NoNet",this.assetSymbols=r.assetSymbols?r.assetSymbols:[],this.assets={},r.assets&&Object.keys(r.assets).map(function(e){"object"===c(r.assets[e])&&t.addAsset(e,r.assets[e])}),this.tokenSymbols=r.tokenSymbols?r.tokenSymbols:[],this.tokens=r.tokens?r.tokens:{}}var t,r,n;return t=e,r=[{key:"addAsset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.default)();e=e.toUpperCase(),this.assetSymbols.push(e);var r=(0,i.default)(t);return this.assets[e]=r,this}},{key:"addToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e=e.toUpperCase(),this.tokenSymbols.push(e),this.tokens[e]=new s.Fixed8(t),this}},{key:"applyTx",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e instanceof a.Transaction?e:a.Transaction.deserialize(e);var n=this.assetSymbols,i=!0,s=!1,f=void 0;try{for(var c,u=function(){var e=c.value,r=function(t){return t.txid===e.prevHash&&t.index===e.prevIndex},i=!0,a=!1,o=void 0;try{for(var s,f=n[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var u=s.value,d=t.assets[u],l=d.unspent.findIndex(r);if(l>=0){var h=d.unspent.splice(l,1);d.spent=d.spent.concat(h);break}}}catch(e){a=!0,o=e}finally{try{i||null==f.return||f.return()}finally{if(a)throw o}}},d=e.inputs[Symbol.iterator]();!(i=(c=d.next()).done);i=!0)u()}catch(e){s=!0,f=e}finally{try{i||null==d.return||d.return()}finally{if(s)throw f}}for(var l=e.hash,h=function(n){var i=e.outputs[n],a=o.ASSETS[i.assetId],s=t.assets[a];s||t.addAsset(a);var f={index:n,txid:l,value:i.value};if(r){var c=s.unconfirmed.findIndex(function(e){return e.txid===f.txid&&e.index===f.index});c>=0&&s.unconfirmed.splice(c,1),s.balance=s.balance.add(i.value),s.unspent||(s.unspent=[]),s.unspent.push(f)}else s.unconfirmed||(s.unconfirmed=[]),s.unconfirmed.push(f);t.assets[a]=s},p=0;p=0&&n<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[c]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(e){}}(n),i.call(f,n,e),typeof console===t&&n=64;){var h,p,b,v,m,g=r,y=n,w=i,_=a,x=o,k=s,S=f,A=c;for(p=0;p<16;p++)b=d+4*p,u[p]=(255&e[b])<<24|(255&e[b+1])<<16|(255&e[b+2])<<8|255&e[b+3];for(p=16;p<64;p++)v=((h=u[p-2])>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,m=((h=u[p-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,u[p]=(v+u[p-7]|0)+(m+u[p-16]|0)|0;for(p=0;p<64;p++)v=(((x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7))+(x&k^~x&S)|0)+(A+(t[p]+u[p]|0)|0)|0,m=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&y^g&w^y&w)|0,A=S,S=k,k=x,x=_+v|0,_=w,w=y,y=g,g=v+m|0;r=r+g|0,n=n+y|0,i=i+w|0,a=a+_|0,o=o+x|0,s=s+k|0,f=f+S|0,c=c+A|0,d+=64,l-=64}}d(e);var l,h=e.length%64,p=e.length/536870912|0,b=e.length<<3,v=h<56?56:120,m=e.slice(e.length-h,e.length);for(m.push(128),l=h+1;l>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(b>>>24&255),m.push(b>>>16&255),m.push(b>>>8&255),m.push(b>>>0&255),d(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(e,t,r){var i;e=e.length<=64?e:n(e);var a=64+t.length+4,o=new Array(a),s=new Array(64),f=[];for(i=0;i<64;i++)o[i]=54;for(i=0;i=a-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)c(),f=f.concat(n(s.concat(n(o)))),r-=32;return r>0&&(c(),f=f.concat(n(s.concat(n(o))).slice(0,r))),f}function a(e,t,r,n,i){var a;for(c(e,16*(2*r-1),i,0,16),a=0;a<2*r;a++)f(e,16*a,i,16),s(i,n),c(i,0,e,t+16*a,16);for(a=0;a>>32-t}function s(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(r=0;r<16;++r)e[r]+=t[r]}function f(e,t,r,n){for(var i=0;i=256)return!1}return!0}function d(e,t){var r=parseInt(e);if(e!=r)throw new Error("invalid "+t);return r}e.exports=function(e,t,n,o,s,l,h){if(!h)throw new Error("missing callback");if(n=d(n,"N"),o=d(o,"r"),s=d(s,"p"),l=d(l,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>r/128/o)throw new Error("N too large");if(o>r/128/s)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(!u(t))throw new Error("salt must be an array or buffer");for(var p=i(e,t,128*s*o),b=new Uint32Array(32*s*o),v=0;vO&&(r=O);for(var t=0;tO&&(r=O),t=0;t>0&255),p.push(b[t]>>8&255),p.push(b[t]>>16&255),p.push(b[t]>>24&255);var v=i(e,p,l);return h(null,1,v)}T(R)};R()}}()},function(e,t){e.exports=require("path")},function(module,exports,__webpack_require__){(function(__dirname,module){module.exports=function(requested_total_memory){var Module={TOTAL_MEMORY:requested_total_memory||33554432},scrypt_raw=Module;function g(e){throw e}var k=void 0,l=!0,m=null,p=!1,q,s;function aa(){return function(){}}s||(s=eval("(function() { try { return Module || {} } catch(e) { return {} } })()"));var ba={},t;for(t in s)s.hasOwnProperty(t)&&(ba[t]=s[t]);var ca="object"==typeof process&&!0,da="object"==typeof window,ea="function"==typeof importScripts,fa=!da&&!ca&&!ea,oa;if(ca){s.print=function(e){process.stdout.write(e+"\n")},s.printErr=function(e){process.stderr.write(e+"\n")};var ga=__webpack_require__(16),ha=__webpack_require__(87);s.read=function(e,t){e=ha.normalize(e);var r=ga.readFileSync(e);return!r&&e!=ha.resolve(e)&&(e=path.join(__dirname,"..","src",e),r=ga.readFileSync(e)),r&&!t&&(r=r.toString()),r},s.readBinary=function(e){return s.read(e,l)},s.load=function(e){ia(read(e))},s.arguments=process.argv.slice(2),module.ee=s}else fa?(s.print=print,"undefined"!=typeof printErr&&(s.printErr=printErr),s.read=read,s.readBinary=function(e){return read(e,"binary")},"undefined"!=typeof scriptArgs?s.arguments=scriptArgs:void 0!==arguments&&(s.arguments=arguments),this.Module=s):da||ea?(s.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,p),t.send(m),t.responseText},void 0!==arguments&&(s.arguments=arguments),da?(s.print=function(e){console.log(e)},s.printErr=function(e){console.log(e)},this.Module=s):ea&&(s.print=aa(),s.load=importScripts)):g("Unknown runtime environment. Where are we?");function ia(e){eval.call(m,e)}for(t in"undefined"==!s.load&&s.read&&(s.load=function(e){ia(s.read(e))}),s.print||(s.print=aa()),s.printErr||(s.printErr=s.print),s.arguments||(s.arguments=[]),s.print=s.print,s.P=s.printErr,s.preRun=[],s.postRun=[],ba)ba.hasOwnProperty(t)&&(s[t]=ba[t]);function ja(){return u}function ka(e){u=e}function la(e){if(1==ma)return 1;var t={"%i1":1,"%i8":1,"%i16":2,"%i32":4,"%i64":8,"%float":4,"%double":8}["%"+e];return t||("*"==e.charAt(e.length-1)?t=ma:"i"==e[0]&&(w(0==(e=parseInt(e.substr(1)))%8),t=e/8)),t}function na(e,t,r){r&&r.length?(r.splice||(r=Array.prototype.slice.call(r)),r.splice(0,0,t),s["dynCall_"+e].apply(m,r)):s["dynCall_"+e].call(m,t)}function pa(){var e=[],t=0;this.oa=function(r){if(r&=255,t&&(e.push(r),t--),0==e.length)return 128>r?String.fromCharCode(r):(e.push(r),t=191r?1:2,"");if(0r?String.fromCharCode((31&r)<<6|63&n):String.fromCharCode((15&r)<<12|(63&n)<<6|63&i);return e.length=0,r},this.yb=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>3<<3,t}function ra(e){var t=sa;return sa=(sa=sa+e|0)+7>>3<<3,t}function ua(e){var t=z;return(z=(z=z+e|0)+7>>3<<3)>=va&&wa("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs."),t}function xa(e,t){return Math.ceil(e/(t||8))*(t||8)}var ma=4,ya={},za=p,Aa;function w(e,t){e||wa("Assertion failed: "+t)}function Ca(a){try{var b=s["_"+a];b||(b=eval("_"+a))}catch(e){}return w(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function Ba(e,t,r,n){var i=0,a=0;n=n?n.map(function(e){return function(e,t){if("string"==t){if(e===m||e===k||0===e)return 0;i||(i=ja());var r=qa(e.length+1);return Da(e,r),r}return"array"==t?(i||(i=ja()),Ea(e,r=qa(e.length)),r):e}(e,r[a++])}):[];return e=e.apply(m,n),"string"==t?t=Fa(e):(w("array"!=t),t=e),i&&ka(i),t}function Ga(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":A[e]=t;break;case"i16":Ha[e>>1]=t;break;case"i32":B[e>>2]=t;break;case"i64":Aa=[t>>>0,(0|Math.min(+Math.floor(t/4294967296),4294967295))>>>0],B[e>>2]=Aa[0],B[e+4>>2]=Aa[1];break;case"float":Ia[e>>2]=t;break;case"double":Ja[e>>3]=t;break;default:wa("invalid type for setValue: "+r)}}s.ccall=function(e,t,r,n){return Ba(Ca(e),t,r,n)},s.cwrap=function(e,t,r){var n=Ca(e);return function(){return Ba(n,t,r,Array.prototype.slice.call(arguments))}},s.setValue=Ga,s.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return A[e];case"i16":return Ha[e>>1];case"i32":case"i64":return B[e>>2];case"float":return Ia[e>>2];case"double":return Ja[e>>3];default:wa("invalid type for setValue: "+t)}return m};var Ka=0,La=1,E=2,Na=4;function F(e,t,r,n){var i,a;"number"==typeof e?(i=l,a=e):(i=p,a=e.length);var o="string"==typeof t?t:m;r=r==Na?n:[Oa,qa,ra,ua][r===k?E:r](Math.max(a,o?1:t.length));if(i){for(n=r,w(0==(3&r)),e=r+(-4&a);n>2]=0;for(e=r+a;n=t?2*Math.abs(1<=e)return e;var r=32>=t?Math.abs(1<=r&&(32>=t||e>r)&&(e=-2*r+e),e}s.addOnPreRun=s.Vd=bb,s.addOnInit=s.Sd=function(e){Xa.unshift(e)},s.addOnPreMain=s.Ud=function(e){Ya.unshift(e)},s.addOnExit=s.Rd=function(e){Za.unshift(e)},s.addOnPostRun=s.Td=cb,s.intArrayFromString=J,s.intArrayToString=function(e){for(var t=[],r=0;r>>16)*n+r*(t>>>16)<<16)|0}),Math.ie=Math.imul;var L=0,fb={},gb=p,hb=m,nb,ob,pb;function ib(e){L++,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(!fb[e]),fb[e]=1):s.P("warning: run dependency added without ID")}function jb(e){L--,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(fb[e]),delete fb[e]):s.P("warning: run dependency removed without ID"),0==L&&(hb!==m&&(clearInterval(hb),hb=m),!gb&&kb&&lb())}s.addRunDependency=ib,s.removeRunDependency=jb,s.preloadedImages={},s.preloadedAudios={},Ra=8,sa=Ra+1312,Xa.push({V:function(){mb()}}),nb=nb=F([0,0,0,0,0,0,0,0],"i8",E),ob=ob=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),pb=pb=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),F([111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,115,0,0,0,0,0,0,0,111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,99,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,56,3,0,0,0,0,0,0,63,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,111,112,116,105,111,110,32,100,111,101,115,110,39,116,32,116,97,107,101,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,46,42,115,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,115,0,0,0,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,99,0,0,0,0,255,255,255,255,0,0,0,0,97,109,98,105,103,117,111,117,115,32,111,112,116,105,111,110,32,45,45,32,37,46,42,115,0,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,80,79,83,73,88,76,89,95,67,79,82,82,69,67,84,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,37,115,58,32,0,0,0,0,37,115,10,0,0,0,0,0,37,115,10,0,0,0,0,0,105,110,32,117,115,101,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,37,115,58,32,0,0,0,0,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,58,32,0,0,0,0,0,0,58,32,0,0,0,0,0,0,115,121,115,116,101,109,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,109,97,120,32,115,121,115,116,101,109,32,98,121,116,101,115,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,0,0,0,0,176,2,0,0,6,0,0,0,10,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,2,0,0,6,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,116,57,101,120,99,101,112,116,105,111,110,0,0,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,83,116,50,48,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,0,0,0,0,120,2,0,0,168,2,0,0,0,0,0,0,0,0,0,0,136,2,0,0,176,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",Na,8);var qb=xa(F(12,"i8",E),8);w(0==qb%8);var rb=0;function M(e){return B[rb>>2]=e}s._memcpy=sb,s._memset=tb;var N={L:1,ca:2,Bd:3,sc:4,I:5,za:6,Jb:7,Sc:8,$:9,Zb:10,ua:11,Ld:11,$a:12,Ya:13,kc:14,ed:15,Wb:16,va:17,Md:18,wa:19,gd:20,aa:21,A:22,Mc:23,Za:24,ld:25,Id:26,lc:27,ad:28,da:29,yd:30,Fc:31,rd:32,hc:33,ab:34,Wc:35,pc:36,$b:37,vc:38,wc:39,xc:40,Ec:41,Jd:42,Qc:43,uc:44,ec:45,Tc:46,Pb:50,Sb:51,Nd:52,Oc:53,Tb:54,Ub:55,fc:56,Vb:57,cd:60,Rc:61,Fd:62,bd:63,Xc:64,Yc:65,xd:66,Uc:67,Mb:68,Cd:69,ac:70,td:71,Hc:74,yc:75,ic:76,Rb:77,mc:79,md:80,Qb:81,wd:82,zc:83,Ac:84,Dc:85,Cc:86,Bc:87,dd:88,Nc:89,ya:90,Ic:91,ba:92,nd:95,qd:96,dc:104,Pc:105,Nb:106,vd:107,jd:108,Zc:109,zd:110,cc:111,Kb:112,bc:113,Lc:114,Jc:115,Gd:116,nc:117,oc:118,rc:119,Ob:120,gc:121,Gc:122,ud:123,Ad:124,Lb:125,Kc:126,tc:127,fd:128,Hd:129,sd:130,Kd:131,jc:132,Dd:133,kd:134,Vc:135,$c:136,Yb:137,qc:138,od:139,Xb:140,hd:141,pd:142,Ed:143},ub={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"No message of desired type",36:"Identifier removed",37:"Channel number out of range",38:"Level 2 not synchronized",39:"Level 3 halted",40:"Level 3 reset",41:"Link number out of range",42:"Protocol driver not attached",43:"No CSI structure available",44:"Level 2 halted",45:"Deadlock condition",46:"No record locks available",50:"Invalid exchange",51:"Invalid request descriptor",52:"Exchange full",53:"No anode",54:"Invalid request code",55:"Invalid slot",56:"File locking deadlock error",57:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",74:"Multihop attempted",75:"Inode is remote (not really error)",76:"Cross mount point (not really error)",77:"Trying to read unreadable message",79:"Inappropriate file type or format",80:"Given log. name not unique",81:"f.d. invalid for this operation",82:"Remote address changed",83:"Can\t access a needed shared lib",84:"Accessing a corrupted shared lib",85:".lib section in a.out corrupted",86:"Attempting to link in too many libs",87:"Attempting to exec a shared library",88:"Function not implemented",89:"No more files",90:"Directory not empty",91:"File or path name too long",92:"Too many symbolic links",95:"Operation not supported on transport endpoint",96:"Protocol family not supported",104:"Connection reset by peer",105:"No buffer space available",106:"Address family not supported by protocol family",107:"Protocol wrong type for socket",108:"Socket operation on non-socket",109:"Protocol not available",110:"Can't send after socket shutdown",111:"Connection refused",112:"Address already in use",113:"Connection aborted",114:"Network is unreachable",115:"Network interface is not configured",116:"Connection timed out",117:"Host is down",118:"Host is unreachable",119:"Connection already in progress",120:"Socket already connected",121:"Destination address required",122:"Message too long",123:"Unknown protocol",124:"Socket type not supported",125:"Address not available",126:"ENETRESET",127:"Socket is already connected",128:"Socket is not connected",129:"TOOMANYREFS",130:"EPROCLIM",131:"EUSERS",132:"EDQUOT",133:"ESTALE",134:"Not supported",135:"No medium (in tape drive)",136:"No such host or network path",137:"Filename exists with different case",138:"EILSEQ",139:"Value too large for defined data type",140:"Operation canceled",141:"State not recoverable",142:"Previous owner died",143:"Streams pipe error"};function vb(e,t,r){var n=O(e,{parent:l}).d,i=xb(n,e="/"===e?"/":wb(e)[2]);return i&&g(new Q(i)),n.l.Ta||g(new Q(N.L)),n.l.Ta(n,e,t,r)}function yb(e,t){return vb(e,t=4095&t|32768,0)}function zb(e,t){return vb(e,t=1023&t|16384,0)}function Ab(e,t,r){return vb(e,8192|t,r)}function Bb(e,t){var r=O(t,{parent:l}).d,n="/"===t?"/":wb(t)[2],i=xb(r,n);return i&&g(new Q(i)),r.l.Wa||g(new Q(N.L)),r.l.Wa(r,n,e)}function Cb(e,t){var r;(r="string"==typeof e?O(e,{N:l}).d:e).l.Y||g(new Q(N.L)),r.l.Y(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function Db(e,t){var r,n,i;e=Eb(e);"string"==typeof t?void 0===(n=Fb[t])&&g(Error("Unknown file open mode: "+t)):n=t,r=512&(t=n)?4095&r|32768:0;try{var a=O(e,{N:!(65536&t)});i=a.d,e=a.path}catch(e){}512&t&&(i?2048&t&&g(new Q(N.va)):i=vb(e,r,0)),i||g(new Q(N.ca)),8192==(61440&i.mode)&&(t&=-1025),i?40960==(61440&i.mode)?r=N.ba:16384==(61440&i.mode)&&(0!=(3&t)||1024&t)?r=N.aa:(r=["r","w","rw"][3&t],1024&t&&(r+="w"),r=Gb(i,r)):r=N.ca,r&&g(new Q(r)),1024&t&&((r="string"==typeof(r=i)?O(r,{N:l}).d:r).l.Y||g(new Q(N.L)),16384==(61440&r.mode)&&g(new Q(N.aa)),32768!=(61440&r.mode)&&g(new Q(N.A)),(a=Gb(r,"w"))&&g(new Q(a)),r.l.Y(r,{size:0,timestamp:Date.now()}));var o,s={path:e,d:i,M:t,seekable:l,position:0,e:i.e,Gb:[],error:p};e:{for(i=k||4096,r=k||1;r<=i;r++)if(!R[r]){o=r;break e}g(new Q(N.Za))}return s.s=o,Object.defineProperty(s,"object",{get:function(){return s.d},set:function(e){s.d=e}}),Object.defineProperty(s,"isRead",{get:function(){return 1!=(3&s.M)}}),Object.defineProperty(s,"isWrite",{get:function(){return 0!=(3&s.M)}}),Object.defineProperty(s,"isAppend",{get:function(){return 8&s.M}}),R[o]=s,s.e.open&&s.e.open(s),s}function Hb(e){try{e.e.close&&e.e.close(e)}catch(e){g(e)}finally{R[e.s]=m}}function Ib(e,t,r,n,i){(0>n||0>i)&&g(new Q(N.A)),0==(3&e.M)&&g(new Q(N.$)),16384==(61440&e.d.mode)&&g(new Q(N.aa)),e.e.write||g(new Q(N.A));var a=l;return void 0===i?(i=e.position,a=p):e.seekable||g(new Q(N.da)),8&e.M&&((!e.seekable||!e.e.na)&&g(new Q(N.da)),e.e.na(e,0,2)),t=e.e.write(e,t,r,n,i),a||(e.position+=t),t}function wb(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)}function Jb(e,t){for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function Eb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return!(e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"))&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function S(){return Eb(Array.prototype.slice.call(arguments,0).filter(function(e){return"string"!=typeof e&&g(new TypeError("Arguments to path.join must be strings")),e}).join("/"))}function Kb(){for(var e="",t=p,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:"/";"string"!=typeof n&&g(new TypeError("Arguments to path.resolve must be strings")),n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}var Lb=[];function Mb(e,t){Lb[e]={input:[],H:[],O:t},Nb[e]={e:Ob}}var Ob={open:function(e){Pb||(Pb=new pa);var t=Lb[e.d.X];t||g(new Q(N.wa)),e.q=t,e.seekable=p},close:function(e){e.q.H.length&&e.q.O.W(e.q,10)},Q:function(e,t,r,n){(!e.q||!e.q.O.Na)&&g(new Q(N.za));for(var i=0,a=0;ar.length;)r.push(0)}},tb:function(){g(new Q(N.ca))},Ta:function(e,t,r,n){return T.ka(e,t,r,n)},rename:function(e,t,r){if(16384==(61440&e.mode)){var n;try{n=Sb(t,r)}catch(e){}if(n)for(var i in n.g)g(new Q(N.ya))}delete e.parent.g[e.name],e.name=r,t.g[r]=e},ze:function(e,t){delete e.g[t]},ve:function(e,t){var r,n=Sb(e,t);for(r in n.g)g(new Q(N.ya));delete e.g[t]},Wa:function(e,t,r){return(e=T.ka(e,t,41471,0)).link=r,e},Va:function(e){return 40960!=(61440&e.mode)&&g(new Q(N.A)),e.link}},e:{open:function(e){if(16384==(61440&e.d.mode)){var t,r=[".",".."];for(t in e.d.g)e.d.g.hasOwnProperty(t)&&r.push(t);e.lb=r}},Q:function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.subarray)t.set(e.subarray(i,i+n),r);else for(var a=0;at&&g(new Q(N.A)),e.Gb=[],e.position=t},ue:function(e){return e.lb},Wd:function(e,t,r){for(e=e.d.g,t+=r;t>e.length;)e.push(0)},ne:function(e,t,r,n,i,a,o){return 32768!=(61440&e.d.mode)&&g(new Q(N.wa)),e=e.d.g,2&o?((0e||0===e&&-1/0==1/e}function kc(e,t){function r(e){var r;return"double"===e?r=Ja[t+o>>3]:"i64"==e?(r=[B[t+o>>2],B[t+(o+8)>>2]],o+=8):(e="i32",r=B[t+o>>2]),o+=Math.max(Math.max(la(e),ma),8),r}for(var n,i,a=e,o=0,s=[];;){var f=a;if(0===(n=A[a]))break;if(i=A[a+1|0],37==n){var c=p,u=p,d=p,h=p;e:for(;;){switch(i){case 43:c=l;break;case 45:u=l;break;case 35:d=l;break;case 48:if(h)break e;h=l;break;default:break e}i=A[++a+1|0]}var b=0;if(42==i)b=r("i32"),i=A[++a+1|0];else for(;48<=i&&57>=i;)b=10*b+(i-48),i=A[++a+1|0];var v,g=p;if(46==i){var y=0;g=l;if(42==(i=A[++a+1|0]))y=r("i32"),a++;else for(;!(48>(i=A[a+1|0])||57>>0)+4294967296*+(n[1]>>>0):+(n[0]>>>0)+4294967296*+(0|n[1])),4>=v&&(n=(f?eb:db)(n&Math.pow(256,v)-1,8*v));var x=Math.abs(n);f="";if(100==i||105==i)w=8==v&&lc?lc.stringify(_[0],_[1],m):eb(n,8*v).toString(10);else if(117==i)w=8==v&&lc?lc.stringify(_[0],_[1],l):db(n,8*v).toString(10),n=Math.abs(n);else if(111==i)w=(d?"0":"")+x.toString(8);else if(120==i||88==i){if(f=d&&0!=n?"0x":"",8==v&&lc)if(_[1]){for(w=(_[1]>>>0).toString(16),d=(_[0]>>>0).toString(16);8>d.length;)d="0"+d;w+=d}else w=(_[0]>>>0).toString(16);else if(0>n){for(n=-n,w=(x-1).toString(16),_=[],d=0;dn?"-"+f:"+"+f);f.length+w.length(v=parseInt(n.toExponential(v).split("e")[1],10))&&-4<=v?(i=(103==i?"f":"F").charCodeAt(0),y-=v+1):(i=(103==i?"e":"E").charCodeAt(0),y--),v=Math.min(y,20)),101==i||69==i?(w=n.toExponential(v),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):102!=i&&70!=i||(w=n.toFixed(v),0===n&&jc(n)&&(w="-"+w)),f=w.split("e"),g&&!d)for(;1v++;)f[0]+="0";w=f[0]+(1n?"-":"")+"inf",h=p;for(;w.lengthi&&(w=w.toUpperCase()),w.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":if(h=(c=r("i8*"))?ic(c):6,g&&(h=Math.min(h,y)),!u)for(;h>2]=s.length;break;case"%":s.push(n);break;default:for(d=f;d>12<<12,nc.ia=l,w(ua),nc.hb=ua,ua=function(){wa("cannot dynamically allocate, sbrk now has control")});var t=z;return 0!=e&&nc.hb(e),t}function U(){return B[U.m>>2]}function oc(){return!!oc.ta}function pc(e){var t=p;try{e==__ZTIi&&(t=l)}catch(e){}try{e==__ZTIj&&(t=l)}catch(e){}try{e==__ZTIl&&(t=l)}catch(e){}try{e==__ZTIm&&(t=l)}catch(e){}try{e==__ZTIx&&(t=l)}catch(e){}try{e==__ZTIy&&(t=l)}catch(e){}try{e==__ZTIf&&(t=l)}catch(e){}try{e==__ZTId&&(t=l)}catch(e){}try{e==__ZTIe&&(t=l)}catch(e){}try{e==__ZTIc&&(t=l)}catch(e){}try{e==__ZTIa&&(t=l)}catch(e){}try{e==__ZTIh&&(t=l)}catch(e){}try{e==__ZTIs&&(t=l)}catch(e){}try{e==__ZTIt&&(t=l)}catch(e){}return t}function qc(e,t,r){if(0==r)return p;if(0==t||t==e)return l;switch(pc(t)?t:B[B[t>>2]-8>>2]){case 0:return 0==B[B[e>>2]-8>>2]?qc(B[e+8>>2],B[t+8>>2],r):p;case 1:return p;case 2:return qc(e,B[t+8>>2],r);default:return p}}function rc(e,t,r){if(!rc.sb){try{B[__ZTVN10__cxxabiv119__pointer_type_infoE>>2]=0}catch(e){}try{B[pb>>2]=1}catch(e){}try{B[ob>>2]=2}catch(e){}rc.sb=l}B[U.m>>2]=e,B[U.m+4>>2]=t,B[U.m+8>>2]=r,"uncaught_exception"in oc?oc.ta++:oc.ta=1,g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")}function sc(e){try{return tc(e)}catch(e){}}function uc(){if(uc.Bb)uc.Bb=p;else{V.setThrew(0),B[U.m+4>>2]=0;var e=B[U.m>>2],t=B[U.m+8>>2];t&&(na("vi",t,[e]),B[U.m+8>>2]=0),e&&(sc(e),B[U.m>>2]=0)}}s._strlen=ic;var vc=F(1,"i32*",E);function wc(e){var t,r;wc.ia?(r=B[vc>>2],t=B[r>>2]):(wc.ia=l,W.USER="root",W.PATH="/",W.PWD="/",W.HOME="/home/emscripten",W.LANG="en_US.UTF-8",W._="./this.program",t=F(1024,"i8",E),r=F(256,"i8*",E),B[r>>2]=t,B[vc>>2]=r);var n,i=[],a=0;for(n in e)if("string"==typeof e[n]){var o=n+"="+e[n];i.push(o),a+=o.length}for(1024>2]=t,t+=o.length+1}B[r+4*i.length>>2]=0}var W={};function xc(e){return 0===e?0:(e=Fa(e),W.hasOwnProperty(e)?(xc.J&&tc(xc.J),xc.J=F(J(W[e]),"i8",Ka),xc.J):0)}function yc(e,t,r){if(e in ub){if(ub[e].length>r-1)return M(N.ab);for(e=ub[e],r=0;r>2],B[SDL.screen+0*ma>>2]=8388608|e),Kc()}function Mc(){var e=s.canvas;e.width=this.Ib,e.height=this.Hb,"undefined"!=typeof SDL&&(e=Qa[SDL.screen+0*ma>>2],B[SDL.screen+0*ma>>2]=-8388609&e),Kc()}var Nc,Oc,Pc,Qc,rb=ra(4);B[rb>>2]=0;var Vb=Qb(m,"/",16895,0),Rc=T,Sc={type:Rc,se:{},Ua:"/",root:m},Tc;Tc=O("/",{N:p});var Uc=Rc.z(Sc);Uc.z=Sc,Sc.root=Uc,Tc&&(Tc.d.z=Sc,Tc.d.ub=l,Vb=Sc.root),zb("/tmp",511),zb("/dev",511),Nb[259]={e:{Q:function(){return 0},write:function(){return 0}}},Ab("/dev/null",438,259),Mb(1280,{Na:function(e){if(!e.input.length){var t=m;if(ca){if(process.Eb.be)return;t=process.Eb.Q()}else"undefined"!=typeof window&&"function"==typeof window.prompt?(t=window.prompt("Input: "))!==m&&(t+="\n"):"function"==typeof readline&&((t=readline())!==m&&(t+="\n"));if(!t)return m;e.input=J(t,l)}return e.input.shift()},W:function(e,t){t===m||10===t?(s.print(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Mb(1536,{W:function(e,t){t===m||10===t?(s.printErr(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Ab("/dev/tty",438,1280),Ab("/dev/tty1",438,1536),zb("/dev/shm",511),zb("/dev/shm/tmp",511),Xa.unshift({V:function(){if(!s.noFSInit&&!bc){w(!bc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),bc=l,s.stdin=s.stdin,s.stdout=s.stdout,s.stderr=s.stderr,s.stdin?ec("/dev","stdin",s.stdin):Bb("/dev/tty","/dev/stdin"),s.stdout?ec("/dev","stdout",m,s.stdout):Bb("/dev/tty","/dev/stdout"),s.stderr?ec("/dev","stderr",m,s.stderr):Bb("/dev/tty1","/dev/stderr");var e=Db("/dev/stdin","r");B[Tb>>2]=e.s,w(1===e.s,"invalid handle for stdin ("+e.s+")"),e=Db("/dev/stdout","w"),B[Ub>>2]=e.s,w(2===e.s,"invalid handle for stdout ("+e.s+")"),e=Db("/dev/stderr","w"),B[nb>>2]=e.s,w(3===e.s,"invalid handle for stderr ("+e.s+")")}}}),Ya.push({V:function(){Yb=p}}),Za.push({V:function(){bc=p;for(var e=0;e>a-6&63;a=a-6,r=r+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),c.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(c)}},c.src=f,setTimeout(function(){za||i(c)},1e4)}});var d=s.canvas;d.qa=d.requestPointerLock||d.mozRequestPointerLock||d.webkitRequestPointerLock,d.La=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||aa(),d.La=d.La.bind(document),document.addEventListener("pointerlockchange",c,p),document.addEventListener("mozpointerlockchange",c,p),document.addEventListener("webkitpointerlockchange",c,p),s.elementPointerLock&&d.addEventListener("click",function(e){!Ec&&d.qa&&(d.qa(),e.preventDefault())},p)}var h,b=S.apply(m,[e,t]);if("/"==b[0]&&(b=b.substr(1)),ib("cp "+(h=b)),"string"==typeof r){var v=o,y=function(){v?v():g('Loading data file "'+r+'" failed.')},_=new XMLHttpRequest;_.open("GET",r,l),_.responseType="arraybuffer",_.onload=function(){if(200==_.status||0==_.status&&_.response){var e=_.response;w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),u(e=new Uint8Array(e)),jb("al "+r)}else y()},_.onerror=y,_.send(m),ib("al "+r)}else u(r)},s.FS_createLazyFile=function(e,t,r,n,i){var a,o;"undefined"!=typeof XMLHttpRequest?(ea||g("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),(a=function(){this.ma=p,this.T=[]}).prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.S;return this.pb(Math.floor(e/this.S))[t]}},a.prototype.Cb=function(e){this.pb=e},a.prototype.Fa=function(){var e=new XMLHttpRequest;e.open("HEAD",r,p),e.send(m),200<=e.status&&300>e.status||304===e.status||g(Error("Couldn't load "+r+". Status: "+e.status));var t,n=Number(e.getResponseHeader("Content-length")),i=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(i=n);var a=this;a.Cb(function(e){var t=e*i,o=(e+1)*i-1;o=Math.min(o,n-1);if(void 0===a.T[e]){var s=a.T;t>o&&g(Error("invalid range ("+t+", "+o+") or no bytes requested!")),o>n-1&&g(Error("only "+n+" bytes available! programmer error!"));var f=new XMLHttpRequest;f.open("GET",r,p),n!==i&&f.setRequestHeader("Range","bytes="+t+"-"+o),"undefined"!=typeof Uint8Array&&(f.responseType="arraybuffer"),f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(m),200<=f.status&&300>f.status||304===f.status||g(Error("Couldn't load "+r+". Status: "+f.status)),t=f.response!==k?new Uint8Array(f.response||[]):J(f.responseText||"",l),s[e]=t}return void 0===a.T[e]&&g(Error("doXHR failed!")),a.T[e]}),this.gb=n,this.fb=i,this.ma=l},a=new a,Object.defineProperty(a,"length",{get:function(){return this.ma||this.Fa(),this.gb}}),Object.defineProperty(a,"chunkSize",{get:function(){return this.ma||this.Fa(),this.fb}}),o=k):(o=r,a=k);var f;e=S("string"==typeof e?e:ac(e),t);f=yb(e,cc(n,i)),a?f.g=a:o&&(f.g=m,f.url=o);var c={};return Object.keys(f.e).forEach(function(e){var t=f.e[e];c[e]=function(){var e;if(f.ke||f.le||f.link||f.g)e=l;else{if(e=l,"undefined"!=typeof XMLHttpRequest&&g(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")),s.read)try{f.g=J(s.read(f.url),l)}catch(t){e=p}else g(Error("Cannot load without read() or XMLHttpRequest."));e||M(N.I)}return e||g(new Q(N.I)),t.apply(m,arguments)}}),c.Q=function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.slice)for(var a=0;a>3<<3;return t|0}function at(){return d|0}function ot(e){e=e|0;d=e}function st(e,t){e=e|0;t=t|0;if((k|0)==0){k=e;S=t}}function ft(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0]}function ct(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0];n[h+4|0]=n[e+4|0];n[h+5|0]=n[e+5|0];n[h+6|0]=n[e+6|0];n[h+7|0]=n[e+7|0]}function ut(e){e=e|0;j=e}function dt(e){e=e|0;B=e}function lt(e){e=e|0;z=e}function ht(e){e=e|0;H=e}function pt(e){e=e|0;L=e}function bt(e){e=e|0;q=e}function vt(e){e=e|0;D=e}function mt(e){e=e|0;U=e}function gt(e){e=e|0;K=e}function yt(e){e=e|0;V=e}function wt(){a[170]=y+8;a[172]=g+8;a[176]=g+8}function _t(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)==0){return}else{i=0}do{n[e+i|0]=n[t+i|0]|0;i=i+1|0}while(i>>>0>>0);return}function xt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0;if((r|0)==0){return}else{i=0}do{a=e+i|0;n[a]=n[a]^n[t+i|0];i=i+1|0}while(i>>>0>>0);return}function kt(e){e=e|0;var t=0,r=0,n=0,i=0;t=o[e+1|0]|0;r=o[e+2|0]|0;n=o[e+3|0]|0;i=rn(t<<8|0>>>24|(o[e]|0)|(r<<16|0>>>16)|(n<<24|0>>>8)|(0<<8|0>>>24),0<<8|t>>>24|(0<<16|r>>>16)|(0<<24|n>>>8)|(o[e+4|0]|0)|((o[e+5|0]|0)<<8|0>>>24),0<<16|0>>>16,(o[e+6|0]|0)<<16|0>>>16)|0;n=rn(i,j,0<<24|0>>>8,(o[e+7|0]|0)<<24|0>>>8)|0;return(j=j,n)|0}function St(e){e=e|0;return(o[e+1|0]|0)<<8|(o[e]|0)|(o[e+2|0]|0)<<16|(o[e+3|0]|0)<<24|0}function At(e,t){e=e|0;t=t|0;n[e]=t&255;n[e+1|0]=t>>>8&255;n[e+2|0]=t>>>16&255;n[e+3|0]=t>>>24&255;return}function Mt(e){e=e|0;a[e+36>>2]=0;a[e+32>>2]=0;a[e>>2]=1779033703;a[e+4>>2]=-1150833019;a[e+8>>2]=1013904242;a[e+12>>2]=-1521486534;a[e+16>>2]=1359893119;a[e+20>>2]=-1694144372;a[e+24>>2]=528734635;a[e+28>>2]=1541459225;return}function Et(e,t,r,n,i,o,s,f,c,u){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;o=o|0;s=s|0;f=f|0;c=c|0;u=u|0;var d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0;d=hn(f,0,s,0)|0;l=j;h=0;if(l>>>0>h>>>0|l>>>0==h>>>0&d>>>0>1073741823>>>0){a[($e()|0)>>2]=27;p=-1;return p|0}d=rn(i,o,-1,-1)|0;if((d&i|0)!=0|(j&o|0)!=0|(i|0)==0&(o|0)==0){a[($e()|0)>>2]=22;p=-1;return p|0}do{if(!((33554431/(f>>>0)|0)>>>0>>0|s>>>0>16777215)){d=0;if(d>>>0>>0|d>>>0==o>>>0&(33554431/(s>>>0)|0)>>>0>>0){break}d=s<<7;h=Kt(oe(d,f)|0)|0;if((h|0)==0){p=-1;return p|0}l=Kt(s<<8)|0;do{if((l|0)!=0){b=hn(d,0,i,o)|0;v=Kt(b)|0;if((v|0)==0){Vt(l);break}b=oe(f<<7,s)|0;Dt(e,t,r,n,1,0,h,b);if((f|0)!=0){m=s<<7;g=0;do{Pt(h+(oe(m,g)|0)|0,s,i,o,v,l);g=g+1|0}while(g>>>0>>0)}Dt(e,t,h,b,1,0,c,u);Vt(v);Vt(l);Vt(h);p=0;return p|0}}while(0);Vt(h);p=-1;return p|0}}while(0);a[($e()|0)>>2]=12;p=-1;return p|0}function Pt(e,t,r,n,i,a){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;a=a|0;var o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0;o=t<<7;s=a+o|0;_t(a,e,o);if((r|0)==0&(n|0)==0){_t(e,a,o);return}f=o;c=0;u=0;d=0;do{l=hn(d,u,f,c)|0;_t(i+l|0,a,o);It(a,s,t);d=rn(d,u,1,0)|0;u=j}while(u>>>0>>0|u>>>0==n>>>0&d>>>0>>0);if((r|0)==0&(n|0)==0){_t(e,a,o);return}d=rn(r,n,-1,-1)|0;u=j;c=o;f=0;l=0;h=0;do{p=Ct(a,t)|0;b=hn(p&d,j&u,c,f)|0;xt(a,i+b|0,o);It(a,s,t);h=rn(h,l,1,0)|0;l=j}while(l>>>0>>0|l>>>0==n>>>0&h>>>0>>0);_t(e,a,o);return}function It(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,a=0,o=0,s=0,f=0,c=0;n=d;d=d+64|0;i=n|0;a=r<<1;_t(i,e+((r<<7)-64)|0,64);if((a|0)!=0){o=0;do{s=o<<6;xt(i,e+s|0,64);Ot(i);_t(t+s|0,i,64);o=o+1|0}while(o>>>0>>0)}if((r|0)==0){d=n;return}else{f=0}do{_t(e+(f<<6)|0,t+(f<<7)|0,64);f=f+1|0}while(f>>>0>>0);if((r|0)==0){d=n;return}else{c=0}do{_t(e+(c+r<<6)|0,t+(c<<7|64)|0,64);c=c+1|0}while(c>>>0>>0);d=n;return}function Ct(e,t){e=e|0;t=t|0;var r=0;r=kt(e+((t<<7)-64)|0)|0;return(j=j,r)|0}function Ot(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0,q=0,D=0,U=0,K=0,V=0,Y=0,W=0,X=0,G=0,Z=0,Q=0,$=0,J=0,ee=0,te=0;t=d;d=d+128|0;r=t|0;n=t+64|0;i=0;do{a[r+(i<<2)>>2]=St(e+(i<<2)|0)|0;i=i+1|0}while(i>>>0<16);i=r;o=n;Jr(o|0,i|0,64)|0;i=n|0;o=n+48|0;s=n+16|0;f=n+32|0;c=n+20|0;u=n+4|0;l=n+36|0;h=n+52|0;p=n+40|0;b=n+24|0;v=n+56|0;m=n+8|0;g=n+60|0;y=n+44|0;w=n+12|0;_=n+28|0;x=0;k=a[i>>2]|0;S=a[o>>2]|0;A=a[s>>2]|0;M=a[f>>2]|0;E=a[c>>2]|0;P=a[u>>2]|0;I=a[l>>2]|0;C=a[h>>2]|0;O=a[p>>2]|0;T=a[b>>2]|0;R=a[v>>2]|0;N=a[m>>2]|0;F=a[g>>2]|0;j=a[y>>2]|0;B=a[w>>2]|0;z=a[_>>2]|0;do{H=S+k|0;L=(H<<7|H>>>25)^A;H=L+k|0;q=(H<<9|H>>>23)^M;H=q+L|0;D=(H<<13|H>>>19)^S;H=D+q|0;U=(H<<18|H>>>14)^k;H=P+E|0;K=(H<<7|H>>>25)^I;H=K+E|0;V=(H<<9|H>>>23)^C;H=V+K|0;Y=(H<<13|H>>>19)^P;H=Y+V|0;W=(H<<18|H>>>14)^E;H=T+O|0;X=(H<<7|H>>>25)^R;H=X+O|0;G=(H<<9|H>>>23)^N;H=G+X|0;Z=(H<<13|H>>>19)^T;H=Z+G|0;Q=(H<<18|H>>>14)^O;H=j+F|0;$=(H<<7|H>>>25)^B;H=$+F|0;J=(H<<9|H>>>23)^z;H=J+$|0;ee=(H<<13|H>>>19)^j;H=ee+J|0;te=(H<<18|H>>>14)^F;H=$+U|0;P=(H<<7|H>>>25)^Y;Y=P+U|0;N=(Y<<9|Y>>>23)^G;G=N+P|0;B=(G<<13|G>>>19)^$;$=B+N|0;k=($<<18|$>>>14)^U;U=L+W|0;T=(U<<7|U>>>25)^Z;Z=T+W|0;z=(Z<<9|Z>>>23)^J;J=z+T|0;A=(J<<13|J>>>19)^L;L=A+z|0;E=(L<<18|L>>>14)^W;W=K+Q|0;j=(W<<7|W>>>25)^ee;ee=j+Q|0;M=(ee<<9|ee>>>23)^q;q=M+j|0;I=(q<<13|q>>>19)^K;K=I+M|0;O=(K<<18|K>>>14)^Q;Q=X+te|0;S=(Q<<7|Q>>>25)^D;D=S+te|0;C=(D<<9|D>>>23)^V;V=C+S|0;R=(V<<13|V>>>19)^X;X=R+C|0;F=(X<<18|X>>>14)^te;x=x+2|0}while(x>>>0<8);a[i>>2]=k;a[o>>2]=S;a[s>>2]=A;a[f>>2]=M;a[c>>2]=E;a[u>>2]=P;a[l>>2]=I;a[h>>2]=C;a[p>>2]=O;a[b>>2]=T;a[v>>2]=R;a[m>>2]=N;a[g>>2]=F;a[y>>2]=j;a[w>>2]=B;a[_>>2]=z;z=r|0;a[z>>2]=(a[z>>2]|0)+(a[n>>2]|0);z=r+4|0;a[z>>2]=(a[z>>2]|0)+(a[n+4>>2]|0);z=r+8|0;a[z>>2]=(a[z>>2]|0)+(a[n+8>>2]|0);z=r+12|0;a[z>>2]=(a[z>>2]|0)+(a[n+12>>2]|0);z=r+16|0;a[z>>2]=(a[z>>2]|0)+(a[n+16>>2]|0);z=r+20|0;a[z>>2]=(a[z>>2]|0)+(a[n+20>>2]|0);z=r+24|0;a[z>>2]=(a[z>>2]|0)+(a[n+24>>2]|0);z=r+28|0;a[z>>2]=(a[z>>2]|0)+(a[n+28>>2]|0);z=r+32|0;a[z>>2]=(a[z>>2]|0)+(a[n+32>>2]|0);z=r+36|0;a[z>>2]=(a[z>>2]|0)+(a[n+36>>2]|0);z=r+40|0;a[z>>2]=(a[z>>2]|0)+(a[n+40>>2]|0);z=r+44|0;a[z>>2]=(a[z>>2]|0)+(a[n+44>>2]|0);z=r+48|0;a[z>>2]=(a[z>>2]|0)+(a[n+48>>2]|0);z=r+52|0;a[z>>2]=(a[z>>2]|0)+(a[n+52>>2]|0);z=r+56|0;a[z>>2]=(a[z>>2]|0)+(a[n+56>>2]|0);z=r+60|0;a[z>>2]=(a[z>>2]|0)+(a[n+60>>2]|0);n=0;do{At(e+(n<<2)|0,a[r+(n<<2)>>2]|0);n=n+1|0}while(n>>>0<16);d=t;return}function Tt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0,s=0,f=0,c=0,u=0;n=e+32|0;i=e+36|0;o=a[i>>2]|0;s=o>>>3&63;f=De(o|0,r<<3|0)|0;a[i>>2]=f;if(j){f=n|0;a[f>>2]=(a[f>>2]|0)+1}f=n|0;a[f>>2]=(a[f>>2]|0)+(r>>>29);f=64-s|0;n=e+40+s|0;if(f>>>0>r>>>0){Jr(n|0,t|0,r)|0;return}Jr(n|0,t|0,f)|0;n=e|0;s=e+40|0;Rt(n,s);e=t+f|0;t=r-f|0;if(t>>>0>63){f=t;r=e;while(1){Rt(n,r);i=r+64|0;o=f-64|0;if(o>>>0>63){f=o;r=i}else{c=o;u=i;break}}}else{c=t;u=e}Jr(s|0,u|0,c)|0;return}function Rt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0;r=d;d=d+288|0;n=r|0;i=r+256|0;o=n|0;Ut(o,t);t=16;do{s=a[n+(t-2<<2)>>2]|0;f=a[n+(t-15<<2)>>2]|0;a[n+(t<<2)>>2]=(a[n+(t-16<<2)>>2]|0)+(a[n+(t-7<<2)>>2]|0)+((s>>>19|s<<13)^s>>>10^(s>>>17|s<<15))+((f>>>18|f<<14)^f>>>3^(f>>>7|f<<25));t=t+1|0}while((t|0)<64);t=i;f=e;Jr(t|0,f|0,32)|0;f=i+28|0;t=i+16|0;s=a[t>>2]|0;c=i+20|0;u=i+24|0;l=a[u>>2]|0;h=(a[f>>2]|0)+1116352408+(a[o>>2]|0)+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+((l^a[c>>2])&s^l)|0;l=i|0;s=a[l>>2]|0;o=i+4|0;p=a[o>>2]|0;b=i+8|0;v=a[b>>2]|0;m=i+12|0;a[m>>2]=(a[m>>2]|0)+h;g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+h+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[c>>2]|0;s=(a[u>>2]|0)+1899447441+(a[n+4>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[u>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[c>>2]|0)-1245643825+(a[n+8>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[c>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-373957723+(a[n+12>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[l>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+961987163+(a[n+16>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1508970993+(a[n+20>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[u>>2]|0;p=a[l>>2]|0;h=(a[o>>2]|0)-1841331548+(a[n+24>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[c>>2]|0;v=a[f>>2]|0;s=(a[l>>2]|0)-1424204075+(a[n+28>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[l>>2]=h;v=a[t>>2]|0;p=a[u>>2]|0;g=(a[f>>2]|0)-670586216+(a[n+32>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[c>>2]|0;h=(a[u>>2]|0)+310598401+(a[n+36>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[u>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[c>>2]|0)+607225278+(a[n+40>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[c>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1426881987+(a[n+44>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[l>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1925078388+(a[n+48>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-2132889090+(a[n+52>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[u>>2]|0;p=a[l>>2]|0;g=(a[o>>2]|0)-1680079193+(a[n+56>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[c>>2]|0;v=a[f>>2]|0;h=(a[l>>2]|0)-1046744716+(a[n+60>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[l>>2]=g;v=a[t>>2]|0;p=a[u>>2]|0;s=(a[f>>2]|0)-459576895+(a[n+64>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[c>>2]|0;g=(a[u>>2]|0)-272742522+(a[n+68>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[u>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[c>>2]|0)+264347078+(a[n+72>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[c>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)+604807628+(a[n+76>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[l>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)+770255983+(a[n+80>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)+1249150122+(a[n+84>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[u>>2]|0;p=a[l>>2]|0;s=(a[o>>2]|0)+1555081692+(a[n+88>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[c>>2]|0;v=a[f>>2]|0;g=(a[l>>2]|0)+1996064986+(a[n+92>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[l>>2]=s;v=a[t>>2]|0;p=a[u>>2]|0;h=(a[f>>2]|0)-1740746414+(a[n+96>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[c>>2]|0;s=(a[u>>2]|0)-1473132947+(a[n+100>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[u>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[c>>2]|0)-1341970488+(a[n+104>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[c>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-1084653625+(a[n+108>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[l>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)-958395405+(a[n+112>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)-710438585+(a[n+116>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[u>>2]|0;p=a[l>>2]|0;h=(a[o>>2]|0)+113926993+(a[n+120>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[c>>2]|0;v=a[f>>2]|0;s=(a[l>>2]|0)+338241895+(a[n+124>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[l>>2]=h;v=a[t>>2]|0;p=a[u>>2]|0;g=(a[f>>2]|0)+666307205+(a[n+128>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[c>>2]|0;h=(a[u>>2]|0)+773529912+(a[n+132>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[u>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[c>>2]|0)+1294757372+(a[n+136>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[c>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1396182291+(a[n+140>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[l>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1695183700+(a[n+144>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)+1986661051+(a[n+148>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[u>>2]|0;p=a[l>>2]|0;g=(a[o>>2]|0)-2117940946+(a[n+152>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[c>>2]|0;v=a[f>>2]|0;h=(a[l>>2]|0)-1838011259+(a[n+156>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[l>>2]=g;v=a[t>>2]|0;p=a[u>>2]|0;s=(a[f>>2]|0)-1564481375+(a[n+160>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[c>>2]|0;g=(a[u>>2]|0)-1474664885+(a[n+164>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[u>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[c>>2]|0)-1035236496+(a[n+168>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[c>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)-949202525+(a[n+172>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[l>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)-778901479+(a[n+176>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)-694614492+(a[n+180>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[u>>2]|0;p=a[l>>2]|0;s=(a[o>>2]|0)-200395387+(a[n+184>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[c>>2]|0;v=a[f>>2]|0;g=(a[l>>2]|0)+275423344+(a[n+188>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[l>>2]=s;v=a[t>>2]|0;p=a[u>>2]|0;h=(a[f>>2]|0)+430227734+(a[n+192>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[c>>2]|0;s=(a[u>>2]|0)+506948616+(a[n+196>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[u>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[c>>2]|0)+659060556+(a[n+200>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[c>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)+883997877+(a[n+204>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[l>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+958139571+(a[n+208>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1322822218+(a[n+212>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[u>>2]|0;p=a[l>>2]|0;h=(a[o>>2]|0)+1537002063+(a[n+216>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[c>>2]|0;v=a[f>>2]|0;s=(a[l>>2]|0)+1747873779+(a[n+220>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[u>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[l>>2]=h;v=a[t>>2]|0;p=a[u>>2]|0;g=(a[f>>2]|0)+1955562222+(a[n+224>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[c>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[c>>2]|0;h=(a[u>>2]|0)+2024104815+(a[n+228>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[l>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[u>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[c>>2]|0)-2067236844+(a[n+232>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[l>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[c>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)-1933114872+(a[n+236>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[u>>2]|0;p=a[f>>2]|0;a[l>>2]=(a[l>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[l>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)-1866530822+(a[n+240>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[c>>2]|0;v=a[u>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-1538233109+(a[n+244>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[l>>2])&p^v)|0;v=a[t>>2]|0;p=a[c>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[u>>2]|0;p=a[l>>2]|0;g=(a[o>>2]|0)-1090935817+(a[n+248>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;o=a[c>>2]|0;c=a[f>>2]|0;f=(a[l>>2]|0)-965641998+(a[n+252>>2]|0)+((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+((c^a[u>>2])&o^c)|0;c=a[b>>2]|0;b=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+f;t=f+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((b|c)&s|b&c)|0;a[l>>2]=t;a[e>>2]=(a[e>>2]|0)+t;t=e+4|0;a[t>>2]=(a[t>>2]|0)+(a[i+4>>2]|0);t=e+8|0;a[t>>2]=(a[t>>2]|0)+(a[i+8>>2]|0);t=e+12|0;a[t>>2]=(a[t>>2]|0)+(a[i+12>>2]|0);t=e+16|0;a[t>>2]=(a[t>>2]|0)+(a[i+16>>2]|0);t=e+20|0;a[t>>2]=(a[t>>2]|0)+(a[i+20>>2]|0);t=e+24|0;a[t>>2]=(a[t>>2]|0)+(a[i+24>>2]|0);t=e+28|0;a[t>>2]=(a[t>>2]|0)+(a[i+28>>2]|0);d=r;return}function Nt(e,t){e=e|0;t=t|0;n[e+3|0]=t&255;n[e+2|0]=t>>>8&255;n[e+1|0]=t>>>16&255;n[e]=t>>>24&255;return}function Ft(e){e=e|0;return(o[e+2|0]|0)<<8|(o[e+3|0]|0)|(o[e+1|0]|0)<<16|(o[e]|0)<<24|0}function jt(e,t){e=e|0;t=t|0;Bt(t);zt(e,t|0,32);en(t|0,0,104);return}function Bt(e){e=e|0;var t=0,r=0,n=0;t=d;d=d+8|0;r=t|0;zt(r,e+32|0,8);n=(a[e+36>>2]|0)>>>3&63;Tt(e,720,(n>>>0<56?56:120)-n|0);Tt(e,r,8);d=t;return}function zt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=r>>>2;if((n|0)==0){return}else{i=0}do{Nt(e+(i<<2)|0,a[t+(i<<2)>>2]|0);i=i+1|0}while(i>>>0>>0);return}function Ht(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0,o=0,s=0,f=0,c=0,u=0;i=d;d=d+96|0;a=i|0;if(r>>>0>64){o=e|0;Mt(o);Tt(o,t,r);s=i+64|0;jt(s,o);f=s;c=32}else{f=t;c=r}r=e|0;Mt(r);t=a|0;en(t|0,54,64);if((c|0)!=0){s=0;do{o=a+s|0;n[o]=n[o]^n[f+s|0];s=s+1|0}while(s>>>0>>0)}Tt(r,t,64);r=e+104|0;Mt(r);en(t|0,92,64);if((c|0)==0){Tt(r,t,64);d=i;return}else{u=0}do{e=a+u|0;n[e]=n[e]^n[f+u|0];u=u+1|0}while(u>>>0>>0);Tt(r,t,64);d=i;return}function Lt(e,t,r){e=e|0;t=t|0;r=r|0;Tt(e|0,t,r);return}function qt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;d=d+32|0;n=r|0;jt(n,t|0);i=t+104|0;Tt(i,n,32);jt(e,i);d=r;return}function Dt(e,t,r,i,a,o,s,f){e=e|0;t=t|0;r=r|0;i=i|0;a=a|0;o=o|0;s=s|0;f=f|0;var c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0;c=d;d=d+488|0;u=c|0;l=c+208|0;h=c+424|0;p=c+456|0;Ht(u,e,t);Lt(u,r,i);if((f|0)==0){d=c;return}i=c+416|0;r=l;b=u;u=h|0;v=p|0;m=0;g=o>>>0>>0|o>>>0==m>>>0&a>>>0<2>>>0;m=0;y=0;do{m=m+1|0;Nt(i,m);Jr(r|0,b|0,208)|0;Lt(l,i,4);qt(u,l);Jr(v|0,u|0,32)|0;if(!g){w=0;_=2;do{Ht(l,e,t);Lt(l,u,32);qt(u,l);x=0;do{k=p+x|0;n[k]=n[k]^n[h+x|0];x=x+1|0}while((x|0)<32);_=rn(_,w,1,0)|0;w=j}while(!(w>>>0>o>>>0|w>>>0==o>>>0&_>>>0>a>>>0))}_=f-y|0;w=_>>>0>32?32:_;_=s+y|0;Jr(_|0,v|0,w)|0;y=m<<5}while(y>>>0>>0);d=c;return}function Ut(e,t){e=e|0;t=t|0;var r=0;r=0;do{a[e+(r<<2)>>2]=Ft(t+(r<<2)|0)|0;r=r+1|0}while(r>>>0<16);return}function Kt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0,q=0,D=0,U=0,K=0,V=0,Y=0,W=0,X=0,G=0,Z=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0,ie=0,ae=0,oe=0,se=0,fe=0,ce=0,ue=0,de=0,le=0,he=0,pe=0,be=0,ve=0,me=0,ge=0,ye=0,_e=0,xe=0,Se=0,Ae=0,Me=0,Ee=0,Pe=0,Ie=0,Ce=0,Oe=0,Te=0,Re=0,Ne=0;do{if(e>>>0<245){if(e>>>0<11){t=16}else{t=e+11&-8}r=t>>>3;n=a[208]|0;i=n>>>(r>>>0);if((i&3|0)!=0){o=(i&1^1)+r|0;s=o<<1;f=872+(s<<2)|0;c=872+(s+2<<2)|0;s=a[c>>2]|0;u=s+8|0;d=a[u>>2]|0;do{if((f|0)==(d|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}l=d+12|0;if((a[l>>2]|0)==(s|0)){a[l>>2]=f;a[c>>2]=d;break}else{ke();return 0}}}while(0);d=o<<3;a[s+4>>2]=d|3;c=s+(d|4)|0;a[c>>2]=a[c>>2]|1;h=u;return h|0}if(t>>>0<=(a[210]|0)>>>0){p=t;break}if((i|0)!=0){c=2<>>12&16;f=c>>>(d>>>0);c=f>>>5&8;l=f>>>(c>>>0);f=l>>>2&4;b=l>>>(f>>>0);l=b>>>1&2;v=b>>>(l>>>0);b=v>>>1&1;m=(c|d|f|l|b)+(v>>>(b>>>0))|0;b=m<<1;v=872+(b<<2)|0;l=872+(b+2<<2)|0;b=a[l>>2]|0;f=b+8|0;d=a[f>>2]|0;do{if((v|0)==(d|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}c=d+12|0;if((a[c>>2]|0)==(b|0)){a[c>>2]=v;a[l>>2]=d;break}else{ke();return 0}}}while(0);d=m<<3;l=d-t|0;a[b+4>>2]=t|3;v=b;n=v+t|0;a[v+(t|4)>>2]=l|1;a[v+d>>2]=l;d=a[210]|0;if((d|0)!=0){v=a[213]|0;r=d>>>3;d=r<<1;i=872+(d<<2)|0;u=a[208]|0;s=1<>2]|0;if(o>>>0>=(a[212]|0)>>>0){g=o;y=r;break}ke();return 0}}while(0);a[y>>2]=v;a[g+12>>2]=v;a[v+8>>2]=g;a[v+12>>2]=i}a[210]=l;a[213]=n;h=f;return h|0}d=a[209]|0;if((d|0)==0){p=t;break}s=(d&-d)-1|0;d=s>>>12&16;u=s>>>(d>>>0);s=u>>>5&8;b=u>>>(s>>>0);u=b>>>2&4;m=b>>>(u>>>0);b=m>>>1&2;r=m>>>(b>>>0);m=r>>>1&1;o=a[1136+((s|d|u|b|m)+(r>>>(m>>>0))<<2)>>2]|0;m=o;r=o;b=(a[o+4>>2]&-8)-t|0;while(1){o=a[m+16>>2]|0;if((o|0)==0){u=a[m+20>>2]|0;if((u|0)==0){break}else{w=u}}else{w=o}o=(a[w+4>>2]&-8)-t|0;u=o>>>0>>0;m=w;r=u?w:r;b=u?o:b}m=r;f=a[212]|0;if(m>>>0>>0){ke();return 0}n=m+t|0;l=n;if(m>>>0>=n>>>0){ke();return 0}n=a[r+24>>2]|0;i=a[r+12>>2]|0;do{if((i|0)==(r|0)){v=r+20|0;o=a[v>>2]|0;if((o|0)==0){u=r+16|0;d=a[u>>2]|0;if((d|0)==0){_=0;break}else{x=d;k=u}}else{x=o;k=v}while(1){v=x+20|0;o=a[v>>2]|0;if((o|0)!=0){x=o;k=v;continue}v=x+16|0;o=a[v>>2]|0;if((o|0)==0){break}else{x=o;k=v}}if(k>>>0>>0){ke();return 0}else{a[k>>2]=0;_=x;break}}else{v=a[r+8>>2]|0;if(v>>>0>>0){ke();return 0}o=v+12|0;if((a[o>>2]|0)!=(r|0)){ke();return 0}u=i+8|0;if((a[u>>2]|0)==(r|0)){a[o>>2]=i;a[u>>2]=v;_=i;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){i=r+28|0;f=1136+(a[i>>2]<<2)|0;do{if((r|0)==(a[f>>2]|0)){a[f>>2]=_;if((_|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}v=n+16|0;if((a[v>>2]|0)==(r|0)){a[v>>2]=_}else{a[n+20>>2]=_}if((_|0)==0){break e}}}while(0);if(_>>>0<(a[212]|0)>>>0){ke();return 0}a[_+24>>2]=n;i=a[r+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+16>>2]=i;a[i+24>>2]=_;break}}}while(0);i=a[r+20>>2]|0;if((i|0)==0){break}if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+20>>2]=i;a[i+24>>2]=_;break}}}while(0);if(b>>>0<16){n=b+t|0;a[r+4>>2]=n|3;i=m+(n+4)|0;a[i>>2]=a[i>>2]|1}else{a[r+4>>2]=t|3;a[m+(t|4)>>2]=b|1;a[m+(b+t)>>2]=b;i=a[210]|0;if((i|0)!=0){n=a[213]|0;f=i>>>3;i=f<<1;v=872+(i<<2)|0;u=a[208]|0;o=1<>2]|0;if(d>>>0>=(a[212]|0)>>>0){S=d;A=f;break}ke();return 0}}while(0);a[A>>2]=n;a[S+12>>2]=n;a[n+8>>2]=S;a[n+12>>2]=v}a[210]=b;a[213]=l}i=r+8|0;if((i|0)==0){p=t;break}else{h=i}return h|0}else{if(e>>>0>4294967231){p=-1;break}i=e+11|0;o=i&-8;u=a[209]|0;if((u|0)==0){p=o;break}m=-o|0;f=i>>>8;do{if((f|0)==0){M=0}else{if(o>>>0>16777215){M=31;break}i=(f+1048320|0)>>>16&8;d=f<>>16&4;c=d<>>16&2;E=14-(s|i|d)+(c<>>15)|0;M=o>>>((E+7|0)>>>0)&1|E<<1}}while(0);f=a[1136+(M<<2)>>2]|0;e:do{if((f|0)==0){P=0;I=m;C=0}else{if((M|0)==31){O=0}else{O=25-(M>>>1)|0}r=0;l=m;b=f;v=o<>2]&-8;d=E-o|0;if(d>>>0>>0){if((E|0)==(o|0)){P=b;I=d;C=b;break e}else{T=b;R=d}}else{T=r;R=l}d=a[b+20>>2]|0;E=a[b+16+(v>>>31<<2)>>2]|0;c=(d|0)==0|(d|0)==(E|0)?n:d;if((E|0)==0){P=T;I=R;C=c;break}else{r=T;l=R;b=E;v=v<<1;n=c}}}}while(0);if((C|0)==0&(P|0)==0){f=2<>>12&16;n=f>>>(m>>>0);f=n>>>5&8;v=n>>>(f>>>0);n=v>>>2&4;b=v>>>(n>>>0);v=b>>>1&2;l=b>>>(v>>>0);b=l>>>1&1;N=a[1136+((f|m|n|v|b)+(l>>>(b>>>0))<<2)>>2]|0}else{N=C}if((N|0)==0){F=I;j=P}else{b=N;l=I;v=P;while(1){n=(a[b+4>>2]&-8)-o|0;m=n>>>0>>0;f=m?n:l;n=m?b:v;m=a[b+16>>2]|0;if((m|0)!=0){b=m;l=f;v=n;continue}m=a[b+20>>2]|0;if((m|0)==0){F=f;j=n;break}else{b=m;l=f;v=n}}}if((j|0)==0){p=o;break}if(F>>>0>=((a[210]|0)-o|0)>>>0){p=o;break}v=j;l=a[212]|0;if(v>>>0>>0){ke();return 0}b=v+o|0;u=b;if(v>>>0>=b>>>0){ke();return 0}n=a[j+24>>2]|0;f=a[j+12>>2]|0;do{if((f|0)==(j|0)){m=j+20|0;r=a[m>>2]|0;if((r|0)==0){c=j+16|0;E=a[c>>2]|0;if((E|0)==0){B=0;break}else{z=E;H=c}}else{z=r;H=m}while(1){m=z+20|0;r=a[m>>2]|0;if((r|0)!=0){z=r;H=m;continue}m=z+16|0;r=a[m>>2]|0;if((r|0)==0){break}else{z=r;H=m}}if(H>>>0>>0){ke();return 0}else{a[H>>2]=0;B=z;break}}else{m=a[j+8>>2]|0;if(m>>>0>>0){ke();return 0}r=m+12|0;if((a[r>>2]|0)!=(j|0)){ke();return 0}c=f+8|0;if((a[c>>2]|0)==(j|0)){a[r>>2]=f;a[c>>2]=m;B=f;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){f=j+28|0;l=1136+(a[f>>2]<<2)|0;do{if((j|0)==(a[l>>2]|0)){a[l>>2]=B;if((B|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}m=n+16|0;if((a[m>>2]|0)==(j|0)){a[m>>2]=B}else{a[n+20>>2]=B}if((B|0)==0){break e}}}while(0);if(B>>>0<(a[212]|0)>>>0){ke();return 0}a[B+24>>2]=n;f=a[j+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[B+16>>2]=f;a[f+24>>2]=B;break}}}while(0);f=a[j+20>>2]|0;if((f|0)==0){break}if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[B+20>>2]=f;a[f+24>>2]=B;break}}}while(0);do{if(F>>>0<16){n=F+o|0;a[j+4>>2]=n|3;f=v+(n+4)|0;a[f>>2]=a[f>>2]|1}else{a[j+4>>2]=o|3;a[v+(o|4)>>2]=F|1;a[v+(F+o)>>2]=F;f=F>>>3;if(F>>>0<256){n=f<<1;l=872+(n<<2)|0;m=a[208]|0;c=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){L=r;q=f;break}ke();return 0}}while(0);a[q>>2]=u;a[L+12>>2]=u;a[v+(o+8)>>2]=L;a[v+(o+12)>>2]=l;break}n=b;c=F>>>8;do{if((c|0)==0){D=0}else{if(F>>>0>16777215){D=31;break}m=(c+1048320|0)>>>16&8;f=c<>>16&4;E=f<>>16&2;d=14-(r|m|f)+(E<>>15)|0;D=F>>>((d+7|0)>>>0)&1|d<<1}}while(0);c=1136+(D<<2)|0;a[v+(o+28)>>2]=D;a[v+(o+20)>>2]=0;a[v+(o+16)>>2]=0;l=a[209]|0;d=1<>2]=n;a[v+(o+24)>>2]=c;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}if((D|0)==31){U=0}else{U=25-(D>>>1)|0}d=F<>2]|0;while(1){if((a[l+4>>2]&-8|0)==(F|0)){break}K=l+16+(d>>>31<<2)|0;c=a[K>>2]|0;if((c|0)==0){V=262;break}else{d=d<<1;l=c}}if((V|0)==262){if(K>>>0<(a[212]|0)>>>0){ke();return 0}else{a[K>>2]=n;a[v+(o+24)>>2]=l;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}}d=l+8|0;c=a[d>>2]|0;f=a[212]|0;if(l>>>0>>0){ke();return 0}if(c>>>0>>0){ke();return 0}else{a[c+12>>2]=n;a[d>>2]=n;a[v+(o+8)>>2]=c;a[v+(o+12)>>2]=l;a[v+(o+24)>>2]=0;break}}}while(0);v=j+8|0;if((v|0)==0){p=o;break}else{h=v}return h|0}}while(0);j=a[210]|0;if(p>>>0<=j>>>0){K=j-p|0;F=a[213]|0;if(K>>>0>15){U=F;a[213]=U+p;a[210]=K;a[U+(p+4)>>2]=K|1;a[U+j>>2]=K;a[F+4>>2]=p|3}else{a[210]=0;a[213]=0;a[F+4>>2]=j|3;K=F+(j+4)|0;a[K>>2]=a[K>>2]|1}h=F+8|0;return h|0}F=a[211]|0;if(p>>>0>>0){K=F-p|0;a[211]=K;F=a[214]|0;j=F;a[214]=j+p;a[j+(p+4)>>2]=K|1;a[F+4>>2]=p|3;h=F+8|0;return h|0}do{if((a[200]|0)==0){F=we(8)|0;if((F-1&F|0)==0){a[202]=F;a[201]=F;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);F=p+48|0;K=a[202]|0;j=p+47|0;U=K+j|0;D=-K|0;K=U&D;if(K>>>0<=p>>>0){h=0;return h|0}L=a[318]|0;do{if((L|0)!=0){q=a[316]|0;B=q+K|0;if(B>>>0<=q>>>0|B>>>0>L>>>0){h=0}else{break}return h|0}}while(0);e:do{if((a[319]&4|0)==0){L=a[214]|0;t:do{if((L|0)==0){V=292}else{B=L;q=1280;while(1){Y=q|0;z=a[Y>>2]|0;if(z>>>0<=B>>>0){W=q+4|0;if((z+(a[W>>2]|0)|0)>>>0>B>>>0){break}}z=a[q+8>>2]|0;if((z|0)==0){V=292;break t}else{q=z}}if((q|0)==0){V=292;break}B=U-(a[211]|0)&D;if(B>>>0>=2147483647){X=0;break}l=Ze(B|0)|0;n=(l|0)==((a[Y>>2]|0)+(a[W>>2]|0)|0);G=n?l:-1;Z=n?B:0;Q=l;$=B;V=301}}while(0);do{if((V|0)==292){L=Ze(0)|0;if((L|0)==-1){X=0;break}o=L;B=a[201]|0;l=B-1|0;if((l&o|0)==0){J=K}else{J=K-o+(l+o&-B)|0}B=a[316]|0;o=B+J|0;if(!(J>>>0>p>>>0&J>>>0<2147483647)){X=0;break}l=a[318]|0;if((l|0)!=0){if(o>>>0<=B>>>0|o>>>0>l>>>0){X=0;break}}l=Ze(J|0)|0;o=(l|0)==(L|0);G=o?L:-1;Z=o?J:0;Q=l;$=J;V=301}}while(0);t:do{if((V|0)==301){l=-$|0;if((G|0)!=-1){ee=Z;te=G;V=312;break e}do{if((Q|0)!=-1&$>>>0<2147483647&$>>>0>>0){o=a[202]|0;L=j-$+o&-o;if(L>>>0>=2147483647){re=$;break}if((Ze(L|0)|0)==-1){Ze(l|0)|0;X=Z;break t}else{re=L+$|0;break}}else{re=$}}while(0);if((Q|0)==-1){X=Z}else{ee=re;te=Q;V=312;break e}}}while(0);a[319]=a[319]|4;ne=X;V=309}else{ne=0;V=309}}while(0);do{if((V|0)==309){if(K>>>0>=2147483647){break}X=Ze(K|0)|0;Q=Ze(0)|0;if(!((Q|0)!=-1&(X|0)!=-1&X>>>0>>0)){break}re=Q-X|0;Q=re>>>0>(p+40|0)>>>0;Z=Q?X:-1;if((Z|0)!=-1){ee=Q?re:ne;te=Z;V=312}}}while(0);do{if((V|0)==312){ne=(a[316]|0)+ee|0;a[316]=ne;if(ne>>>0>(a[317]|0)>>>0){a[317]=ne}ne=a[214]|0;e:do{if((ne|0)==0){K=a[212]|0;if((K|0)==0|te>>>0>>0){a[212]=te}a[320]=te;a[321]=ee;a[323]=0;a[217]=a[200];a[216]=-1;K=0;do{Z=K<<1;re=872+(Z<<2)|0;a[872+(Z+3<<2)>>2]=re;a[872+(Z+2<<2)>>2]=re;K=K+1|0}while(K>>>0<32);K=te+8|0;if((K&7|0)==0){ie=0}else{ie=-K&7}K=ee-40-ie|0;a[214]=te+ie;a[211]=K;a[te+(ie+4)>>2]=K|1;a[te+(ee-36)>>2]=40;a[215]=a[204]}else{K=1280;while(1){ae=a[K>>2]|0;oe=K+4|0;se=a[oe>>2]|0;if((te|0)==(ae+se|0)){V=324;break}re=a[K+8>>2]|0;if((re|0)==0){break}else{K=re}}do{if((V|0)==324){if((a[K+12>>2]&8|0)!=0){break}re=ne;if(!(re>>>0>=ae>>>0&re>>>0>>0)){break}a[oe>>2]=se+ee;re=a[214]|0;Z=(a[211]|0)+ee|0;Q=re;X=re+8|0;if((X&7|0)==0){fe=0}else{fe=-X&7}X=Z-fe|0;a[214]=Q+fe;a[211]=X;a[Q+(fe+4)>>2]=X|1;a[Q+(Z+4)>>2]=40;a[215]=a[204];break e}}while(0);if(te>>>0<(a[212]|0)>>>0){a[212]=te}K=te+ee|0;Z=1280;while(1){ce=Z|0;if((a[ce>>2]|0)==(K|0)){V=334;break}Q=a[Z+8>>2]|0;if((Q|0)==0){break}else{Z=Q}}do{if((V|0)==334){if((a[Z+12>>2]&8|0)!=0){break}a[ce>>2]=te;K=Z+4|0;a[K>>2]=(a[K>>2]|0)+ee;K=te+8|0;if((K&7|0)==0){ue=0}else{ue=-K&7}K=te+(ee+8)|0;if((K&7|0)==0){de=0}else{de=-K&7}K=te+(de+ee)|0;Q=K;X=ue+p|0;re=te+X|0;$=re;j=K-(te+ue)-p|0;a[te+(ue+4)>>2]=p|3;do{if((Q|0)==(a[214]|0)){F=(a[211]|0)+j|0;a[211]=F;a[214]=$;a[te+(X+4)>>2]=F|1}else{if((Q|0)==(a[213]|0)){F=(a[210]|0)+j|0;a[210]=F;a[213]=$;a[te+(X+4)>>2]=F|1;a[te+(F+X)>>2]=F;break}F=ee+4|0;G=a[te+(F+de)>>2]|0;if((G&3|0)==1){J=G&-8;W=G>>>3;t:do{if(G>>>0<256){Y=a[te+((de|8)+ee)>>2]|0;D=a[te+(ee+12+de)>>2]|0;U=872+(W<<1<<2)|0;do{if((Y|0)!=(U|0)){if(Y>>>0<(a[212]|0)>>>0){ke();return 0}if((a[Y+12>>2]|0)==(Q|0)){break}ke();return 0}}while(0);if((D|0)==(Y|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke();return 0}l=D+8|0;if((a[l>>2]|0)==(Q|0)){le=l;break}ke();return 0}}while(0);a[Y+12>>2]=D;a[le>>2]=Y}else{U=K;l=a[te+((de|24)+ee)>>2]|0;q=a[te+(ee+12+de)>>2]|0;do{if((q|0)==(U|0)){L=de|16;o=te+(F+L)|0;B=a[o>>2]|0;if((B|0)==0){n=te+(L+ee)|0;L=a[n>>2]|0;if((L|0)==0){he=0;break}else{pe=L;be=n}}else{pe=B;be=o}while(1){o=pe+20|0;B=a[o>>2]|0;if((B|0)!=0){pe=B;be=o;continue}o=pe+16|0;B=a[o>>2]|0;if((B|0)==0){break}else{pe=B;be=o}}if(be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[be>>2]=0;he=pe;break}}else{o=a[te+((de|8)+ee)>>2]|0;if(o>>>0<(a[212]|0)>>>0){ke();return 0}B=o+12|0;if((a[B>>2]|0)!=(U|0)){ke();return 0}n=q+8|0;if((a[n>>2]|0)==(U|0)){a[B>>2]=q;a[n>>2]=o;he=q;break}else{ke();return 0}}}while(0);if((l|0)==0){break}q=te+(ee+28+de)|0;Y=1136+(a[q>>2]<<2)|0;do{if((U|0)==(a[Y>>2]|0)){a[Y>>2]=he;if((he|0)!=0){break}a[209]=a[209]&~(1<>2]);break t}else{if(l>>>0<(a[212]|0)>>>0){ke();return 0}D=l+16|0;if((a[D>>2]|0)==(U|0)){a[D>>2]=he}else{a[l+20>>2]=he}if((he|0)==0){break t}}}while(0);if(he>>>0<(a[212]|0)>>>0){ke();return 0}a[he+24>>2]=l;U=de|16;q=a[te+(U+ee)>>2]|0;do{if((q|0)!=0){if(q>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+16>>2]=q;a[q+24>>2]=he;break}}}while(0);q=a[te+(F+U)>>2]|0;if((q|0)==0){break}if(q>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+20>>2]=q;a[q+24>>2]=he;break}}}while(0);ve=te+((J|de)+ee)|0;me=J+j|0}else{ve=Q;me=j}F=ve+4|0;a[F>>2]=a[F>>2]&-2;a[te+(X+4)>>2]=me|1;a[te+(me+X)>>2]=me;F=me>>>3;if(me>>>0<256){W=F<<1;G=872+(W<<2)|0;q=a[208]|0;l=1<>2]|0;if(Y>>>0>=(a[212]|0)>>>0){ge=Y;ye=F;break}ke();return 0}}while(0);a[ye>>2]=$;a[ge+12>>2]=$;a[te+(X+8)>>2]=ge;a[te+(X+12)>>2]=G;break}W=re;l=me>>>8;do{if((l|0)==0){_e=0}else{if(me>>>0>16777215){_e=31;break}q=(l+1048320|0)>>>16&8;J=l<>>16&4;Y=J<>>16&2;D=14-(F|q|J)+(Y<>>15)|0;_e=me>>>((D+7|0)>>>0)&1|D<<1}}while(0);l=1136+(_e<<2)|0;a[te+(X+28)>>2]=_e;a[te+(X+20)>>2]=0;a[te+(X+16)>>2]=0;G=a[209]|0;D=1<<_e;if((G&D|0)==0){a[209]=G|D;a[l>>2]=W;a[te+(X+24)>>2]=l;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}if((_e|0)==31){xe=0}else{xe=25-(_e>>>1)|0}D=me<>2]|0;while(1){if((a[G+4>>2]&-8|0)==(me|0)){break}Se=G+16+(D>>>31<<2)|0;l=a[Se>>2]|0;if((l|0)==0){V=407;break}else{D=D<<1;G=l}}if((V|0)==407){if(Se>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Se>>2]=W;a[te+(X+24)>>2]=G;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}}D=G+8|0;l=a[D>>2]|0;J=a[212]|0;if(G>>>0>>0){ke();return 0}if(l>>>0>>0){ke();return 0}else{a[l+12>>2]=W;a[D>>2]=W;a[te+(X+8)>>2]=l;a[te+(X+12)>>2]=G;a[te+(X+24)>>2]=0;break}}}while(0);h=te+(ue|8)|0;return h|0}}while(0);Z=ne;X=1280;while(1){Ae=a[X>>2]|0;if(Ae>>>0<=Z>>>0){Me=a[X+4>>2]|0;Ee=Ae+Me|0;if(Ee>>>0>Z>>>0){break}}X=a[X+8>>2]|0}X=Ae+(Me-39)|0;if((X&7|0)==0){Pe=0}else{Pe=-X&7}X=Ae+(Me-47+Pe)|0;re=X>>>0<(ne+16|0)>>>0?Z:X;X=re+8|0;$=te+8|0;if(($&7|0)==0){Ie=0}else{Ie=-$&7}$=ee-40-Ie|0;a[214]=te+Ie;a[211]=$;a[te+(Ie+4)>>2]=$|1;a[te+(ee-36)>>2]=40;a[215]=a[204];a[re+4>>2]=27;a[X>>2]=a[320];a[X+4>>2]=a[1284>>2];a[X+8>>2]=a[1288>>2];a[X+12>>2]=a[1292>>2];a[320]=te;a[321]=ee;a[323]=0;a[322]=X;X=re+28|0;a[X>>2]=7;if((re+32|0)>>>0>>0){$=X;while(1){X=$+4|0;a[X>>2]=7;if(($+8|0)>>>0>>0){$=X}else{break}}}if((re|0)==(Z|0)){break}$=re-ne|0;X=Z+($+4)|0;a[X>>2]=a[X>>2]&-2;a[ne+4>>2]=$|1;a[Z+$>>2]=$;X=$>>>3;if($>>>0<256){j=X<<1;Q=872+(j<<2)|0;K=a[208]|0;l=1<>2]|0;if(D>>>0>=(a[212]|0)>>>0){Ce=D;Oe=X;break}ke();return 0}}while(0);a[Oe>>2]=ne;a[Ce+12>>2]=ne;a[ne+8>>2]=Ce;a[ne+12>>2]=Q;break}j=ne;l=$>>>8;do{if((l|0)==0){Te=0}else{if($>>>0>16777215){Te=31;break}K=(l+1048320|0)>>>16&8;Z=l<>>16&4;X=Z<>>16&2;D=14-(re|K|Z)+(X<>>15)|0;Te=$>>>((D+7|0)>>>0)&1|D<<1}}while(0);l=1136+(Te<<2)|0;a[ne+28>>2]=Te;a[ne+20>>2]=0;a[ne+16>>2]=0;Q=a[209]|0;D=1<>2]=j;a[ne+24>>2]=l;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}if((Te|0)==31){Re=0}else{Re=25-(Te>>>1)|0}D=$<>2]|0;while(1){if((a[Q+4>>2]&-8|0)==($|0)){break}Ne=Q+16+(D>>>31<<2)|0;l=a[Ne>>2]|0;if((l|0)==0){V=442;break}else{D=D<<1;Q=l}}if((V|0)==442){if(Ne>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Ne>>2]=j;a[ne+24>>2]=Q;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}}D=Q+8|0;$=a[D>>2]|0;l=a[212]|0;if(Q>>>0>>0){ke();return 0}if($>>>0>>0){ke();return 0}else{a[$+12>>2]=j;a[D>>2]=j;a[ne+8>>2]=$;a[ne+12>>2]=Q;a[ne+24>>2]=0;break}}}while(0);ne=a[211]|0;if(ne>>>0<=p>>>0){break}$=ne-p|0;a[211]=$;ne=a[214]|0;D=ne;a[214]=D+p;a[D+(p+4)>>2]=$|1;a[ne+4>>2]=p|3;h=ne+8|0;return h|0}}while(0);a[($e()|0)>>2]=12;h=0;return h|0}function Vt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0;if((e|0)==0){return}t=e-8|0;r=t;n=a[212]|0;if(t>>>0>>0){ke()}i=a[e-4>>2]|0;o=i&3;if((o|0)==1){ke()}s=i&-8;f=e+(s-8)|0;c=f;e:do{if((i&1|0)==0){u=a[t>>2]|0;if((o|0)==0){return}d=-8-u|0;l=e+d|0;h=l;p=u+s|0;if(l>>>0>>0){ke()}if((h|0)==(a[213]|0)){b=e+(s-4)|0;if((a[b>>2]&3|0)!=3){v=h;m=p;break}a[210]=p;a[b>>2]=a[b>>2]&-2;a[e+(d+4)>>2]=p|1;a[f>>2]=p;return}b=u>>>3;if(u>>>0<256){u=a[e+(d+8)>>2]|0;g=a[e+(d+12)>>2]|0;y=872+(b<<1<<2)|0;do{if((u|0)!=(y|0)){if(u>>>0>>0){ke()}if((a[u+12>>2]|0)==(h|0)){break}ke()}}while(0);if((g|0)==(u|0)){a[208]=a[208]&~(1<>>0>>0){ke()}_=g+8|0;if((a[_>>2]|0)==(h|0)){w=_;break}ke()}}while(0);a[u+12>>2]=g;a[w>>2]=u;v=h;m=p;break}y=l;b=a[e+(d+24)>>2]|0;_=a[e+(d+12)>>2]|0;do{if((_|0)==(y|0)){x=e+(d+20)|0;k=a[x>>2]|0;if((k|0)==0){S=e+(d+16)|0;A=a[S>>2]|0;if((A|0)==0){M=0;break}else{E=A;P=S}}else{E=k;P=x}while(1){x=E+20|0;k=a[x>>2]|0;if((k|0)!=0){E=k;P=x;continue}x=E+16|0;k=a[x>>2]|0;if((k|0)==0){break}else{E=k;P=x}}if(P>>>0>>0){ke()}else{a[P>>2]=0;M=E;break}}else{x=a[e+(d+8)>>2]|0;if(x>>>0>>0){ke()}k=x+12|0;if((a[k>>2]|0)!=(y|0)){ke()}S=_+8|0;if((a[S>>2]|0)==(y|0)){a[k>>2]=_;a[S>>2]=x;M=_;break}else{ke()}}}while(0);if((b|0)==0){v=h;m=p;break}_=e+(d+28)|0;l=1136+(a[_>>2]<<2)|0;do{if((y|0)==(a[l>>2]|0)){a[l>>2]=M;if((M|0)!=0){break}a[209]=a[209]&~(1<>2]);v=h;m=p;break e}else{if(b>>>0<(a[212]|0)>>>0){ke()}u=b+16|0;if((a[u>>2]|0)==(y|0)){a[u>>2]=M}else{a[b+20>>2]=M}if((M|0)==0){v=h;m=p;break e}}}while(0);if(M>>>0<(a[212]|0)>>>0){ke()}a[M+24>>2]=b;y=a[e+(d+16)>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+16>>2]=y;a[y+24>>2]=M;break}}}while(0);y=a[e+(d+20)>>2]|0;if((y|0)==0){v=h;m=p;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+20>>2]=y;a[y+24>>2]=M;v=h;m=p;break}}else{v=r;m=s}}while(0);r=v;if(r>>>0>=f>>>0){ke()}M=e+(s-4)|0;n=a[M>>2]|0;if((n&1|0)==0){ke()}do{if((n&2|0)==0){if((c|0)==(a[214]|0)){E=(a[211]|0)+m|0;a[211]=E;a[214]=v;a[v+4>>2]=E|1;if((v|0)==(a[213]|0)){a[213]=0;a[210]=0}if(E>>>0<=(a[215]|0)>>>0){return}Qt(0)|0;return}if((c|0)==(a[213]|0)){E=(a[210]|0)+m|0;a[210]=E;a[213]=v;a[v+4>>2]=E|1;a[r+E>>2]=E;return}E=(n&-8)+m|0;P=n>>>3;e:do{if(n>>>0<256){w=a[e+s>>2]|0;o=a[e+(s|4)>>2]|0;t=872+(P<<1<<2)|0;do{if((w|0)!=(t|0)){if(w>>>0<(a[212]|0)>>>0){ke()}if((a[w+12>>2]|0)==(c|0)){break}ke()}}while(0);if((o|0)==(w|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke()}i=o+8|0;if((a[i>>2]|0)==(c|0)){I=i;break}ke()}}while(0);a[w+12>>2]=o;a[I>>2]=w}else{t=f;i=a[e+(s+16)>>2]|0;y=a[e+(s|4)>>2]|0;do{if((y|0)==(t|0)){b=e+(s+12)|0;_=a[b>>2]|0;if((_|0)==0){l=e+(s+8)|0;u=a[l>>2]|0;if((u|0)==0){C=0;break}else{O=u;T=l}}else{O=_;T=b}while(1){b=O+20|0;_=a[b>>2]|0;if((_|0)!=0){O=_;T=b;continue}b=O+16|0;_=a[b>>2]|0;if((_|0)==0){break}else{O=_;T=b}}if(T>>>0<(a[212]|0)>>>0){ke()}else{a[T>>2]=0;C=O;break}}else{b=a[e+s>>2]|0;if(b>>>0<(a[212]|0)>>>0){ke()}_=b+12|0;if((a[_>>2]|0)!=(t|0)){ke()}l=y+8|0;if((a[l>>2]|0)==(t|0)){a[_>>2]=y;a[l>>2]=b;C=y;break}else{ke()}}}while(0);if((i|0)==0){break}y=e+(s+20)|0;w=1136+(a[y>>2]<<2)|0;do{if((t|0)==(a[w>>2]|0)){a[w>>2]=C;if((C|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(i>>>0<(a[212]|0)>>>0){ke()}o=i+16|0;if((a[o>>2]|0)==(t|0)){a[o>>2]=C}else{a[i+20>>2]=C}if((C|0)==0){break e}}}while(0);if(C>>>0<(a[212]|0)>>>0){ke()}a[C+24>>2]=i;t=a[e+(s+8)>>2]|0;do{if((t|0)!=0){if(t>>>0<(a[212]|0)>>>0){ke()}else{a[C+16>>2]=t;a[t+24>>2]=C;break}}}while(0);t=a[e+(s+12)>>2]|0;if((t|0)==0){break}if(t>>>0<(a[212]|0)>>>0){ke()}else{a[C+20>>2]=t;a[t+24>>2]=C;break}}}while(0);a[v+4>>2]=E|1;a[r+E>>2]=E;if((v|0)!=(a[213]|0)){R=E;break}a[210]=E;return}else{a[M>>2]=n&-2;a[v+4>>2]=m|1;a[r+m>>2]=m;R=m}}while(0);m=R>>>3;if(R>>>0<256){r=m<<1;n=872+(r<<2)|0;M=a[208]|0;C=1<>2]|0;if(s>>>0>=(a[212]|0)>>>0){N=s;F=m;break}ke()}}while(0);a[F>>2]=v;a[N+12>>2]=v;a[v+8>>2]=N;a[v+12>>2]=n;return}n=v;N=R>>>8;do{if((N|0)==0){j=0}else{if(R>>>0>16777215){j=31;break}F=(N+1048320|0)>>>16&8;r=N<>>16&4;M=r<>>16&2;m=14-(C|F|r)+(M<>>15)|0;j=R>>>((m+7|0)>>>0)&1|m<<1}}while(0);N=1136+(j<<2)|0;a[v+28>>2]=j;a[v+20>>2]=0;a[v+16>>2]=0;m=a[209]|0;r=1<>2]=n;a[v+24>>2]=N;a[v+12>>2]=v;a[v+8>>2]=v}else{if((j|0)==31){B=0}else{B=25-(j>>>1)|0}M=R<>2]|0;while(1){if((a[F+4>>2]&-8|0)==(R|0)){break}z=F+16+(M>>>31<<2)|0;C=a[z>>2]|0;if((C|0)==0){H=621;break}else{M=M<<1;F=C}}if((H|0)==621){if(z>>>0<(a[212]|0)>>>0){ke()}else{a[z>>2]=n;a[v+24>>2]=F;a[v+12>>2]=v;a[v+8>>2]=v;break}}M=F+8|0;E=a[M>>2]|0;C=a[212]|0;if(F>>>0>>0){ke()}if(E>>>0>>0){ke()}else{a[E+12>>2]=n;a[M>>2]=n;a[v+8>>2]=E;a[v+12>>2]=F;a[v+24>>2]=0;break}}}while(0);v=(a[216]|0)-1|0;a[216]=v;if((v|0)==0){L=1288}else{return}while(1){v=a[L>>2]|0;if((v|0)==0){break}else{L=v+8|0}}a[216]=-1;return}function Yt(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((e|0)==0){r=0}else{n=oe(t,e)|0;if((t|e)>>>0<=65535){r=n;break}r=((n>>>0)/(e>>>0)|0|0)==(t|0)?n:-1}}while(0);t=Kt(r)|0;if((t|0)==0){return t|0}if((a[t-4>>2]&3|0)==0){return t|0}en(t|0,0,r|0);return t|0}function Wt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0;if((e|0)==0){r=Kt(t)|0;return r|0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;r=0;return r|0}if(t>>>0<11){n=16}else{n=t+11&-8}i=$t(e-8|0,n)|0;if((i|0)!=0){r=i+8|0;return r|0}i=Kt(t)|0;if((i|0)==0){r=0;return r|0}n=a[e-4>>2]|0;o=(n&-8)-((n&3|0)==0?8:4)|0;n=o>>>0>>0?o:t;Jr(i|0,e|0,n)|0;Vt(e);r=i;return r|0}function Xt(e,t){e=e|0;t=t|0;var r=0;if((e|0)==0){return 0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;return 0}if(t>>>0<11){r=16}else{r=t+11&-8}t=e-8|0;return(($t(t,r)|0)==(t|0)?e:0)|0}function Gt(e,t){e=e|0;t=t|0;var r=0;if(e>>>0<9){r=Kt(t)|0;return r|0}else{r=Zt(e,t)|0;return r|0}return 0}function Zt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0;r=e>>>0<16?16:e;if((r-1&r|0)==0){n=r}else{e=16;while(1){if(e>>>0>>0){e=e<<1}else{n=e;break}}}if((-64-n|0)>>>0<=t>>>0){a[($e()|0)>>2]=12;i=0;return i|0}if(t>>>0<11){o=16}else{o=t+11&-8}t=Kt(n+12+o|0)|0;if((t|0)==0){i=0;return i|0}e=t-8|0;r=e;s=n-1|0;do{if((t&s|0)==0){f=r}else{c=t+s&-n;u=c-8|0;d=e;if((u-d|0)>>>0>15){l=u}else{l=c+(n-8)|0}c=l;u=l-d|0;d=t-4|0;h=a[d>>2]|0;p=(h&-8)-u|0;if((h&3|0)==0){a[l>>2]=(a[e>>2]|0)+u;a[l+4>>2]=p;f=c;break}else{h=l+4|0;a[h>>2]=p|a[h>>2]&1|2;h=l+(p+4)|0;a[h>>2]=a[h>>2]|1;a[d>>2]=u|a[d>>2]&1|2;d=t+(u-4)|0;a[d>>2]=a[d>>2]|1;vr(r,u);f=c;break}}}while(0);r=f+4|0;t=a[r>>2]|0;do{if((t&3|0)!=0){l=t&-8;if(l>>>0<=(o+16|0)>>>0){break}e=l-o|0;n=f;a[r>>2]=o|t&1|2;a[n+(o|4)>>2]=e|3;s=n+(l|4)|0;a[s>>2]=a[s>>2]|1;vr(n+o|0,e)}}while(0);i=f+8|0;return i|0}function Qt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if(e>>>0>=4294967232){r=0;return r|0}t=a[214]|0;if((t|0)==0){r=0;return r|0}n=a[211]|0;do{if(n>>>0>(e+40|0)>>>0){i=a[202]|0;o=oe((((-40-e-1+n+i|0)>>>0)/(i>>>0)|0)-1|0,i)|0;s=t;f=1280;while(1){c=a[f>>2]|0;if(c>>>0<=s>>>0){if((c+(a[f+4>>2]|0)|0)>>>0>s>>>0){u=f;break}}c=a[f+8>>2]|0;if((c|0)==0){u=0;break}else{f=c}}if((a[u+12>>2]&8|0)!=0){break}f=Ze(0)|0;s=u+4|0;if((f|0)!=((a[u>>2]|0)+(a[s>>2]|0)|0)){break}c=Ze(-(o>>>0>2147483646?-2147483648-i|0:o)|0)|0;d=Ze(0)|0;if(!((c|0)!=-1&d>>>0>>0)){break}c=f-d|0;if((f|0)==(d|0)){break}a[s>>2]=(a[s>>2]|0)-c;a[316]=(a[316]|0)-c;s=a[214]|0;l=(a[211]|0)-c|0;c=s;h=s+8|0;if((h&7|0)==0){p=0}else{p=-h&7}h=l-p|0;a[214]=c+p;a[211]=h;a[c+(p+4)>>2]=h|1;a[c+(l+4)>>2]=40;a[215]=a[204];r=(f|0)!=(d|0)|0;return r|0}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){r=0;return r|0}a[215]=-1;r=0;return r|0}function $t(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0;r=e+4|0;n=a[r>>2]|0;i=n&-8;o=e;s=o+i|0;f=s;c=a[212]|0;if(o>>>0>>0){ke();return 0}u=n&3;if(!((u|0)!=1&o>>>0>>0)){ke();return 0}d=o+(i|4)|0;l=a[d>>2]|0;if((l&1|0)==0){ke();return 0}if((u|0)==0){if(t>>>0<256){h=0;return h|0}do{if(i>>>0>=(t+4|0)>>>0){if((i-t|0)>>>0>a[202]<<1>>>0){break}else{h=e}return h|0}}while(0);h=0;return h|0}if(i>>>0>=t>>>0){u=i-t|0;if(u>>>0<=15){h=e;return h|0}a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=u|3;a[d>>2]=a[d>>2]|1;vr(o+t|0,u);h=e;return h|0}if((f|0)==(a[214]|0)){u=(a[211]|0)+i|0;if(u>>>0<=t>>>0){h=0;return h|0}d=u-t|0;a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=d|1;a[214]=o+t;a[211]=d;h=e;return h|0}if((f|0)==(a[213]|0)){d=(a[210]|0)+i|0;if(d>>>0>>0){h=0;return h|0}u=d-t|0;if(u>>>0>15){a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=u|1;a[o+d>>2]=u;p=o+(d+4)|0;a[p>>2]=a[p>>2]&-2;b=o+t|0;v=u}else{a[r>>2]=n&1|d|2;n=o+(d+4)|0;a[n>>2]=a[n>>2]|1;b=0;v=0}a[210]=v;a[213]=b;h=e;return h|0}if((l&2|0)!=0){h=0;return h|0}b=(l&-8)+i|0;if(b>>>0>>0){h=0;return h|0}v=b-t|0;n=l>>>3;e:do{if(l>>>0<256){d=a[o+(i+8)>>2]|0;u=a[o+(i+12)>>2]|0;p=872+(n<<1<<2)|0;do{if((d|0)!=(p|0)){if(d>>>0>>0){ke();return 0}if((a[d+12>>2]|0)==(f|0)){break}ke();return 0}}while(0);if((u|0)==(d|0)){a[208]=a[208]&~(1<>>0>>0){ke();return 0}g=u+8|0;if((a[g>>2]|0)==(f|0)){m=g;break}ke();return 0}}while(0);a[d+12>>2]=u;a[m>>2]=d}else{p=s;g=a[o+(i+24)>>2]|0;y=a[o+(i+12)>>2]|0;do{if((y|0)==(p|0)){w=o+(i+20)|0;_=a[w>>2]|0;if((_|0)==0){x=o+(i+16)|0;k=a[x>>2]|0;if((k|0)==0){S=0;break}else{A=k;M=x}}else{A=_;M=w}while(1){w=A+20|0;_=a[w>>2]|0;if((_|0)!=0){A=_;M=w;continue}w=A+16|0;_=a[w>>2]|0;if((_|0)==0){break}else{A=_;M=w}}if(M>>>0>>0){ke();return 0}else{a[M>>2]=0;S=A;break}}else{w=a[o+(i+8)>>2]|0;if(w>>>0>>0){ke();return 0}_=w+12|0;if((a[_>>2]|0)!=(p|0)){ke();return 0}x=y+8|0;if((a[x>>2]|0)==(p|0)){a[_>>2]=y;a[x>>2]=w;S=y;break}else{ke();return 0}}}while(0);if((g|0)==0){break}y=o+(i+28)|0;d=1136+(a[y>>2]<<2)|0;do{if((p|0)==(a[d>>2]|0)){a[d>>2]=S;if((S|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(g>>>0<(a[212]|0)>>>0){ke();return 0}u=g+16|0;if((a[u>>2]|0)==(p|0)){a[u>>2]=S}else{a[g+20>>2]=S}if((S|0)==0){break e}}}while(0);if(S>>>0<(a[212]|0)>>>0){ke();return 0}a[S+24>>2]=g;p=a[o+(i+16)>>2]|0;do{if((p|0)!=0){if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[S+16>>2]=p;a[p+24>>2]=S;break}}}while(0);p=a[o+(i+20)>>2]|0;if((p|0)==0){break}if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[S+20>>2]=p;a[p+24>>2]=S;break}}}while(0);if(v>>>0<16){a[r>>2]=b|a[r>>2]&1|2;S=o+(b|4)|0;a[S>>2]=a[S>>2]|1;h=e;return h|0}else{a[r>>2]=a[r>>2]&1|t|2;a[o+(t+4)>>2]=v|3;r=o+(b|4)|0;a[r>>2]=a[r>>2]|1;vr(o+t|0,v);h=e;return h|0}return 0}function Jt(){return a[316]|0}function er(){return a[317]|0}function tr(){var e=0;e=a[318]|0;return((e|0)==0?-1:e)|0}function rr(e){e=e|0;var t=0,r=0;if((e|0)==-1){t=0}else{r=a[202]|0;t=e-1+r&-r}a[318]=t;return t|0}function nr(e){e=e|0;var t=0,r=0,n=0;do{if((e|0)==0){t=0}else{r=a[e-4>>2]|0;n=r&3;if((n|0)==1){t=0;break}t=(r&-8)-((n|0)==0?8:4)|0}}while(0);return t|0}function ir(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0;do{if((t|0)==8){n=Kt(r)|0}else{i=t>>>2;if((t&3|0)!=0|(i|0)==0){o=22;return o|0}if((i+1073741823&i|0)!=0){o=22;return o|0}if((-64-t|0)>>>0>>0){o=12;return o|0}else{n=Zt(t>>>0<16?16:t,r)|0;break}}}while(0);if((n|0)==0){o=12;return o|0}a[e>>2]=n;o=0;return o|0}function ar(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=d;d=d+8|0;i=n|0;a[i>>2]=t;t=cr(e,i,3,r)|0;d=n;return t|0}function or(e,t,r){e=e|0;t=t|0;r=r|0;return cr(e,t,0,r)|0}function sr(e){e=e|0;var t=0,r=0,n=0;if((a[200]|0)!=0){t=a[201]|0;r=Gt(t,e)|0;return r|0}n=we(8)|0;if((n-1&n|0)!=0){ke();return 0}a[202]=n;a[201]=n;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=a[201]|0;r=Gt(t,e)|0;return r|0}function fr(e){e=e|0;var t=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);t=a[201]|0;return Gt(t,e-1+t&-t)|0}function cr(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0;do{if((a[200]|0)==0){i=we(8)|0;if((i-1&i|0)==0){a[202]=i;a[201]=i;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);i=(e|0)==0;do{if((n|0)==0){if(i){o=Kt(0)|0;return o|0}else{s=e<<2;if(s>>>0<11){f=0;c=16;break}f=0;c=s+11&-8;break}}else{if(i){o=n}else{f=n;c=0;break}return o|0}}while(0);do{if((r&1|0)==0){if(i){u=0;d=0;break}else{l=0;h=0}while(1){n=a[t+(h<<2)>>2]|0;if(n>>>0<11){p=16}else{p=n+11&-8}n=p+l|0;s=h+1|0;if((s|0)==(e|0)){u=0;d=n;break}else{l=n;h=s}}}else{s=a[t>>2]|0;if(s>>>0<11){b=16}else{b=s+11&-8}u=b;d=oe(b,e)|0}}while(0);b=Kt(c-4+d|0)|0;if((b|0)==0){o=0;return o|0}h=b-8|0;l=a[b-4>>2]&-8;if((r&2|0)!=0){en(b|0,0,-4-c+l|0)}if((f|0)==0){a[b+(d-4)>>2]=l-d|3;v=b+d|0;m=d}else{v=f;m=l}a[v>>2]=b;b=e-1|0;e:do{if((b|0)==0){g=h;y=m}else{if((u|0)==0){w=h;_=m;x=0}else{e=h;l=m;f=0;while(1){d=l-u|0;a[e+4>>2]=u|3;c=e+u|0;r=f+1|0;a[v+(r<<2)>>2]=e+(u+8);if((r|0)==(b|0)){g=c;y=d;break e}else{e=c;l=d;f=r}}}while(1){f=a[t+(x<<2)>>2]|0;if(f>>>0<11){k=16}else{k=f+11&-8}f=_-k|0;a[w+4>>2]=k|3;l=w+k|0;e=x+1|0;a[v+(e<<2)>>2]=w+(k+8);if((e|0)==(b|0)){g=l;y=f;break}else{w=l;_=f;x=e}}}}while(0);a[g+4>>2]=y|3;o=v;return o|0}function ur(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0;r=e+(t<<2)|0;e:do{if((t|0)!=0){n=e;t:while(1){i=a[n>>2]|0;r:do{if((i|0)==0){o=n+4|0}else{s=i-8|0;f=s;c=i-4|0;u=a[c>>2]&-8;a[n>>2]=0;if(s>>>0<(a[212]|0)>>>0){d=935;break t}s=a[c>>2]|0;if((s&3|0)==1){d=936;break t}l=n+4|0;h=s-8&-8;do{if((l|0)!=(r|0)){if((a[l>>2]|0)!=(i+(h+8)|0)){break}p=(a[i+(h|4)>>2]&-8)+u|0;a[c>>2]=s&1|p|2;b=i+(p-4)|0;a[b>>2]=a[b>>2]|1;a[l>>2]=i;o=l;break r}}while(0);vr(f,u);o=l}}while(0);if((o|0)==(r|0)){break e}else{n=o}}if((d|0)==935){ke();return 0}else if((d|0)==936){ke();return 0}}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){return 0}Qt(0)|0;return 0}function dr(e){e=e|0;var t=0,r=0;if((a[200]|0)!=0){t=Qt(e)|0;return t|0}r=we(8)|0;if((r-1&r|0)!=0){ke();return 0}a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=Qt(e)|0;return t|0}function lr(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0;o=0;s=0;f=0;c=0}else{u=a[211]|0;d=u+40|0;l=1;h=d;p=d;d=1280;while(1){b=a[d>>2]|0;v=b+8|0;if((v&7|0)==0){m=0}else{m=-v&7}v=b+(a[d+4>>2]|0)|0;g=l;y=h;w=p;_=b+m|0;while(1){if(_>>>0>=v>>>0|(_|0)==(t|0)){x=g;k=y;S=w;break}A=a[_+4>>2]|0;if((A|0)==7){x=g;k=y;S=w;break}M=A&-8;E=M+w|0;if((A&3|0)==1){P=M+y|0;I=g+1|0}else{P=y;I=g}A=_+M|0;if(A>>>0>>0){x=I;k=P;S=E;break}else{g=I;y=P;w=E;_=A}}_=a[d+8>>2]|0;if((_|0)==0){break}else{l=x;h=k;p=S;d=_}}d=a[316]|0;r=u;n=S;i=x;o=d-S|0;s=a[317]|0;f=d-k|0;c=k}a[e>>2]=n;a[e+4>>2]=i;i=e+8|0;a[i>>2]=0;a[i+4>>2]=0;a[e+16>>2]=o;a[e+20>>2]=s;a[e+24>>2]=0;a[e+28>>2]=f;a[e+32>>2]=c;a[e+36>>2]=r;return}function hr(){var e=0,t=0,r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,g=0,y=0,w=0;e=d;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0}else{o=a[317]|0;s=a[316]|0;f=s-40-(a[211]|0)|0;c=1280;while(1){u=a[c>>2]|0;l=u+8|0;if((l&7|0)==0){h=0}else{h=-l&7}l=u+(a[c+4>>2]|0)|0;p=f;b=u+h|0;while(1){if(b>>>0>=l>>>0|(b|0)==(t|0)){v=p;break}g=a[b+4>>2]|0;if((g|0)==7){v=p;break}y=g&-8;w=p-((g&3|0)==1?y:0)|0;g=b+y|0;if(g>>>0>>0){v=w;break}else{p=w;b=g}}b=a[c+8>>2]|0;if((b|0)==0){r=v;n=s;i=o;break}else{f=v;c=b}}}Se(a[m>>2]|0,520,(E=d,d=d+8|0,a[E>>2]=i,E)|0)|0;Se(a[m>>2]|0,488,(E=d,d=d+8|0,a[E>>2]=n,E)|0)|0;Se(a[m>>2]|0,400,(E=d,d=d+8|0,a[E>>2]=r,E)|0)|0;d=e;return}function pr(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((a[200]|0)==0){r=we(8)|0;if((r-1&r|0)==0){a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if((e|0)==(-1|0)){a[204]=t;n=1;return n|0}else if((e|0)==(-2|0)){if((a[201]|0)>>>0>t>>>0){n=0;return n|0}if((t-1&t|0)!=0){n=0;return n|0}a[202]=t;n=1;return n|0}else if((e|0)==(-3|0)){a[203]=t;n=1;return n|0}else{n=0;return n|0}return 0}function br(){return(N=a[328]|0,a[328]=N+0,N)|0}function vr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0;r=e;n=r+t|0;i=n;o=a[e+4>>2]|0;e:do{if((o&1|0)==0){s=a[e>>2]|0;if((o&3|0)==0){return}f=r+(-s|0)|0;c=f;u=s+t|0;d=a[212]|0;if(f>>>0>>0){ke()}if((c|0)==(a[213]|0)){l=r+(t+4)|0;if((a[l>>2]&3|0)!=3){h=c;p=u;break}a[210]=u;a[l>>2]=a[l>>2]&-2;a[r+(4-s)>>2]=u|1;a[n>>2]=u;return}l=s>>>3;if(s>>>0<256){b=a[r+(8-s)>>2]|0;v=a[r+(12-s)>>2]|0;m=872+(l<<1<<2)|0;do{if((b|0)!=(m|0)){if(b>>>0>>0){ke()}if((a[b+12>>2]|0)==(c|0)){break}ke()}}while(0);if((v|0)==(b|0)){a[208]=a[208]&~(1<>>0>>0){ke()}y=v+8|0;if((a[y>>2]|0)==(c|0)){g=y;break}ke()}}while(0);a[b+12>>2]=v;a[g>>2]=b;h=c;p=u;break}m=f;l=a[r+(24-s)>>2]|0;y=a[r+(12-s)>>2]|0;do{if((y|0)==(m|0)){w=16-s|0;_=r+(w+4)|0;x=a[_>>2]|0;if((x|0)==0){k=r+w|0;w=a[k>>2]|0;if((w|0)==0){S=0;break}else{A=w;M=k}}else{A=x;M=_}while(1){_=A+20|0;x=a[_>>2]|0;if((x|0)!=0){A=x;M=_;continue}_=A+16|0;x=a[_>>2]|0;if((x|0)==0){break}else{A=x;M=_}}if(M>>>0>>0){ke()}else{a[M>>2]=0;S=A;break}}else{_=a[r+(8-s)>>2]|0;if(_>>>0>>0){ke()}x=_+12|0;if((a[x>>2]|0)!=(m|0)){ke()}k=y+8|0;if((a[k>>2]|0)==(m|0)){a[x>>2]=y;a[k>>2]=_;S=y;break}else{ke()}}}while(0);if((l|0)==0){h=c;p=u;break}y=r+(28-s)|0;d=1136+(a[y>>2]<<2)|0;do{if((m|0)==(a[d>>2]|0)){a[d>>2]=S;if((S|0)!=0){break}a[209]=a[209]&~(1<>2]);h=c;p=u;break e}else{if(l>>>0<(a[212]|0)>>>0){ke()}f=l+16|0;if((a[f>>2]|0)==(m|0)){a[f>>2]=S}else{a[l+20>>2]=S}if((S|0)==0){h=c;p=u;break e}}}while(0);if(S>>>0<(a[212]|0)>>>0){ke()}a[S+24>>2]=l;m=16-s|0;y=a[r+m>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[S+16>>2]=y;a[y+24>>2]=S;break}}}while(0);y=a[r+(m+4)>>2]|0;if((y|0)==0){h=c;p=u;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[S+20>>2]=y;a[y+24>>2]=S;h=c;p=u;break}}else{h=e;p=t}}while(0);e=a[212]|0;if(n>>>0>>0){ke()}S=r+(t+4)|0;A=a[S>>2]|0;do{if((A&2|0)==0){if((i|0)==(a[214]|0)){M=(a[211]|0)+p|0;a[211]=M;a[214]=h;a[h+4>>2]=M|1;if((h|0)!=(a[213]|0)){return}a[213]=0;a[210]=0;return}if((i|0)==(a[213]|0)){M=(a[210]|0)+p|0;a[210]=M;a[213]=h;a[h+4>>2]=M|1;a[h+M>>2]=M;return}M=(A&-8)+p|0;g=A>>>3;e:do{if(A>>>0<256){o=a[r+(t+8)>>2]|0;y=a[r+(t+12)>>2]|0;s=872+(g<<1<<2)|0;do{if((o|0)!=(s|0)){if(o>>>0>>0){ke()}if((a[o+12>>2]|0)==(i|0)){break}ke()}}while(0);if((y|0)==(o|0)){a[208]=a[208]&~(1<>>0>>0){ke()}l=y+8|0;if((a[l>>2]|0)==(i|0)){E=l;break}ke()}}while(0);a[o+12>>2]=y;a[E>>2]=o}else{s=n;l=a[r+(t+24)>>2]|0;d=a[r+(t+12)>>2]|0;do{if((d|0)==(s|0)){f=r+(t+20)|0;b=a[f>>2]|0;if((b|0)==0){v=r+(t+16)|0;_=a[v>>2]|0;if((_|0)==0){P=0;break}else{I=_;C=v}}else{I=b;C=f}while(1){f=I+20|0;b=a[f>>2]|0;if((b|0)!=0){I=b;C=f;continue}f=I+16|0;b=a[f>>2]|0;if((b|0)==0){break}else{I=b;C=f}}if(C>>>0>>0){ke()}else{a[C>>2]=0;P=I;break}}else{f=a[r+(t+8)>>2]|0;if(f>>>0>>0){ke()}b=f+12|0;if((a[b>>2]|0)!=(s|0)){ke()}v=d+8|0;if((a[v>>2]|0)==(s|0)){a[b>>2]=d;a[v>>2]=f;P=d;break}else{ke()}}}while(0);if((l|0)==0){break}d=r+(t+28)|0;o=1136+(a[d>>2]<<2)|0;do{if((s|0)==(a[o>>2]|0)){a[o>>2]=P;if((P|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(l>>>0<(a[212]|0)>>>0){ke()}y=l+16|0;if((a[y>>2]|0)==(s|0)){a[y>>2]=P}else{a[l+20>>2]=P}if((P|0)==0){break e}}}while(0);if(P>>>0<(a[212]|0)>>>0){ke()}a[P+24>>2]=l;s=a[r+(t+16)>>2]|0;do{if((s|0)!=0){if(s>>>0<(a[212]|0)>>>0){ke()}else{a[P+16>>2]=s;a[s+24>>2]=P;break}}}while(0);s=a[r+(t+20)>>2]|0;if((s|0)==0){break}if(s>>>0<(a[212]|0)>>>0){ke()}else{a[P+20>>2]=s;a[s+24>>2]=P;break}}}while(0);a[h+4>>2]=M|1;a[h+M>>2]=M;if((h|0)!=(a[213]|0)){O=M;break}a[210]=M;return}else{a[S>>2]=A&-2;a[h+4>>2]=p|1;a[h+p>>2]=p;O=p}}while(0);p=O>>>3;if(O>>>0<256){A=p<<1;S=872+(A<<2)|0;P=a[208]|0;t=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){T=r;R=p;break}ke()}}while(0);a[R>>2]=h;a[T+12>>2]=h;a[h+8>>2]=T;a[h+12>>2]=S;return}S=h;T=O>>>8;do{if((T|0)==0){N=0}else{if(O>>>0>16777215){N=31;break}R=(T+1048320|0)>>>16&8;A=T<>>16&4;P=A<>>16&2;p=14-(t|R|A)+(P<>>15)|0;N=O>>>((p+7|0)>>>0)&1|p<<1}}while(0);T=1136+(N<<2)|0;a[h+28>>2]=N;a[h+20>>2]=0;a[h+16>>2]=0;p=a[209]|0;A=1<>2]=S;a[h+24>>2]=T;a[h+12>>2]=h;a[h+8>>2]=h;return}if((N|0)==31){F=0}else{F=25-(N>>>1)|0}N=O<>2]|0;while(1){if((a[F+4>>2]&-8|0)==(O|0)){break}j=F+16+(N>>>31<<2)|0;T=a[j>>2]|0;if((T|0)==0){B=1120;break}else{N=N<<1;F=T}}if((B|0)==1120){if(j>>>0<(a[212]|0)>>>0){ke()}a[j>>2]=S;a[h+24>>2]=F;a[h+12>>2]=h;a[h+8>>2]=h;return}j=F+8|0;B=a[j>>2]|0;N=a[212]|0;if(F>>>0>>0){ke()}if(B>>>0>>0){ke()}a[B+12>>2]=S;a[j>>2]=S;a[h+8>>2]=B;a[h+12>>2]=F;a[h+24>>2]=0;return}function mr(e){e=e|0;var t=0,r=0,n=0;t=(e|0)==0?1:e;while(1){r=Kt(t)|0;if((r|0)!=0){n=1164;break}e=(N=a[328]|0,a[328]=N+0,N);if((e|0)==0){break}Rn[e&1]()}if((n|0)==1164){return r|0}r=ze(4)|0;a[r>>2]=560;_e(r|0,688,6);return 0}function gr(e,t){e=e|0;t=t|0;return mr(e)|0}function yr(e){e=e|0;return}function wr(e){e=e|0;return 360|0}function _r(e){e=e|0;return 448|0}function xr(e){e=e|0;return(N=a[328]|0,a[328]=e,N)|0}function kr(e){e=e|0;a[e>>2]=560;return}function Sr(e){e=e|0;a[e>>2]=592;return}function Ar(e){e=e|0;if((e|0)!=0){Vt(e)}return}function Mr(e,t){e=e|0;t=t|0;Ar(e);return}function Er(e){e=e|0;Ar(e);return}function Pr(e,t){e=e|0;t=t|0;Er(e);return}function Ir(e){e=e|0;Ar(e);return}function Cr(e){e=e|0;Ar(e);return}function Or(e,t,r){e=e|0;t=t|0;r=r|0;return Tr(e,t,r,0,0,0)|0}function Tr(e,t,r,i,o,s){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;s=s|0;var f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0,L=0,q=0,D=0,U=0,K=0,V=0,Y=0,W=0,X=0,G=0,Z=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0;f=d;if((r|0)==0){c=-1;d=f;return c|0}u=a[44]|0;if((u|0)==0){a[196]=1;a[44]=1;l=1;h=1;p=1190}else{b=a[196]|0;v=a[74]|0;if((v|0)==-1|(b|0)!=0){l=b;h=u;p=1190}else{m=v;g=b;y=u}}if((p|0)==1190){u=(Ke(344)|0)!=0|0;a[74]=u;m=u;g=l;y=h}h=n[r]|0;if(h<<24>>24==45){w=s|2;p=1194}else{l=(m|0)!=0|h<<24>>24==43?s&-2:s;if(h<<24>>24==43){w=l;p=1194}else{_=r;x=l}}if((p|0)==1194){_=r+1|0;x=w}a[198]=0;if((g|0)==0){k=y;p=1198}else{a[50]=-1;a[48]=-1;S=y;A=g;p=1197}while(1){if((p|0)==1197){p=0;if((A|0)==0){k=S;p=1198;continue}else{M=S}}else if((p|0)==1198){p=0;g=a[40]|0;if((n[g]|0)==0){M=k}else{P=g;I=k;break}}a[196]=0;if((M|0)>=(e|0)){p=1200;break}C=t+(M<<2)|0;O=a[C>>2]|0;a[40]=O;if((n[O]|0)==45){T=O+1|0;R=n[T]|0;if(R<<24>>24!=0){p=1232;break}if((Ce(_|0,45)|0)!=0){p=1232;break}}a[40]=824;if((x&2|0)!=0){p=1217;break}if((x&1|0)==0){c=-1;p=1298;break}g=a[48]|0;do{if((g|0)==-1){a[48]=M;N=M;F=0}else{y=a[50]|0;if((y|0)==-1){N=M;F=0;break}w=y-g|0;r=M-y|0;l=(w|0)%(r|0)|0;if((l|0)==0){j=r}else{h=r;s=l;while(1){l=(h|0)%(s|0)|0;if((l|0)==0){j=s;break}else{h=s;s=l}}}s=(M-g|0)/(j|0)|0;do{if((j|0)>0){h=-w|0;if((s|0)>0){B=0}else{z=M;H=y;L=g;q=0;break}do{l=B+y|0;m=t+(l<<2)|0;u=0;b=l;l=a[m>>2]|0;while(1){v=((b|0)<(y|0)?r:h)+b|0;D=t+(v<<2)|0;U=a[D>>2]|0;a[D>>2]=l;a[m>>2]=U;D=u+1|0;if((D|0)<(s|0)){u=D;b=v;l=U}else{break}}B=B+1|0}while((B|0)<(j|0));z=a[44]|0;H=a[50]|0;L=a[48]|0;q=a[196]|0}else{z=M;H=y;L=g;q=0}}while(0);a[48]=z-H+L;a[50]=-1;N=z;F=q}}while(0);g=N+1|0;a[44]=g;S=g;A=F;p=1197}do{if((p|0)==1298){d=f;return c|0}else if((p|0)==1232){F=a[48]|0;A=a[50]|0;if((F|0)!=-1&(A|0)==-1){a[50]=M;K=n[T]|0;V=M}else{K=R;V=A}if(K<<24>>24==0){P=O;I=M;break}a[40]=T;if((n[T]|0)!=45){P=T;I=M;break}if((n[O+2|0]|0)!=0){P=T;I=M;break}A=M+1|0;a[44]=A;a[40]=824;if((V|0)!=-1){S=V-F|0;N=A-V|0;q=(S|0)%(N|0)|0;if((q|0)==0){Y=N}else{z=N;L=q;while(1){q=(z|0)%(L|0)|0;if((q|0)==0){Y=L;break}else{z=L;L=q}}}L=(A-F|0)/(Y|0)|0;do{if((Y|0)>0){z=-S|0;if((L|0)>0){W=0}else{X=V;G=F;Z=A;break}do{q=W+V|0;H=t+(q<<2)|0;j=0;B=q;q=a[H>>2]|0;while(1){k=((B|0)<(V|0)?N:z)+B|0;g=t+(k<<2)|0;y=a[g>>2]|0;a[g>>2]=q;a[H>>2]=y;g=j+1|0;if((g|0)<(L|0)){j=g;B=k;q=y}else{break}}W=W+1|0}while((W|0)<(Y|0));X=a[50]|0;G=a[48]|0;Z=a[44]|0}else{X=V;G=F;Z=A}}while(0);a[44]=G-X+Z}a[50]=-1;a[48]=-1;c=-1;d=f;return c|0}else if((p|0)==1200){a[40]=824;A=a[50]|0;F=a[48]|0;do{if((A|0)==-1){if((F|0)==-1){break}a[44]=F}else{L=A-F|0;N=M-A|0;S=(L|0)%(N|0)|0;if((S|0)==0){Q=N}else{z=N;q=S;while(1){S=(z|0)%(q|0)|0;if((S|0)==0){Q=q;break}else{z=q;q=S}}}q=(M-F|0)/(Q|0)|0;do{if((Q|0)>0){z=-L|0;if((q|0)>0){$=0}else{J=A;ee=F;te=M;break}do{S=$+A|0;B=t+(S<<2)|0;j=0;H=S;S=a[B>>2]|0;while(1){y=((H|0)<(A|0)?N:z)+H|0;k=t+(y<<2)|0;g=a[k>>2]|0;a[k>>2]=S;a[B>>2]=g;k=j+1|0;if((k|0)<(q|0)){j=k;H=y;S=g}else{break}}$=$+1|0}while(($|0)<(Q|0));J=a[50]|0;ee=a[48]|0;te=a[44]|0}else{J=A;ee=F;te=M}}while(0);a[44]=ee-J+te}}while(0);a[50]=-1;a[48]=-1;c=-1;d=f;return c|0}else if((p|0)==1217){a[44]=M+1;a[198]=a[C>>2];c=1;d=f;return c|0}}while(0);C=(i|0)!=0;e:do{if(C){if((P|0)==(a[t+(I<<2)>>2]|0)){re=P;break}M=n[P]|0;do{if(M<<24>>24==45){a[40]=P+1;ne=0}else{if((x&4|0)==0){re=P;break e}if(M<<24>>24==58){ne=0;break}ne=(Ce(_|0,M<<24>>24|0)|0)!=0|0}}while(0);M=zr(t,_,i,o,ne)|0;if((M|0)==-1){re=a[40]|0;break}a[40]=824;c=M;d=f;return c|0}else{re=P}}while(0);P=re+1|0;a[40]=P;ne=n[re]|0;re=ne<<24>>24;if((ne<<24>>24|0)==45){if((n[P]|0)==0){p=1260}}else if((ne<<24>>24|0)==58){p=1263}else{p=1260}do{if((p|0)==1260){x=Ce(_|0,re|0)|0;if((x|0)==0){if(ne<<24>>24!=45){p=1263;break}if((n[P]|0)==0){c=-1}else{break}d=f;return c|0}I=n[x+1|0]|0;if(C&ne<<24>>24==87&I<<24>>24==59){do{if((n[P]|0)==0){M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[40]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Lr(48,(E=d,d=d+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;c=(n[_]|0)==58?58:63;d=f;return c|0}}while(0);M=zr(t,_,i,o,0)|0;a[40]=824;c=M;d=f;return c|0}if(I<<24>>24!=58){if((n[P]|0)!=0){c=re;d=f;return c|0}a[44]=(a[44]|0)+1;c=re;d=f;return c|0}a[198]=0;do{if((n[P]|0)==0){if((n[x+2|0]|0)==58){break}M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[198]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Lr(48,(E=d,d=d+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;c=(n[_]|0)==58?58:63;d=f;return c|0}else{a[198]=P}}while(0);a[40]=824;a[44]=(a[44]|0)+1;c=re;d=f;return c|0}}while(0);do{if((p|0)==1263){if((n[P]|0)!=0){break}a[44]=(a[44]|0)+1}}while(0);do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Lr(272,(E=d,d=d+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;c=63;d=f;return c|0}function Rr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Tr(e,t,r,n,i,1)|0}function Nr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Tr(e,t,r,n,i,5)|0}function Fr(e){e=e|0;return mr(e)|0}function jr(e,t){e=e|0;t=t|0;return Fr(e)|0}function Br(){var e=0;e=ze(4)|0;a[e>>2]=560;_e(e|0,688,6)}function zr(e,t,r,i,o){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;var s=0,f=0,c=0,u=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0;s=d;f=a[40]|0;c=a[44]|0;u=c+1|0;a[44]=u;l=Ce(f|0,61)|0;if((l|0)==0){h=tn(f|0)|0;p=0}else{h=l-f|0;p=l+1|0}l=a[r>>2]|0;e:do{if((l|0)!=0){t:do{if((o|0)!=0&(h|0)==1){b=0;v=l;while(1){if((n[f]|0)==(n[v]|0)){if((tn(v|0)|0)==1){m=b;break t}}b=b+1|0;v=a[r+(b<<4)>>2]|0;if((v|0)==0){break e}}}else{v=0;b=-1;g=l;while(1){if((ge(f|0,g|0,h|0)|0)==0){if((tn(g|0)|0)==(h|0)){m=v;break t}if((b|0)==-1){y=v}else{break}}else{y=b}w=v+1|0;_=a[r+(w<<4)>>2]|0;if((_|0)==0){m=y;break t}else{v=w;b=y;g=_}}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(304,(E=d,d=d+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);a[42]=0;x=63;d=s;return x|0}}while(0);if((m|0)==-1){break}g=r+(m<<4)+4|0;b=a[g>>2]|0;v=(p|0)==0;if(!((b|0)!=0|v)){do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(208,(E=d,d=d+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){k=a[r+(m<<4)+12>>2]|0}else{k=0}a[42]=k;x=(n[t]|0)==58?58:63;d=s;return x|0}do{if((b-1|0)>>>0<2){if(!v){a[198]=p;break}if((b|0)!=1){break}a[44]=c+2;a[198]=a[e+(u<<2)>>2]}}while(0);if(!((a[g>>2]|0)==1&(a[198]|0)==0)){if((i|0)!=0){a[i>>2]=m}b=a[r+(m<<4)+8>>2]|0;v=a[r+(m<<4)+12>>2]|0;if((b|0)==0){x=v;d=s;return x|0}a[b>>2]=v;x=0;d=s;return x|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(8,(E=d,d=d+8|0,a[E>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){S=a[r+(m<<4)+12>>2]|0}else{S=0}a[42]=S;a[44]=(a[44]|0)-1;x=(n[t]|0)==58?58:63;d=s;return x|0}}while(0);if((o|0)!=0){a[44]=c;x=-1;d=s;return x|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Lr(248,(E=d,d=d+8|0,a[E>>2]=f,E)|0)}}while(0);a[42]=0;x=63;d=s;return x|0}function Hr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;d=d+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;qr(e,n|0);d=r;return}function Lr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;d=d+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Dr(e,n|0);d=r;return}function qr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=d;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;Se(a[m>>2]|0,432,(E=d,d=d+8|0,a[E>>2]=i,E)|0)|0;if((e|0)!=0){i=a[m>>2]|0;Ve(i|0,e|0,t|0)|0;t=a[m>>2]|0;Re(472,2,1,t|0)|0}t=a[m>>2]|0;e=xe(n|0)|0;Se(t|0,384,(E=d,d=d+8|0,a[E>>2]=e,E)|0)|0;d=r;return}function Dr(e,t){e=e|0;t=t|0;var r=0,n=0;r=d;n=a[w>>2]|0;Se(a[m>>2]|0,376,(E=d,d=d+8|0,a[E>>2]=n,E)|0)|0;if((e|0)!=0){n=a[m>>2]|0;Ve(n|0,e|0,t|0)|0}Oe(10,a[m>>2]|0)|0;d=r;return}function Ur(e,t){e=e|0;t=t|0;var r=0,i=0,o=0,s=0,f=0,c=0,d=0,l=0,h=0,p=0,b=0,v=0.0,m=0,g=0,y=0,w=0,_=0.0,x=0,k=0,S=0,A=0.0,M=0.0,E=0,P=0,I=0,C=0.0,O=0,T=0,R=0,N=0,F=0,j=0,B=0,z=0,H=0.0,L=0,q=0,D=0.0,U=0.0,K=0.0;r=e;while(1){i=r+1|0;if((He(n[r]|0)|0)==0){break}else{r=i}}o=n[r]|0;if((o<<24>>24|0)==45){s=i;f=1}else if((o<<24>>24|0)==43){s=i;f=0}else{s=r;f=0}r=-1;i=0;o=s;while(1){c=n[o]|0;if(((c<<24>>24)-48|0)>>>0<10){d=r}else{if(c<<24>>24!=46|(r|0)>-1){break}else{d=i}}r=d;i=i+1|0;o=o+1|0}d=o+(-i|0)|0;s=(r|0)<0;l=((s^1)<<31>>31)+i|0;h=(l|0)>18;p=(h?-18:-l|0)+(s?i:r)|0;r=h?18:l;do{if((r|0)==0){b=e;v=0.0}else{if((r|0)>9){l=d;h=r;i=0;while(1){s=n[l]|0;m=l+1|0;if(s<<24>>24==46){g=n[m]|0;y=l+2|0}else{g=s;y=m}w=(i*10|0)-48+(g<<24>>24)|0;m=h-1|0;if((m|0)>9){l=y;h=m;i=w}else{break}}_=+(w|0)*1.0e9;x=9;k=y;S=1393}else{if((r|0)>0){_=0.0;x=r;k=d;S=1393}else{A=0.0;M=0.0}}if((S|0)==1393){i=k;h=x;l=0;while(1){m=n[i]|0;s=i+1|0;if(m<<24>>24==46){E=n[s]|0;P=i+2|0}else{E=m;P=s}I=(l*10|0)-48+(E<<24>>24)|0;s=h-1|0;if((s|0)>0){i=P;h=s;l=I}else{break}}A=+(I|0);M=_}C=M+A;do{if((c<<24>>24|0)==69|(c<<24>>24|0)==101){l=o+1|0;h=n[l]|0;if((h<<24>>24|0)==43){O=o+2|0;T=0}else if((h<<24>>24|0)==45){O=o+2|0;T=1}else{O=l;T=0}l=n[O]|0;if(((l<<24>>24)-48|0)>>>0<10){R=O;N=0;F=l}else{j=0;B=O;z=T;break}while(1){l=(N*10|0)-48+(F<<24>>24)|0;h=R+1|0;i=n[h]|0;if(((i<<24>>24)-48|0)>>>0<10){R=h;N=l;F=i}else{j=l;B=h;z=T;break}}}else{j=0;B=o;z=0}}while(0);h=p+((z|0)==0?j:-j|0)|0;l=(h|0)<0?-h|0:h;if((l|0)>511){a[($e()|0)>>2]=34;H=1.0;L=88;q=511;S=1410}else{if((l|0)==0){D=1.0}else{H=1.0;L=88;q=l;S=1410}}if((S|0)==1410){while(1){S=0;if((q&1|0)==0){U=H}else{U=H*+u[L>>3]}l=q>>1;if((l|0)==0){D=U;break}else{H=U;L=L+8|0;q=l;S=1410}}}if((h|0)>-1){b=B;v=C*D;break}else{b=B;v=C/D;break}}}while(0);if((t|0)!=0){a[t>>2]=b}if((f|0)==0){K=v;return+K}K=-0.0-v;return+K}function Kr(e,t){e=e|0;t=t|0;return+ +Ur(e,t)}function Vr(e,t){e=e|0;t=t|0;return+ +Ur(e,t)}function Yr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +Ur(e,t)}function Wr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +Ur(e,t)}function Xr(e){e=e|0;return+ +Ur(e,0)}function Gr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=d;d=d+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Qr(e,t,i|0)}function Zr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=d;d=d+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;$r(e,t,i|0)}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;Se(a[m>>2]|0,336,(E=d,d=d+8|0,a[E>>2]=i,E)|0)|0;if((t|0)!=0){i=a[m>>2]|0;Ve(i|0,t|0,r|0)|0;r=a[m>>2]|0;Re(480,2,1,r|0)|0}r=a[m>>2]|0;t=xe(n|0)|0;Se(r|0,392,(E=d,d=d+8|0,a[E>>2]=t,E)|0)|0;je(e|0)}function $r(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;n=a[w>>2]|0;Se(a[m>>2]|0,440,(E=d,d=d+8|0,a[E>>2]=n,E)|0)|0;if((t|0)!=0){n=a[m>>2]|0;Ve(n|0,t|0,r|0)|0}Oe(10,a[m>>2]|0)|0;je(e|0)}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;i=e|0;if((e&3)==(t&3)){while(e&3){if((r|0)==0)return i|0;n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){a[e>>2]=a[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function en(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,o=0,s=0;i=e+r|0;if((r|0)>=20){t=t&255;r=e&3;o=t|t<<8|t<<16|t<<24;s=i&~3;if(r){r=e+4-r|0;while((e|0)<(r|0)){n[e]=t;e=e+1|0}}while((e|0)<(s|0)){a[e>>2]=o;e=e+4|0}}while((e|0)<(i|0)){n[e]=t;e=e+1|0}}function tn(e){e=e|0;var t=0;t=e;while(n[t]|0){t=t+1|0}return t-e|0}function rn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=e+r>>>0;return(j=t+n+(i>>>0>>0|0)>>>0,i|0)|0}function nn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=t-n>>>0;i=t-n-(r>>>0>e>>>0|0)>>>0;return(j=i,e-r>>>0|0)|0}function an(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){j=t<>>32-r;return e<>>r;return e>>>r|(t&(1<>>r-32|0}function sn(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){j=t>>r;return e>>>r|(t&(1<>r-32|0}function fn(e){e=e|0;var t=0;t=n[v+(e>>>24)|0]|0;if((t|0)<8)return t|0;t=n[v+(e>>16&255)|0]|0;if((t|0)<8)return t+8|0;t=n[v+(e>>8&255)|0]|0;if((t|0)<8)return t+16|0;return(n[v+(e&255)|0]|0)+24|0}function cn(e){e=e|0;var t=0;t=n[b+(e&255)|0]|0;if((t|0)<8)return t|0;t=n[b+(e>>8&255)|0]|0;if((t|0)<8)return t+8|0;t=n[b+(e>>16&255)|0]|0;if((t|0)<8)return t+16|0;return(n[b+(e>>>24)|0]|0)+24|0}function un(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,a=0;r=e&65535;n=t&65535;i=oe(n,r)|0;a=e>>>16;e=(i>>>16)+(oe(n,a)|0)|0;n=t>>>16;t=oe(n,r)|0;return(j=(e>>>16)+(oe(n,a)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|i&65535|0)|0}function dn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,s=0,f=0;i=t>>31|((t|0)<0?-1:0)<<1;a=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=n>>31|((n|0)<0?-1:0)<<1;s=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;f=nn(i^e,a^t,i,a)|0;t=j;e=o^i;i=s^a;a=nn((vn(f,t,nn(o^r,s^n,o,s)|0,j,0)|0)^e,j^i,e,i)|0;return(j=j,a)|0}function ln(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,c=0,u=0,l=0;i=d;d=d+8|0;o=i|0;s=t>>31|((t|0)<0?-1:0)<<1;f=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;c=n>>31|((n|0)<0?-1:0)<<1;u=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;l=nn(s^e,f^t,s,f)|0;t=j;e=nn(c^r,u^n,c,u)|0;vn(l,t,e,j,o)|0;e=nn(a[o>>2]^s,a[o+4>>2]^f,s,f)|0;f=j;d=i;return(j=f,e)|0}function hn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0;i=e;e=r;r=un(i,e)|0;a=j;return(j=(oe(t,e)|0)+(oe(n,i)|0)+a|a&0,r|0|0)|0}function pn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=vn(e,t,r,n,0)|0;return(j=j,i)|0}function bn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0;i=d;d=d+8|0;o=i|0;vn(e,t,r,n,o)|0;d=i;return(j=a[o+4>>2]|0,a[o>>2]|0)|0}function vn(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,f=0,c=0,u=0,d=0,l=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,x=0,k=0,S=0,A=0,M=0,E=0,P=0,I=0,C=0,O=0,T=0,R=0,N=0,F=0,B=0,z=0;o=e;s=t;f=s;c=r;u=n;d=u;if((f|0)==0){l=(i|0)!=0;if((d|0)==0){if(l){a[i>>2]=(o>>>0)%(c>>>0);a[i+4>>2]=0}h=0;p=(o>>>0)/(c>>>0)>>>0;return(j=h,p)|0}else{if(!l){h=0;p=0;return(j=h,p)|0}a[i>>2]=e|0;a[i+4>>2]=t&0;h=0;p=0;return(j=h,p)|0}}l=(d|0)==0;do{if((c|0)==0){if(l){if((i|0)!=0){a[i>>2]=(f>>>0)%(c>>>0);a[i+4>>2]=0}h=0;p=(f>>>0)/(c>>>0)>>>0;return(j=h,p)|0}if((o|0)==0){if((i|0)!=0){a[i>>2]=0;a[i+4>>2]=(f>>>0)%(d>>>0)}h=0;p=(f>>>0)/(d>>>0)>>>0;return(j=h,p)|0}b=d-1|0;if((b&d|0)==0){if((i|0)!=0){a[i>>2]=e|0;a[i+4>>2]=b&f|t&0}h=0;p=f>>>((cn(d|0)|0)>>>0);return(j=h,p)|0}b=(fn(d|0)|0)-(fn(f|0)|0)|0;if(b>>>0<=30){v=b+1|0;m=31-b|0;g=v;y=f<>>(v>>>0);w=f>>>(v>>>0);_=0;x=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(j=h,p)|0}else{if(!l){m=(fn(d|0)|0)-(fn(f|0)|0)|0;if(m>>>0<=31){v=m+1|0;b=31-m|0;k=m-31>>31;g=v;y=o>>>(v>>>0)&k|f<>>(v>>>0)&k;_=0;x=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(j=h,p)|0}b=c-1|0;if((b&c|0)!=0){k=(fn(c|0)|0)+33-(fn(f|0)|0)|0;v=64-k|0;m=32-k|0;S=m>>31;A=k-32|0;M=A>>31;g=k;y=m-1>>31&f>>>(A>>>0)|(f<>>(k>>>0))&M;w=M&f>>>(k>>>0);_=o<>>(A>>>0))&S|o<>31;break}if((i|0)!=0){a[i>>2]=b&o;a[i+4>>2]=0}if((c|0)==1){h=s|t&0;p=e|0|0;return(j=h,p)|0}else{b=cn(c|0)|0;h=f>>>(b>>>0)|0;p=f<<32-b|o>>>(b>>>0)|0;return(j=h,p)|0}}}while(0);if((g|0)==0){E=x;P=_;I=w;C=y;O=0;T=0}else{o=r|0|0;r=u|n&0;n=rn(o,r,-1,-1)|0;u=j;f=x;x=_;_=w;w=y;y=g;g=0;while(1){R=x>>>31|f<<1;N=g|x<<1;c=w<<1|f>>>31|0;e=w>>>31|_<<1|0;nn(n,u,c,e)|0;t=j;s=t>>31|((t|0)<0?-1:0)<<1;F=s&1;B=nn(c,e,s&o,(((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1)&r)|0;z=j;t=y-1|0;if((t|0)==0){break}else{f=R;x=N;_=z;w=B;y=t;g=F}}E=R;P=N;I=z;C=B;O=0;T=F}F=P;P=0;if((i|0)!=0){a[i>>2]=C;a[i+4>>2]=I}h=(F|0)>>>31|(E|P)<<1|(P<<1|F>>>31)&0|O;p=(F<<1|0>>>31)&-2|T;return(j=h,p)|0}function mn(e,t){e=e|0;t=t|0;In[e&15](t|0)}function gn(e,t,r){e=e|0;t=t|0;r=r|0;Cn[e&15](t|0,r|0)}function yn(e,t){e=e|0;t=t|0;return On[e&7](t|0)|0}function wn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;Tn[e&15](t|0,r|0,n|0)}function _n(e){e=e|0;Rn[e&1]()}function xn(e,t,r){e=e|0;t=t|0;r=r|0;return Nn[e&1](t|0,r|0)|0}function kn(e){e=e|0;se(0)}function Sn(e,t){e=e|0;t=t|0;se(1)}function An(e){e=e|0;se(2);return 0}function Mn(e,t,r){e=e|0;t=t|0;r=r|0;se(3)}function En(){se(4)}function Pn(e,t){e=e|0;t=t|0;se(5);return 0}var In=[kn,kn,Sr,kn,Cr,kn,yr,kn,kr,kn,Ir,kn,kn,kn,kn,kn];var Cn=[Sn,Sn,Hr,Sn,qr,Sn,Lr,Sn,Dr,Sn,Sn,Sn,Sn,Sn,Sn,Sn];var On=[An,An,wr,An,_r,An,An,An];var Tn=[Mn,Mn,$r,Mn,Qr,Mn,Gr,Mn,Zr,Mn,Mn,Mn,Mn,Mn,Mn,Mn];var Rn=[En,En];var Nn=[Pn,Pn];return{_crypto_scrypt:Et,_strlen:tn,_free:Vt,_realloc:Wt,_memset:en,_malloc:Kt,_memcpy:Jr,_calloc:Yt,runPostSets:wt,stackAlloc:it,stackSave:at,stackRestore:ot,setThrew:st,setTempRet0:ut,setTempRet1:dt,setTempRet2:lt,setTempRet3:ht,setTempRet4:pt,setTempRet5:bt,setTempRet6:vt,setTempRet7:mt,setTempRet8:gt,setTempRet9:yt,dynCall_vi:mn,dynCall_vii:gn,dynCall_ii:yn,dynCall_viii:wn,dynCall_v:_n,dynCall_iii:xn}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:wa,assert:w,asmPrintInt:function(e,t){s.print("int "+e+","+t)},asmPrintFloat:function(e,t){s.print("float "+e+","+t)},min:Xc,invoke_vi:function(e,t){try{s.dynCall_vi(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_vii:function(e,t,r){try{s.dynCall_vii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_ii:function(e,t){try{return s.dynCall_ii(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_viii:function(e,t,r,n){try{s.dynCall_viii(e,t,r,n)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_v:function(e){try{s.dynCall_v(e)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_iii:function(e,t,r){try{return s.dynCall_iii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},_strncmp:function(e,t,r){for(var n=0;na?1:-1;n++}return 0},_llvm_va_end:aa(),_sysconf:function(e){switch(e){case 8:return 4096;case 54:case 56:case 21:case 61:case 63:case 22:case 67:case 23:case 24:case 25:case 26:case 27:case 69:case 28:case 101:case 70:case 71:case 29:case 30:case 199:case 75:case 76:case 32:case 43:case 44:case 80:case 46:case 47:case 45:case 48:case 49:case 42:case 82:case 33:case 7:case 108:case 109:case 107:case 112:case 119:case 121:return 200809;case 13:case 104:case 94:case 95:case 34:case 35:case 77:case 81:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:case 94:case 95:case 110:case 111:case 113:case 114:case 115:case 116:case 117:case 118:case 120:case 40:case 16:case 79:case 19:return-1;case 92:case 93:case 5:case 72:case 6:case 74:case 92:case 93:case 96:case 97:case 98:case 99:case 102:case 103:case 105:return 1;case 38:case 66:case 50:case 51:case 4:return 1024;case 15:case 64:case 41:return 32;case 55:case 37:case 17:return 2147483647;case 18:case 1:return 47839;case 59:case 57:return 99;case 68:case 58:return 2048;case 0:return 2097152;case 3:return 65536;case 14:return 32768;case 73:return 32767;case 39:return 16384;case 60:return 1e3;case 106:return 700;case 52:return 256;case 62:return 255;case 2:return 100;case 65:return 64;case 36:return 20;case 100:return 16;case 20:return 6;case 53:return 4;case 10:return 1}return M(N.A),-1},___cxa_throw:rc,_strerror:zc,_abort:function(){s.abort()},_fprintf:mc,_llvm_eh_exception:U,___cxa_free_exception:sc,_fflush:aa(),___buildEnvironment:wc,__reallyNegative:jc,_strchr:function(e,t){e--;do{var r=A[++e];if(r==t)return e}while(r);return 0},_fputc:Bc,___setErrNo:M,_fwrite:hc,_send:fc,_write:gc,_exit:function(e){Ac(e)},___cxa_find_matching_catch:function(e,t){-1==e&&(e=B[U.m>>2]),-1==t&&(t=B[U.m+4>>2]);var r=Array.prototype.slice.call(arguments,2);0!=t&&!pc(t)&&0==B[B[t>>2]-8>>2]&&(e=B[e>>2]);for(var n=0;n=e},__formatString:kc,___resumeException:function(e){0==B[U.m>>2]&&(B[U.m>>2]=e),g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")},_llvm_uadd_with_overflow_i32:function(e,t){return e>>>=0,t>>>=0,0|(V.setTempRet0(4294967295>>0)},___cxa_does_inherit:qc,_getenv:xc,_vfprintf:function(e,t,r){return mc(e,t,B[r>>2])},___cxa_begin_catch:function(e){return oc.ta--,e},__ZSt18uncaught_exceptionv:oc,_pwrite:function(e,t,r,n){if(!(e=R[e]))return M(N.$),-1;try{return Ib(e,A,t,r,n)}catch(e){return Zb(e),-1}},___cxa_call_unexpected:function(e){s.P("Unexpected exception thrown, this is not properly supported - aborting"),za=l,g(e)},_sbrk:nc,_strerror_r:yc,___errno_location:function(){return rb},___gxx_personality_v0:aa(),___cxa_is_number_type:pc,_time:function(e){var t=Math.floor(Date.now()/1e3);return e&&(B[e>>2]=t),t},__exit:Ac,___cxa_end_catch:uc,STACKTOP:u,STACK_MAX:Ta,tempDoublePtr:qb,ABORT:za,cttz_i8:Wc,ctlz_i8:Vc,NaN:NaN,Infinity:1/0,_stderr:nb,__ZTVN10__cxxabiv120__si_class_type_infoE:ob,__ZTVN10__cxxabiv117__class_type_infoE:pb,___progname:k},I);s._crypto_scrypt=V._crypto_scrypt;var ic=s._strlen=V._strlen,tc=s._free=V._free;s._realloc=V._realloc;var tb=s._memset=V._memset,Oa=s._malloc=V._malloc,sb=s._memcpy=V._memcpy;s._calloc=V._calloc;var mb=s.runPostSets=V.runPostSets;s.dynCall_vi=V.dynCall_vi,s.dynCall_vii=V.dynCall_vii,s.dynCall_ii=V.dynCall_ii,s.dynCall_viii=V.dynCall_viii,s.dynCall_v=V.dynCall_v,s.dynCall_iii=V.dynCall_iii;var qa=function(e){return V.stackAlloc(e)},ja=function(){return V.stackSave()},ka=function(e){V.stackRestore(e)},lc;function X(e,t){e!=m&&("number"==typeof e?this.p(e):t==m&&"string"!=typeof e?this.k(e,256):this.k(e,t))}function Yc(){return new X(m)}function Zc(e,t){var r=$c[e.charCodeAt(t)];return r==m?-1:r}function ad(e){var t=Yc();return t.D(e),t}function Y(e,t){this.h=0|e,this.j=0|t}Y.Ca={},Y.D=function(e){if(-128<=e&&128>e){var t=Y.Ca[e];if(t)return t}return t=new Y(0|e,0>e?-1:0),-128<=e&&128>e&&(Y.Ca[e]=t),t},Y.p=function(e){return isNaN(e)||!isFinite(e)?Y.ZERO:e<=-Y.Ea?Y.MIN_VALUE:e+1>=Y.Ea?Y.MAX_VALUE:0>e?Y.p(-e).i():new Y(e%Y.B|0,e/Y.B|0)},Y.v=function(e,t){return new Y(e,t)},Y.k=function(e,t){0==e.length&&g(Error("number format error: empty string"));var r=t||10;if((2>r||36o?(o=Y.p(Math.pow(r,o)),i=i.multiply(o).add(Y.p(s))):i=(i=i.multiply(n)).add(Y.p(s))}return i},Y.ea=65536,Y.Od=16777216,Y.B=Y.ea*Y.ea,Y.Pd=Y.B/2,Y.Qd=Y.B*Y.ea,Y.eb=Y.B*Y.B,Y.Ea=Y.eb/2,Y.ZERO=Y.D(0),Y.ONE=Y.D(1),Y.Da=Y.D(-1),Y.MAX_VALUE=Y.v(-1,2147483647),Y.MIN_VALUE=Y.v(0,-2147483648),Y.cb=Y.D(16777216),q=Y.prototype,q.Z=function(){return this.j*Y.B+this.ob()},q.toString=function(e){if((2>(e=e||10)||36a.length;)a="0"+a;n=""+a+n}},q.ob=function(){return 0<=this.h?this.h:Y.B+this.h},q.G=function(){return 0==this.j&&0==this.h},q.n=function(){return 0>this.j},q.Pa=function(){return 1==(1&this.h)},q.o=function(e){return this.j==e.j&&this.h==e.h},q.Ra=function(){return 0>this.ja(Y.cb)},q.qb=function(e){return 0>>16,n=65535&this.j,i=this.h>>>16,a=e.j>>>16,o=65535&e.j,s=e.h>>>16;return e=0+((t=(65535&this.h)+(65535&e.h)+0)>>>16),i=0+((e+=i+s)>>>16),n=(n=0+((i+=n+o)>>>16))+(r+a)&65535,Y.v((65535&e)<<16|65535&t,n<<16|65535&i)},q.R=function(e){return this.add(e.i())},q.multiply=function(e){if(this.G()||e.G())return Y.ZERO;if(this.o(Y.MIN_VALUE))return e.Pa()?Y.MIN_VALUE:Y.ZERO;if(e.o(Y.MIN_VALUE))return this.Pa()?Y.MIN_VALUE:Y.ZERO;if(this.n())return e.n()?this.i().multiply(e.i()):this.i().multiply(e).i();if(e.n())return this.multiply(e.i()).i();if(this.Ra()&&e.Ra())return Y.p(this.Z()*e.Z());var t,r,n,i,a=this.j>>>16,o=65535&this.j,s=this.h>>>16,f=65535&this.h,c=e.j>>>16,u=65535&e.j,d=e.h>>>16;return n=0+((i=0+f*(e=65535&e.h))>>>16),r=0+((n+=s*e)>>>16),r+=(n=(65535&n)+f*d)>>>16,n&=65535,t=0+((r+=o*e)>>>16),t+=(r=(65535&r)+s*d)>>>16,r&=65535,t+=(r+=f*u)>>>16,r&=65535,t=t+(a*e+o*d+s*u+f*c)&65535,Y.v(n<<16|65535&i,t<<16|r)},q.F=function(e){if(e.G()&&g(Error("division by zero")),this.G())return Y.ZERO;if(this.o(Y.MIN_VALUE)){if(e.o(Y.ONE)||e.o(Y.Da))return Y.MIN_VALUE;if(e.o(Y.MIN_VALUE))return Y.ONE;if((n=this.Db().F(e).shiftLeft(1)).o(Y.ZERO))return e.n()?Y.ONE:Y.Da;var t=this.R(e.multiply(n));return n.add(t.F(e))}if(e.o(Y.MIN_VALUE))return Y.ZERO;if(this.n())return e.n()?this.i().F(e.i()):this.i().F(e).i();if(e.n())return this.F(e.i()).i();var r=Y.ZERO;for(t=this;t.rb(e);){for(var n=Math.max(1,Math.floor(t.Z()/e.Z())),i=48>=(i=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,i-48),a=Y.p(n),o=a.multiply(e);o.n()||o.qb(t);)n-=i,o=(a=Y.p(n)).multiply(e);a.G()&&(a=Y.ONE),r=r.add(a),t=t.R(o)}return r},q.xb=function(){return Y.v(~this.h,~this.j)},q.shiftLeft=function(e){if(0==(e&=63))return this;var t=this.h;return 32>e?Y.v(t<>>32-e):Y.v(0,t<>>1|e<<31,e>>1)},q=X.prototype,q.ga=function(e,t,r,n){for(var i=0,a=0;0<=--n;){var o=e*this[i++]+t[r]+a;a=Math.floor(o/67108864);t[r++]=67108863&o}return a},q.f=26,q.u=67108863,q.K=67108864,q.bb=Math.pow(2,52),q.Aa=26,q.Ba=0;var $c=[],bd,Z;for(bd=48,Z=0;9>=Z;++Z)$c[bd++]=Z;for(bd=97,Z=10;36>Z;++Z)$c[bd++]=Z;for(bd=65,Z=10;36>Z;++Z)$c[bd++]=Z;q=X.prototype,q.copyTo=function(e){for(var t=this.b-1;0<=t;--t)e[t]=this[t];e.b=this.b,e.c=this.c},q.D=function(e){this.b=1,this.c=0>e?-1:0,0e?this[0]=e+DV:this.b=0},q.k=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.nb(e,t);r=2}this.c=this.b=0;for(var n=e.length,i=p,a=0;0<=--n;){var o=8==r?255&e[n]:Zc(e,n);0>o?"-"==e.charAt(n)&&(i=l):(i=p,0==a?this[this.b++]=o:a+r>this.f?(this[this.b-1]|=(o&(1<>this.f-a):this[this.b-1]|=o<=this.f&&(a-=this.f))}8==r&&0!=(128&e[0])&&(this.c=-1,0>i|s,s=(this[r]&a)<=this.b)t.b=0;else{var n=e%this.f,i=this.f-n,a=(1<>n;for(var o=r+1;o>n;0>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n-=e.c}t.c=0>n?-1:0,-1>n?t[r++]=this.K+n:0=n.b)){var i=this.abs();if(i.b>>16)&&(f=a,c+=16),0!=(a=f>>8)&&(f=a,c+=8),0!=(a=f>>4)&&(f=a,c+=4),0!=(a=f>>2)&&(f=a,c+=2),0!=f>>1&&(c+=1),0<(f=this.f-c)?(n.Qa(f,o),i.Qa(f,r)):(n.copyTo(o),i.copyTo(r)),0!=(i=o[(n=o.b)-1])){a=i*(1<>this.Ba:0),c=this.bb/a,a=(1<s&&X.ZERO.t(r,r)}}}},q.toString=function(e){if(0>this.c)return"-"+this.i().toString(e);if(16==e)e=4;else if(8==e)e=3;else if(2==e)e=1;else if(32==e)e=5;else{if(4!=e)return this.Fb(e);e=2}var t,r=(1<>o)&&(n=l,i="0123456789abcdefghijklmnopqrstuvwxyz".charAt(t));0<=a;)o>(o+=this.f-e)):(t=this[a]>>(o-=e)&r,0>=o&&(o+=this.f,--a)),0this.c?this.i():this},q.U=function(e){if(0!=(t=this.c-e.c))return t;var t,r=this.b;if(0!=(t=r-e.b))return 0>this.c?-t:t;for(;0<=--r;)if(0!=(t=this[r]-e[r]))return t;return 0},X.ZERO=ad(0),X.ONE=ad(1),q=X.prototype,q.nb=function(e,t){this.D(0),t==m&&(t=10);for(var r=this.S(t),n=Math.pow(t,r),i=p,a=0,o=0,s=0;sf?"-"==e.charAt(s)&&0==this.ra()&&(i=l):(o=t*o+f,++a>=r&&(this.Ia(n),this.Ha(o),o=a=0))}0this.c?-1:0>=this.b||1==this.b&&0>=this[0]?0:1},q.Ia=function(e){this[this.b]=this.ga(e-1,this,0,this.b),++this.b,this.C()},q.Ha=function(e){var t=0;if(0!=e){for(;this.b<=t;)this[this.b++]=0;for(this[t]+=e;this[t]>=this.K;)this[t]-=this.K,++t>=this.b&&(this[this.b++]=0),++this[t]}},q.Fb=function(e){if(e==m&&(e=10),0==this.ra()||2>e||36this.c){if(1==this.b)return this[0]-this.K;if(0==this.b)return-1}else{if(1==this.b)return this[0];if(0==this.b)return 0}return(this[1]&(1<<32-this.f)-1)<>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n+=e.c}t.c=0>n?-1:0,0n&&(t[r++]=this.K+n),t.b=r,t.C()};var $={abs:function(e,t){var r=(r=new Y(e,t)).n()?r.i():r;B[qb>>2]=r.h,B[qb+4>>2]=r.j},Ka:function(){$.kb||($.kb=l,$.Xa=new X,$.Xa.k("4294967296",10),$.sa=new X,$.sa.k("18446744073709551616",10),$.xe=new X,$.ye=new X)},me:function(e,t){var r=new X;r.k(t.toString(),10);var n=new X;r.vb(n),(r=new X).k(e.toString(),10);var i=new X;return r.fa(n,i),i},stringify:function(e,t,r){return e=new Y(e,t).toString(),r&&"-"==e[0]&&($.Ka(),(r=new X).k(e,10),e=new X,$.sa.fa(r,e),e=e.toString(10)),e},k:function(e,t,r,n,i){$.Ka();var a=new X;a.k(e,t),(e=new X).k(r,10),(r=new X).k(n,10),i&&0>a.U(X.ZERO)&&(n=new X,a.fa($.sa,n),a=n),n=p,0>a.U(e)?(a=e,n=l):0>2]=a.h,B[qb+4>>2]=a.j,n&&g("range error")}},cd,dd;function lb(e){function t(){if(ab||(ab=l,Va(Xa)),Va(Ya),gb=l,s._main&&kb&&s.callMain(e),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)cb(s.postRun.shift());Va($a)}if(e=e||s.arguments,0e;e++)i.push(0)}w(0==L,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),w(0==Wa.length,"cannot call main when preRun functions remain to be called"),e=e||[],ab||(ab=l,Va(Xa));var r,n=e.length+1,i=[F(J("/bin/this.program"),"i8",Ka)];t();for(var a=0;a>4&15]),t.push("0123456789abcdef"[15&e[r]]);return t.join("")},e.crypto_scrypt=function(e,t,r,a,o,s){var f=new i(s),c=n(e),u=n(t);return function(e,t){if(0!==t)throw{message:"scrypt_raw."+e+" signalled an error"}}("_crypto_scrypt",scrypt_raw._crypto_scrypt(c,e.length,u,t.length,r,0,a,o,f.address,f.length)),function(e){for(var t=0;t=e)&&(n=e-1,console.error("invalid priority: "+a+" must be between 0 and "+n))),t[n].push(r)},n.dequeue=function(e){var r,n=null,a=t.length;for(i=null,r=0;ru.length);r+=1)l>=(c=a[r].timeout)&&(d("removeIdle() destroying obj - now:"+l+" timeout:"+c,"verbose"),u.push(a[r].obj));for(r=0,o=u.length;r0?(d("availableObjects.length="+n,"verbose"),h()):d("removeIdle() all objects removed","verbose")}function h(){f||(f=!0,c=setTimeout(l,n))}function p(){var r=null,n=o.size();if(d("dispense() clients="+n+" available="+a.length,"info"),n>0){for(;a.length>0;){if(d("dispense() - reusing obj","verbose"),r=a[0],e.validate(r.obj))return a.shift(),o.dequeue()(null,r.obj);t.destroy(r.obj)}s1?(e=arguments[0],r=arguments[1]):(e=arguments[0]instanceof Error?arguments[0]:null,r=arguments[0]instanceof Error?null:arguments[0]),e?(s-=1,n&&n(e,r),process.nextTick(function(){p()})):n?n(e,r):t.release(r)})}function v(){var t,r;if(!u&&s0?setTimeout(t,100):a.length!=s?setTimeout(t,100):e&&e()};t()},t.destroyAllNow=function(e){d("force destroying all objects","info");var r=a;a=[];for(var n=r.shift();null!==n&&void 0!==n;)t.destroy(n.obj),n=r.shift();f=!1,clearTimeout(c),e&&e()},t.pooled=function(e,r){return function(){var n=arguments,i=n[n.length-1],a="function"==typeof i;t.acquire(function(r,o){if(r)a&&i(r);else{var s=[o].concat(Array.prototype.slice.call(n,0,a?-1:void 0));s.push(function(){t.release(o),a&&i.apply(null,arguments)}),e.apply(null,s)}},r)}},t.getPoolSize=function(){return s},t.getName=function(){return e.name},t.availableObjectsCount=function(){return a.length},t.waitingClientsCount=function(){return o.size()},v(),t}},function(e,t){e.exports=require("child_process")},function(e,t,r){(function(t){var n=r(45),i=r(91).fork,a=r(90),o=r(60).cpus().length,s=s=new a.Pool({name:"scrypt-worker",create:function(e){var r=i(t+"/scrypt-async-worker.js");r.controlledExit=!1,r.on("exit",function(){r.controlledExit||setImmediate(s.destroy.bind(s,r))}),e(r)},destroy:function(e){try{e.controlledExit=!0,e.disconnect()}catch(e){}},max:Math.max(2,o-1),min:0,idleTimeoutMillis:15e3,log:!1});e.exports=function(e,t,r,i){var a=n.apply(null,arguments),o=a.callback||function(){};delete a.callback,a.password=a.password.toString("base64"),a.salt=a.salt.toString("base64");new Date;s.acquire(function(e,t){if(e)return s.release(t),o(e);t.once("message",function(e){new Date;s.release(t),e.error&&o(e.error),o(null,new Buffer(e.data,"base64"))}),t.send(a)})}}).call(this,"/")},function(e,t,r){e.exports={hash:r(92),hashSync:r(89)}},function(e,t,r){var n;e.exports=(n=r(3),r(24),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){var n,i;e.exports=(n=r(3),r(24),n.mode.ECB=((i=n.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),n.mode.ECB)},function(e,t,r){var n,i,a,o,s,f,c;e.exports=(n=r(3),a=(i=n).lib,o=a.Base,s=i.enc,f=s.Utf8,c=i.algo,void(c.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=f.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,s=a.words,c=0;c>>31}var d=(n<<5|n>>>27)+s+f[c];d+=c<20?1518500249+(i&a|~i&o):c<40?1859775393+(i^a^o):c<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=n,n=d}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=s._createHelper(c),i.HmacSHA1=s._createHmacHelper(c),n.SHA1)},function(e,t,r){var n;e.exports=(n=r(3),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var f=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],f=e[t+1],h=e[t+2],p=e[t+3],b=e[t+4],v=e[t+5],m=e[t+6],g=e[t+7],y=e[t+8],w=e[t+9],_=e[t+10],x=e[t+11],k=e[t+12],S=e[t+13],A=e[t+14],M=e[t+15],E=a[0],P=a[1],I=a[2],C=a[3];P=l(P=l(P=l(P=l(P=d(P=d(P=d(P=d(P=u(P=u(P=u(P=u(P=c(P=c(P=c(P=c(P,I=c(I,C=c(C,E=c(E,P,I,C,o,7,s[0]),P,I,f,12,s[1]),E,P,h,17,s[2]),C,E,p,22,s[3]),I=c(I,C=c(C,E=c(E,P,I,C,b,7,s[4]),P,I,v,12,s[5]),E,P,m,17,s[6]),C,E,g,22,s[7]),I=c(I,C=c(C,E=c(E,P,I,C,y,7,s[8]),P,I,w,12,s[9]),E,P,_,17,s[10]),C,E,x,22,s[11]),I=c(I,C=c(C,E=c(E,P,I,C,k,7,s[12]),P,I,S,12,s[13]),E,P,A,17,s[14]),C,E,M,22,s[15]),I=u(I,C=u(C,E=u(E,P,I,C,f,5,s[16]),P,I,m,9,s[17]),E,P,x,14,s[18]),C,E,o,20,s[19]),I=u(I,C=u(C,E=u(E,P,I,C,v,5,s[20]),P,I,_,9,s[21]),E,P,M,14,s[22]),C,E,b,20,s[23]),I=u(I,C=u(C,E=u(E,P,I,C,w,5,s[24]),P,I,A,9,s[25]),E,P,p,14,s[26]),C,E,y,20,s[27]),I=u(I,C=u(C,E=u(E,P,I,C,S,5,s[28]),P,I,h,9,s[29]),E,P,g,14,s[30]),C,E,k,20,s[31]),I=d(I,C=d(C,E=d(E,P,I,C,v,4,s[32]),P,I,y,11,s[33]),E,P,x,16,s[34]),C,E,A,23,s[35]),I=d(I,C=d(C,E=d(E,P,I,C,f,4,s[36]),P,I,b,11,s[37]),E,P,g,16,s[38]),C,E,_,23,s[39]),I=d(I,C=d(C,E=d(E,P,I,C,S,4,s[40]),P,I,o,11,s[41]),E,P,p,16,s[42]),C,E,m,23,s[43]),I=d(I,C=d(C,E=d(E,P,I,C,w,4,s[44]),P,I,k,11,s[45]),E,P,M,16,s[46]),C,E,h,23,s[47]),I=l(I,C=l(C,E=l(E,P,I,C,o,6,s[48]),P,I,g,10,s[49]),E,P,A,15,s[50]),C,E,v,21,s[51]),I=l(I,C=l(C,E=l(E,P,I,C,k,6,s[52]),P,I,p,10,s[53]),E,P,_,15,s[54]),C,E,f,21,s[55]),I=l(I,C=l(C,E=l(E,P,I,C,y,6,s[56]),P,I,M,10,s[57]),E,P,m,15,s[58]),C,E,S,21,s[59]),I=l(I,C=l(C,E=l(E,P,I,C,b,6,s[60]),P,I,x,10,s[61]),E,P,h,15,s[62]),C,E,w,21,s[63]),a[0]=a[0]+E|0,a[1]=a[1]+P|0,a[2]=a[2]+I|0,a[3]=a[3]+C|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var a=e.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,c=0;c<4;c++){var u=f[c];f[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<>>32-a)+t}function u(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<>>32-a)+t}function d(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(f),t.HmacMD5=a._createHmacHelper(f)}(Math),n.MD5)},function(e,t,r){var n,i,a;e.exports=(n=r(3),a=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var f=n.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-o%4*2;n[i>>>2]|=(s|f)<<24-i%4*8,i++}return a.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},function(e,t,r){var n;e.exports=(n=r(3),r(99),r(98),r(46),r(24),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],f=[],c=[],u=[],d=[],l=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,a[p]=r;var b=e[r],v=e[b],m=e[v],g=257*e[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,c[r]=g,g=16843009*m^65537*v^257*b^16843008*r,u[p]=g<<24|g>>>8,d[p]=g<<16|g>>>16,l[p]=g<<8|g>>>24,h[p]=g,r?(r=b^e[e[e[m^b]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],b=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o6&&o%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[o/r|0]<<24),a[o]=a[o-r]^s}for(var f=this._invKeySchedule=[],c=0;c>>24]]^d[i[s>>>16&255]]^l[i[s>>>8&255]]^h[i[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,f,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,d,l,h,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var f=this._nRounds,c=e[t]^r[0],u=e[t+1]^r[1],d=e[t+2]^r[2],l=e[t+3]^r[3],h=4,p=1;p>>24]^i[u>>>16&255]^a[d>>>8&255]^o[255&l]^r[h++],v=n[u>>>24]^i[d>>>16&255]^a[l>>>8&255]^o[255&c]^r[h++],m=n[d>>>24]^i[l>>>16&255]^a[c>>>8&255]^o[255&u]^r[h++],g=n[l>>>24]^i[c>>>16&255]^a[u>>>8&255]^o[255&d]^r[h++];c=b,u=v,d=m,l=g}b=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^r[h++],v=(s[u>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&c])^r[h++],m=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^r[h++],g=(s[l>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&d])^r[h++],e[t]=b,e[t+1]=v,e[t+2]=m,e[t+3]=g},keySize:8});e.AES=t._createHelper(b)}(),n.AES)},function(e,t,r){var n;e.exports=(n=r(3),n.enc.Latin1)},function(e,t,r){var n;!function(i){"use strict";function a(e,t){if(t=t||{type:"Array"},"undefined"!=typeof process&&"number"==typeof process.pid)return function(e,t){var n=r(28).randomBytes(e);switch(t.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(e),a=0;a0||e===t?t:t-1}function w(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nc^r?1:-1;for(s=(f=i.length)<(c=a.length)?f:c,o=0;oa[o]^r?1:-1;return f==c?0:f>c^r?1:-1}function x(e,t,r){return(e=E(e))>=t&&e<=r}function k(e){return"[object Array]"==Object.prototype.toString.call(e)}function S(e,t,r){for(var n,i,a=[0],o=0,s=e.length;or-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function M(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t15&&J(T,d,e),s=!1):h.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1,u=X(u,10,t,h.s)}else{if(e instanceof W)return h.s=e.s,h.e=e.e,h.c=(e=e.c)?e.slice():e,void(T=0);if((s="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;a>=10;a/=10,i++);return h.e=i,h.c=[e],void(T=0)}u=e+""}else{if(!o.test(u=e+""))return n(h,u,s);h.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1}}for((i=u.indexOf("."))>-1&&(u=u.replace(".","")),(a=u.search(/e/i))>0?(i<0&&(i=a),i+=+u.slice(a+1),u=u.substring(0,a)):i<0&&(i=u.length),a=0;48===u.charCodeAt(a);a++);for(c=u.length;48===u.charCodeAt(--c););if(u=u.slice(a,c+1))if(c=u.length,s&&q&&c>15&&(e>b||e!==f(e))&&J(T,d,h.s*e),(i=i-a-1)>L)h.c=h.e=null;else if(i=0&&(s=V,V=0,e=e.replace(".",""),c=(d=new W(n)).pow(e.length-h),V=s,d.c=S(M(w(c.c),c.e),10,t),d.e=d.c.length),o=s=(u=S(e,n,t)).length;0==u[--s];u.pop());if(!u[0])return"0";if(h<0?--o:(c.c=u,c.e=o,c.s=i,u=(c=r(c,d,p,b,t)).c,f=c.r,o=c.e),h=u[a=o+p+1],s=t/2,f=f||a<0||null!=u[a+1],f=b<4?(null!=h||f)&&(0==b||b==(c.s<0?3:2)):h>s||h==s&&(4==b||f||6==b&&1&u[a-1]||b==(c.s<0?8:7)),a<1||!u[0])e=f?M("1",-p):"0";else{if(u.length=a,f)for(--t;++u[--a]>t;)u[a]=0,a||(++o,u=[1].concat(u));for(s=u.length;!u[--s];);for(h=0,e="";h<=s;e+=l.charAt(u[h++]));e=M(e,o)}return e}function G(e,t,r,n){var i,a,o,s,f;if(r=null!=r&&D(r,0,8,n,u)?0|r:j,!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)f=w(e.c),f=19==n||24==n&&o<=B?A(f,o):M(f,o);else if(a=(e=ee(new W(e),t,r)).e,s=(f=w(e.c)).length,19==n||24==n&&(t<=a||a<=B)){for(;ss){if(--t>0)for(f+=".";t--;f+="0");}else if((t+=a-s)>0)for(a+1==s&&(f+=".");t--;f+="0");return e.s<0&&i?"-"+f:f}function Z(e,t){var r,n,i=0;for(k(e[0])&&(e=e[0]),r=new W(e[0]);++ir||e!=E(e))&&J(n,(i||"decimal places")+(er?" out of range":" not an integer"),e),!0}function $(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*p-1)>L?e.c=e.e=null:r=10;c/=10,i++);if((a=t-i)<0)a+=p,o=t,l=(u=b[d=0])/m[i-o-1]%10|0;else if((d=s((a+1)/p))>=b.length){if(!n)break e;for(;b.length<=d;b.push(0));u=l=0,i=1,o=(a%=p)-p+1}else{for(u=c=b[d],i=1;c>=10;c/=10,i++);l=(o=(a%=p)-p+i)<0?0:u/m[i-o-1]%10|0}if(n=n||t<0||null!=b[d+1]||(o<0?u:u%m[i-o-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(a>0?o>0?u/m[i-o]:0:b[d-1])%10&1||r==(e.s<0?8:7)),t<1||!b[0])return b.length=0,n?(t-=e.e+1,b[0]=m[(p-t%p)%p],e.e=-t||0):b[0]=e.e=0,e;if(0==a?(b.length=d,c=1,d--):(b.length=d+1,c=m[p-a],b[d]=o>0?f(u/m[i-o]%m[o])*c:0),n)for(;;){if(0==d){for(a=1,o=b[0];o>=10;o/=10,a++);for(o=b[0]+=c,c=1;o>=10;o/=10,c++);a!=c&&(e.e++,b[0]==h&&(b[0]=1));break}if(b[d]+=c,b[d]!=h)break;b[d--]=0,c=1}for(a=b.length;0===b[--a];b.pop());}e.e>L?e.c=e.e=null:e.er)return null!=(e=i[r++])};return o(t="DECIMAL_PLACES")&&D(e,0,g,2,t)&&(F=0|e),n[t]=F,o(t="ROUNDING_MODE")&&D(e,0,8,2,t)&&(j=0|e),n[t]=j,o(t="EXPONENTIAL_AT")&&(k(e)?D(e[0],-g,0,2,t)&&D(e[1],0,g,2,t)&&(B=0|e[0],z=0|e[1]):D(e,-g,g,2,t)&&(B=-(z=0|(e<0?-e:e)))),n[t]=[B,z],o(t="RANGE")&&(k(e)?D(e[0],-g,-1,2,t)&&D(e[1],1,g,2,t)&&(H=0|e[0],L=0|e[1]):D(e,-g,g,2,t)&&(0|e?H=-(L=0|(e<0?-e:e)):q&&J(2,t+" cannot be zero",e))),n[t]=[H,L],o(t="ERRORS")&&(e===!!e||1===e||0===e?(T=0,D=(q=!!e)?Q:x):q&&J(2,t+c,e)),n[t]=q,o(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?U=!0:q?J(2,"crypto unavailable",e?void 0:crypto):U=!1:U=!1:q&&J(2,t+c,e)),n[t]=U,o(t="MODULO_MODE")&&D(e,0,9,2,t)&&(K=0|e),n[t]=K,o(t="POW_PRECISION")&&D(e,0,g,2,t)&&(V=0|e),n[t]=V,o(t="FORMAT")&&("object"==typeof e?Y=e:q&&J(2,t+" not an object",e)),n[t]=Y,n},W.max=function(){return Z(arguments,R.lt)},W.min=function(){return Z(arguments,R.gt)},W.random=(i=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,o,c=0,u=[],d=new W(N);if(e=null!=e&&D(e,0,g,14)?0|e:F,a=s(e/p),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));c>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(u.push(o%1e14),c+=2);c=a/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(a*=7);c=9e15?crypto.randomBytes(7).copy(t,c):(u.push(o%1e14),c+=7);c=a/7}else U=!1,q&&J(14,"crypto unavailable",crypto);if(!U)for(;c=10;o/=10,c++);cn?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var c,u,d,l,b,v,m,g,w,_,x,k,S,A,M,E,P,I=n.s==i.s?1:-1,C=n.c,O=i.c;if(!(C&&C[0]&&O&&O[0]))return new W(n.s&&i.s&&(C?!O||C[0]!=O[0]:O)?C&&0==C[0]||!O?0*I:I/0:NaN);for(w=(g=new W(I)).c=[],I=a+(u=n.e-i.e)+1,s||(s=h,u=y(n.e/p)-y(i.e/p),I=I/p|0),d=0;O[d]==(C[d]||0);d++);if(O[d]>(C[d]||0)&&u--,I<0)w.push(1),l=!0;else{for(A=C.length,E=O.length,d=0,I+=2,(b=f(s/(O[0]+1)))>1&&(O=e(O,b,s),C=e(C,b,s),E=O.length,A=C.length),S=E,x=(_=C.slice(0,E)).length;x=s/2&&M++;do{if(b=0,(c=t(O,_,E,x))<0){if(k=_[0],E!=x&&(k=k*s+(_[1]||0)),(b=f(k/M))>1)for(b>=s&&(b=s-1),m=(v=e(O,b,s)).length,x=_.length;1==t(v,_,m,x);)b--,r(v,E=10;I/=10,d++);ee(g,a+(g.e=d+u*p-1)+1,o,l)}else g.e=u,g.r=+l;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,P=/^([^.]+)\.$/,I=/^\.([^.]+)$/,C=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(C.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(P,"$1").replace(I,"0.$1")),t!=o))return new W(o,i);q&&J(T,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,T=0},R.absoluteValue=R.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},R.ceil=function(){return ee(new W(this),this.e+1,2)},R.comparedTo=R.cmp=function(e,t){return T=1,_(this,new W(e,t))},R.decimalPlaces=R.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-y(this.e/p))*p,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},R.dividedBy=R.div=function(e,t){return T=3,r(this,new W(e,t),F,j)},R.dividedToIntegerBy=R.divToInt=function(e,t){return T=4,r(this,new W(e,t),0,1)},R.equals=R.eq=function(e,t){return T=5,0===_(this,new W(e,t))},R.floor=function(){return ee(new W(this),this.e+1,3)},R.greaterThan=R.gt=function(e,t){return T=6,_(this,new W(e,t))>0},R.greaterThanOrEqualTo=R.gte=function(e,t){return T=7,1===(t=_(this,new W(e,t)))||0===t},R.isFinite=function(){return!!this.c},R.isInteger=R.isInt=function(){return!!this.c&&y(this.e/p)>this.c.length-2},R.isNaN=function(){return!this.s},R.isNegative=R.isNeg=function(){return this.s<0},R.isZero=function(){return!!this.c&&0==this.c[0]},R.lessThan=R.lt=function(e,t){return T=8,_(this,new W(e,t))<0},R.lessThanOrEqualTo=R.lte=function(e,t){return T=9,-1===(t=_(this,new W(e,t)))||0===t},R.minus=R.sub=function(e,t){var r,n,i,a,o=this,s=o.s;if(T=10,t=(e=new W(e,t)).s,!s||!t)return new W(NaN);if(s!=t)return e.s=-t,o.plus(e);var f=o.e/p,c=e.e/p,u=o.c,d=e.c;if(!f||!c){if(!u||!d)return u?(e.s=-t,e):new W(d?o:NaN);if(!u[0]||!d[0])return d[0]?(e.s=-t,e):new W(u[0]?o:3==j?-0:0)}if(f=y(f),c=y(c),u=u.slice(),s=f-c){for((a=s<0)?(s=-s,i=u):(c=f,i=d),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=u.length)<(t=d.length))?s:t,s=t=0;t0)for(;t--;u[r++]=0);for(t=h-1;n>s;){if(u[--n]0?(o=a,r=f):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=f.length)<0&&(r=f,f=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+f[t]+i)/h|0,s[t]=h===s[t]?0:s[t]%h;return i&&(s=[i].concat(s),++o),$(e,s,o)},R.precision=R.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(q&&J(13,"argument"+c,e),e!=!!e&&(e=null)),!i)return null;if(t=(r=i.length-1)*p+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},R.round=function(e,t){var r=new W(this);return(null==e||D(e,0,g,15))&&ee(r,~~e+this.e+1,null!=t&&D(t,0,8,15,u)?0|t:j),r},R.shift=function(e){var t=this;return D(e,-b,b,16,"argument")?t.times("1e"+E(e)):new W(t.c&&t.c[0]&&(e<-b||e>b)?t.s*(e<0?0:1/0):t)},R.squareRoot=R.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,f=o.s,c=o.e,u=F+4,d=new W("0.5");if(1!==f||!s||!s[0])return new W(!f||f<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(f=Math.sqrt(+o))||f==1/0?(((t=w(s)).length+c)%2==0&&(t+="0"),f=Math.sqrt(t),c=y((c+1)/2)-(c<0||c%2),n=new W(t=f==1/0?"1e"+c:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new W(f+""),n.c[0])for((f=(c=n.e)+u)<3&&(f=0);;)if(a=n,n=d.times(a.plus(r(o,a,u,1))),w(a.c).slice(0,f)===(t=w(n.c)).slice(0,f)){if(n.e=0;){for(r=0,l=k[i]%w,b=k[i]/w|0,a=i+(o=f);a>i;)r=((c=l*(c=x[--o]%w)+(s=b*c+(u=x[o]/w|0)*l)%w*w+v[a]+r)/g|0)+(s/w|0)+b*u,v[a--]=c%g;v[a]=r}return r?++n:v.splice(0,1),$(e,v,n)},R.toDigits=function(e,t){var r=new W(this);return e=null!=e&&D(e,1,g,18,"precision")?0|e:null,t=null!=t&&D(t,0,8,18,u)?0|t:j,e?ee(r,e,t):r},R.toExponential=function(e,t){return G(this,null!=e&&D(e,0,g,19)?1+~~e:null,t,19)},R.toFixed=function(e,t){return G(this,null!=e&&D(e,0,g,20)?~~e+this.e+1:null,t,20)},R.toFormat=function(e,t){var r=G(this,null!=e&&D(e,0,g,21)?~~e+this.e+1:null,t,21);if(this.c){var n,i=r.split("."),a=+Y.groupSize,o=+Y.secondaryGroupSize,s=Y.groupSeparator,f=i[0],c=i[1],u=this.s<0,d=u?f.slice(1):f,l=d.length;if(o&&(n=a,a=o,o=n,l-=n),a>0&&l>0){for(n=l%a||a,f=d.substr(0,n);n0&&(f+=s+d.slice(n)),u&&(f="-"+f)}r=c?f+Y.decimalSeparator+((o=+Y.fractionGroupSize)?c.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+Y.fractionGroupSeparator):c):f}return r},R.toFraction=function(e){var t,n,i,a,o,s,f,c,u,d=q,l=this,h=l.c,b=new W(N),m=n=new W(N),g=f=new W(N);if(null!=e&&(q=!1,s=new W(e),q=d,(d=s.isInt())&&!s.lt(N)||(q&&J(22,"max denominator "+(d?"out of range":"not an integer"),e),e=!d&&s.c&&ee(s,s.e+1,1).gte(N)?s:null)),!h)return l.toString();for(u=w(h),a=b.e=u.length-l.e-1,b.c[0]=v[(o=a%p)<0?p+o:o],e=!e||s.cmp(b)>0?a>0?b:m:s,o=L,L=1/0,s=new W(u),f.c[0]=0;c=r(s,b,0,1),1!=(i=n.plus(c.times(g))).cmp(e);)n=g,g=i,m=f.plus(c.times(i=m)),f=i,b=s.minus(c.times(i=b)),s=i;return i=r(e.minus(n),g,0,1),f=f.plus(i.times(m)),n=n.plus(i.times(g)),f.s=m.s=l.s,t=r(m,g,a*=2,j).minus(l).abs().cmp(r(f,n,a,j).minus(l).abs())<1?[m.toString(),g.toString()]:[f.toString(),n.toString()],L=o,t},R.toNumber=function(){return+this},R.toPower=R.pow=function(e,t){var r,n,i,a=f(e<0?-e:+e),o=this;if(null!=t&&(T=23,t=new W(t)),!D(e,-b,b,23,"exponent")&&(!isFinite(e)||a>b&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+o,e),new W(t?r%t:r);for(t?e>1&&o.gt(N)&&o.isInt()&&t.gt(N)&&t.isInt()?o=o.mod(t):(i=t,t=null):V&&(r=s(V/p+2)),n=new W(N);;){if(a%2){if(!(n=n.times(o)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(a=f(a/2)))break;o=o.times(o),r?o.c&&o.c.length>r&&(o.c.length=r):t&&(o=o.mod(t))}return t?n:(e<0&&(n=N.div(n)),i?n.mod(i):r?ee(n,V,j):n)},R.toPrecision=function(e,t){return G(this,null!=e&&D(e,1,g,24,"precision")?0|e:null,t,24)},R.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=w(r.c),t=null!=e&&D(e,2,64,25,"base")?X(M(t,i),0|e,10,n):i<=B||i>=z?A(t,i):M(t,i),n<0&&r.c[0]&&(t="-"+t)),t},R.truncated=R.trunc=function(){return ee(new W(this),this.e+1,1)},R.valueOf=R.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=w(t.c),e=r<=B||r>=z?A(e,r):M(e,r),t.s<0?"-"+e:e)},R.isBigNumber=!0,null!=t&&W.config(t),W}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n;e.exports=(n=r(3), /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. @@ -9,7 +9,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([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]),f=i.create([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]),c=i.create([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]),u=i.create([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]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),l=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,h,w,_,x,k,S,A,M,E,P=this._hash.words,I=d.words,C=l.words,O=s.words,T=f.words,R=c.words,N=u.words;for(x=a=P[0],k=o=P[1],S=h=P[2],A=w=P[3],M=_=P[4],r=0;r<80;r+=1)E=a+e[t+O[r]]|0,E+=r<16?p(o,h,w)+I[0]:r<32?b(o,h,w)+I[1]:r<48?v(o,h,w)+I[2]:r<64?m(o,h,w)+I[3]:g(o,h,w)+I[4],E=(E=y(E|=0,R[r]))+_|0,a=_,_=w,w=y(h,10),h=o,o=E,E=x+e[t+T[r]]|0,E+=r<16?g(k,S,A)+C[0]:r<32?m(k,S,A)+C[1]:r<48?v(k,S,A)+C[2]:r<64?b(k,S,A)+C[3]:p(k,S,A)+C[4],E=(E=y(E|=0,N[r]))+M|0,x=M,M=A,A=y(S,10),S=k,k=E;E=P[1]+h+A|0,P[1]=P[2]+w+M|0,P[2]=P[3]+_+x|0,P[3]=P[4]+a+k|0,P[4]=P[0]+o+S|0,P[0]=E},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function b(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function y(e,t){return e<>>32-t}t.RIPEMD160=a._createHelper(h),t.HmacRIPEMD160=a._createHmacHelper(h)}(Math),n.RIPEMD160)},function(e,t,r){"use strict";var n=r(7),i=r(4).utils,a=i.assert,o=i.cachedProperty,s=i.parseBytes;function f(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=f},function(e,t,r){"use strict";var n=r(4).utils,i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(26),i=r(4),a=i.utils,o=a.assert,s=a.parseBytes,f=r(106),c=r(105);function u(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:a})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=s(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=s(e,r);if(e.length!==f+r.place)return!1;var c=e.slice(r.place,f+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(o),this.s=new n(c),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var a=n.concat(r),o=[48];return c(o,a.length),o=o.concat(a),i.encode(o,e)}},function(e,t,r){"use strict";var n=r(7),i=r(4).utils.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},function(e,t,r){"use strict";var n=r(26),i=r(53),a=r(9);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(e,t,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),u=new i({hash:this.hash,entropy:s,nonce:c,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;;l++){var h=a.k?a.k(l):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var m=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new f({r:v,s:m,recoveryParam:g})}}}}}},c.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var a=(t=new f(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,c=o.invm(this.n),u=c.mul(e).umod(this.n),d=c.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),d)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(u,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(e,t,r,i){o((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var a=this.n,s=new n(e),c=t.r,u=t.s,d=1&r,l=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");c=l?this.curve.pointFromX(c.add(this.curve.n),d):this.curve.pointFromX(c,d);var h=t.r.invm(a),p=a.sub(s).mul(h).umod(a),b=u.mul(h).umod(a);return this.g.mulAdd(p,c,b)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(6),i=r(9);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),f=i.redMul(o),c=a.redMul(s),u=i.redMul(s),d=o.redMul(a);return this.curve.point(f,c,d,u)},u.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(c=this.curve._mulA(i)).redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(c.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=n.redSub(i).redISub(a).redMul(f),t=o.redMul(c.redSub(a)),r=o.redMul(f)}}else{var c=i.redAdd(a);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=c.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(c)).redMul(f),t=this.curve._mulC(c).redMul(i.redISub(a)),r=c.redMul(f)}return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),c=a.redMul(o),u=s.redMul(f),d=a.redMul(f),l=o.redMul(s);return this.curve.point(c,u,l,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=i.redSub(s),c=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),d=n.redMul(f).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(c)):(t=n.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(c)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";var n=r(18),i=r(7),a=r(17),o=n.base,s=r(4).utils;function f(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(f,o),e.exports=f,f.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(c,o.BasePoint),f.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},f.prototype.point=function(e,t){return new c(this,e,t)},f.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";var n=r(18),i=r(4),a=r(7),o=r(17),s=n.base,f=i.utils.assert;function c(e){s.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function d(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,s),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],f(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,f,c,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),m=new a(1),g=0;0!==l.cmpn(0);){var y=h.div(l);c=h.sub(y.mul(l)),u=v.sub(y.mul(p));var w=m.sub(y.mul(b));if(!n&&c.cmp(d)<0)t=f.neg(),r=p,n=c.neg(),i=u;else if(n&&2==++g)break;f=c,h=l,l=c,v=p,p=u,m=b,b=w}o=c.neg(),s=u;var _=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(_)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),f=i.mul(r.b),c=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:f.add(c).neg()}},c.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(d,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new d(this,e,t,r)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),d=n.redMul(c),l=f.redSqr().redIAdd(u).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},d.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),c=f.redMul(o),u=r.redMul(f),d=s.redSqr().redIAdd(c).redISub(u).redISub(u),l=s.redMul(u.redISub(d)).redISub(i.redMul(c)),h=this.z.redMul(o);return this.curve.jpoint(d,l,h)},d.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(7),i=r(4).utils,a=i.getNAF,o=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<=f;t--)c=(c<<1)+n[t];o.push(c)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),l=i;l>0;l--){for(f=0;f=0;c--){for(t=0;c>=0&&0===o[c];c--)t++;if(c>=0&&t++,f=f.dblp(t),c<0)break;var u=o[c];s(0!==u),f="affine"===e.type?u>0?f.mixedAdd(i[u-1>>1]):f.mixedAdd(i[-u-1>>1].neg()):u>0?f.add(i[u-1>>1]):f.add(i[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,c=this._wnafT3,u=0,d=0;d=1;d-=2){var h=d-1,p=d;if(1===s[h]&&1===s[p]){var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],m=o(r[h],r[p]);u=Math.max(m[0].length,u),c[h]=new Array(u),c[p]=new Array(u);for(var g=0;g=0;d--){for(var k=0;d>=0;){var S=!0;for(g=0;g=0&&k++,_=_.dblp(k),d<0)break;for(g=0;g0?A=f[g][M-1>>1]:M<0&&(A=f[g][-M-1>>1].neg()),_="affine"===A.type?_.mixedAdd(A):_.add(A))}}for(d=0;d=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,f=1;f0||t.cmpn(-i)>0;){var a,o,s,f=e.andln(3)+n&3,c=t.andln(3)+i&3;3===f&&(f=-1),3===c&&(c=-1),a=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==c?f:-f,r[0].push(a),o=0==(1&c)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?c:-c,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e){e.exports={_from:"elliptic@^6.4.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.4.0",saveSpec:null,fetchSpec:"^6.4.0"},_requiredBy:["/","/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.4.0",_where:"C:\\Users\\JunXiang\\Desktop\\neon-js",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},function(e,t,r){var n=r(56).Buffer;e.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),a=0;a>=8;for(;c>0;)a.push(255&c),c>>=8}for(var u=0;e[u]===i&&u0;)n.push(s%r),s=s/r|0}for(var f="",c=0;0===t[c]&&c=0;--u)f+=e[n[u]];return f},decodeUnsafe:s,decode:function(e){var t=s(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";var n=r(27),i=r(56).Buffer;e.exports=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return n.encode(i.concat([t,r],t.length+4))},decode:function(e){var r=t(n.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=n.decodeUnsafe(e);if(r)return t(r)}}}},function(e,t,r){e.exports=r(28).createHash},function(e,t,r){var n=r(57);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,t,r){var n=new Buffer(r?34:33);return n.writeUInt8(e,0),t.copy(n,1),r&&(n[33]=1),n}e.exports={decode:function(e,t){return i(n.decode(e),t)},decodeRaw:i,encode:function(e,t,r){return"number"==typeof e?n.encode(a(e,t,r)):n.encode(a(e.version,e.privateKey,e.compressed))},encodeRaw:a}},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(58);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(5),i=r(136),a=r(59),o=r(30),s=r(135),f=r(134);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=f(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return c(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(5);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e){e.exports={_from:"axios@^0.18.0",_id:"axios@0.18.0",_inBundle:!1,_integrity:"sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",_location:"/axios",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"axios@^0.18.0",name:"axios",escapedName:"axios",rawSpec:"^0.18.0",saveSpec:null,fetchSpec:"^0.18.0"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",_shasum:"32d53e4851efdc0a11993b6cd000789d70c05102",_spec:"axios@^0.18.0",_where:"C:\\Users\\JunXiang\\Desktop\\neon-js",author:{name:"Matt Zabriskie"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},bugs:{url:"https://github.com/axios/axios/issues"},bundleDependencies:!1,bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}],dependencies:{"follow-redirects":"^1.3.0","is-buffer":"^1.1.5"},deprecated:!1,description:"Promise based HTTP client for the browser and node.js",devDependencies:{bundlesize:"^0.5.7",coveralls:"^2.11.9","es6-promise":"^4.0.5",grunt:"^1.0.1","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.0.0","grunt-contrib-nodeunit":"^1.0.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^19.0.0","grunt-karma":"^2.0.0","grunt-ts":"^6.0.0-beta.3","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-firefox-launcher":"^1.0.0","karma-jasmine":"^1.0.2","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",sinon:"^1.17.4",typescript:"^2.0.3","url-search-params":"^0.6.1",webpack:"^1.13.1","webpack-dev-server":"^1.14.1"},homepage:"https://github.com/axios/axios",keywords:["xhr","http","ajax","promise","node"],license:"MIT",main:"index.js",name:"axios",repository:{type:"git",url:"git+https://github.com/axios/axios.git"},scripts:{build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test && bundlesize",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},typings:"./index.d.ts",version:"0.18.0"}},function(e,t){e.exports=require("zlib")},function(e,t,r){"use strict";e.exports=((e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n=2,has16m:e>=3}}(function(e){if(!1===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return a.VSCODE_PID?1:0;const t=o?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in a)||"codeship"===a.CI_NAME?1:t;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)?1:"COLORTERM"in a?1:(a.TERM,t)}(e))}i("no-color")||i("no-colors")||i("color=false")?o=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=!0),"FORCE_COLOR"in a&&(o=0===a.FORCE_COLOR.length||0!==parseInt(a.FORCE_COLOR,10)),e.exports={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}},function(e,t){e.exports=require("tty")},function(e,t,r){var n=r(143),i=r(14);(t=e.exports=r(61)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}function o(){return process.env.DEBUG}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)},t.enable(o())},function(e,t){var r=1e3,n=60*r,i=60*n,a=24*i,o=365.25*a;function s(e,t,r){if(!(e0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(f=e,a,"day")||s(f,i,"hour")||s(f,n,"minute")||s(f,r,"second")||f+" ms":function(e){if(e>=a)return Math.round(e/a)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(61)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(a=++i)}),e.splice(a,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())},function(e,t,r){"undefined"==typeof process||"renderer"===process.type?e.exports=r(146):e.exports=r(144)},function(e,t){e.exports=require("stream")},function(e,t){e.exports=require("assert")},function(e,t,r){"use strict";var n=r(5),i=r(68),a=r(66),o=r(65),s=r(64),f=r(63).http,c=r(63).https,u=r(62),d=r(140),l=r(139),h=r(29),p=r(67);e.exports=function(e){return new Promise(function(t,r){var b,v=e.data,m=e.headers;if(m["User-Agent"]||m["user-agent"]||(m["User-Agent"]="axios/"+l.version),v&&!n.isStream(v)){if(Buffer.isBuffer(v));else if(n.isArrayBuffer(v))v=new Buffer(new Uint8Array(v));else{if(!n.isString(v))return r(h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));v=new Buffer(v,"utf-8")}m["Content-Length"]=v.length}var g=void 0;e.auth&&(g=(e.auth.username||"")+":"+(e.auth.password||""));var y=u.parse(e.url),w=y.protocol||"http:";if(!g&&y.auth){var _=y.auth.split(":");g=(_[0]||"")+":"+(_[1]||"")}g&&delete m.Authorization;var x="https:"===w,k=x?e.httpsAgent:e.httpAgent,S={path:a(y.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method,headers:m,agent:k,auth:g};e.socketPath?S.socketPath=e.socketPath:(S.hostname=y.hostname,S.port=y.port);var A,M=e.proxy;if(!M&&!1!==M){var E=w.slice(0,-1)+"_proxy",P=process.env[E]||process.env[E.toUpperCase()];if(P){var I=u.parse(P);if(M={host:I.hostname,port:I.port},I.auth){var C=I.auth.split(":");M.auth={username:C[0],password:C[1]}}}}if(M&&(S.hostname=M.host,S.host=M.host,S.headers.host=y.hostname+(y.port?":"+y.port:""),S.port=M.port,S.path=w+"//"+y.hostname+(y.port?":"+y.port:"")+S.path,M.auth)){var O=new Buffer(M.auth.username+":"+M.auth.password,"utf8").toString("base64");S.headers["Proxy-Authorization"]="Basic "+O}e.transport?A=e.transport:0===e.maxRedirects?A=x?s:o:(e.maxRedirects&&(S.maxRedirects=e.maxRedirects),A=x?c:f),e.maxContentLength&&e.maxContentLength>-1&&(S.maxBodyLength=e.maxContentLength);var T=A.request(S,function(n){if(!T.aborted){clearTimeout(b),b=null;var a=n;switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":a=a.pipe(d.createUnzip()),delete n.headers["content-encoding"]}var o=n.req||T,s={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:e,request:o};if("stream"===e.responseType)s.data=a,i(t,r,s);else{var f=[];a.on("data",function(t){f.push(t),e.maxContentLength>-1&&Buffer.concat(f).length>e.maxContentLength&&r(h("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,o))}),a.on("error",function(t){T.aborted||r(p(t,e,null,o))}),a.on("end",function(){var n=Buffer.concat(f);"arraybuffer"!==e.responseType&&(n=n.toString("utf8")),s.data=n,i(t,r,s)})}}});T.on("error",function(t){T.aborted||r(p(t,e,null,T))}),e.timeout&&!b&&(b=setTimeout(function(){T.abort(),r(h("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",T))},e.timeout)),e.cancelToken&&e.cancelToken.promise.then(function(e){T.aborted||(T.abort(),r(e))}),n.isStream(v)?v.pipe(T):T.end(v)})}},function(e,t,r){"use strict";var n=r(5);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,a=String(e),o="",s=0,f=n;a.charAt(0|s)||(f="=",s%1);o+=f.charAt(63&t>>8-s%1*8)){if((r=a.charCodeAt(s+=.75))>255)throw new i;t=t<<8|r}return o}},function(e,t,r){"use strict";var n=r(5);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(5),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,o={};return e?(n.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o):o}},function(e,t,r){"use strict";var n=r(5),i=r(68),a=r(66),o=r(154),s=r(153),f=r(29),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(152);e.exports=function(e){return new Promise(function(t,u){var d=e.data,l=e.headers;n.isFormData(d)&&delete l["Content-Type"];var h=new XMLHttpRequest,p="onreadystatechange",b=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,p="onload",b=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var v=e.auth.username||"",m=e.auth.password||"";l.Authorization="Basic "+c(v+":"+m)}if(h.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[p]=function(){if(h&&(4===h.readyState||b)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?o(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:r,config:e,request:h};i(t,u,n),h=null}},h.onerror=function(){u(f("Network Error",e,null,h)),h=null},h.ontimeout=function(){u(f("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var g=r(151),y=(e.withCredentials||s(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;y&&(l[e.xsrfHeaderName]=y)}if("setRequestHeader"in h&&n.forEach(l,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete l[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),u(e),h=null)}),void 0===d&&(d=null),h.send(d)})}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(30),i=r(5),a=r(138),o=r(137);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[o,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=s},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} +function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([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]),f=i.create([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]),c=i.create([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]),u=i.create([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]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),l=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,h,w,_,x,k,S,A,M,E,P=this._hash.words,I=d.words,C=l.words,O=s.words,T=f.words,R=c.words,N=u.words;for(x=a=P[0],k=o=P[1],S=h=P[2],A=w=P[3],M=_=P[4],r=0;r<80;r+=1)E=a+e[t+O[r]]|0,E+=r<16?p(o,h,w)+I[0]:r<32?b(o,h,w)+I[1]:r<48?v(o,h,w)+I[2]:r<64?m(o,h,w)+I[3]:g(o,h,w)+I[4],E=(E=y(E|=0,R[r]))+_|0,a=_,_=w,w=y(h,10),h=o,o=E,E=x+e[t+T[r]]|0,E+=r<16?g(k,S,A)+C[0]:r<32?m(k,S,A)+C[1]:r<48?v(k,S,A)+C[2]:r<64?b(k,S,A)+C[3]:p(k,S,A)+C[4],E=(E=y(E|=0,N[r]))+M|0,x=M,M=A,A=y(S,10),S=k,k=E;E=P[1]+h+A|0,P[1]=P[2]+w+M|0,P[2]=P[3]+_+x|0,P[3]=P[4]+a+k|0,P[4]=P[0]+o+S|0,P[0]=E},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function b(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function y(e,t){return e<>>32-t}t.RIPEMD160=a._createHelper(h),t.HmacRIPEMD160=a._createHmacHelper(h)}(Math),n.RIPEMD160)},function(e,t,r){"use strict";var n=r(7),i=r(4).utils,a=i.assert,o=i.cachedProperty,s=i.parseBytes;function f(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=f},function(e,t,r){"use strict";var n=r(4).utils,i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(26),i=r(4),a=i.utils,o=a.assert,s=a.parseBytes,f=r(106),c=r(105);function u(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:a})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=s(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=s(e,r);if(e.length!==f+r.place)return!1;var c=e.slice(r.place,f+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(o),this.s=new n(c),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var a=n.concat(r),o=[48];return c(o,a.length),o=o.concat(a),i.encode(o,e)}},function(e,t,r){"use strict";var n=r(7),i=r(4).utils.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},function(e,t,r){"use strict";var n=r(26),i=r(53),a=r(9);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length0))return s.iaddn(1),this.keyFromPrivate(s)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(e,t,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),u=new i({hash:this.hash,entropy:s,nonce:c,pers:a.pers,persEnc:a.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;;l++){var h=a.k?a.k(l):new n(u.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var m=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new f({r:v,s:m,recoveryParam:g})}}}}}},c.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var a=(t=new f(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,c=o.invm(this.n),u=c.mul(e).umod(this.n),d=c.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),d)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(u,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(e,t,r,i){o((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var a=this.n,s=new n(e),c=t.r,u=t.s,d=1&r,l=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");c=l?this.curve.pointFromX(c.add(this.curve.n),d):this.curve.pointFromX(c,d);var h=t.r.invm(a),p=a.sub(s).mul(h).umod(a),b=u.mul(h).umod(a);return this.g.mulAdd(p,c,b)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(6),i=r(9);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),f=i.redMul(o),c=a.redMul(s),u=i.redMul(s),d=o.redMul(a);return this.curve.point(f,c,d,u)},u.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(c=this.curve._mulA(i)).redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(c.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=n.redSub(i).redISub(a).redMul(f),t=o.redMul(c.redSub(a)),r=o.redMul(f)}}else{var c=i.redAdd(a);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=c.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(c)).redMul(f),t=this.curve._mulC(c).redMul(i.redISub(a)),r=c.redMul(f)}return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),c=a.redMul(o),u=s.redMul(f),d=a.redMul(f),l=o.redMul(s);return this.curve.point(c,u,l,d)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=i.redSub(s),c=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),d=n.redMul(f).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(c)):(t=n.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(c)),this.curve.point(d,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(e,t,r){"use strict";var n=r(18),i=r(7),a=r(17),o=n.base,s=r(4).utils;function f(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(f,o),e.exports=f,f.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(c,o.BasePoint),f.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},f.prototype.point=function(e,t){return new c(this,e,t)},f.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";var n=r(18),i=r(4),a=r(7),o=r(17),s=n.base,f=i.utils.assert;function c(e){s.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function d(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,s),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],f(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,f,c,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),m=new a(1),g=0;0!==l.cmpn(0);){var y=h.div(l);c=h.sub(y.mul(l)),u=v.sub(y.mul(p));var w=m.sub(y.mul(b));if(!n&&c.cmp(d)<0)t=f.neg(),r=p,n=c.neg(),i=u;else if(n&&2==++g)break;f=c,h=l,l=c,v=p,p=u,m=b,b=w}o=c.neg(),s=u;var _=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(_)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),f=i.mul(r.b),c=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:f.add(c).neg()}},c.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(d,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new d(this,e,t,r)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),d=n.redMul(c),l=f.redSqr().redIAdd(u).redISub(d).redISub(d),h=f.redMul(d.redISub(l)).redISub(a.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},d.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),c=f.redMul(o),u=r.redMul(f),d=s.redSqr().redIAdd(c).redISub(u).redISub(u),l=s.redMul(u.redISub(d)).redISub(i.redMul(c)),h=this.z.redMul(o);return this.curve.jpoint(d,l,h)},d.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},d.prototype.inspect=function(){return this.isInfinity()?"":""},d.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(7),i=r(4).utils,a=i.getNAF,o=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<=f;t--)c=(c<<1)+n[t];o.push(c)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),l=i;l>0;l--){for(f=0;f=0;c--){for(t=0;c>=0&&0===o[c];c--)t++;if(c>=0&&t++,f=f.dblp(t),c<0)break;var u=o[c];s(0!==u),f="affine"===e.type?u>0?f.mixedAdd(i[u-1>>1]):f.mixedAdd(i[-u-1>>1].neg()):u>0?f.add(i[u-1>>1]):f.add(i[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,c=this._wnafT3,u=0,d=0;d=1;d-=2){var h=d-1,p=d;if(1===s[h]&&1===s[p]){var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],m=o(r[h],r[p]);u=Math.max(m[0].length,u),c[h]=new Array(u),c[p]=new Array(u);for(var g=0;g=0;d--){for(var k=0;d>=0;){var S=!0;for(g=0;g=0&&k++,_=_.dblp(k),d<0)break;for(g=0;g0?A=f[g][M-1>>1]:M<0&&(A=f[g][-M-1>>1].neg()),_="affine"===A.type?_.mixedAdd(A):_.add(A))}}for(d=0;d=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,f=1;f0||t.cmpn(-i)>0;){var a,o,s,f=e.andln(3)+n&3,c=t.andln(3)+i&3;3===f&&(f=-1),3===c&&(c=-1),a=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==c?f:-f,r[0].push(a),o=0==(1&c)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?c:-c,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e){e.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(e,t,r){var n=r(56).Buffer;e.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),a=0;a>=8;for(;c>0;)a.push(255&c),c>>=8}for(var u=0;e[u]===i&&u0;)n.push(s%r),s=s/r|0}for(var f="",c=0;0===t[c]&&c=0;--u)f+=e[n[u]];return f},decodeUnsafe:s,decode:function(e){var t=s(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";var n=r(27),i=r(56).Buffer;e.exports=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return n.encode(i.concat([t,r],t.length+4))},decode:function(e){var r=t(n.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=n.decodeUnsafe(e);if(r)return t(r)}}}},function(e,t,r){e.exports=r(28).createHash},function(e,t,r){var n=r(57);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,t,r){var n=new Buffer(r?34:33);return n.writeUInt8(e,0),t.copy(n,1),r&&(n[33]=1),n}e.exports={decode:function(e,t){return i(n.decode(e),t)},decodeRaw:i,encode:function(e,t,r){return"number"==typeof e?n.encode(a(e,t,r)):n.encode(a(e.version,e.privateKey,e.compressed))},encodeRaw:a}},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(58);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(5),i=r(136),a=r(59),o=r(30),s=r(135),f=r(134);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=f(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return c(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(5);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e){e.exports={name:"axios",version:"0.18.0",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test && bundlesize",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://github.com/axios/axios",devDependencies:{bundlesize:"^0.5.7",coveralls:"^2.11.9","es6-promise":"^4.0.5",grunt:"^1.0.1","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.0.0","grunt-contrib-nodeunit":"^1.0.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^19.0.0","grunt-karma":"^2.0.0","grunt-ts":"^6.0.0-beta.3","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-firefox-launcher":"^1.0.0","karma-jasmine":"^1.0.2","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",sinon:"^1.17.4",webpack:"^1.13.1","webpack-dev-server":"^1.14.1","url-search-params":"^0.6.1",typescript:"^2.0.3"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.3.0","is-buffer":"^1.1.5"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]}},function(e,t){e.exports=require("zlib")},function(e,t,r){"use strict";e.exports=((e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return-1!==n&&(-1===i||n=2,has16m:e>=3}}(function(e){if(!1===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=n.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in a)||"codeship"===a.CI_NAME?1:t;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)?1:"COLORTERM"in a?1:(a.TERM,t)}(e))}i("no-color")||i("no-colors")||i("color=false")?o=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=!0),"FORCE_COLOR"in a&&(o=0===a.FORCE_COLOR.length||0!==parseInt(a.FORCE_COLOR,10)),e.exports={supportsColor:s,stdout:s(process.stdout),stderr:s(process.stderr)}},function(e,t){e.exports=require("tty")},function(e,t,r){var n=r(143),i=r(14);(t=e.exports=r(61)).init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}function o(){return process.env.DEBUG}t.inspectOpts=Object.keys(process.env).filter(function(e){return/^debug_/i.test(e)}).reduce(function(e,t){var r=t.substring(6).toLowerCase().replace(/_([a-z])/g,function(e,t){return t.toUpperCase()}),n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),t.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(function(e){return e.trim()}).join(" ")},t.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)},t.enable(o())},function(e,t){var r=1e3,n=60*r,i=60*n,a=24*i,o=365.25*a;function s(e,t,r){if(!(e0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return t.long?s(f=e,a,"day")||s(f,i,"hour")||s(f,n,"minute")||s(f,r,"second")||f+" ms":function(e){if(e>=a)return Math.round(e/a)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=r(61)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(a=++i)}),e.splice(a,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())},function(e,t,r){"undefined"==typeof process||"renderer"===process.type?e.exports=r(146):e.exports=r(144)},function(e,t){e.exports=require("stream")},function(e,t){e.exports=require("assert")},function(e,t,r){"use strict";var n=r(5),i=r(68),a=r(66),o=r(65),s=r(64),f=r(63).http,c=r(63).https,u=r(62),d=r(140),l=r(139),h=r(29),p=r(67);e.exports=function(e){return new Promise(function(t,r){var b,v=e.data,m=e.headers;if(m["User-Agent"]||m["user-agent"]||(m["User-Agent"]="axios/"+l.version),v&&!n.isStream(v)){if(Buffer.isBuffer(v));else if(n.isArrayBuffer(v))v=new Buffer(new Uint8Array(v));else{if(!n.isString(v))return r(h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));v=new Buffer(v,"utf-8")}m["Content-Length"]=v.length}var g=void 0;e.auth&&(g=(e.auth.username||"")+":"+(e.auth.password||""));var y=u.parse(e.url),w=y.protocol||"http:";if(!g&&y.auth){var _=y.auth.split(":");g=(_[0]||"")+":"+(_[1]||"")}g&&delete m.Authorization;var x="https:"===w,k=x?e.httpsAgent:e.httpAgent,S={path:a(y.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method,headers:m,agent:k,auth:g};e.socketPath?S.socketPath=e.socketPath:(S.hostname=y.hostname,S.port=y.port);var A,M=e.proxy;if(!M&&!1!==M){var E=w.slice(0,-1)+"_proxy",P=process.env[E]||process.env[E.toUpperCase()];if(P){var I=u.parse(P);if(M={host:I.hostname,port:I.port},I.auth){var C=I.auth.split(":");M.auth={username:C[0],password:C[1]}}}}if(M&&(S.hostname=M.host,S.host=M.host,S.headers.host=y.hostname+(y.port?":"+y.port:""),S.port=M.port,S.path=w+"//"+y.hostname+(y.port?":"+y.port:"")+S.path,M.auth)){var O=new Buffer(M.auth.username+":"+M.auth.password,"utf8").toString("base64");S.headers["Proxy-Authorization"]="Basic "+O}e.transport?A=e.transport:0===e.maxRedirects?A=x?s:o:(e.maxRedirects&&(S.maxRedirects=e.maxRedirects),A=x?c:f),e.maxContentLength&&e.maxContentLength>-1&&(S.maxBodyLength=e.maxContentLength);var T=A.request(S,function(n){if(!T.aborted){clearTimeout(b),b=null;var a=n;switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":a=a.pipe(d.createUnzip()),delete n.headers["content-encoding"]}var o=n.req||T,s={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:e,request:o};if("stream"===e.responseType)s.data=a,i(t,r,s);else{var f=[];a.on("data",function(t){f.push(t),e.maxContentLength>-1&&Buffer.concat(f).length>e.maxContentLength&&r(h("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,o))}),a.on("error",function(t){T.aborted||r(p(t,e,null,o))}),a.on("end",function(){var n=Buffer.concat(f);"arraybuffer"!==e.responseType&&(n=n.toString("utf8")),s.data=n,i(t,r,s)})}}});T.on("error",function(t){T.aborted||r(p(t,e,null,T))}),e.timeout&&!b&&(b=setTimeout(function(){T.abort(),r(h("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",T))},e.timeout)),e.cancelToken&&e.cancelToken.promise.then(function(e){T.aborted||(T.abort(),r(e))}),n.isStream(v)?v.pipe(T):T.end(v)})}},function(e,t,r){"use strict";var n=r(5);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,a=String(e),o="",s=0,f=n;a.charAt(0|s)||(f="=",s%1);o+=f.charAt(63&t>>8-s%1*8)){if((r=a.charCodeAt(s+=.75))>255)throw new i;t=t<<8|r}return o}},function(e,t,r){"use strict";var n=r(5);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(5),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,o={};return e?(n.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o):o}},function(e,t,r){"use strict";var n=r(5),i=r(68),a=r(66),o=r(154),s=r(153),f=r(29),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(152);e.exports=function(e){return new Promise(function(t,u){var d=e.data,l=e.headers;n.isFormData(d)&&delete l["Content-Type"];var h=new XMLHttpRequest,p="onreadystatechange",b=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||s(e.url)||(h=new window.XDomainRequest,p="onload",b=!0,h.onprogress=function(){},h.ontimeout=function(){}),e.auth){var v=e.auth.username||"",m=e.auth.password||"";l.Authorization="Basic "+c(v+":"+m)}if(h.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h[p]=function(){if(h&&(4===h.readyState||b)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?o(h.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:r,config:e,request:h};i(t,u,n),h=null}},h.onerror=function(){u(f("Network Error",e,null,h)),h=null},h.ontimeout=function(){u(f("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var g=r(151),y=(e.withCredentials||s(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;y&&(l[e.xsrfHeaderName]=y)}if("setRequestHeader"in h&&n.forEach(l,function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete l[t]:h.setRequestHeader(t,e)}),e.withCredentials&&(h.withCredentials=!0),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){h&&(h.abort(),u(e),h=null)}),void 0===d&&(d=null),h.send(d)})}},function(e,t,r){"use strict";var n=r(5);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(30),i=r(5),a=r(138),o=r(137);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[o,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=s},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * diff --git a/lib/index.js.gz b/lib/index.js.gz index 33cf3ec10..b0dd8615b 100644 Binary files a/lib/index.js.gz and b/lib/index.js.gz differ diff --git a/website/static/browser.js b/website/static/browser.js index 8fc3a29d2..3ebb85817 100644 --- a/website/static/browser.js +++ b/website/static/browser.js @@ -1,11 +1,11 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Neon=t():e.Neon=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=187)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fixed8=t.sha256=t.hash256=t.hash160=t.StringStream=t.ensureHex=t.isHex=t.reverseHex=t.reverseArray=t.hexXor=t.num2VarInt=t.fixed82num=t.num2fixed8=t.num2hexstring=t.int2hex=t.hexstring2str=t.str2hexstring=t.ab2hexstring=t.hexstring2ab=t.str2ab=t.ab2str=void 0;var n=f(r(60)),i=f(r(59)),a=f(r(117)),o=f(r(116)),s=f(r(33));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function d(e){return(d=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new Error("num must be numeric");if(e<0)throw new RangeError("num is unsigned (>= 0)");if(t%1!=0)throw new Error("size must be a whole integer");if(!Number.isSafeInteger(e))throw new RangeError("num (".concat(e,") must be a safe integer"));t*=2;var n=e.toString(16);return n=n.length%t==0?n:("0".repeat(t)+n).substring(n.length),r&&(n=S(n)),n};t.num2hexstring=_;t.num2fixed8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;if("number"!=typeof e)throw new Error("num must be numeric");if(t%1!=0)throw new Error("size must be a whole integer");return new E(e.toFixed(8)).toReverseHex().slice(0,2*t)};t.fixed82num=function(e){return A(e),""===e?0:E.fromReverseHex(e).toNumber()};t.num2VarInt=function(e){return e<253?_(e):e<=65535?"fd"+_(e,2,!0):e<=4294967295?"fe"+_(e,4,!0):"ff"+_(e,8,!0)};t.hexXor=function(e,t){if(A(e),A(t),e.length!==t.length)throw new Error("strings are disparate lengths");for(var r=[],n=0;n=0;r-=2)t+=e.substr(r,2);return t};t.reverseHex=S;var k=/^([0-9A-Fa-f]{2})*$/,x=function(e){try{return k.test(e)}catch(e){return!1}};t.isHex=x;var A=function(e){if(!x(e))throw new Error("Expected a hexstring but got ".concat(e))};t.ensureHex=A;var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";h(this,e),this.str=t,this.pter=0}return b(e,[{key:"isEmpty",value:function(){return this.pter>=this.str.length}},{key:"peek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.isEmpty()?"":this.substr(this.ptr,2*e)}},{key:"read",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.isEmpty())throw new Error;var t=this.str.substr(this.pter,2*e);return this.pter+=2*e,t}},{key:"readVarBytes",value:function(){return this.read(this.readVarInt())}},{key:"readVarInt",value:function(){var e=parseInt(this.read(1),16);return 253===e?e=parseInt(S(this.read(2)),16):254===e?e=parseInt(S(this.read(4)),16):255===e&&(e=parseInt(S(this.read(8)),16)),e}},{key:"reset",value:function(){this.pter=0}}]),e}();t.StringStream=M;t.hash160=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,a.default)(r).toString()};t.hash256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,i.default)(r).toString()};t.sha256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e);return(0,i.default)(t).toString()};var E=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return h(this,t),"number"==typeof e&&(e=e.toFixed(8)),c(this,d(t).call(this,e,r))}return b(t,[{key:"toHex",value:function(){var e=this.times(1e8).round(0).toString(16);return"0".repeat(16-e.length)+e}},{key:"toReverseHex",value:function(){return S(this.toHex())}},{key:s.default.inspect.custom,value:function(e,t){return this.toFixed(8)}},{key:"ceil",value:function(){return new t(l(d(t.prototype),"ceil",this).call(this))}},{key:"floor",value:function(){return new t(l(d(t.prototype),"floor",this).call(this))}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"round",this).call(this,e,r))}},{key:"div",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.dividedBy(e,t)}},{key:"dividedBy",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"dividedBy",this).call(this,e,r))}},{key:"mul",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.times(e,t)}},{key:"times",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"times",this).call(this,e,r))}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.plus(e,t)}},{key:"plus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"plus",this).call(this,e,r))}},{key:"sub",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.minus(e,t)}},{key:"minus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(d(t.prototype),"minus",this).call(this,e,r))}}],[{key:"fromHex",value:function(e){return new t(e,16).div(1e8)}},{key:"fromReverseHex",value:function(e){return this.fromHex(S(e))}}]),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");u(e.prototype,t&&t.prototype),t&&u(e,t)}(t,e),t}(o.default);t.Fixed8=E},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.default=void 0;var n=a(r(95)),i=a(r(94));function a(e){return e&&e.__esModule?e:{default:e}}i.default.reg(n.default),n.default.setDefaultLevel("silent"),n.default.setAll=function(e){Object.keys(n.default.getLoggers()).map(function(t){n.default.getLogger(t).setLevel(e)})};var o=function(e,t){var r=(new Date).toUTCString();e=e.toUpperCase();var n=t;return"[".concat(r,"] (").concat(n,") ").concat(e,": ")};t.default=function(e){var t=n.default.getLogger(e);return i.default.apply(t,{format:o}),t};var s=n.default;t.logger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TX_VERSION=t.RPC_VERSION=t.NEP_FLAG=t.NEP_HEADER=t.NEO_NETWORK=t.DEFAULT_ACCOUNT_CONTRACT=t.DEFAULT_WALLET=t.DEFAULT_SYSFEE=t.DEFAULT_SCRYPT=t.DEFAULT_REQ=t.DEFAULT_RPC=t.CONTRACTS=t.ASSET_ID=t.ASSETS=t.ADDR_VERSION=void 0;t.ADDR_VERSION="17";t.ASSETS={NEO:"NEO",c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b:"NEO",GAS:"GAS","602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7":"GAS"};t.ASSET_ID={NEO:"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",GAS:"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7"};t.CONTRACTS={RPX:"ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9",TEST_RPX:"5b7074e873973a6ed3708862f219a6fbf4d1c411",TEST_LWTF:"d7678dd97c000be3f33e9362e673101bac4ca654",TEST_NXT:"0b6c1f919e95fe61c17a7612aebfaf4fda3a2214",TEST_RHTT4:"f9572c5b119a6b5775a6af07f1cef5d310038f55"};t.DEFAULT_RPC={MAIN:"https://seed1.neo.org:10331",TEST:"https://seed1.neo.org:20331"};t.DEFAULT_REQ={jsonrpc:"2.0",method:"getblockcount",params:[],id:1234};t.DEFAULT_SCRYPT={cost:16384,blockSize:8,parallel:8,size:64};t.DEFAULT_SYSFEE={enrollmentTransaction:1e3,issueTransaction:500,publishTransaction:500,registerTransaction:1e4};t.DEFAULT_WALLET={name:"myWallet",version:"1.0",scrypt:{},accounts:[],extra:null};t.DEFAULT_ACCOUNT_CONTRACT={script:"",parameters:[{name:"signature",type:"Signature"}],deployed:!1};t.NEO_NETWORK={MAIN:"MainNet",TEST:"TestNet"};t.NEP_HEADER="0142";t.NEP_FLAG="e0";t.RPC_VERSION="2.3.2";t.TX_VERSION={CLAIM:0,CONTRACT:0,INVOCATION:1}},function(e,t,r){var n=r(5),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){"use strict";(function(e){ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Neon=t():e.Neon=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=186)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Fixed8=t.sha256=t.hash256=t.hash160=t.StringStream=t.ensureHex=t.isHex=t.reverseHex=t.reverseArray=t.hexXor=t.num2VarInt=t.fixed82num=t.num2fixed8=t.num2hexstring=t.int2hex=t.hexstring2str=t.str2hexstring=t.ab2hexstring=t.hexstring2ab=t.str2ab=t.ab2str=void 0;var n=f(r(60)),i=f(r(59)),a=f(r(118)),o=f(r(117)),s=f(r(33));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e,t,r){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function h(e){return(h=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new Error("num must be numeric");if(e<0)throw new RangeError("num is unsigned (>= 0)");if(t%1!=0)throw new Error("size must be a whole integer");if(!Number.isSafeInteger(e))throw new RangeError("num (".concat(e,") must be a safe integer"));t*=2;var n=e.toString(16);return n=n.length%t==0?n:("0".repeat(t)+n).substring(n.length),r&&(n=S(n)),n};t.num2hexstring=_;t.num2fixed8=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;if("number"!=typeof e)throw new Error("num must be numeric");if(t%1!=0)throw new Error("size must be a whole integer");return new E(e.toFixed(8)).toReverseHex().slice(0,2*t)};t.fixed82num=function(e){return A(e),""===e?0:E.fromReverseHex(e).toNumber()};t.num2VarInt=function(e){return e<253?_(e):e<=65535?"fd"+_(e,2,!0):e<=4294967295?"fe"+_(e,4,!0):"ff"+_(e,8,!0)};t.hexXor=function(e,t){if(A(e),A(t),e.length!==t.length)throw new Error("strings are disparate lengths");for(var r=[],n=0;n=0;r-=2)t+=e.substr(r,2);return t};t.reverseHex=S;var k=/^([0-9A-Fa-f]{2})*$/,x=function(e){try{return k.test(e)}catch(e){return!1}};t.isHex=x;var A=function(e){if(!x(e))throw new Error("Expected a hexstring but got ".concat(e))};t.ensureHex=A;var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";d(this,e),this.str=t,this.pter=0}return b(e,[{key:"isEmpty",value:function(){return this.pter>=this.str.length}},{key:"peek",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.isEmpty()?"":this.substr(this.ptr,2*e)}},{key:"read",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.isEmpty())throw new Error;var t=this.str.substr(this.pter,2*e);return this.pter+=2*e,t}},{key:"readVarBytes",value:function(){return this.read(this.readVarInt())}},{key:"readVarInt",value:function(){var e=parseInt(this.read(1),16);return 253===e?e=parseInt(S(this.read(2)),16):254===e?e=parseInt(S(this.read(4)),16):255===e&&(e=parseInt(S(this.read(8)),16)),e}},{key:"reset",value:function(){this.pter=0}}]),e}();t.StringStream=M;t.hash160=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,a.default)(r).toString()};t.hash256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e),r=(0,i.default)(t);return(0,i.default)(r).toString()};t.sha256=function(e){if("string"!=typeof e)throw new Error("reverseHex expects a string");if(e.length%2!=0)throw new Error("Incorrect Length: ".concat(e));var t=n.default.parse(e);return(0,i.default)(t).toString()};var E=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return d(this,t),"number"==typeof e&&(e=e.toFixed(8)),c(this,h(t).call(this,e,r))}return b(t,[{key:"toHex",value:function(){var e=this.times(1e8).round(0).toString(16);return"0".repeat(16-e.length)+e}},{key:"toReverseHex",value:function(){return S(this.toHex())}},{key:s.default.inspect.custom,value:function(e,t){return this.toFixed(8)}},{key:"ceil",value:function(){return new t(l(h(t.prototype),"ceil",this).call(this))}},{key:"floor",value:function(){return new t(l(h(t.prototype),"floor",this).call(this))}},{key:"round",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"round",this).call(this,e,r))}},{key:"div",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.dividedBy(e,t)}},{key:"dividedBy",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"dividedBy",this).call(this,e,r))}},{key:"mul",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.times(e,t)}},{key:"times",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"times",this).call(this,e,r))}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.plus(e,t)}},{key:"plus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"plus",this).call(this,e,r))}},{key:"sub",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.minus(e,t)}},{key:"minus",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new t(l(h(t.prototype),"minus",this).call(this,e,r))}}],[{key:"fromHex",value:function(e){return new t(e,16).div(1e8)}},{key:"fromReverseHex",value:function(e){return this.fromHex(S(e))}}]),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");u(e.prototype,t&&t.prototype),t&&u(e,t)}(t,e),t}(o.default);t.Fixed8=E},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.default=void 0;var n=a(r(96)),i=a(r(95));function a(e){return e&&e.__esModule?e:{default:e}}i.default.reg(n.default),n.default.setDefaultLevel("silent"),n.default.setAll=function(e){Object.keys(n.default.getLoggers()).map(function(t){n.default.getLogger(t).setLevel(e)})};var o=function(e,t){var r=(new Date).toUTCString();e=e.toUpperCase();var n=t;return"[".concat(r,"] (").concat(n,") ").concat(e,": ")};t.default=function(e){var t=n.default.getLogger(e);return i.default.apply(t,{format:o}),t};var s=n.default;t.logger=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TX_VERSION=t.RPC_VERSION=t.NEP_FLAG=t.NEP_HEADER=t.NEO_NETWORK=t.DEFAULT_ACCOUNT_CONTRACT=t.DEFAULT_WALLET=t.DEFAULT_SYSFEE=t.DEFAULT_SCRYPT=t.DEFAULT_REQ=t.DEFAULT_RPC=t.CONTRACTS=t.ASSET_ID=t.ASSETS=t.ADDR_VERSION=void 0;t.ADDR_VERSION="17";t.ASSETS={NEO:"NEO",c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b:"NEO",GAS:"GAS","602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7":"GAS"};t.ASSET_ID={NEO:"c56f33fc6ecfcd0c225c4ab356fee59390af8560be0e930faebe74a6daff7c9b",GAS:"602c79718b16e442de58778e148d0b1084e3b2dffd5de6b7b16cee7969282de7"};t.CONTRACTS={RPX:"ecc6b20d3ccac1ee9ef109af5a7cdb85706b1df9",TEST_RPX:"5b7074e873973a6ed3708862f219a6fbf4d1c411",TEST_LWTF:"d7678dd97c000be3f33e9362e673101bac4ca654",TEST_NXT:"0b6c1f919e95fe61c17a7612aebfaf4fda3a2214",TEST_RHTT4:"f9572c5b119a6b5775a6af07f1cef5d310038f55"};t.DEFAULT_RPC={MAIN:"https://seed1.neo.org:10331",TEST:"https://seed1.neo.org:20331"};t.DEFAULT_REQ={jsonrpc:"2.0",method:"getblockcount",params:[],id:1234};t.DEFAULT_SCRYPT={cost:16384,blockSize:8,parallel:8,size:64};t.DEFAULT_SYSFEE={enrollmentTransaction:1e3,issueTransaction:500,publishTransaction:500,registerTransaction:1e4};t.DEFAULT_WALLET={name:"myWallet",version:"1.0",scrypt:{},accounts:[],extra:null};t.DEFAULT_ACCOUNT_CONTRACT={script:"",parameters:[{name:"signature",type:"Signature"}],deployed:!1};t.NEO_NETWORK={MAIN:"MainNet",TEST:"TestNet"};t.NEP_HEADER="0142";t.NEP_FLAG="e0";t.RPC_VERSION="2.3.2";t.TX_VERSION={CLAIM:0,CONTRACT:0,INVOCATION:1}},function(e,t,r){var n=r(7),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},a=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=4*a,f=i/s,u=(f=t?e.ceil(f):e.max((0|f)-this._minBufferSize,0))*a,c=e.min(4*u,i);if(u){for(var l=0;l * @license MIT */ -var n=r(167),i=r(166),a=r(74);function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return H(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var a,o=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,f/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-f),a=r;a>=0;a--){for(var l=!0,d=0;di&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[i+1]))&&(f=(31&u)<<6|63&a)>127&&(c=f);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(f=(15&u)<<12|(63&a)<<6|63&o)>2047&&(f<55296||f>57343)&&(c=f);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(f=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&f<1114112&&(c=f)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return E(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},f.prototype.compare=function(e,t,r,n,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,s=Math.min(a,o),u=this.slice(n,i),c=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,a){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function j(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,a){return a||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,a){return a||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},f.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function D(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(15))},function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},a=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){var t=t,r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=4*a,f=i/s,u=(f=t?e.ceil(f):e.max((0|f)-this._minBufferSize,0))*a,c=e.min(4*u,i);if(u){for(var l=0;l1)for(var r=1;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,f,u){var c=0,l=t;return c+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,f,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(139).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function f(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,f=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,l=67108863&f,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;c+=(o=(i=0|e.words[p])*(a=0|t.words[h])+l)/67108864|0,l=67108863&o}r.words[u]=0|l,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=c[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:u[d-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,f="le"===t,u=new e(a),c=this.clone();if(f){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,h=0|o[1],p=8191&h,b=h>>>13,v=0|o[2],m=8191&v,g=v>>>13,y=0|o[3],w=8191&y,_=y>>>13,S=0|o[4],k=8191&S,x=S>>>13,A=0|o[5],M=8191&A,E=A>>>13,T=0|o[6],I=8191&T,P=T>>>13,O=0|o[7],R=8191&O,C=O>>>13,B=0|o[8],j=8191&B,N=B>>>13,L=0|o[9],F=8191&L,z=L>>>13,H=0|s[0],D=8191&H,U=H>>>13,q=0|s[1],Y=8191&q,K=q>>>13,V=0|s[2],W=8191&V,X=V>>>13,Z=0|s[3],G=8191&Z,Q=Z>>>13,J=0|s[4],$=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],fe=8191&se,ue=se>>>13,ce=0|s[8],le=8191&ce,de=ce>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(u+(n=Math.imul(l,D))|0)+((8191&(i=(i=Math.imul(l,U))+Math.imul(d,D)|0))<<13)|0;u=((a=Math.imul(d,U))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,D),i=(i=Math.imul(p,U))+Math.imul(b,D)|0,a=Math.imul(b,U);var me=(u+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,Y)|0))<<13)|0;u=((a=a+Math.imul(d,K)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,D),i=(i=Math.imul(m,U))+Math.imul(g,D)|0,a=Math.imul(g,U),n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,Y)|0,a=a+Math.imul(b,K)|0;var ge=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(d,W)|0))<<13)|0;u=((a=a+Math.imul(d,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,D),i=(i=Math.imul(w,U))+Math.imul(_,D)|0,a=Math.imul(_,U),n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,K)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,X)|0;var ye=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,G)|0))<<13)|0;u=((a=a+Math.imul(d,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,D),i=(i=Math.imul(k,U))+Math.imul(x,D)|0,a=Math.imul(x,U),n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,Q)|0;var we=(u+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,$)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,D),i=(i=Math.imul(M,U))+Math.imul(E,D)|0,a=Math.imul(E,U),n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(x,Y)|0,a=a+Math.imul(x,K)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,Q)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;u=((a=a+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,D),i=(i=Math.imul(I,U))+Math.imul(P,D)|0,a=Math.imul(P,U),n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,K)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(l,ae)|0)|0)+((8191&(i=(i=i+Math.imul(l,oe)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,D),i=(i=Math.imul(R,U))+Math.imul(C,D)|0,a=Math.imul(C,U),n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,Y)|0,a=a+Math.imul(P,K)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var ke=(u+(n=n+Math.imul(l,fe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(d,fe)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,D),i=(i=Math.imul(j,U))+Math.imul(N,D)|0,a=Math.imul(N,U),n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(C,Y)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,X)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,$)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(m,ae)|0,i=(i=i+Math.imul(m,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,ue)|0;var xe=(u+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(F,D),i=(i=Math.imul(F,U))+Math.imul(z,D)|0,a=Math.imul(z,U),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(N,Y)|0,a=a+Math.imul(N,K)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,Q)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(E,$)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,ue)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,le)|0,a=a+Math.imul(b,de)|0;var Ae=(u+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,K))+Math.imul(z,Y)|0,a=Math.imul(z,K),n=n+Math.imul(j,W)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(C,G)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,$)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,ue)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(g,le)|0,a=a+Math.imul(g,de)|0;var Me=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((a=a+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,X))+Math.imul(z,W)|0,a=Math.imul(z,X),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,Q)|0,n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,ue)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,le)|0,a=a+Math.imul(_,de)|0;var Ee=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(g,pe)|0))<<13)|0;u=((a=a+Math.imul(g,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,Q))+Math.imul(z,G)|0,a=Math.imul(z,Q),n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,ue)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(x,le)|0,a=a+Math.imul(x,de)|0;var Te=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((a=a+Math.imul(_,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,$),i=(i=Math.imul(F,ee))+Math.imul(z,$)|0,a=Math.imul(z,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(N,re)|0,a=a+Math.imul(N,ne)|0,n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,ue)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(E,le)|0,a=a+Math.imul(E,de)|0;var Ie=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(x,pe)|0))<<13)|0;u=((a=a+Math.imul(x,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(N,ae)|0,a=a+Math.imul(N,oe)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(C,fe)|0,a=a+Math.imul(C,ue)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(P,le)|0,a=a+Math.imul(P,de)|0;var Pe=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(E,pe)|0))<<13)|0;u=((a=a+Math.imul(E,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,ae),i=(i=Math.imul(F,oe))+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(N,fe)|0,a=a+Math.imul(N,ue)|0,n=n+Math.imul(R,le)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(C,le)|0,a=a+Math.imul(C,de)|0;var Oe=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((a=a+Math.imul(P,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,fe),i=(i=Math.imul(F,ue))+Math.imul(z,fe)|0,a=Math.imul(z,ue),n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(N,le)|0,a=a+Math.imul(N,de)|0;var Re=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(C,pe)|0))<<13)|0;u=((a=a+Math.imul(C,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,de))+Math.imul(z,le)|0,a=Math.imul(z,de);var Ce=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(N,pe)|0))<<13)|0;u=((a=a+Math.imul(N,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Be=(u+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,be))+Math.imul(z,pe)|0))<<13)|0;return u=((a=Math.imul(z,be))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=ve,f[1]=me,f[2]=ge,f[3]=ye,f[4]=we,f[5]=_e,f[6]=Se,f[7]=ke,f[8]=xe,f[9]=Ae,f[10]=Me,f[11]=Ee,f[12]=Te,f[13]=Ie,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ce,f[18]=Be,0!==u&&(f[19]=u,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var l=0|this.words[u];this.words[u]=c<<26-a|l>>>a,c=l&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=d)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),f=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(l)),i.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(l)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(f)):(r.isub(t),s.isub(i),f.isub(o))}return{a:s,b:f,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(g,m),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var l=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var b=h,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var u=t.words[n],c=f-1;c>=0;c--){var l=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==o?(o<<=1,o|=l,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,r(65)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Account:!0,Balance:!0,Wallet:!0,Claims:!0,AssetBalance:!0,Coin:!0,ClaimItem:!0};Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Balance",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Claims",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"AssetBalance",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"Coin",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"ClaimItem",{enumerable:!0,get:function(){return p.ClaimItem}}),t.default=void 0;var i=v(r(26));Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))});var a=v(r(32));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=v(r(58));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=v(r(93));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=b(r(30)),u=b(r(92)),c=b(r(84)),l=b(r(83)),d=b(r(55)),h=b(r(54)),p=r(45);function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var m={create:{account:function(e){return new f.default(e)},privateKey:i.generatePrivateKey,signature:i.generateSignature,wallet:function(e){return new c.default(e)}},is:{address:a.isAddress,publicKey:a.isPublicKey,encryptedKey:a.isNEP2,privateKey:a.isPrivateKey,wif:a.isWIF},encrypt:{privateKey:o.encrypt},decrypt:{privateKey:o.decrypt},get:{privateKeyFromWIF:i.getPrivateKeyFromWIF,WIFFromPrivateKey:i.getWIFFromPrivateKey,publicKeyFromPrivateKey:i.getPublicKeyFromPrivateKey,scriptHashFromPublicKey:i.getScriptHashFromPublicKey,addressFromScriptHash:i.getAddressFromScriptHash,scriptHashFromAddress:i.getScriptHashFromAddress},sign:{message:s.signMessage},verify:{message:s.verifyMessage}};t.default=m},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=r(25),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var a=r(22);a.inherits=r(1);var o=r(71),s=r(38);a.inherits(l,o);for(var f=i(s.prototype),u=0;u1&&void 0!==arguments[1]&&arguments[1]&&s[e.name])&&(s[e.name]=e,!0)};t.addNetwork=u;var c=function(e){return!!s[e]&&(delete s[e],!0)};t.removeNetwork=c;var l={add:{network:function(e,t){return u(e,t)}},remove:{network:function(e){return c(e)}}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Transaction:!0,calculationStrategy:!0,TxAttrUsage:!0};Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"TxAttrUsage",{enumerable:!0,get:function(){return u.default}}),t.calculationStrategy=t.default=void 0;var i=l(r(91)),a=c(r(50));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=c(r(23));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=c(r(28));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=c(r(48));t.calculationStrategy=f;var u=l(r(51));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}function d(e,t,r){return(d="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&h(i,r.prototype),i}).apply(null,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={create:{tx:function(){for(var e=arguments.length,t=new Array(e),r=0;r=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={RPCClient:!0,Query:!0,queryRPC:!0,Network:!0};Object.defineProperty(t,"RPCClient",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Query",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"queryRPC",{enumerable:!0,get:function(){return a.queryRPC}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(47)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(46)),o=f(r(49)),s=r(85);function f(e){return e&&e.__esModule?e:{default:e}}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var u={create:{rpcClient:function(e){return new i.default(e)},query:function(e){return new a.default(e)}}};t.default=u},function(e,t){},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(){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}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a65535)throw new Error;var t=(0,n.num2hexstring)(e.usage);return 129===e.usage?t+=(0,n.num2hexstring)(e.data.length/2):(144===e.usage||e.usage>=240)&&(t+=(0,n.num2VarInt)(e.data.length/2)),2===e.usage||3===e.usage?t+=e.data.substr(2,64):t+=e.data,t};t.deserializeTransactionAttribute=function(e){var t={usage:parseInt(e.read(1),16)};if(0===t.usage||48===t.usage||t.usage>=161&&t.usage<=175)t.data=e.read(32);else if(2===t.usage||3===t.usage)t.data=(0,n.num2hexstring)(t.usage)+e.read(32);else if(32===t.usage)t.data=e.read(20);else if(129===t.usage)t.data=e.read(parseInt(e.read(1),16));else{if(!(144===t.usage||t.usage>=240))throw new Error;t.data=e.readVarBytes()}return t};t.serializeWitness=function(e){var t=(0,n.num2VarInt)(e.invocationScript.length/2),r=(0,n.num2VarInt)(e.verificationScript.length/2);return t+e.invocationScript+r+e.verificationScript};t.deserializeWitness=function(e){return{invocationScript:e.readVarBytes(),verificationScript:e.readVarBytes()}}},function(e,t,r){"use strict";var n=t;n.base=r(136),n.short=r(135),n.mont=r(134),n.edwards=r(133)},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(a=new Array(s-1),o=0;o1&&void 0!==arguments[1])||arguments[1],r=new i.ec("p256").keyFromPrivate(e,"hex").getPublic().encode("hex");return t?parseInt(r.substr(128,2),16)%2==1?"03"+r.substr(2,64):"02"+r.substr(2,64):r};var d=function(e){return"21"+e+"ac"};t.getVerificationScriptFromPublicKey=d;t.getScriptHashFromPublicKey=function(e){"04"===e.substring(0,2)&&(e=l(e));var t=d(e);return(0,o.reverseHex)((0,o.hash160)(t))};t.getAddressFromScriptHash=function(t){t=(0,o.reverseHex)(t);var r=(0,o.hash256)(s.ADDR_VERSION+t).substr(0,8);return a.default.encode(e.from(s.ADDR_VERSION+t+r,"hex"))};t.getScriptHashFromAddress=function(e){var t=(0,o.ab2hexstring)(a.default.decode(e));return(0,o.reverseHex)(t.substr(2,40))};t.generateSignature=function(t,r){var n=(0,o.sha256)(t),a=e.from(n,"hex"),s=new i.ec("p256").sign(a,r,null);return e.concat([s.r.toArrayLike(e,"be",32),s.s.toArrayLike(e,"be",32)]).toString("hex")};t.generatePrivateKey=function(){return(0,o.ab2hexstring)((0,f.default)(32))};t.generateRandomArray=function(e){return(0,f.default)(e)}}).call(this,r(5).Buffer)},function(e,t,r){e.exports=r(185)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExclusive=t.deserializeExclusive=t.serializeExclusive=void 0;var n=r(0),i=r(23),a={2:function(e){if(2!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.claims.length),r=!0,a=!1,o=void 0;try{for(var s,f=e.claims[Symbol.iterator]();!(r=(s=f.next()).done);r=!0){var u=s.value;t+=(0,i.serializeTransactionInput)(u)}}catch(e){a=!0,o=e}finally{try{r||null==f.return||f.return()}finally{if(a)throw o}}return t},128:function(e){if(128!==e.type)throw new Error;return""},209:function(e){if(209!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.script.length/2);return t+=e.script,e.version>=1&&(t+=(0,n.num2fixed8)(e.gas)),t}};t.serializeExclusive=a;var o={2:function(e){for(var t={claims:[]},r=e.readVarInt(),n=0;n=1?(0,n.fixed82num)(e.read(8)):0}}};t.deserializeExclusive=o;var s={2:function(e){return Object.assign({claims:[]},{claims:e.claims})},128:function(e){return{}},209:function(e){return{script:e.script||"",gas:e.gas||0}}};t.getExclusive=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={OpCode:!0,ScriptBuilder:!0,ContractParam:!0};Object.defineProperty(t,"OpCode",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ScriptBuilder",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ContractParam",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(53)),a=f(r(52)),o=f(r(90)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(89));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t,r){return(u="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&c(i,r.prototype),i}).apply(null,arguments)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var l={create:{contractParam:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0])return this.publicKey;var e=this.publicKey;return n.getPublicKeyUnencoded(e)}},{key:"encrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._encrypted=(0,a.encrypt)(this.privateKey,e,t),this}},{key:"decrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._WIF=(0,a.decrypt)(this.encrypted,e,t),this._updateContractScript(),this}},{key:"export",value:function(){var e=null;if(this._privateKey&&!this._encrypted)throw new Error("Encrypt private key first!");return this._encrypted&&(e=this._encrypted),{address:this.address,label:this.label,isDefault:this.isDefault,lock:this.lock,key:e,contract:this.contract,extra:this.extra}}},{key:Symbol.toStringTag,get:function(){return"Account"}},{key:"encrypted",get:function(){if(this._encrypted)return this._encrypted;throw new Error("No encrypted key found")}},{key:"WIF",get:function(){return this._WIF?this._WIF:(this._WIF=n.getWIFFromPrivateKey(this._privateKey),this._WIF)}},{key:"privateKey",get:function(){if(this._privateKey)return this._privateKey;if(this._WIF)return this._privateKey=n.getPrivateKeyFromWIF(this._WIF),this._privateKey;throw this._encrypted?new ReferenceError("Private Key encrypted!"):new ReferenceError("No Private Key provided!")}},{key:"publicKey",get:function(){return this._publicKey?this._publicKey:(this._publicKey=n.getPublicKeyFromPrivateKey(this.privateKey),this._publicKey)}},{key:"scriptHash",get:function(){return this._scriptHash?this._scriptHash:this._address?(this._scriptHash=n.getScriptHashFromAddress(this.address),this._scriptHash):(this._scriptHash=n.getScriptHashFromPublicKey(this.publicKey),this._scriptHash)}},{key:"address",get:function(){return this._address?this._address:(this._address=n.getAddressFromScriptHash(this.scriptHash),this._address)}}])&&c(t.prototype,r),f&&c(t,f),e}();t.default=d},function(e,t,r){var n;e.exports=(n=r(6),r(57),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=t.enc,f=(s.Utf8,s.Base64),u=t.algo,c=u.EvpKDF,l=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:w}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),d=(r.StreamCipher=l.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),h=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=d.CBC=function(){var t=h.extend();function r(t,r,n){var i=this._iv;if(i){var a=i;this._iv=e}else var a=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:v}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=t.format={},y=g.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else var n=t;return n.toString(f)},parse:function(e){var t=f.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return m.create({ciphertext:t,salt:n})}},w=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=t.kdf={},S=_.OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=c.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},k=r.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=w.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);n.iv=i.iv;var a=w.decrypt.call(this,e,t,i.key,n);return a}})}()))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=t.isScriptHash=t.isPublicKey=t.isPrivateKey=t.isWIF=t.isNEP2=void 0;var n,i=(n=r(35))&&n.__esModule?n:{default:n},a=r(0),o=r(26);t.isNEP2=function(e){try{if(58!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return!!t&&86===t.length&&"01"===t.substr(0,2)&&"42"===t.substr(2,2)&&"e0"===t.substr(4,2)}catch(e){return!1}};t.isWIF=function(e){try{if(52!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return(0,a.hash256)(t.substr(0,t.length-8)).substr(0,8)===t.substr(t.length-8,8)}catch(e){return!1}};t.isPrivateKey=function(e){return/^[0-9A-Fa-f]{64}$/.test(e)};t.isPublicKey=function(e,t){try{var r;switch(e.substr(0,2)){case"04":if(!0===t)return!1;r=(0,o.getPublicKeyEncoded)(e);break;case"02":case"03":if(!1===t)return!1;r=e;break;default:return!1}var n=(0,o.getPublicKeyUnencoded)(r),i=parseInt(n.substr(n.length-2,2),16);if("02"===r.substr(0,2)&&i%2==0)return!0;if("03"===r.substr(0,2)&&i%2==1)return!0}catch(e){}return!1};t.isScriptHash=function(e){return(0,a.isHex)(e)&&40===e.length};t.isAddress=function(e){try{var t=(0,a.ab2hexstring)(i.default.decode(e));if((0,a.hash256)(t.slice(0,42)).substr(0,8)!==t.substr(42,8))return!1;var r=(0,a.reverseHex)(t.slice(2,42));return(0,o.getAddressFromScriptHash)(r)===e}catch(e){return!1}}},function(e,t,r){(function(e,n){var i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),f=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),c(n,e,n.depth)}function f(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function u(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=c(e,i,n)),i}var a=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),S(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(k(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(y(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var u,w="",x=!1,A=["{","}"];(h(r)&&(x=!0,A=["[","]"]),k(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),S(r)&&(w=" "+l(r)),0!==o.length||x&&0!=r.length?n<0?y(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=x?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,a){var o,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),E(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=b(r)?c(e,f.value,null):c(e,f.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),g(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function v(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===x(e)}function S(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function k(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=y,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(115);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(114),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,r(15),r(9))},function(e,t,r){var n=t;n.utils=r(10),n.common=r(21),n.sha=r(131),n.ripemd=r(127),n.hmac=r(126),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){var n=r(142);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,r){"use strict";var n=r(4).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=l,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(156),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(15))},function(e,t,r){"use strict";(function(t,n,i){var a=r(25);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:a.nextTick;g.WritableState=m;var u=r(22);u.inherits=r(1);var c={deprecate:r(155)},l=r(70),d=r(4).Buffer,h=i.Uint8Array||function(){};var p,b=r(69);function v(){}function m(e,t){s=s||r(14),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(a.nextTick(i,n),a.nextTick(x,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),x(e,t))}(e,r,n,t,i);else{var o=S(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?f(w,e,r,o,i):w(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(e){if(s=s||r(14),!(p.call(g,this)||this instanceof s))return new g(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function y(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,y(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback;if(y(e,t,!1,t.objectMode?1:u.length,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),x(e,t)})}function x(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=v),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),a.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(n,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=b.destroy,g.prototype._undestroy=b.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(9),r(37).setImmediate,r(15))},function(e,t,r){(t=e.exports=r(71)).Stream=t,t.Readable=t,t.Writable=r(38),t.Duplex=r(14),t.Transform=r(68),t.PassThrough=r(154)},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,f,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(a(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),o=(u=r.slice()).length,f=0;f0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,a,o,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,a=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";(function(t){var n=r(8),i=r(182),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,f={adapter:("undefined"!=typeof XMLHttpRequest?s=r(78):void 0!==t&&(s=r(78)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){f.headers[e]={}}),n.forEach(["post","put","patch"],function(e){f.headers[e]=n.merge(a)}),e.exports=f}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doSendAsset=t.doMintTokens=t.doClaimAllGas=t.getWalletDBHeight=t.getTransactionHistory=t.getRPCEndpoint=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(17),o=r(19),s=r(3),f=r(0),u=r(16);function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,c(r(2)).default)("api");t.name="neonDB";var d=null,h=function(e){return u.networks[e]?u.networks[e].extra.neonDB:e};t.getAPIEndpoint=h;var p=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/balance/"+t).then(function(r){var n=new i.Balance({net:e,address:r.data.address});return Object.keys(r.data).map(function(e){"net"!==e&&"address"!==e&&n.addAsset(e,r.data[e])}),l.info("Retrieved Balance for ".concat(t," from neonDB ").concat(e)),n})};t.getBalance=p;var b=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){var n=r.data;return n.claims=n.claims.map(function(e){return{claim:new f.Fixed8(e.claim).div(1e8),index:e.index,txid:e.txid,start:new f.Fixed8(e.start),end:new f.Fixed8(e.end),value:e.value}}),l.info("Retrieved Claims for ".concat(t," from neonDB ").concat(e)),new i.Claims(n)})};t.getClaims=b;t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neonDB ").concat(e)),new f.Fixed8(r.data.total_claim+r.data.total_unspent_claim).div(1e8)})};var v=function e(t){var r=h(t);return n.default.get(r+"/v2/network/nodes").then(function(r){var n=r.data.nodes.filter(function(e){return e.status}),i=0,a=[],s=!0,f=!1,c=void 0;try{for(var l,h=n[Symbol.iterator]();!(s=(l=h.next()).done);s=!0){var p=l.value;u.httpsOnly&&!p.url.includes("https://")||(p.block_height>i?(i=p.block_height,a=[p]):p.block_height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{s||null==h.return||h.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(d))return new o.RPCClient(d).ping().then(function(r){return r<=u.timeout.ping?d:(d=null,e(t))});var v=b.map(function(e){return new o.RPCClient(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return d=e,e})};t.getRPCEndpoint=v;t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v2/address/history/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neonDB ").concat(e)),r.data.history.map(function(e){return{change:{NEO:new f.Fixed8(e.NEO||0),GAS:new f.Fixed8(e.GAS||0)},blockHeight:new f.Fixed8(e.block_index),txid:e.txid}})})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v2/block/height").then(function(e){return parseInt(e.data.block_height)})};t.doClaimAllGas=function(e,t,r){l.warn("doClaimAllGas will be deprecated in favor of claimGas");var n,s,f=new i.Account(t),u=v(e),c=b(e,f.address);return Promise.all([u,c]).then(function(e){s=e[0];var t=e[1];if(0===t.length)throw new Error("No claimable gas!");var n=a.Transaction.createClaimTx(f.publicKey,t);return r?r(n,f.publicKey):n.sign(f.privateKey)}).then(function(e){return n=e,o.Query.sendRawTransaction(n).execute(s)}).then(function(e){return!0===e.result?e.txid=n:l.error("Transaction failed: ".concat(n.serialize())),e})};t.doMintTokens=function(e,t,r,n,u,c){l.warn("doMintTokens will be deprecated in favor of doInvoke");var d,h,b=new i.Account(r),m=[{assetId:s.ASSET_ID.NEO,value:n,scriptHash:t}],g={operation:"mintTokens",scriptHash:t,args:[]},y=v(e),w=p(e,b.address);return Promise.all([y,w]).then(function(e){h=e[0];var r=e[1],n=[{data:(0,f.reverseHex)(t),usage:a.TxAttrUsage.Script}],i=a.Transaction.createInvocationTx(r,m,g,u,{attributes:n});return c?c(i,b.publicKey):i.sign(b.privateKey)}).then(function(e){return d=e,o.Query.getContractState(t).execute(h)}).then(function(e){var t={invocationScript:"0000",verificationScript:e.result.script};return d.scripts.unshift(t),o.Query.sendRawTransaction(d).execute(h)}).then(function(e){return!0===e.result?e.txid=d.hash:l.error("Transaction failed: ".concat(d.serialize())),e})};t.doSendAsset=function(e,t,r,n,f){l.warn("doSendAsset will be deprecated in favor of sendAsset");var u,c,d=new i.Account(r),h=new i.Account(t),b=v(e),m=p(e,d.address),g=Object.keys(n).map(function(e){return{assetId:s.ASSET_ID[e],value:n[e],scriptHash:h.scriptHash}});return Promise.all([b,m]).then(function(e){c=e[0];var t=e[1],r=a.Transaction.createContractTx(t,g);return f?f(r,d.publicKey):r.sign(d.privateKey)}).then(function(e){return u=e,o.Query.sendRawTransaction(u).execute(c)}).then(function(e){return!0===e.result?e.txid=u.hash:l.error("Transaction failed: ".concat(u.serialize())),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadBalance=t.setSwitchFreeze=t.setApiSwitch=void 0;var n,i=o(r(42)),a=o(r(44));function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var s=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("api"),f=0,u=!1;t.setApiSwitch=function(e){e>=0&&e<=1&&(f=e)};t.setSwitchFreeze=function(e){u=!!e,s.info("core/setSwitchFreeze API switch is frozen: ".concat(u))};var c=function(){!u&&f>0&&(f-=.2,s.info("core API Switch increasing weight towards neoscan"))},l=function(){!u&&f<1&&(f+=.2,s.info("core API Switch increasing weight towards neonDB"))};t.loadBalance=function(e,t){return Math.random()>f?e(t,a).then(function(e){return c(),e}).catch(function(){return l(),e(t,i)}):e(t,i).then(function(e){return l(),e}).catch(function(){return c(),e(t,a)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHistory=t.getWalletDBHeight=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getRPCEndpoint=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(3),o=r(0),s=r(16),f=c(r(2)),u=c(r(47));function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,f.default)("api");t.name="neoscan";var d=null,h=function(e){return s.networks[e]?s.networks[e].extra.neoscan:e};t.getAPIEndpoint=h;t.getRPCEndpoint=function e(t){var r=h(t);return n.default.get(r+"/v1/get_all_nodes").then(function(r){var n=r.data,i=0,a=[],o=!0,f=!1,c=void 0;try{for(var l,h=n[Symbol.iterator]();!(o=(l=h.next()).done);o=!0){var p=l.value;s.httpsOnly&&!p.url.includes("https://")||(p.height>i?(i=p.height,a=[p]):p.height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{o||null==h.return||h.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(d))return new u.default(d).ping().then(function(r){return r<=s.timeout.ping?d:(d=null,e(t))});var v=b.map(function(e){return new u.default(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return d=e,e})};t.getBalance=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_balance/"+t).then(function(r){if(r.data.address!==t&&null===r.data.balance)return new i.Balance({address:r.data.address});var n=new i.Balance({address:r.data.address,net:e});return r.data.balance.map(function(e){n.addAsset(e.asset,{balance:e.amount,unspent:p(e.unspent)})}),l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),n})};t.getClaims=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_claimable/"+t).then(function(r){if(r.address!==t&&null===r.data.claimable)return new i.Claims({address:r.data.address});var n=b(r.data.claimable);return l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),new i.Claims({net:e,address:r.data.address,claims:n})})};t.getMaxClaimAmount=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_unclaimed/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neoscan ").concat(e)),new o.Fixed8(r.data.unclaimed||0)})};var p=function(e){return e.map(function(e){return{index:e.n,txid:e.txid,value:e.value}})},b=function(e){return e.map(function(e){return{start:new o.Fixed8(e.start_height),end:new o.Fixed8(e.end_height),index:e.n,claim:new o.Fixed8(e.unclaimed),txid:e.txid,value:e.value}})};t.getWalletDBHeight=function(e){var t=h(e);return n.default.get(t+"/v1/get_height").then(function(e){return parseInt(e.data.height)})};t.getTransactionHistory=function(e,t){var r=h(e);return n.default.get(r+"/v1/get_address_neon/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neoscan ").concat(e)),v(r.data.txids)})};var v=function(e){var t=[],r=e.length-1;return e.forEach(function(n,i){var s,f,u,c;if(i!==r){var l=e[i+1],d=m(n.balance),h=m(l.balance);s={NEO:new o.Fixed8(d.NEO||0).minus(h.NEO||0),GAS:new o.Fixed8(d.GAS||0).minus(h.GAS||0)}}else{var p=n.asset_moved===a.ASSET_ID.NEO?"NEO":"GAS";f={},u=p,c=new o.Fixed8(n.amount_moved),u in f?Object.defineProperty(f,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[u]=c,s=f}t.push({txid:n.txid,blockHeight:n.block_height,change:s})}),t},m=function(e){return e.reduce(function(e,t){return e[t.asset]=new o.Fixed8(t.amount),e},{})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportClaimItem=t.ClaimItem=void 0;var n=r(0);t.ClaimItem=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{claim:e.claim?new n.Fixed8(e.claim):new n.Fixed8(0),txid:e.txid||"",index:e.index||0,value:e.value||0,start:e.start?new n.Fixed8(e.start):null,end:e.end?new n.Fixed8(e.end):null}};t.exportClaimItem=function(e){return{claim:e.claim.toNumber(),txid:e.txid,index:e.index,value:e.value,start:e.start?e.start.toNumber():null,end:e.end?e.end.toNumber():null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryRPC=t.default=void 0;var n=f(r(27)),i=r(17),a=r(3),o=f(r(2)),s=r(16);function f(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getBlockHash",value:function(t){return new e({method:"getblockhash",params:[t]})}},{key:"getBestBlockHash",value:function(){return new e({method:"getbestblockhash"})}},{key:"getBlockCount",value:function(){return new e({method:"getblockcount"})}},{key:"getBlockSysFee",value:function(t){return new e({method:"getblocksysfee",params:[t]})}},{key:"getConnectionCount",value:function(){return new e({method:"getconnectioncount"})}},{key:"getContractState",value:function(t){return new e({method:"getcontractstate",params:[t]})}},{key:"getPeers",value:function(){return new e({method:"getpeers"})}},{key:"getRawMemPool",value:function(){return new e({method:"getrawmempool"})}},{key:"getRawTransaction",value:function(t){return new e({method:"getrawtransaction",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getStorage",value:function(t,r){return new e({method:"getstorage",params:[t,r]})}},{key:"getTxOut",value:function(t,r){return new e({method:"gettxout",params:[t,r]})}},{key:"getVersion",value:function(){return new e({method:"getversion"})}},{key:"invoke",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2?n-2:0),a=2;a1&&void 0!==arguments[1]?arguments[1]:o.RPC_VERSION;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t===o.NEO_NETWORK.MAIN?this.net=o.DEFAULT_RPC.MAIN:t===o.NEO_NETWORK.TEST?this.net=o.DEFAULT_RPC.TEST:this.net=t,this.history=[],this.lastSeenHeight=0,this._latencies=[],this.version="",!a.default.valid(r))throw new Error("Invalid Version: ".concat(r));this.version=a.default.clean(r)}var t,r,s;return t=e,(r=[{key:"ping",value:function(){var e=this,t=Date.now(),r=n.default.getBlockCount();return this.execute(r,{timeout:f.timeout.ping}).then(function(r){e.lastSeenHeight=r.result;var n=Date.now()-t;return e.latency=n,n}).catch(function(t){return e.latency=f.timeout.ping,f.timeout.ping})}},{key:"execute",value:function(e,t){return this.history.push(e),l.info("RPC: ".concat(this.net," executing Query[").concat(e.req.method,"]")),e.execute(this.net,t)}},{key:"query",value:function(e,t){var r=new n.default(e);return this.execute(r,t)}},{key:"getAccountState",value:function(e){if(!(0,i.isAddress)(e))throw new Error("Invalid address given: ".concat(e));return this.execute(n.default.getAccountState(e)).then(function(e){return e.result})}},{key:"getAssetState",value:function(e){return this.execute(n.default.getAssetState(e)).then(function(e){return e.result})}},{key:"getBlock",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getBlock(e,t)).then(function(e){return e.result})}},{key:"getBlockHash",value:function(e){return this.execute(n.default.getBlockHash(e)).then(function(e){return e.result})}},{key:"getBestBlockHash",value:function(){return this.execute(n.default.getBestBlockHash()).then(function(e){return e.result})}},{key:"getBlockCount",value:function(){return this.execute(n.default.getBlockCount()).then(function(e){return e.result})}},{key:"getBlockSysFee",value:function(e){return this.execute(n.default.getBlockSysFee(e)).then(function(e){return e.result})}},{key:"getConnectionCount",value:function(){return this.execute(n.default.getConnectionCount()).then(function(e){return e.result})}},{key:"getContractState",value:function(e){return this.execute(n.default.getContractState(e)).then(function(e){return e.result})}},{key:"getPeers",value:function(){return this.execute(n.default.getPeers()).then(function(e){return e.result})}},{key:"getRawMemPool",value:function(){return this.execute(n.default.getRawMemPool()).then(function(e){return e.result})}},{key:"getRawTransaction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getRawTransaction(e,t)).then(function(e){return e.result})}},{key:"getStorage",value:function(e,t){return this.execute(n.default.getStorage(e,t)).then(function(e){return e.result})}},{key:"getTxOut",value:function(e,t){return this.execute(n.default.getTxOut(e,t)).then(function(e){return e.result})}},{key:"getVersion",value:function(){var e=this;return this.execute(n.default.getVersion()).then(function(t){var r=t.result.useragent.match(d)[1];return e.version=a.default.clean(r),e.version}).catch(function(t){if(t.message.includes("Method not found"))return e.version=o.RPC_VERSION,e.version;throw t})}},{key:"invoke",value:function(e,t){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invoke(e,t)).then(function(e){return e.result})}},{key:"invokeFunction",value:function(e,t,r){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeFunction(e,t,r)).then(function(e){return e.result})}},{key:"invokeScript",value:function(e){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeScript(e)).then(function(e){return e.result})}},{key:"sendRawTransaction",value:function(e){return this.execute(n.default.sendRawTransaction(e)).then(function(e){return e.result})}},{key:"submitBlock",value:function(e){return this.execute(n.default.submitBlock(e)).then(function(e){return e.result})}},{key:"validateAddress",value:function(e){return this.execute(n.default.validateAddress(e)).then(function(e){return e.result.isvalid})}},{key:Symbol.toStringTag,get:function(){return"RPC Client"}},{key:"latency",get:function(){return 0===this._latencies.length?99999:Math.floor(this._latencies.reduce(function(e,t){return e+t},0)/this._latencies.length)},set:function(e){this._latencies.length>4&&this._latencies.shift(),this._latencies.push(e)}}])&&c(t.prototype,r),s&&c(t,s),e}();t.default=h},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.balancedApproach=t.biggestFirst=t.smallestFirst=void 0;var n=r(0);t.smallestFirst=function(e,t){return e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()}),i(t,e.unspent)};t.biggestFirst=function(e,t){return e.unspent.sort(function(e,t){return t.value.sub(e.value).toNumber()}),i(t,e.unspent)};t.balancedApproach=function(e,t){e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()});var r=e.unspent.filter(function(e){return e.value.lte(t)});if(0===r.length)return[e.unspent[0]];var n=r.findIndex(function(e){return t.eq(e.value)});if(n>=0)return[r[n]];var a=e.unspent.slice(r.length),o=[];r.length>0&&o.push(r.pop());var s=t.minus(o.length>0?o[0].value:0),f=i(s,r.concat(a));return o.concat(f)};var i=function(e,t){for(var r=0,i=new n.Fixed8(0);i.lt(e);){if((r+=1)>t.length)throw new Error("Insufficient assets! Reached end of unspent coins! ".concat(t.length));i=i.add(t[r-1].value)}return t.slice(0,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(87)),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.Name||t.name||r||"RandomNet",r&&(this.name=r);var i=t.protocol||t.ProtocolConfiguration||{};this.protocol=new n.default(i),this.nodes=t.Nodes||t.nodes||[],this.extra=t.ExtraConfiguration||t.extra||{}}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new e("string"==typeof jsonString?JSON.parse(t):t,r)}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing Network file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"export",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?JSON.stringify({ProtocolConfiguration:this.protocol.export()}):{Name:this.name,ProtocolConfiguration:this.protocol.export(),ExtraConfiguration:this.extra,Nodes:this.nodes}}},{key:"writeFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.default.writeFile(e,this.export(t),function(e){if(e)throw e;return s.info("Network file written!"),!0})}},{key:"update",value:function(){return this}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHash=t.signTransaction=t.deserializeTransaction=t.serializeTransaction=t.calculateInputs=void 0;var n,i=r(0),a=r(12),o=r(28),s=r(3),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(23)),u=r(16);var c=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("tx");t.calculateInputs=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===t&&(t=[]),null===n&&(n=u.defaultCalculationStrategy);var o=t.reduce(function(e,t){return e[t.assetId]?e[t.assetId]=e[t.assetId].add(t.value):e[t.assetId]=t.value,e},{});return(r=new i.Fixed8(r)).gt(0)&&(o[s.ASSET_ID.GAS]?o[s.ASSET_ID.GAS]=o[s.ASSET_ID.GAS].add(r):o[s.ASSET_ID.GAS]=r),Object.keys(o).map(function(t){var r=o[t],i=s.ASSETS[t];if(-1===e.assetSymbols.indexOf(i))throw new Error("This balance does not contain any ".concat(i,"!"));var f=e.assets[i];if(f.balance.lt(r))throw new Error("Insufficient ".concat(s.ASSETS[t],"! Need ").concat(r.toString()," but only found ").concat(f.balance.toString()));return l((0,a.AssetBalance)(f),r,t,e.address,n)}).reduce(function(e,t){return{inputs:e.inputs.concat(t.inputs),change:e.change.concat(t.change)}},{inputs:[],change:[]})};var l=function(e,t,r,n,o){var s=o(e,t),f=s.reduce(function(e,t){return e.add(t.value)},new i.Fixed8(0)),u=[];return f.gt(t)&&u.push({assetId:r,value:f.sub(t),scriptHash:(0,a.getScriptHashFromAddress)(n)}),{inputs:s.map(function(e){return{prevHash:e.txid,prevIndex:e.index}}),change:u}},d=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";r+=(0,i.num2hexstring)(e.type),r+=(0,i.num2hexstring)(e.version),r+=o.serializeExclusive[e.type](e),r+=(0,i.num2VarInt)(e.attributes.length);var n=!0,a=!1,s=void 0;try{for(var u,c=e.attributes[Symbol.iterator]();!(n=(u=c.next()).done);n=!0){var l=u.value;r+=f.serializeTransactionAttribute(l)}}catch(e){a=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw s}}r+=(0,i.num2VarInt)(e.inputs.length);var d=!0,h=!1,p=void 0;try{for(var b,v=e.inputs[Symbol.iterator]();!(d=(b=v.next()).done);d=!0){var m=b.value;r+=f.serializeTransactionInput(m)}}catch(e){h=!0,p=e}finally{try{d||null==v.return||v.return()}finally{if(h)throw p}}r+=(0,i.num2VarInt)(e.outputs.length);var g=!0,y=!1,w=void 0;try{for(var _,S=e.outputs[Symbol.iterator]();!(g=(_=S.next()).done);g=!0){var k=_.value;r+=f.serializeTransactionOutput(k)}}catch(e){y=!0,w=e}finally{try{g||null==S.return||S.return()}finally{if(y)throw w}}if(t&&e.scripts&&e.scripts.length>0){r+=(0,i.num2VarInt)(e.scripts.length);var x=!0,A=!1,M=void 0;try{for(var E,T=e.scripts[Symbol.iterator]();!(x=(E=T.next()).done);x=!0){var I=E.value;r+=f.serializeWitness(I)}}catch(e){A=!0,M=e}finally{try{x||null==T.return||T.return()}finally{if(A)throw M}}}return r};t.serializeTransaction=d;t.deserializeTransaction=function(e){var t=new i.StringStream(e),r={};r.type=parseInt(t.read(1),16),r.version=parseInt(t.read(1),16);var n=o.deserializeExclusive[r.type](t);r.attributes=[],r.inputs=[],r.outputs=[],r.scripts=[];for(var a=t.readVarInt(),s=0;s1&&void 0!==arguments[1]&&arguments[1];if((0,i.ensureHex)(e),40!==e.length)throw new Error("ScriptHash should be 20 bytes long!");return this.emit(t?a.default.TAILCALL:a.default.APPCALL,(0,i.reverseHex)(e))}},{key:"_emitArray",value:function(e){for(var t=e.length-1;t>=0;t--)this.emitPush(e[t]);return this.emitPush(e.length).emit(a.default.PACK)}},{key:"_emitString",value:function(e){(0,i.ensureHex)(e);var t=e.length/2;if(t<=a.default.PUSHBYTES75)this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<256)this.emit(a.default.PUSHDATA1),this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<65536)this.emit(a.default.PUSHDATA2),this.str+=(0,i.num2hexstring)(t,2,!0),this.str+=e;else{if(!(t<4294967296))throw new Error("String too big to emit!");this.emit(a.default.PUSHDATA4),this.str+=(0,i.num2hexstring)(t,4,!0),this.str+=e}return this}},{key:"_emitNum",value:function(e){if(-1===e)return this.emit(a.default.PUSHM1);if(0===e)return this.emit(a.default.PUSH0);if(e>0&&e<=16)return this.emit(a.default.PUSH1-1+e);var t=(0,i.int2hex)(e);return this.emitPush((0,i.reverseHex)("0".repeat(16-t.length)+t))}},{key:"_emitParam",value:function(e){if(!e.type)throw new Error("No type available!");if(!d(e.value))throw new Error("Invalid value provided!");switch(e.type){case"String":return this._emitString((0,i.str2hexstring)(e.value));case"Boolean":return this.emit(e.value?a.default.PUSHT:a.default.PUSHF);case"Integer":return this._emitNum(e.value);case"ByteArray":return this._emitString(e.value);case"Array":return this._emitArray(e.value);case"Hash160":return this._emitString((0,i.reverseHex)(e.value))}}},{key:"emit",value:function(e,t){return this.str+=(0,i.num2hexstring)(e),t&&(this.str+=t),this}},{key:"emitAppCall",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.emitPush(r),t){for(var a="",o=0;o=81&&n<=96:t.args.unshift(n-80);break;case 193===n:for(var a=t.args.shift(),o=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index||0,txid:e.txid||"",value:e.value?new n.Fixed8(e.value):new n.Fixed8(0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(0),a=(n=r(54))&&n.__esModule?n:{default:n};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.balance,r=e.unspent,n=e.spent,o=e.unconfirmed;return{balance:t?new i.Fixed8(t):new i.Fixed8(0),unspent:r?r.map(function(e){return(0,a.default)(e)}):[],spent:n?n.map(function(e){return(0,a.default)(e)}):[],unconfirmed:o?o.map(function(e){return(0,a.default)(e)}):[]}}},function(e,t,r){(function(t){function r(e){return"function"==typeof e?t("","utf8"):e instanceof t?e:new t("string"==typeof e?e:String(e||""),"utf8")}function n(e){return"number"!=typeof e?null:(e=Math.round(e))<1?null:e>256?null:e}e.exports=function(e,t,i,a){return{password:r(e),salt:r(t),options:function(e){return{maxmem:function(e){if("number"!=typeof e)return null;for(var t=4;t<=2048;t*=2){var r=1048576*t;if(r>e)return null;if(r==e)return r}return null}((e=null!==e&&"object"==typeof e?e:{}).maxmem)||33554432,cost:function(e){if("number"!=typeof e)return null;for(var t=8;t<=64;t++){var r=Math.pow(2,t);if(r>e)return null;if(r==e)return r}return null}(e.cost)||Math.pow(2,14),blockSize:n(e.blockSize)||8,parallel:n(e.parallel)||1,size:(t=e.size,("number"!=typeof t?null:(t=Math.round(t))<1?null:t>2048?null:t)||64)};var t}(i),callback:function(e){return"function"==typeof e?e:null}(arguments[arguments.length-1])}}}).call(this,r(5).Buffer)},function(e,t,r){var n,i,a,o,s,f,u,c;e.exports=(n=r(6),r(107),r(106),a=(i=n).lib,o=a.Base,s=a.WordArray,f=i.algo,u=f.MD5,c=f.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=s.create(),a=i.words,o=r.keySize,f=r.iterations;a.length2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by encryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=new d.default(t),u=(0,o.default)((0,o.default)(m.Latin1.parse(f.address))).toString().slice(0,8),l=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),b=l.slice(0,64),v=l.slice(64),_=(0,h.hexXor)(f.privateKey,b),S=s.default.encrypt(m.Hex.parse(_),m.Hex.parse(v),g),k=p.NEP_HEADER+p.NEP_FLAG+u+S.ciphertext.toString(),x=n.default.encode(e.from(k,"hex"));return y.info("Successfully encrypted key to ".concat(x)),x};t.encryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to encrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,b=u.r,v=u.p,_=new d.default(t),S=(0,o.default)((0,o.default)(m.Latin1.parse(_.address))).toString().slice(0,8);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(S,"hex"),c,b,v,64,function(t,r,i){if(null!=t)f(t);else if(i){var o=e.from(i).toString("hex"),u=o.slice(0,64),c=o.slice(64),l=(0,h.hexXor)(_.privateKey,u),d=s.default.encrypt(m.Hex.parse(l),m.Hex.parse(c),g),b=p.NEP_HEADER+p.NEP_FLAG+S+d.ciphertext.toString(),v=n.default.encode(e.from(b,"hex"));y.info("Successfully encrypted key to ".concat(v)),a(v)}})})};t.decrypt=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by decryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=(0,h.ab2hexstring)(n.default.decode(t)),u=f.substr(6,8),l=f.substr(-64),b=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),v=b.slice(0,64),_=b.slice(64),S={ciphertext:m.Hex.parse(l),salt:""},k=s.default.decrypt(S,m.Hex.parse(_),g),x=(0,h.hexXor)(k.toString(),v),A=new d.default(x);if(u!==(0,o.default)((0,o.default)(m.Latin1.parse(A.address))).toString().slice(0,8))throw new Error("Wrong Password!");return y.info("Successfully decrypted ".concat(t)),A.WIF};t.decryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to decrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,p=u.r,b=u.p,v=(0,h.ab2hexstring)(n.default.decode(t)),_=v.substr(6,8),S=v.substr(-64);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(_,"hex"),c,p,b,64,function(r,n,i){if(null!=r)f(r);else if(i){var u=e.from(i).toString("hex"),c=u.slice(0,64),l=u.slice(64),p={ciphertext:m.Hex.parse(S),salt:""},b=s.default.decrypt(p,m.Hex.parse(l),g),v=(0,h.hexXor)(b.toString(),c),w=new d.default(v),k=(0,o.default)((0,o.default)(m.Latin1.parse(w.address))).toString().slice(0,8);_!==k&&f(new Error("Wrong Password or scrypt parameters!")),y.info("Successfully decrypted ".concat(t)),a(w.WIF)}})})};var w=function(e){var t=Object.assign({},p.DEFAULT_SCRYPT,e);return{n:t.n||t.cost,r:t.r||t.blockSize,p:t.p||t.parallel}}}).call(this,r(5).Buffer)},function(e,t,r){var n;e.exports=(n=r(6),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],f=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),f[i]=r(e.pow(n,1/3)),i++),n++}();var u=[],c=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6],d=r[7],h=0;h<64;h++){if(h<16)u[h]=0|e[t+h];else{var p=u[h-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=u[h-2],m=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[h]=b+u[h-7]+m+u[h-16]}var g=n&i^n&a^i&a,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&l)+f[h]+u[h];d=l,l=c,c=s,s=o+w|0,o=a,a=i,i=n,n=w+(y+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+c|0,r[6]=r[6]+l|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(c),t.HmacSHA256=a._createHmacHelper(c)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(6),n.enc.Hex)},function(e,t,r){"use strict";var n=r(10),i=r(21),a=r(13),o=n.rotr64_hi,s=n.rotr64_lo,f=n.shr64_hi,u=n.shr64_lo,c=n.sum64,l=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,v=n.sum64_5_lo,m=i.BlockHash,g=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function S(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function x(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=o(e,t,1)^o(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=o(e,t,19)^o(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&i;a?r.push(a,o):r.push(o)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,f=0|this._fh,g=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,x=0|this._el,A=0|this._fl,M=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var I=t[T-30],P=t[T-30+1],O=h(I,P),R=p(P,I),C=b(I=t[T-4],P=t[T-4+1]),B=v(P,I),j=t[T-14],N=t[T-14+1],L=t[T-32],F=t[T-32+1],z=R+N|0,H=O+j+m(z,R)|0;H=(H=H+C+m(z=z+B|0,B)|0)+L+m(z=z+F|0,F)|0,t[T]=H,t[T+1]=z}for(var D=0;D<160;D+=2){H=t[D],z=t[D+1];var U=c(r,n,i),q=c(w,_,S),Y=l(r,w),K=l(w,r),V=d(s,x),W=d(x,s),X=o[D],Z=o[D+1],G=u(s,f,g),Q=u(x,A,M),J=E+W|0,$=y+V+m(J,E)|0;$=($=($=$+G+m(J=J+Q|0,Q)|0)+X+m(J=J+Z|0,Z)|0)+H+m(J=J+z|0,z)|0;var ee=K+q|0,te=Y+U+m(ee,K)|0;y=g,E=M,g=f,M=A,f=s,A=x,s=a+$+m(x=k+J|0,k)|0,a=i,k=S,i=n,S=_,n=r,_=w,r=$+te+m(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+x|0,this._fl=this._fl+A|0,this._gl=this._gl+M|0,this._hl=this._hl+E|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+a+m(this._dl,k)|0,this._eh=this._eh+s+m(this._el,x)|0,this._fh=this._fh+f+m(this._fl,A)|0,this._gh=this._gh+g+m(this._gl,M)|0,this._hh=this._hh+y+m(this._hl,E)|0},f.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+h(r[m-15])+r[m-16];for(var g=0;g<64;++g){var y=v+d(f)+u(f,p,b)+o[g]+r[g]|0,w=l(n)+c(n,i,a)|0;v=b,b=p,p=f,f=s+y|0,s=a,a=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},f.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";e.exports=a;var n=r(14),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?_(e,o,t,!1):M(e,o)):_(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){h("emit readable"),e.emit("readable"),P(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(E,e,t))}function E(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function R(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):x(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,h("pipe count=%d opts=%j",a.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:y;function u(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",v),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",b),d=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){h("onend"),e.end()}a.endEmitted?i.nextTick(f):r.once("end",f),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",l);var d=!1;var p=!1;function b(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==B(a.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function v(t){h("onerror",t),y(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",g),y()}function g(){h("onfinish"),e.removeListener("close",m),y()}function y(){h("unpipe"),r.unpipe(e)}return r.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",v),e.once("close",m),e.once("finish",g),e.emit("pipe",r),a.flowing||(h("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;aparseInt(a.scriptHash,16)?e.tx.scripts.push(n):e.tx.scripts.unshift(n),e}):Promise.resolve(e)},_=function(e){if(e.override||(e.override={}),e.sendingFromSmartContract){var t=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)(t.scriptHash))}return Promise.resolve(e)},S=function(e){if(e.sendingFromSmartContract){var t=(0,i.getScriptHashFromAddress)(e.address);return o.Query.getContractState(t).execute(e.url).then(function(r){var n=r.result.parameters,a={invocationScript:"00".repeat(n.length),verificationScript:""},o=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);return parseInt(t,16)>parseInt(o.scriptHash,16)?e.tx.scripts.push(a):e.tx.scripts.unshift(a),e})}return Promise.resolve(e)},k=function(e){return 0===e.tx.inputs.length&&0===e.tx.outputs.length&&(e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)((0,i.getScriptHashFromAddress)(e.address))),e.tx.addRemark(Date.now().toString()+(0,f.ab2hexstring)((0,i.generateRandomArray)(4)))),Promise.resolve(e)},x=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n5&&void 0!==arguments[5]?arguments[5]:0,h=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;l.warn("doTransferToken will be deprecated in favor of doInvoke");var p,b,v=new a.Account(r),m=(0,f.getRPCEndpoint)(e),g=(0,f.getBalance)(e,v.address);return Promise.all([m,g]).then(function(e){b=e[0];var r=e[1],o=(0,a.getScriptHashFromAddress)(v.address),f=(0,s.reverseHex)((0,a.getScriptHashFromAddress)(n)),l=[{assetId:c.ASSET_ID.GAS,value:1e-8,scriptHash:o}],p={scriptHash:t,operation:"transfer",args:[(0,s.reverseHex)(o),f,i]},m=u.Transaction.createInvocationTx(r,l,p,d,{version:1});return h?h(m,v.publicKey):m.sign(v.privateKey)}).then(function(e){return p=e,o.Query.sendRawTransaction(p).execute(b)}).then(function(e){return!0===e.result&&(e.txid=p.hash),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrices=t.getPrice=void 0;var n=i(r(27));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"NEO",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd";return o.warn("This is deprecated in favor of getPrices. There is a known bug for NEP5 tokens with this function."),f("https://api.coinmarketcap.com/v1/ticker/".concat(e.toLowerCase(),"/"),t).then(function(t){var r=t[e.toUpperCase()];if(r)return r;throw new Error("Something went wrong with the CoinMarketCap API!")}).catch(function(e){throw o.error(e.message),e})};function f(e,t){return t=t.toLowerCase(),s.includes(t)?n.default.get("".concat(e,"?limit=0&convert=").concat(t)).then(function(e){var r=e.data;if(r.error)throw new Error(r.error);return function(e,t){var r={};return e.forEach(function(e){r[e.symbol]=parseFloat(e["price_".concat(t.toLowerCase())])}),r}(r,t)}):Promise.reject(new ReferenceError("".concat(t," is not one of the accepted currencies!")))}t.getPrices=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["NEO"];return f("https://api.coinmarketcap.com/v1/ticker/",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd").then(function(t){e=e.map(function(e){return e.toUpperCase()});var r=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t.address||"",this.net=t.net||"NoNet",this.claims=t.claims?t.claims.map(function(e){return(0,i.ClaimItem)(e)}):[]}var t,r,n;return t=e,(r=[{key:a.default.inspect.custom,value:function(e,t){var r=this.claims.map(function(e){return"".concat(e.txid," <").concat(e.index,">: ").concat(e.claim.toString())});return"[Claims(".concat(this.net,"): ").concat(this.address,"]\n").concat(JSON.stringify(r,null,2))}},{key:"export",value:function(){return{address:this.address,net:this.net,claims:this.claims.map(i.exportClaimItem)}}},{key:"slice",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new e({address:this.address,net:this.net,claims:this.claims.slice(t,r)})}},{key:Symbol.toStringTag,get:function(){return"Claims"}}])&&o(t.prototype,r),n&&o(t,n),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(20)),i=o(r(30)),a=r(3);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:a.DEFAULT_WALLET,r=t.name,n=void 0===r?"myWallet":r,i=t.version,o=void 0===i?a.DEFAULT_WALLET.version:i,s=t.scrypt,u=void 0===s?a.DEFAULT_SCRYPT:s,c=t.accounts,l=void 0===c?[]:c,d=t.extra,h=void 0===d?null:d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=n,this.version=o,this.scrypt={n:u.n||u.cost,r:u.r||u.blockSize,p:u.p||u.parallel},this.accounts=[];var p=!0,b=!1,v=void 0;try{for(var m,g=l[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var y=m.value;this.addAccount(y)}}catch(e){b=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(b)throw v}}this.extra=h,f.info("New Wallet created: ".concat(this.name))}var t,r,o;return t=e,r=[{key:"addAccount",value:function(e){var t=this.accounts.length;e instanceof i.default||(e=new i.default(e)),this.accounts.push(e);try{var r=e.address;f.info("Added Account: ".concat(r," to Wallet ").concat(this.name))}catch(e){f.warn("Encrypted account added to Wallet ".concat(this.name,". You will not be able to export this wallet without first decrypting this account"))}return t}},{key:"decrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].decrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"decryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.decrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"encrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].encrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"encryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.encrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"export",value:function(){return{name:this.name,version:this.version,scrypt:this.scrypt,accounts:this.accounts.map(function(e){return e.export()}),extra:this.extra}}},{key:"setDefault",value:function(e){for(var t=0;t)?=?)";var A=f++;s[A]=s[c]+"|x|X|\\*";var M=f++;s[M]=s[u]+"|x|X|\\*";var E=f++;s[E]="[v=\\s]*("+s[M]+")(?:\\.("+s[M]+")(?:\\.("+s[M]+")(?:"+s[v]+")?"+s[y]+"?)?)?";var T=f++;s[T]="[v=\\s]*("+s[A]+")(?:\\.("+s[A]+")(?:\\.("+s[A]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var I=f++;s[I]="^"+s[x]+"\\s*"+s[E]+"$";var P=f++;s[P]="^"+s[x]+"\\s*"+s[T]+"$";var O=f++;s[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var R=f++;s[R]="(?:~>?)";var C=f++;s[C]="(\\s*)"+s[R]+"\\s+",o[C]=new RegExp(s[C],"g");var B=f++;s[B]="^"+s[R]+s[E]+"$";var j=f++;s[j]="^"+s[R]+s[T]+"$";var N=f++;s[N]="(?:\\^)";var L=f++;s[L]="(\\s*)"+s[N]+"\\s+",o[L]=new RegExp(s[L],"g");var F=f++;s[F]="^"+s[N]+s[E]+"$";var z=f++;s[z]="^"+s[N]+s[T]+"$";var H=f++;s[H]="^"+s[x]+"\\s*("+S+")$|^$";var D=f++;s[D]="^"+s[x]+"\\s*("+_+")$|^$";var U=f++;s[U]="(\\s*)"+s[x]+"\\s*("+S+"|"+s[E]+")",o[U]=new RegExp(s[U],"g");var q=f++;s[q]="^\\s*("+s[E]+")\\s+-\\s+("+s[E]+")\\s*$";var Y=f++;s[Y]="^\\s*("+s[T]+")\\s+-\\s+("+s[T]+")\\s*$";var K=f++;s[K]="(<|>)?=?\\s*\\*";for(var V=0;Vi)return null;if(!(t?o[k]:o[w]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(e instanceof X){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof X))return new X(e,t);n("SemVer",e,t),this.loose=t;var r=e.trim().match(t?o[k]:o[w]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new X(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(ee(e,t))return null;var r=W(e),n=W(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=G;var Z=/^[0-9]+$/;function G(e,t){var r=Z.test(e),n=Z.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function Q(e,t,r){return new X(e,r).compare(new X(t,r))}function J(e,t,r){return Q(e,t,r)>0}function $(e,t,r){return Q(e,t,r)<0}function ee(e,t,r){return 0===Q(e,t,r)}function te(e,t,r){return 0!==Q(e,t,r)}function re(e,t,r){return Q(e,t,r)>=0}function ne(e,t,r){return Q(e,t,r)<=0}function ie(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=ee(e,r,n);break;case"!=":i=te(e,r,n);break;case">":i=J(e,r,n);break;case">=":i=re(e,r,n);break;case"<":i=$(e,r,n);break;case"<=":i=ne(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ae(e,t){if(e instanceof ae){if(e.loose===t)return e;e=e.value}if(!(this instanceof ae))return new ae(e,t);n("comparator",e,t),this.loose=t,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new X(e,t).major},t.minor=function(e,t){return new X(e,t).minor},t.patch=function(e,t){return new X(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=J,t.lt=$,t.eq=ee,t.neq=te,t.gte=re,t.lte=ne,t.cmp=ie,t.Comparator=ae;var oe={};function se(e,t){if(e instanceof se)return e.loose===t?e:new se(e.raw,t);if(e instanceof ae)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function fe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ue(e,t,r,n,i,a,o,s,f,u,c,l,d){return((t=fe(r)?"":fe(n)?">="+r+".0.0":fe(i)?">="+r+"."+n+".0":">="+t)+" "+(s=fe(f)?"":fe(u)?"<"+(+f+1)+".0.0":fe(c)?"<"+f+"."+(+u+1)+".0":l?"<="+f+"."+u+"."+c+"-"+l:"<="+s)).trim()}function ce(e,t){for(var r=0;r0){var i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new se(t,r)}catch(e){return!1}return t.test(e)}function de(e,t,r,n){var i,a,o,s,f;switch(e=new X(e,n),t=new se(t,n),r){case">":i=J,a=ne,o=$,s=">",f=">=";break;case"<":i=$,a=re,o=J,s="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var u=0;u=0.0.0")),c=c||e,l=l||e,i(e.semver,c.semver,n)?c=e:o(e.semver,l.semver,n)&&(l=e)}),c.operator===s||c.operator===f)return!1;if((!l.operator||l.operator===s)&&a(e,l.semver))return!1;if(l.operator===f&&o(e,l.semver))return!1}return!0}ae.prototype.parse=function(e){var t=this.loose?o[H]:o[D],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new X(r[2],this.loose):this.semver=oe},ae.prototype.toString=function(){return this.value},ae.prototype.test=function(e){return n("Comparator.test",e,this.loose),this.semver===oe||("string"==typeof e&&(e=new X(e,this.loose)),ie(e,this.operator,this.semver,this.loose))},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new se(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),f=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||f},t.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),n("range",e,t);var r=t?o[Y]:o[q];e=e.replace(r,ue),n("hyphen replace",e),e=e.replace(o[U],"$1$2$3"),n("comparator trim",e,o[U]),e=(e=(e=e.replace(o[C],"$1~")).replace(o[L],"$1^")).split(/\s+/).join(" ");var i=t?o[H]:o[D],a=e.split(" ").map(function(e){return function(e,t){return n("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t?o[z]:o[F];return e.replace(r,function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t?o[j]:o[B];return e.replace(r,function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t?o[P]:o[I];return e.replace(r,function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var f=fe(i),u=f||fe(a),c=u||fe(o),l=c;return"="===r&&l&&(r=""),f?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(a=0),c&&(o=0),">"===r?(r=">=",u?(i=+i+1,a=0,o=0):c&&(a=+a+1,o=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[K],"")}(e,t),n("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(a=a.filter(function(e){return!!e.match(i)})),a=a.map(function(e){return new ae(e,t)})},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.loose));for(var t=0;t",r)},t.outside=de,t.prerelease=function(e,t){var r=W(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(o[O]);return null==t?null:W((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.magic=t.magic||t.Magic||0,this.addressVersion=t.addressVersion||t.AddressVersion||23,this.standbyValidators=t.standbyValidators||t.StandbyValidators||[],this.seedList=t.seedList||t.SeedList||[],this.systemFee=t.systemFee||t.SystemFee||n.DEFAULT_SYSFEE}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?JSON.parse(t):t;return new e(Object.assign(n,{extra:n.extra||n.Extra,name:n.name||n.Name||r}))}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing protocol file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"writeFile",value:function(e){return i.default.writeFile(e,this.export(),function(e){if(e)throw e;return console.log("Protocol file written!"),!0})}},{key:"export",value:function(){return{Magic:this.magic,AddressVersion:this.addressVersion,StandbyValidators:this.standbyValidators,SeedList:this.seedList,SystemFee:this.systemFee}}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e){e.exports={MainNet:{Name:"MainNet",ProtocolConfiguration:{Magic:7630401,AddressVersion:23,StandbyValidators:["03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c","02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093","03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a","02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554","024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d","02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e","02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70"],SeedList:["seed1.neo.org:10333","seed2.neo.org:10333","seed3.neo.org:10333","seed4.neo.org:10333","seed5.neo.org:10333"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neonDB:"http://api.wallet.cityofzion.io",neoscan:"https://api.neoscan.io/api/main_net"}},TestNet:{Name:"TestNet",ProtocolConfiguration:{Magic:1953787457,AddressVersion:23,StandbyValidators:["0327da12b5c40200e9f65569476bbff2218da4f32548ff43b6387ec1416a231ee8","026ce35b29147ad09e4afe4ec4a7319095f08198fa8babbe3c56e970b143528d22","0209e7fd41dfb5c2f8dc72eb30358ac100ea8c72da18847befe06eade68cebfcb9","039dafd8571a641058ccc832c5e2111ea39b09c0bde36050914384f7a48bce9bf9","038dddc06ce687677a53d54f096d2591ba2302068cf123c1f2d75c2dddc5425579","02d02b1873a0863cd042cc717da31cea0d7cf9db32b74d4c72c01b0011503e2e22","034ff5ceeac41acf22cd5ed2da17a6df4dd8358fcb2bfb1a43208ad0feaab2746b"],SeedList:["seed1.neo.org:20333","seed2.neo.org:20333","seed3.neo.org:20333","seed4.neo.org:20333","seed5.neo.org:20333"],SystemFee:{EnrollmentTransaction:10,IssueTransaction:5,PublishTransaction:5,RegisterTransaction:100}},ExtraConfiguration:{neonDB:"http://testnet-api.wallet.cityofzion.io",neoscan:"https://neoscan-testnet.io/api/test_net"}},CozNet:{Name:"CozNet",ProtocolConfiguration:{Magic:1010102,AddressVersion:23,StandbyValidators:["032d9e51c7d48b0f5cc63d63deb89767685832cf69eb7113900290f217ae0504ee","022a5b7ccf03166a95e1750f0c350c734c34fe7aac66622eecdb5a529d2e69b1df","03c478d43271c297696ee3ab5a7946ee60287015c7dca6cba867819c7f271bc4ea","0393ef777d01fb60eef1da3474b975c6a393b464bcfe588e2ad7dbc4dbdfa2c244"],SeedList:["188.68.34.29:10330","188.68.34.29:10332","188.68.34.29:10334","188.68.34.29:10336"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neoscan:"https://coz.neoscan-testnet.io/api/main_net"}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDeployScript=t.createScript=void 0;var n,i=r(0),a=(n=r(52))&&n.__esModule?n:{default:n};t.createScript=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.type||128,this.version=r.version||i.TX_VERSION.CONTRACT,this.attributes=r.attributes||[],this.inputs=r.inputs||[],this.outputs=r.outputs?r.outputs.map(function(e){return f.TransactionOutput(e)}):[],this.scripts=r.scripts||[];var n=c.getExclusive[this.type](r);Object.keys(n).map(function(e){t[e]=n[e]})}var t,r,l;return t=e,r=[{key:"addOutput",value:function(e,t,r){if(3===arguments.length)this.outputs.push(f.createTransactionOutput(e,t,r));else{if("object"!==h(arguments[0]))throw new Error("Invalid input given! Give either 1 or 3 arguments!");this.outputs.push(arguments[0])}return this}},{key:"addAttribute",value:function(e,t){if("string"!=typeof t)throw new TypeError("data should be formatted as string!");return this.attributes.push({usage:e,data:t}),this}},{key:"addRemark",value:function(e){var t=(0,o.str2hexstring)(e);return this.addAttribute(s.default.Remark,t)}},{key:"calculate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=u.calculateInputs(e,this.outputs,this.gas,t),n=r.inputs,i=r.change;return this.inputs=n,this.outputs=this.outputs.concat(i),e.applyTx(this),b.info("Calculated the inputs required for Transaction with Balance: ".concat(e.address)),this}},{key:"serialize",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return u.serializeTransaction(this,e)}},{key:"serializeExclusiveData",value:function(){return c.serializeExclusive[this.type](this)}},{key:"sign",value:function(e){return"string"==typeof e&&(e=new n.Account(e)),u.signTransaction(this,e.privateKey),b.info("Signed Transaction with Account: ".concat(e.label)),this}},{key:Symbol.toStringTag,get:function(){return"Transaction"}},{key:"exclusiveData",get:function(){return c.getExclusive[this.type](this)}},{key:"hash",get:function(){return u.getTransactionHash(this)}}],l=[{key:"createClaimTx",value:function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.claims.length)throw new Error("Useless transaction! There is no claims!");var s=new n.Account(t),f=Object.assign({type:2,version:i.TX_VERSION.CLAIM},a),u=new o.Fixed8(0);f.claims=r.claims.slice(0,255).map(function(e){return u=u.add(e.claim),{prevHash:e.txid,prevIndex:e.index}}),f.outputs=[{assetId:i.ASSET_ID.GAS,value:u,scriptHash:s.scriptHash}];var c=new e(Object.assign(f,a));return b.info("New ClaimTransaction for ".concat(s.address)),c}},{key:"createContractTx",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===r)throw new Error("Useless transaction! You are not sending anything!");var a=new e(Object.assign({type:128,version:i.TX_VERSION.CONTRACT,outputs:r},n)).calculate(t);return b.info("New ContractTransaction for ".concat(t.address)),a}},{key:"createInvocationTx",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};null===r&&(r=[]);var f=new e(Object.assign({type:209,version:i.TX_VERSION.INVOCATION,outputs:r,script:"string"==typeof n?n:(0,a.createScript)(n),gas:o},s)).calculate(t);return b.info("New InvocationTransaction for ".concat(t.address)),f}},{key:"deserialize",value:function(t){var r=u.deserializeTransaction(t),n=c.getExclusive[r.type](r);return new e(Object.assign(r,n))}}],r&&p(t.prototype,r),l&&p(t,l),e}();t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(55))&&n.__esModule?n:{default:n},a=r(17),o=r(3),s=r(0),f=r(19);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=r.address||"",this.net=r.net||"NoNet",this.assetSymbols=r.assetSymbols?r.assetSymbols:[],this.assets={},r.assets&&Object.keys(r.assets).map(function(e){"object"===u(r.assets[e])&&t.addAsset(e,r.assets[e])}),this.tokenSymbols=r.tokenSymbols?r.tokenSymbols:[],this.tokens=r.tokens?r.tokens:{}}var t,r,n;return t=e,r=[{key:"addAsset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.default)();e=e.toUpperCase(),this.assetSymbols.push(e);var r=(0,i.default)(t);return this.assets[e]=r,this}},{key:"addToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e=e.toUpperCase(),this.tokenSymbols.push(e),this.tokens[e]=new s.Fixed8(t),this}},{key:"applyTx",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e instanceof a.Transaction?e:a.Transaction.deserialize(e);var n=this.assetSymbols,i=!0,s=!1,f=void 0;try{for(var u,c=function(){var e=u.value,r=function(t){return t.txid===e.prevHash&&t.index===e.prevIndex},i=!0,a=!1,o=void 0;try{for(var s,f=n[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var c=s.value,l=t.assets[c],d=l.unspent.findIndex(r);if(d>=0){var h=l.unspent.splice(d,1);l.spent=l.spent.concat(h);break}}}catch(e){a=!0,o=e}finally{try{i||null==f.return||f.return()}finally{if(a)throw o}}},l=e.inputs[Symbol.iterator]();!(i=(u=l.next()).done);i=!0)c()}catch(e){s=!0,f=e}finally{try{i||null==l.return||l.return()}finally{if(s)throw f}}for(var d=e.hash,h=function(n){var i=e.outputs[n],a=o.ASSETS[i.assetId],s=t.assets[a];s||t.addAsset(a);var f={index:n,txid:d,value:i.value};if(r){var u=s.unconfirmed.findIndex(function(e){return e.txid===f.txid&&e.index===f.index});u>=0&&s.unconfirmed.splice(u,1),s.balance=s.balance.add(i.value),s.unspent||(s.unspent=[]),s.unspent.push(f)}else s.unconfirmed||(s.unconfirmed=[]),s.unconfirmed.push(f);t.assets[a]=s},p=0;p=0&&n<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[u]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(e){}}(n),i.call(f,n,e),typeof console===t&&n=64;){var h,p,b,v,m,g=r,y=n,w=i,_=a,S=o,k=s,x=f,A=u;for(p=0;p<16;p++)b=l+4*p,c[p]=(255&e[b])<<24|(255&e[b+1])<<16|(255&e[b+2])<<8|255&e[b+3];for(p=16;p<64;p++)v=((h=c[p-2])>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,m=((h=c[p-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,c[p]=(v+c[p-7]|0)+(m+c[p-16]|0)|0;for(p=0;p<64;p++)v=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&k^~S&x)|0)+(A+(t[p]+c[p]|0)|0)|0,m=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&y^g&w^y&w)|0,A=x,x=k,k=S,S=_+v|0,_=w,w=y,y=g,g=v+m|0;r=r+g|0,n=n+y|0,i=i+w|0,a=a+_|0,o=o+S|0,s=s+k|0,f=f+x|0,u=u+A|0,l+=64,d-=64}}l(e);var d,h=e.length%64,p=e.length/536870912|0,b=e.length<<3,v=h<56?56:120,m=e.slice(e.length-h,e.length);for(m.push(128),d=h+1;d>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(b>>>24&255),m.push(b>>>16&255),m.push(b>>>8&255),m.push(b>>>0&255),l(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function a(e,t,r){var n;e=e.length<=64?e:i(e);var a=64+t.length+4,o=new Array(a),s=new Array(64),f=[];for(n=0;n<64;n++)o[n]=54;for(n=0;n=a-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)u(),f=f.concat(i(s.concat(i(o)))),r-=32;return r>0&&(u(),f=f.concat(i(s.concat(i(o))).slice(0,r))),f}function o(e,t,r,n,i){var a;for(c(e,16*(2*r-1),i,0,16),a=0;a<2*r;a++)u(e,16*a,i,16),f(i,n),c(i,0,e,t+16*a,16);for(a=0;a>>32-t}function f(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(r=0;r<16;++r)e[r]+=t[r]}function u(e,t,r,n){for(var i=0;i=256)return!1}return!0}function d(e,t){var r=parseInt(e);if(e!=r)throw new Error("invalid "+t);return r}e.exports=function(e,r,i,s,f,h,p){if(!p)throw new Error("missing callback");if(i=d(i,"N"),s=d(s,"r"),f=d(f,"p"),h=d(h,"dkLen"),0===i||0!=(i&i-1))throw new Error("N must be power of 2");if(i>n/128/s)throw new Error("N too large");if(s>n/128/f)throw new Error("r too large");if(!l(e))throw new Error("password must be an array or buffer");if(!l(r))throw new Error("salt must be an array or buffer");for(var b=a(e,r,128*f*s),v=new Uint32Array(32*f*s),m=0;mR&&(r=R);for(var t=0;tR&&(r=R),t=0;t>0&255),b.push(v[t]>>8&255),b.push(v[t]>>16&255),b.push(v[t]>>24&255);var d=a(e,b,h);return p(null,1,d)}C(B)};B()}}()}).call(this,r(37).setImmediate)},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function a(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var o=i>=0?arguments[i]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return t=r(a(t.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===o(e,-1);return(e=r(a(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(a(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),a=n(r.split("/")),o=Math.min(i.length,a.length),s=o,f=0;fr?String.fromCharCode(r):(e.push(r),t=191r?1:2,"");if(0r?String.fromCharCode((31&r)<<6|63&n):String.fromCharCode((15&r)<<12|(63&n)<<6|63&i);return e.length=0,r},this.yb=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>3<<3,t}function ra(e){var t=sa;return sa=(sa=sa+e|0)+7>>3<<3,t}function ua(e){var t=z;return(z=(z=z+e|0)+7>>3<<3)>=va&&wa("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs."),t}function xa(e,t){return Math.ceil(e/(t||8))*(t||8)}var ma=4,ya={},za=p,Aa;function w(e,t){e||wa("Assertion failed: "+t)}function Ca(a){try{var b=s["_"+a];b||(b=eval("_"+a))}catch(e){}return w(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function Ba(e,t,r,n){var i=0,a=0;n=n?n.map(function(e){return function(e,t){if("string"==t){if(e===m||e===k||0===e)return 0;i||(i=ja());var r=qa(e.length+1);return Da(e,r),r}return"array"==t?(i||(i=ja()),Ea(e,r=qa(e.length)),r):e}(e,r[a++])}):[];return e=e.apply(m,n),"string"==t?t=Fa(e):(w("array"!=t),t=e),i&&ka(i),t}function Ga(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":A[e]=t;break;case"i16":Ha[e>>1]=t;break;case"i32":B[e>>2]=t;break;case"i64":Aa=[t>>>0,(0|Math.min(+Math.floor(t/4294967296),4294967295))>>>0],B[e>>2]=Aa[0],B[e+4>>2]=Aa[1];break;case"float":Ia[e>>2]=t;break;case"double":Ja[e>>3]=t;break;default:wa("invalid type for setValue: "+r)}}s.ccall=function(e,t,r,n){return Ba(Ca(e),t,r,n)},s.cwrap=function(e,t,r){var n=Ca(e);return function(){return Ba(n,t,r,Array.prototype.slice.call(arguments))}},s.setValue=Ga,s.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return A[e];case"i16":return Ha[e>>1];case"i32":case"i64":return B[e>>2];case"float":return Ia[e>>2];case"double":return Ja[e>>3];default:wa("invalid type for setValue: "+t)}return m};var Ka=0,La=1,E=2,Na=4;function F(e,t,r,n){var i,a;"number"==typeof e?(i=l,a=e):(i=p,a=e.length);var o="string"==typeof t?t:m;r=r==Na?n:[Oa,qa,ra,ua][r===k?E:r](Math.max(a,o?1:t.length));if(i){for(n=r,w(0==(3&r)),e=r+(-4&a);n>2]=0;for(e=r+a;n=t?2*Math.abs(1<=e)return e;var r=32>=t?Math.abs(1<=r&&(32>=t||e>r)&&(e=-2*r+e),e}s.addOnPreRun=s.Vd=bb,s.addOnInit=s.Sd=function(e){Xa.unshift(e)},s.addOnPreMain=s.Ud=function(e){Ya.unshift(e)},s.addOnExit=s.Rd=function(e){Za.unshift(e)},s.addOnPostRun=s.Td=cb,s.intArrayFromString=J,s.intArrayToString=function(e){for(var t=[],r=0;r>>16)*n+r*(t>>>16)<<16)|0}),Math.ie=Math.imul;var L=0,fb={},gb=p,hb=m,nb,ob,pb;function ib(e){L++,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(!fb[e]),fb[e]=1):s.P("warning: run dependency added without ID")}function jb(e){L--,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(fb[e]),delete fb[e]):s.P("warning: run dependency removed without ID"),0==L&&(hb!==m&&(clearInterval(hb),hb=m),!gb&&kb&&lb())}s.addRunDependency=ib,s.removeRunDependency=jb,s.preloadedImages={},s.preloadedAudios={},Ra=8,sa=Ra+1312,Xa.push({V:function(){mb()}}),nb=nb=F([0,0,0,0,0,0,0,0],"i8",E),ob=ob=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),pb=pb=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),F([111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,115,0,0,0,0,0,0,0,111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,99,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,56,3,0,0,0,0,0,0,63,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,111,112,116,105,111,110,32,100,111,101,115,110,39,116,32,116,97,107,101,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,46,42,115,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,115,0,0,0,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,99,0,0,0,0,255,255,255,255,0,0,0,0,97,109,98,105,103,117,111,117,115,32,111,112,116,105,111,110,32,45,45,32,37,46,42,115,0,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,80,79,83,73,88,76,89,95,67,79,82,82,69,67,84,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,37,115,58,32,0,0,0,0,37,115,10,0,0,0,0,0,37,115,10,0,0,0,0,0,105,110,32,117,115,101,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,37,115,58,32,0,0,0,0,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,58,32,0,0,0,0,0,0,58,32,0,0,0,0,0,0,115,121,115,116,101,109,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,109,97,120,32,115,121,115,116,101,109,32,98,121,116,101,115,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,0,0,0,0,176,2,0,0,6,0,0,0,10,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,2,0,0,6,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,116,57,101,120,99,101,112,116,105,111,110,0,0,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,83,116,50,48,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,0,0,0,0,120,2,0,0,168,2,0,0,0,0,0,0,0,0,0,0,136,2,0,0,176,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",Na,8);var qb=xa(F(12,"i8",E),8);w(0==qb%8);var rb=0;function M(e){return B[rb>>2]=e}s._memcpy=sb,s._memset=tb;var N={L:1,ca:2,Bd:3,sc:4,I:5,za:6,Jb:7,Sc:8,$:9,Zb:10,ua:11,Ld:11,$a:12,Ya:13,kc:14,ed:15,Wb:16,va:17,Md:18,wa:19,gd:20,aa:21,A:22,Mc:23,Za:24,ld:25,Id:26,lc:27,ad:28,da:29,yd:30,Fc:31,rd:32,hc:33,ab:34,Wc:35,pc:36,$b:37,vc:38,wc:39,xc:40,Ec:41,Jd:42,Qc:43,uc:44,ec:45,Tc:46,Pb:50,Sb:51,Nd:52,Oc:53,Tb:54,Ub:55,fc:56,Vb:57,cd:60,Rc:61,Fd:62,bd:63,Xc:64,Yc:65,xd:66,Uc:67,Mb:68,Cd:69,ac:70,td:71,Hc:74,yc:75,ic:76,Rb:77,mc:79,md:80,Qb:81,wd:82,zc:83,Ac:84,Dc:85,Cc:86,Bc:87,dd:88,Nc:89,ya:90,Ic:91,ba:92,nd:95,qd:96,dc:104,Pc:105,Nb:106,vd:107,jd:108,Zc:109,zd:110,cc:111,Kb:112,bc:113,Lc:114,Jc:115,Gd:116,nc:117,oc:118,rc:119,Ob:120,gc:121,Gc:122,ud:123,Ad:124,Lb:125,Kc:126,tc:127,fd:128,Hd:129,sd:130,Kd:131,jc:132,Dd:133,kd:134,Vc:135,$c:136,Yb:137,qc:138,od:139,Xb:140,hd:141,pd:142,Ed:143},ub={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"No message of desired type",36:"Identifier removed",37:"Channel number out of range",38:"Level 2 not synchronized",39:"Level 3 halted",40:"Level 3 reset",41:"Link number out of range",42:"Protocol driver not attached",43:"No CSI structure available",44:"Level 2 halted",45:"Deadlock condition",46:"No record locks available",50:"Invalid exchange",51:"Invalid request descriptor",52:"Exchange full",53:"No anode",54:"Invalid request code",55:"Invalid slot",56:"File locking deadlock error",57:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",74:"Multihop attempted",75:"Inode is remote (not really error)",76:"Cross mount point (not really error)",77:"Trying to read unreadable message",79:"Inappropriate file type or format",80:"Given log. name not unique",81:"f.d. invalid for this operation",82:"Remote address changed",83:"Can\t access a needed shared lib",84:"Accessing a corrupted shared lib",85:".lib section in a.out corrupted",86:"Attempting to link in too many libs",87:"Attempting to exec a shared library",88:"Function not implemented",89:"No more files",90:"Directory not empty",91:"File or path name too long",92:"Too many symbolic links",95:"Operation not supported on transport endpoint",96:"Protocol family not supported",104:"Connection reset by peer",105:"No buffer space available",106:"Address family not supported by protocol family",107:"Protocol wrong type for socket",108:"Socket operation on non-socket",109:"Protocol not available",110:"Can't send after socket shutdown",111:"Connection refused",112:"Address already in use",113:"Connection aborted",114:"Network is unreachable",115:"Network interface is not configured",116:"Connection timed out",117:"Host is down",118:"Host is unreachable",119:"Connection already in progress",120:"Socket already connected",121:"Destination address required",122:"Message too long",123:"Unknown protocol",124:"Socket type not supported",125:"Address not available",126:"ENETRESET",127:"Socket is already connected",128:"Socket is not connected",129:"TOOMANYREFS",130:"EPROCLIM",131:"EUSERS",132:"EDQUOT",133:"ESTALE",134:"Not supported",135:"No medium (in tape drive)",136:"No such host or network path",137:"Filename exists with different case",138:"EILSEQ",139:"Value too large for defined data type",140:"Operation canceled",141:"State not recoverable",142:"Previous owner died",143:"Streams pipe error"};function vb(e,t,r){var n=O(e,{parent:l}).d,i=xb(n,e="/"===e?"/":wb(e)[2]);return i&&g(new Q(i)),n.l.Ta||g(new Q(N.L)),n.l.Ta(n,e,t,r)}function yb(e,t){return vb(e,t=4095&t|32768,0)}function zb(e,t){return vb(e,t=1023&t|16384,0)}function Ab(e,t,r){return vb(e,8192|t,r)}function Bb(e,t){var r=O(t,{parent:l}).d,n="/"===t?"/":wb(t)[2],i=xb(r,n);return i&&g(new Q(i)),r.l.Wa||g(new Q(N.L)),r.l.Wa(r,n,e)}function Cb(e,t){var r;(r="string"==typeof e?O(e,{N:l}).d:e).l.Y||g(new Q(N.L)),r.l.Y(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function Db(e,t){var r,n,i;e=Eb(e);"string"==typeof t?void 0===(n=Fb[t])&&g(Error("Unknown file open mode: "+t)):n=t,r=512&(t=n)?4095&r|32768:0;try{var a=O(e,{N:!(65536&t)});i=a.d,e=a.path}catch(e){}512&t&&(i?2048&t&&g(new Q(N.va)):i=vb(e,r,0)),i||g(new Q(N.ca)),8192==(61440&i.mode)&&(t&=-1025),i?40960==(61440&i.mode)?r=N.ba:16384==(61440&i.mode)&&(0!=(3&t)||1024&t)?r=N.aa:(r=["r","w","rw"][3&t],1024&t&&(r+="w"),r=Gb(i,r)):r=N.ca,r&&g(new Q(r)),1024&t&&((r="string"==typeof(r=i)?O(r,{N:l}).d:r).l.Y||g(new Q(N.L)),16384==(61440&r.mode)&&g(new Q(N.aa)),32768!=(61440&r.mode)&&g(new Q(N.A)),(a=Gb(r,"w"))&&g(new Q(a)),r.l.Y(r,{size:0,timestamp:Date.now()}));var o,s={path:e,d:i,M:t,seekable:l,position:0,e:i.e,Gb:[],error:p};e:{for(i=k||4096,r=k||1;r<=i;r++)if(!R[r]){o=r;break e}g(new Q(N.Za))}return s.s=o,Object.defineProperty(s,"object",{get:function(){return s.d},set:function(e){s.d=e}}),Object.defineProperty(s,"isRead",{get:function(){return 1!=(3&s.M)}}),Object.defineProperty(s,"isWrite",{get:function(){return 0!=(3&s.M)}}),Object.defineProperty(s,"isAppend",{get:function(){return 8&s.M}}),R[o]=s,s.e.open&&s.e.open(s),s}function Hb(e){try{e.e.close&&e.e.close(e)}catch(e){g(e)}finally{R[e.s]=m}}function Ib(e,t,r,n,i){(0>n||0>i)&&g(new Q(N.A)),0==(3&e.M)&&g(new Q(N.$)),16384==(61440&e.d.mode)&&g(new Q(N.aa)),e.e.write||g(new Q(N.A));var a=l;return void 0===i?(i=e.position,a=p):e.seekable||g(new Q(N.da)),8&e.M&&((!e.seekable||!e.e.na)&&g(new Q(N.da)),e.e.na(e,0,2)),t=e.e.write(e,t,r,n,i),a||(e.position+=t),t}function wb(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)}function Jb(e,t){for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function Eb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return!(e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"))&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function S(){return Eb(Array.prototype.slice.call(arguments,0).filter(function(e){return"string"!=typeof e&&g(new TypeError("Arguments to path.join must be strings")),e}).join("/"))}function Kb(){for(var e="",t=p,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:"/";"string"!=typeof n&&g(new TypeError("Arguments to path.resolve must be strings")),n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}var Lb=[];function Mb(e,t){Lb[e]={input:[],H:[],O:t},Nb[e]={e:Ob}}var Ob={open:function(e){Pb||(Pb=new pa);var t=Lb[e.d.X];t||g(new Q(N.wa)),e.q=t,e.seekable=p},close:function(e){e.q.H.length&&e.q.O.W(e.q,10)},Q:function(e,t,r,n){(!e.q||!e.q.O.Na)&&g(new Q(N.za));for(var i=0,a=0;ar.length;)r.push(0)}},tb:function(){g(new Q(N.ca))},Ta:function(e,t,r,n){return T.ka(e,t,r,n)},rename:function(e,t,r){if(16384==(61440&e.mode)){var n;try{n=Sb(t,r)}catch(e){}if(n)for(var i in n.g)g(new Q(N.ya))}delete e.parent.g[e.name],e.name=r,t.g[r]=e},ze:function(e,t){delete e.g[t]},ve:function(e,t){var r,n=Sb(e,t);for(r in n.g)g(new Q(N.ya));delete e.g[t]},Wa:function(e,t,r){return(e=T.ka(e,t,41471,0)).link=r,e},Va:function(e){return 40960!=(61440&e.mode)&&g(new Q(N.A)),e.link}},e:{open:function(e){if(16384==(61440&e.d.mode)){var t,r=[".",".."];for(t in e.d.g)e.d.g.hasOwnProperty(t)&&r.push(t);e.lb=r}},Q:function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.subarray)t.set(e.subarray(i,i+n),r);else for(var a=0;at&&g(new Q(N.A)),e.Gb=[],e.position=t},ue:function(e){return e.lb},Wd:function(e,t,r){for(e=e.d.g,t+=r;t>e.length;)e.push(0)},ne:function(e,t,r,n,i,a,o){return 32768!=(61440&e.d.mode)&&g(new Q(N.wa)),e=e.d.g,2&o?((0e||0===e&&-1/0==1/e}function kc(e,t){function r(e){var r;return"double"===e?r=Ja[t+o>>3]:"i64"==e?(r=[B[t+o>>2],B[t+(o+8)>>2]],o+=8):(e="i32",r=B[t+o>>2]),o+=Math.max(Math.max(la(e),ma),8),r}for(var n,i,a=e,o=0,s=[];;){var f=a;if(0===(n=A[a]))break;if(i=A[a+1|0],37==n){var u=p,c=p,d=p,h=p;e:for(;;){switch(i){case 43:u=l;break;case 45:c=l;break;case 35:d=l;break;case 48:if(h)break e;h=l;break;default:break e}i=A[++a+1|0]}var b=0;if(42==i)b=r("i32"),i=A[++a+1|0];else for(;48<=i&&57>=i;)b=10*b+(i-48),i=A[++a+1|0];var v,g=p;if(46==i){var y=0;g=l;if(42==(i=A[++a+1|0]))y=r("i32"),a++;else for(;!(48>(i=A[a+1|0])||57>>0)+4294967296*+(n[1]>>>0):+(n[0]>>>0)+4294967296*+(0|n[1])),4>=v&&(n=(f?eb:db)(n&Math.pow(256,v)-1,8*v));var S=Math.abs(n);f="";if(100==i||105==i)w=8==v&&lc?lc.stringify(_[0],_[1],m):eb(n,8*v).toString(10);else if(117==i)w=8==v&&lc?lc.stringify(_[0],_[1],l):db(n,8*v).toString(10),n=Math.abs(n);else if(111==i)w=(d?"0":"")+S.toString(8);else if(120==i||88==i){if(f=d&&0!=n?"0x":"",8==v&&lc)if(_[1]){for(w=(_[1]>>>0).toString(16),d=(_[0]>>>0).toString(16);8>d.length;)d="0"+d;w+=d}else w=(_[0]>>>0).toString(16);else if(0>n){for(n=-n,w=(S-1).toString(16),_=[],d=0;dn?"-"+f:"+"+f);f.length+w.length(v=parseInt(n.toExponential(v).split("e")[1],10))&&-4<=v?(i=(103==i?"f":"F").charCodeAt(0),y-=v+1):(i=(103==i?"e":"E").charCodeAt(0),y--),v=Math.min(y,20)),101==i||69==i?(w=n.toExponential(v),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):102!=i&&70!=i||(w=n.toFixed(v),0===n&&jc(n)&&(w="-"+w)),f=w.split("e"),g&&!d)for(;1v++;)f[0]+="0";w=f[0]+(1n?"-":"")+"inf",h=p;for(;w.lengthi&&(w=w.toUpperCase()),w.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":if(h=(u=r("i8*"))?ic(u):6,g&&(h=Math.min(h,y)),!c)for(;h>2]=s.length;break;case"%":s.push(n);break;default:for(d=f;d>12<<12,nc.ia=l,w(ua),nc.hb=ua,ua=function(){wa("cannot dynamically allocate, sbrk now has control")});var t=z;return 0!=e&&nc.hb(e),t}function U(){return B[U.m>>2]}function oc(){return!!oc.ta}function pc(e){var t=p;try{e==__ZTIi&&(t=l)}catch(e){}try{e==__ZTIj&&(t=l)}catch(e){}try{e==__ZTIl&&(t=l)}catch(e){}try{e==__ZTIm&&(t=l)}catch(e){}try{e==__ZTIx&&(t=l)}catch(e){}try{e==__ZTIy&&(t=l)}catch(e){}try{e==__ZTIf&&(t=l)}catch(e){}try{e==__ZTId&&(t=l)}catch(e){}try{e==__ZTIe&&(t=l)}catch(e){}try{e==__ZTIc&&(t=l)}catch(e){}try{e==__ZTIa&&(t=l)}catch(e){}try{e==__ZTIh&&(t=l)}catch(e){}try{e==__ZTIs&&(t=l)}catch(e){}try{e==__ZTIt&&(t=l)}catch(e){}return t}function qc(e,t,r){if(0==r)return p;if(0==t||t==e)return l;switch(pc(t)?t:B[B[t>>2]-8>>2]){case 0:return 0==B[B[e>>2]-8>>2]?qc(B[e+8>>2],B[t+8>>2],r):p;case 1:return p;case 2:return qc(e,B[t+8>>2],r);default:return p}}function rc(e,t,r){if(!rc.sb){try{B[__ZTVN10__cxxabiv119__pointer_type_infoE>>2]=0}catch(e){}try{B[pb>>2]=1}catch(e){}try{B[ob>>2]=2}catch(e){}rc.sb=l}B[U.m>>2]=e,B[U.m+4>>2]=t,B[U.m+8>>2]=r,"uncaught_exception"in oc?oc.ta++:oc.ta=1,g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")}function sc(e){try{return tc(e)}catch(e){}}function uc(){if(uc.Bb)uc.Bb=p;else{V.setThrew(0),B[U.m+4>>2]=0;var e=B[U.m>>2],t=B[U.m+8>>2];t&&(na("vi",t,[e]),B[U.m+8>>2]=0),e&&(sc(e),B[U.m>>2]=0)}}s._strlen=ic;var vc=F(1,"i32*",E);function wc(e){var t,r;wc.ia?(r=B[vc>>2],t=B[r>>2]):(wc.ia=l,W.USER="root",W.PATH="/",W.PWD="/",W.HOME="/home/emscripten",W.LANG="en_US.UTF-8",W._="./this.program",t=F(1024,"i8",E),r=F(256,"i8*",E),B[r>>2]=t,B[vc>>2]=r);var n,i=[],a=0;for(n in e)if("string"==typeof e[n]){var o=n+"="+e[n];i.push(o),a+=o.length}for(1024>2]=t,t+=o.length+1}B[r+4*i.length>>2]=0}var W={};function xc(e){return 0===e?0:(e=Fa(e),W.hasOwnProperty(e)?(xc.J&&tc(xc.J),xc.J=F(J(W[e]),"i8",Ka),xc.J):0)}function yc(e,t,r){if(e in ub){if(ub[e].length>r-1)return M(N.ab);for(e=ub[e],r=0;r>2],B[SDL.screen+0*ma>>2]=8388608|e),Kc()}function Mc(){var e=s.canvas;e.width=this.Ib,e.height=this.Hb,"undefined"!=typeof SDL&&(e=Qa[SDL.screen+0*ma>>2],B[SDL.screen+0*ma>>2]=-8388609&e),Kc()}var Nc,Oc,Pc,Qc,rb=ra(4);B[rb>>2]=0;var Vb=Qb(m,"/",16895,0),Rc=T,Sc={type:Rc,se:{},Ua:"/",root:m},Tc;Tc=O("/",{N:p});var Uc=Rc.z(Sc);Uc.z=Sc,Sc.root=Uc,Tc&&(Tc.d.z=Sc,Tc.d.ub=l,Vb=Sc.root),zb("/tmp",511),zb("/dev",511),Nb[259]={e:{Q:function(){return 0},write:function(){return 0}}},Ab("/dev/null",438,259),Mb(1280,{Na:function(e){if(!e.input.length){var t=m;if(ca){if(process.Eb.be)return;t=process.Eb.Q()}else"undefined"!=typeof window&&"function"==typeof window.prompt?(t=window.prompt("Input: "))!==m&&(t+="\n"):"function"==typeof readline&&((t=readline())!==m&&(t+="\n"));if(!t)return m;e.input=J(t,l)}return e.input.shift()},W:function(e,t){t===m||10===t?(s.print(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Mb(1536,{W:function(e,t){t===m||10===t?(s.printErr(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Ab("/dev/tty",438,1280),Ab("/dev/tty1",438,1536),zb("/dev/shm",511),zb("/dev/shm/tmp",511),Xa.unshift({V:function(){if(!s.noFSInit&&!bc){w(!bc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),bc=l,s.stdin=s.stdin,s.stdout=s.stdout,s.stderr=s.stderr,s.stdin?ec("/dev","stdin",s.stdin):Bb("/dev/tty","/dev/stdin"),s.stdout?ec("/dev","stdout",m,s.stdout):Bb("/dev/tty","/dev/stdout"),s.stderr?ec("/dev","stderr",m,s.stderr):Bb("/dev/tty1","/dev/stderr");var e=Db("/dev/stdin","r");B[Tb>>2]=e.s,w(1===e.s,"invalid handle for stdin ("+e.s+")"),e=Db("/dev/stdout","w"),B[Ub>>2]=e.s,w(2===e.s,"invalid handle for stdout ("+e.s+")"),e=Db("/dev/stderr","w"),B[nb>>2]=e.s,w(3===e.s,"invalid handle for stderr ("+e.s+")")}}}),Ya.push({V:function(){Yb=p}}),Za.push({V:function(){bc=p;for(var e=0;e>a-6&63;a=a-6,r=r+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),u.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(u)}},u.src=f,setTimeout(function(){za||i(u)},1e4)}});var d=s.canvas;d.qa=d.requestPointerLock||d.mozRequestPointerLock||d.webkitRequestPointerLock,d.La=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||aa(),d.La=d.La.bind(document),document.addEventListener("pointerlockchange",u,p),document.addEventListener("mozpointerlockchange",u,p),document.addEventListener("webkitpointerlockchange",u,p),s.elementPointerLock&&d.addEventListener("click",function(e){!Ec&&d.qa&&(d.qa(),e.preventDefault())},p)}var h,b=S.apply(m,[e,t]);if("/"==b[0]&&(b=b.substr(1)),ib("cp "+(h=b)),"string"==typeof r){var v=o,y=function(){v?v():g('Loading data file "'+r+'" failed.')},_=new XMLHttpRequest;_.open("GET",r,l),_.responseType="arraybuffer",_.onload=function(){if(200==_.status||0==_.status&&_.response){var e=_.response;w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),c(e=new Uint8Array(e)),jb("al "+r)}else y()},_.onerror=y,_.send(m),ib("al "+r)}else c(r)},s.FS_createLazyFile=function(e,t,r,n,i){var a,o;"undefined"!=typeof XMLHttpRequest?(ea||g("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),(a=function(){this.ma=p,this.T=[]}).prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.S;return this.pb(Math.floor(e/this.S))[t]}},a.prototype.Cb=function(e){this.pb=e},a.prototype.Fa=function(){var e=new XMLHttpRequest;e.open("HEAD",r,p),e.send(m),200<=e.status&&300>e.status||304===e.status||g(Error("Couldn't load "+r+". Status: "+e.status));var t,n=Number(e.getResponseHeader("Content-length")),i=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(i=n);var a=this;a.Cb(function(e){var t=e*i,o=(e+1)*i-1;o=Math.min(o,n-1);if(void 0===a.T[e]){var s=a.T;t>o&&g(Error("invalid range ("+t+", "+o+") or no bytes requested!")),o>n-1&&g(Error("only "+n+" bytes available! programmer error!"));var f=new XMLHttpRequest;f.open("GET",r,p),n!==i&&f.setRequestHeader("Range","bytes="+t+"-"+o),"undefined"!=typeof Uint8Array&&(f.responseType="arraybuffer"),f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(m),200<=f.status&&300>f.status||304===f.status||g(Error("Couldn't load "+r+". Status: "+f.status)),t=f.response!==k?new Uint8Array(f.response||[]):J(f.responseText||"",l),s[e]=t}return void 0===a.T[e]&&g(Error("doXHR failed!")),a.T[e]}),this.gb=n,this.fb=i,this.ma=l},a=new a,Object.defineProperty(a,"length",{get:function(){return this.ma||this.Fa(),this.gb}}),Object.defineProperty(a,"chunkSize",{get:function(){return this.ma||this.Fa(),this.fb}}),o=k):(o=r,a=k);var f;e=S("string"==typeof e?e:ac(e),t);f=yb(e,cc(n,i)),a?f.g=a:o&&(f.g=m,f.url=o);var u={};return Object.keys(f.e).forEach(function(e){var t=f.e[e];u[e]=function(){var e;if(f.ke||f.le||f.link||f.g)e=l;else{if(e=l,"undefined"!=typeof XMLHttpRequest&&g(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")),s.read)try{f.g=J(s.read(f.url),l)}catch(t){e=p}else g(Error("Cannot load without read() or XMLHttpRequest."));e||M(N.I)}return e||g(new Q(N.I)),t.apply(m,arguments)}}),u.Q=function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.slice)for(var a=0;a>3<<3;return t|0}function at(){return l|0}function ot(e){e=e|0;l=e}function st(e,t){e=e|0;t=t|0;if((k|0)==0){k=e;x=t}}function ft(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0]}function ut(e){e=e|0;n[h]=n[e];n[h+1|0]=n[e+1|0];n[h+2|0]=n[e+2|0];n[h+3|0]=n[e+3|0];n[h+4|0]=n[e+4|0];n[h+5|0]=n[e+5|0];n[h+6|0]=n[e+6|0];n[h+7|0]=n[e+7|0]}function ct(e){e=e|0;N=e}function lt(e){e=e|0;L=e}function dt(e){e=e|0;F=e}function ht(e){e=e|0;z=e}function pt(e){e=e|0;H=e}function bt(e){e=e|0;D=e}function vt(e){e=e|0;U=e}function mt(e){e=e|0;q=e}function gt(e){e=e|0;Y=e}function yt(e){e=e|0;K=e}function wt(){a[170]=y+8;a[172]=g+8;a[176]=g+8}function _t(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)==0){return}else{i=0}do{n[e+i|0]=n[t+i|0]|0;i=i+1|0}while(i>>>0>>0);return}function St(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0;if((r|0)==0){return}else{i=0}do{a=e+i|0;n[a]=n[a]^n[t+i|0];i=i+1|0}while(i>>>0>>0);return}function kt(e){e=e|0;var t=0,r=0,n=0,i=0;t=o[e+1|0]|0;r=o[e+2|0]|0;n=o[e+3|0]|0;i=rn(t<<8|0>>>24|(o[e]|0)|(r<<16|0>>>16)|(n<<24|0>>>8)|(0<<8|0>>>24),0<<8|t>>>24|(0<<16|r>>>16)|(0<<24|n>>>8)|(o[e+4|0]|0)|((o[e+5|0]|0)<<8|0>>>24),0<<16|0>>>16,(o[e+6|0]|0)<<16|0>>>16)|0;n=rn(i,N,0<<24|0>>>8,(o[e+7|0]|0)<<24|0>>>8)|0;return(N=N,n)|0}function xt(e){e=e|0;return(o[e+1|0]|0)<<8|(o[e]|0)|(o[e+2|0]|0)<<16|(o[e+3|0]|0)<<24|0}function At(e,t){e=e|0;t=t|0;n[e]=t&255;n[e+1|0]=t>>>8&255;n[e+2|0]=t>>>16&255;n[e+3|0]=t>>>24&255;return}function Mt(e){e=e|0;a[e+36>>2]=0;a[e+32>>2]=0;a[e>>2]=1779033703;a[e+4>>2]=-1150833019;a[e+8>>2]=1013904242;a[e+12>>2]=-1521486534;a[e+16>>2]=1359893119;a[e+20>>2]=-1694144372;a[e+24>>2]=528734635;a[e+28>>2]=1541459225;return}function Et(e,t,r,n,i,o,s,f,u,c){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;o=o|0;s=s|0;f=f|0;u=u|0;c=c|0;var l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0;l=hn(f,0,s,0)|0;d=N;h=0;if(d>>>0>h>>>0|d>>>0==h>>>0&l>>>0>1073741823>>>0){a[(Je()|0)>>2]=27;p=-1;return p|0}l=rn(i,o,-1,-1)|0;if((l&i|0)!=0|(N&o|0)!=0|(i|0)==0&(o|0)==0){a[(Je()|0)>>2]=22;p=-1;return p|0}do{if(!((33554431/(f>>>0)|0)>>>0>>0|s>>>0>16777215)){l=0;if(l>>>0>>0|l>>>0==o>>>0&(33554431/(s>>>0)|0)>>>0>>0){break}l=s<<7;h=Yt(oe(l,f)|0)|0;if((h|0)==0){p=-1;return p|0}d=Yt(s<<8)|0;do{if((d|0)!=0){b=hn(l,0,i,o)|0;v=Yt(b)|0;if((v|0)==0){Kt(d);break}b=oe(f<<7,s)|0;Ut(e,t,r,n,1,0,h,b);if((f|0)!=0){m=s<<7;g=0;do{Tt(h+(oe(m,g)|0)|0,s,i,o,v,d);g=g+1|0}while(g>>>0>>0)}Ut(e,t,h,b,1,0,u,c);Kt(v);Kt(d);Kt(h);p=0;return p|0}}while(0);Kt(h);p=-1;return p|0}}while(0);a[(Je()|0)>>2]=12;p=-1;return p|0}function Tt(e,t,r,n,i,a){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;a=a|0;var o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0;o=t<<7;s=a+o|0;_t(a,e,o);if((r|0)==0&(n|0)==0){_t(e,a,o);return}f=o;u=0;c=0;l=0;do{d=hn(l,c,f,u)|0;_t(i+d|0,a,o);It(a,s,t);l=rn(l,c,1,0)|0;c=N}while(c>>>0>>0|c>>>0==n>>>0&l>>>0>>0);if((r|0)==0&(n|0)==0){_t(e,a,o);return}l=rn(r,n,-1,-1)|0;c=N;u=o;f=0;d=0;h=0;do{p=Pt(a,t)|0;b=hn(p&l,N&c,u,f)|0;St(a,i+b|0,o);It(a,s,t);h=rn(h,d,1,0)|0;d=N}while(d>>>0>>0|d>>>0==n>>>0&h>>>0>>0);_t(e,a,o);return}function It(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,a=0,o=0,s=0,f=0,u=0;n=l;l=l+64|0;i=n|0;a=r<<1;_t(i,e+((r<<7)-64)|0,64);if((a|0)!=0){o=0;do{s=o<<6;St(i,e+s|0,64);Ot(i);_t(t+s|0,i,64);o=o+1|0}while(o>>>0>>0)}if((r|0)==0){l=n;return}else{f=0}do{_t(e+(f<<6)|0,t+(f<<7)|0,64);f=f+1|0}while(f>>>0>>0);if((r|0)==0){l=n;return}else{u=0}do{_t(e+(u+r<<6)|0,t+(u<<7|64)|0,64);u=u+1|0}while(u>>>0>>0);l=n;return}function Pt(e,t){e=e|0;t=t|0;var r=0;r=kt(e+((t<<7)-64)|0)|0;return(N=N,r)|0}function Ot(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,D=0,U=0,q=0,Y=0,K=0,V=0,W=0,X=0,Z=0,G=0,Q=0,J=0,$=0,ee=0,te=0;t=l;l=l+128|0;r=t|0;n=t+64|0;i=0;do{a[r+(i<<2)>>2]=xt(e+(i<<2)|0)|0;i=i+1|0}while(i>>>0<16);i=r;o=n;$r(o|0,i|0,64)|0;i=n|0;o=n+48|0;s=n+16|0;f=n+32|0;u=n+20|0;c=n+4|0;d=n+36|0;h=n+52|0;p=n+40|0;b=n+24|0;v=n+56|0;m=n+8|0;g=n+60|0;y=n+44|0;w=n+12|0;_=n+28|0;S=0;k=a[i>>2]|0;x=a[o>>2]|0;A=a[s>>2]|0;M=a[f>>2]|0;E=a[u>>2]|0;T=a[c>>2]|0;I=a[d>>2]|0;P=a[h>>2]|0;O=a[p>>2]|0;R=a[b>>2]|0;C=a[v>>2]|0;B=a[m>>2]|0;j=a[g>>2]|0;N=a[y>>2]|0;L=a[w>>2]|0;F=a[_>>2]|0;do{z=x+k|0;H=(z<<7|z>>>25)^A;z=H+k|0;D=(z<<9|z>>>23)^M;z=D+H|0;U=(z<<13|z>>>19)^x;z=U+D|0;q=(z<<18|z>>>14)^k;z=T+E|0;Y=(z<<7|z>>>25)^I;z=Y+E|0;K=(z<<9|z>>>23)^P;z=K+Y|0;V=(z<<13|z>>>19)^T;z=V+K|0;W=(z<<18|z>>>14)^E;z=R+O|0;X=(z<<7|z>>>25)^C;z=X+O|0;Z=(z<<9|z>>>23)^B;z=Z+X|0;G=(z<<13|z>>>19)^R;z=G+Z|0;Q=(z<<18|z>>>14)^O;z=N+j|0;J=(z<<7|z>>>25)^L;z=J+j|0;$=(z<<9|z>>>23)^F;z=$+J|0;ee=(z<<13|z>>>19)^N;z=ee+$|0;te=(z<<18|z>>>14)^j;z=J+q|0;T=(z<<7|z>>>25)^V;V=T+q|0;B=(V<<9|V>>>23)^Z;Z=B+T|0;L=(Z<<13|Z>>>19)^J;J=L+B|0;k=(J<<18|J>>>14)^q;q=H+W|0;R=(q<<7|q>>>25)^G;G=R+W|0;F=(G<<9|G>>>23)^$;$=F+R|0;A=($<<13|$>>>19)^H;H=A+F|0;E=(H<<18|H>>>14)^W;W=Y+Q|0;N=(W<<7|W>>>25)^ee;ee=N+Q|0;M=(ee<<9|ee>>>23)^D;D=M+N|0;I=(D<<13|D>>>19)^Y;Y=I+M|0;O=(Y<<18|Y>>>14)^Q;Q=X+te|0;x=(Q<<7|Q>>>25)^U;U=x+te|0;P=(U<<9|U>>>23)^K;K=P+x|0;C=(K<<13|K>>>19)^X;X=C+P|0;j=(X<<18|X>>>14)^te;S=S+2|0}while(S>>>0<8);a[i>>2]=k;a[o>>2]=x;a[s>>2]=A;a[f>>2]=M;a[u>>2]=E;a[c>>2]=T;a[d>>2]=I;a[h>>2]=P;a[p>>2]=O;a[b>>2]=R;a[v>>2]=C;a[m>>2]=B;a[g>>2]=j;a[y>>2]=N;a[w>>2]=L;a[_>>2]=F;F=r|0;a[F>>2]=(a[F>>2]|0)+(a[n>>2]|0);F=r+4|0;a[F>>2]=(a[F>>2]|0)+(a[n+4>>2]|0);F=r+8|0;a[F>>2]=(a[F>>2]|0)+(a[n+8>>2]|0);F=r+12|0;a[F>>2]=(a[F>>2]|0)+(a[n+12>>2]|0);F=r+16|0;a[F>>2]=(a[F>>2]|0)+(a[n+16>>2]|0);F=r+20|0;a[F>>2]=(a[F>>2]|0)+(a[n+20>>2]|0);F=r+24|0;a[F>>2]=(a[F>>2]|0)+(a[n+24>>2]|0);F=r+28|0;a[F>>2]=(a[F>>2]|0)+(a[n+28>>2]|0);F=r+32|0;a[F>>2]=(a[F>>2]|0)+(a[n+32>>2]|0);F=r+36|0;a[F>>2]=(a[F>>2]|0)+(a[n+36>>2]|0);F=r+40|0;a[F>>2]=(a[F>>2]|0)+(a[n+40>>2]|0);F=r+44|0;a[F>>2]=(a[F>>2]|0)+(a[n+44>>2]|0);F=r+48|0;a[F>>2]=(a[F>>2]|0)+(a[n+48>>2]|0);F=r+52|0;a[F>>2]=(a[F>>2]|0)+(a[n+52>>2]|0);F=r+56|0;a[F>>2]=(a[F>>2]|0)+(a[n+56>>2]|0);F=r+60|0;a[F>>2]=(a[F>>2]|0)+(a[n+60>>2]|0);n=0;do{At(e+(n<<2)|0,a[r+(n<<2)>>2]|0);n=n+1|0}while(n>>>0<16);l=t;return}function Rt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0,s=0,f=0,u=0,c=0;n=e+32|0;i=e+36|0;o=a[i>>2]|0;s=o>>>3&63;f=Ue(o|0,r<<3|0)|0;a[i>>2]=f;if(N){f=n|0;a[f>>2]=(a[f>>2]|0)+1}f=n|0;a[f>>2]=(a[f>>2]|0)+(r>>>29);f=64-s|0;n=e+40+s|0;if(f>>>0>r>>>0){$r(n|0,t|0,r)|0;return}$r(n|0,t|0,f)|0;n=e|0;s=e+40|0;Ct(n,s);e=t+f|0;t=r-f|0;if(t>>>0>63){f=t;r=e;while(1){Ct(n,r);i=r+64|0;o=f-64|0;if(o>>>0>63){f=o;r=i}else{u=o;c=i;break}}}else{u=t;c=e}$r(s|0,c|0,u)|0;return}function Ct(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0;r=l;l=l+288|0;n=r|0;i=r+256|0;o=n|0;qt(o,t);t=16;do{s=a[n+(t-2<<2)>>2]|0;f=a[n+(t-15<<2)>>2]|0;a[n+(t<<2)>>2]=(a[n+(t-16<<2)>>2]|0)+(a[n+(t-7<<2)>>2]|0)+((s>>>19|s<<13)^s>>>10^(s>>>17|s<<15))+((f>>>18|f<<14)^f>>>3^(f>>>7|f<<25));t=t+1|0}while((t|0)<64);t=i;f=e;$r(t|0,f|0,32)|0;f=i+28|0;t=i+16|0;s=a[t>>2]|0;u=i+20|0;c=i+24|0;d=a[c>>2]|0;h=(a[f>>2]|0)+1116352408+(a[o>>2]|0)+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+((d^a[u>>2])&s^d)|0;d=i|0;s=a[d>>2]|0;o=i+4|0;p=a[o>>2]|0;b=i+8|0;v=a[b>>2]|0;m=i+12|0;a[m>>2]=(a[m>>2]|0)+h;g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+h+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+1899447441+(a[n+4>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1245643825+(a[n+8>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-373957723+(a[n+12>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[d>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+961987163+(a[n+16>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1508970993+(a[n+20>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[d>>2]|0;h=(a[o>>2]|0)-1841331548+(a[n+24>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[d>>2]|0)-1424204075+(a[n+28>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[d>>2]=h;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)-670586216+(a[n+32>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;h=(a[c>>2]|0)+310598401+(a[n+36>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+607225278+(a[n+40>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1426881987+(a[n+44>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[d>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1925078388+(a[n+48>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-2132889090+(a[n+52>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[c>>2]|0;p=a[d>>2]|0;g=(a[o>>2]|0)-1680079193+(a[n+56>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;h=(a[d>>2]|0)-1046744716+(a[n+60>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[d>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-459576895+(a[n+64>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-272742522+(a[n+68>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[u>>2]|0)+264347078+(a[n+72>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)+604807628+(a[n+76>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[d>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)+770255983+(a[n+80>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)+1249150122+(a[n+84>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[d>>2]|0;s=(a[o>>2]|0)+1555081692+(a[n+88>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[d>>2]|0)+1996064986+(a[n+92>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[d>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;h=(a[f>>2]|0)-1740746414+(a[n+96>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)-1473132947+(a[n+100>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1341970488+(a[n+104>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)-1084653625+(a[n+108>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[d>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)-958395405+(a[n+112>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)-710438585+(a[n+116>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[d>>2]|0;h=(a[o>>2]|0)+113926993+(a[n+120>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[d>>2]|0)+338241895+(a[n+124>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[d>>2]=h;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+666307205+(a[n+128>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;h=(a[c>>2]|0)+773529912+(a[n+132>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+1294757372+(a[n+136>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1396182291+(a[n+140>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[d>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)+1695183700+(a[n+144>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)+1986661051+(a[n+148>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[c>>2]|0;p=a[d>>2]|0;g=(a[o>>2]|0)-2117940946+(a[n+152>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;h=(a[d>>2]|0)-1838011259+(a[n+156>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[d>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-1564481375+(a[n+160>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=h;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-1474664885+(a[n+164>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;h=(a[u>>2]|0)-1035236496+(a[n+168>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)-949202525+(a[n+172>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=h;v=a[d>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)-778901479+(a[n+176>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;h=(a[b>>2]|0)-694614492+(a[n+180>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[d>>2]|0;s=(a[o>>2]|0)-200395387+(a[n+184>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=h;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[d>>2]|0)+275423344+(a[n+188>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[d>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;h=(a[f>>2]|0)+430227734+(a[n+192>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+506948616+(a[n+196>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=h;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)+659060556+(a[n+200>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;h=(a[t>>2]|0)+883997877+(a[n+204>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[d>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+958139571+(a[n+208>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=h;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1322822218+(a[n+212>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[d>>2]|0;h=(a[o>>2]|0)+1537002063+(a[n+216>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[d>>2]|0)+1747873779+(a[n+220>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[d>>2]=h;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+1955562222+(a[n+224>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;h=(a[c>>2]|0)+2024104815+(a[n+228>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[d>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)-2067236844+(a[n+232>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[d>>2]|0;a[o>>2]=(a[o>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=h;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)-1933114872+(a[n+236>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[d>>2]=(a[d>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((p|v)&h|p&v)|0;a[t>>2]=s;v=a[d>>2]|0;p=a[b>>2]|0;h=(a[m>>2]|0)-1866530822+(a[n+240>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+h;g=h+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-1538233109+(a[n+244>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[d>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;h=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=h;v=a[c>>2]|0;p=a[d>>2]|0;g=(a[o>>2]|0)-1090935817+(a[n+248>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+((v|p)&h|v&p)|0;a[o>>2]=s;o=a[u>>2]|0;u=a[f>>2]|0;f=(a[d>>2]|0)-965641998+(a[n+252>>2]|0)+((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+((u^a[c>>2])&o^u)|0;u=a[b>>2]|0;b=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+f;t=f+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((b|u)&s|b&u)|0;a[d>>2]=t;a[e>>2]=(a[e>>2]|0)+t;t=e+4|0;a[t>>2]=(a[t>>2]|0)+(a[i+4>>2]|0);t=e+8|0;a[t>>2]=(a[t>>2]|0)+(a[i+8>>2]|0);t=e+12|0;a[t>>2]=(a[t>>2]|0)+(a[i+12>>2]|0);t=e+16|0;a[t>>2]=(a[t>>2]|0)+(a[i+16>>2]|0);t=e+20|0;a[t>>2]=(a[t>>2]|0)+(a[i+20>>2]|0);t=e+24|0;a[t>>2]=(a[t>>2]|0)+(a[i+24>>2]|0);t=e+28|0;a[t>>2]=(a[t>>2]|0)+(a[i+28>>2]|0);l=r;return}function Bt(e,t){e=e|0;t=t|0;n[e+3|0]=t&255;n[e+2|0]=t>>>8&255;n[e+1|0]=t>>>16&255;n[e]=t>>>24&255;return}function jt(e){e=e|0;return(o[e+2|0]|0)<<8|(o[e+3|0]|0)|(o[e+1|0]|0)<<16|(o[e]|0)<<24|0}function Nt(e,t){e=e|0;t=t|0;Lt(t);Ft(e,t|0,32);en(t|0,0,104);return}function Lt(e){e=e|0;var t=0,r=0,n=0;t=l;l=l+8|0;r=t|0;Ft(r,e+32|0,8);n=(a[e+36>>2]|0)>>>3&63;Rt(e,720,(n>>>0<56?56:120)-n|0);Rt(e,r,8);l=t;return}function Ft(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=r>>>2;if((n|0)==0){return}else{i=0}do{Bt(e+(i<<2)|0,a[t+(i<<2)>>2]|0);i=i+1|0}while(i>>>0>>0);return}function zt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0,o=0,s=0,f=0,u=0,c=0;i=l;l=l+96|0;a=i|0;if(r>>>0>64){o=e|0;Mt(o);Rt(o,t,r);s=i+64|0;Nt(s,o);f=s;u=32}else{f=t;u=r}r=e|0;Mt(r);t=a|0;en(t|0,54,64);if((u|0)!=0){s=0;do{o=a+s|0;n[o]=n[o]^n[f+s|0];s=s+1|0}while(s>>>0>>0)}Rt(r,t,64);r=e+104|0;Mt(r);en(t|0,92,64);if((u|0)==0){Rt(r,t,64);l=i;return}else{c=0}do{e=a+c|0;n[e]=n[e]^n[f+c|0];c=c+1|0}while(c>>>0>>0);Rt(r,t,64);l=i;return}function Ht(e,t,r){e=e|0;t=t|0;r=r|0;Rt(e|0,t,r);return}function Dt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+32|0;n=r|0;Nt(n,t|0);i=t+104|0;Rt(i,n,32);Nt(e,i);l=r;return}function Ut(e,t,r,i,a,o,s,f){e=e|0;t=t|0;r=r|0;i=i|0;a=a|0;o=o|0;s=s|0;f=f|0;var u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;u=l;l=l+488|0;c=u|0;d=u+208|0;h=u+424|0;p=u+456|0;zt(c,e,t);Ht(c,r,i);if((f|0)==0){l=u;return}i=u+416|0;r=d;b=c;c=h|0;v=p|0;m=0;g=o>>>0>>0|o>>>0==m>>>0&a>>>0<2>>>0;m=0;y=0;do{m=m+1|0;Bt(i,m);$r(r|0,b|0,208)|0;Ht(d,i,4);Dt(c,d);$r(v|0,c|0,32)|0;if(!g){w=0;_=2;do{zt(d,e,t);Ht(d,c,32);Dt(c,d);S=0;do{k=p+S|0;n[k]=n[k]^n[h+S|0];S=S+1|0}while((S|0)<32);_=rn(_,w,1,0)|0;w=N}while(!(w>>>0>o>>>0|w>>>0==o>>>0&_>>>0>a>>>0))}_=f-y|0;w=_>>>0>32?32:_;_=s+y|0;$r(_|0,v|0,w)|0;y=m<<5}while(y>>>0>>0);l=u;return}function qt(e,t){e=e|0;t=t|0;var r=0;r=0;do{a[e+(r<<2)>>2]=jt(t+(r<<2)|0)|0;r=r+1|0}while(r>>>0<16);return}function Yt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,D=0,U=0,q=0,Y=0,K=0,V=0,W=0,X=0,Z=0,G=0,Q=0,J=0,$=0,ee=0,te=0,re=0,ne=0,ie=0,ae=0,oe=0,se=0,fe=0,ue=0,ce=0,le=0,de=0,he=0,pe=0,be=0,ve=0,me=0,ge=0,ye=0,_e=0,Se=0,xe=0,Ae=0,Me=0,Ee=0,Te=0,Ie=0,Pe=0,Oe=0,Re=0,Ce=0,Be=0;do{if(e>>>0<245){if(e>>>0<11){t=16}else{t=e+11&-8}r=t>>>3;n=a[208]|0;i=n>>>(r>>>0);if((i&3|0)!=0){o=(i&1^1)+r|0;s=o<<1;f=872+(s<<2)|0;u=872+(s+2<<2)|0;s=a[u>>2]|0;c=s+8|0;l=a[c>>2]|0;do{if((f|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}d=l+12|0;if((a[d>>2]|0)==(s|0)){a[d>>2]=f;a[u>>2]=l;break}else{ke();return 0}}}while(0);l=o<<3;a[s+4>>2]=l|3;u=s+(l|4)|0;a[u>>2]=a[u>>2]|1;h=c;return h|0}if(t>>>0<=(a[210]|0)>>>0){p=t;break}if((i|0)!=0){u=2<>>12&16;f=u>>>(l>>>0);u=f>>>5&8;d=f>>>(u>>>0);f=d>>>2&4;b=d>>>(f>>>0);d=b>>>1&2;v=b>>>(d>>>0);b=v>>>1&1;m=(u|l|f|d|b)+(v>>>(b>>>0))|0;b=m<<1;v=872+(b<<2)|0;d=872+(b+2<<2)|0;b=a[d>>2]|0;f=b+8|0;l=a[f>>2]|0;do{if((v|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}u=l+12|0;if((a[u>>2]|0)==(b|0)){a[u>>2]=v;a[d>>2]=l;break}else{ke();return 0}}}while(0);l=m<<3;d=l-t|0;a[b+4>>2]=t|3;v=b;n=v+t|0;a[v+(t|4)>>2]=d|1;a[v+l>>2]=d;l=a[210]|0;if((l|0)!=0){v=a[213]|0;r=l>>>3;l=r<<1;i=872+(l<<2)|0;c=a[208]|0;s=1<>2]|0;if(o>>>0>=(a[212]|0)>>>0){g=o;y=r;break}ke();return 0}}while(0);a[y>>2]=v;a[g+12>>2]=v;a[v+8>>2]=g;a[v+12>>2]=i}a[210]=d;a[213]=n;h=f;return h|0}l=a[209]|0;if((l|0)==0){p=t;break}s=(l&-l)-1|0;l=s>>>12&16;c=s>>>(l>>>0);s=c>>>5&8;b=c>>>(s>>>0);c=b>>>2&4;m=b>>>(c>>>0);b=m>>>1&2;r=m>>>(b>>>0);m=r>>>1&1;o=a[1136+((s|l|c|b|m)+(r>>>(m>>>0))<<2)>>2]|0;m=o;r=o;b=(a[o+4>>2]&-8)-t|0;while(1){o=a[m+16>>2]|0;if((o|0)==0){c=a[m+20>>2]|0;if((c|0)==0){break}else{w=c}}else{w=o}o=(a[w+4>>2]&-8)-t|0;c=o>>>0>>0;m=w;r=c?w:r;b=c?o:b}m=r;f=a[212]|0;if(m>>>0>>0){ke();return 0}n=m+t|0;d=n;if(m>>>0>=n>>>0){ke();return 0}n=a[r+24>>2]|0;i=a[r+12>>2]|0;do{if((i|0)==(r|0)){v=r+20|0;o=a[v>>2]|0;if((o|0)==0){c=r+16|0;l=a[c>>2]|0;if((l|0)==0){_=0;break}else{S=l;k=c}}else{S=o;k=v}while(1){v=S+20|0;o=a[v>>2]|0;if((o|0)!=0){S=o;k=v;continue}v=S+16|0;o=a[v>>2]|0;if((o|0)==0){break}else{S=o;k=v}}if(k>>>0>>0){ke();return 0}else{a[k>>2]=0;_=S;break}}else{v=a[r+8>>2]|0;if(v>>>0>>0){ke();return 0}o=v+12|0;if((a[o>>2]|0)!=(r|0)){ke();return 0}c=i+8|0;if((a[c>>2]|0)==(r|0)){a[o>>2]=i;a[c>>2]=v;_=i;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){i=r+28|0;f=1136+(a[i>>2]<<2)|0;do{if((r|0)==(a[f>>2]|0)){a[f>>2]=_;if((_|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}v=n+16|0;if((a[v>>2]|0)==(r|0)){a[v>>2]=_}else{a[n+20>>2]=_}if((_|0)==0){break e}}}while(0);if(_>>>0<(a[212]|0)>>>0){ke();return 0}a[_+24>>2]=n;i=a[r+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+16>>2]=i;a[i+24>>2]=_;break}}}while(0);i=a[r+20>>2]|0;if((i|0)==0){break}if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+20>>2]=i;a[i+24>>2]=_;break}}}while(0);if(b>>>0<16){n=b+t|0;a[r+4>>2]=n|3;i=m+(n+4)|0;a[i>>2]=a[i>>2]|1}else{a[r+4>>2]=t|3;a[m+(t|4)>>2]=b|1;a[m+(b+t)>>2]=b;i=a[210]|0;if((i|0)!=0){n=a[213]|0;f=i>>>3;i=f<<1;v=872+(i<<2)|0;c=a[208]|0;o=1<>2]|0;if(l>>>0>=(a[212]|0)>>>0){x=l;A=f;break}ke();return 0}}while(0);a[A>>2]=n;a[x+12>>2]=n;a[n+8>>2]=x;a[n+12>>2]=v}a[210]=b;a[213]=d}i=r+8|0;if((i|0)==0){p=t;break}else{h=i}return h|0}else{if(e>>>0>4294967231){p=-1;break}i=e+11|0;o=i&-8;c=a[209]|0;if((c|0)==0){p=o;break}m=-o|0;f=i>>>8;do{if((f|0)==0){M=0}else{if(o>>>0>16777215){M=31;break}i=(f+1048320|0)>>>16&8;l=f<>>16&4;u=l<>>16&2;E=14-(s|i|l)+(u<>>15)|0;M=o>>>((E+7|0)>>>0)&1|E<<1}}while(0);f=a[1136+(M<<2)>>2]|0;e:do{if((f|0)==0){T=0;I=m;P=0}else{if((M|0)==31){O=0}else{O=25-(M>>>1)|0}r=0;d=m;b=f;v=o<>2]&-8;l=E-o|0;if(l>>>0>>0){if((E|0)==(o|0)){T=b;I=l;P=b;break e}else{R=b;C=l}}else{R=r;C=d}l=a[b+20>>2]|0;E=a[b+16+(v>>>31<<2)>>2]|0;u=(l|0)==0|(l|0)==(E|0)?n:l;if((E|0)==0){T=R;I=C;P=u;break}else{r=R;d=C;b=E;v=v<<1;n=u}}}}while(0);if((P|0)==0&(T|0)==0){f=2<>>12&16;n=f>>>(m>>>0);f=n>>>5&8;v=n>>>(f>>>0);n=v>>>2&4;b=v>>>(n>>>0);v=b>>>1&2;d=b>>>(v>>>0);b=d>>>1&1;B=a[1136+((f|m|n|v|b)+(d>>>(b>>>0))<<2)>>2]|0}else{B=P}if((B|0)==0){j=I;N=T}else{b=B;d=I;v=T;while(1){n=(a[b+4>>2]&-8)-o|0;m=n>>>0>>0;f=m?n:d;n=m?b:v;m=a[b+16>>2]|0;if((m|0)!=0){b=m;d=f;v=n;continue}m=a[b+20>>2]|0;if((m|0)==0){j=f;N=n;break}else{b=m;d=f;v=n}}}if((N|0)==0){p=o;break}if(j>>>0>=((a[210]|0)-o|0)>>>0){p=o;break}v=N;d=a[212]|0;if(v>>>0>>0){ke();return 0}b=v+o|0;c=b;if(v>>>0>=b>>>0){ke();return 0}n=a[N+24>>2]|0;f=a[N+12>>2]|0;do{if((f|0)==(N|0)){m=N+20|0;r=a[m>>2]|0;if((r|0)==0){u=N+16|0;E=a[u>>2]|0;if((E|0)==0){L=0;break}else{F=E;z=u}}else{F=r;z=m}while(1){m=F+20|0;r=a[m>>2]|0;if((r|0)!=0){F=r;z=m;continue}m=F+16|0;r=a[m>>2]|0;if((r|0)==0){break}else{F=r;z=m}}if(z>>>0>>0){ke();return 0}else{a[z>>2]=0;L=F;break}}else{m=a[N+8>>2]|0;if(m>>>0>>0){ke();return 0}r=m+12|0;if((a[r>>2]|0)!=(N|0)){ke();return 0}u=f+8|0;if((a[u>>2]|0)==(N|0)){a[r>>2]=f;a[u>>2]=m;L=f;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){f=N+28|0;d=1136+(a[f>>2]<<2)|0;do{if((N|0)==(a[d>>2]|0)){a[d>>2]=L;if((L|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}m=n+16|0;if((a[m>>2]|0)==(N|0)){a[m>>2]=L}else{a[n+20>>2]=L}if((L|0)==0){break e}}}while(0);if(L>>>0<(a[212]|0)>>>0){ke();return 0}a[L+24>>2]=n;f=a[N+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+16>>2]=f;a[f+24>>2]=L;break}}}while(0);f=a[N+20>>2]|0;if((f|0)==0){break}if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+20>>2]=f;a[f+24>>2]=L;break}}}while(0);do{if(j>>>0<16){n=j+o|0;a[N+4>>2]=n|3;f=v+(n+4)|0;a[f>>2]=a[f>>2]|1}else{a[N+4>>2]=o|3;a[v+(o|4)>>2]=j|1;a[v+(j+o)>>2]=j;f=j>>>3;if(j>>>0<256){n=f<<1;d=872+(n<<2)|0;m=a[208]|0;u=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){H=r;D=f;break}ke();return 0}}while(0);a[D>>2]=c;a[H+12>>2]=c;a[v+(o+8)>>2]=H;a[v+(o+12)>>2]=d;break}n=b;u=j>>>8;do{if((u|0)==0){U=0}else{if(j>>>0>16777215){U=31;break}m=(u+1048320|0)>>>16&8;f=u<>>16&4;E=f<>>16&2;l=14-(r|m|f)+(E<>>15)|0;U=j>>>((l+7|0)>>>0)&1|l<<1}}while(0);u=1136+(U<<2)|0;a[v+(o+28)>>2]=U;a[v+(o+20)>>2]=0;a[v+(o+16)>>2]=0;d=a[209]|0;l=1<>2]=n;a[v+(o+24)>>2]=u;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}if((U|0)==31){q=0}else{q=25-(U>>>1)|0}l=j<>2]|0;while(1){if((a[d+4>>2]&-8|0)==(j|0)){break}Y=d+16+(l>>>31<<2)|0;u=a[Y>>2]|0;if((u|0)==0){K=262;break}else{l=l<<1;d=u}}if((K|0)==262){if(Y>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Y>>2]=n;a[v+(o+24)>>2]=d;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}}l=d+8|0;u=a[l>>2]|0;f=a[212]|0;if(d>>>0>>0){ke();return 0}if(u>>>0>>0){ke();return 0}else{a[u+12>>2]=n;a[l>>2]=n;a[v+(o+8)>>2]=u;a[v+(o+12)>>2]=d;a[v+(o+24)>>2]=0;break}}}while(0);v=N+8|0;if((v|0)==0){p=o;break}else{h=v}return h|0}}while(0);N=a[210]|0;if(p>>>0<=N>>>0){Y=N-p|0;j=a[213]|0;if(Y>>>0>15){q=j;a[213]=q+p;a[210]=Y;a[q+(p+4)>>2]=Y|1;a[q+N>>2]=Y;a[j+4>>2]=p|3}else{a[210]=0;a[213]=0;a[j+4>>2]=N|3;Y=j+(N+4)|0;a[Y>>2]=a[Y>>2]|1}h=j+8|0;return h|0}j=a[211]|0;if(p>>>0>>0){Y=j-p|0;a[211]=Y;j=a[214]|0;N=j;a[214]=N+p;a[N+(p+4)>>2]=Y|1;a[j+4>>2]=p|3;h=j+8|0;return h|0}do{if((a[200]|0)==0){j=we(8)|0;if((j-1&j|0)==0){a[202]=j;a[201]=j;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);j=p+48|0;Y=a[202]|0;N=p+47|0;q=Y+N|0;U=-Y|0;Y=q&U;if(Y>>>0<=p>>>0){h=0;return h|0}H=a[318]|0;do{if((H|0)!=0){D=a[316]|0;L=D+Y|0;if(L>>>0<=D>>>0|L>>>0>H>>>0){h=0}else{break}return h|0}}while(0);e:do{if((a[319]&4|0)==0){H=a[214]|0;t:do{if((H|0)==0){K=292}else{L=H;D=1280;while(1){V=D|0;F=a[V>>2]|0;if(F>>>0<=L>>>0){W=D+4|0;if((F+(a[W>>2]|0)|0)>>>0>L>>>0){break}}F=a[D+8>>2]|0;if((F|0)==0){K=292;break t}else{D=F}}if((D|0)==0){K=292;break}L=q-(a[211]|0)&U;if(L>>>0>=2147483647){X=0;break}d=Ge(L|0)|0;n=(d|0)==((a[V>>2]|0)+(a[W>>2]|0)|0);Z=n?d:-1;G=n?L:0;Q=d;J=L;K=301}}while(0);do{if((K|0)==292){H=Ge(0)|0;if((H|0)==-1){X=0;break}o=H;L=a[201]|0;d=L-1|0;if((d&o|0)==0){$=Y}else{$=Y-o+(d+o&-L)|0}L=a[316]|0;o=L+$|0;if(!($>>>0>p>>>0&$>>>0<2147483647)){X=0;break}d=a[318]|0;if((d|0)!=0){if(o>>>0<=L>>>0|o>>>0>d>>>0){X=0;break}}d=Ge($|0)|0;o=(d|0)==(H|0);Z=o?H:-1;G=o?$:0;Q=d;J=$;K=301}}while(0);t:do{if((K|0)==301){d=-J|0;if((Z|0)!=-1){ee=G;te=Z;K=312;break e}do{if((Q|0)!=-1&J>>>0<2147483647&J>>>0>>0){o=a[202]|0;H=N-J+o&-o;if(H>>>0>=2147483647){re=J;break}if((Ge(H|0)|0)==-1){Ge(d|0)|0;X=G;break t}else{re=H+J|0;break}}else{re=J}}while(0);if((Q|0)==-1){X=G}else{ee=re;te=Q;K=312;break e}}}while(0);a[319]=a[319]|4;ne=X;K=309}else{ne=0;K=309}}while(0);do{if((K|0)==309){if(Y>>>0>=2147483647){break}X=Ge(Y|0)|0;Q=Ge(0)|0;if(!((Q|0)!=-1&(X|0)!=-1&X>>>0>>0)){break}re=Q-X|0;Q=re>>>0>(p+40|0)>>>0;G=Q?X:-1;if((G|0)!=-1){ee=Q?re:ne;te=G;K=312}}}while(0);do{if((K|0)==312){ne=(a[316]|0)+ee|0;a[316]=ne;if(ne>>>0>(a[317]|0)>>>0){a[317]=ne}ne=a[214]|0;e:do{if((ne|0)==0){Y=a[212]|0;if((Y|0)==0|te>>>0>>0){a[212]=te}a[320]=te;a[321]=ee;a[323]=0;a[217]=a[200];a[216]=-1;Y=0;do{G=Y<<1;re=872+(G<<2)|0;a[872+(G+3<<2)>>2]=re;a[872+(G+2<<2)>>2]=re;Y=Y+1|0}while(Y>>>0<32);Y=te+8|0;if((Y&7|0)==0){ie=0}else{ie=-Y&7}Y=ee-40-ie|0;a[214]=te+ie;a[211]=Y;a[te+(ie+4)>>2]=Y|1;a[te+(ee-36)>>2]=40;a[215]=a[204]}else{Y=1280;while(1){ae=a[Y>>2]|0;oe=Y+4|0;se=a[oe>>2]|0;if((te|0)==(ae+se|0)){K=324;break}re=a[Y+8>>2]|0;if((re|0)==0){break}else{Y=re}}do{if((K|0)==324){if((a[Y+12>>2]&8|0)!=0){break}re=ne;if(!(re>>>0>=ae>>>0&re>>>0>>0)){break}a[oe>>2]=se+ee;re=a[214]|0;G=(a[211]|0)+ee|0;Q=re;X=re+8|0;if((X&7|0)==0){fe=0}else{fe=-X&7}X=G-fe|0;a[214]=Q+fe;a[211]=X;a[Q+(fe+4)>>2]=X|1;a[Q+(G+4)>>2]=40;a[215]=a[204];break e}}while(0);if(te>>>0<(a[212]|0)>>>0){a[212]=te}Y=te+ee|0;G=1280;while(1){ue=G|0;if((a[ue>>2]|0)==(Y|0)){K=334;break}Q=a[G+8>>2]|0;if((Q|0)==0){break}else{G=Q}}do{if((K|0)==334){if((a[G+12>>2]&8|0)!=0){break}a[ue>>2]=te;Y=G+4|0;a[Y>>2]=(a[Y>>2]|0)+ee;Y=te+8|0;if((Y&7|0)==0){ce=0}else{ce=-Y&7}Y=te+(ee+8)|0;if((Y&7|0)==0){le=0}else{le=-Y&7}Y=te+(le+ee)|0;Q=Y;X=ce+p|0;re=te+X|0;J=re;N=Y-(te+ce)-p|0;a[te+(ce+4)>>2]=p|3;do{if((Q|0)==(a[214]|0)){j=(a[211]|0)+N|0;a[211]=j;a[214]=J;a[te+(X+4)>>2]=j|1}else{if((Q|0)==(a[213]|0)){j=(a[210]|0)+N|0;a[210]=j;a[213]=J;a[te+(X+4)>>2]=j|1;a[te+(j+X)>>2]=j;break}j=ee+4|0;Z=a[te+(j+le)>>2]|0;if((Z&3|0)==1){$=Z&-8;W=Z>>>3;t:do{if(Z>>>0<256){V=a[te+((le|8)+ee)>>2]|0;U=a[te+(ee+12+le)>>2]|0;q=872+(W<<1<<2)|0;do{if((V|0)!=(q|0)){if(V>>>0<(a[212]|0)>>>0){ke();return 0}if((a[V+12>>2]|0)==(Q|0)){break}ke();return 0}}while(0);if((U|0)==(V|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke();return 0}d=U+8|0;if((a[d>>2]|0)==(Q|0)){de=d;break}ke();return 0}}while(0);a[V+12>>2]=U;a[de>>2]=V}else{q=Y;d=a[te+((le|24)+ee)>>2]|0;D=a[te+(ee+12+le)>>2]|0;do{if((D|0)==(q|0)){H=le|16;o=te+(j+H)|0;L=a[o>>2]|0;if((L|0)==0){n=te+(H+ee)|0;H=a[n>>2]|0;if((H|0)==0){he=0;break}else{pe=H;be=n}}else{pe=L;be=o}while(1){o=pe+20|0;L=a[o>>2]|0;if((L|0)!=0){pe=L;be=o;continue}o=pe+16|0;L=a[o>>2]|0;if((L|0)==0){break}else{pe=L;be=o}}if(be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[be>>2]=0;he=pe;break}}else{o=a[te+((le|8)+ee)>>2]|0;if(o>>>0<(a[212]|0)>>>0){ke();return 0}L=o+12|0;if((a[L>>2]|0)!=(q|0)){ke();return 0}n=D+8|0;if((a[n>>2]|0)==(q|0)){a[L>>2]=D;a[n>>2]=o;he=D;break}else{ke();return 0}}}while(0);if((d|0)==0){break}D=te+(ee+28+le)|0;V=1136+(a[D>>2]<<2)|0;do{if((q|0)==(a[V>>2]|0)){a[V>>2]=he;if((he|0)!=0){break}a[209]=a[209]&~(1<>2]);break t}else{if(d>>>0<(a[212]|0)>>>0){ke();return 0}U=d+16|0;if((a[U>>2]|0)==(q|0)){a[U>>2]=he}else{a[d+20>>2]=he}if((he|0)==0){break t}}}while(0);if(he>>>0<(a[212]|0)>>>0){ke();return 0}a[he+24>>2]=d;q=le|16;D=a[te+(q+ee)>>2]|0;do{if((D|0)!=0){if(D>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+16>>2]=D;a[D+24>>2]=he;break}}}while(0);D=a[te+(j+q)>>2]|0;if((D|0)==0){break}if(D>>>0<(a[212]|0)>>>0){ke();return 0}else{a[he+20>>2]=D;a[D+24>>2]=he;break}}}while(0);ve=te+(($|le)+ee)|0;me=$+N|0}else{ve=Q;me=N}j=ve+4|0;a[j>>2]=a[j>>2]&-2;a[te+(X+4)>>2]=me|1;a[te+(me+X)>>2]=me;j=me>>>3;if(me>>>0<256){W=j<<1;Z=872+(W<<2)|0;D=a[208]|0;d=1<>2]|0;if(V>>>0>=(a[212]|0)>>>0){ge=V;ye=j;break}ke();return 0}}while(0);a[ye>>2]=J;a[ge+12>>2]=J;a[te+(X+8)>>2]=ge;a[te+(X+12)>>2]=Z;break}W=re;d=me>>>8;do{if((d|0)==0){_e=0}else{if(me>>>0>16777215){_e=31;break}D=(d+1048320|0)>>>16&8;$=d<>>16&4;V=$<>>16&2;U=14-(j|D|$)+(V<<$>>>15)|0;_e=me>>>((U+7|0)>>>0)&1|U<<1}}while(0);d=1136+(_e<<2)|0;a[te+(X+28)>>2]=_e;a[te+(X+20)>>2]=0;a[te+(X+16)>>2]=0;Z=a[209]|0;U=1<<_e;if((Z&U|0)==0){a[209]=Z|U;a[d>>2]=W;a[te+(X+24)>>2]=d;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}if((_e|0)==31){Se=0}else{Se=25-(_e>>>1)|0}U=me<>2]|0;while(1){if((a[Z+4>>2]&-8|0)==(me|0)){break}xe=Z+16+(U>>>31<<2)|0;d=a[xe>>2]|0;if((d|0)==0){K=407;break}else{U=U<<1;Z=d}}if((K|0)==407){if(xe>>>0<(a[212]|0)>>>0){ke();return 0}else{a[xe>>2]=W;a[te+(X+24)>>2]=Z;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}}U=Z+8|0;d=a[U>>2]|0;$=a[212]|0;if(Z>>>0<$>>>0){ke();return 0}if(d>>>0<$>>>0){ke();return 0}else{a[d+12>>2]=W;a[U>>2]=W;a[te+(X+8)>>2]=d;a[te+(X+12)>>2]=Z;a[te+(X+24)>>2]=0;break}}}while(0);h=te+(ce|8)|0;return h|0}}while(0);G=ne;X=1280;while(1){Ae=a[X>>2]|0;if(Ae>>>0<=G>>>0){Me=a[X+4>>2]|0;Ee=Ae+Me|0;if(Ee>>>0>G>>>0){break}}X=a[X+8>>2]|0}X=Ae+(Me-39)|0;if((X&7|0)==0){Te=0}else{Te=-X&7}X=Ae+(Me-47+Te)|0;re=X>>>0<(ne+16|0)>>>0?G:X;X=re+8|0;J=te+8|0;if((J&7|0)==0){Ie=0}else{Ie=-J&7}J=ee-40-Ie|0;a[214]=te+Ie;a[211]=J;a[te+(Ie+4)>>2]=J|1;a[te+(ee-36)>>2]=40;a[215]=a[204];a[re+4>>2]=27;a[X>>2]=a[320];a[X+4>>2]=a[1284>>2];a[X+8>>2]=a[1288>>2];a[X+12>>2]=a[1292>>2];a[320]=te;a[321]=ee;a[323]=0;a[322]=X;X=re+28|0;a[X>>2]=7;if((re+32|0)>>>0>>0){J=X;while(1){X=J+4|0;a[X>>2]=7;if((J+8|0)>>>0>>0){J=X}else{break}}}if((re|0)==(G|0)){break}J=re-ne|0;X=G+(J+4)|0;a[X>>2]=a[X>>2]&-2;a[ne+4>>2]=J|1;a[G+J>>2]=J;X=J>>>3;if(J>>>0<256){N=X<<1;Q=872+(N<<2)|0;Y=a[208]|0;d=1<>2]|0;if(U>>>0>=(a[212]|0)>>>0){Pe=U;Oe=X;break}ke();return 0}}while(0);a[Oe>>2]=ne;a[Pe+12>>2]=ne;a[ne+8>>2]=Pe;a[ne+12>>2]=Q;break}N=ne;d=J>>>8;do{if((d|0)==0){Re=0}else{if(J>>>0>16777215){Re=31;break}Y=(d+1048320|0)>>>16&8;G=d<>>16&4;X=G<>>16&2;U=14-(re|Y|G)+(X<>>15)|0;Re=J>>>((U+7|0)>>>0)&1|U<<1}}while(0);d=1136+(Re<<2)|0;a[ne+28>>2]=Re;a[ne+20>>2]=0;a[ne+16>>2]=0;Q=a[209]|0;U=1<>2]=N;a[ne+24>>2]=d;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}if((Re|0)==31){Ce=0}else{Ce=25-(Re>>>1)|0}U=J<>2]|0;while(1){if((a[Q+4>>2]&-8|0)==(J|0)){break}Be=Q+16+(U>>>31<<2)|0;d=a[Be>>2]|0;if((d|0)==0){K=442;break}else{U=U<<1;Q=d}}if((K|0)==442){if(Be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Be>>2]=N;a[ne+24>>2]=Q;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}}U=Q+8|0;J=a[U>>2]|0;d=a[212]|0;if(Q>>>0>>0){ke();return 0}if(J>>>0>>0){ke();return 0}else{a[J+12>>2]=N;a[U>>2]=N;a[ne+8>>2]=J;a[ne+12>>2]=Q;a[ne+24>>2]=0;break}}}while(0);ne=a[211]|0;if(ne>>>0<=p>>>0){break}J=ne-p|0;a[211]=J;ne=a[214]|0;U=ne;a[214]=U+p;a[U+(p+4)>>2]=J|1;a[ne+4>>2]=p|3;h=ne+8|0;return h|0}}while(0);a[(Je()|0)>>2]=12;h=0;return h|0}function Kt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0;if((e|0)==0){return}t=e-8|0;r=t;n=a[212]|0;if(t>>>0>>0){ke()}i=a[e-4>>2]|0;o=i&3;if((o|0)==1){ke()}s=i&-8;f=e+(s-8)|0;u=f;e:do{if((i&1|0)==0){c=a[t>>2]|0;if((o|0)==0){return}l=-8-c|0;d=e+l|0;h=d;p=c+s|0;if(d>>>0>>0){ke()}if((h|0)==(a[213]|0)){b=e+(s-4)|0;if((a[b>>2]&3|0)!=3){v=h;m=p;break}a[210]=p;a[b>>2]=a[b>>2]&-2;a[e+(l+4)>>2]=p|1;a[f>>2]=p;return}b=c>>>3;if(c>>>0<256){c=a[e+(l+8)>>2]|0;g=a[e+(l+12)>>2]|0;y=872+(b<<1<<2)|0;do{if((c|0)!=(y|0)){if(c>>>0>>0){ke()}if((a[c+12>>2]|0)==(h|0)){break}ke()}}while(0);if((g|0)==(c|0)){a[208]=a[208]&~(1<>>0>>0){ke()}_=g+8|0;if((a[_>>2]|0)==(h|0)){w=_;break}ke()}}while(0);a[c+12>>2]=g;a[w>>2]=c;v=h;m=p;break}y=d;b=a[e+(l+24)>>2]|0;_=a[e+(l+12)>>2]|0;do{if((_|0)==(y|0)){S=e+(l+20)|0;k=a[S>>2]|0;if((k|0)==0){x=e+(l+16)|0;A=a[x>>2]|0;if((A|0)==0){M=0;break}else{E=A;T=x}}else{E=k;T=S}while(1){S=E+20|0;k=a[S>>2]|0;if((k|0)!=0){E=k;T=S;continue}S=E+16|0;k=a[S>>2]|0;if((k|0)==0){break}else{E=k;T=S}}if(T>>>0>>0){ke()}else{a[T>>2]=0;M=E;break}}else{S=a[e+(l+8)>>2]|0;if(S>>>0>>0){ke()}k=S+12|0;if((a[k>>2]|0)!=(y|0)){ke()}x=_+8|0;if((a[x>>2]|0)==(y|0)){a[k>>2]=_;a[x>>2]=S;M=_;break}else{ke()}}}while(0);if((b|0)==0){v=h;m=p;break}_=e+(l+28)|0;d=1136+(a[_>>2]<<2)|0;do{if((y|0)==(a[d>>2]|0)){a[d>>2]=M;if((M|0)!=0){break}a[209]=a[209]&~(1<>2]);v=h;m=p;break e}else{if(b>>>0<(a[212]|0)>>>0){ke()}c=b+16|0;if((a[c>>2]|0)==(y|0)){a[c>>2]=M}else{a[b+20>>2]=M}if((M|0)==0){v=h;m=p;break e}}}while(0);if(M>>>0<(a[212]|0)>>>0){ke()}a[M+24>>2]=b;y=a[e+(l+16)>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+16>>2]=y;a[y+24>>2]=M;break}}}while(0);y=a[e+(l+20)>>2]|0;if((y|0)==0){v=h;m=p;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+20>>2]=y;a[y+24>>2]=M;v=h;m=p;break}}else{v=r;m=s}}while(0);r=v;if(r>>>0>=f>>>0){ke()}M=e+(s-4)|0;n=a[M>>2]|0;if((n&1|0)==0){ke()}do{if((n&2|0)==0){if((u|0)==(a[214]|0)){E=(a[211]|0)+m|0;a[211]=E;a[214]=v;a[v+4>>2]=E|1;if((v|0)==(a[213]|0)){a[213]=0;a[210]=0}if(E>>>0<=(a[215]|0)>>>0){return}Qt(0)|0;return}if((u|0)==(a[213]|0)){E=(a[210]|0)+m|0;a[210]=E;a[213]=v;a[v+4>>2]=E|1;a[r+E>>2]=E;return}E=(n&-8)+m|0;T=n>>>3;e:do{if(n>>>0<256){w=a[e+s>>2]|0;o=a[e+(s|4)>>2]|0;t=872+(T<<1<<2)|0;do{if((w|0)!=(t|0)){if(w>>>0<(a[212]|0)>>>0){ke()}if((a[w+12>>2]|0)==(u|0)){break}ke()}}while(0);if((o|0)==(w|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke()}i=o+8|0;if((a[i>>2]|0)==(u|0)){I=i;break}ke()}}while(0);a[w+12>>2]=o;a[I>>2]=w}else{t=f;i=a[e+(s+16)>>2]|0;y=a[e+(s|4)>>2]|0;do{if((y|0)==(t|0)){b=e+(s+12)|0;_=a[b>>2]|0;if((_|0)==0){d=e+(s+8)|0;c=a[d>>2]|0;if((c|0)==0){P=0;break}else{O=c;R=d}}else{O=_;R=b}while(1){b=O+20|0;_=a[b>>2]|0;if((_|0)!=0){O=_;R=b;continue}b=O+16|0;_=a[b>>2]|0;if((_|0)==0){break}else{O=_;R=b}}if(R>>>0<(a[212]|0)>>>0){ke()}else{a[R>>2]=0;P=O;break}}else{b=a[e+s>>2]|0;if(b>>>0<(a[212]|0)>>>0){ke()}_=b+12|0;if((a[_>>2]|0)!=(t|0)){ke()}d=y+8|0;if((a[d>>2]|0)==(t|0)){a[_>>2]=y;a[d>>2]=b;P=y;break}else{ke()}}}while(0);if((i|0)==0){break}y=e+(s+20)|0;w=1136+(a[y>>2]<<2)|0;do{if((t|0)==(a[w>>2]|0)){a[w>>2]=P;if((P|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(i>>>0<(a[212]|0)>>>0){ke()}o=i+16|0;if((a[o>>2]|0)==(t|0)){a[o>>2]=P}else{a[i+20>>2]=P}if((P|0)==0){break e}}}while(0);if(P>>>0<(a[212]|0)>>>0){ke()}a[P+24>>2]=i;t=a[e+(s+8)>>2]|0;do{if((t|0)!=0){if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+16>>2]=t;a[t+24>>2]=P;break}}}while(0);t=a[e+(s+12)>>2]|0;if((t|0)==0){break}if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+20>>2]=t;a[t+24>>2]=P;break}}}while(0);a[v+4>>2]=E|1;a[r+E>>2]=E;if((v|0)!=(a[213]|0)){C=E;break}a[210]=E;return}else{a[M>>2]=n&-2;a[v+4>>2]=m|1;a[r+m>>2]=m;C=m}}while(0);m=C>>>3;if(C>>>0<256){r=m<<1;n=872+(r<<2)|0;M=a[208]|0;P=1<>2]|0;if(s>>>0>=(a[212]|0)>>>0){B=s;j=m;break}ke()}}while(0);a[j>>2]=v;a[B+12>>2]=v;a[v+8>>2]=B;a[v+12>>2]=n;return}n=v;B=C>>>8;do{if((B|0)==0){N=0}else{if(C>>>0>16777215){N=31;break}j=(B+1048320|0)>>>16&8;r=B<>>16&4;M=r<>>16&2;m=14-(P|j|r)+(M<>>15)|0;N=C>>>((m+7|0)>>>0)&1|m<<1}}while(0);B=1136+(N<<2)|0;a[v+28>>2]=N;a[v+20>>2]=0;a[v+16>>2]=0;m=a[209]|0;r=1<>2]=n;a[v+24>>2]=B;a[v+12>>2]=v;a[v+8>>2]=v}else{if((N|0)==31){L=0}else{L=25-(N>>>1)|0}M=C<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(C|0)){break}F=j+16+(M>>>31<<2)|0;P=a[F>>2]|0;if((P|0)==0){z=621;break}else{M=M<<1;j=P}}if((z|0)==621){if(F>>>0<(a[212]|0)>>>0){ke()}else{a[F>>2]=n;a[v+24>>2]=j;a[v+12>>2]=v;a[v+8>>2]=v;break}}M=j+8|0;E=a[M>>2]|0;P=a[212]|0;if(j>>>0

>>0){ke()}if(E>>>0

>>0){ke()}else{a[E+12>>2]=n;a[M>>2]=n;a[v+8>>2]=E;a[v+12>>2]=j;a[v+24>>2]=0;break}}}while(0);v=(a[216]|0)-1|0;a[216]=v;if((v|0)==0){H=1288}else{return}while(1){v=a[H>>2]|0;if((v|0)==0){break}else{H=v+8|0}}a[216]=-1;return}function Vt(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((e|0)==0){r=0}else{n=oe(t,e)|0;if((t|e)>>>0<=65535){r=n;break}r=((n>>>0)/(e>>>0)|0|0)==(t|0)?n:-1}}while(0);t=Yt(r)|0;if((t|0)==0){return t|0}if((a[t-4>>2]&3|0)==0){return t|0}en(t|0,0,r|0);return t|0}function Wt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0;if((e|0)==0){r=Yt(t)|0;return r|0}if(t>>>0>4294967231){a[(Je()|0)>>2]=12;r=0;return r|0}if(t>>>0<11){n=16}else{n=t+11&-8}i=Jt(e-8|0,n)|0;if((i|0)!=0){r=i+8|0;return r|0}i=Yt(t)|0;if((i|0)==0){r=0;return r|0}n=a[e-4>>2]|0;o=(n&-8)-((n&3|0)==0?8:4)|0;n=o>>>0>>0?o:t;$r(i|0,e|0,n)|0;Kt(e);r=i;return r|0}function Xt(e,t){e=e|0;t=t|0;var r=0;if((e|0)==0){return 0}if(t>>>0>4294967231){a[(Je()|0)>>2]=12;return 0}if(t>>>0<11){r=16}else{r=t+11&-8}t=e-8|0;return((Jt(t,r)|0)==(t|0)?e:0)|0}function Zt(e,t){e=e|0;t=t|0;var r=0;if(e>>>0<9){r=Yt(t)|0;return r|0}else{r=Gt(e,t)|0;return r|0}return 0}function Gt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0;r=e>>>0<16?16:e;if((r-1&r|0)==0){n=r}else{e=16;while(1){if(e>>>0>>0){e=e<<1}else{n=e;break}}}if((-64-n|0)>>>0<=t>>>0){a[(Je()|0)>>2]=12;i=0;return i|0}if(t>>>0<11){o=16}else{o=t+11&-8}t=Yt(n+12+o|0)|0;if((t|0)==0){i=0;return i|0}e=t-8|0;r=e;s=n-1|0;do{if((t&s|0)==0){f=r}else{u=t+s&-n;c=u-8|0;l=e;if((c-l|0)>>>0>15){d=c}else{d=u+(n-8)|0}u=d;c=d-l|0;l=t-4|0;h=a[l>>2]|0;p=(h&-8)-c|0;if((h&3|0)==0){a[d>>2]=(a[e>>2]|0)+c;a[d+4>>2]=p;f=u;break}else{h=d+4|0;a[h>>2]=p|a[h>>2]&1|2;h=d+(p+4)|0;a[h>>2]=a[h>>2]|1;a[l>>2]=c|a[l>>2]&1|2;l=t+(c-4)|0;a[l>>2]=a[l>>2]|1;vr(r,c);f=u;break}}}while(0);r=f+4|0;t=a[r>>2]|0;do{if((t&3|0)!=0){d=t&-8;if(d>>>0<=(o+16|0)>>>0){break}e=d-o|0;n=f;a[r>>2]=o|t&1|2;a[n+(o|4)>>2]=e|3;s=n+(d|4)|0;a[s>>2]=a[s>>2]|1;vr(n+o|0,e)}}while(0);i=f+8|0;return i|0}function Qt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if(e>>>0>=4294967232){r=0;return r|0}t=a[214]|0;if((t|0)==0){r=0;return r|0}n=a[211]|0;do{if(n>>>0>(e+40|0)>>>0){i=a[202]|0;o=oe((((-40-e-1+n+i|0)>>>0)/(i>>>0)|0)-1|0,i)|0;s=t;f=1280;while(1){u=a[f>>2]|0;if(u>>>0<=s>>>0){if((u+(a[f+4>>2]|0)|0)>>>0>s>>>0){c=f;break}}u=a[f+8>>2]|0;if((u|0)==0){c=0;break}else{f=u}}if((a[c+12>>2]&8|0)!=0){break}f=Ge(0)|0;s=c+4|0;if((f|0)!=((a[c>>2]|0)+(a[s>>2]|0)|0)){break}u=Ge(-(o>>>0>2147483646?-2147483648-i|0:o)|0)|0;l=Ge(0)|0;if(!((u|0)!=-1&l>>>0>>0)){break}u=f-l|0;if((f|0)==(l|0)){break}a[s>>2]=(a[s>>2]|0)-u;a[316]=(a[316]|0)-u;s=a[214]|0;d=(a[211]|0)-u|0;u=s;h=s+8|0;if((h&7|0)==0){p=0}else{p=-h&7}h=d-p|0;a[214]=u+p;a[211]=h;a[u+(p+4)>>2]=h|1;a[u+(d+4)>>2]=40;a[215]=a[204];r=(f|0)!=(l|0)|0;return r|0}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){r=0;return r|0}a[215]=-1;r=0;return r|0}function Jt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0;r=e+4|0;n=a[r>>2]|0;i=n&-8;o=e;s=o+i|0;f=s;u=a[212]|0;if(o>>>0>>0){ke();return 0}c=n&3;if(!((c|0)!=1&o>>>0>>0)){ke();return 0}l=o+(i|4)|0;d=a[l>>2]|0;if((d&1|0)==0){ke();return 0}if((c|0)==0){if(t>>>0<256){h=0;return h|0}do{if(i>>>0>=(t+4|0)>>>0){if((i-t|0)>>>0>a[202]<<1>>>0){break}else{h=e}return h|0}}while(0);h=0;return h|0}if(i>>>0>=t>>>0){c=i-t|0;if(c>>>0<=15){h=e;return h|0}a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|3;a[l>>2]=a[l>>2]|1;vr(o+t|0,c);h=e;return h|0}if((f|0)==(a[214]|0)){c=(a[211]|0)+i|0;if(c>>>0<=t>>>0){h=0;return h|0}l=c-t|0;a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=l|1;a[214]=o+t;a[211]=l;h=e;return h|0}if((f|0)==(a[213]|0)){l=(a[210]|0)+i|0;if(l>>>0>>0){h=0;return h|0}c=l-t|0;if(c>>>0>15){a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|1;a[o+l>>2]=c;p=o+(l+4)|0;a[p>>2]=a[p>>2]&-2;b=o+t|0;v=c}else{a[r>>2]=n&1|l|2;n=o+(l+4)|0;a[n>>2]=a[n>>2]|1;b=0;v=0}a[210]=v;a[213]=b;h=e;return h|0}if((d&2|0)!=0){h=0;return h|0}b=(d&-8)+i|0;if(b>>>0>>0){h=0;return h|0}v=b-t|0;n=d>>>3;e:do{if(d>>>0<256){l=a[o+(i+8)>>2]|0;c=a[o+(i+12)>>2]|0;p=872+(n<<1<<2)|0;do{if((l|0)!=(p|0)){if(l>>>0>>0){ke();return 0}if((a[l+12>>2]|0)==(f|0)){break}ke();return 0}}while(0);if((c|0)==(l|0)){a[208]=a[208]&~(1<>>0>>0){ke();return 0}g=c+8|0;if((a[g>>2]|0)==(f|0)){m=g;break}ke();return 0}}while(0);a[l+12>>2]=c;a[m>>2]=l}else{p=s;g=a[o+(i+24)>>2]|0;y=a[o+(i+12)>>2]|0;do{if((y|0)==(p|0)){w=o+(i+20)|0;_=a[w>>2]|0;if((_|0)==0){S=o+(i+16)|0;k=a[S>>2]|0;if((k|0)==0){x=0;break}else{A=k;M=S}}else{A=_;M=w}while(1){w=A+20|0;_=a[w>>2]|0;if((_|0)!=0){A=_;M=w;continue}w=A+16|0;_=a[w>>2]|0;if((_|0)==0){break}else{A=_;M=w}}if(M>>>0>>0){ke();return 0}else{a[M>>2]=0;x=A;break}}else{w=a[o+(i+8)>>2]|0;if(w>>>0>>0){ke();return 0}_=w+12|0;if((a[_>>2]|0)!=(p|0)){ke();return 0}S=y+8|0;if((a[S>>2]|0)==(p|0)){a[_>>2]=y;a[S>>2]=w;x=y;break}else{ke();return 0}}}while(0);if((g|0)==0){break}y=o+(i+28)|0;l=1136+(a[y>>2]<<2)|0;do{if((p|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(g>>>0<(a[212]|0)>>>0){ke();return 0}c=g+16|0;if((a[c>>2]|0)==(p|0)){a[c>>2]=x}else{a[g+20>>2]=x}if((x|0)==0){break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke();return 0}a[x+24>>2]=g;p=a[o+(i+16)>>2]|0;do{if((p|0)!=0){if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+16>>2]=p;a[p+24>>2]=x;break}}}while(0);p=a[o+(i+20)>>2]|0;if((p|0)==0){break}if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+20>>2]=p;a[p+24>>2]=x;break}}}while(0);if(v>>>0<16){a[r>>2]=b|a[r>>2]&1|2;x=o+(b|4)|0;a[x>>2]=a[x>>2]|1;h=e;return h|0}else{a[r>>2]=a[r>>2]&1|t|2;a[o+(t+4)>>2]=v|3;r=o+(b|4)|0;a[r>>2]=a[r>>2]|1;vr(o+t|0,v);h=e;return h|0}return 0}function $t(){return a[316]|0}function er(){return a[317]|0}function tr(){var e=0;e=a[318]|0;return((e|0)==0?-1:e)|0}function rr(e){e=e|0;var t=0,r=0;if((e|0)==-1){t=0}else{r=a[202]|0;t=e-1+r&-r}a[318]=t;return t|0}function nr(e){e=e|0;var t=0,r=0,n=0;do{if((e|0)==0){t=0}else{r=a[e-4>>2]|0;n=r&3;if((n|0)==1){t=0;break}t=(r&-8)-((n|0)==0?8:4)|0}}while(0);return t|0}function ir(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0;do{if((t|0)==8){n=Yt(r)|0}else{i=t>>>2;if((t&3|0)!=0|(i|0)==0){o=22;return o|0}if((i+1073741823&i|0)!=0){o=22;return o|0}if((-64-t|0)>>>0>>0){o=12;return o|0}else{n=Gt(t>>>0<16?16:t,r)|0;break}}}while(0);if((n|0)==0){o=12;return o|0}a[e>>2]=n;o=0;return o|0}function ar(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+8|0;i=n|0;a[i>>2]=t;t=ur(e,i,3,r)|0;l=n;return t|0}function or(e,t,r){e=e|0;t=t|0;r=r|0;return ur(e,t,0,r)|0}function sr(e){e=e|0;var t=0,r=0,n=0;if((a[200]|0)!=0){t=a[201]|0;r=Zt(t,e)|0;return r|0}n=we(8)|0;if((n-1&n|0)!=0){ke();return 0}a[202]=n;a[201]=n;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=a[201]|0;r=Zt(t,e)|0;return r|0}function fr(e){e=e|0;var t=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);t=a[201]|0;return Zt(t,e-1+t&-t)|0}function ur(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;do{if((a[200]|0)==0){i=we(8)|0;if((i-1&i|0)==0){a[202]=i;a[201]=i;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);i=(e|0)==0;do{if((n|0)==0){if(i){o=Yt(0)|0;return o|0}else{s=e<<2;if(s>>>0<11){f=0;u=16;break}f=0;u=s+11&-8;break}}else{if(i){o=n}else{f=n;u=0;break}return o|0}}while(0);do{if((r&1|0)==0){if(i){c=0;l=0;break}else{d=0;h=0}while(1){n=a[t+(h<<2)>>2]|0;if(n>>>0<11){p=16}else{p=n+11&-8}n=p+d|0;s=h+1|0;if((s|0)==(e|0)){c=0;l=n;break}else{d=n;h=s}}}else{s=a[t>>2]|0;if(s>>>0<11){b=16}else{b=s+11&-8}c=b;l=oe(b,e)|0}}while(0);b=Yt(u-4+l|0)|0;if((b|0)==0){o=0;return o|0}h=b-8|0;d=a[b-4>>2]&-8;if((r&2|0)!=0){en(b|0,0,-4-u+d|0)}if((f|0)==0){a[b+(l-4)>>2]=d-l|3;v=b+l|0;m=l}else{v=f;m=d}a[v>>2]=b;b=e-1|0;e:do{if((b|0)==0){g=h;y=m}else{if((c|0)==0){w=h;_=m;S=0}else{e=h;d=m;f=0;while(1){l=d-c|0;a[e+4>>2]=c|3;u=e+c|0;r=f+1|0;a[v+(r<<2)>>2]=e+(c+8);if((r|0)==(b|0)){g=u;y=l;break e}else{e=u;d=l;f=r}}}while(1){f=a[t+(S<<2)>>2]|0;if(f>>>0<11){k=16}else{k=f+11&-8}f=_-k|0;a[w+4>>2]=k|3;d=w+k|0;e=S+1|0;a[v+(e<<2)>>2]=w+(k+8);if((e|0)==(b|0)){g=d;y=f;break}else{w=d;_=f;S=e}}}}while(0);a[g+4>>2]=y|3;o=v;return o|0}function cr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0;r=e+(t<<2)|0;e:do{if((t|0)!=0){n=e;t:while(1){i=a[n>>2]|0;r:do{if((i|0)==0){o=n+4|0}else{s=i-8|0;f=s;u=i-4|0;c=a[u>>2]&-8;a[n>>2]=0;if(s>>>0<(a[212]|0)>>>0){l=935;break t}s=a[u>>2]|0;if((s&3|0)==1){l=936;break t}d=n+4|0;h=s-8&-8;do{if((d|0)!=(r|0)){if((a[d>>2]|0)!=(i+(h+8)|0)){break}p=(a[i+(h|4)>>2]&-8)+c|0;a[u>>2]=s&1|p|2;b=i+(p-4)|0;a[b>>2]=a[b>>2]|1;a[d>>2]=i;o=d;break r}}while(0);vr(f,c);o=d}}while(0);if((o|0)==(r|0)){break e}else{n=o}}if((l|0)==935){ke();return 0}else if((l|0)==936){ke();return 0}}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){return 0}Qt(0)|0;return 0}function lr(e){e=e|0;var t=0,r=0;if((a[200]|0)!=0){t=Qt(e)|0;return t|0}r=we(8)|0;if((r-1&r|0)!=0){ke();return 0}a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=Qt(e)|0;return t|0}function dr(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0;o=0;s=0;f=0;u=0}else{c=a[211]|0;l=c+40|0;d=1;h=l;p=l;l=1280;while(1){b=a[l>>2]|0;v=b+8|0;if((v&7|0)==0){m=0}else{m=-v&7}v=b+(a[l+4>>2]|0)|0;g=d;y=h;w=p;_=b+m|0;while(1){if(_>>>0>=v>>>0|(_|0)==(t|0)){S=g;k=y;x=w;break}A=a[_+4>>2]|0;if((A|0)==7){S=g;k=y;x=w;break}M=A&-8;E=M+w|0;if((A&3|0)==1){T=M+y|0;I=g+1|0}else{T=y;I=g}A=_+M|0;if(A>>>0>>0){S=I;k=T;x=E;break}else{g=I;y=T;w=E;_=A}}_=a[l+8>>2]|0;if((_|0)==0){break}else{d=S;h=k;p=x;l=_}}l=a[316]|0;r=c;n=x;i=S;o=l-x|0;s=a[317]|0;f=l-k|0;u=k}a[e>>2]=n;a[e+4>>2]=i;i=e+8|0;a[i>>2]=0;a[i+4>>2]=0;a[e+16>>2]=o;a[e+20>>2]=s;a[e+24>>2]=0;a[e+28>>2]=f;a[e+32>>2]=u;a[e+36>>2]=r;return}function hr(){var e=0,t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,g=0,y=0,w=0;e=l;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0}else{o=a[317]|0;s=a[316]|0;f=s-40-(a[211]|0)|0;u=1280;while(1){c=a[u>>2]|0;d=c+8|0;if((d&7|0)==0){h=0}else{h=-d&7}d=c+(a[u+4>>2]|0)|0;p=f;b=c+h|0;while(1){if(b>>>0>=d>>>0|(b|0)==(t|0)){v=p;break}g=a[b+4>>2]|0;if((g|0)==7){v=p;break}y=g&-8;w=p-((g&3|0)==1?y:0)|0;g=b+y|0;if(g>>>0>>0){v=w;break}else{p=w;b=g}}b=a[u+8>>2]|0;if((b|0)==0){r=v;n=s;i=o;break}else{f=v;u=b}}}xe(a[m>>2]|0,520,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;xe(a[m>>2]|0,488,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;xe(a[m>>2]|0,400,(E=l,l=l+8|0,a[E>>2]=r,E)|0)|0;l=e;return}function pr(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((a[200]|0)==0){r=we(8)|0;if((r-1&r|0)==0){a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if((e|0)==(-1|0)){a[204]=t;n=1;return n|0}else if((e|0)==(-2|0)){if((a[201]|0)>>>0>t>>>0){n=0;return n|0}if((t-1&t|0)!=0){n=0;return n|0}a[202]=t;n=1;return n|0}else if((e|0)==(-3|0)){a[203]=t;n=1;return n|0}else{n=0;return n|0}return 0}function br(){return(B=a[328]|0,a[328]=B+0,B)|0}function vr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0;r=e;n=r+t|0;i=n;o=a[e+4>>2]|0;e:do{if((o&1|0)==0){s=a[e>>2]|0;if((o&3|0)==0){return}f=r+(-s|0)|0;u=f;c=s+t|0;l=a[212]|0;if(f>>>0>>0){ke()}if((u|0)==(a[213]|0)){d=r+(t+4)|0;if((a[d>>2]&3|0)!=3){h=u;p=c;break}a[210]=c;a[d>>2]=a[d>>2]&-2;a[r+(4-s)>>2]=c|1;a[n>>2]=c;return}d=s>>>3;if(s>>>0<256){b=a[r+(8-s)>>2]|0;v=a[r+(12-s)>>2]|0;m=872+(d<<1<<2)|0;do{if((b|0)!=(m|0)){if(b>>>0>>0){ke()}if((a[b+12>>2]|0)==(u|0)){break}ke()}}while(0);if((v|0)==(b|0)){a[208]=a[208]&~(1<>>0>>0){ke()}y=v+8|0;if((a[y>>2]|0)==(u|0)){g=y;break}ke()}}while(0);a[b+12>>2]=v;a[g>>2]=b;h=u;p=c;break}m=f;d=a[r+(24-s)>>2]|0;y=a[r+(12-s)>>2]|0;do{if((y|0)==(m|0)){w=16-s|0;_=r+(w+4)|0;S=a[_>>2]|0;if((S|0)==0){k=r+w|0;w=a[k>>2]|0;if((w|0)==0){x=0;break}else{A=w;M=k}}else{A=S;M=_}while(1){_=A+20|0;S=a[_>>2]|0;if((S|0)!=0){A=S;M=_;continue}_=A+16|0;S=a[_>>2]|0;if((S|0)==0){break}else{A=S;M=_}}if(M>>>0>>0){ke()}else{a[M>>2]=0;x=A;break}}else{_=a[r+(8-s)>>2]|0;if(_>>>0>>0){ke()}S=_+12|0;if((a[S>>2]|0)!=(m|0)){ke()}k=y+8|0;if((a[k>>2]|0)==(m|0)){a[S>>2]=y;a[k>>2]=_;x=y;break}else{ke()}}}while(0);if((d|0)==0){h=u;p=c;break}y=r+(28-s)|0;l=1136+(a[y>>2]<<2)|0;do{if((m|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);h=u;p=c;break e}else{if(d>>>0<(a[212]|0)>>>0){ke()}f=d+16|0;if((a[f>>2]|0)==(m|0)){a[f>>2]=x}else{a[d+20>>2]=x}if((x|0)==0){h=u;p=c;break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke()}a[x+24>>2]=d;m=16-s|0;y=a[r+m>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+16>>2]=y;a[y+24>>2]=x;break}}}while(0);y=a[r+(m+4)>>2]|0;if((y|0)==0){h=u;p=c;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+20>>2]=y;a[y+24>>2]=x;h=u;p=c;break}}else{h=e;p=t}}while(0);e=a[212]|0;if(n>>>0>>0){ke()}x=r+(t+4)|0;A=a[x>>2]|0;do{if((A&2|0)==0){if((i|0)==(a[214]|0)){M=(a[211]|0)+p|0;a[211]=M;a[214]=h;a[h+4>>2]=M|1;if((h|0)!=(a[213]|0)){return}a[213]=0;a[210]=0;return}if((i|0)==(a[213]|0)){M=(a[210]|0)+p|0;a[210]=M;a[213]=h;a[h+4>>2]=M|1;a[h+M>>2]=M;return}M=(A&-8)+p|0;g=A>>>3;e:do{if(A>>>0<256){o=a[r+(t+8)>>2]|0;y=a[r+(t+12)>>2]|0;s=872+(g<<1<<2)|0;do{if((o|0)!=(s|0)){if(o>>>0>>0){ke()}if((a[o+12>>2]|0)==(i|0)){break}ke()}}while(0);if((y|0)==(o|0)){a[208]=a[208]&~(1<>>0>>0){ke()}d=y+8|0;if((a[d>>2]|0)==(i|0)){E=d;break}ke()}}while(0);a[o+12>>2]=y;a[E>>2]=o}else{s=n;d=a[r+(t+24)>>2]|0;l=a[r+(t+12)>>2]|0;do{if((l|0)==(s|0)){f=r+(t+20)|0;b=a[f>>2]|0;if((b|0)==0){v=r+(t+16)|0;_=a[v>>2]|0;if((_|0)==0){T=0;break}else{I=_;P=v}}else{I=b;P=f}while(1){f=I+20|0;b=a[f>>2]|0;if((b|0)!=0){I=b;P=f;continue}f=I+16|0;b=a[f>>2]|0;if((b|0)==0){break}else{I=b;P=f}}if(P>>>0>>0){ke()}else{a[P>>2]=0;T=I;break}}else{f=a[r+(t+8)>>2]|0;if(f>>>0>>0){ke()}b=f+12|0;if((a[b>>2]|0)!=(s|0)){ke()}v=l+8|0;if((a[v>>2]|0)==(s|0)){a[b>>2]=l;a[v>>2]=f;T=l;break}else{ke()}}}while(0);if((d|0)==0){break}l=r+(t+28)|0;o=1136+(a[l>>2]<<2)|0;do{if((s|0)==(a[o>>2]|0)){a[o>>2]=T;if((T|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(d>>>0<(a[212]|0)>>>0){ke()}y=d+16|0;if((a[y>>2]|0)==(s|0)){a[y>>2]=T}else{a[d+20>>2]=T}if((T|0)==0){break e}}}while(0);if(T>>>0<(a[212]|0)>>>0){ke()}a[T+24>>2]=d;s=a[r+(t+16)>>2]|0;do{if((s|0)!=0){if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+16>>2]=s;a[s+24>>2]=T;break}}}while(0);s=a[r+(t+20)>>2]|0;if((s|0)==0){break}if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+20>>2]=s;a[s+24>>2]=T;break}}}while(0);a[h+4>>2]=M|1;a[h+M>>2]=M;if((h|0)!=(a[213]|0)){O=M;break}a[210]=M;return}else{a[x>>2]=A&-2;a[h+4>>2]=p|1;a[h+p>>2]=p;O=p}}while(0);p=O>>>3;if(O>>>0<256){A=p<<1;x=872+(A<<2)|0;T=a[208]|0;t=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){R=r;C=p;break}ke()}}while(0);a[C>>2]=h;a[R+12>>2]=h;a[h+8>>2]=R;a[h+12>>2]=x;return}x=h;R=O>>>8;do{if((R|0)==0){B=0}else{if(O>>>0>16777215){B=31;break}C=(R+1048320|0)>>>16&8;A=R<>>16&4;T=A<>>16&2;p=14-(t|C|A)+(T<>>15)|0;B=O>>>((p+7|0)>>>0)&1|p<<1}}while(0);R=1136+(B<<2)|0;a[h+28>>2]=B;a[h+20>>2]=0;a[h+16>>2]=0;p=a[209]|0;A=1<>2]=x;a[h+24>>2]=R;a[h+12>>2]=h;a[h+8>>2]=h;return}if((B|0)==31){j=0}else{j=25-(B>>>1)|0}B=O<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(O|0)){break}N=j+16+(B>>>31<<2)|0;R=a[N>>2]|0;if((R|0)==0){L=1120;break}else{B=B<<1;j=R}}if((L|0)==1120){if(N>>>0<(a[212]|0)>>>0){ke()}a[N>>2]=x;a[h+24>>2]=j;a[h+12>>2]=h;a[h+8>>2]=h;return}N=j+8|0;L=a[N>>2]|0;B=a[212]|0;if(j>>>0>>0){ke()}if(L>>>0>>0){ke()}a[L+12>>2]=x;a[N>>2]=x;a[h+8>>2]=L;a[h+12>>2]=j;a[h+24>>2]=0;return}function mr(e){e=e|0;var t=0,r=0,n=0;t=(e|0)==0?1:e;while(1){r=Yt(t)|0;if((r|0)!=0){n=1164;break}e=(B=a[328]|0,a[328]=B+0,B);if((e|0)==0){break}Cn[e&1]()}if((n|0)==1164){return r|0}r=Fe(4)|0;a[r>>2]=560;_e(r|0,688,6);return 0}function gr(e,t){e=e|0;t=t|0;return mr(e)|0}function yr(e){e=e|0;return}function wr(e){e=e|0;return 360|0}function _r(e){e=e|0;return 448|0}function Sr(e){e=e|0;return(B=a[328]|0,a[328]=e,B)|0}function kr(e){e=e|0;a[e>>2]=560;return}function xr(e){e=e|0;a[e>>2]=592;return}function Ar(e){e=e|0;if((e|0)!=0){Kt(e)}return}function Mr(e,t){e=e|0;t=t|0;Ar(e);return}function Er(e){e=e|0;Ar(e);return}function Tr(e,t){e=e|0;t=t|0;Er(e);return}function Ir(e){e=e|0;Ar(e);return}function Pr(e){e=e|0;Ar(e);return}function Or(e,t,r){e=e|0;t=t|0;r=r|0;return Rr(e,t,r,0,0,0)|0}function Rr(e,t,r,i,o,s){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;s=s|0;var f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,D=0,U=0,q=0,Y=0,K=0,V=0,W=0,X=0,Z=0,G=0,Q=0,J=0,$=0,ee=0,te=0,re=0,ne=0;f=l;if((r|0)==0){u=-1;l=f;return u|0}c=a[44]|0;if((c|0)==0){a[196]=1;a[44]=1;d=1;h=1;p=1190}else{b=a[196]|0;v=a[74]|0;if((v|0)==-1|(b|0)!=0){d=b;h=c;p=1190}else{m=v;g=b;y=c}}if((p|0)==1190){c=(Ye(344)|0)!=0|0;a[74]=c;m=c;g=d;y=h}h=n[r]|0;if(h<<24>>24==45){w=s|2;p=1194}else{d=(m|0)!=0|h<<24>>24==43?s&-2:s;if(h<<24>>24==43){w=d;p=1194}else{_=r;S=d}}if((p|0)==1194){_=r+1|0;S=w}a[198]=0;if((g|0)==0){k=y;p=1198}else{a[50]=-1;a[48]=-1;x=y;A=g;p=1197}while(1){if((p|0)==1197){p=0;if((A|0)==0){k=x;p=1198;continue}else{M=x}}else if((p|0)==1198){p=0;g=a[40]|0;if((n[g]|0)==0){M=k}else{T=g;I=k;break}}a[196]=0;if((M|0)>=(e|0)){p=1200;break}P=t+(M<<2)|0;O=a[P>>2]|0;a[40]=O;if((n[O]|0)==45){R=O+1|0;C=n[R]|0;if(C<<24>>24!=0){p=1232;break}if((Pe(_|0,45)|0)!=0){p=1232;break}}a[40]=824;if((S&2|0)!=0){p=1217;break}if((S&1|0)==0){u=-1;p=1298;break}g=a[48]|0;do{if((g|0)==-1){a[48]=M;B=M;j=0}else{y=a[50]|0;if((y|0)==-1){B=M;j=0;break}w=y-g|0;r=M-y|0;d=(w|0)%(r|0)|0;if((d|0)==0){N=r}else{h=r;s=d;while(1){d=(h|0)%(s|0)|0;if((d|0)==0){N=s;break}else{h=s;s=d}}}s=(M-g|0)/(N|0)|0;do{if((N|0)>0){h=-w|0;if((s|0)>0){L=0}else{F=M;z=y;H=g;D=0;break}do{d=L+y|0;m=t+(d<<2)|0;c=0;b=d;d=a[m>>2]|0;while(1){v=((b|0)<(y|0)?r:h)+b|0;U=t+(v<<2)|0;q=a[U>>2]|0;a[U>>2]=d;a[m>>2]=q;U=c+1|0;if((U|0)<(s|0)){c=U;b=v;d=q}else{break}}L=L+1|0}while((L|0)<(N|0));F=a[44]|0;z=a[50]|0;H=a[48]|0;D=a[196]|0}else{F=M;z=y;H=g;D=0}}while(0);a[48]=F-z+H;a[50]=-1;B=F;j=D}}while(0);g=B+1|0;a[44]=g;x=g;A=j;p=1197}do{if((p|0)==1298){l=f;return u|0}else if((p|0)==1232){j=a[48]|0;A=a[50]|0;if((j|0)!=-1&(A|0)==-1){a[50]=M;Y=n[R]|0;K=M}else{Y=C;K=A}if(Y<<24>>24==0){T=O;I=M;break}a[40]=R;if((n[R]|0)!=45){T=R;I=M;break}if((n[O+2|0]|0)!=0){T=R;I=M;break}A=M+1|0;a[44]=A;a[40]=824;if((K|0)!=-1){x=K-j|0;B=A-K|0;D=(x|0)%(B|0)|0;if((D|0)==0){V=B}else{F=B;H=D;while(1){D=(F|0)%(H|0)|0;if((D|0)==0){V=H;break}else{F=H;H=D}}}H=(A-j|0)/(V|0)|0;do{if((V|0)>0){F=-x|0;if((H|0)>0){W=0}else{X=K;Z=j;G=A;break}do{D=W+K|0;z=t+(D<<2)|0;N=0;L=D;D=a[z>>2]|0;while(1){k=((L|0)<(K|0)?B:F)+L|0;g=t+(k<<2)|0;y=a[g>>2]|0;a[g>>2]=D;a[z>>2]=y;g=N+1|0;if((g|0)<(H|0)){N=g;L=k;D=y}else{break}}W=W+1|0}while((W|0)<(V|0));X=a[50]|0;Z=a[48]|0;G=a[44]|0}else{X=K;Z=j;G=A}}while(0);a[44]=Z-X+G}a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1200){a[40]=824;A=a[50]|0;j=a[48]|0;do{if((A|0)==-1){if((j|0)==-1){break}a[44]=j}else{H=A-j|0;B=M-A|0;x=(H|0)%(B|0)|0;if((x|0)==0){Q=B}else{F=B;D=x;while(1){x=(F|0)%(D|0)|0;if((x|0)==0){Q=D;break}else{F=D;D=x}}}D=(M-j|0)/(Q|0)|0;do{if((Q|0)>0){F=-H|0;if((D|0)>0){J=0}else{$=A;ee=j;te=M;break}do{x=J+A|0;L=t+(x<<2)|0;N=0;z=x;x=a[L>>2]|0;while(1){y=((z|0)<(A|0)?B:F)+z|0;k=t+(y<<2)|0;g=a[k>>2]|0;a[k>>2]=x;a[L>>2]=g;k=N+1|0;if((k|0)<(D|0)){N=k;z=y;x=g}else{break}}J=J+1|0}while((J|0)<(Q|0));$=a[50]|0;ee=a[48]|0;te=a[44]|0}else{$=A;ee=j;te=M}}while(0);a[44]=ee-$+te}}while(0);a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1217){a[44]=M+1;a[198]=a[P>>2];u=1;l=f;return u|0}}while(0);P=(i|0)!=0;e:do{if(P){if((T|0)==(a[t+(I<<2)>>2]|0)){re=T;break}M=n[T]|0;do{if(M<<24>>24==45){a[40]=T+1;ne=0}else{if((S&4|0)==0){re=T;break e}if(M<<24>>24==58){ne=0;break}ne=(Pe(_|0,M<<24>>24|0)|0)!=0|0}}while(0);M=Fr(t,_,i,o,ne)|0;if((M|0)==-1){re=a[40]|0;break}a[40]=824;u=M;l=f;return u|0}else{re=T}}while(0);T=re+1|0;a[40]=T;ne=n[re]|0;re=ne<<24>>24;if((ne<<24>>24|0)==45){if((n[T]|0)==0){p=1260}}else if((ne<<24>>24|0)==58){p=1263}else{p=1260}do{if((p|0)==1260){S=Pe(_|0,re|0)|0;if((S|0)==0){if(ne<<24>>24!=45){p=1263;break}if((n[T]|0)==0){u=-1}else{break}l=f;return u|0}I=n[S+1|0]|0;if(P&ne<<24>>24==87&I<<24>>24==59){do{if((n[T]|0)==0){M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[40]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}}while(0);M=Fr(t,_,i,o,0)|0;a[40]=824;u=M;l=f;return u|0}if(I<<24>>24!=58){if((n[T]|0)!=0){u=re;l=f;return u|0}a[44]=(a[44]|0)+1;u=re;l=f;return u|0}a[198]=0;do{if((n[T]|0)==0){if((n[S+2|0]|0)==58){break}M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[198]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}else{a[198]=T}}while(0);a[40]=824;a[44]=(a[44]|0)+1;u=re;l=f;return u|0}}while(0);do{if((p|0)==1263){if((n[T]|0)!=0){break}a[44]=(a[44]|0)+1}}while(0);do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(272,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=63;l=f;return u|0}function Cr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,1)|0}function Br(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,5)|0}function jr(e){e=e|0;return mr(e)|0}function Nr(e,t){e=e|0;t=t|0;return jr(e)|0}function Lr(){var e=0;e=Fe(4)|0;a[e>>2]=560;_e(e|0,688,6)}function Fr(e,t,r,i,o){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;var s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0;s=l;f=a[40]|0;u=a[44]|0;c=u+1|0;a[44]=c;d=Pe(f|0,61)|0;if((d|0)==0){h=tn(f|0)|0;p=0}else{h=d-f|0;p=d+1|0}d=a[r>>2]|0;e:do{if((d|0)!=0){t:do{if((o|0)!=0&(h|0)==1){b=0;v=d;while(1){if((n[f]|0)==(n[v]|0)){if((tn(v|0)|0)==1){m=b;break t}}b=b+1|0;v=a[r+(b<<4)>>2]|0;if((v|0)==0){break e}}}else{v=0;b=-1;g=d;while(1){if((ge(f|0,g|0,h|0)|0)==0){if((tn(g|0)|0)==(h|0)){m=v;break t}if((b|0)==-1){y=v}else{break}}else{y=b}w=v+1|0;_=a[r+(w<<4)>>2]|0;if((_|0)==0){m=y;break t}else{v=w;b=y;g=_}}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(304,(E=l,l=l+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}}while(0);if((m|0)==-1){break}g=r+(m<<4)+4|0;b=a[g>>2]|0;v=(p|0)==0;if(!((b|0)!=0|v)){do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(208,(E=l,l=l+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){k=a[r+(m<<4)+12>>2]|0}else{k=0}a[42]=k;S=(n[t]|0)==58?58:63;l=s;return S|0}do{if((b-1|0)>>>0<2){if(!v){a[198]=p;break}if((b|0)!=1){break}a[44]=u+2;a[198]=a[e+(c<<2)>>2]}}while(0);if(!((a[g>>2]|0)==1&(a[198]|0)==0)){if((i|0)!=0){a[i>>2]=m}b=a[r+(m<<4)+8>>2]|0;v=a[r+(m<<4)+12>>2]|0;if((b|0)==0){S=v;l=s;return S|0}a[b>>2]=v;S=0;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(8,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){x=a[r+(m<<4)+12>>2]|0}else{x=0}a[42]=x;a[44]=(a[44]|0)-1;S=(n[t]|0)==58?58:63;l=s;return S|0}}while(0);if((o|0)!=0){a[44]=u;S=-1;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(248,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}function zr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Dr(e,n|0);l=r;return}function Hr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Ur(e,n|0);l=r;return}function Dr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;n=a[(Je()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,432,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((e|0)!=0){i=a[m>>2]|0;Ke(i|0,e|0,t|0)|0;t=a[m>>2]|0;Ce(472,2,1,t|0)|0}t=a[m>>2]|0;e=Se(n|0)|0;xe(t|0,384,(E=l,l=l+8|0,a[E>>2]=e,E)|0)|0;l=r;return}function Ur(e,t){e=e|0;t=t|0;var r=0,n=0;r=l;n=a[w>>2]|0;xe(a[m>>2]|0,376,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((e|0)!=0){n=a[m>>2]|0;Ke(n|0,e|0,t|0)|0}Oe(10,a[m>>2]|0)|0;l=r;return}function qr(e,t){e=e|0;t=t|0;var r=0,i=0,o=0,s=0,f=0,u=0,l=0,d=0,h=0,p=0,b=0,v=0.0,m=0,g=0,y=0,w=0,_=0.0,S=0,k=0,x=0,A=0.0,M=0.0,E=0,T=0,I=0,P=0.0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0.0,H=0,D=0,U=0.0,q=0.0,Y=0.0;r=e;while(1){i=r+1|0;if((ze(n[r]|0)|0)==0){break}else{r=i}}o=n[r]|0;if((o<<24>>24|0)==45){s=i;f=1}else if((o<<24>>24|0)==43){s=i;f=0}else{s=r;f=0}r=-1;i=0;o=s;while(1){u=n[o]|0;if(((u<<24>>24)-48|0)>>>0<10){l=r}else{if(u<<24>>24!=46|(r|0)>-1){break}else{l=i}}r=l;i=i+1|0;o=o+1|0}l=o+(-i|0)|0;s=(r|0)<0;d=((s^1)<<31>>31)+i|0;h=(d|0)>18;p=(h?-18:-d|0)+(s?i:r)|0;r=h?18:d;do{if((r|0)==0){b=e;v=0.0}else{if((r|0)>9){d=l;h=r;i=0;while(1){s=n[d]|0;m=d+1|0;if(s<<24>>24==46){g=n[m]|0;y=d+2|0}else{g=s;y=m}w=(i*10|0)-48+(g<<24>>24)|0;m=h-1|0;if((m|0)>9){d=y;h=m;i=w}else{break}}_=+(w|0)*1.0e9;S=9;k=y;x=1393}else{if((r|0)>0){_=0.0;S=r;k=l;x=1393}else{A=0.0;M=0.0}}if((x|0)==1393){i=k;h=S;d=0;while(1){m=n[i]|0;s=i+1|0;if(m<<24>>24==46){E=n[s]|0;T=i+2|0}else{E=m;T=s}I=(d*10|0)-48+(E<<24>>24)|0;s=h-1|0;if((s|0)>0){i=T;h=s;d=I}else{break}}A=+(I|0);M=_}P=M+A;do{if((u<<24>>24|0)==69|(u<<24>>24|0)==101){d=o+1|0;h=n[d]|0;if((h<<24>>24|0)==43){O=o+2|0;R=0}else if((h<<24>>24|0)==45){O=o+2|0;R=1}else{O=d;R=0}d=n[O]|0;if(((d<<24>>24)-48|0)>>>0<10){C=O;B=0;j=d}else{N=0;L=O;F=R;break}while(1){d=(B*10|0)-48+(j<<24>>24)|0;h=C+1|0;i=n[h]|0;if(((i<<24>>24)-48|0)>>>0<10){C=h;B=d;j=i}else{N=d;L=h;F=R;break}}}else{N=0;L=o;F=0}}while(0);h=p+((F|0)==0?N:-N|0)|0;d=(h|0)<0?-h|0:h;if((d|0)>511){a[(Je()|0)>>2]=34;z=1.0;H=88;D=511;x=1410}else{if((d|0)==0){U=1.0}else{z=1.0;H=88;D=d;x=1410}}if((x|0)==1410){while(1){x=0;if((D&1|0)==0){q=z}else{q=z*+c[H>>3]}d=D>>1;if((d|0)==0){U=q;break}else{z=q;H=H+8|0;D=d;x=1410}}}if((h|0)>-1){b=L;v=P*U;break}else{b=L;v=P/U;break}}}while(0);if((t|0)!=0){a[t>>2]=b}if((f|0)==0){Y=v;return+Y}Y=-0.0-v;return+Y}function Yr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Kr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Vr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Wr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Xr(e){e=e|0;return+ +qr(e,0)}function Zr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Qr(e,t,i|0)}function Gr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Jr(e,t,i|0)}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=a[(Je()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,336,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((t|0)!=0){i=a[m>>2]|0;Ke(i|0,t|0,r|0)|0;r=a[m>>2]|0;Ce(480,2,1,r|0)|0}r=a[m>>2]|0;t=Se(n|0)|0;xe(r|0,392,(E=l,l=l+8|0,a[E>>2]=t,E)|0)|0;Ne(e|0)}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;n=a[w>>2]|0;xe(a[m>>2]|0,440,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((t|0)!=0){n=a[m>>2]|0;Ke(n|0,t|0,r|0)|0}Oe(10,a[m>>2]|0)|0;Ne(e|0)}function $r(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;i=e|0;if((e&3)==(t&3)){while(e&3){if((r|0)==0)return i|0;n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){a[e>>2]=a[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function en(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,o=0,s=0;i=e+r|0;if((r|0)>=20){t=t&255;r=e&3;o=t|t<<8|t<<16|t<<24;s=i&~3;if(r){r=e+4-r|0;while((e|0)<(r|0)){n[e]=t;e=e+1|0}}while((e|0)<(s|0)){a[e>>2]=o;e=e+4|0}}while((e|0)<(i|0)){n[e]=t;e=e+1|0}}function tn(e){e=e|0;var t=0;t=e;while(n[t]|0){t=t+1|0}return t-e|0}function rn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=e+r>>>0;return(N=t+n+(i>>>0>>0|0)>>>0,i|0)|0}function nn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=t-n>>>0;i=t-n-(r>>>0>e>>>0|0)>>>0;return(N=i,e-r>>>0|0)|0}function an(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t<>>32-r;return e<>>r;return e>>>r|(t&(1<>>r-32|0}function sn(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t>>r;return e>>>r|(t&(1<>r-32|0}function fn(e){e=e|0;var t=0;t=n[v+(e>>>24)|0]|0;if((t|0)<8)return t|0;t=n[v+(e>>16&255)|0]|0;if((t|0)<8)return t+8|0;t=n[v+(e>>8&255)|0]|0;if((t|0)<8)return t+16|0;return(n[v+(e&255)|0]|0)+24|0}function un(e){e=e|0;var t=0;t=n[b+(e&255)|0]|0;if((t|0)<8)return t|0;t=n[b+(e>>8&255)|0]|0;if((t|0)<8)return t+8|0;t=n[b+(e>>16&255)|0]|0;if((t|0)<8)return t+16|0;return(n[b+(e>>>24)|0]|0)+24|0}function cn(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,a=0;r=e&65535;n=t&65535;i=oe(n,r)|0;a=e>>>16;e=(i>>>16)+(oe(n,a)|0)|0;n=t>>>16;t=oe(n,r)|0;return(N=(e>>>16)+(oe(n,a)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|i&65535|0)|0}function ln(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,s=0,f=0;i=t>>31|((t|0)<0?-1:0)<<1;a=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=n>>31|((n|0)<0?-1:0)<<1;s=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;f=nn(i^e,a^t,i,a)|0;t=N;e=o^i;i=s^a;a=nn((vn(f,t,nn(o^r,s^n,o,s)|0,N,0)|0)^e,N^i,e,i)|0;return(N=N,a)|0}function dn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,d=0;i=l;l=l+8|0;o=i|0;s=t>>31|((t|0)<0?-1:0)<<1;f=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;u=n>>31|((n|0)<0?-1:0)<<1;c=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;d=nn(s^e,f^t,s,f)|0;t=N;e=nn(u^r,c^n,u,c)|0;vn(d,t,e,N,o)|0;e=nn(a[o>>2]^s,a[o+4>>2]^f,s,f)|0;f=N;l=i;return(N=f,e)|0}function hn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0;i=e;e=r;r=cn(i,e)|0;a=N;return(N=(oe(t,e)|0)+(oe(n,i)|0)+a|a&0,r|0|0)|0}function pn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=vn(e,t,r,n,0)|0;return(N=N,i)|0}function bn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0;i=l;l=l+8|0;o=i|0;vn(e,t,r,n,o)|0;l=i;return(N=a[o+4>>2]|0,a[o>>2]|0)|0}function vn(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,L=0,F=0;o=e;s=t;f=s;u=r;c=n;l=c;if((f|0)==0){d=(i|0)!=0;if((l|0)==0){if(d){a[i>>2]=(o>>>0)%(u>>>0);a[i+4>>2]=0}h=0;p=(o>>>0)/(u>>>0)>>>0;return(N=h,p)|0}else{if(!d){h=0;p=0;return(N=h,p)|0}a[i>>2]=e|0;a[i+4>>2]=t&0;h=0;p=0;return(N=h,p)|0}}d=(l|0)==0;do{if((u|0)==0){if(d){if((i|0)!=0){a[i>>2]=(f>>>0)%(u>>>0);a[i+4>>2]=0}h=0;p=(f>>>0)/(u>>>0)>>>0;return(N=h,p)|0}if((o|0)==0){if((i|0)!=0){a[i>>2]=0;a[i+4>>2]=(f>>>0)%(l>>>0)}h=0;p=(f>>>0)/(l>>>0)>>>0;return(N=h,p)|0}b=l-1|0;if((b&l|0)==0){if((i|0)!=0){a[i>>2]=e|0;a[i+4>>2]=b&f|t&0}h=0;p=f>>>((un(l|0)|0)>>>0);return(N=h,p)|0}b=(fn(l|0)|0)-(fn(f|0)|0)|0;if(b>>>0<=30){v=b+1|0;m=31-b|0;g=v;y=f<>>(v>>>0);w=f>>>(v>>>0);_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(N=h,p)|0}else{if(!d){m=(fn(l|0)|0)-(fn(f|0)|0)|0;if(m>>>0<=31){v=m+1|0;b=31-m|0;k=m-31>>31;g=v;y=o>>>(v>>>0)&k|f<>>(v>>>0)&k;_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(N=h,p)|0}b=u-1|0;if((b&u|0)!=0){k=(fn(u|0)|0)+33-(fn(f|0)|0)|0;v=64-k|0;m=32-k|0;x=m>>31;A=k-32|0;M=A>>31;g=k;y=m-1>>31&f>>>(A>>>0)|(f<>>(k>>>0))&M;w=M&f>>>(k>>>0);_=o<>>(A>>>0))&x|o<>31;break}if((i|0)!=0){a[i>>2]=b&o;a[i+4>>2]=0}if((u|0)==1){h=s|t&0;p=e|0|0;return(N=h,p)|0}else{b=un(u|0)|0;h=f>>>(b>>>0)|0;p=f<<32-b|o>>>(b>>>0)|0;return(N=h,p)|0}}}while(0);if((g|0)==0){E=S;T=_;I=w;P=y;O=0;R=0}else{o=r|0|0;r=c|n&0;n=rn(o,r,-1,-1)|0;c=N;f=S;S=_;_=w;w=y;y=g;g=0;while(1){C=S>>>31|f<<1;B=g|S<<1;u=w<<1|f>>>31|0;e=w>>>31|_<<1|0;nn(n,c,u,e)|0;t=N;s=t>>31|((t|0)<0?-1:0)<<1;j=s&1;L=nn(u,e,s&o,(((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1)&r)|0;F=N;t=y-1|0;if((t|0)==0){break}else{f=C;S=B;_=F;w=L;y=t;g=j}}E=C;T=B;I=F;P=L;O=0;R=j}j=T;T=0;if((i|0)!=0){a[i>>2]=P;a[i+4>>2]=I}h=(j|0)>>>31|(E|T)<<1|(T<<1|j>>>31)&0|O;p=(j<<1|0>>>31)&-2|R;return(N=h,p)|0}function mn(e,t){e=e|0;t=t|0;In[e&15](t|0)}function gn(e,t,r){e=e|0;t=t|0;r=r|0;Pn[e&15](t|0,r|0)}function yn(e,t){e=e|0;t=t|0;return On[e&7](t|0)|0}function wn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;Rn[e&15](t|0,r|0,n|0)}function _n(e){e=e|0;Cn[e&1]()}function Sn(e,t,r){e=e|0;t=t|0;r=r|0;return Bn[e&1](t|0,r|0)|0}function kn(e){e=e|0;se(0)}function xn(e,t){e=e|0;t=t|0;se(1)}function An(e){e=e|0;se(2);return 0}function Mn(e,t,r){e=e|0;t=t|0;r=r|0;se(3)}function En(){se(4)}function Tn(e,t){e=e|0;t=t|0;se(5);return 0}var In=[kn,kn,xr,kn,Pr,kn,yr,kn,kr,kn,Ir,kn,kn,kn,kn,kn];var Pn=[xn,xn,zr,xn,Dr,xn,Hr,xn,Ur,xn,xn,xn,xn,xn,xn,xn];var On=[An,An,wr,An,_r,An,An,An];var Rn=[Mn,Mn,Jr,Mn,Qr,Mn,Zr,Mn,Gr,Mn,Mn,Mn,Mn,Mn,Mn,Mn];var Cn=[En,En];var Bn=[Tn,Tn];return{_crypto_scrypt:Et,_strlen:tn,_free:Kt,_realloc:Wt,_memset:en,_malloc:Yt,_memcpy:$r,_calloc:Vt,runPostSets:wt,stackAlloc:it,stackSave:at,stackRestore:ot,setThrew:st,setTempRet0:ct,setTempRet1:lt,setTempRet2:dt,setTempRet3:ht,setTempRet4:pt,setTempRet5:bt,setTempRet6:vt,setTempRet7:mt,setTempRet8:gt,setTempRet9:yt,dynCall_vi:mn,dynCall_vii:gn,dynCall_ii:yn,dynCall_viii:wn,dynCall_v:_n,dynCall_iii:Sn}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:wa,assert:w,asmPrintInt:function(e,t){s.print("int "+e+","+t)},asmPrintFloat:function(e,t){s.print("float "+e+","+t)},min:Xc,invoke_vi:function(e,t){try{s.dynCall_vi(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_vii:function(e,t,r){try{s.dynCall_vii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_ii:function(e,t){try{return s.dynCall_ii(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_viii:function(e,t,r,n){try{s.dynCall_viii(e,t,r,n)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_v:function(e){try{s.dynCall_v(e)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_iii:function(e,t,r){try{return s.dynCall_iii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},_strncmp:function(e,t,r){for(var n=0;na?1:-1;n++}return 0},_llvm_va_end:aa(),_sysconf:function(e){switch(e){case 8:return 4096;case 54:case 56:case 21:case 61:case 63:case 22:case 67:case 23:case 24:case 25:case 26:case 27:case 69:case 28:case 101:case 70:case 71:case 29:case 30:case 199:case 75:case 76:case 32:case 43:case 44:case 80:case 46:case 47:case 45:case 48:case 49:case 42:case 82:case 33:case 7:case 108:case 109:case 107:case 112:case 119:case 121:return 200809;case 13:case 104:case 94:case 95:case 34:case 35:case 77:case 81:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:case 94:case 95:case 110:case 111:case 113:case 114:case 115:case 116:case 117:case 118:case 120:case 40:case 16:case 79:case 19:return-1;case 92:case 93:case 5:case 72:case 6:case 74:case 92:case 93:case 96:case 97:case 98:case 99:case 102:case 103:case 105:return 1;case 38:case 66:case 50:case 51:case 4:return 1024;case 15:case 64:case 41:return 32;case 55:case 37:case 17:return 2147483647;case 18:case 1:return 47839;case 59:case 57:return 99;case 68:case 58:return 2048;case 0:return 2097152;case 3:return 65536;case 14:return 32768;case 73:return 32767;case 39:return 16384;case 60:return 1e3;case 106:return 700;case 52:return 256;case 62:return 255;case 2:return 100;case 65:return 64;case 36:return 20;case 100:return 16;case 20:return 6;case 53:return 4;case 10:return 1}return M(N.A),-1},___cxa_throw:rc,_strerror:zc,_abort:function(){s.abort()},_fprintf:mc,_llvm_eh_exception:U,___cxa_free_exception:sc,_fflush:aa(),___buildEnvironment:wc,__reallyNegative:jc,_strchr:function(e,t){e--;do{var r=A[++e];if(r==t)return e}while(r);return 0},_fputc:Bc,___setErrNo:M,_fwrite:hc,_send:fc,_write:gc,_exit:function(e){Ac(e)},___cxa_find_matching_catch:function(e,t){-1==e&&(e=B[U.m>>2]),-1==t&&(t=B[U.m+4>>2]);var r=Array.prototype.slice.call(arguments,2);0!=t&&!pc(t)&&0==B[B[t>>2]-8>>2]&&(e=B[e>>2]);for(var n=0;n=e},__formatString:kc,___resumeException:function(e){0==B[U.m>>2]&&(B[U.m>>2]=e),g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")},_llvm_uadd_with_overflow_i32:function(e,t){return e>>>=0,t>>>=0,0|(V.setTempRet0(4294967295>>0)},___cxa_does_inherit:qc,_getenv:xc,_vfprintf:function(e,t,r){return mc(e,t,B[r>>2])},___cxa_begin_catch:function(e){return oc.ta--,e},__ZSt18uncaught_exceptionv:oc,_pwrite:function(e,t,r,n){if(!(e=R[e]))return M(N.$),-1;try{return Ib(e,A,t,r,n)}catch(e){return Zb(e),-1}},___cxa_call_unexpected:function(e){s.P("Unexpected exception thrown, this is not properly supported - aborting"),za=l,g(e)},_sbrk:nc,_strerror_r:yc,___errno_location:function(){return rb},___gxx_personality_v0:aa(),___cxa_is_number_type:pc,_time:function(e){var t=Math.floor(Date.now()/1e3);return e&&(B[e>>2]=t),t},__exit:Ac,___cxa_end_catch:uc,STACKTOP:u,STACK_MAX:Ta,tempDoublePtr:qb,ABORT:za,cttz_i8:Wc,ctlz_i8:Vc,NaN:NaN,Infinity:1/0,_stderr:nb,__ZTVN10__cxxabiv120__si_class_type_infoE:ob,__ZTVN10__cxxabiv117__class_type_infoE:pb,___progname:k},I);s._crypto_scrypt=V._crypto_scrypt;var ic=s._strlen=V._strlen,tc=s._free=V._free;s._realloc=V._realloc;var tb=s._memset=V._memset,Oa=s._malloc=V._malloc,sb=s._memcpy=V._memcpy;s._calloc=V._calloc;var mb=s.runPostSets=V.runPostSets;s.dynCall_vi=V.dynCall_vi,s.dynCall_vii=V.dynCall_vii,s.dynCall_ii=V.dynCall_ii,s.dynCall_viii=V.dynCall_viii,s.dynCall_v=V.dynCall_v,s.dynCall_iii=V.dynCall_iii;var qa=function(e){return V.stackAlloc(e)},ja=function(){return V.stackSave()},ka=function(e){V.stackRestore(e)},lc;function X(e,t){e!=m&&("number"==typeof e?this.p(e):t==m&&"string"!=typeof e?this.k(e,256):this.k(e,t))}function Yc(){return new X(m)}function Zc(e,t){var r=$c[e.charCodeAt(t)];return r==m?-1:r}function ad(e){var t=Yc();return t.D(e),t}function Y(e,t){this.h=0|e,this.j=0|t}Y.Ca={},Y.D=function(e){if(-128<=e&&128>e){var t=Y.Ca[e];if(t)return t}return t=new Y(0|e,0>e?-1:0),-128<=e&&128>e&&(Y.Ca[e]=t),t},Y.p=function(e){return isNaN(e)||!isFinite(e)?Y.ZERO:e<=-Y.Ea?Y.MIN_VALUE:e+1>=Y.Ea?Y.MAX_VALUE:0>e?Y.p(-e).i():new Y(e%Y.B|0,e/Y.B|0)},Y.v=function(e,t){return new Y(e,t)},Y.k=function(e,t){0==e.length&&g(Error("number format error: empty string"));var r=t||10;if((2>r||36o?(o=Y.p(Math.pow(r,o)),i=i.multiply(o).add(Y.p(s))):i=(i=i.multiply(n)).add(Y.p(s))}return i},Y.ea=65536,Y.Od=16777216,Y.B=Y.ea*Y.ea,Y.Pd=Y.B/2,Y.Qd=Y.B*Y.ea,Y.eb=Y.B*Y.B,Y.Ea=Y.eb/2,Y.ZERO=Y.D(0),Y.ONE=Y.D(1),Y.Da=Y.D(-1),Y.MAX_VALUE=Y.v(-1,2147483647),Y.MIN_VALUE=Y.v(0,-2147483648),Y.cb=Y.D(16777216),q=Y.prototype,q.Z=function(){return this.j*Y.B+this.ob()},q.toString=function(e){if((2>(e=e||10)||36a.length;)a="0"+a;n=""+a+n}},q.ob=function(){return 0<=this.h?this.h:Y.B+this.h},q.G=function(){return 0==this.j&&0==this.h},q.n=function(){return 0>this.j},q.Pa=function(){return 1==(1&this.h)},q.o=function(e){return this.j==e.j&&this.h==e.h},q.Ra=function(){return 0>this.ja(Y.cb)},q.qb=function(e){return 0>>16,n=65535&this.j,i=this.h>>>16,a=e.j>>>16,o=65535&e.j,s=e.h>>>16;return e=0+((t=(65535&this.h)+(65535&e.h)+0)>>>16),i=0+((e+=i+s)>>>16),n=(n=0+((i+=n+o)>>>16))+(r+a)&65535,Y.v((65535&e)<<16|65535&t,n<<16|65535&i)},q.R=function(e){return this.add(e.i())},q.multiply=function(e){if(this.G()||e.G())return Y.ZERO;if(this.o(Y.MIN_VALUE))return e.Pa()?Y.MIN_VALUE:Y.ZERO;if(e.o(Y.MIN_VALUE))return this.Pa()?Y.MIN_VALUE:Y.ZERO;if(this.n())return e.n()?this.i().multiply(e.i()):this.i().multiply(e).i();if(e.n())return this.multiply(e.i()).i();if(this.Ra()&&e.Ra())return Y.p(this.Z()*e.Z());var t,r,n,i,a=this.j>>>16,o=65535&this.j,s=this.h>>>16,f=65535&this.h,u=e.j>>>16,c=65535&e.j,l=e.h>>>16;return n=0+((i=0+f*(e=65535&e.h))>>>16),r=0+((n+=s*e)>>>16),r+=(n=(65535&n)+f*l)>>>16,n&=65535,t=0+((r+=o*e)>>>16),t+=(r=(65535&r)+s*l)>>>16,r&=65535,t+=(r+=f*c)>>>16,r&=65535,t=t+(a*e+o*l+s*c+f*u)&65535,Y.v(n<<16|65535&i,t<<16|r)},q.F=function(e){if(e.G()&&g(Error("division by zero")),this.G())return Y.ZERO;if(this.o(Y.MIN_VALUE)){if(e.o(Y.ONE)||e.o(Y.Da))return Y.MIN_VALUE;if(e.o(Y.MIN_VALUE))return Y.ONE;if((n=this.Db().F(e).shiftLeft(1)).o(Y.ZERO))return e.n()?Y.ONE:Y.Da;var t=this.R(e.multiply(n));return n.add(t.F(e))}if(e.o(Y.MIN_VALUE))return Y.ZERO;if(this.n())return e.n()?this.i().F(e.i()):this.i().F(e).i();if(e.n())return this.F(e.i()).i();var r=Y.ZERO;for(t=this;t.rb(e);){for(var n=Math.max(1,Math.floor(t.Z()/e.Z())),i=48>=(i=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,i-48),a=Y.p(n),o=a.multiply(e);o.n()||o.qb(t);)n-=i,o=(a=Y.p(n)).multiply(e);a.G()&&(a=Y.ONE),r=r.add(a),t=t.R(o)}return r},q.xb=function(){return Y.v(~this.h,~this.j)},q.shiftLeft=function(e){if(0==(e&=63))return this;var t=this.h;return 32>e?Y.v(t<>>32-e):Y.v(0,t<>>1|e<<31,e>>1)},q=X.prototype,q.ga=function(e,t,r,n){for(var i=0,a=0;0<=--n;){var o=e*this[i++]+t[r]+a;a=Math.floor(o/67108864);t[r++]=67108863&o}return a},q.f=26,q.u=67108863,q.K=67108864,q.bb=Math.pow(2,52),q.Aa=26,q.Ba=0;var $c=[],bd,Z;for(bd=48,Z=0;9>=Z;++Z)$c[bd++]=Z;for(bd=97,Z=10;36>Z;++Z)$c[bd++]=Z;for(bd=65,Z=10;36>Z;++Z)$c[bd++]=Z;q=X.prototype,q.copyTo=function(e){for(var t=this.b-1;0<=t;--t)e[t]=this[t];e.b=this.b,e.c=this.c},q.D=function(e){this.b=1,this.c=0>e?-1:0,0e?this[0]=e+DV:this.b=0},q.k=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.nb(e,t);r=2}this.c=this.b=0;for(var n=e.length,i=p,a=0;0<=--n;){var o=8==r?255&e[n]:Zc(e,n);0>o?"-"==e.charAt(n)&&(i=l):(i=p,0==a?this[this.b++]=o:a+r>this.f?(this[this.b-1]|=(o&(1<>this.f-a):this[this.b-1]|=o<=this.f&&(a-=this.f))}8==r&&0!=(128&e[0])&&(this.c=-1,0>i|s,s=(this[r]&a)<=this.b)t.b=0;else{var n=e%this.f,i=this.f-n,a=(1<>n;for(var o=r+1;o>n;0>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n-=e.c}t.c=0>n?-1:0,-1>n?t[r++]=this.K+n:0=n.b)){var i=this.abs();if(i.b>>16)&&(f=a,u+=16),0!=(a=f>>8)&&(f=a,u+=8),0!=(a=f>>4)&&(f=a,u+=4),0!=(a=f>>2)&&(f=a,u+=2),0!=f>>1&&(u+=1),0<(f=this.f-u)?(n.Qa(f,o),i.Qa(f,r)):(n.copyTo(o),i.copyTo(r)),0!=(i=o[(n=o.b)-1])){a=i*(1<>this.Ba:0),u=this.bb/a,a=(1<s&&X.ZERO.t(r,r)}}}},q.toString=function(e){if(0>this.c)return"-"+this.i().toString(e);if(16==e)e=4;else if(8==e)e=3;else if(2==e)e=1;else if(32==e)e=5;else{if(4!=e)return this.Fb(e);e=2}var t,r=(1<>o)&&(n=l,i="0123456789abcdefghijklmnopqrstuvwxyz".charAt(t));0<=a;)o>(o+=this.f-e)):(t=this[a]>>(o-=e)&r,0>=o&&(o+=this.f,--a)),0this.c?this.i():this},q.U=function(e){if(0!=(t=this.c-e.c))return t;var t,r=this.b;if(0!=(t=r-e.b))return 0>this.c?-t:t;for(;0<=--r;)if(0!=(t=this[r]-e[r]))return t;return 0},X.ZERO=ad(0),X.ONE=ad(1),q=X.prototype,q.nb=function(e,t){this.D(0),t==m&&(t=10);for(var r=this.S(t),n=Math.pow(t,r),i=p,a=0,o=0,s=0;sf?"-"==e.charAt(s)&&0==this.ra()&&(i=l):(o=t*o+f,++a>=r&&(this.Ia(n),this.Ha(o),o=a=0))}0this.c?-1:0>=this.b||1==this.b&&0>=this[0]?0:1},q.Ia=function(e){this[this.b]=this.ga(e-1,this,0,this.b),++this.b,this.C()},q.Ha=function(e){var t=0;if(0!=e){for(;this.b<=t;)this[this.b++]=0;for(this[t]+=e;this[t]>=this.K;)this[t]-=this.K,++t>=this.b&&(this[this.b++]=0),++this[t]}},q.Fb=function(e){if(e==m&&(e=10),0==this.ra()||2>e||36this.c){if(1==this.b)return this[0]-this.K;if(0==this.b)return-1}else{if(1==this.b)return this[0];if(0==this.b)return 0}return(this[1]&(1<<32-this.f)-1)<>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n+=e.c}t.c=0>n?-1:0,0n&&(t[r++]=this.K+n),t.b=r,t.C()};var $={abs:function(e,t){var r=(r=new Y(e,t)).n()?r.i():r;B[qb>>2]=r.h,B[qb+4>>2]=r.j},Ka:function(){$.kb||($.kb=l,$.Xa=new X,$.Xa.k("4294967296",10),$.sa=new X,$.sa.k("18446744073709551616",10),$.xe=new X,$.ye=new X)},me:function(e,t){var r=new X;r.k(t.toString(),10);var n=new X;r.vb(n),(r=new X).k(e.toString(),10);var i=new X;return r.fa(n,i),i},stringify:function(e,t,r){return e=new Y(e,t).toString(),r&&"-"==e[0]&&($.Ka(),(r=new X).k(e,10),e=new X,$.sa.fa(r,e),e=e.toString(10)),e},k:function(e,t,r,n,i){$.Ka();var a=new X;a.k(e,t),(e=new X).k(r,10),(r=new X).k(n,10),i&&0>a.U(X.ZERO)&&(n=new X,a.fa($.sa,n),a=n),n=p,0>a.U(e)?(a=e,n=l):0>2]=a.h,B[qb+4>>2]=a.j,n&&g("range error")}},cd,dd;function lb(e){function t(){if(ab||(ab=l,Va(Xa)),Va(Ya),gb=l,s._main&&kb&&s.callMain(e),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)cb(s.postRun.shift());Va($a)}if(e=e||s.arguments,0e;e++)i.push(0)}w(0==L,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),w(0==Wa.length,"cannot call main when preRun functions remain to be called"),e=e||[],ab||(ab=l,Va(Xa));var r,n=e.length+1,i=[F(J("/bin/this.program"),"i8",Ka)];t();for(var a=0;a>4&15]),t.push("0123456789abcdef"[15&e[r]]);return t.join("")},e.crypto_scrypt=function(e,t,r,a,o,s){var f=new i(s),u=n(e),c=n(t);return function(e,t){if(0!==t)throw{message:"scrypt_raw."+e+" signalled an error"}}("_crypto_scrypt",scrypt_raw._crypto_scrypt(u,e.length,c,t.length,r,0,a,o,f.address,f.length)),function(e){for(var t=0;t=e)&&(n=e-1,console.error("invalid priority: "+a+" must be between 0 and "+n))),t[n].push(r)},n.dequeue=function(e){var r,n=null,a=t.length;for(i=null,r=0;rc.length);e+=1)l>=(s=o[e].timeout)&&(d("removeIdle() destroying obj - now:"+l+" timeout:"+s,"verbose"),c.push(o[e].obj));for(e=0,i=c.length;e0?(d("availableObjects.length="+n,"verbose"),p()):d("removeIdle() all objects removed","verbose")}function p(){u||(u=!0,c=setTimeout(h,i))}function b(){var e=null,n=s.size();if(d("dispense() clients="+n+" available="+o.length,"info"),n>0){for(;o.length>0;){if(d("dispense() - reusing obj","verbose"),e=o[0],t.validate(e.obj))return o.shift(),s.dequeue()(null,e.obj);r.destroy(e.obj)}f1?(t=arguments[0],n=arguments[1]):(t=arguments[0]instanceof Error?arguments[0]:null,n=arguments[0]instanceof Error?null:arguments[0]),t?(f-=1,i&&i(t,n),e.nextTick(function(){b()})):i?i(t,n):r.release(n)})}function m(){var e,r;if(!l&&f0?setTimeout(t,100):o.length!=f?setTimeout(t,100):e&&e()};t()},r.destroyAllNow=function(e){d("force destroying all objects","info");var t=o;o=[];for(var n=t.shift();null!==n&&void 0!==n;)r.destroy(n.obj),n=t.shift();u=!1,clearTimeout(c),e&&e()},r.pooled=function(e,t){return function(){var n=arguments,i=n[n.length-1],a="function"==typeof i;r.acquire(function(t,o){if(t)a&&i(t);else{var s=[o].concat(Array.prototype.slice.call(n,0,a?-1:void 0));s.push(function(){r.release(o),a&&i.apply(null,arguments)}),e.apply(null,s)}},t)}},r.getPoolSize=function(){return f},r.getName=function(){return t.name},r.availableObjectsCount=function(){return o.length},r.waitingClientsCount=function(){return s.size()},m(),r}}).call(this,r(9))},function(e,t,r){(function(t,n,i){var a=r(56),o=r(20).fork,s=r(101),f=r(100).cpus().length,u=u=new s.Pool({name:"scrypt-worker",create:function(e){var r=o(t+"/scrypt-async-worker.js");r.controlledExit=!1,r.on("exit",function(){r.controlledExit||n(u.destroy.bind(u,r))}),e(r)},destroy:function(e){try{e.controlledExit=!0,e.disconnect()}catch(e){}},max:Math.max(2,f-1),min:0,idleTimeoutMillis:15e3,log:!1});e.exports=function(e,t,r,n){var o=a.apply(null,arguments),s=o.callback||function(){};delete o.callback,o.password=o.password.toString("base64"),o.salt=o.salt.toString("base64");new Date;u.acquire(function(e,t){if(e)return u.release(t),s(e);t.once("message",function(e){new Date;u.release(t),e.error&&s(e.error),s(null,new i(e.data,"base64"))}),t.send(o)})}}).call(this,"/",r(37).setImmediate,r(5).Buffer)},function(e,t,r){e.exports={hash:r(102),hashSync:r(99)}},function(e,t,r){var n;e.exports=(n=r(6),r(31),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){var n,i;e.exports=(n=r(6),r(31),n.mode.ECB=((i=n.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),n.mode.ECB)},function(e,t,r){var n,i,a,o,s,f,u;e.exports=(n=r(6),a=(i=n).lib,o=a.Base,s=i.enc,f=s.Utf8,u=i.algo,void(u.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=f.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,s=a.words,u=0;u>>31}var l=(n<<5|n>>>27)+s+f[u];l+=u<20?1518500249+(i&a|~i&o):u<40?1859775393+(i^a^o):u<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=s._createHelper(u),i.HmacSHA1=s._createHmacHelper(u),n.SHA1)},function(e,t,r){var n;e.exports=(n=r(6),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var f=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],f=e[t+1],h=e[t+2],p=e[t+3],b=e[t+4],v=e[t+5],m=e[t+6],g=e[t+7],y=e[t+8],w=e[t+9],_=e[t+10],S=e[t+11],k=e[t+12],x=e[t+13],A=e[t+14],M=e[t+15],E=a[0],T=a[1],I=a[2],P=a[3];T=d(T=d(T=d(T=d(T=l(T=l(T=l(T=l(T=c(T=c(T=c(T=c(T=u(T=u(T=u(T=u(T,I=u(I,P=u(P,E=u(E,T,I,P,o,7,s[0]),T,I,f,12,s[1]),E,T,h,17,s[2]),P,E,p,22,s[3]),I=u(I,P=u(P,E=u(E,T,I,P,b,7,s[4]),T,I,v,12,s[5]),E,T,m,17,s[6]),P,E,g,22,s[7]),I=u(I,P=u(P,E=u(E,T,I,P,y,7,s[8]),T,I,w,12,s[9]),E,T,_,17,s[10]),P,E,S,22,s[11]),I=u(I,P=u(P,E=u(E,T,I,P,k,7,s[12]),T,I,x,12,s[13]),E,T,A,17,s[14]),P,E,M,22,s[15]),I=c(I,P=c(P,E=c(E,T,I,P,f,5,s[16]),T,I,m,9,s[17]),E,T,S,14,s[18]),P,E,o,20,s[19]),I=c(I,P=c(P,E=c(E,T,I,P,v,5,s[20]),T,I,_,9,s[21]),E,T,M,14,s[22]),P,E,b,20,s[23]),I=c(I,P=c(P,E=c(E,T,I,P,w,5,s[24]),T,I,A,9,s[25]),E,T,p,14,s[26]),P,E,y,20,s[27]),I=c(I,P=c(P,E=c(E,T,I,P,x,5,s[28]),T,I,h,9,s[29]),E,T,g,14,s[30]),P,E,k,20,s[31]),I=l(I,P=l(P,E=l(E,T,I,P,v,4,s[32]),T,I,y,11,s[33]),E,T,S,16,s[34]),P,E,A,23,s[35]),I=l(I,P=l(P,E=l(E,T,I,P,f,4,s[36]),T,I,b,11,s[37]),E,T,g,16,s[38]),P,E,_,23,s[39]),I=l(I,P=l(P,E=l(E,T,I,P,x,4,s[40]),T,I,o,11,s[41]),E,T,p,16,s[42]),P,E,m,23,s[43]),I=l(I,P=l(P,E=l(E,T,I,P,w,4,s[44]),T,I,k,11,s[45]),E,T,M,16,s[46]),P,E,h,23,s[47]),I=d(I,P=d(P,E=d(E,T,I,P,o,6,s[48]),T,I,g,10,s[49]),E,T,A,15,s[50]),P,E,v,21,s[51]),I=d(I,P=d(P,E=d(E,T,I,P,k,6,s[52]),T,I,p,10,s[53]),E,T,_,15,s[54]),P,E,f,21,s[55]),I=d(I,P=d(P,E=d(E,T,I,P,y,6,s[56]),T,I,M,10,s[57]),E,T,m,15,s[58]),P,E,x,21,s[59]),I=d(I,P=d(P,E=d(E,T,I,P,b,6,s[60]),T,I,S,10,s[61]),E,T,h,15,s[62]),P,E,w,21,s[63]),a[0]=a[0]+E|0,a[1]=a[1]+T|0,a[2]=a[2]+I|0,a[3]=a[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var a=e.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,u=0;u<4;u++){var c=f[u];f[u]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<>>32-a)+t}function c(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<>>32-a)+t}function d(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(f),t.HmacMD5=a._createHmacHelper(f)}(Math),n.MD5)},function(e,t,r){var n,i,a;e.exports=(n=r(6),a=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var f=n.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-o%4*2;n[i>>>2]|=(s|f)<<24-i%4*8,i++}return a.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},function(e,t,r){var n;e.exports=(n=r(6),r(109),r(108),r(57),r(31),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],f=[],u=[],c=[],l=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,a[p]=r;var b=e[r],v=e[b],m=e[v],g=257*e[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,u[r]=g,g=16843009*m^65537*v^257*b^16843008*r,c[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,d[p]=g<<8|g>>>24,h[p]=g,r?(r=b^e[e[e[m^b]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],b=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o6&&o%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[o/r|0]<<24),a[o]=a[o-r]^s}for(var f=this._invKeySchedule=[],u=0;u>>24]]^l[i[s>>>16&255]]^d[i[s>>>8&255]]^h[i[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,f,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,c,l,d,h,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var f=this._nRounds,u=e[t]^r[0],c=e[t+1]^r[1],l=e[t+2]^r[2],d=e[t+3]^r[3],h=4,p=1;p>>24]^i[c>>>16&255]^a[l>>>8&255]^o[255&d]^r[h++],v=n[c>>>24]^i[l>>>16&255]^a[d>>>8&255]^o[255&u]^r[h++],m=n[l>>>24]^i[d>>>16&255]^a[u>>>8&255]^o[255&c]^r[h++],g=n[d>>>24]^i[u>>>16&255]^a[c>>>8&255]^o[255&l]^r[h++];u=b,c=v,l=m,d=g}b=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&d])^r[h++],v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^r[h++],m=(s[l>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^r[h++],g=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[h++],e[t]=b,e[t+1]=v,e[t+2]=m,e[t+3]=g},keySize:8});e.AES=t._createHelper(b)}(),n.AES)},function(e,t,r){var n;e.exports=(n=r(6),n.enc.Latin1)},function(e,t){},function(e,t,r){(function(n,i){var a;!function(o){"use strict";function s(e,t){if(t=t||{type:"Array"},void 0!==n&&"number"==typeof n.pid)return function(e,t){var n=r(112).randomBytes(e);switch(t.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(e),a=0;a0||e===t?t:t-1}function w(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(f=i.length)<(u=a.length)?f:u,o=0;oa[o]^r?1:-1;return f==u?0:f>u^r?1:-1}function S(e,t,r){return(e=E(e))>=t&&e<=r}function k(e){return"[object Array]"==Object.prototype.toString.call(e)}function x(e,t,r){for(var n,i,a=[0],o=0,s=e.length;or-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function M(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t15&&$(R,l,e),s=!1):h.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=X(c,10,t,h.s)}else{if(e instanceof W)return h.s=e.s,h.e=e.e,h.c=(e=e.c)?e.slice():e,void(R=0);if((s="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;a>=10;a/=10,i++);return h.e=i,h.c=[e],void(R=0)}c=e+""}else{if(!o.test(c=e+""))return n(h,c,s);h.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((i=c.indexOf("."))>-1&&(c=c.replace(".","")),(a=c.search(/e/i))>0?(i<0&&(i=a),i+=+c.slice(a+1),c=c.substring(0,a)):i<0&&(i=c.length),a=0;48===c.charCodeAt(a);a++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(a,u+1))if(u=c.length,s&&D&&u>15&&(e>b||e!==f(e))&&$(R,l,h.s*e),(i=i-a-1)>H)h.c=h.e=null;else if(i=0&&(s=K,K=0,e=e.replace(".",""),u=(l=new W(n)).pow(e.length-h),K=s,l.c=x(M(w(u.c),u.e),10,t),l.e=l.c.length),o=s=(c=x(e,n,t)).length;0==c[--s];c.pop());if(!c[0])return"0";if(h<0?--o:(u.c=c,u.e=o,u.s=i,c=(u=r(u,l,p,b,t)).c,f=u.r,o=u.e),h=c[a=o+p+1],s=t/2,f=f||a<0||null!=c[a+1],f=b<4?(null!=h||f)&&(0==b||b==(u.s<0?3:2)):h>s||h==s&&(4==b||f||6==b&&1&c[a-1]||b==(u.s<0?8:7)),a<1||!c[0])e=f?M("1",-p):"0";else{if(c.length=a,f)for(--t;++c[--a]>t;)c[a]=0,a||(++o,c=[1].concat(c));for(s=c.length;!c[--s];);for(h=0,e="";h<=s;e+=d.charAt(c[h++]));e=M(e,o)}return e}function Z(e,t,r,n){var i,a,o,s,f;if(r=null!=r&&U(r,0,8,n,c)?0|r:N,!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)f=w(e.c),f=19==n||24==n&&o<=L?A(f,o):M(f,o);else if(a=(e=ee(new W(e),t,r)).e,s=(f=w(e.c)).length,19==n||24==n&&(t<=a||a<=L)){for(;ss){if(--t>0)for(f+=".";t--;f+="0");}else if((t+=a-s)>0)for(a+1==s&&(f+=".");t--;f+="0");return e.s<0&&i?"-"+f:f}function G(e,t){var r,n,i=0;for(k(e[0])&&(e=e[0]),r=new W(e[0]);++ir||e!=E(e))&&$(n,(i||"decimal places")+(er?" out of range":" not an integer"),e),!0}function J(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*p-1)>H?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=p,o=t,d=(c=b[l=0])/m[i-o-1]%10|0;else if((l=s((a+1)/p))>=b.length){if(!n)break e;for(;b.length<=l;b.push(0));c=d=0,i=1,o=(a%=p)-p+1}else{for(c=u=b[l],i=1;u>=10;u/=10,i++);d=(o=(a%=p)-p+i)<0?0:c/m[i-o-1]%10|0}if(n=n||t<0||null!=b[l+1]||(o<0?c:c%m[i-o-1]),n=r<4?(d||n)&&(0==r||r==(e.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(a>0?o>0?c/m[i-o]:0:b[l-1])%10&1||r==(e.s<0?8:7)),t<1||!b[0])return b.length=0,n?(t-=e.e+1,b[0]=m[(p-t%p)%p],e.e=-t||0):b[0]=e.e=0,e;if(0==a?(b.length=l,u=1,l--):(b.length=l+1,u=m[p-a],b[l]=o>0?f(c/m[i-o]%m[o])*u:0),n)for(;;){if(0==l){for(a=1,o=b[0];o>=10;o/=10,a++);for(o=b[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,b[0]==h&&(b[0]=1));break}if(b[l]+=u,b[l]!=h)break;b[l--]=0,u=1}for(a=b.length;0===b[--a];b.pop());}e.e>H?e.c=e.e=null:e.er)return null!=(e=i[r++])};return o(t="DECIMAL_PLACES")&&U(e,0,g,2,t)&&(j=0|e),n[t]=j,o(t="ROUNDING_MODE")&&U(e,0,8,2,t)&&(N=0|e),n[t]=N,o(t="EXPONENTIAL_AT")&&(k(e)?U(e[0],-g,0,2,t)&&U(e[1],0,g,2,t)&&(L=0|e[0],F=0|e[1]):U(e,-g,g,2,t)&&(L=-(F=0|(e<0?-e:e)))),n[t]=[L,F],o(t="RANGE")&&(k(e)?U(e[0],-g,-1,2,t)&&U(e[1],1,g,2,t)&&(z=0|e[0],H=0|e[1]):U(e,-g,g,2,t)&&(0|e?z=-(H=0|(e<0?-e:e)):D&&$(2,t+" cannot be zero",e))),n[t]=[z,H],o(t="ERRORS")&&(e===!!e||1===e||0===e?(R=0,U=(D=!!e)?Q:S):D&&$(2,t+u,e)),n[t]=D,o(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?q=!0:D?$(2,"crypto unavailable",e?void 0:crypto):q=!1:q=!1:D&&$(2,t+u,e)),n[t]=q,o(t="MODULO_MODE")&&U(e,0,9,2,t)&&(Y=0|e),n[t]=Y,o(t="POW_PRECISION")&&U(e,0,g,2,t)&&(K=0|e),n[t]=K,o(t="FORMAT")&&("object"==typeof e?V=e:D&&$(2,t+" not an object",e)),n[t]=V,n},W.max=function(){return G(arguments,C.lt)},W.min=function(){return G(arguments,C.gt)},W.random=(i=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,o,u=0,c=[],l=new W(B);if(e=null!=e&&U(e,0,g,14)?0|e:j,a=s(e/p),q)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(c.push(o%1e14),u+=2);u=a/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(a*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(c.push(o%1e14),u+=7);u=a/7}else q=!1,D&&$(14,"crypto unavailable",crypto);if(!q)for(;u=10;o/=10,u++);un?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,c,l,d,b,v,m,g,w,_,S,k,x,A,M,E,T,I=n.s==i.s?1:-1,P=n.c,O=i.c;if(!(P&&P[0]&&O&&O[0]))return new W(n.s&&i.s&&(P?!O||P[0]!=O[0]:O)?P&&0==P[0]||!O?0*I:I/0:NaN);for(w=(g=new W(I)).c=[],I=a+(c=n.e-i.e)+1,s||(s=h,c=y(n.e/p)-y(i.e/p),I=I/p|0),l=0;O[l]==(P[l]||0);l++);if(O[l]>(P[l]||0)&&c--,I<0)w.push(1),d=!0;else{for(A=P.length,E=O.length,l=0,I+=2,(b=f(s/(O[0]+1)))>1&&(O=e(O,b,s),P=e(P,b,s),E=O.length,A=P.length),x=E,S=(_=P.slice(0,E)).length;S=s/2&&M++;do{if(b=0,(u=t(O,_,E,S))<0){if(k=_[0],E!=S&&(k=k*s+(_[1]||0)),(b=f(k/M))>1)for(b>=s&&(b=s-1),m=(v=e(O,b,s)).length,S=_.length;1==t(v,_,m,S);)b--,r(v,E=10;I/=10,l++);ee(g,a+(g.e=l+c*p-1)+1,o,d)}else g.e=c,g.r=+d;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,I=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(P.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(T,"$1").replace(I,"0.$1")),t!=o))return new W(o,i);D&&$(R,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,R=0},C.absoluteValue=C.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},C.ceil=function(){return ee(new W(this),this.e+1,2)},C.comparedTo=C.cmp=function(e,t){return R=1,_(this,new W(e,t))},C.decimalPlaces=C.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-y(this.e/p))*p,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},C.dividedBy=C.div=function(e,t){return R=3,r(this,new W(e,t),j,N)},C.dividedToIntegerBy=C.divToInt=function(e,t){return R=4,r(this,new W(e,t),0,1)},C.equals=C.eq=function(e,t){return R=5,0===_(this,new W(e,t))},C.floor=function(){return ee(new W(this),this.e+1,3)},C.greaterThan=C.gt=function(e,t){return R=6,_(this,new W(e,t))>0},C.greaterThanOrEqualTo=C.gte=function(e,t){return R=7,1===(t=_(this,new W(e,t)))||0===t},C.isFinite=function(){return!!this.c},C.isInteger=C.isInt=function(){return!!this.c&&y(this.e/p)>this.c.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.lessThan=C.lt=function(e,t){return R=8,_(this,new W(e,t))<0},C.lessThanOrEqualTo=C.lte=function(e,t){return R=9,-1===(t=_(this,new W(e,t)))||0===t},C.minus=C.sub=function(e,t){var r,n,i,a,o=this,s=o.s;if(R=10,t=(e=new W(e,t)).s,!s||!t)return new W(NaN);if(s!=t)return e.s=-t,o.plus(e);var f=o.e/p,u=e.e/p,c=o.c,l=e.c;if(!f||!u){if(!c||!l)return c?(e.s=-t,e):new W(l?o:NaN);if(!c[0]||!l[0])return l[0]?(e.s=-t,e):new W(c[0]?o:3==N?-0:0)}if(f=y(f),u=y(u),c=c.slice(),s=f-u){for((a=s<0)?(s=-s,i=c):(u=f,i=l),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=c.length)<(t=l.length))?s:t,s=t=0;t0)for(;t--;c[r++]=0);for(t=h-1;n>s;){if(c[--n]0?(o=a,r=f):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=f.length)<0&&(r=f,f=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+f[t]+i)/h|0,s[t]=h===s[t]?0:s[t]%h;return i&&(s=[i].concat(s),++o),J(e,s,o)},C.precision=C.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(D&&$(13,"argument"+u,e),e!=!!e&&(e=null)),!i)return null;if(t=(r=i.length-1)*p+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},C.round=function(e,t){var r=new W(this);return(null==e||U(e,0,g,15))&&ee(r,~~e+this.e+1,null!=t&&U(t,0,8,15,c)?0|t:N),r},C.shift=function(e){var t=this;return U(e,-b,b,16,"argument")?t.times("1e"+E(e)):new W(t.c&&t.c[0]&&(e<-b||e>b)?t.s*(e<0?0:1/0):t)},C.squareRoot=C.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,f=o.s,u=o.e,c=j+4,l=new W("0.5");if(1!==f||!s||!s[0])return new W(!f||f<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(f=Math.sqrt(+o))||f==1/0?(((t=w(s)).length+u)%2==0&&(t+="0"),f=Math.sqrt(t),u=y((u+1)/2)-(u<0||u%2),n=new W(t=f==1/0?"1e"+u:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new W(f+""),n.c[0])for((f=(u=n.e)+c)<3&&(f=0);;)if(a=n,n=l.times(a.plus(r(o,a,c,1))),w(a.c).slice(0,f)===(t=w(n.c)).slice(0,f)){if(n.e=0;){for(r=0,d=k[i]%w,b=k[i]/w|0,a=i+(o=f);a>i;)r=((u=d*(u=S[--o]%w)+(s=b*u+(c=S[o]/w|0)*d)%w*w+v[a]+r)/g|0)+(s/w|0)+b*c,v[a--]=u%g;v[a]=r}return r?++n:v.splice(0,1),J(e,v,n)},C.toDigits=function(e,t){var r=new W(this);return e=null!=e&&U(e,1,g,18,"precision")?0|e:null,t=null!=t&&U(t,0,8,18,c)?0|t:N,e?ee(r,e,t):r},C.toExponential=function(e,t){return Z(this,null!=e&&U(e,0,g,19)?1+~~e:null,t,19)},C.toFixed=function(e,t){return Z(this,null!=e&&U(e,0,g,20)?~~e+this.e+1:null,t,20)},C.toFormat=function(e,t){var r=Z(this,null!=e&&U(e,0,g,21)?~~e+this.e+1:null,t,21);if(this.c){var n,i=r.split("."),a=+V.groupSize,o=+V.secondaryGroupSize,s=V.groupSeparator,f=i[0],u=i[1],c=this.s<0,l=c?f.slice(1):f,d=l.length;if(o&&(n=a,a=o,o=n,d-=n),a>0&&d>0){for(n=d%a||a,f=l.substr(0,n);n0&&(f+=s+l.slice(n)),c&&(f="-"+f)}r=u?f+V.decimalSeparator+((o=+V.fractionGroupSize)?u.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+V.fractionGroupSeparator):u):f}return r},C.toFraction=function(e){var t,n,i,a,o,s,f,u,c,l=D,d=this,h=d.c,b=new W(B),m=n=new W(B),g=f=new W(B);if(null!=e&&(D=!1,s=new W(e),D=l,(l=s.isInt())&&!s.lt(B)||(D&&$(22,"max denominator "+(l?"out of range":"not an integer"),e),e=!l&&s.c&&ee(s,s.e+1,1).gte(B)?s:null)),!h)return d.toString();for(c=w(h),a=b.e=c.length-d.e-1,b.c[0]=v[(o=a%p)<0?p+o:o],e=!e||s.cmp(b)>0?a>0?b:m:s,o=H,H=1/0,s=new W(c),f.c[0]=0;u=r(s,b,0,1),1!=(i=n.plus(u.times(g))).cmp(e);)n=g,g=i,m=f.plus(u.times(i=m)),f=i,b=s.minus(u.times(i=b)),s=i;return i=r(e.minus(n),g,0,1),f=f.plus(i.times(m)),n=n.plus(i.times(g)),f.s=m.s=d.s,t=r(m,g,a*=2,N).minus(d).abs().cmp(r(f,n,a,N).minus(d).abs())<1?[m.toString(),g.toString()]:[f.toString(),n.toString()],H=o,t},C.toNumber=function(){return+this},C.toPower=C.pow=function(e,t){var r,n,i,a=f(e<0?-e:+e),o=this;if(null!=t&&(R=23,t=new W(t)),!U(e,-b,b,23,"exponent")&&(!isFinite(e)||a>b&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+o,e),new W(t?r%t:r);for(t?e>1&&o.gt(B)&&o.isInt()&&t.gt(B)&&t.isInt()?o=o.mod(t):(i=t,t=null):K&&(r=s(K/p+2)),n=new W(B);;){if(a%2){if(!(n=n.times(o)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(a=f(a/2)))break;o=o.times(o),r?o.c&&o.c.length>r&&(o.c.length=r):t&&(o=o.mod(t))}return t?n:(e<0&&(n=B.div(n)),i?n.mod(i):r?ee(n,K,N):n)},C.toPrecision=function(e,t){return Z(this,null!=e&&U(e,1,g,24,"precision")?0|e:null,t,24)},C.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=w(r.c),t=null!=e&&U(e,2,64,25,"base")?X(M(t,i),0|e,10,n):i<=L||i>=F?A(t,i):M(t,i),n<0&&r.c[0]&&(t="-"+t)),t},C.truncated=C.trunc=function(){return ee(new W(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=w(t.c),e=r<=L||r>=F?A(e,r):M(e,r),t.s<0?"-"+e:e)},C.isBigNumber=!0,null!=t&&W.config(t),W}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n;e.exports=(n=r(6), +var n=r(166),i=r(165),a=r(75);function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return H(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var a,o=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,f/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-f),a=r;a>=0;a--){for(var l=!0,h=0;hi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[i+1]))&&(f=(31&u)<<6|63&a)>127&&(c=f);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(f=(15&u)<<12|(63&a)<<6|63&o)>2047&&(f<55296||f>57343)&&(c=f);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(f=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&f<1114112&&(c=f)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return E(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},f.prototype.compare=function(e,t,r,n,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,s=Math.min(a,o),u=this.slice(n,i),c=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,a){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function j(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,a){return a||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,a){return a||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},f.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function U(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(15))},function(e,t,r){"use strict";var n=r(80),i=r(183),a=Object.prototype.toString;function o(e){return"[object Array]"===a.call(e)}function s(e){return null!==e&&"object"==typeof e}function f(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r1)for(var r=1;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,f,u){var c=0,l=t;return c+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,f,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(140).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function f(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,f=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,l=67108863&f,h=Math.min(u,t.length-1),d=Math.max(0,u-e.length+1);d<=h;d++){var p=u-d|0;c+=(o=(i=0|e.words[p])*(a=0|t.words[d])+l)/67108864|0,l=67108863&o}r.words[u]=0|l,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=c[e],d=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?b+r:u[h-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,f="le"===t,u=new e(a),c=this.clone();if(f){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,d=0|o[1],p=8191&d,b=d>>>13,v=0|o[2],m=8191&v,g=v>>>13,y=0|o[3],w=8191&y,_=y>>>13,S=0|o[4],k=8191&S,x=S>>>13,A=0|o[5],M=8191&A,E=A>>>13,T=0|o[6],I=8191&T,P=T>>>13,O=0|o[7],R=8191&O,C=O>>>13,B=0|o[8],j=8191&B,N=B>>>13,L=0|o[9],F=8191&L,z=L>>>13,H=0|s[0],U=8191&H,D=H>>>13,q=0|s[1],K=8191&q,Y=q>>>13,V=0|s[2],W=8191&V,X=V>>>13,Z=0|s[3],G=8191&Z,Q=Z>>>13,$=0|s[4],J=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],fe=8191&se,ue=se>>>13,ce=0|s[8],le=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(u+(n=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,D))+Math.imul(h,U)|0))<<13)|0;u=((a=Math.imul(h,D))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,D))+Math.imul(b,U)|0,a=Math.imul(b,D);var me=(u+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,K)|0))<<13)|0;u=((a=a+Math.imul(h,Y)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,D))+Math.imul(g,U)|0,a=Math.imul(g,D),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,Y)|0;var ge=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,W)|0))<<13)|0;u=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,D))+Math.imul(_,U)|0,a=Math.imul(_,D),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,Y)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,X)|0;var ye=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,G)|0))<<13)|0;u=((a=a+Math.imul(h,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,D))+Math.imul(x,U)|0,a=Math.imul(x,D),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,Q)|0;var we=(u+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,J)|0))<<13)|0;u=((a=a+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,D))+Math.imul(E,U)|0,a=Math.imul(E,D),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,Y)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,Q)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;u=((a=a+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,D))+Math.imul(P,U)|0,a=Math.imul(P,D),n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,Y)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(l,ae)|0)|0)+((8191&(i=(i=i+Math.imul(l,oe)|0)+Math.imul(h,ae)|0))<<13)|0;u=((a=a+Math.imul(h,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,D))+Math.imul(C,U)|0,a=Math.imul(C,D),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,Y)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var ke=(u+(n=n+Math.imul(l,fe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(h,fe)|0))<<13)|0;u=((a=a+Math.imul(h,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,D))+Math.imul(N,U)|0,a=Math.imul(N,D),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,Y)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,X)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(m,ae)|0,i=(i=i+Math.imul(m,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,ue)|0;var xe=(u+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;u=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,D))+Math.imul(z,U)|0,a=Math.imul(z,D),n=n+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(N,K)|0,a=a+Math.imul(N,Y)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,Q)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,ue)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(b,le)|0,a=a+Math.imul(b,he)|0;var Ae=(u+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(h,pe)|0))<<13)|0;u=((a=a+Math.imul(h,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,Y))+Math.imul(z,K)|0,a=Math.imul(z,Y),n=n+Math.imul(j,W)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(C,G)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,ue)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,he)|0)+Math.imul(g,le)|0,a=a+Math.imul(g,he)|0;var Me=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((a=a+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,X))+Math.imul(z,W)|0,a=Math.imul(z,X),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,Q)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,ue)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,le)|0,a=a+Math.imul(_,he)|0;var Ee=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(g,pe)|0))<<13)|0;u=((a=a+Math.imul(g,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,Q))+Math.imul(z,G)|0,a=Math.imul(z,Q),n=n+Math.imul(j,J)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,ue)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(x,le)|0,a=a+Math.imul(x,he)|0;var Te=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((a=a+Math.imul(_,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,J),i=(i=Math.imul(F,ee))+Math.imul(z,J)|0,a=Math.imul(z,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(N,re)|0,a=a+Math.imul(N,ne)|0,n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,ue)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(E,le)|0,a=a+Math.imul(E,he)|0;var Ie=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(x,pe)|0))<<13)|0;u=((a=a+Math.imul(x,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(N,ae)|0,a=a+Math.imul(N,oe)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(C,fe)|0,a=a+Math.imul(C,ue)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(P,le)|0,a=a+Math.imul(P,he)|0;var Pe=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(E,pe)|0))<<13)|0;u=((a=a+Math.imul(E,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,ae),i=(i=Math.imul(F,oe))+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(N,fe)|0,a=a+Math.imul(N,ue)|0,n=n+Math.imul(R,le)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(C,le)|0,a=a+Math.imul(C,he)|0;var Oe=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((a=a+Math.imul(P,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,fe),i=(i=Math.imul(F,ue))+Math.imul(z,fe)|0,a=Math.imul(z,ue),n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,he)|0)+Math.imul(N,le)|0,a=a+Math.imul(N,he)|0;var Re=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(C,pe)|0))<<13)|0;u=((a=a+Math.imul(C,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,he))+Math.imul(z,le)|0,a=Math.imul(z,he);var Ce=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(N,pe)|0))<<13)|0;u=((a=a+Math.imul(N,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Be=(u+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,be))+Math.imul(z,pe)|0))<<13)|0;return u=((a=Math.imul(z,be))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=ve,f[1]=me,f[2]=ge,f[3]=ye,f[4]=we,f[5]=_e,f[6]=Se,f[7]=ke,f[8]=xe,f[9]=Ae,f[10]=Me,f[11]=Ee,f[12]=Te,f[13]=Ie,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ce,f[18]=Be,0!==u&&(f[19]=u,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(d=h),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var l=0|this.words[u];this.words[u]=c<<26-a|l>>>a,c=l&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),f=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(l)),i.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(l)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(f)):(r.isub(t),s.isub(i),f.isub(o))}return{a:s,b:f,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(g,m),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var l=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;0!==d.cmp(s);){for(var b=d,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var u=t.words[n],c=f-1;c>=0;c--){var l=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==o?(o<<=1,o|=l,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,r(65)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Account:!0,Balance:!0,Wallet:!0,Claims:!0,AssetBalance:!0,Coin:!0,ClaimItem:!0};Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Balance",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Claims",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"AssetBalance",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Coin",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ClaimItem",{enumerable:!0,get:function(){return p.ClaimItem}}),t.default=void 0;var i=v(r(26));Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))});var a=v(r(32));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=v(r(58));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=v(r(94));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=b(r(30)),u=b(r(93)),c=b(r(85)),l=b(r(84)),h=b(r(55)),d=b(r(54)),p=r(45);function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var m={create:{account:function(e){return new f.default(e)},privateKey:i.generatePrivateKey,signature:i.generateSignature,wallet:function(e){return new c.default(e)}},is:{address:a.isAddress,publicKey:a.isPublicKey,encryptedKey:a.isNEP2,privateKey:a.isPrivateKey,wif:a.isWIF,scriptHash:a.isScriptHash},encrypt:{privateKey:o.encrypt},decrypt:{privateKey:o.decrypt},get:{privateKeyFromWIF:i.getPrivateKeyFromWIF,WIFFromPrivateKey:i.getWIFFromPrivateKey,publicKeyFromPrivateKey:i.getPublicKeyFromPrivateKey,scriptHashFromPublicKey:i.getScriptHashFromPublicKey,addressFromScriptHash:i.getAddressFromScriptHash,scriptHashFromAddress:i.getScriptHashFromAddress},sign:{message:s.signMessage},verify:{message:s.verifyMessage}};t.default=m},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=r(25),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var a=r(22);a.inherits=r(1);var o=r(71),s=r(38);a.inherits(l,o);for(var f=i(s.prototype),u=0;u1&&void 0!==arguments[1]&&arguments[1]&&s[e.name])&&(s[e.name]=e,!0)};t.addNetwork=u;var c=function(e){return!!s[e]&&(delete s[e],!0)};t.removeNetwork=c;var l={add:{network:function(e,t){return u(e,t)}},remove:{network:function(e){return c(e)}}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Transaction:!0,calculationStrategy:!0,TxAttrUsage:!0};Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"TxAttrUsage",{enumerable:!0,get:function(){return u.default}}),t.calculationStrategy=t.default=void 0;var i=l(r(92)),a=c(r(50));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=c(r(23));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=c(r(28));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=c(r(48));t.calculationStrategy=f;var u=l(r(51));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}function h(e,t,r){return(h="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&d(i,r.prototype),i}).apply(null,arguments)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={create:{tx:function(){for(var e=arguments.length,t=new Array(e),r=0;r=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={RPCClient:!0,Query:!0,queryRPC:!0,Network:!0};Object.defineProperty(t,"RPCClient",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Query",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"queryRPC",{enumerable:!0,get:function(){return a.queryRPC}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(47)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(46)),o=f(r(49)),s=r(86);function f(e){return e&&e.__esModule?e:{default:e}}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var u={create:{rpcClient:function(e){return new i.default(e)},query:function(e){return new a.default(e)}}};t.default=u},function(e,t){},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(){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}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a65535)throw new Error;var t=(0,n.num2hexstring)(e.usage);return 129===e.usage?t+=(0,n.num2hexstring)(e.data.length/2):(144===e.usage||e.usage>=240)&&(t+=(0,n.num2VarInt)(e.data.length/2)),2===e.usage||3===e.usage?t+=e.data.substr(2,64):t+=e.data,t};t.deserializeTransactionAttribute=function(e){var t={usage:parseInt(e.read(1),16)};if(0===t.usage||48===t.usage||t.usage>=161&&t.usage<=175)t.data=e.read(32);else if(2===t.usage||3===t.usage)t.data=(0,n.num2hexstring)(t.usage)+e.read(32);else if(32===t.usage)t.data=e.read(20);else if(129===t.usage)t.data=e.read(parseInt(e.read(1),16));else{if(!(144===t.usage||t.usage>=240))throw new Error;t.data=e.readVarBytes()}return t};t.serializeWitness=function(e){var t=(0,n.num2VarInt)(e.invocationScript.length/2),r=(0,n.num2VarInt)(e.verificationScript.length/2);return t+e.invocationScript+r+e.verificationScript};t.deserializeWitness=function(e){return{invocationScript:e.readVarBytes(),verificationScript:e.readVarBytes()}}},function(e,t,r){"use strict";var n=t;n.base=r(137),n.short=r(136),n.mont=r(135),n.edwards=r(134)},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(a=new Array(s-1),o=0;o1&&void 0!==arguments[1])||arguments[1],r=new i.ec("p256").keyFromPrivate(e,"hex").getPublic().encode("hex");return t?parseInt(r.substr(128,2),16)%2==1?"03"+r.substr(2,64):"02"+r.substr(2,64):r};var h=function(e){return"21"+e+"ac"};t.getVerificationScriptFromPublicKey=h;t.getScriptHashFromPublicKey=function(e){"04"===e.substring(0,2)&&(e=l(e));var t=h(e);return(0,o.reverseHex)((0,o.hash160)(t))};t.getAddressFromScriptHash=function(t){t=(0,o.reverseHex)(t);var r=(0,o.hash256)(s.ADDR_VERSION+t).substr(0,8);return a.default.encode(e.from(s.ADDR_VERSION+t+r,"hex"))};t.getScriptHashFromAddress=function(e){var t=(0,o.ab2hexstring)(a.default.decode(e));return(0,o.reverseHex)(t.substr(2,40))};t.generateSignature=function(t,r){var n=(0,o.sha256)(t),a=e.from(n,"hex"),s=new i.ec("p256").sign(a,r,null);return e.concat([s.r.toArrayLike(e,"be",32),s.s.toArrayLike(e,"be",32)]).toString("hex")};t.generatePrivateKey=function(){return(0,o.ab2hexstring)((0,f.default)(32))};t.generateRandomArray=function(e){return(0,f.default)(e)}}).call(this,r(7).Buffer)},function(e,t,r){e.exports=r(184)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExclusive=t.deserializeExclusive=t.serializeExclusive=void 0;var n=r(0),i=r(23),a={2:function(e){if(2!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.claims.length),r=!0,a=!1,o=void 0;try{for(var s,f=e.claims[Symbol.iterator]();!(r=(s=f.next()).done);r=!0){var u=s.value;t+=(0,i.serializeTransactionInput)(u)}}catch(e){a=!0,o=e}finally{try{r||null==f.return||f.return()}finally{if(a)throw o}}return t},128:function(e){if(128!==e.type)throw new Error;return""},209:function(e){if(209!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.script.length/2);return t+=e.script,e.version>=1&&(t+=(0,n.num2fixed8)(e.gas)),t}};t.serializeExclusive=a;var o={2:function(e){for(var t={claims:[]},r=e.readVarInt(),n=0;n=1?(0,n.fixed82num)(e.read(8)):0}}};t.deserializeExclusive=o;var s={2:function(e){return Object.assign({claims:[]},{claims:e.claims})},128:function(e){return{}},209:function(e){return{script:e.script||"",gas:e.gas||0}}};t.getExclusive=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={OpCode:!0,ScriptBuilder:!0,ContractParam:!0};Object.defineProperty(t,"OpCode",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ScriptBuilder",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ContractParam",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(53)),a=f(r(52)),o=f(r(91)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(90));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t,r){return(u="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&c(i,r.prototype),i}).apply(null,arguments)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var l={create:{contractParam:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0])return this.publicKey;var e=this.publicKey;return n.getPublicKeyUnencoded(e)}},{key:"encrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._encrypted=(0,a.encrypt)(this.privateKey,e,t),this}},{key:"decrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._WIF=(0,a.decrypt)(this.encrypted,e,t),this._updateContractScript(),this}},{key:"export",value:function(){var e=null;if(this._privateKey&&!this._encrypted)throw new Error("Encrypt private key first!");return this._encrypted&&(e=this._encrypted),{address:this.address,label:this.label,isDefault:this.isDefault,lock:this.lock,key:e,contract:this.contract,extra:this.extra}}},{key:Symbol.toStringTag,get:function(){return"Account"}},{key:"encrypted",get:function(){if(this._encrypted)return this._encrypted;throw new Error("No encrypted key found")}},{key:"WIF",get:function(){return this._WIF?this._WIF:(this._WIF=n.getWIFFromPrivateKey(this._privateKey),this._WIF)}},{key:"privateKey",get:function(){if(this._privateKey)return this._privateKey;if(this._WIF)return this._privateKey=n.getPrivateKeyFromWIF(this._WIF),this._privateKey;throw this._encrypted?new ReferenceError("Private Key encrypted!"):new ReferenceError("No Private Key provided!")}},{key:"publicKey",get:function(){return this._publicKey?this._publicKey:(this._publicKey=n.getPublicKeyFromPrivateKey(this.privateKey),this._publicKey)}},{key:"scriptHash",get:function(){return this._scriptHash?this._scriptHash:this._address?(this._scriptHash=n.getScriptHashFromAddress(this.address),this._scriptHash):(this._scriptHash=n.getScriptHashFromPublicKey(this.publicKey),this._scriptHash)}},{key:"address",get:function(){return this._address?this._address:(this._address=n.getAddressFromScriptHash(this.scriptHash),this._address)}}])&&c(t.prototype,r),f&&c(t,f),e}();t.default=h},function(e,t,r){var n;e.exports=(n=r(5),r(57),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=t.enc,f=(s.Utf8,s.Base64),u=t.algo,c=u.EvpKDF,l=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:w}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),h=(r.StreamCipher=l.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),d=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=h.CBC=function(){var t=d.extend();function r(t,r,n){var i=this._iv;if(i){var a=i;this._iv=e}else var a=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:v}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=t.format={},y=g.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else var n=t;return n.toString(f)},parse:function(e){var t=f.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return m.create({ciphertext:t,salt:n})}},w=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=t.kdf={},S=_.OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=c.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},k=r.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=w.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);n.iv=i.iv;var a=w.decrypt.call(this,e,t,i.key,n);return a}})}()))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=t.isScriptHash=t.isPublicKey=t.isPrivateKey=t.isWIF=t.isNEP2=void 0;var n,i=(n=r(35))&&n.__esModule?n:{default:n},a=r(0),o=r(26);t.isNEP2=function(e){try{if(58!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return!!t&&86===t.length&&"01"===t.substr(0,2)&&"42"===t.substr(2,2)&&"e0"===t.substr(4,2)}catch(e){return!1}};t.isWIF=function(e){try{if(52!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return(0,a.hash256)(t.substr(0,t.length-8)).substr(0,8)===t.substr(t.length-8,8)}catch(e){return!1}};t.isPrivateKey=function(e){return/^[0-9A-Fa-f]{64}$/.test(e)};t.isPublicKey=function(e,t){try{var r;switch(e.substr(0,2)){case"04":if(!0===t)return!1;r=(0,o.getPublicKeyEncoded)(e);break;case"02":case"03":if(!1===t)return!1;r=e;break;default:return!1}var n=(0,o.getPublicKeyUnencoded)(r),i=parseInt(n.substr(n.length-2,2),16);if("02"===r.substr(0,2)&&i%2==0)return!0;if("03"===r.substr(0,2)&&i%2==1)return!0}catch(e){}return!1};t.isScriptHash=function(e){return(0,a.isHex)(e)&&40===e.length};t.isAddress=function(e){try{var t=(0,a.ab2hexstring)(i.default.decode(e));if((0,a.hash256)(t.slice(0,42)).substr(0,8)!==t.substr(42,8))return!1;var r=(0,a.reverseHex)(t.slice(2,42));return(0,o.getAddressFromScriptHash)(r)===e}catch(e){return!1}}},function(e,t,r){(function(e,n){var i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),f=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),c(n,e,n.depth)}function f(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function u(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=c(e,i,n)),i}var a=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),S(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(k(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(y(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var u,w="",x=!1,A=["{","}"];(d(r)&&(x=!0,A=["[","]"]),k(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),S(r)&&(w=" "+l(r)),0!==o.length||x&&0!=r.length?n<0?y(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=x?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,a){var o,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),E(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=b(r)?c(e,f.value,null):c(e,f.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),g(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function v(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===x(e)}function S(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function k(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=y,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(116);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(115),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,r(15),r(9))},function(e,t,r){var n=t;n.utils=r(10),n.common=r(21),n.sha=r(132),n.ripemd=r(128),n.hmac=r(127),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){var n=r(143);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,r){"use strict";var n=r(4).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(158),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(15))},function(e,t,r){"use strict";(function(t,n,i){var a=r(25);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:a.nextTick;g.WritableState=m;var u=r(22);u.inherits=r(1);var c={deprecate:r(157)},l=r(70),h=r(4).Buffer,d=i.Uint8Array||function(){};var p,b=r(69);function v(){}function m(e,t){s=s||r(14),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(a.nextTick(i,n),a.nextTick(x,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),x(e,t))}(e,r,n,t,i);else{var o=S(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?f(w,e,r,o,i):w(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(e){if(s=s||r(14),!(p.call(g,this)||this instanceof s))return new g(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function y(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,y(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback;if(y(e,t,!1,t.objectMode?1:u.length,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),x(e,t)})}function x(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=v),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),a.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(n,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=b.destroy,g.prototype._undestroy=b.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(9),r(37).setImmediate,r(15))},function(e,t,r){(t=e.exports=r(71)).Stream=t,t.Readable=t,t.Writable=r(38),t.Duplex=r(14),t.Transform=r(68),t.PassThrough=r(156)},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,f,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(a(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),o=(u=r.slice()).length,f=0;f0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,a,o,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,a=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";(function(t){var n=r(8),i=r(181),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,f={adapter:("undefined"!=typeof XMLHttpRequest?s=r(79):void 0!==t&&(s=r(79)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){f.headers[e]={}}),n.forEach(["post","put","patch"],function(e){f.headers[e]=n.merge(a)}),e.exports=f}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doSendAsset=t.doMintTokens=t.doClaimAllGas=t.getWalletDBHeight=t.getTransactionHistory=t.getRPCEndpoint=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(17),o=r(19),s=r(3),f=r(0),u=r(16);function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,c(r(2)).default)("api");t.name="neonDB";var h=null,d=function(e){return u.networks[e]?u.networks[e].extra.neonDB:e};t.getAPIEndpoint=d;var p=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/balance/"+t).then(function(r){var n=new i.Balance({net:e,address:r.data.address});return Object.keys(r.data).map(function(e){"net"!==e&&"address"!==e&&n.addAsset(e,r.data[e])}),l.info("Retrieved Balance for ".concat(t," from neonDB ").concat(e)),n})};t.getBalance=p;var b=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){var n=r.data;return n.claims=n.claims.map(function(e){return{claim:new f.Fixed8(e.claim).div(1e8),index:e.index,txid:e.txid,start:new f.Fixed8(e.start),end:new f.Fixed8(e.end),value:e.value}}),l.info("Retrieved Claims for ".concat(t," from neonDB ").concat(e)),new i.Claims(n)})};t.getClaims=b;t.getMaxClaimAmount=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neonDB ").concat(e)),new f.Fixed8(r.data.total_claim+r.data.total_unspent_claim).div(1e8)})};var v=function e(t){var r=d(t);return n.default.get(r+"/v2/network/nodes").then(function(r){var n=r.data.nodes.filter(function(e){return e.status}),i=0,a=[],s=!0,f=!1,c=void 0;try{for(var l,d=n[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var p=l.value;u.httpsOnly&&!p.url.includes("https://")||(p.block_height>i?(i=p.block_height,a=[p]):p.block_height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{s||null==d.return||d.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(h))return new o.RPCClient(h).ping().then(function(r){return r<=u.timeout.ping?h:(h=null,e(t))});var v=b.map(function(e){return new o.RPCClient(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return h=e,e})};t.getRPCEndpoint=v;t.getTransactionHistory=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/history/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neonDB ").concat(e)),r.data.history.map(function(e){return{change:{NEO:new f.Fixed8(e.NEO||0),GAS:new f.Fixed8(e.GAS||0)},blockHeight:new f.Fixed8(e.block_index),txid:e.txid}})})};t.getWalletDBHeight=function(e){var t=d(e);return n.default.get(t+"/v2/block/height").then(function(e){return parseInt(e.data.block_height)})};t.doClaimAllGas=function(e,t,r){l.warn("doClaimAllGas will be deprecated in favor of claimGas");var n,s,f=new i.Account(t),u=v(e),c=b(e,f.address);return Promise.all([u,c]).then(function(e){s=e[0];var t=e[1];if(0===t.length)throw new Error("No claimable gas!");var n=a.Transaction.createClaimTx(f.publicKey,t);return r?r(n,f.publicKey):n.sign(f.privateKey)}).then(function(e){return n=e,o.Query.sendRawTransaction(n).execute(s)}).then(function(e){return!0===e.result?e.txid=n:l.error("Transaction failed: ".concat(n.serialize())),e})};t.doMintTokens=function(e,t,r,n,u,c){l.warn("doMintTokens will be deprecated in favor of doInvoke");var h,d,b=new i.Account(r),m=[{assetId:s.ASSET_ID.NEO,value:n,scriptHash:t}],g={operation:"mintTokens",scriptHash:t,args:[]},y=v(e),w=p(e,b.address);return Promise.all([y,w]).then(function(e){d=e[0];var r=e[1],n=[{data:(0,f.reverseHex)(t),usage:a.TxAttrUsage.Script}],i=a.Transaction.createInvocationTx(r,m,g,u,{attributes:n});return c?c(i,b.publicKey):i.sign(b.privateKey)}).then(function(e){return h=e,o.Query.getContractState(t).execute(d)}).then(function(e){var t={invocationScript:"0000",verificationScript:e.result.script};return h.scripts.unshift(t),o.Query.sendRawTransaction(h).execute(d)}).then(function(e){return!0===e.result?e.txid=h.hash:l.error("Transaction failed: ".concat(h.serialize())),e})};t.doSendAsset=function(e,t,r,n,f){l.warn("doSendAsset will be deprecated in favor of sendAsset");var u,c,h=new i.Account(r),d=new i.Account(t),b=v(e),m=p(e,h.address),g=Object.keys(n).map(function(e){return{assetId:s.ASSET_ID[e],value:n[e],scriptHash:d.scriptHash}});return Promise.all([b,m]).then(function(e){c=e[0];var t=e[1],r=a.Transaction.createContractTx(t,g);return f?f(r,h.publicKey):r.sign(h.privateKey)}).then(function(e){return u=e,o.Query.sendRawTransaction(u).execute(c)}).then(function(e){return!0===e.result?e.txid=u.hash:l.error("Transaction failed: ".concat(u.serialize())),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadBalance=t.setSwitchFreeze=t.setApiSwitch=void 0;var n,i=o(r(42)),a=o(r(44));function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var s=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("api"),f=0,u=!1;t.setApiSwitch=function(e){e>=0&&e<=1&&(f=e)};t.setSwitchFreeze=function(e){u=!!e,s.info("core/setSwitchFreeze API switch is frozen: ".concat(u))};var c=function(){!u&&f>0&&(f-=.2,s.info("core API Switch increasing weight towards neoscan"))},l=function(){!u&&f<1&&(f+=.2,s.info("core API Switch increasing weight towards neonDB"))};t.loadBalance=function(e,t){return Math.random()>f?e(t,a).then(function(e){return c(),e}).catch(function(){return l(),e(t,i)}):e(t,i).then(function(e){return l(),e}).catch(function(){return c(),e(t,a)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHistory=t.getWalletDBHeight=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getRPCEndpoint=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(3),o=r(0),s=r(16),f=c(r(2)),u=c(r(47));function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,f.default)("api");t.name="neoscan";var h=null,d=function(e){return s.networks[e]?s.networks[e].extra.neoscan:e};t.getAPIEndpoint=d;t.getRPCEndpoint=function e(t){var r=d(t);return n.default.get(r+"/v1/get_all_nodes").then(function(r){var n=r.data,i=0,a=[],o=!0,f=!1,c=void 0;try{for(var l,d=n[Symbol.iterator]();!(o=(l=d.next()).done);o=!0){var p=l.value;s.httpsOnly&&!p.url.includes("https://")||(p.height>i?(i=p.height,a=[p]):p.height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{o||null==d.return||d.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(h))return new u.default(h).ping().then(function(r){return r<=s.timeout.ping?h:(h=null,e(t))});var v=b.map(function(e){return new u.default(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return h=e,e})};t.getBalance=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_balance/"+t).then(function(r){if(r.data.address!==t&&null===r.data.balance)return new i.Balance({address:r.data.address});var n=new i.Balance({address:r.data.address,net:e});return r.data.balance.map(function(e){n.addAsset(e.asset,{balance:e.amount,unspent:p(e.unspent)})}),l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),n})};t.getClaims=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_claimable/"+t).then(function(r){if(r.address!==t&&null===r.data.claimable)return new i.Claims({address:r.data.address});var n=b(r.data.claimable);return l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),new i.Claims({net:e,address:r.data.address,claims:n})})};t.getMaxClaimAmount=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_unclaimed/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neoscan ").concat(e)),new o.Fixed8(r.data.unclaimed||0)})};var p=function(e){return e.map(function(e){return{index:e.n,txid:e.txid,value:e.value}})},b=function(e){return e.map(function(e){return{start:new o.Fixed8(e.start_height),end:new o.Fixed8(e.end_height),index:e.n,claim:new o.Fixed8(e.unclaimed),txid:e.txid,value:e.value}})};t.getWalletDBHeight=function(e){var t=d(e);return n.default.get(t+"/v1/get_height").then(function(e){return parseInt(e.data.height)})};t.getTransactionHistory=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_address_neon/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neoscan ").concat(e)),v(r.data.txids)})};var v=function(e){var t=[],r=e.length-1;return e.forEach(function(n,i){var s,f,u,c;if(i!==r){var l=e[i+1],h=m(n.balance),d=m(l.balance);s={NEO:new o.Fixed8(h.NEO||0).minus(d.NEO||0),GAS:new o.Fixed8(h.GAS||0).minus(d.GAS||0)}}else{var p=n.asset_moved===a.ASSET_ID.NEO?"NEO":"GAS";f={},u=p,c=new o.Fixed8(n.amount_moved),u in f?Object.defineProperty(f,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[u]=c,s=f}t.push({txid:n.txid,blockHeight:n.block_height,change:s})}),t},m=function(e){return e.reduce(function(e,t){return e[t.asset]=new o.Fixed8(t.amount),e},{})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportClaimItem=t.ClaimItem=void 0;var n=r(0);t.ClaimItem=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{claim:e.claim?new n.Fixed8(e.claim):new n.Fixed8(0),txid:e.txid||"",index:e.index||0,value:e.value||0,start:e.start?new n.Fixed8(e.start):null,end:e.end?new n.Fixed8(e.end):null}};t.exportClaimItem=function(e){return{claim:e.claim.toNumber(),txid:e.txid,index:e.index,value:e.value,start:e.start?e.start.toNumber():null,end:e.end?e.end.toNumber():null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryRPC=t.default=void 0;var n=f(r(27)),i=r(17),a=r(3),o=f(r(2)),s=r(16);function f(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(this.completed)throw new Error("This request has been sent");return d(e,this.req,r).then(function(e){if(t.res=e,t.completed=!0,e.error)throw new Error(e.error.message);return t.parse?(l.info("Query[".concat(t.req.method,"] successful")),t.parse(e)):e})}},{key:Symbol.toStringTag,get:function(){return"Query"}}],n=[{key:"getAccountState",value:function(t){return new e({method:"getaccountstate",params:[t]})}},{key:"getAssetState",value:function(t){return new e({method:"getassetstate",params:[t]})}},{key:"getBlock",value:function(t){return new e({method:"getblock",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getBlockHash",value:function(t){return new e({method:"getblockhash",params:[t]})}},{key:"getBestBlockHash",value:function(){return new e({method:"getbestblockhash"})}},{key:"getBlockCount",value:function(){return new e({method:"getblockcount"})}},{key:"getBlockSysFee",value:function(t){return new e({method:"getblocksysfee",params:[t]})}},{key:"getConnectionCount",value:function(){return new e({method:"getconnectioncount"})}},{key:"getContractState",value:function(t){return new e({method:"getcontractstate",params:[t]})}},{key:"getPeers",value:function(){return new e({method:"getpeers"})}},{key:"getRawMemPool",value:function(){return new e({method:"getrawmempool"})}},{key:"getRawTransaction",value:function(t){return new e({method:"getrawtransaction",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getStorage",value:function(t,r){return new e({method:"getstorage",params:[t,r]})}},{key:"getTxOut",value:function(t,r){return new e({method:"gettxout",params:[t,r]})}},{key:"getVersion",value:function(){return new e({method:"getversion"})}},{key:"invoke",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2?n-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:{},i=n.default.create({headers:{"Content-Type":"application/json"},timeout:s.timeout.rpc}),o=Object.assign({},a.DEFAULT_REQ,t);return i.post(e,o,r).then(function(e){return e.data})};t.queryRPC=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(r(46)),i=r(12),a=u(r(87)),o=r(3),s=u(r(2)),f=r(16);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:o.RPC_VERSION;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t===o.NEO_NETWORK.MAIN?this.net=o.DEFAULT_RPC.MAIN:t===o.NEO_NETWORK.TEST?this.net=o.DEFAULT_RPC.TEST:this.net=t,this.history=[],this.lastSeenHeight=0,this._latencies=[],this.version="",!a.default.valid(r))throw new Error("Invalid Version: ".concat(r));this.version=a.default.clean(r)}var t,r,s;return t=e,(r=[{key:"ping",value:function(){var e=this,t=Date.now(),r=n.default.getBlockCount();return this.execute(r,{timeout:f.timeout.ping}).then(function(r){e.lastSeenHeight=r.result;var n=Date.now()-t;return e.latency=n,n}).catch(function(t){return e.latency=f.timeout.ping,f.timeout.ping})}},{key:"execute",value:function(e,t){return this.history.push(e),l.info("RPC: ".concat(this.net," executing Query[").concat(e.req.method,"]")),e.execute(this.net,t)}},{key:"query",value:function(e,t){var r=new n.default(e);return this.execute(r,t)}},{key:"getAccountState",value:function(e){if(!(0,i.isAddress)(e))throw new Error("Invalid address given: ".concat(e));return this.execute(n.default.getAccountState(e)).then(function(e){return e.result})}},{key:"getAssetState",value:function(e){return this.execute(n.default.getAssetState(e)).then(function(e){return e.result})}},{key:"getBlock",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getBlock(e,t)).then(function(e){return e.result})}},{key:"getBlockHash",value:function(e){return this.execute(n.default.getBlockHash(e)).then(function(e){return e.result})}},{key:"getBestBlockHash",value:function(){return this.execute(n.default.getBestBlockHash()).then(function(e){return e.result})}},{key:"getBlockCount",value:function(){return this.execute(n.default.getBlockCount()).then(function(e){return e.result})}},{key:"getBlockSysFee",value:function(e){return this.execute(n.default.getBlockSysFee(e)).then(function(e){return e.result})}},{key:"getConnectionCount",value:function(){return this.execute(n.default.getConnectionCount()).then(function(e){return e.result})}},{key:"getContractState",value:function(e){return this.execute(n.default.getContractState(e)).then(function(e){return e.result})}},{key:"getPeers",value:function(){return this.execute(n.default.getPeers()).then(function(e){return e.result})}},{key:"getRawMemPool",value:function(){return this.execute(n.default.getRawMemPool()).then(function(e){return e.result})}},{key:"getRawTransaction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getRawTransaction(e,t)).then(function(e){return e.result})}},{key:"getStorage",value:function(e,t){return this.execute(n.default.getStorage(e,t)).then(function(e){return e.result})}},{key:"getTxOut",value:function(e,t){return this.execute(n.default.getTxOut(e,t)).then(function(e){return e.result})}},{key:"getVersion",value:function(){var e=this;return this.execute(n.default.getVersion()).then(function(t){var r=t.result.useragent.match(h)[1];return e.version=a.default.clean(r),e.version}).catch(function(t){if(t.message.includes("Method not found"))return e.version=o.RPC_VERSION,e.version;throw t})}},{key:"invoke",value:function(e,t){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invoke(e,t)).then(function(e){return e.result})}},{key:"invokeFunction",value:function(e,t,r){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeFunction(e,t,r)).then(function(e){return e.result})}},{key:"invokeScript",value:function(e){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeScript(e)).then(function(e){return e.result})}},{key:"sendRawTransaction",value:function(e){return this.execute(n.default.sendRawTransaction(e)).then(function(e){return e.result})}},{key:"submitBlock",value:function(e){return this.execute(n.default.submitBlock(e)).then(function(e){return e.result})}},{key:"validateAddress",value:function(e){return this.execute(n.default.validateAddress(e)).then(function(e){return e.result.isvalid})}},{key:Symbol.toStringTag,get:function(){return"RPC Client"}},{key:"latency",get:function(){return 0===this._latencies.length?99999:Math.floor(this._latencies.reduce(function(e,t){return e+t},0)/this._latencies.length)},set:function(e){this._latencies.length>4&&this._latencies.shift(),this._latencies.push(e)}}])&&c(t.prototype,r),s&&c(t,s),e}();t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.balancedApproach=t.biggestFirst=t.smallestFirst=void 0;var n=r(0);t.smallestFirst=function(e,t){return e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()}),i(t,e.unspent)};t.biggestFirst=function(e,t){return e.unspent.sort(function(e,t){return t.value.sub(e.value).toNumber()}),i(t,e.unspent)};t.balancedApproach=function(e,t){e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()});var r=e.unspent.filter(function(e){return e.value.lte(t)});if(0===r.length)return[e.unspent[0]];var n=r.findIndex(function(e){return t.eq(e.value)});if(n>=0)return[r[n]];var a=e.unspent.slice(r.length),o=[];r.length>0&&o.push(r.pop());var s=t.minus(o.length>0?o[0].value:0),f=i(s,r.concat(a));return o.concat(f)};var i=function(e,t){for(var r=0,i=new n.Fixed8(0);i.lt(e);){if((r+=1)>t.length)throw new Error("Insufficient assets! Reached end of unspent coins! ".concat(t.length));i=i.add(t[r-1].value)}return t.slice(0,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(88)),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.Name||t.name||r||"RandomNet",r&&(this.name=r);var i=t.protocol||t.ProtocolConfiguration||{};this.protocol=new n.default(i),this.nodes=t.Nodes||t.nodes||[],this.extra=t.ExtraConfiguration||t.extra||{}}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new e("string"==typeof jsonString?JSON.parse(t):t,r)}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing Network file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"export",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?JSON.stringify({ProtocolConfiguration:this.protocol.export()}):{Name:this.name,ProtocolConfiguration:this.protocol.export(),ExtraConfiguration:this.extra,Nodes:this.nodes}}},{key:"writeFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.default.writeFile(e,this.export(t),function(e){if(e)throw e;return s.info("Network file written!"),!0})}},{key:"update",value:function(){return this}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHash=t.signTransaction=t.deserializeTransaction=t.serializeTransaction=t.calculateInputs=void 0;var n,i=r(0),a=r(12),o=r(28),s=r(3),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(23)),u=r(16);var c=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("tx");t.calculateInputs=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===t&&(t=[]),null===n&&(n=u.defaultCalculationStrategy);var o=t.reduce(function(e,t){return e[t.assetId]?e[t.assetId]=e[t.assetId].add(t.value):e[t.assetId]=t.value,e},{});return(r=new i.Fixed8(r)).gt(0)&&(o[s.ASSET_ID.GAS]?o[s.ASSET_ID.GAS]=o[s.ASSET_ID.GAS].add(r):o[s.ASSET_ID.GAS]=r),Object.keys(o).map(function(t){var r=o[t],i=s.ASSETS[t];if(-1===e.assetSymbols.indexOf(i))throw new Error("This balance does not contain any ".concat(i,"!"));var f=e.assets[i];if(f.balance.lt(r))throw new Error("Insufficient ".concat(s.ASSETS[t],"! Need ").concat(r.toString()," but only found ").concat(f.balance.toString()));return l((0,a.AssetBalance)(f),r,t,e.address,n)}).reduce(function(e,t){return{inputs:e.inputs.concat(t.inputs),change:e.change.concat(t.change)}},{inputs:[],change:[]})};var l=function(e,t,r,n,o){var s=o(e,t),f=s.reduce(function(e,t){return e.add(t.value)},new i.Fixed8(0)),u=[];return f.gt(t)&&u.push({assetId:r,value:f.sub(t),scriptHash:(0,a.getScriptHashFromAddress)(n)}),{inputs:s.map(function(e){return{prevHash:e.txid,prevIndex:e.index}}),change:u}},h=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";r+=(0,i.num2hexstring)(e.type),r+=(0,i.num2hexstring)(e.version),r+=o.serializeExclusive[e.type](e),r+=(0,i.num2VarInt)(e.attributes.length);var n=!0,a=!1,s=void 0;try{for(var u,c=e.attributes[Symbol.iterator]();!(n=(u=c.next()).done);n=!0){var l=u.value;r+=f.serializeTransactionAttribute(l)}}catch(e){a=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw s}}r+=(0,i.num2VarInt)(e.inputs.length);var h=!0,d=!1,p=void 0;try{for(var b,v=e.inputs[Symbol.iterator]();!(h=(b=v.next()).done);h=!0){var m=b.value;r+=f.serializeTransactionInput(m)}}catch(e){d=!0,p=e}finally{try{h||null==v.return||v.return()}finally{if(d)throw p}}r+=(0,i.num2VarInt)(e.outputs.length);var g=!0,y=!1,w=void 0;try{for(var _,S=e.outputs[Symbol.iterator]();!(g=(_=S.next()).done);g=!0){var k=_.value;r+=f.serializeTransactionOutput(k)}}catch(e){y=!0,w=e}finally{try{g||null==S.return||S.return()}finally{if(y)throw w}}if(t&&e.scripts&&e.scripts.length>0){r+=(0,i.num2VarInt)(e.scripts.length);var x=!0,A=!1,M=void 0;try{for(var E,T=e.scripts[Symbol.iterator]();!(x=(E=T.next()).done);x=!0){var I=E.value;r+=f.serializeWitness(I)}}catch(e){A=!0,M=e}finally{try{x||null==T.return||T.return()}finally{if(A)throw M}}}return r};t.serializeTransaction=h;t.deserializeTransaction=function(e){var t=new i.StringStream(e),r={};r.type=parseInt(t.read(1),16),r.version=parseInt(t.read(1),16);var n=o.deserializeExclusive[r.type](t);r.attributes=[],r.inputs=[],r.outputs=[],r.scripts=[];for(var a=t.readVarInt(),s=0;s1&&void 0!==arguments[1]&&arguments[1];if((0,i.ensureHex)(e),40!==e.length)throw new Error("ScriptHash should be 20 bytes long!");return this.emit(t?a.default.TAILCALL:a.default.APPCALL,(0,i.reverseHex)(e))}},{key:"_emitArray",value:function(e){for(var t=e.length-1;t>=0;t--)this.emitPush(e[t]);return this.emitPush(e.length).emit(a.default.PACK)}},{key:"_emitString",value:function(e){(0,i.ensureHex)(e);var t=e.length/2;if(t<=a.default.PUSHBYTES75)this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<256)this.emit(a.default.PUSHDATA1),this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<65536)this.emit(a.default.PUSHDATA2),this.str+=(0,i.num2hexstring)(t,2,!0),this.str+=e;else{if(!(t<4294967296))throw new Error("String too big to emit!");this.emit(a.default.PUSHDATA4),this.str+=(0,i.num2hexstring)(t,4,!0),this.str+=e}return this}},{key:"_emitNum",value:function(e){if(-1===e)return this.emit(a.default.PUSHM1);if(0===e)return this.emit(a.default.PUSH0);if(e>0&&e<=16)return this.emit(a.default.PUSH1-1+e);var t=(0,i.int2hex)(e);return this.emitPush((0,i.reverseHex)("0".repeat(16-t.length)+t))}},{key:"_emitParam",value:function(e){if(!e.type)throw new Error("No type available!");if(!h(e.value))throw new Error("Invalid value provided!");switch(e.type){case"String":return this._emitString((0,i.str2hexstring)(e.value));case"Boolean":return this.emit(e.value?a.default.PUSHT:a.default.PUSHF);case"Integer":return this._emitNum(e.value);case"ByteArray":return this._emitString(e.value);case"Array":return this._emitArray(e.value);case"Hash160":return this._emitString((0,i.reverseHex)(e.value))}}},{key:"emit",value:function(e,t){return this.str+=(0,i.num2hexstring)(e),t&&(this.str+=t),this}},{key:"emitAppCall",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.emitPush(r),t){for(var a="",o=0;o=81&&n<=96:t.args.unshift(n-80);break;case 193===n:for(var a=t.args.shift(),o=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index||0,txid:e.txid||"",value:e.value?new n.Fixed8(e.value):new n.Fixed8(0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(0),a=(n=r(54))&&n.__esModule?n:{default:n};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.balance,r=e.unspent,n=e.spent,o=e.unconfirmed;return{balance:t?new i.Fixed8(t):new i.Fixed8(0),unspent:r?r.map(function(e){return(0,a.default)(e)}):[],spent:n?n.map(function(e){return(0,a.default)(e)}):[],unconfirmed:o?o.map(function(e){return(0,a.default)(e)}):[]}}},function(e,t,r){(function(t){function r(e){return"function"==typeof e?t("","utf8"):e instanceof t?e:new t("string"==typeof e?e:String(e||""),"utf8")}function n(e){return"number"!=typeof e?null:(e=Math.round(e))<1?null:e>256?null:e}e.exports=function(e,t,i,a){return{password:r(e),salt:r(t),options:function(e){return{maxmem:function(e){if("number"!=typeof e)return null;for(var t=4;t<=2048;t*=2){var r=1048576*t;if(r>e)return null;if(r==e)return r}return null}((e=null!==e&&"object"==typeof e?e:{}).maxmem)||33554432,cost:function(e){if("number"!=typeof e)return null;for(var t=8;t<=64;t++){var r=Math.pow(2,t);if(r>e)return null;if(r==e)return r}return null}(e.cost)||Math.pow(2,14),blockSize:n(e.blockSize)||8,parallel:n(e.parallel)||1,size:(t=e.size,("number"!=typeof t?null:(t=Math.round(t))<1?null:t>2048?null:t)||64)};var t}(i),callback:function(e){return"function"==typeof e?e:null}(arguments[arguments.length-1])}}}).call(this,r(7).Buffer)},function(e,t,r){var n,i,a,o,s,f,u,c;e.exports=(n=r(5),r(108),r(107),a=(i=n).lib,o=a.Base,s=a.WordArray,f=i.algo,u=f.MD5,c=f.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=s.create(),a=i.words,o=r.keySize,f=r.iterations;a.length2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by encryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=new h.default(t),u=(0,o.default)((0,o.default)(m.Latin1.parse(f.address))).toString().slice(0,8),l=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),b=l.slice(0,64),v=l.slice(64),_=(0,d.hexXor)(f.privateKey,b),S=s.default.encrypt(m.Hex.parse(_),m.Hex.parse(v),g),k=p.NEP_HEADER+p.NEP_FLAG+u+S.ciphertext.toString(),x=n.default.encode(e.from(k,"hex"));return y.info("Successfully encrypted key to ".concat(x)),x};t.encryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to encrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,b=u.r,v=u.p,_=new h.default(t),S=(0,o.default)((0,o.default)(m.Latin1.parse(_.address))).toString().slice(0,8);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(S,"hex"),c,b,v,64,function(t,r,i){if(null!=t)f(t);else if(i){var o=e.from(i).toString("hex"),u=o.slice(0,64),c=o.slice(64),l=(0,d.hexXor)(_.privateKey,u),h=s.default.encrypt(m.Hex.parse(l),m.Hex.parse(c),g),b=p.NEP_HEADER+p.NEP_FLAG+S+h.ciphertext.toString(),v=n.default.encode(e.from(b,"hex"));y.info("Successfully encrypted key to ".concat(v)),a(v)}})})};t.decrypt=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by decryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=(0,d.ab2hexstring)(n.default.decode(t)),u=f.substr(6,8),l=f.substr(-64),b=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),v=b.slice(0,64),_=b.slice(64),S={ciphertext:m.Hex.parse(l),salt:""},k=s.default.decrypt(S,m.Hex.parse(_),g),x=(0,d.hexXor)(k.toString(),v),A=new h.default(x);if(u!==(0,o.default)((0,o.default)(m.Latin1.parse(A.address))).toString().slice(0,8))throw new Error("Wrong Password!");return y.info("Successfully decrypted ".concat(t)),A.WIF};t.decryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to decrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,p=u.r,b=u.p,v=(0,d.ab2hexstring)(n.default.decode(t)),_=v.substr(6,8),S=v.substr(-64);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(_,"hex"),c,p,b,64,function(r,n,i){if(null!=r)f(r);else if(i){var u=e.from(i).toString("hex"),c=u.slice(0,64),l=u.slice(64),p={ciphertext:m.Hex.parse(S),salt:""},b=s.default.decrypt(p,m.Hex.parse(l),g),v=(0,d.hexXor)(b.toString(),c),w=new h.default(v),k=(0,o.default)((0,o.default)(m.Latin1.parse(w.address))).toString().slice(0,8);_!==k&&f(new Error("Wrong Password or scrypt parameters!")),y.info("Successfully decrypted ".concat(t)),a(w.WIF)}})})};var w=function(e){var t=Object.assign({},p.DEFAULT_SCRYPT,e);return{n:t.n||t.cost,r:t.r||t.blockSize,p:t.p||t.parallel}}}).call(this,r(7).Buffer)},function(e,t,r){var n;e.exports=(n=r(5),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],f=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),f[i]=r(e.pow(n,1/3)),i++),n++}();var u=[],c=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6],h=r[7],d=0;d<64;d++){if(d<16)u[d]=0|e[t+d];else{var p=u[d-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=u[d-2],m=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[d]=b+u[d-7]+m+u[d-16]}var g=n&i^n&a^i&a,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&l)+f[d]+u[d];h=l,l=c,c=s,s=o+w|0,o=a,a=i,i=n,n=w+(y+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+c|0,r[6]=r[6]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(c),t.HmacSHA256=a._createHmacHelper(c)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(5),n.enc.Hex)},function(e,t,r){"use strict";var n=r(10),i=r(21),a=r(13),o=n.rotr64_hi,s=n.rotr64_lo,f=n.shr64_hi,u=n.shr64_lo,c=n.sum64,l=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,v=n.sum64_5_lo,m=i.BlockHash,g=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function S(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function x(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=o(e,t,1)^o(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=o(e,t,19)^o(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&i;a?r.push(a,o):r.push(o)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,f=0|this._fh,g=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,x=0|this._el,A=0|this._fl,M=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var I=t[T-30],P=t[T-30+1],O=d(I,P),R=p(P,I),C=b(I=t[T-4],P=t[T-4+1]),B=v(P,I),j=t[T-14],N=t[T-14+1],L=t[T-32],F=t[T-32+1],z=R+N|0,H=O+j+m(z,R)|0;H=(H=H+C+m(z=z+B|0,B)|0)+L+m(z=z+F|0,F)|0,t[T]=H,t[T+1]=z}for(var U=0;U<160;U+=2){H=t[U],z=t[U+1];var D=c(r,n,i),q=c(w,_,S),K=l(r,w),Y=l(w,r),V=h(s,x),W=h(x,s),X=o[U],Z=o[U+1],G=u(s,f,g),Q=u(x,A,M),$=E+W|0,J=y+V+m($,E)|0;J=(J=(J=J+G+m($=$+Q|0,Q)|0)+X+m($=$+Z|0,Z)|0)+H+m($=$+z|0,z)|0;var ee=Y+q|0,te=K+D+m(ee,Y)|0;y=g,E=M,g=f,M=A,f=s,A=x,s=a+J+m(x=k+$|0,k)|0,a=i,k=S,i=n,S=_,n=r,_=w,r=J+te+m(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+x|0,this._fl=this._fl+A|0,this._gl=this._gl+M|0,this._hl=this._hl+E|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+a+m(this._dl,k)|0,this._eh=this._eh+s+m(this._el,x)|0,this._fh=this._fh+f+m(this._fl,A)|0,this._gh=this._gh+g+m(this._gl,M)|0,this._hh=this._hh+y+m(this._hl,E)|0},f.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+d(r[m-15])+r[m-16];for(var g=0;g<64;++g){var y=v+h(f)+u(f,p,b)+o[g]+r[g]|0,w=l(n)+c(n,i,a)|0;v=b,b=p,p=f,f=s+y|0,s=a,a=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},f.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";e.exports=a;var n=r(14),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?_(e,o,t,!1):M(e,o)):_(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){d("emit readable"),e.emit("readable"),P(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(E,e,t))}function E(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function R(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):x(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:y;function u(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",v),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",b),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){d("onend"),e.end()}a.endEmitted?i.nextTick(f):r.once("end",f),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",l);var h=!1;var p=!1;function b(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==B(a.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function v(t){d("onerror",t),y(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",g),y()}function g(){d("onfinish"),e.removeListener("close",m),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",v),e.once("close",m),e.once("finish",g),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t,r){"use strict";var n=r(163),i=r(144);e.exports=i(function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()})},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(179);e.exports=function(e,t,r,i,a){var o=new Error(e);return n(o,t,r,i,a)}},function(e,t,r){"use strict";var n=r(8),i=r(180),a=r(178),o=r(177),s=r(176),f=r(78),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(175);e.exports=function(e){return new Promise(function(t,c){var l=e.data,h=e.headers;n.isFormData(l)&&delete h["Content-Type"];var d=new XMLHttpRequest,p="onreadystatechange",b=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(e.url)||(d=new window.XDomainRequest,p="onload",b=!0,d.onprogress=function(){},d.ontimeout=function(){}),e.auth){var v=e.auth.username||"",m=e.auth.password||"";h.Authorization="Basic "+u(v+":"+m)}if(d.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d[p]=function(){if(d&&(4===d.readyState||b)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?o(d.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:r,config:e,request:d};i(t,c,n),d=null}},d.onerror=function(){c(f("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(f("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var g=r(174),y=(e.withCredentials||s(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;y&&(h[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&n.forEach(h,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete h[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),c(e),d=null)}),void 0===l&&(l=null),d.send(l)})}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;nparseInt(a.scriptHash,16)?e.tx.scripts.push(n):e.tx.scripts.unshift(n),e}):Promise.resolve(e)},_=function(e){if(e.override||(e.override={}),e.sendingFromSmartContract){var t=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)(t.scriptHash))}return Promise.resolve(e)},S=function(e){if(e.sendingFromSmartContract){var t=(0,i.getScriptHashFromAddress)(e.address);return o.Query.getContractState(t).execute(e.url).then(function(r){var n=r.result.parameters,a={invocationScript:"00".repeat(n.length),verificationScript:""},o=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);return parseInt(t,16)>parseInt(o.scriptHash,16)?e.tx.scripts.push(a):e.tx.scripts.unshift(a),e})}return Promise.resolve(e)},k=function(e){return 0===e.tx.inputs.length&&0===e.tx.outputs.length&&(e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)((0,i.getScriptHashFromAddress)(e.address))),e.tx.addRemark(Date.now().toString()+(0,f.ab2hexstring)((0,i.generateRandomArray)(4)))),Promise.resolve(e)},x=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n5&&void 0!==arguments[5]?arguments[5]:0,d=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;l.warn("doTransferToken will be deprecated in favor of doInvoke");var p,b,v=new a.Account(r),m=(0,f.getRPCEndpoint)(e),g=(0,f.getBalance)(e,v.address);return Promise.all([m,g]).then(function(e){b=e[0];var r=e[1],o=(0,a.getScriptHashFromAddress)(v.address),f=(0,s.reverseHex)((0,a.getScriptHashFromAddress)(n)),l=[{assetId:c.ASSET_ID.GAS,value:1e-8,scriptHash:o}],p={scriptHash:t,operation:"transfer",args:[(0,s.reverseHex)(o),f,i]},m=u.Transaction.createInvocationTx(r,l,p,h,{version:1});return d?d(m,v.publicKey):m.sign(v.privateKey)}).then(function(e){return p=e,o.Query.sendRawTransaction(p).execute(b)}).then(function(e){return!0===e.result&&(e.txid=p.hash),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrices=t.getPrice=void 0;var n=i(r(27));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"NEO",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd";return o.warn("This is deprecated in favor of getPrices. There is a known bug for NEP5 tokens with this function."),f("https://api.coinmarketcap.com/v1/ticker/".concat(e.toLowerCase(),"/"),t).then(function(t){var r=t[e.toUpperCase()];if(r)return r;throw new Error("Something went wrong with the CoinMarketCap API!")}).catch(function(e){throw o.error(e.message),e})};function f(e,t){return t=t.toLowerCase(),s.includes(t)?n.default.get("".concat(e,"?limit=0&convert=").concat(t)).then(function(e){var r=e.data;if(r.error)throw new Error(r.error);return function(e,t){var r={};return e.forEach(function(e){r[e.symbol]=parseFloat(e["price_".concat(t.toLowerCase())])}),r}(r,t)}):Promise.reject(new ReferenceError("".concat(t," is not one of the accepted currencies!")))}t.getPrices=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["NEO"];return f("https://api.coinmarketcap.com/v1/ticker/",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd").then(function(t){e=e.map(function(e){return e.toUpperCase()});var r=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t.address||"",this.net=t.net||"NoNet",this.claims=t.claims?t.claims.map(function(e){return(0,i.ClaimItem)(e)}):[]}var t,r,n;return t=e,(r=[{key:a.default.inspect.custom,value:function(e,t){var r=this.claims.map(function(e){return"".concat(e.txid," <").concat(e.index,">: ").concat(e.claim.toString())});return"[Claims(".concat(this.net,"): ").concat(this.address,"]\n").concat(JSON.stringify(r,null,2))}},{key:"export",value:function(){return{address:this.address,net:this.net,claims:this.claims.map(i.exportClaimItem)}}},{key:"slice",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new e({address:this.address,net:this.net,claims:this.claims.slice(t,r)})}},{key:Symbol.toStringTag,get:function(){return"Claims"}}])&&o(t.prototype,r),n&&o(t,n),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(20)),i=o(r(30)),a=r(3);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:a.DEFAULT_WALLET,r=t.name,n=void 0===r?"myWallet":r,i=t.version,o=void 0===i?a.DEFAULT_WALLET.version:i,s=t.scrypt,u=void 0===s?a.DEFAULT_SCRYPT:s,c=t.accounts,l=void 0===c?[]:c,h=t.extra,d=void 0===h?null:h;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=n,this.version=o,this.scrypt={n:u.n||u.cost,r:u.r||u.blockSize,p:u.p||u.parallel},this.accounts=[];var p=!0,b=!1,v=void 0;try{for(var m,g=l[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var y=m.value;this.addAccount(y)}}catch(e){b=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(b)throw v}}this.extra=d,f.info("New Wallet created: ".concat(this.name))}var t,r,o;return t=e,r=[{key:"addAccount",value:function(e){var t=this.accounts.length;e instanceof i.default||(e=new i.default(e)),this.accounts.push(e);try{var r=e.address;f.info("Added Account: ".concat(r," to Wallet ").concat(this.name))}catch(e){f.warn("Encrypted account added to Wallet ".concat(this.name,". You will not be able to export this wallet without first decrypting this account"))}return t}},{key:"decrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].decrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"decryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.decrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"encrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].encrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"encryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.encrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"export",value:function(){return{name:this.name,version:this.version,scrypt:this.scrypt,accounts:this.accounts.map(function(e){return e.export()}),extra:this.extra}}},{key:"setDefault",value:function(e){for(var t=0;t)?=?)";var A=f++;s[A]=s[c]+"|x|X|\\*";var M=f++;s[M]=s[u]+"|x|X|\\*";var E=f++;s[E]="[v=\\s]*("+s[M]+")(?:\\.("+s[M]+")(?:\\.("+s[M]+")(?:"+s[v]+")?"+s[y]+"?)?)?";var T=f++;s[T]="[v=\\s]*("+s[A]+")(?:\\.("+s[A]+")(?:\\.("+s[A]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var I=f++;s[I]="^"+s[x]+"\\s*"+s[E]+"$";var P=f++;s[P]="^"+s[x]+"\\s*"+s[T]+"$";var O=f++;s[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var R=f++;s[R]="(?:~>?)";var C=f++;s[C]="(\\s*)"+s[R]+"\\s+",o[C]=new RegExp(s[C],"g");var B=f++;s[B]="^"+s[R]+s[E]+"$";var j=f++;s[j]="^"+s[R]+s[T]+"$";var N=f++;s[N]="(?:\\^)";var L=f++;s[L]="(\\s*)"+s[N]+"\\s+",o[L]=new RegExp(s[L],"g");var F=f++;s[F]="^"+s[N]+s[E]+"$";var z=f++;s[z]="^"+s[N]+s[T]+"$";var H=f++;s[H]="^"+s[x]+"\\s*("+S+")$|^$";var U=f++;s[U]="^"+s[x]+"\\s*("+_+")$|^$";var D=f++;s[D]="(\\s*)"+s[x]+"\\s*("+S+"|"+s[E]+")",o[D]=new RegExp(s[D],"g");var q=f++;s[q]="^\\s*("+s[E]+")\\s+-\\s+("+s[E]+")\\s*$";var K=f++;s[K]="^\\s*("+s[T]+")\\s+-\\s+("+s[T]+")\\s*$";var Y=f++;s[Y]="(<|>)?=?\\s*\\*";for(var V=0;Vi)return null;if(!(t?o[k]:o[w]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(e instanceof X){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof X))return new X(e,t);n("SemVer",e,t),this.loose=t;var r=e.trim().match(t?o[k]:o[w]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new X(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(ee(e,t))return null;var r=W(e),n=W(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=G;var Z=/^[0-9]+$/;function G(e,t){var r=Z.test(e),n=Z.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function Q(e,t,r){return new X(e,r).compare(new X(t,r))}function $(e,t,r){return Q(e,t,r)>0}function J(e,t,r){return Q(e,t,r)<0}function ee(e,t,r){return 0===Q(e,t,r)}function te(e,t,r){return 0!==Q(e,t,r)}function re(e,t,r){return Q(e,t,r)>=0}function ne(e,t,r){return Q(e,t,r)<=0}function ie(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=ee(e,r,n);break;case"!=":i=te(e,r,n);break;case">":i=$(e,r,n);break;case">=":i=re(e,r,n);break;case"<":i=J(e,r,n);break;case"<=":i=ne(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ae(e,t){if(e instanceof ae){if(e.loose===t)return e;e=e.value}if(!(this instanceof ae))return new ae(e,t);n("comparator",e,t),this.loose=t,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new X(e,t).major},t.minor=function(e,t){return new X(e,t).minor},t.patch=function(e,t){return new X(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=$,t.lt=J,t.eq=ee,t.neq=te,t.gte=re,t.lte=ne,t.cmp=ie,t.Comparator=ae;var oe={};function se(e,t){if(e instanceof se)return e.loose===t?e:new se(e.raw,t);if(e instanceof ae)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function fe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ue(e,t,r,n,i,a,o,s,f,u,c,l,h){return((t=fe(r)?"":fe(n)?">="+r+".0.0":fe(i)?">="+r+"."+n+".0":">="+t)+" "+(s=fe(f)?"":fe(u)?"<"+(+f+1)+".0.0":fe(c)?"<"+f+"."+(+u+1)+".0":l?"<="+f+"."+u+"."+c+"-"+l:"<="+s)).trim()}function ce(e,t){for(var r=0;r0){var i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new se(t,r)}catch(e){return!1}return t.test(e)}function he(e,t,r,n){var i,a,o,s,f;switch(e=new X(e,n),t=new se(t,n),r){case">":i=$,a=ne,o=J,s=">",f=">=";break;case"<":i=J,a=re,o=$,s="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var u=0;u=0.0.0")),c=c||e,l=l||e,i(e.semver,c.semver,n)?c=e:o(e.semver,l.semver,n)&&(l=e)}),c.operator===s||c.operator===f)return!1;if((!l.operator||l.operator===s)&&a(e,l.semver))return!1;if(l.operator===f&&o(e,l.semver))return!1}return!0}ae.prototype.parse=function(e){var t=this.loose?o[H]:o[U],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new X(r[2],this.loose):this.semver=oe},ae.prototype.toString=function(){return this.value},ae.prototype.test=function(e){return n("Comparator.test",e,this.loose),this.semver===oe||("string"==typeof e&&(e=new X(e,this.loose)),ie(e,this.operator,this.semver,this.loose))},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new se(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),f=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||f},t.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),n("range",e,t);var r=t?o[K]:o[q];e=e.replace(r,ue),n("hyphen replace",e),e=e.replace(o[D],"$1$2$3"),n("comparator trim",e,o[D]),e=(e=(e=e.replace(o[C],"$1~")).replace(o[L],"$1^")).split(/\s+/).join(" ");var i=t?o[H]:o[U],a=e.split(" ").map(function(e){return function(e,t){return n("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t?o[z]:o[F];return e.replace(r,function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t?o[j]:o[B];return e.replace(r,function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t?o[P]:o[I];return e.replace(r,function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var f=fe(i),u=f||fe(a),c=u||fe(o),l=c;return"="===r&&l&&(r=""),f?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(a=0),c&&(o=0),">"===r?(r=">=",u?(i=+i+1,a=0,o=0):c&&(a=+a+1,o=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[Y],"")}(e,t),n("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(a=a.filter(function(e){return!!e.match(i)})),a=a.map(function(e){return new ae(e,t)})},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.loose));for(var t=0;t",r)},t.outside=he,t.prerelease=function(e,t){var r=W(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(o[O]);return null==t?null:W((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.magic=t.magic||t.Magic||0,this.addressVersion=t.addressVersion||t.AddressVersion||23,this.standbyValidators=t.standbyValidators||t.StandbyValidators||[],this.seedList=t.seedList||t.SeedList||[],this.systemFee=t.systemFee||t.SystemFee||n.DEFAULT_SYSFEE}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?JSON.parse(t):t;return new e(Object.assign(n,{extra:n.extra||n.Extra,name:n.name||n.Name||r}))}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing protocol file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"writeFile",value:function(e){return i.default.writeFile(e,this.export(),function(e){if(e)throw e;return console.log("Protocol file written!"),!0})}},{key:"export",value:function(){return{Magic:this.magic,AddressVersion:this.addressVersion,StandbyValidators:this.standbyValidators,SeedList:this.seedList,SystemFee:this.systemFee}}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e){e.exports={MainNet:{Name:"MainNet",ProtocolConfiguration:{Magic:7630401,AddressVersion:23,StandbyValidators:["03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c","02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093","03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a","02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554","024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d","02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e","02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70"],SeedList:["seed1.neo.org:10333","seed2.neo.org:10333","seed3.neo.org:10333","seed4.neo.org:10333","seed5.neo.org:10333"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neonDB:"http://api.wallet.cityofzion.io",neoscan:"https://api.neoscan.io/api/main_net"}},TestNet:{Name:"TestNet",ProtocolConfiguration:{Magic:1953787457,AddressVersion:23,StandbyValidators:["0327da12b5c40200e9f65569476bbff2218da4f32548ff43b6387ec1416a231ee8","026ce35b29147ad09e4afe4ec4a7319095f08198fa8babbe3c56e970b143528d22","0209e7fd41dfb5c2f8dc72eb30358ac100ea8c72da18847befe06eade68cebfcb9","039dafd8571a641058ccc832c5e2111ea39b09c0bde36050914384f7a48bce9bf9","038dddc06ce687677a53d54f096d2591ba2302068cf123c1f2d75c2dddc5425579","02d02b1873a0863cd042cc717da31cea0d7cf9db32b74d4c72c01b0011503e2e22","034ff5ceeac41acf22cd5ed2da17a6df4dd8358fcb2bfb1a43208ad0feaab2746b"],SeedList:["seed1.neo.org:20333","seed2.neo.org:20333","seed3.neo.org:20333","seed4.neo.org:20333","seed5.neo.org:20333"],SystemFee:{EnrollmentTransaction:10,IssueTransaction:5,PublishTransaction:5,RegisterTransaction:100}},ExtraConfiguration:{neonDB:"http://testnet-api.wallet.cityofzion.io",neoscan:"https://neoscan-testnet.io/api/test_net"}},CozNet:{Name:"CozNet",ProtocolConfiguration:{Magic:1010102,AddressVersion:23,StandbyValidators:["032d9e51c7d48b0f5cc63d63deb89767685832cf69eb7113900290f217ae0504ee","022a5b7ccf03166a95e1750f0c350c734c34fe7aac66622eecdb5a529d2e69b1df","03c478d43271c297696ee3ab5a7946ee60287015c7dca6cba867819c7f271bc4ea","0393ef777d01fb60eef1da3474b975c6a393b464bcfe588e2ad7dbc4dbdfa2c244"],SeedList:["188.68.34.29:10330","188.68.34.29:10332","188.68.34.29:10334","188.68.34.29:10336"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neoscan:"https://coz.neoscan-testnet.io/api/main_net"}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDeployScript=t.createScript=void 0;var n,i=r(0),a=(n=r(52))&&n.__esModule?n:{default:n};t.createScript=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.type||128,this.version=r.version||i.TX_VERSION.CONTRACT,this.attributes=r.attributes||[],this.inputs=r.inputs||[],this.outputs=r.outputs?r.outputs.map(function(e){return f.TransactionOutput(e)}):[],this.scripts=r.scripts||[];var n=c.getExclusive[this.type](r);Object.keys(n).map(function(e){t[e]=n[e]})}var t,r,l;return t=e,r=[{key:"addOutput",value:function(e,t,r){if(3===arguments.length)this.outputs.push(f.createTransactionOutput(e,t,r));else{if("object"!==d(arguments[0]))throw new Error("Invalid input given! Give either 1 or 3 arguments!");this.outputs.push(arguments[0])}return this}},{key:"addAttribute",value:function(e,t){if("string"!=typeof t)throw new TypeError("data should be formatted as string!");return this.attributes.push({usage:e,data:t}),this}},{key:"addRemark",value:function(e){var t=(0,o.str2hexstring)(e);return this.addAttribute(s.default.Remark,t)}},{key:"calculate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=u.calculateInputs(e,this.outputs,this.gas,t),n=r.inputs,i=r.change;return this.inputs=n,this.outputs=this.outputs.concat(i),e.applyTx(this),b.info("Calculated the inputs required for Transaction with Balance: ".concat(e.address)),this}},{key:"serialize",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return u.serializeTransaction(this,e)}},{key:"serializeExclusiveData",value:function(){return c.serializeExclusive[this.type](this)}},{key:"sign",value:function(e){return"string"==typeof e&&(e=new n.Account(e)),u.signTransaction(this,e.privateKey),b.info("Signed Transaction with Account: ".concat(e.label)),this}},{key:Symbol.toStringTag,get:function(){return"Transaction"}},{key:"exclusiveData",get:function(){return c.getExclusive[this.type](this)}},{key:"hash",get:function(){return u.getTransactionHash(this)}}],l=[{key:"createClaimTx",value:function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.claims.length)throw new Error("Useless transaction! There is no claims!");var s=new n.Account(t),f=Object.assign({type:2,version:i.TX_VERSION.CLAIM},a),u=new o.Fixed8(0);f.claims=r.claims.slice(0,255).map(function(e){return u=u.add(e.claim),{prevHash:e.txid,prevIndex:e.index}}),f.outputs=[{assetId:i.ASSET_ID.GAS,value:u,scriptHash:s.scriptHash}];var c=new e(Object.assign(f,a));return b.info("New ClaimTransaction for ".concat(s.address)),c}},{key:"createContractTx",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===r)throw new Error("Useless transaction! You are not sending anything!");var a=new e(Object.assign({type:128,version:i.TX_VERSION.CONTRACT,outputs:r},n)).calculate(t);return b.info("New ContractTransaction for ".concat(t.address)),a}},{key:"createInvocationTx",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};null===r&&(r=[]);var f=new e(Object.assign({type:209,version:i.TX_VERSION.INVOCATION,outputs:r,script:"string"==typeof n?n:(0,a.createScript)(n),gas:o},s)).calculate(t);return b.info("New InvocationTransaction for ".concat(t.address)),f}},{key:"deserialize",value:function(t){var r=u.deserializeTransaction(t),n=c.getExclusive[r.type](r);return new e(Object.assign(r,n))}}],r&&p(t.prototype,r),l&&p(t,l),e}();t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(55))&&n.__esModule?n:{default:n},a=r(17),o=r(3),s=r(0),f=r(19);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=r.address||"",this.net=r.net||"NoNet",this.assetSymbols=r.assetSymbols?r.assetSymbols:[],this.assets={},r.assets&&Object.keys(r.assets).map(function(e){"object"===u(r.assets[e])&&t.addAsset(e,r.assets[e])}),this.tokenSymbols=r.tokenSymbols?r.tokenSymbols:[],this.tokens=r.tokens?r.tokens:{}}var t,r,n;return t=e,r=[{key:"addAsset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.default)();e=e.toUpperCase(),this.assetSymbols.push(e);var r=(0,i.default)(t);return this.assets[e]=r,this}},{key:"addToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e=e.toUpperCase(),this.tokenSymbols.push(e),this.tokens[e]=new s.Fixed8(t),this}},{key:"applyTx",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e instanceof a.Transaction?e:a.Transaction.deserialize(e);var n=this.assetSymbols,i=!0,s=!1,f=void 0;try{for(var u,c=function(){var e=u.value,r=function(t){return t.txid===e.prevHash&&t.index===e.prevIndex},i=!0,a=!1,o=void 0;try{for(var s,f=n[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var c=s.value,l=t.assets[c],h=l.unspent.findIndex(r);if(h>=0){var d=l.unspent.splice(h,1);l.spent=l.spent.concat(d);break}}}catch(e){a=!0,o=e}finally{try{i||null==f.return||f.return()}finally{if(a)throw o}}},l=e.inputs[Symbol.iterator]();!(i=(u=l.next()).done);i=!0)c()}catch(e){s=!0,f=e}finally{try{i||null==l.return||l.return()}finally{if(s)throw f}}for(var h=e.hash,d=function(n){var i=e.outputs[n],a=o.ASSETS[i.assetId],s=t.assets[a];s||t.addAsset(a);var f={index:n,txid:h,value:i.value};if(r){var u=s.unconfirmed.findIndex(function(e){return e.txid===f.txid&&e.index===f.index});u>=0&&s.unconfirmed.splice(u,1),s.balance=s.balance.add(i.value),s.unspent||(s.unspent=[]),s.unspent.push(f)}else s.unconfirmed||(s.unconfirmed=[]),s.unconfirmed.push(f);t.assets[a]=s},p=0;p=0&&n<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[u]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(e){}}(n),i.call(f,n,e),typeof console===t&&n=64;){var d,p,b,v,m,g=r,y=n,w=i,_=a,S=o,k=s,x=f,A=u;for(p=0;p<16;p++)b=l+4*p,c[p]=(255&e[b])<<24|(255&e[b+1])<<16|(255&e[b+2])<<8|255&e[b+3];for(p=16;p<64;p++)v=((d=c[p-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,m=((d=c[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,c[p]=(v+c[p-7]|0)+(m+c[p-16]|0)|0;for(p=0;p<64;p++)v=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&k^~S&x)|0)+(A+(t[p]+c[p]|0)|0)|0,m=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&y^g&w^y&w)|0,A=x,x=k,k=S,S=_+v|0,_=w,w=y,y=g,g=v+m|0;r=r+g|0,n=n+y|0,i=i+w|0,a=a+_|0,o=o+S|0,s=s+k|0,f=f+x|0,u=u+A|0,l+=64,h-=64}}l(e);var h,d=e.length%64,p=e.length/536870912|0,b=e.length<<3,v=d<56?56:120,m=e.slice(e.length-d,e.length);for(m.push(128),h=d+1;h>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(b>>>24&255),m.push(b>>>16&255),m.push(b>>>8&255),m.push(b>>>0&255),l(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function a(e,t,r){var n;e=e.length<=64?e:i(e);var a=64+t.length+4,o=new Array(a),s=new Array(64),f=[];for(n=0;n<64;n++)o[n]=54;for(n=0;n=a-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)u(),f=f.concat(i(s.concat(i(o)))),r-=32;return r>0&&(u(),f=f.concat(i(s.concat(i(o))).slice(0,r))),f}function o(e,t,r,n,i){var a;for(c(e,16*(2*r-1),i,0,16),a=0;a<2*r;a++)u(e,16*a,i,16),f(i,n),c(i,0,e,t+16*a,16);for(a=0;a>>32-t}function f(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(r=0;r<16;++r)e[r]+=t[r]}function u(e,t,r,n){for(var i=0;i=256)return!1}return!0}function h(e,t){var r=parseInt(e);if(e!=r)throw new Error("invalid "+t);return r}e.exports=function(e,r,i,s,f,d,p){if(!p)throw new Error("missing callback");if(i=h(i,"N"),s=h(s,"r"),f=h(f,"p"),d=h(d,"dkLen"),0===i||0!=(i&i-1))throw new Error("N must be power of 2");if(i>n/128/s)throw new Error("N too large");if(s>n/128/f)throw new Error("r too large");if(!l(e))throw new Error("password must be an array or buffer");if(!l(r))throw new Error("salt must be an array or buffer");for(var b=a(e,r,128*f*s),v=new Uint32Array(32*f*s),m=0;mR&&(r=R);for(var t=0;tR&&(r=R),t=0;t>0&255),b.push(v[t]>>8&255),b.push(v[t]>>16&255),b.push(v[t]>>24&255);var h=a(e,b,d);return p(null,1,h)}C(B)};B()}}()}).call(this,r(37).setImmediate)},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function a(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var o=i>=0?arguments[i]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return t=r(a(t.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===o(e,-1);return(e=r(a(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(a(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),a=n(r.split("/")),o=Math.min(i.length,a.length),s=o,f=0;fr?String.fromCharCode(r):(e.push(r),t=191r?1:2,"");if(0r?String.fromCharCode((31&r)<<6|63&n):String.fromCharCode((15&r)<<12|(63&n)<<6|63&i);return e.length=0,r},this.yb=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>3<<3,t}function ra(e){var t=sa;return sa=(sa=sa+e|0)+7>>3<<3,t}function ua(e){var t=z;return(z=(z=z+e|0)+7>>3<<3)>=va&&wa("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs."),t}function xa(e,t){return Math.ceil(e/(t||8))*(t||8)}var ma=4,ya={},za=p,Aa;function w(e,t){e||wa("Assertion failed: "+t)}function Ca(a){try{var b=s["_"+a];b||(b=eval("_"+a))}catch(e){}return w(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function Ba(e,t,r,n){var i=0,a=0;n=n?n.map(function(e){return function(e,t){if("string"==t){if(e===m||e===k||0===e)return 0;i||(i=ja());var r=qa(e.length+1);return Da(e,r),r}return"array"==t?(i||(i=ja()),Ea(e,r=qa(e.length)),r):e}(e,r[a++])}):[];return e=e.apply(m,n),"string"==t?t=Fa(e):(w("array"!=t),t=e),i&&ka(i),t}function Ga(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":A[e]=t;break;case"i16":Ha[e>>1]=t;break;case"i32":B[e>>2]=t;break;case"i64":Aa=[t>>>0,(0|Math.min(+Math.floor(t/4294967296),4294967295))>>>0],B[e>>2]=Aa[0],B[e+4>>2]=Aa[1];break;case"float":Ia[e>>2]=t;break;case"double":Ja[e>>3]=t;break;default:wa("invalid type for setValue: "+r)}}s.ccall=function(e,t,r,n){return Ba(Ca(e),t,r,n)},s.cwrap=function(e,t,r){var n=Ca(e);return function(){return Ba(n,t,r,Array.prototype.slice.call(arguments))}},s.setValue=Ga,s.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return A[e];case"i16":return Ha[e>>1];case"i32":case"i64":return B[e>>2];case"float":return Ia[e>>2];case"double":return Ja[e>>3];default:wa("invalid type for setValue: "+t)}return m};var Ka=0,La=1,E=2,Na=4;function F(e,t,r,n){var i,a;"number"==typeof e?(i=l,a=e):(i=p,a=e.length);var o="string"==typeof t?t:m;r=r==Na?n:[Oa,qa,ra,ua][r===k?E:r](Math.max(a,o?1:t.length));if(i){for(n=r,w(0==(3&r)),e=r+(-4&a);n>2]=0;for(e=r+a;n=t?2*Math.abs(1<=e)return e;var r=32>=t?Math.abs(1<=r&&(32>=t||e>r)&&(e=-2*r+e),e}s.addOnPreRun=s.Vd=bb,s.addOnInit=s.Sd=function(e){Xa.unshift(e)},s.addOnPreMain=s.Ud=function(e){Ya.unshift(e)},s.addOnExit=s.Rd=function(e){Za.unshift(e)},s.addOnPostRun=s.Td=cb,s.intArrayFromString=J,s.intArrayToString=function(e){for(var t=[],r=0;r>>16)*n+r*(t>>>16)<<16)|0}),Math.ie=Math.imul;var L=0,fb={},gb=p,hb=m,nb,ob,pb;function ib(e){L++,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(!fb[e]),fb[e]=1):s.P("warning: run dependency added without ID")}function jb(e){L--,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(fb[e]),delete fb[e]):s.P("warning: run dependency removed without ID"),0==L&&(hb!==m&&(clearInterval(hb),hb=m),!gb&&kb&&lb())}s.addRunDependency=ib,s.removeRunDependency=jb,s.preloadedImages={},s.preloadedAudios={},Ra=8,sa=Ra+1312,Xa.push({V:function(){mb()}}),nb=nb=F([0,0,0,0,0,0,0,0],"i8",E),ob=ob=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),pb=pb=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),F([111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,115,0,0,0,0,0,0,0,111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,99,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,56,3,0,0,0,0,0,0,63,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,111,112,116,105,111,110,32,100,111,101,115,110,39,116,32,116,97,107,101,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,46,42,115,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,115,0,0,0,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,99,0,0,0,0,255,255,255,255,0,0,0,0,97,109,98,105,103,117,111,117,115,32,111,112,116,105,111,110,32,45,45,32,37,46,42,115,0,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,80,79,83,73,88,76,89,95,67,79,82,82,69,67,84,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,37,115,58,32,0,0,0,0,37,115,10,0,0,0,0,0,37,115,10,0,0,0,0,0,105,110,32,117,115,101,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,37,115,58,32,0,0,0,0,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,58,32,0,0,0,0,0,0,58,32,0,0,0,0,0,0,115,121,115,116,101,109,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,109,97,120,32,115,121,115,116,101,109,32,98,121,116,101,115,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,0,0,0,0,176,2,0,0,6,0,0,0,10,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,2,0,0,6,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,116,57,101,120,99,101,112,116,105,111,110,0,0,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,83,116,50,48,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,0,0,0,0,120,2,0,0,168,2,0,0,0,0,0,0,0,0,0,0,136,2,0,0,176,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",Na,8);var qb=xa(F(12,"i8",E),8);w(0==qb%8);var rb=0;function M(e){return B[rb>>2]=e}s._memcpy=sb,s._memset=tb;var N={L:1,ca:2,Bd:3,sc:4,I:5,za:6,Jb:7,Sc:8,$:9,Zb:10,ua:11,Ld:11,$a:12,Ya:13,kc:14,ed:15,Wb:16,va:17,Md:18,wa:19,gd:20,aa:21,A:22,Mc:23,Za:24,ld:25,Id:26,lc:27,ad:28,da:29,yd:30,Fc:31,rd:32,hc:33,ab:34,Wc:35,pc:36,$b:37,vc:38,wc:39,xc:40,Ec:41,Jd:42,Qc:43,uc:44,ec:45,Tc:46,Pb:50,Sb:51,Nd:52,Oc:53,Tb:54,Ub:55,fc:56,Vb:57,cd:60,Rc:61,Fd:62,bd:63,Xc:64,Yc:65,xd:66,Uc:67,Mb:68,Cd:69,ac:70,td:71,Hc:74,yc:75,ic:76,Rb:77,mc:79,md:80,Qb:81,wd:82,zc:83,Ac:84,Dc:85,Cc:86,Bc:87,dd:88,Nc:89,ya:90,Ic:91,ba:92,nd:95,qd:96,dc:104,Pc:105,Nb:106,vd:107,jd:108,Zc:109,zd:110,cc:111,Kb:112,bc:113,Lc:114,Jc:115,Gd:116,nc:117,oc:118,rc:119,Ob:120,gc:121,Gc:122,ud:123,Ad:124,Lb:125,Kc:126,tc:127,fd:128,Hd:129,sd:130,Kd:131,jc:132,Dd:133,kd:134,Vc:135,$c:136,Yb:137,qc:138,od:139,Xb:140,hd:141,pd:142,Ed:143},ub={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"No message of desired type",36:"Identifier removed",37:"Channel number out of range",38:"Level 2 not synchronized",39:"Level 3 halted",40:"Level 3 reset",41:"Link number out of range",42:"Protocol driver not attached",43:"No CSI structure available",44:"Level 2 halted",45:"Deadlock condition",46:"No record locks available",50:"Invalid exchange",51:"Invalid request descriptor",52:"Exchange full",53:"No anode",54:"Invalid request code",55:"Invalid slot",56:"File locking deadlock error",57:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",74:"Multihop attempted",75:"Inode is remote (not really error)",76:"Cross mount point (not really error)",77:"Trying to read unreadable message",79:"Inappropriate file type or format",80:"Given log. name not unique",81:"f.d. invalid for this operation",82:"Remote address changed",83:"Can\t access a needed shared lib",84:"Accessing a corrupted shared lib",85:".lib section in a.out corrupted",86:"Attempting to link in too many libs",87:"Attempting to exec a shared library",88:"Function not implemented",89:"No more files",90:"Directory not empty",91:"File or path name too long",92:"Too many symbolic links",95:"Operation not supported on transport endpoint",96:"Protocol family not supported",104:"Connection reset by peer",105:"No buffer space available",106:"Address family not supported by protocol family",107:"Protocol wrong type for socket",108:"Socket operation on non-socket",109:"Protocol not available",110:"Can't send after socket shutdown",111:"Connection refused",112:"Address already in use",113:"Connection aborted",114:"Network is unreachable",115:"Network interface is not configured",116:"Connection timed out",117:"Host is down",118:"Host is unreachable",119:"Connection already in progress",120:"Socket already connected",121:"Destination address required",122:"Message too long",123:"Unknown protocol",124:"Socket type not supported",125:"Address not available",126:"ENETRESET",127:"Socket is already connected",128:"Socket is not connected",129:"TOOMANYREFS",130:"EPROCLIM",131:"EUSERS",132:"EDQUOT",133:"ESTALE",134:"Not supported",135:"No medium (in tape drive)",136:"No such host or network path",137:"Filename exists with different case",138:"EILSEQ",139:"Value too large for defined data type",140:"Operation canceled",141:"State not recoverable",142:"Previous owner died",143:"Streams pipe error"};function vb(e,t,r){var n=O(e,{parent:l}).d,i=xb(n,e="/"===e?"/":wb(e)[2]);return i&&g(new Q(i)),n.l.Ta||g(new Q(N.L)),n.l.Ta(n,e,t,r)}function yb(e,t){return vb(e,t=4095&t|32768,0)}function zb(e,t){return vb(e,t=1023&t|16384,0)}function Ab(e,t,r){return vb(e,8192|t,r)}function Bb(e,t){var r=O(t,{parent:l}).d,n="/"===t?"/":wb(t)[2],i=xb(r,n);return i&&g(new Q(i)),r.l.Wa||g(new Q(N.L)),r.l.Wa(r,n,e)}function Cb(e,t){var r;(r="string"==typeof e?O(e,{N:l}).d:e).l.Y||g(new Q(N.L)),r.l.Y(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function Db(e,t){var r,n,i;e=Eb(e);"string"==typeof t?void 0===(n=Fb[t])&&g(Error("Unknown file open mode: "+t)):n=t,r=512&(t=n)?4095&r|32768:0;try{var a=O(e,{N:!(65536&t)});i=a.d,e=a.path}catch(e){}512&t&&(i?2048&t&&g(new Q(N.va)):i=vb(e,r,0)),i||g(new Q(N.ca)),8192==(61440&i.mode)&&(t&=-1025),i?40960==(61440&i.mode)?r=N.ba:16384==(61440&i.mode)&&(0!=(3&t)||1024&t)?r=N.aa:(r=["r","w","rw"][3&t],1024&t&&(r+="w"),r=Gb(i,r)):r=N.ca,r&&g(new Q(r)),1024&t&&((r="string"==typeof(r=i)?O(r,{N:l}).d:r).l.Y||g(new Q(N.L)),16384==(61440&r.mode)&&g(new Q(N.aa)),32768!=(61440&r.mode)&&g(new Q(N.A)),(a=Gb(r,"w"))&&g(new Q(a)),r.l.Y(r,{size:0,timestamp:Date.now()}));var o,s={path:e,d:i,M:t,seekable:l,position:0,e:i.e,Gb:[],error:p};e:{for(i=k||4096,r=k||1;r<=i;r++)if(!R[r]){o=r;break e}g(new Q(N.Za))}return s.s=o,Object.defineProperty(s,"object",{get:function(){return s.d},set:function(e){s.d=e}}),Object.defineProperty(s,"isRead",{get:function(){return 1!=(3&s.M)}}),Object.defineProperty(s,"isWrite",{get:function(){return 0!=(3&s.M)}}),Object.defineProperty(s,"isAppend",{get:function(){return 8&s.M}}),R[o]=s,s.e.open&&s.e.open(s),s}function Hb(e){try{e.e.close&&e.e.close(e)}catch(e){g(e)}finally{R[e.s]=m}}function Ib(e,t,r,n,i){(0>n||0>i)&&g(new Q(N.A)),0==(3&e.M)&&g(new Q(N.$)),16384==(61440&e.d.mode)&&g(new Q(N.aa)),e.e.write||g(new Q(N.A));var a=l;return void 0===i?(i=e.position,a=p):e.seekable||g(new Q(N.da)),8&e.M&&((!e.seekable||!e.e.na)&&g(new Q(N.da)),e.e.na(e,0,2)),t=e.e.write(e,t,r,n,i),a||(e.position+=t),t}function wb(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)}function Jb(e,t){for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function Eb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return!(e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"))&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function S(){return Eb(Array.prototype.slice.call(arguments,0).filter(function(e){return"string"!=typeof e&&g(new TypeError("Arguments to path.join must be strings")),e}).join("/"))}function Kb(){for(var e="",t=p,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:"/";"string"!=typeof n&&g(new TypeError("Arguments to path.resolve must be strings")),n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}var Lb=[];function Mb(e,t){Lb[e]={input:[],H:[],O:t},Nb[e]={e:Ob}}var Ob={open:function(e){Pb||(Pb=new pa);var t=Lb[e.d.X];t||g(new Q(N.wa)),e.q=t,e.seekable=p},close:function(e){e.q.H.length&&e.q.O.W(e.q,10)},Q:function(e,t,r,n){(!e.q||!e.q.O.Na)&&g(new Q(N.za));for(var i=0,a=0;ar.length;)r.push(0)}},tb:function(){g(new Q(N.ca))},Ta:function(e,t,r,n){return T.ka(e,t,r,n)},rename:function(e,t,r){if(16384==(61440&e.mode)){var n;try{n=Sb(t,r)}catch(e){}if(n)for(var i in n.g)g(new Q(N.ya))}delete e.parent.g[e.name],e.name=r,t.g[r]=e},ze:function(e,t){delete e.g[t]},ve:function(e,t){var r,n=Sb(e,t);for(r in n.g)g(new Q(N.ya));delete e.g[t]},Wa:function(e,t,r){return(e=T.ka(e,t,41471,0)).link=r,e},Va:function(e){return 40960!=(61440&e.mode)&&g(new Q(N.A)),e.link}},e:{open:function(e){if(16384==(61440&e.d.mode)){var t,r=[".",".."];for(t in e.d.g)e.d.g.hasOwnProperty(t)&&r.push(t);e.lb=r}},Q:function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.subarray)t.set(e.subarray(i,i+n),r);else for(var a=0;at&&g(new Q(N.A)),e.Gb=[],e.position=t},ue:function(e){return e.lb},Wd:function(e,t,r){for(e=e.d.g,t+=r;t>e.length;)e.push(0)},ne:function(e,t,r,n,i,a,o){return 32768!=(61440&e.d.mode)&&g(new Q(N.wa)),e=e.d.g,2&o?((0e||0===e&&-1/0==1/e}function kc(e,t){function r(e){var r;return"double"===e?r=Ja[t+o>>3]:"i64"==e?(r=[B[t+o>>2],B[t+(o+8)>>2]],o+=8):(e="i32",r=B[t+o>>2]),o+=Math.max(Math.max(la(e),ma),8),r}for(var n,i,a=e,o=0,s=[];;){var f=a;if(0===(n=A[a]))break;if(i=A[a+1|0],37==n){var u=p,c=p,h=p,d=p;e:for(;;){switch(i){case 43:u=l;break;case 45:c=l;break;case 35:h=l;break;case 48:if(d)break e;d=l;break;default:break e}i=A[++a+1|0]}var b=0;if(42==i)b=r("i32"),i=A[++a+1|0];else for(;48<=i&&57>=i;)b=10*b+(i-48),i=A[++a+1|0];var v,g=p;if(46==i){var y=0;g=l;if(42==(i=A[++a+1|0]))y=r("i32"),a++;else for(;!(48>(i=A[a+1|0])||57>>0)+4294967296*+(n[1]>>>0):+(n[0]>>>0)+4294967296*+(0|n[1])),4>=v&&(n=(f?eb:db)(n&Math.pow(256,v)-1,8*v));var S=Math.abs(n);f="";if(100==i||105==i)w=8==v&&lc?lc.stringify(_[0],_[1],m):eb(n,8*v).toString(10);else if(117==i)w=8==v&&lc?lc.stringify(_[0],_[1],l):db(n,8*v).toString(10),n=Math.abs(n);else if(111==i)w=(h?"0":"")+S.toString(8);else if(120==i||88==i){if(f=h&&0!=n?"0x":"",8==v&&lc)if(_[1]){for(w=(_[1]>>>0).toString(16),h=(_[0]>>>0).toString(16);8>h.length;)h="0"+h;w+=h}else w=(_[0]>>>0).toString(16);else if(0>n){for(n=-n,w=(S-1).toString(16),_=[],h=0;hn?"-"+f:"+"+f);f.length+w.length(v=parseInt(n.toExponential(v).split("e")[1],10))&&-4<=v?(i=(103==i?"f":"F").charCodeAt(0),y-=v+1):(i=(103==i?"e":"E").charCodeAt(0),y--),v=Math.min(y,20)),101==i||69==i?(w=n.toExponential(v),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):102!=i&&70!=i||(w=n.toFixed(v),0===n&&jc(n)&&(w="-"+w)),f=w.split("e"),g&&!h)for(;1v++;)f[0]+="0";w=f[0]+(1n?"-":"")+"inf",d=p;for(;w.lengthi&&(w=w.toUpperCase()),w.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":if(d=(u=r("i8*"))?ic(u):6,g&&(d=Math.min(d,y)),!c)for(;d>2]=s.length;break;case"%":s.push(n);break;default:for(h=f;h>12<<12,nc.ia=l,w(ua),nc.hb=ua,ua=function(){wa("cannot dynamically allocate, sbrk now has control")});var t=z;return 0!=e&&nc.hb(e),t}function U(){return B[U.m>>2]}function oc(){return!!oc.ta}function pc(e){var t=p;try{e==__ZTIi&&(t=l)}catch(e){}try{e==__ZTIj&&(t=l)}catch(e){}try{e==__ZTIl&&(t=l)}catch(e){}try{e==__ZTIm&&(t=l)}catch(e){}try{e==__ZTIx&&(t=l)}catch(e){}try{e==__ZTIy&&(t=l)}catch(e){}try{e==__ZTIf&&(t=l)}catch(e){}try{e==__ZTId&&(t=l)}catch(e){}try{e==__ZTIe&&(t=l)}catch(e){}try{e==__ZTIc&&(t=l)}catch(e){}try{e==__ZTIa&&(t=l)}catch(e){}try{e==__ZTIh&&(t=l)}catch(e){}try{e==__ZTIs&&(t=l)}catch(e){}try{e==__ZTIt&&(t=l)}catch(e){}return t}function qc(e,t,r){if(0==r)return p;if(0==t||t==e)return l;switch(pc(t)?t:B[B[t>>2]-8>>2]){case 0:return 0==B[B[e>>2]-8>>2]?qc(B[e+8>>2],B[t+8>>2],r):p;case 1:return p;case 2:return qc(e,B[t+8>>2],r);default:return p}}function rc(e,t,r){if(!rc.sb){try{B[__ZTVN10__cxxabiv119__pointer_type_infoE>>2]=0}catch(e){}try{B[pb>>2]=1}catch(e){}try{B[ob>>2]=2}catch(e){}rc.sb=l}B[U.m>>2]=e,B[U.m+4>>2]=t,B[U.m+8>>2]=r,"uncaught_exception"in oc?oc.ta++:oc.ta=1,g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")}function sc(e){try{return tc(e)}catch(e){}}function uc(){if(uc.Bb)uc.Bb=p;else{V.setThrew(0),B[U.m+4>>2]=0;var e=B[U.m>>2],t=B[U.m+8>>2];t&&(na("vi",t,[e]),B[U.m+8>>2]=0),e&&(sc(e),B[U.m>>2]=0)}}s._strlen=ic;var vc=F(1,"i32*",E);function wc(e){var t,r;wc.ia?(r=B[vc>>2],t=B[r>>2]):(wc.ia=l,W.USER="root",W.PATH="/",W.PWD="/",W.HOME="/home/emscripten",W.LANG="en_US.UTF-8",W._="./this.program",t=F(1024,"i8",E),r=F(256,"i8*",E),B[r>>2]=t,B[vc>>2]=r);var n,i=[],a=0;for(n in e)if("string"==typeof e[n]){var o=n+"="+e[n];i.push(o),a+=o.length}for(1024>2]=t,t+=o.length+1}B[r+4*i.length>>2]=0}var W={};function xc(e){return 0===e?0:(e=Fa(e),W.hasOwnProperty(e)?(xc.J&&tc(xc.J),xc.J=F(J(W[e]),"i8",Ka),xc.J):0)}function yc(e,t,r){if(e in ub){if(ub[e].length>r-1)return M(N.ab);for(e=ub[e],r=0;r>2],B[SDL.screen+0*ma>>2]=8388608|e),Kc()}function Mc(){var e=s.canvas;e.width=this.Ib,e.height=this.Hb,"undefined"!=typeof SDL&&(e=Qa[SDL.screen+0*ma>>2],B[SDL.screen+0*ma>>2]=-8388609&e),Kc()}var Nc,Oc,Pc,Qc,rb=ra(4);B[rb>>2]=0;var Vb=Qb(m,"/",16895,0),Rc=T,Sc={type:Rc,se:{},Ua:"/",root:m},Tc;Tc=O("/",{N:p});var Uc=Rc.z(Sc);Uc.z=Sc,Sc.root=Uc,Tc&&(Tc.d.z=Sc,Tc.d.ub=l,Vb=Sc.root),zb("/tmp",511),zb("/dev",511),Nb[259]={e:{Q:function(){return 0},write:function(){return 0}}},Ab("/dev/null",438,259),Mb(1280,{Na:function(e){if(!e.input.length){var t=m;if(ca){if(process.Eb.be)return;t=process.Eb.Q()}else"undefined"!=typeof window&&"function"==typeof window.prompt?(t=window.prompt("Input: "))!==m&&(t+="\n"):"function"==typeof readline&&((t=readline())!==m&&(t+="\n"));if(!t)return m;e.input=J(t,l)}return e.input.shift()},W:function(e,t){t===m||10===t?(s.print(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Mb(1536,{W:function(e,t){t===m||10===t?(s.printErr(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Ab("/dev/tty",438,1280),Ab("/dev/tty1",438,1536),zb("/dev/shm",511),zb("/dev/shm/tmp",511),Xa.unshift({V:function(){if(!s.noFSInit&&!bc){w(!bc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),bc=l,s.stdin=s.stdin,s.stdout=s.stdout,s.stderr=s.stderr,s.stdin?ec("/dev","stdin",s.stdin):Bb("/dev/tty","/dev/stdin"),s.stdout?ec("/dev","stdout",m,s.stdout):Bb("/dev/tty","/dev/stdout"),s.stderr?ec("/dev","stderr",m,s.stderr):Bb("/dev/tty1","/dev/stderr");var e=Db("/dev/stdin","r");B[Tb>>2]=e.s,w(1===e.s,"invalid handle for stdin ("+e.s+")"),e=Db("/dev/stdout","w"),B[Ub>>2]=e.s,w(2===e.s,"invalid handle for stdout ("+e.s+")"),e=Db("/dev/stderr","w"),B[nb>>2]=e.s,w(3===e.s,"invalid handle for stderr ("+e.s+")")}}}),Ya.push({V:function(){Yb=p}}),Za.push({V:function(){bc=p;for(var e=0;e>a-6&63;a=a-6,r=r+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),u.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(u)}},u.src=f,setTimeout(function(){za||i(u)},1e4)}});var h=s.canvas;h.qa=h.requestPointerLock||h.mozRequestPointerLock||h.webkitRequestPointerLock,h.La=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||aa(),h.La=h.La.bind(document),document.addEventListener("pointerlockchange",u,p),document.addEventListener("mozpointerlockchange",u,p),document.addEventListener("webkitpointerlockchange",u,p),s.elementPointerLock&&h.addEventListener("click",function(e){!Ec&&h.qa&&(h.qa(),e.preventDefault())},p)}var d,b=S.apply(m,[e,t]);if("/"==b[0]&&(b=b.substr(1)),ib("cp "+(d=b)),"string"==typeof r){var v=o,y=function(){v?v():g('Loading data file "'+r+'" failed.')},_=new XMLHttpRequest;_.open("GET",r,l),_.responseType="arraybuffer",_.onload=function(){if(200==_.status||0==_.status&&_.response){var e=_.response;w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),c(e=new Uint8Array(e)),jb("al "+r)}else y()},_.onerror=y,_.send(m),ib("al "+r)}else c(r)},s.FS_createLazyFile=function(e,t,r,n,i){var a,o;"undefined"!=typeof XMLHttpRequest?(ea||g("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),(a=function(){this.ma=p,this.T=[]}).prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.S;return this.pb(Math.floor(e/this.S))[t]}},a.prototype.Cb=function(e){this.pb=e},a.prototype.Fa=function(){var e=new XMLHttpRequest;e.open("HEAD",r,p),e.send(m),200<=e.status&&300>e.status||304===e.status||g(Error("Couldn't load "+r+". Status: "+e.status));var t,n=Number(e.getResponseHeader("Content-length")),i=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(i=n);var a=this;a.Cb(function(e){var t=e*i,o=(e+1)*i-1;o=Math.min(o,n-1);if(void 0===a.T[e]){var s=a.T;t>o&&g(Error("invalid range ("+t+", "+o+") or no bytes requested!")),o>n-1&&g(Error("only "+n+" bytes available! programmer error!"));var f=new XMLHttpRequest;f.open("GET",r,p),n!==i&&f.setRequestHeader("Range","bytes="+t+"-"+o),"undefined"!=typeof Uint8Array&&(f.responseType="arraybuffer"),f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(m),200<=f.status&&300>f.status||304===f.status||g(Error("Couldn't load "+r+". Status: "+f.status)),t=f.response!==k?new Uint8Array(f.response||[]):J(f.responseText||"",l),s[e]=t}return void 0===a.T[e]&&g(Error("doXHR failed!")),a.T[e]}),this.gb=n,this.fb=i,this.ma=l},a=new a,Object.defineProperty(a,"length",{get:function(){return this.ma||this.Fa(),this.gb}}),Object.defineProperty(a,"chunkSize",{get:function(){return this.ma||this.Fa(),this.fb}}),o=k):(o=r,a=k);var f;e=S("string"==typeof e?e:ac(e),t);f=yb(e,cc(n,i)),a?f.g=a:o&&(f.g=m,f.url=o);var u={};return Object.keys(f.e).forEach(function(e){var t=f.e[e];u[e]=function(){var e;if(f.ke||f.le||f.link||f.g)e=l;else{if(e=l,"undefined"!=typeof XMLHttpRequest&&g(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")),s.read)try{f.g=J(s.read(f.url),l)}catch(t){e=p}else g(Error("Cannot load without read() or XMLHttpRequest."));e||M(N.I)}return e||g(new Q(N.I)),t.apply(m,arguments)}}),u.Q=function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.slice)for(var a=0;a>3<<3;return t|0}function at(){return l|0}function ot(e){e=e|0;l=e}function st(e,t){e=e|0;t=t|0;if((k|0)==0){k=e;x=t}}function ft(e){e=e|0;n[d]=n[e];n[d+1|0]=n[e+1|0];n[d+2|0]=n[e+2|0];n[d+3|0]=n[e+3|0]}function ut(e){e=e|0;n[d]=n[e];n[d+1|0]=n[e+1|0];n[d+2|0]=n[e+2|0];n[d+3|0]=n[e+3|0];n[d+4|0]=n[e+4|0];n[d+5|0]=n[e+5|0];n[d+6|0]=n[e+6|0];n[d+7|0]=n[e+7|0]}function ct(e){e=e|0;N=e}function lt(e){e=e|0;L=e}function ht(e){e=e|0;F=e}function dt(e){e=e|0;z=e}function pt(e){e=e|0;H=e}function bt(e){e=e|0;U=e}function vt(e){e=e|0;D=e}function mt(e){e=e|0;q=e}function gt(e){e=e|0;K=e}function yt(e){e=e|0;Y=e}function wt(){a[170]=y+8;a[172]=g+8;a[176]=g+8}function _t(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)==0){return}else{i=0}do{n[e+i|0]=n[t+i|0]|0;i=i+1|0}while(i>>>0>>0);return}function St(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0;if((r|0)==0){return}else{i=0}do{a=e+i|0;n[a]=n[a]^n[t+i|0];i=i+1|0}while(i>>>0>>0);return}function kt(e){e=e|0;var t=0,r=0,n=0,i=0;t=o[e+1|0]|0;r=o[e+2|0]|0;n=o[e+3|0]|0;i=rn(t<<8|0>>>24|(o[e]|0)|(r<<16|0>>>16)|(n<<24|0>>>8)|(0<<8|0>>>24),0<<8|t>>>24|(0<<16|r>>>16)|(0<<24|n>>>8)|(o[e+4|0]|0)|((o[e+5|0]|0)<<8|0>>>24),0<<16|0>>>16,(o[e+6|0]|0)<<16|0>>>16)|0;n=rn(i,N,0<<24|0>>>8,(o[e+7|0]|0)<<24|0>>>8)|0;return(N=N,n)|0}function xt(e){e=e|0;return(o[e+1|0]|0)<<8|(o[e]|0)|(o[e+2|0]|0)<<16|(o[e+3|0]|0)<<24|0}function At(e,t){e=e|0;t=t|0;n[e]=t&255;n[e+1|0]=t>>>8&255;n[e+2|0]=t>>>16&255;n[e+3|0]=t>>>24&255;return}function Mt(e){e=e|0;a[e+36>>2]=0;a[e+32>>2]=0;a[e>>2]=1779033703;a[e+4>>2]=-1150833019;a[e+8>>2]=1013904242;a[e+12>>2]=-1521486534;a[e+16>>2]=1359893119;a[e+20>>2]=-1694144372;a[e+24>>2]=528734635;a[e+28>>2]=1541459225;return}function Et(e,t,r,n,i,o,s,f,u,c){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;o=o|0;s=s|0;f=f|0;u=u|0;c=c|0;var l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0;l=dn(f,0,s,0)|0;h=N;d=0;if(h>>>0>d>>>0|h>>>0==d>>>0&l>>>0>1073741823>>>0){a[($e()|0)>>2]=27;p=-1;return p|0}l=rn(i,o,-1,-1)|0;if((l&i|0)!=0|(N&o|0)!=0|(i|0)==0&(o|0)==0){a[($e()|0)>>2]=22;p=-1;return p|0}do{if(!((33554431/(f>>>0)|0)>>>0>>0|s>>>0>16777215)){l=0;if(l>>>0>>0|l>>>0==o>>>0&(33554431/(s>>>0)|0)>>>0>>0){break}l=s<<7;d=Kt(oe(l,f)|0)|0;if((d|0)==0){p=-1;return p|0}h=Kt(s<<8)|0;do{if((h|0)!=0){b=dn(l,0,i,o)|0;v=Kt(b)|0;if((v|0)==0){Yt(h);break}b=oe(f<<7,s)|0;Dt(e,t,r,n,1,0,d,b);if((f|0)!=0){m=s<<7;g=0;do{Tt(d+(oe(m,g)|0)|0,s,i,o,v,h);g=g+1|0}while(g>>>0>>0)}Dt(e,t,d,b,1,0,u,c);Yt(v);Yt(h);Yt(d);p=0;return p|0}}while(0);Yt(d);p=-1;return p|0}}while(0);a[($e()|0)>>2]=12;p=-1;return p|0}function Tt(e,t,r,n,i,a){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;a=a|0;var o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0;o=t<<7;s=a+o|0;_t(a,e,o);if((r|0)==0&(n|0)==0){_t(e,a,o);return}f=o;u=0;c=0;l=0;do{h=dn(l,c,f,u)|0;_t(i+h|0,a,o);It(a,s,t);l=rn(l,c,1,0)|0;c=N}while(c>>>0>>0|c>>>0==n>>>0&l>>>0>>0);if((r|0)==0&(n|0)==0){_t(e,a,o);return}l=rn(r,n,-1,-1)|0;c=N;u=o;f=0;h=0;d=0;do{p=Pt(a,t)|0;b=dn(p&l,N&c,u,f)|0;St(a,i+b|0,o);It(a,s,t);d=rn(d,h,1,0)|0;h=N}while(h>>>0>>0|h>>>0==n>>>0&d>>>0>>0);_t(e,a,o);return}function It(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,a=0,o=0,s=0,f=0,u=0;n=l;l=l+64|0;i=n|0;a=r<<1;_t(i,e+((r<<7)-64)|0,64);if((a|0)!=0){o=0;do{s=o<<6;St(i,e+s|0,64);Ot(i);_t(t+s|0,i,64);o=o+1|0}while(o>>>0>>0)}if((r|0)==0){l=n;return}else{f=0}do{_t(e+(f<<6)|0,t+(f<<7)|0,64);f=f+1|0}while(f>>>0>>0);if((r|0)==0){l=n;return}else{u=0}do{_t(e+(u+r<<6)|0,t+(u<<7|64)|0,64);u=u+1|0}while(u>>>0>>0);l=n;return}function Pt(e,t){e=e|0;t=t|0;var r=0;r=kt(e+((t<<7)-64)|0)|0;return(N=N,r)|0}function Ot(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,U=0,D=0,q=0,K=0,Y=0,V=0,W=0,X=0,Z=0,G=0,Q=0,$=0,J=0,ee=0,te=0;t=l;l=l+128|0;r=t|0;n=t+64|0;i=0;do{a[r+(i<<2)>>2]=xt(e+(i<<2)|0)|0;i=i+1|0}while(i>>>0<16);i=r;o=n;Jr(o|0,i|0,64)|0;i=n|0;o=n+48|0;s=n+16|0;f=n+32|0;u=n+20|0;c=n+4|0;h=n+36|0;d=n+52|0;p=n+40|0;b=n+24|0;v=n+56|0;m=n+8|0;g=n+60|0;y=n+44|0;w=n+12|0;_=n+28|0;S=0;k=a[i>>2]|0;x=a[o>>2]|0;A=a[s>>2]|0;M=a[f>>2]|0;E=a[u>>2]|0;T=a[c>>2]|0;I=a[h>>2]|0;P=a[d>>2]|0;O=a[p>>2]|0;R=a[b>>2]|0;C=a[v>>2]|0;B=a[m>>2]|0;j=a[g>>2]|0;N=a[y>>2]|0;L=a[w>>2]|0;F=a[_>>2]|0;do{z=x+k|0;H=(z<<7|z>>>25)^A;z=H+k|0;U=(z<<9|z>>>23)^M;z=U+H|0;D=(z<<13|z>>>19)^x;z=D+U|0;q=(z<<18|z>>>14)^k;z=T+E|0;K=(z<<7|z>>>25)^I;z=K+E|0;Y=(z<<9|z>>>23)^P;z=Y+K|0;V=(z<<13|z>>>19)^T;z=V+Y|0;W=(z<<18|z>>>14)^E;z=R+O|0;X=(z<<7|z>>>25)^C;z=X+O|0;Z=(z<<9|z>>>23)^B;z=Z+X|0;G=(z<<13|z>>>19)^R;z=G+Z|0;Q=(z<<18|z>>>14)^O;z=N+j|0;$=(z<<7|z>>>25)^L;z=$+j|0;J=(z<<9|z>>>23)^F;z=J+$|0;ee=(z<<13|z>>>19)^N;z=ee+J|0;te=(z<<18|z>>>14)^j;z=$+q|0;T=(z<<7|z>>>25)^V;V=T+q|0;B=(V<<9|V>>>23)^Z;Z=B+T|0;L=(Z<<13|Z>>>19)^$;$=L+B|0;k=($<<18|$>>>14)^q;q=H+W|0;R=(q<<7|q>>>25)^G;G=R+W|0;F=(G<<9|G>>>23)^J;J=F+R|0;A=(J<<13|J>>>19)^H;H=A+F|0;E=(H<<18|H>>>14)^W;W=K+Q|0;N=(W<<7|W>>>25)^ee;ee=N+Q|0;M=(ee<<9|ee>>>23)^U;U=M+N|0;I=(U<<13|U>>>19)^K;K=I+M|0;O=(K<<18|K>>>14)^Q;Q=X+te|0;x=(Q<<7|Q>>>25)^D;D=x+te|0;P=(D<<9|D>>>23)^Y;Y=P+x|0;C=(Y<<13|Y>>>19)^X;X=C+P|0;j=(X<<18|X>>>14)^te;S=S+2|0}while(S>>>0<8);a[i>>2]=k;a[o>>2]=x;a[s>>2]=A;a[f>>2]=M;a[u>>2]=E;a[c>>2]=T;a[h>>2]=I;a[d>>2]=P;a[p>>2]=O;a[b>>2]=R;a[v>>2]=C;a[m>>2]=B;a[g>>2]=j;a[y>>2]=N;a[w>>2]=L;a[_>>2]=F;F=r|0;a[F>>2]=(a[F>>2]|0)+(a[n>>2]|0);F=r+4|0;a[F>>2]=(a[F>>2]|0)+(a[n+4>>2]|0);F=r+8|0;a[F>>2]=(a[F>>2]|0)+(a[n+8>>2]|0);F=r+12|0;a[F>>2]=(a[F>>2]|0)+(a[n+12>>2]|0);F=r+16|0;a[F>>2]=(a[F>>2]|0)+(a[n+16>>2]|0);F=r+20|0;a[F>>2]=(a[F>>2]|0)+(a[n+20>>2]|0);F=r+24|0;a[F>>2]=(a[F>>2]|0)+(a[n+24>>2]|0);F=r+28|0;a[F>>2]=(a[F>>2]|0)+(a[n+28>>2]|0);F=r+32|0;a[F>>2]=(a[F>>2]|0)+(a[n+32>>2]|0);F=r+36|0;a[F>>2]=(a[F>>2]|0)+(a[n+36>>2]|0);F=r+40|0;a[F>>2]=(a[F>>2]|0)+(a[n+40>>2]|0);F=r+44|0;a[F>>2]=(a[F>>2]|0)+(a[n+44>>2]|0);F=r+48|0;a[F>>2]=(a[F>>2]|0)+(a[n+48>>2]|0);F=r+52|0;a[F>>2]=(a[F>>2]|0)+(a[n+52>>2]|0);F=r+56|0;a[F>>2]=(a[F>>2]|0)+(a[n+56>>2]|0);F=r+60|0;a[F>>2]=(a[F>>2]|0)+(a[n+60>>2]|0);n=0;do{At(e+(n<<2)|0,a[r+(n<<2)>>2]|0);n=n+1|0}while(n>>>0<16);l=t;return}function Rt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0,s=0,f=0,u=0,c=0;n=e+32|0;i=e+36|0;o=a[i>>2]|0;s=o>>>3&63;f=De(o|0,r<<3|0)|0;a[i>>2]=f;if(N){f=n|0;a[f>>2]=(a[f>>2]|0)+1}f=n|0;a[f>>2]=(a[f>>2]|0)+(r>>>29);f=64-s|0;n=e+40+s|0;if(f>>>0>r>>>0){Jr(n|0,t|0,r)|0;return}Jr(n|0,t|0,f)|0;n=e|0;s=e+40|0;Ct(n,s);e=t+f|0;t=r-f|0;if(t>>>0>63){f=t;r=e;while(1){Ct(n,r);i=r+64|0;o=f-64|0;if(o>>>0>63){f=o;r=i}else{u=o;c=i;break}}}else{u=t;c=e}Jr(s|0,c|0,u)|0;return}function Ct(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0;r=l;l=l+288|0;n=r|0;i=r+256|0;o=n|0;qt(o,t);t=16;do{s=a[n+(t-2<<2)>>2]|0;f=a[n+(t-15<<2)>>2]|0;a[n+(t<<2)>>2]=(a[n+(t-16<<2)>>2]|0)+(a[n+(t-7<<2)>>2]|0)+((s>>>19|s<<13)^s>>>10^(s>>>17|s<<15))+((f>>>18|f<<14)^f>>>3^(f>>>7|f<<25));t=t+1|0}while((t|0)<64);t=i;f=e;Jr(t|0,f|0,32)|0;f=i+28|0;t=i+16|0;s=a[t>>2]|0;u=i+20|0;c=i+24|0;h=a[c>>2]|0;d=(a[f>>2]|0)+1116352408+(a[o>>2]|0)+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+((h^a[u>>2])&s^h)|0;h=i|0;s=a[h>>2]|0;o=i+4|0;p=a[o>>2]|0;b=i+8|0;v=a[b>>2]|0;m=i+12|0;a[m>>2]=(a[m>>2]|0)+d;g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+d+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+1899447441+(a[n+4>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=d;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1245643825+(a[n+8>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;d=(a[t>>2]|0)-373957723+(a[n+12>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[h>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+961987163+(a[n+16>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=d;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1508970993+(a[n+20>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[h>>2]|0;d=(a[o>>2]|0)-1841331548+(a[n+24>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[h>>2]|0)-1424204075+(a[n+28>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[h>>2]=d;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)-670586216+(a[n+32>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;d=(a[c>>2]|0)+310598401+(a[n+36>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+607225278+(a[n+40>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=d;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1426881987+(a[n+44>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[t>>2]=s;v=a[h>>2]|0;p=a[b>>2]|0;d=(a[m>>2]|0)+1925078388+(a[n+48>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-2132889090+(a[n+52>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=d;v=a[c>>2]|0;p=a[h>>2]|0;g=(a[o>>2]|0)-1680079193+(a[n+56>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;d=(a[h>>2]|0)-1046744716+(a[n+60>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[h>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-459576895+(a[n+64>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=d;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-272742522+(a[n+68>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;d=(a[u>>2]|0)+264347078+(a[n+72>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)+604807628+(a[n+76>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=d;v=a[h>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)+770255983+(a[n+80>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;d=(a[b>>2]|0)+1249150122+(a[n+84>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[h>>2]|0;s=(a[o>>2]|0)+1555081692+(a[n+88>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=d;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[h>>2]|0)+1996064986+(a[n+92>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[h>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;d=(a[f>>2]|0)-1740746414+(a[n+96>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)-1473132947+(a[n+100>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=d;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1341970488+(a[n+104>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;d=(a[t>>2]|0)-1084653625+(a[n+108>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[h>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)-958395405+(a[n+112>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=d;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)-710438585+(a[n+116>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[h>>2]|0;d=(a[o>>2]|0)+113926993+(a[n+120>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[h>>2]|0)+338241895+(a[n+124>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[h>>2]=d;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+666307205+(a[n+128>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;d=(a[c>>2]|0)+773529912+(a[n+132>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+1294757372+(a[n+136>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=d;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1396182291+(a[n+140>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[t>>2]=s;v=a[h>>2]|0;p=a[b>>2]|0;d=(a[m>>2]|0)+1695183700+(a[n+144>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)+1986661051+(a[n+148>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=d;v=a[c>>2]|0;p=a[h>>2]|0;g=(a[o>>2]|0)-2117940946+(a[n+152>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;d=(a[h>>2]|0)-1838011259+(a[n+156>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[h>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-1564481375+(a[n+160>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=d;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-1474664885+(a[n+164>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;d=(a[u>>2]|0)-1035236496+(a[n+168>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)-949202525+(a[n+172>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=d;v=a[h>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)-778901479+(a[n+176>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;d=(a[b>>2]|0)-694614492+(a[n+180>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[h>>2]|0;s=(a[o>>2]|0)-200395387+(a[n+184>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=d;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[h>>2]|0)+275423344+(a[n+188>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[h>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;d=(a[f>>2]|0)+430227734+(a[n+192>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+506948616+(a[n+196>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=d;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)+659060556+(a[n+200>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;d=(a[t>>2]|0)+883997877+(a[n+204>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[h>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+958139571+(a[n+208>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=d;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1322822218+(a[n+212>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[h>>2]|0;d=(a[o>>2]|0)+1537002063+(a[n+216>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[h>>2]|0)+1747873779+(a[n+220>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[h>>2]=d;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+1955562222+(a[n+224>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;d=(a[c>>2]|0)+2024104815+(a[n+228>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)-2067236844+(a[n+232>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=d;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)-1933114872+(a[n+236>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[t>>2]=s;v=a[h>>2]|0;p=a[b>>2]|0;d=(a[m>>2]|0)-1866530822+(a[n+240>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-1538233109+(a[n+244>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=d;v=a[c>>2]|0;p=a[h>>2]|0;g=(a[o>>2]|0)-1090935817+(a[n+248>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[o>>2]=s;o=a[u>>2]|0;u=a[f>>2]|0;f=(a[h>>2]|0)-965641998+(a[n+252>>2]|0)+((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+((u^a[c>>2])&o^u)|0;u=a[b>>2]|0;b=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+f;t=f+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((b|u)&s|b&u)|0;a[h>>2]=t;a[e>>2]=(a[e>>2]|0)+t;t=e+4|0;a[t>>2]=(a[t>>2]|0)+(a[i+4>>2]|0);t=e+8|0;a[t>>2]=(a[t>>2]|0)+(a[i+8>>2]|0);t=e+12|0;a[t>>2]=(a[t>>2]|0)+(a[i+12>>2]|0);t=e+16|0;a[t>>2]=(a[t>>2]|0)+(a[i+16>>2]|0);t=e+20|0;a[t>>2]=(a[t>>2]|0)+(a[i+20>>2]|0);t=e+24|0;a[t>>2]=(a[t>>2]|0)+(a[i+24>>2]|0);t=e+28|0;a[t>>2]=(a[t>>2]|0)+(a[i+28>>2]|0);l=r;return}function Bt(e,t){e=e|0;t=t|0;n[e+3|0]=t&255;n[e+2|0]=t>>>8&255;n[e+1|0]=t>>>16&255;n[e]=t>>>24&255;return}function jt(e){e=e|0;return(o[e+2|0]|0)<<8|(o[e+3|0]|0)|(o[e+1|0]|0)<<16|(o[e]|0)<<24|0}function Nt(e,t){e=e|0;t=t|0;Lt(t);Ft(e,t|0,32);en(t|0,0,104);return}function Lt(e){e=e|0;var t=0,r=0,n=0;t=l;l=l+8|0;r=t|0;Ft(r,e+32|0,8);n=(a[e+36>>2]|0)>>>3&63;Rt(e,720,(n>>>0<56?56:120)-n|0);Rt(e,r,8);l=t;return}function Ft(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=r>>>2;if((n|0)==0){return}else{i=0}do{Bt(e+(i<<2)|0,a[t+(i<<2)>>2]|0);i=i+1|0}while(i>>>0>>0);return}function zt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0,o=0,s=0,f=0,u=0,c=0;i=l;l=l+96|0;a=i|0;if(r>>>0>64){o=e|0;Mt(o);Rt(o,t,r);s=i+64|0;Nt(s,o);f=s;u=32}else{f=t;u=r}r=e|0;Mt(r);t=a|0;en(t|0,54,64);if((u|0)!=0){s=0;do{o=a+s|0;n[o]=n[o]^n[f+s|0];s=s+1|0}while(s>>>0>>0)}Rt(r,t,64);r=e+104|0;Mt(r);en(t|0,92,64);if((u|0)==0){Rt(r,t,64);l=i;return}else{c=0}do{e=a+c|0;n[e]=n[e]^n[f+c|0];c=c+1|0}while(c>>>0>>0);Rt(r,t,64);l=i;return}function Ht(e,t,r){e=e|0;t=t|0;r=r|0;Rt(e|0,t,r);return}function Ut(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+32|0;n=r|0;Nt(n,t|0);i=t+104|0;Rt(i,n,32);Nt(e,i);l=r;return}function Dt(e,t,r,i,a,o,s,f){e=e|0;t=t|0;r=r|0;i=i|0;a=a|0;o=o|0;s=s|0;f=f|0;var u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;u=l;l=l+488|0;c=u|0;h=u+208|0;d=u+424|0;p=u+456|0;zt(c,e,t);Ht(c,r,i);if((f|0)==0){l=u;return}i=u+416|0;r=h;b=c;c=d|0;v=p|0;m=0;g=o>>>0>>0|o>>>0==m>>>0&a>>>0<2>>>0;m=0;y=0;do{m=m+1|0;Bt(i,m);Jr(r|0,b|0,208)|0;Ht(h,i,4);Ut(c,h);Jr(v|0,c|0,32)|0;if(!g){w=0;_=2;do{zt(h,e,t);Ht(h,c,32);Ut(c,h);S=0;do{k=p+S|0;n[k]=n[k]^n[d+S|0];S=S+1|0}while((S|0)<32);_=rn(_,w,1,0)|0;w=N}while(!(w>>>0>o>>>0|w>>>0==o>>>0&_>>>0>a>>>0))}_=f-y|0;w=_>>>0>32?32:_;_=s+y|0;Jr(_|0,v|0,w)|0;y=m<<5}while(y>>>0>>0);l=u;return}function qt(e,t){e=e|0;t=t|0;var r=0;r=0;do{a[e+(r<<2)>>2]=jt(t+(r<<2)|0)|0;r=r+1|0}while(r>>>0<16);return}function Kt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,U=0,D=0,q=0,K=0,Y=0,V=0,W=0,X=0,Z=0,G=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0,ie=0,ae=0,oe=0,se=0,fe=0,ue=0,ce=0,le=0,he=0,de=0,pe=0,be=0,ve=0,me=0,ge=0,ye=0,_e=0,Se=0,xe=0,Ae=0,Me=0,Ee=0,Te=0,Ie=0,Pe=0,Oe=0,Re=0,Ce=0,Be=0;do{if(e>>>0<245){if(e>>>0<11){t=16}else{t=e+11&-8}r=t>>>3;n=a[208]|0;i=n>>>(r>>>0);if((i&3|0)!=0){o=(i&1^1)+r|0;s=o<<1;f=872+(s<<2)|0;u=872+(s+2<<2)|0;s=a[u>>2]|0;c=s+8|0;l=a[c>>2]|0;do{if((f|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}h=l+12|0;if((a[h>>2]|0)==(s|0)){a[h>>2]=f;a[u>>2]=l;break}else{ke();return 0}}}while(0);l=o<<3;a[s+4>>2]=l|3;u=s+(l|4)|0;a[u>>2]=a[u>>2]|1;d=c;return d|0}if(t>>>0<=(a[210]|0)>>>0){p=t;break}if((i|0)!=0){u=2<>>12&16;f=u>>>(l>>>0);u=f>>>5&8;h=f>>>(u>>>0);f=h>>>2&4;b=h>>>(f>>>0);h=b>>>1&2;v=b>>>(h>>>0);b=v>>>1&1;m=(u|l|f|h|b)+(v>>>(b>>>0))|0;b=m<<1;v=872+(b<<2)|0;h=872+(b+2<<2)|0;b=a[h>>2]|0;f=b+8|0;l=a[f>>2]|0;do{if((v|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}u=l+12|0;if((a[u>>2]|0)==(b|0)){a[u>>2]=v;a[h>>2]=l;break}else{ke();return 0}}}while(0);l=m<<3;h=l-t|0;a[b+4>>2]=t|3;v=b;n=v+t|0;a[v+(t|4)>>2]=h|1;a[v+l>>2]=h;l=a[210]|0;if((l|0)!=0){v=a[213]|0;r=l>>>3;l=r<<1;i=872+(l<<2)|0;c=a[208]|0;s=1<>2]|0;if(o>>>0>=(a[212]|0)>>>0){g=o;y=r;break}ke();return 0}}while(0);a[y>>2]=v;a[g+12>>2]=v;a[v+8>>2]=g;a[v+12>>2]=i}a[210]=h;a[213]=n;d=f;return d|0}l=a[209]|0;if((l|0)==0){p=t;break}s=(l&-l)-1|0;l=s>>>12&16;c=s>>>(l>>>0);s=c>>>5&8;b=c>>>(s>>>0);c=b>>>2&4;m=b>>>(c>>>0);b=m>>>1&2;r=m>>>(b>>>0);m=r>>>1&1;o=a[1136+((s|l|c|b|m)+(r>>>(m>>>0))<<2)>>2]|0;m=o;r=o;b=(a[o+4>>2]&-8)-t|0;while(1){o=a[m+16>>2]|0;if((o|0)==0){c=a[m+20>>2]|0;if((c|0)==0){break}else{w=c}}else{w=o}o=(a[w+4>>2]&-8)-t|0;c=o>>>0>>0;m=w;r=c?w:r;b=c?o:b}m=r;f=a[212]|0;if(m>>>0>>0){ke();return 0}n=m+t|0;h=n;if(m>>>0>=n>>>0){ke();return 0}n=a[r+24>>2]|0;i=a[r+12>>2]|0;do{if((i|0)==(r|0)){v=r+20|0;o=a[v>>2]|0;if((o|0)==0){c=r+16|0;l=a[c>>2]|0;if((l|0)==0){_=0;break}else{S=l;k=c}}else{S=o;k=v}while(1){v=S+20|0;o=a[v>>2]|0;if((o|0)!=0){S=o;k=v;continue}v=S+16|0;o=a[v>>2]|0;if((o|0)==0){break}else{S=o;k=v}}if(k>>>0>>0){ke();return 0}else{a[k>>2]=0;_=S;break}}else{v=a[r+8>>2]|0;if(v>>>0>>0){ke();return 0}o=v+12|0;if((a[o>>2]|0)!=(r|0)){ke();return 0}c=i+8|0;if((a[c>>2]|0)==(r|0)){a[o>>2]=i;a[c>>2]=v;_=i;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){i=r+28|0;f=1136+(a[i>>2]<<2)|0;do{if((r|0)==(a[f>>2]|0)){a[f>>2]=_;if((_|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}v=n+16|0;if((a[v>>2]|0)==(r|0)){a[v>>2]=_}else{a[n+20>>2]=_}if((_|0)==0){break e}}}while(0);if(_>>>0<(a[212]|0)>>>0){ke();return 0}a[_+24>>2]=n;i=a[r+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+16>>2]=i;a[i+24>>2]=_;break}}}while(0);i=a[r+20>>2]|0;if((i|0)==0){break}if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+20>>2]=i;a[i+24>>2]=_;break}}}while(0);if(b>>>0<16){n=b+t|0;a[r+4>>2]=n|3;i=m+(n+4)|0;a[i>>2]=a[i>>2]|1}else{a[r+4>>2]=t|3;a[m+(t|4)>>2]=b|1;a[m+(b+t)>>2]=b;i=a[210]|0;if((i|0)!=0){n=a[213]|0;f=i>>>3;i=f<<1;v=872+(i<<2)|0;c=a[208]|0;o=1<>2]|0;if(l>>>0>=(a[212]|0)>>>0){x=l;A=f;break}ke();return 0}}while(0);a[A>>2]=n;a[x+12>>2]=n;a[n+8>>2]=x;a[n+12>>2]=v}a[210]=b;a[213]=h}i=r+8|0;if((i|0)==0){p=t;break}else{d=i}return d|0}else{if(e>>>0>4294967231){p=-1;break}i=e+11|0;o=i&-8;c=a[209]|0;if((c|0)==0){p=o;break}m=-o|0;f=i>>>8;do{if((f|0)==0){M=0}else{if(o>>>0>16777215){M=31;break}i=(f+1048320|0)>>>16&8;l=f<>>16&4;u=l<>>16&2;E=14-(s|i|l)+(u<>>15)|0;M=o>>>((E+7|0)>>>0)&1|E<<1}}while(0);f=a[1136+(M<<2)>>2]|0;e:do{if((f|0)==0){T=0;I=m;P=0}else{if((M|0)==31){O=0}else{O=25-(M>>>1)|0}r=0;h=m;b=f;v=o<>2]&-8;l=E-o|0;if(l>>>0>>0){if((E|0)==(o|0)){T=b;I=l;P=b;break e}else{R=b;C=l}}else{R=r;C=h}l=a[b+20>>2]|0;E=a[b+16+(v>>>31<<2)>>2]|0;u=(l|0)==0|(l|0)==(E|0)?n:l;if((E|0)==0){T=R;I=C;P=u;break}else{r=R;h=C;b=E;v=v<<1;n=u}}}}while(0);if((P|0)==0&(T|0)==0){f=2<>>12&16;n=f>>>(m>>>0);f=n>>>5&8;v=n>>>(f>>>0);n=v>>>2&4;b=v>>>(n>>>0);v=b>>>1&2;h=b>>>(v>>>0);b=h>>>1&1;B=a[1136+((f|m|n|v|b)+(h>>>(b>>>0))<<2)>>2]|0}else{B=P}if((B|0)==0){j=I;N=T}else{b=B;h=I;v=T;while(1){n=(a[b+4>>2]&-8)-o|0;m=n>>>0>>0;f=m?n:h;n=m?b:v;m=a[b+16>>2]|0;if((m|0)!=0){b=m;h=f;v=n;continue}m=a[b+20>>2]|0;if((m|0)==0){j=f;N=n;break}else{b=m;h=f;v=n}}}if((N|0)==0){p=o;break}if(j>>>0>=((a[210]|0)-o|0)>>>0){p=o;break}v=N;h=a[212]|0;if(v>>>0>>0){ke();return 0}b=v+o|0;c=b;if(v>>>0>=b>>>0){ke();return 0}n=a[N+24>>2]|0;f=a[N+12>>2]|0;do{if((f|0)==(N|0)){m=N+20|0;r=a[m>>2]|0;if((r|0)==0){u=N+16|0;E=a[u>>2]|0;if((E|0)==0){L=0;break}else{F=E;z=u}}else{F=r;z=m}while(1){m=F+20|0;r=a[m>>2]|0;if((r|0)!=0){F=r;z=m;continue}m=F+16|0;r=a[m>>2]|0;if((r|0)==0){break}else{F=r;z=m}}if(z>>>0>>0){ke();return 0}else{a[z>>2]=0;L=F;break}}else{m=a[N+8>>2]|0;if(m>>>0>>0){ke();return 0}r=m+12|0;if((a[r>>2]|0)!=(N|0)){ke();return 0}u=f+8|0;if((a[u>>2]|0)==(N|0)){a[r>>2]=f;a[u>>2]=m;L=f;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){f=N+28|0;h=1136+(a[f>>2]<<2)|0;do{if((N|0)==(a[h>>2]|0)){a[h>>2]=L;if((L|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}m=n+16|0;if((a[m>>2]|0)==(N|0)){a[m>>2]=L}else{a[n+20>>2]=L}if((L|0)==0){break e}}}while(0);if(L>>>0<(a[212]|0)>>>0){ke();return 0}a[L+24>>2]=n;f=a[N+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+16>>2]=f;a[f+24>>2]=L;break}}}while(0);f=a[N+20>>2]|0;if((f|0)==0){break}if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+20>>2]=f;a[f+24>>2]=L;break}}}while(0);do{if(j>>>0<16){n=j+o|0;a[N+4>>2]=n|3;f=v+(n+4)|0;a[f>>2]=a[f>>2]|1}else{a[N+4>>2]=o|3;a[v+(o|4)>>2]=j|1;a[v+(j+o)>>2]=j;f=j>>>3;if(j>>>0<256){n=f<<1;h=872+(n<<2)|0;m=a[208]|0;u=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){H=r;U=f;break}ke();return 0}}while(0);a[U>>2]=c;a[H+12>>2]=c;a[v+(o+8)>>2]=H;a[v+(o+12)>>2]=h;break}n=b;u=j>>>8;do{if((u|0)==0){D=0}else{if(j>>>0>16777215){D=31;break}m=(u+1048320|0)>>>16&8;f=u<>>16&4;E=f<>>16&2;l=14-(r|m|f)+(E<>>15)|0;D=j>>>((l+7|0)>>>0)&1|l<<1}}while(0);u=1136+(D<<2)|0;a[v+(o+28)>>2]=D;a[v+(o+20)>>2]=0;a[v+(o+16)>>2]=0;h=a[209]|0;l=1<>2]=n;a[v+(o+24)>>2]=u;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}if((D|0)==31){q=0}else{q=25-(D>>>1)|0}l=j<>2]|0;while(1){if((a[h+4>>2]&-8|0)==(j|0)){break}K=h+16+(l>>>31<<2)|0;u=a[K>>2]|0;if((u|0)==0){Y=262;break}else{l=l<<1;h=u}}if((Y|0)==262){if(K>>>0<(a[212]|0)>>>0){ke();return 0}else{a[K>>2]=n;a[v+(o+24)>>2]=h;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}}l=h+8|0;u=a[l>>2]|0;f=a[212]|0;if(h>>>0>>0){ke();return 0}if(u>>>0>>0){ke();return 0}else{a[u+12>>2]=n;a[l>>2]=n;a[v+(o+8)>>2]=u;a[v+(o+12)>>2]=h;a[v+(o+24)>>2]=0;break}}}while(0);v=N+8|0;if((v|0)==0){p=o;break}else{d=v}return d|0}}while(0);N=a[210]|0;if(p>>>0<=N>>>0){K=N-p|0;j=a[213]|0;if(K>>>0>15){q=j;a[213]=q+p;a[210]=K;a[q+(p+4)>>2]=K|1;a[q+N>>2]=K;a[j+4>>2]=p|3}else{a[210]=0;a[213]=0;a[j+4>>2]=N|3;K=j+(N+4)|0;a[K>>2]=a[K>>2]|1}d=j+8|0;return d|0}j=a[211]|0;if(p>>>0>>0){K=j-p|0;a[211]=K;j=a[214]|0;N=j;a[214]=N+p;a[N+(p+4)>>2]=K|1;a[j+4>>2]=p|3;d=j+8|0;return d|0}do{if((a[200]|0)==0){j=we(8)|0;if((j-1&j|0)==0){a[202]=j;a[201]=j;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);j=p+48|0;K=a[202]|0;N=p+47|0;q=K+N|0;D=-K|0;K=q&D;if(K>>>0<=p>>>0){d=0;return d|0}H=a[318]|0;do{if((H|0)!=0){U=a[316]|0;L=U+K|0;if(L>>>0<=U>>>0|L>>>0>H>>>0){d=0}else{break}return d|0}}while(0);e:do{if((a[319]&4|0)==0){H=a[214]|0;t:do{if((H|0)==0){Y=292}else{L=H;U=1280;while(1){V=U|0;F=a[V>>2]|0;if(F>>>0<=L>>>0){W=U+4|0;if((F+(a[W>>2]|0)|0)>>>0>L>>>0){break}}F=a[U+8>>2]|0;if((F|0)==0){Y=292;break t}else{U=F}}if((U|0)==0){Y=292;break}L=q-(a[211]|0)&D;if(L>>>0>=2147483647){X=0;break}h=Ge(L|0)|0;n=(h|0)==((a[V>>2]|0)+(a[W>>2]|0)|0);Z=n?h:-1;G=n?L:0;Q=h;$=L;Y=301}}while(0);do{if((Y|0)==292){H=Ge(0)|0;if((H|0)==-1){X=0;break}o=H;L=a[201]|0;h=L-1|0;if((h&o|0)==0){J=K}else{J=K-o+(h+o&-L)|0}L=a[316]|0;o=L+J|0;if(!(J>>>0>p>>>0&J>>>0<2147483647)){X=0;break}h=a[318]|0;if((h|0)!=0){if(o>>>0<=L>>>0|o>>>0>h>>>0){X=0;break}}h=Ge(J|0)|0;o=(h|0)==(H|0);Z=o?H:-1;G=o?J:0;Q=h;$=J;Y=301}}while(0);t:do{if((Y|0)==301){h=-$|0;if((Z|0)!=-1){ee=G;te=Z;Y=312;break e}do{if((Q|0)!=-1&$>>>0<2147483647&$>>>0>>0){o=a[202]|0;H=N-$+o&-o;if(H>>>0>=2147483647){re=$;break}if((Ge(H|0)|0)==-1){Ge(h|0)|0;X=G;break t}else{re=H+$|0;break}}else{re=$}}while(0);if((Q|0)==-1){X=G}else{ee=re;te=Q;Y=312;break e}}}while(0);a[319]=a[319]|4;ne=X;Y=309}else{ne=0;Y=309}}while(0);do{if((Y|0)==309){if(K>>>0>=2147483647){break}X=Ge(K|0)|0;Q=Ge(0)|0;if(!((Q|0)!=-1&(X|0)!=-1&X>>>0>>0)){break}re=Q-X|0;Q=re>>>0>(p+40|0)>>>0;G=Q?X:-1;if((G|0)!=-1){ee=Q?re:ne;te=G;Y=312}}}while(0);do{if((Y|0)==312){ne=(a[316]|0)+ee|0;a[316]=ne;if(ne>>>0>(a[317]|0)>>>0){a[317]=ne}ne=a[214]|0;e:do{if((ne|0)==0){K=a[212]|0;if((K|0)==0|te>>>0>>0){a[212]=te}a[320]=te;a[321]=ee;a[323]=0;a[217]=a[200];a[216]=-1;K=0;do{G=K<<1;re=872+(G<<2)|0;a[872+(G+3<<2)>>2]=re;a[872+(G+2<<2)>>2]=re;K=K+1|0}while(K>>>0<32);K=te+8|0;if((K&7|0)==0){ie=0}else{ie=-K&7}K=ee-40-ie|0;a[214]=te+ie;a[211]=K;a[te+(ie+4)>>2]=K|1;a[te+(ee-36)>>2]=40;a[215]=a[204]}else{K=1280;while(1){ae=a[K>>2]|0;oe=K+4|0;se=a[oe>>2]|0;if((te|0)==(ae+se|0)){Y=324;break}re=a[K+8>>2]|0;if((re|0)==0){break}else{K=re}}do{if((Y|0)==324){if((a[K+12>>2]&8|0)!=0){break}re=ne;if(!(re>>>0>=ae>>>0&re>>>0>>0)){break}a[oe>>2]=se+ee;re=a[214]|0;G=(a[211]|0)+ee|0;Q=re;X=re+8|0;if((X&7|0)==0){fe=0}else{fe=-X&7}X=G-fe|0;a[214]=Q+fe;a[211]=X;a[Q+(fe+4)>>2]=X|1;a[Q+(G+4)>>2]=40;a[215]=a[204];break e}}while(0);if(te>>>0<(a[212]|0)>>>0){a[212]=te}K=te+ee|0;G=1280;while(1){ue=G|0;if((a[ue>>2]|0)==(K|0)){Y=334;break}Q=a[G+8>>2]|0;if((Q|0)==0){break}else{G=Q}}do{if((Y|0)==334){if((a[G+12>>2]&8|0)!=0){break}a[ue>>2]=te;K=G+4|0;a[K>>2]=(a[K>>2]|0)+ee;K=te+8|0;if((K&7|0)==0){ce=0}else{ce=-K&7}K=te+(ee+8)|0;if((K&7|0)==0){le=0}else{le=-K&7}K=te+(le+ee)|0;Q=K;X=ce+p|0;re=te+X|0;$=re;N=K-(te+ce)-p|0;a[te+(ce+4)>>2]=p|3;do{if((Q|0)==(a[214]|0)){j=(a[211]|0)+N|0;a[211]=j;a[214]=$;a[te+(X+4)>>2]=j|1}else{if((Q|0)==(a[213]|0)){j=(a[210]|0)+N|0;a[210]=j;a[213]=$;a[te+(X+4)>>2]=j|1;a[te+(j+X)>>2]=j;break}j=ee+4|0;Z=a[te+(j+le)>>2]|0;if((Z&3|0)==1){J=Z&-8;W=Z>>>3;t:do{if(Z>>>0<256){V=a[te+((le|8)+ee)>>2]|0;D=a[te+(ee+12+le)>>2]|0;q=872+(W<<1<<2)|0;do{if((V|0)!=(q|0)){if(V>>>0<(a[212]|0)>>>0){ke();return 0}if((a[V+12>>2]|0)==(Q|0)){break}ke();return 0}}while(0);if((D|0)==(V|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke();return 0}h=D+8|0;if((a[h>>2]|0)==(Q|0)){he=h;break}ke();return 0}}while(0);a[V+12>>2]=D;a[he>>2]=V}else{q=K;h=a[te+((le|24)+ee)>>2]|0;U=a[te+(ee+12+le)>>2]|0;do{if((U|0)==(q|0)){H=le|16;o=te+(j+H)|0;L=a[o>>2]|0;if((L|0)==0){n=te+(H+ee)|0;H=a[n>>2]|0;if((H|0)==0){de=0;break}else{pe=H;be=n}}else{pe=L;be=o}while(1){o=pe+20|0;L=a[o>>2]|0;if((L|0)!=0){pe=L;be=o;continue}o=pe+16|0;L=a[o>>2]|0;if((L|0)==0){break}else{pe=L;be=o}}if(be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[be>>2]=0;de=pe;break}}else{o=a[te+((le|8)+ee)>>2]|0;if(o>>>0<(a[212]|0)>>>0){ke();return 0}L=o+12|0;if((a[L>>2]|0)!=(q|0)){ke();return 0}n=U+8|0;if((a[n>>2]|0)==(q|0)){a[L>>2]=U;a[n>>2]=o;de=U;break}else{ke();return 0}}}while(0);if((h|0)==0){break}U=te+(ee+28+le)|0;V=1136+(a[U>>2]<<2)|0;do{if((q|0)==(a[V>>2]|0)){a[V>>2]=de;if((de|0)!=0){break}a[209]=a[209]&~(1<>2]);break t}else{if(h>>>0<(a[212]|0)>>>0){ke();return 0}D=h+16|0;if((a[D>>2]|0)==(q|0)){a[D>>2]=de}else{a[h+20>>2]=de}if((de|0)==0){break t}}}while(0);if(de>>>0<(a[212]|0)>>>0){ke();return 0}a[de+24>>2]=h;q=le|16;U=a[te+(q+ee)>>2]|0;do{if((U|0)!=0){if(U>>>0<(a[212]|0)>>>0){ke();return 0}else{a[de+16>>2]=U;a[U+24>>2]=de;break}}}while(0);U=a[te+(j+q)>>2]|0;if((U|0)==0){break}if(U>>>0<(a[212]|0)>>>0){ke();return 0}else{a[de+20>>2]=U;a[U+24>>2]=de;break}}}while(0);ve=te+((J|le)+ee)|0;me=J+N|0}else{ve=Q;me=N}j=ve+4|0;a[j>>2]=a[j>>2]&-2;a[te+(X+4)>>2]=me|1;a[te+(me+X)>>2]=me;j=me>>>3;if(me>>>0<256){W=j<<1;Z=872+(W<<2)|0;U=a[208]|0;h=1<>2]|0;if(V>>>0>=(a[212]|0)>>>0){ge=V;ye=j;break}ke();return 0}}while(0);a[ye>>2]=$;a[ge+12>>2]=$;a[te+(X+8)>>2]=ge;a[te+(X+12)>>2]=Z;break}W=re;h=me>>>8;do{if((h|0)==0){_e=0}else{if(me>>>0>16777215){_e=31;break}U=(h+1048320|0)>>>16&8;J=h<>>16&4;V=J<>>16&2;D=14-(j|U|J)+(V<>>15)|0;_e=me>>>((D+7|0)>>>0)&1|D<<1}}while(0);h=1136+(_e<<2)|0;a[te+(X+28)>>2]=_e;a[te+(X+20)>>2]=0;a[te+(X+16)>>2]=0;Z=a[209]|0;D=1<<_e;if((Z&D|0)==0){a[209]=Z|D;a[h>>2]=W;a[te+(X+24)>>2]=h;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}if((_e|0)==31){Se=0}else{Se=25-(_e>>>1)|0}D=me<>2]|0;while(1){if((a[Z+4>>2]&-8|0)==(me|0)){break}xe=Z+16+(D>>>31<<2)|0;h=a[xe>>2]|0;if((h|0)==0){Y=407;break}else{D=D<<1;Z=h}}if((Y|0)==407){if(xe>>>0<(a[212]|0)>>>0){ke();return 0}else{a[xe>>2]=W;a[te+(X+24)>>2]=Z;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}}D=Z+8|0;h=a[D>>2]|0;J=a[212]|0;if(Z>>>0>>0){ke();return 0}if(h>>>0>>0){ke();return 0}else{a[h+12>>2]=W;a[D>>2]=W;a[te+(X+8)>>2]=h;a[te+(X+12)>>2]=Z;a[te+(X+24)>>2]=0;break}}}while(0);d=te+(ce|8)|0;return d|0}}while(0);G=ne;X=1280;while(1){Ae=a[X>>2]|0;if(Ae>>>0<=G>>>0){Me=a[X+4>>2]|0;Ee=Ae+Me|0;if(Ee>>>0>G>>>0){break}}X=a[X+8>>2]|0}X=Ae+(Me-39)|0;if((X&7|0)==0){Te=0}else{Te=-X&7}X=Ae+(Me-47+Te)|0;re=X>>>0<(ne+16|0)>>>0?G:X;X=re+8|0;$=te+8|0;if(($&7|0)==0){Ie=0}else{Ie=-$&7}$=ee-40-Ie|0;a[214]=te+Ie;a[211]=$;a[te+(Ie+4)>>2]=$|1;a[te+(ee-36)>>2]=40;a[215]=a[204];a[re+4>>2]=27;a[X>>2]=a[320];a[X+4>>2]=a[1284>>2];a[X+8>>2]=a[1288>>2];a[X+12>>2]=a[1292>>2];a[320]=te;a[321]=ee;a[323]=0;a[322]=X;X=re+28|0;a[X>>2]=7;if((re+32|0)>>>0>>0){$=X;while(1){X=$+4|0;a[X>>2]=7;if(($+8|0)>>>0>>0){$=X}else{break}}}if((re|0)==(G|0)){break}$=re-ne|0;X=G+($+4)|0;a[X>>2]=a[X>>2]&-2;a[ne+4>>2]=$|1;a[G+$>>2]=$;X=$>>>3;if($>>>0<256){N=X<<1;Q=872+(N<<2)|0;K=a[208]|0;h=1<>2]|0;if(D>>>0>=(a[212]|0)>>>0){Pe=D;Oe=X;break}ke();return 0}}while(0);a[Oe>>2]=ne;a[Pe+12>>2]=ne;a[ne+8>>2]=Pe;a[ne+12>>2]=Q;break}N=ne;h=$>>>8;do{if((h|0)==0){Re=0}else{if($>>>0>16777215){Re=31;break}K=(h+1048320|0)>>>16&8;G=h<>>16&4;X=G<>>16&2;D=14-(re|K|G)+(X<>>15)|0;Re=$>>>((D+7|0)>>>0)&1|D<<1}}while(0);h=1136+(Re<<2)|0;a[ne+28>>2]=Re;a[ne+20>>2]=0;a[ne+16>>2]=0;Q=a[209]|0;D=1<>2]=N;a[ne+24>>2]=h;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}if((Re|0)==31){Ce=0}else{Ce=25-(Re>>>1)|0}D=$<>2]|0;while(1){if((a[Q+4>>2]&-8|0)==($|0)){break}Be=Q+16+(D>>>31<<2)|0;h=a[Be>>2]|0;if((h|0)==0){Y=442;break}else{D=D<<1;Q=h}}if((Y|0)==442){if(Be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Be>>2]=N;a[ne+24>>2]=Q;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}}D=Q+8|0;$=a[D>>2]|0;h=a[212]|0;if(Q>>>0>>0){ke();return 0}if($>>>0>>0){ke();return 0}else{a[$+12>>2]=N;a[D>>2]=N;a[ne+8>>2]=$;a[ne+12>>2]=Q;a[ne+24>>2]=0;break}}}while(0);ne=a[211]|0;if(ne>>>0<=p>>>0){break}$=ne-p|0;a[211]=$;ne=a[214]|0;D=ne;a[214]=D+p;a[D+(p+4)>>2]=$|1;a[ne+4>>2]=p|3;d=ne+8|0;return d|0}}while(0);a[($e()|0)>>2]=12;d=0;return d|0}function Yt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0;if((e|0)==0){return}t=e-8|0;r=t;n=a[212]|0;if(t>>>0>>0){ke()}i=a[e-4>>2]|0;o=i&3;if((o|0)==1){ke()}s=i&-8;f=e+(s-8)|0;u=f;e:do{if((i&1|0)==0){c=a[t>>2]|0;if((o|0)==0){return}l=-8-c|0;h=e+l|0;d=h;p=c+s|0;if(h>>>0>>0){ke()}if((d|0)==(a[213]|0)){b=e+(s-4)|0;if((a[b>>2]&3|0)!=3){v=d;m=p;break}a[210]=p;a[b>>2]=a[b>>2]&-2;a[e+(l+4)>>2]=p|1;a[f>>2]=p;return}b=c>>>3;if(c>>>0<256){c=a[e+(l+8)>>2]|0;g=a[e+(l+12)>>2]|0;y=872+(b<<1<<2)|0;do{if((c|0)!=(y|0)){if(c>>>0>>0){ke()}if((a[c+12>>2]|0)==(d|0)){break}ke()}}while(0);if((g|0)==(c|0)){a[208]=a[208]&~(1<>>0>>0){ke()}_=g+8|0;if((a[_>>2]|0)==(d|0)){w=_;break}ke()}}while(0);a[c+12>>2]=g;a[w>>2]=c;v=d;m=p;break}y=h;b=a[e+(l+24)>>2]|0;_=a[e+(l+12)>>2]|0;do{if((_|0)==(y|0)){S=e+(l+20)|0;k=a[S>>2]|0;if((k|0)==0){x=e+(l+16)|0;A=a[x>>2]|0;if((A|0)==0){M=0;break}else{E=A;T=x}}else{E=k;T=S}while(1){S=E+20|0;k=a[S>>2]|0;if((k|0)!=0){E=k;T=S;continue}S=E+16|0;k=a[S>>2]|0;if((k|0)==0){break}else{E=k;T=S}}if(T>>>0>>0){ke()}else{a[T>>2]=0;M=E;break}}else{S=a[e+(l+8)>>2]|0;if(S>>>0>>0){ke()}k=S+12|0;if((a[k>>2]|0)!=(y|0)){ke()}x=_+8|0;if((a[x>>2]|0)==(y|0)){a[k>>2]=_;a[x>>2]=S;M=_;break}else{ke()}}}while(0);if((b|0)==0){v=d;m=p;break}_=e+(l+28)|0;h=1136+(a[_>>2]<<2)|0;do{if((y|0)==(a[h>>2]|0)){a[h>>2]=M;if((M|0)!=0){break}a[209]=a[209]&~(1<>2]);v=d;m=p;break e}else{if(b>>>0<(a[212]|0)>>>0){ke()}c=b+16|0;if((a[c>>2]|0)==(y|0)){a[c>>2]=M}else{a[b+20>>2]=M}if((M|0)==0){v=d;m=p;break e}}}while(0);if(M>>>0<(a[212]|0)>>>0){ke()}a[M+24>>2]=b;y=a[e+(l+16)>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+16>>2]=y;a[y+24>>2]=M;break}}}while(0);y=a[e+(l+20)>>2]|0;if((y|0)==0){v=d;m=p;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+20>>2]=y;a[y+24>>2]=M;v=d;m=p;break}}else{v=r;m=s}}while(0);r=v;if(r>>>0>=f>>>0){ke()}M=e+(s-4)|0;n=a[M>>2]|0;if((n&1|0)==0){ke()}do{if((n&2|0)==0){if((u|0)==(a[214]|0)){E=(a[211]|0)+m|0;a[211]=E;a[214]=v;a[v+4>>2]=E|1;if((v|0)==(a[213]|0)){a[213]=0;a[210]=0}if(E>>>0<=(a[215]|0)>>>0){return}Qt(0)|0;return}if((u|0)==(a[213]|0)){E=(a[210]|0)+m|0;a[210]=E;a[213]=v;a[v+4>>2]=E|1;a[r+E>>2]=E;return}E=(n&-8)+m|0;T=n>>>3;e:do{if(n>>>0<256){w=a[e+s>>2]|0;o=a[e+(s|4)>>2]|0;t=872+(T<<1<<2)|0;do{if((w|0)!=(t|0)){if(w>>>0<(a[212]|0)>>>0){ke()}if((a[w+12>>2]|0)==(u|0)){break}ke()}}while(0);if((o|0)==(w|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke()}i=o+8|0;if((a[i>>2]|0)==(u|0)){I=i;break}ke()}}while(0);a[w+12>>2]=o;a[I>>2]=w}else{t=f;i=a[e+(s+16)>>2]|0;y=a[e+(s|4)>>2]|0;do{if((y|0)==(t|0)){b=e+(s+12)|0;_=a[b>>2]|0;if((_|0)==0){h=e+(s+8)|0;c=a[h>>2]|0;if((c|0)==0){P=0;break}else{O=c;R=h}}else{O=_;R=b}while(1){b=O+20|0;_=a[b>>2]|0;if((_|0)!=0){O=_;R=b;continue}b=O+16|0;_=a[b>>2]|0;if((_|0)==0){break}else{O=_;R=b}}if(R>>>0<(a[212]|0)>>>0){ke()}else{a[R>>2]=0;P=O;break}}else{b=a[e+s>>2]|0;if(b>>>0<(a[212]|0)>>>0){ke()}_=b+12|0;if((a[_>>2]|0)!=(t|0)){ke()}h=y+8|0;if((a[h>>2]|0)==(t|0)){a[_>>2]=y;a[h>>2]=b;P=y;break}else{ke()}}}while(0);if((i|0)==0){break}y=e+(s+20)|0;w=1136+(a[y>>2]<<2)|0;do{if((t|0)==(a[w>>2]|0)){a[w>>2]=P;if((P|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(i>>>0<(a[212]|0)>>>0){ke()}o=i+16|0;if((a[o>>2]|0)==(t|0)){a[o>>2]=P}else{a[i+20>>2]=P}if((P|0)==0){break e}}}while(0);if(P>>>0<(a[212]|0)>>>0){ke()}a[P+24>>2]=i;t=a[e+(s+8)>>2]|0;do{if((t|0)!=0){if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+16>>2]=t;a[t+24>>2]=P;break}}}while(0);t=a[e+(s+12)>>2]|0;if((t|0)==0){break}if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+20>>2]=t;a[t+24>>2]=P;break}}}while(0);a[v+4>>2]=E|1;a[r+E>>2]=E;if((v|0)!=(a[213]|0)){C=E;break}a[210]=E;return}else{a[M>>2]=n&-2;a[v+4>>2]=m|1;a[r+m>>2]=m;C=m}}while(0);m=C>>>3;if(C>>>0<256){r=m<<1;n=872+(r<<2)|0;M=a[208]|0;P=1<>2]|0;if(s>>>0>=(a[212]|0)>>>0){B=s;j=m;break}ke()}}while(0);a[j>>2]=v;a[B+12>>2]=v;a[v+8>>2]=B;a[v+12>>2]=n;return}n=v;B=C>>>8;do{if((B|0)==0){N=0}else{if(C>>>0>16777215){N=31;break}j=(B+1048320|0)>>>16&8;r=B<>>16&4;M=r<>>16&2;m=14-(P|j|r)+(M<>>15)|0;N=C>>>((m+7|0)>>>0)&1|m<<1}}while(0);B=1136+(N<<2)|0;a[v+28>>2]=N;a[v+20>>2]=0;a[v+16>>2]=0;m=a[209]|0;r=1<>2]=n;a[v+24>>2]=B;a[v+12>>2]=v;a[v+8>>2]=v}else{if((N|0)==31){L=0}else{L=25-(N>>>1)|0}M=C<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(C|0)){break}F=j+16+(M>>>31<<2)|0;P=a[F>>2]|0;if((P|0)==0){z=621;break}else{M=M<<1;j=P}}if((z|0)==621){if(F>>>0<(a[212]|0)>>>0){ke()}else{a[F>>2]=n;a[v+24>>2]=j;a[v+12>>2]=v;a[v+8>>2]=v;break}}M=j+8|0;E=a[M>>2]|0;P=a[212]|0;if(j>>>0

>>0){ke()}if(E>>>0

>>0){ke()}else{a[E+12>>2]=n;a[M>>2]=n;a[v+8>>2]=E;a[v+12>>2]=j;a[v+24>>2]=0;break}}}while(0);v=(a[216]|0)-1|0;a[216]=v;if((v|0)==0){H=1288}else{return}while(1){v=a[H>>2]|0;if((v|0)==0){break}else{H=v+8|0}}a[216]=-1;return}function Vt(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((e|0)==0){r=0}else{n=oe(t,e)|0;if((t|e)>>>0<=65535){r=n;break}r=((n>>>0)/(e>>>0)|0|0)==(t|0)?n:-1}}while(0);t=Kt(r)|0;if((t|0)==0){return t|0}if((a[t-4>>2]&3|0)==0){return t|0}en(t|0,0,r|0);return t|0}function Wt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0;if((e|0)==0){r=Kt(t)|0;return r|0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;r=0;return r|0}if(t>>>0<11){n=16}else{n=t+11&-8}i=$t(e-8|0,n)|0;if((i|0)!=0){r=i+8|0;return r|0}i=Kt(t)|0;if((i|0)==0){r=0;return r|0}n=a[e-4>>2]|0;o=(n&-8)-((n&3|0)==0?8:4)|0;n=o>>>0>>0?o:t;Jr(i|0,e|0,n)|0;Yt(e);r=i;return r|0}function Xt(e,t){e=e|0;t=t|0;var r=0;if((e|0)==0){return 0}if(t>>>0>4294967231){a[($e()|0)>>2]=12;return 0}if(t>>>0<11){r=16}else{r=t+11&-8}t=e-8|0;return(($t(t,r)|0)==(t|0)?e:0)|0}function Zt(e,t){e=e|0;t=t|0;var r=0;if(e>>>0<9){r=Kt(t)|0;return r|0}else{r=Gt(e,t)|0;return r|0}return 0}function Gt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0;r=e>>>0<16?16:e;if((r-1&r|0)==0){n=r}else{e=16;while(1){if(e>>>0>>0){e=e<<1}else{n=e;break}}}if((-64-n|0)>>>0<=t>>>0){a[($e()|0)>>2]=12;i=0;return i|0}if(t>>>0<11){o=16}else{o=t+11&-8}t=Kt(n+12+o|0)|0;if((t|0)==0){i=0;return i|0}e=t-8|0;r=e;s=n-1|0;do{if((t&s|0)==0){f=r}else{u=t+s&-n;c=u-8|0;l=e;if((c-l|0)>>>0>15){h=c}else{h=u+(n-8)|0}u=h;c=h-l|0;l=t-4|0;d=a[l>>2]|0;p=(d&-8)-c|0;if((d&3|0)==0){a[h>>2]=(a[e>>2]|0)+c;a[h+4>>2]=p;f=u;break}else{d=h+4|0;a[d>>2]=p|a[d>>2]&1|2;d=h+(p+4)|0;a[d>>2]=a[d>>2]|1;a[l>>2]=c|a[l>>2]&1|2;l=t+(c-4)|0;a[l>>2]=a[l>>2]|1;vr(r,c);f=u;break}}}while(0);r=f+4|0;t=a[r>>2]|0;do{if((t&3|0)!=0){h=t&-8;if(h>>>0<=(o+16|0)>>>0){break}e=h-o|0;n=f;a[r>>2]=o|t&1|2;a[n+(o|4)>>2]=e|3;s=n+(h|4)|0;a[s>>2]=a[s>>2]|1;vr(n+o|0,e)}}while(0);i=f+8|0;return i|0}function Qt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if(e>>>0>=4294967232){r=0;return r|0}t=a[214]|0;if((t|0)==0){r=0;return r|0}n=a[211]|0;do{if(n>>>0>(e+40|0)>>>0){i=a[202]|0;o=oe((((-40-e-1+n+i|0)>>>0)/(i>>>0)|0)-1|0,i)|0;s=t;f=1280;while(1){u=a[f>>2]|0;if(u>>>0<=s>>>0){if((u+(a[f+4>>2]|0)|0)>>>0>s>>>0){c=f;break}}u=a[f+8>>2]|0;if((u|0)==0){c=0;break}else{f=u}}if((a[c+12>>2]&8|0)!=0){break}f=Ge(0)|0;s=c+4|0;if((f|0)!=((a[c>>2]|0)+(a[s>>2]|0)|0)){break}u=Ge(-(o>>>0>2147483646?-2147483648-i|0:o)|0)|0;l=Ge(0)|0;if(!((u|0)!=-1&l>>>0>>0)){break}u=f-l|0;if((f|0)==(l|0)){break}a[s>>2]=(a[s>>2]|0)-u;a[316]=(a[316]|0)-u;s=a[214]|0;h=(a[211]|0)-u|0;u=s;d=s+8|0;if((d&7|0)==0){p=0}else{p=-d&7}d=h-p|0;a[214]=u+p;a[211]=d;a[u+(p+4)>>2]=d|1;a[u+(h+4)>>2]=40;a[215]=a[204];r=(f|0)!=(l|0)|0;return r|0}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){r=0;return r|0}a[215]=-1;r=0;return r|0}function $t(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0;r=e+4|0;n=a[r>>2]|0;i=n&-8;o=e;s=o+i|0;f=s;u=a[212]|0;if(o>>>0>>0){ke();return 0}c=n&3;if(!((c|0)!=1&o>>>0>>0)){ke();return 0}l=o+(i|4)|0;h=a[l>>2]|0;if((h&1|0)==0){ke();return 0}if((c|0)==0){if(t>>>0<256){d=0;return d|0}do{if(i>>>0>=(t+4|0)>>>0){if((i-t|0)>>>0>a[202]<<1>>>0){break}else{d=e}return d|0}}while(0);d=0;return d|0}if(i>>>0>=t>>>0){c=i-t|0;if(c>>>0<=15){d=e;return d|0}a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|3;a[l>>2]=a[l>>2]|1;vr(o+t|0,c);d=e;return d|0}if((f|0)==(a[214]|0)){c=(a[211]|0)+i|0;if(c>>>0<=t>>>0){d=0;return d|0}l=c-t|0;a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=l|1;a[214]=o+t;a[211]=l;d=e;return d|0}if((f|0)==(a[213]|0)){l=(a[210]|0)+i|0;if(l>>>0>>0){d=0;return d|0}c=l-t|0;if(c>>>0>15){a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|1;a[o+l>>2]=c;p=o+(l+4)|0;a[p>>2]=a[p>>2]&-2;b=o+t|0;v=c}else{a[r>>2]=n&1|l|2;n=o+(l+4)|0;a[n>>2]=a[n>>2]|1;b=0;v=0}a[210]=v;a[213]=b;d=e;return d|0}if((h&2|0)!=0){d=0;return d|0}b=(h&-8)+i|0;if(b>>>0>>0){d=0;return d|0}v=b-t|0;n=h>>>3;e:do{if(h>>>0<256){l=a[o+(i+8)>>2]|0;c=a[o+(i+12)>>2]|0;p=872+(n<<1<<2)|0;do{if((l|0)!=(p|0)){if(l>>>0>>0){ke();return 0}if((a[l+12>>2]|0)==(f|0)){break}ke();return 0}}while(0);if((c|0)==(l|0)){a[208]=a[208]&~(1<>>0>>0){ke();return 0}g=c+8|0;if((a[g>>2]|0)==(f|0)){m=g;break}ke();return 0}}while(0);a[l+12>>2]=c;a[m>>2]=l}else{p=s;g=a[o+(i+24)>>2]|0;y=a[o+(i+12)>>2]|0;do{if((y|0)==(p|0)){w=o+(i+20)|0;_=a[w>>2]|0;if((_|0)==0){S=o+(i+16)|0;k=a[S>>2]|0;if((k|0)==0){x=0;break}else{A=k;M=S}}else{A=_;M=w}while(1){w=A+20|0;_=a[w>>2]|0;if((_|0)!=0){A=_;M=w;continue}w=A+16|0;_=a[w>>2]|0;if((_|0)==0){break}else{A=_;M=w}}if(M>>>0>>0){ke();return 0}else{a[M>>2]=0;x=A;break}}else{w=a[o+(i+8)>>2]|0;if(w>>>0>>0){ke();return 0}_=w+12|0;if((a[_>>2]|0)!=(p|0)){ke();return 0}S=y+8|0;if((a[S>>2]|0)==(p|0)){a[_>>2]=y;a[S>>2]=w;x=y;break}else{ke();return 0}}}while(0);if((g|0)==0){break}y=o+(i+28)|0;l=1136+(a[y>>2]<<2)|0;do{if((p|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(g>>>0<(a[212]|0)>>>0){ke();return 0}c=g+16|0;if((a[c>>2]|0)==(p|0)){a[c>>2]=x}else{a[g+20>>2]=x}if((x|0)==0){break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke();return 0}a[x+24>>2]=g;p=a[o+(i+16)>>2]|0;do{if((p|0)!=0){if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+16>>2]=p;a[p+24>>2]=x;break}}}while(0);p=a[o+(i+20)>>2]|0;if((p|0)==0){break}if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+20>>2]=p;a[p+24>>2]=x;break}}}while(0);if(v>>>0<16){a[r>>2]=b|a[r>>2]&1|2;x=o+(b|4)|0;a[x>>2]=a[x>>2]|1;d=e;return d|0}else{a[r>>2]=a[r>>2]&1|t|2;a[o+(t+4)>>2]=v|3;r=o+(b|4)|0;a[r>>2]=a[r>>2]|1;vr(o+t|0,v);d=e;return d|0}return 0}function Jt(){return a[316]|0}function er(){return a[317]|0}function tr(){var e=0;e=a[318]|0;return((e|0)==0?-1:e)|0}function rr(e){e=e|0;var t=0,r=0;if((e|0)==-1){t=0}else{r=a[202]|0;t=e-1+r&-r}a[318]=t;return t|0}function nr(e){e=e|0;var t=0,r=0,n=0;do{if((e|0)==0){t=0}else{r=a[e-4>>2]|0;n=r&3;if((n|0)==1){t=0;break}t=(r&-8)-((n|0)==0?8:4)|0}}while(0);return t|0}function ir(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0;do{if((t|0)==8){n=Kt(r)|0}else{i=t>>>2;if((t&3|0)!=0|(i|0)==0){o=22;return o|0}if((i+1073741823&i|0)!=0){o=22;return o|0}if((-64-t|0)>>>0>>0){o=12;return o|0}else{n=Gt(t>>>0<16?16:t,r)|0;break}}}while(0);if((n|0)==0){o=12;return o|0}a[e>>2]=n;o=0;return o|0}function ar(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+8|0;i=n|0;a[i>>2]=t;t=ur(e,i,3,r)|0;l=n;return t|0}function or(e,t,r){e=e|0;t=t|0;r=r|0;return ur(e,t,0,r)|0}function sr(e){e=e|0;var t=0,r=0,n=0;if((a[200]|0)!=0){t=a[201]|0;r=Zt(t,e)|0;return r|0}n=we(8)|0;if((n-1&n|0)!=0){ke();return 0}a[202]=n;a[201]=n;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=a[201]|0;r=Zt(t,e)|0;return r|0}function fr(e){e=e|0;var t=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);t=a[201]|0;return Zt(t,e-1+t&-t)|0}function ur(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;do{if((a[200]|0)==0){i=we(8)|0;if((i-1&i|0)==0){a[202]=i;a[201]=i;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);i=(e|0)==0;do{if((n|0)==0){if(i){o=Kt(0)|0;return o|0}else{s=e<<2;if(s>>>0<11){f=0;u=16;break}f=0;u=s+11&-8;break}}else{if(i){o=n}else{f=n;u=0;break}return o|0}}while(0);do{if((r&1|0)==0){if(i){c=0;l=0;break}else{h=0;d=0}while(1){n=a[t+(d<<2)>>2]|0;if(n>>>0<11){p=16}else{p=n+11&-8}n=p+h|0;s=d+1|0;if((s|0)==(e|0)){c=0;l=n;break}else{h=n;d=s}}}else{s=a[t>>2]|0;if(s>>>0<11){b=16}else{b=s+11&-8}c=b;l=oe(b,e)|0}}while(0);b=Kt(u-4+l|0)|0;if((b|0)==0){o=0;return o|0}d=b-8|0;h=a[b-4>>2]&-8;if((r&2|0)!=0){en(b|0,0,-4-u+h|0)}if((f|0)==0){a[b+(l-4)>>2]=h-l|3;v=b+l|0;m=l}else{v=f;m=h}a[v>>2]=b;b=e-1|0;e:do{if((b|0)==0){g=d;y=m}else{if((c|0)==0){w=d;_=m;S=0}else{e=d;h=m;f=0;while(1){l=h-c|0;a[e+4>>2]=c|3;u=e+c|0;r=f+1|0;a[v+(r<<2)>>2]=e+(c+8);if((r|0)==(b|0)){g=u;y=l;break e}else{e=u;h=l;f=r}}}while(1){f=a[t+(S<<2)>>2]|0;if(f>>>0<11){k=16}else{k=f+11&-8}f=_-k|0;a[w+4>>2]=k|3;h=w+k|0;e=S+1|0;a[v+(e<<2)>>2]=w+(k+8);if((e|0)==(b|0)){g=h;y=f;break}else{w=h;_=f;S=e}}}}while(0);a[g+4>>2]=y|3;o=v;return o|0}function cr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0;r=e+(t<<2)|0;e:do{if((t|0)!=0){n=e;t:while(1){i=a[n>>2]|0;r:do{if((i|0)==0){o=n+4|0}else{s=i-8|0;f=s;u=i-4|0;c=a[u>>2]&-8;a[n>>2]=0;if(s>>>0<(a[212]|0)>>>0){l=935;break t}s=a[u>>2]|0;if((s&3|0)==1){l=936;break t}h=n+4|0;d=s-8&-8;do{if((h|0)!=(r|0)){if((a[h>>2]|0)!=(i+(d+8)|0)){break}p=(a[i+(d|4)>>2]&-8)+c|0;a[u>>2]=s&1|p|2;b=i+(p-4)|0;a[b>>2]=a[b>>2]|1;a[h>>2]=i;o=h;break r}}while(0);vr(f,c);o=h}}while(0);if((o|0)==(r|0)){break e}else{n=o}}if((l|0)==935){ke();return 0}else if((l|0)==936){ke();return 0}}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){return 0}Qt(0)|0;return 0}function lr(e){e=e|0;var t=0,r=0;if((a[200]|0)!=0){t=Qt(e)|0;return t|0}r=we(8)|0;if((r-1&r|0)!=0){ke();return 0}a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=Qt(e)|0;return t|0}function hr(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0;o=0;s=0;f=0;u=0}else{c=a[211]|0;l=c+40|0;h=1;d=l;p=l;l=1280;while(1){b=a[l>>2]|0;v=b+8|0;if((v&7|0)==0){m=0}else{m=-v&7}v=b+(a[l+4>>2]|0)|0;g=h;y=d;w=p;_=b+m|0;while(1){if(_>>>0>=v>>>0|(_|0)==(t|0)){S=g;k=y;x=w;break}A=a[_+4>>2]|0;if((A|0)==7){S=g;k=y;x=w;break}M=A&-8;E=M+w|0;if((A&3|0)==1){T=M+y|0;I=g+1|0}else{T=y;I=g}A=_+M|0;if(A>>>0>>0){S=I;k=T;x=E;break}else{g=I;y=T;w=E;_=A}}_=a[l+8>>2]|0;if((_|0)==0){break}else{h=S;d=k;p=x;l=_}}l=a[316]|0;r=c;n=x;i=S;o=l-x|0;s=a[317]|0;f=l-k|0;u=k}a[e>>2]=n;a[e+4>>2]=i;i=e+8|0;a[i>>2]=0;a[i+4>>2]=0;a[e+16>>2]=o;a[e+20>>2]=s;a[e+24>>2]=0;a[e+28>>2]=f;a[e+32>>2]=u;a[e+36>>2]=r;return}function dr(){var e=0,t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,g=0,y=0,w=0;e=l;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0}else{o=a[317]|0;s=a[316]|0;f=s-40-(a[211]|0)|0;u=1280;while(1){c=a[u>>2]|0;h=c+8|0;if((h&7|0)==0){d=0}else{d=-h&7}h=c+(a[u+4>>2]|0)|0;p=f;b=c+d|0;while(1){if(b>>>0>=h>>>0|(b|0)==(t|0)){v=p;break}g=a[b+4>>2]|0;if((g|0)==7){v=p;break}y=g&-8;w=p-((g&3|0)==1?y:0)|0;g=b+y|0;if(g>>>0>>0){v=w;break}else{p=w;b=g}}b=a[u+8>>2]|0;if((b|0)==0){r=v;n=s;i=o;break}else{f=v;u=b}}}xe(a[m>>2]|0,520,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;xe(a[m>>2]|0,488,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;xe(a[m>>2]|0,400,(E=l,l=l+8|0,a[E>>2]=r,E)|0)|0;l=e;return}function pr(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((a[200]|0)==0){r=we(8)|0;if((r-1&r|0)==0){a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if((e|0)==(-1|0)){a[204]=t;n=1;return n|0}else if((e|0)==(-2|0)){if((a[201]|0)>>>0>t>>>0){n=0;return n|0}if((t-1&t|0)!=0){n=0;return n|0}a[202]=t;n=1;return n|0}else if((e|0)==(-3|0)){a[203]=t;n=1;return n|0}else{n=0;return n|0}return 0}function br(){return(B=a[328]|0,a[328]=B+0,B)|0}function vr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0;r=e;n=r+t|0;i=n;o=a[e+4>>2]|0;e:do{if((o&1|0)==0){s=a[e>>2]|0;if((o&3|0)==0){return}f=r+(-s|0)|0;u=f;c=s+t|0;l=a[212]|0;if(f>>>0>>0){ke()}if((u|0)==(a[213]|0)){h=r+(t+4)|0;if((a[h>>2]&3|0)!=3){d=u;p=c;break}a[210]=c;a[h>>2]=a[h>>2]&-2;a[r+(4-s)>>2]=c|1;a[n>>2]=c;return}h=s>>>3;if(s>>>0<256){b=a[r+(8-s)>>2]|0;v=a[r+(12-s)>>2]|0;m=872+(h<<1<<2)|0;do{if((b|0)!=(m|0)){if(b>>>0>>0){ke()}if((a[b+12>>2]|0)==(u|0)){break}ke()}}while(0);if((v|0)==(b|0)){a[208]=a[208]&~(1<>>0>>0){ke()}y=v+8|0;if((a[y>>2]|0)==(u|0)){g=y;break}ke()}}while(0);a[b+12>>2]=v;a[g>>2]=b;d=u;p=c;break}m=f;h=a[r+(24-s)>>2]|0;y=a[r+(12-s)>>2]|0;do{if((y|0)==(m|0)){w=16-s|0;_=r+(w+4)|0;S=a[_>>2]|0;if((S|0)==0){k=r+w|0;w=a[k>>2]|0;if((w|0)==0){x=0;break}else{A=w;M=k}}else{A=S;M=_}while(1){_=A+20|0;S=a[_>>2]|0;if((S|0)!=0){A=S;M=_;continue}_=A+16|0;S=a[_>>2]|0;if((S|0)==0){break}else{A=S;M=_}}if(M>>>0>>0){ke()}else{a[M>>2]=0;x=A;break}}else{_=a[r+(8-s)>>2]|0;if(_>>>0>>0){ke()}S=_+12|0;if((a[S>>2]|0)!=(m|0)){ke()}k=y+8|0;if((a[k>>2]|0)==(m|0)){a[S>>2]=y;a[k>>2]=_;x=y;break}else{ke()}}}while(0);if((h|0)==0){d=u;p=c;break}y=r+(28-s)|0;l=1136+(a[y>>2]<<2)|0;do{if((m|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);d=u;p=c;break e}else{if(h>>>0<(a[212]|0)>>>0){ke()}f=h+16|0;if((a[f>>2]|0)==(m|0)){a[f>>2]=x}else{a[h+20>>2]=x}if((x|0)==0){d=u;p=c;break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke()}a[x+24>>2]=h;m=16-s|0;y=a[r+m>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+16>>2]=y;a[y+24>>2]=x;break}}}while(0);y=a[r+(m+4)>>2]|0;if((y|0)==0){d=u;p=c;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+20>>2]=y;a[y+24>>2]=x;d=u;p=c;break}}else{d=e;p=t}}while(0);e=a[212]|0;if(n>>>0>>0){ke()}x=r+(t+4)|0;A=a[x>>2]|0;do{if((A&2|0)==0){if((i|0)==(a[214]|0)){M=(a[211]|0)+p|0;a[211]=M;a[214]=d;a[d+4>>2]=M|1;if((d|0)!=(a[213]|0)){return}a[213]=0;a[210]=0;return}if((i|0)==(a[213]|0)){M=(a[210]|0)+p|0;a[210]=M;a[213]=d;a[d+4>>2]=M|1;a[d+M>>2]=M;return}M=(A&-8)+p|0;g=A>>>3;e:do{if(A>>>0<256){o=a[r+(t+8)>>2]|0;y=a[r+(t+12)>>2]|0;s=872+(g<<1<<2)|0;do{if((o|0)!=(s|0)){if(o>>>0>>0){ke()}if((a[o+12>>2]|0)==(i|0)){break}ke()}}while(0);if((y|0)==(o|0)){a[208]=a[208]&~(1<>>0>>0){ke()}h=y+8|0;if((a[h>>2]|0)==(i|0)){E=h;break}ke()}}while(0);a[o+12>>2]=y;a[E>>2]=o}else{s=n;h=a[r+(t+24)>>2]|0;l=a[r+(t+12)>>2]|0;do{if((l|0)==(s|0)){f=r+(t+20)|0;b=a[f>>2]|0;if((b|0)==0){v=r+(t+16)|0;_=a[v>>2]|0;if((_|0)==0){T=0;break}else{I=_;P=v}}else{I=b;P=f}while(1){f=I+20|0;b=a[f>>2]|0;if((b|0)!=0){I=b;P=f;continue}f=I+16|0;b=a[f>>2]|0;if((b|0)==0){break}else{I=b;P=f}}if(P>>>0>>0){ke()}else{a[P>>2]=0;T=I;break}}else{f=a[r+(t+8)>>2]|0;if(f>>>0>>0){ke()}b=f+12|0;if((a[b>>2]|0)!=(s|0)){ke()}v=l+8|0;if((a[v>>2]|0)==(s|0)){a[b>>2]=l;a[v>>2]=f;T=l;break}else{ke()}}}while(0);if((h|0)==0){break}l=r+(t+28)|0;o=1136+(a[l>>2]<<2)|0;do{if((s|0)==(a[o>>2]|0)){a[o>>2]=T;if((T|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(h>>>0<(a[212]|0)>>>0){ke()}y=h+16|0;if((a[y>>2]|0)==(s|0)){a[y>>2]=T}else{a[h+20>>2]=T}if((T|0)==0){break e}}}while(0);if(T>>>0<(a[212]|0)>>>0){ke()}a[T+24>>2]=h;s=a[r+(t+16)>>2]|0;do{if((s|0)!=0){if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+16>>2]=s;a[s+24>>2]=T;break}}}while(0);s=a[r+(t+20)>>2]|0;if((s|0)==0){break}if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+20>>2]=s;a[s+24>>2]=T;break}}}while(0);a[d+4>>2]=M|1;a[d+M>>2]=M;if((d|0)!=(a[213]|0)){O=M;break}a[210]=M;return}else{a[x>>2]=A&-2;a[d+4>>2]=p|1;a[d+p>>2]=p;O=p}}while(0);p=O>>>3;if(O>>>0<256){A=p<<1;x=872+(A<<2)|0;T=a[208]|0;t=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){R=r;C=p;break}ke()}}while(0);a[C>>2]=d;a[R+12>>2]=d;a[d+8>>2]=R;a[d+12>>2]=x;return}x=d;R=O>>>8;do{if((R|0)==0){B=0}else{if(O>>>0>16777215){B=31;break}C=(R+1048320|0)>>>16&8;A=R<>>16&4;T=A<>>16&2;p=14-(t|C|A)+(T<>>15)|0;B=O>>>((p+7|0)>>>0)&1|p<<1}}while(0);R=1136+(B<<2)|0;a[d+28>>2]=B;a[d+20>>2]=0;a[d+16>>2]=0;p=a[209]|0;A=1<>2]=x;a[d+24>>2]=R;a[d+12>>2]=d;a[d+8>>2]=d;return}if((B|0)==31){j=0}else{j=25-(B>>>1)|0}B=O<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(O|0)){break}N=j+16+(B>>>31<<2)|0;R=a[N>>2]|0;if((R|0)==0){L=1120;break}else{B=B<<1;j=R}}if((L|0)==1120){if(N>>>0<(a[212]|0)>>>0){ke()}a[N>>2]=x;a[d+24>>2]=j;a[d+12>>2]=d;a[d+8>>2]=d;return}N=j+8|0;L=a[N>>2]|0;B=a[212]|0;if(j>>>0>>0){ke()}if(L>>>0>>0){ke()}a[L+12>>2]=x;a[N>>2]=x;a[d+8>>2]=L;a[d+12>>2]=j;a[d+24>>2]=0;return}function mr(e){e=e|0;var t=0,r=0,n=0;t=(e|0)==0?1:e;while(1){r=Kt(t)|0;if((r|0)!=0){n=1164;break}e=(B=a[328]|0,a[328]=B+0,B);if((e|0)==0){break}Cn[e&1]()}if((n|0)==1164){return r|0}r=Fe(4)|0;a[r>>2]=560;_e(r|0,688,6);return 0}function gr(e,t){e=e|0;t=t|0;return mr(e)|0}function yr(e){e=e|0;return}function wr(e){e=e|0;return 360|0}function _r(e){e=e|0;return 448|0}function Sr(e){e=e|0;return(B=a[328]|0,a[328]=e,B)|0}function kr(e){e=e|0;a[e>>2]=560;return}function xr(e){e=e|0;a[e>>2]=592;return}function Ar(e){e=e|0;if((e|0)!=0){Yt(e)}return}function Mr(e,t){e=e|0;t=t|0;Ar(e);return}function Er(e){e=e|0;Ar(e);return}function Tr(e,t){e=e|0;t=t|0;Er(e);return}function Ir(e){e=e|0;Ar(e);return}function Pr(e){e=e|0;Ar(e);return}function Or(e,t,r){e=e|0;t=t|0;r=r|0;return Rr(e,t,r,0,0,0)|0}function Rr(e,t,r,i,o,s){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;s=s|0;var f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,U=0,D=0,q=0,K=0,Y=0,V=0,W=0,X=0,Z=0,G=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0;f=l;if((r|0)==0){u=-1;l=f;return u|0}c=a[44]|0;if((c|0)==0){a[196]=1;a[44]=1;h=1;d=1;p=1190}else{b=a[196]|0;v=a[74]|0;if((v|0)==-1|(b|0)!=0){h=b;d=c;p=1190}else{m=v;g=b;y=c}}if((p|0)==1190){c=(Ke(344)|0)!=0|0;a[74]=c;m=c;g=h;y=d}d=n[r]|0;if(d<<24>>24==45){w=s|2;p=1194}else{h=(m|0)!=0|d<<24>>24==43?s&-2:s;if(d<<24>>24==43){w=h;p=1194}else{_=r;S=h}}if((p|0)==1194){_=r+1|0;S=w}a[198]=0;if((g|0)==0){k=y;p=1198}else{a[50]=-1;a[48]=-1;x=y;A=g;p=1197}while(1){if((p|0)==1197){p=0;if((A|0)==0){k=x;p=1198;continue}else{M=x}}else if((p|0)==1198){p=0;g=a[40]|0;if((n[g]|0)==0){M=k}else{T=g;I=k;break}}a[196]=0;if((M|0)>=(e|0)){p=1200;break}P=t+(M<<2)|0;O=a[P>>2]|0;a[40]=O;if((n[O]|0)==45){R=O+1|0;C=n[R]|0;if(C<<24>>24!=0){p=1232;break}if((Pe(_|0,45)|0)!=0){p=1232;break}}a[40]=824;if((S&2|0)!=0){p=1217;break}if((S&1|0)==0){u=-1;p=1298;break}g=a[48]|0;do{if((g|0)==-1){a[48]=M;B=M;j=0}else{y=a[50]|0;if((y|0)==-1){B=M;j=0;break}w=y-g|0;r=M-y|0;h=(w|0)%(r|0)|0;if((h|0)==0){N=r}else{d=r;s=h;while(1){h=(d|0)%(s|0)|0;if((h|0)==0){N=s;break}else{d=s;s=h}}}s=(M-g|0)/(N|0)|0;do{if((N|0)>0){d=-w|0;if((s|0)>0){L=0}else{F=M;z=y;H=g;U=0;break}do{h=L+y|0;m=t+(h<<2)|0;c=0;b=h;h=a[m>>2]|0;while(1){v=((b|0)<(y|0)?r:d)+b|0;D=t+(v<<2)|0;q=a[D>>2]|0;a[D>>2]=h;a[m>>2]=q;D=c+1|0;if((D|0)<(s|0)){c=D;b=v;h=q}else{break}}L=L+1|0}while((L|0)<(N|0));F=a[44]|0;z=a[50]|0;H=a[48]|0;U=a[196]|0}else{F=M;z=y;H=g;U=0}}while(0);a[48]=F-z+H;a[50]=-1;B=F;j=U}}while(0);g=B+1|0;a[44]=g;x=g;A=j;p=1197}do{if((p|0)==1298){l=f;return u|0}else if((p|0)==1232){j=a[48]|0;A=a[50]|0;if((j|0)!=-1&(A|0)==-1){a[50]=M;K=n[R]|0;Y=M}else{K=C;Y=A}if(K<<24>>24==0){T=O;I=M;break}a[40]=R;if((n[R]|0)!=45){T=R;I=M;break}if((n[O+2|0]|0)!=0){T=R;I=M;break}A=M+1|0;a[44]=A;a[40]=824;if((Y|0)!=-1){x=Y-j|0;B=A-Y|0;U=(x|0)%(B|0)|0;if((U|0)==0){V=B}else{F=B;H=U;while(1){U=(F|0)%(H|0)|0;if((U|0)==0){V=H;break}else{F=H;H=U}}}H=(A-j|0)/(V|0)|0;do{if((V|0)>0){F=-x|0;if((H|0)>0){W=0}else{X=Y;Z=j;G=A;break}do{U=W+Y|0;z=t+(U<<2)|0;N=0;L=U;U=a[z>>2]|0;while(1){k=((L|0)<(Y|0)?B:F)+L|0;g=t+(k<<2)|0;y=a[g>>2]|0;a[g>>2]=U;a[z>>2]=y;g=N+1|0;if((g|0)<(H|0)){N=g;L=k;U=y}else{break}}W=W+1|0}while((W|0)<(V|0));X=a[50]|0;Z=a[48]|0;G=a[44]|0}else{X=Y;Z=j;G=A}}while(0);a[44]=Z-X+G}a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1200){a[40]=824;A=a[50]|0;j=a[48]|0;do{if((A|0)==-1){if((j|0)==-1){break}a[44]=j}else{H=A-j|0;B=M-A|0;x=(H|0)%(B|0)|0;if((x|0)==0){Q=B}else{F=B;U=x;while(1){x=(F|0)%(U|0)|0;if((x|0)==0){Q=U;break}else{F=U;U=x}}}U=(M-j|0)/(Q|0)|0;do{if((Q|0)>0){F=-H|0;if((U|0)>0){$=0}else{J=A;ee=j;te=M;break}do{x=$+A|0;L=t+(x<<2)|0;N=0;z=x;x=a[L>>2]|0;while(1){y=((z|0)<(A|0)?B:F)+z|0;k=t+(y<<2)|0;g=a[k>>2]|0;a[k>>2]=x;a[L>>2]=g;k=N+1|0;if((k|0)<(U|0)){N=k;z=y;x=g}else{break}}$=$+1|0}while(($|0)<(Q|0));J=a[50]|0;ee=a[48]|0;te=a[44]|0}else{J=A;ee=j;te=M}}while(0);a[44]=ee-J+te}}while(0);a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1217){a[44]=M+1;a[198]=a[P>>2];u=1;l=f;return u|0}}while(0);P=(i|0)!=0;e:do{if(P){if((T|0)==(a[t+(I<<2)>>2]|0)){re=T;break}M=n[T]|0;do{if(M<<24>>24==45){a[40]=T+1;ne=0}else{if((S&4|0)==0){re=T;break e}if(M<<24>>24==58){ne=0;break}ne=(Pe(_|0,M<<24>>24|0)|0)!=0|0}}while(0);M=Fr(t,_,i,o,ne)|0;if((M|0)==-1){re=a[40]|0;break}a[40]=824;u=M;l=f;return u|0}else{re=T}}while(0);T=re+1|0;a[40]=T;ne=n[re]|0;re=ne<<24>>24;if((ne<<24>>24|0)==45){if((n[T]|0)==0){p=1260}}else if((ne<<24>>24|0)==58){p=1263}else{p=1260}do{if((p|0)==1260){S=Pe(_|0,re|0)|0;if((S|0)==0){if(ne<<24>>24!=45){p=1263;break}if((n[T]|0)==0){u=-1}else{break}l=f;return u|0}I=n[S+1|0]|0;if(P&ne<<24>>24==87&I<<24>>24==59){do{if((n[T]|0)==0){M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[40]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}}while(0);M=Fr(t,_,i,o,0)|0;a[40]=824;u=M;l=f;return u|0}if(I<<24>>24!=58){if((n[T]|0)!=0){u=re;l=f;return u|0}a[44]=(a[44]|0)+1;u=re;l=f;return u|0}a[198]=0;do{if((n[T]|0)==0){if((n[S+2|0]|0)==58){break}M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[198]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}else{a[198]=T}}while(0);a[40]=824;a[44]=(a[44]|0)+1;u=re;l=f;return u|0}}while(0);do{if((p|0)==1263){if((n[T]|0)!=0){break}a[44]=(a[44]|0)+1}}while(0);do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(272,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=63;l=f;return u|0}function Cr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,1)|0}function Br(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,5)|0}function jr(e){e=e|0;return mr(e)|0}function Nr(e,t){e=e|0;t=t|0;return jr(e)|0}function Lr(){var e=0;e=Fe(4)|0;a[e>>2]=560;_e(e|0,688,6)}function Fr(e,t,r,i,o){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;var s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0;s=l;f=a[40]|0;u=a[44]|0;c=u+1|0;a[44]=c;h=Pe(f|0,61)|0;if((h|0)==0){d=tn(f|0)|0;p=0}else{d=h-f|0;p=h+1|0}h=a[r>>2]|0;e:do{if((h|0)!=0){t:do{if((o|0)!=0&(d|0)==1){b=0;v=h;while(1){if((n[f]|0)==(n[v]|0)){if((tn(v|0)|0)==1){m=b;break t}}b=b+1|0;v=a[r+(b<<4)>>2]|0;if((v|0)==0){break e}}}else{v=0;b=-1;g=h;while(1){if((ge(f|0,g|0,d|0)|0)==0){if((tn(g|0)|0)==(d|0)){m=v;break t}if((b|0)==-1){y=v}else{break}}else{y=b}w=v+1|0;_=a[r+(w<<4)>>2]|0;if((_|0)==0){m=y;break t}else{v=w;b=y;g=_}}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(304,(E=l,l=l+16|0,a[E>>2]=d,a[E+8>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}}while(0);if((m|0)==-1){break}g=r+(m<<4)+4|0;b=a[g>>2]|0;v=(p|0)==0;if(!((b|0)!=0|v)){do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(208,(E=l,l=l+16|0,a[E>>2]=d,a[E+8>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){k=a[r+(m<<4)+12>>2]|0}else{k=0}a[42]=k;S=(n[t]|0)==58?58:63;l=s;return S|0}do{if((b-1|0)>>>0<2){if(!v){a[198]=p;break}if((b|0)!=1){break}a[44]=u+2;a[198]=a[e+(c<<2)>>2]}}while(0);if(!((a[g>>2]|0)==1&(a[198]|0)==0)){if((i|0)!=0){a[i>>2]=m}b=a[r+(m<<4)+8>>2]|0;v=a[r+(m<<4)+12>>2]|0;if((b|0)==0){S=v;l=s;return S|0}a[b>>2]=v;S=0;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(8,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){x=a[r+(m<<4)+12>>2]|0}else{x=0}a[42]=x;a[44]=(a[44]|0)-1;S=(n[t]|0)==58?58:63;l=s;return S|0}}while(0);if((o|0)!=0){a[44]=u;S=-1;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(248,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}function zr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Ur(e,n|0);l=r;return}function Hr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Dr(e,n|0);l=r;return}function Ur(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,432,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((e|0)!=0){i=a[m>>2]|0;Ye(i|0,e|0,t|0)|0;t=a[m>>2]|0;Ce(472,2,1,t|0)|0}t=a[m>>2]|0;e=Se(n|0)|0;xe(t|0,384,(E=l,l=l+8|0,a[E>>2]=e,E)|0)|0;l=r;return}function Dr(e,t){e=e|0;t=t|0;var r=0,n=0;r=l;n=a[w>>2]|0;xe(a[m>>2]|0,376,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((e|0)!=0){n=a[m>>2]|0;Ye(n|0,e|0,t|0)|0}Oe(10,a[m>>2]|0)|0;l=r;return}function qr(e,t){e=e|0;t=t|0;var r=0,i=0,o=0,s=0,f=0,u=0,l=0,h=0,d=0,p=0,b=0,v=0.0,m=0,g=0,y=0,w=0,_=0.0,S=0,k=0,x=0,A=0.0,M=0.0,E=0,T=0,I=0,P=0.0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0.0,H=0,U=0,D=0.0,q=0.0,K=0.0;r=e;while(1){i=r+1|0;if((ze(n[r]|0)|0)==0){break}else{r=i}}o=n[r]|0;if((o<<24>>24|0)==45){s=i;f=1}else if((o<<24>>24|0)==43){s=i;f=0}else{s=r;f=0}r=-1;i=0;o=s;while(1){u=n[o]|0;if(((u<<24>>24)-48|0)>>>0<10){l=r}else{if(u<<24>>24!=46|(r|0)>-1){break}else{l=i}}r=l;i=i+1|0;o=o+1|0}l=o+(-i|0)|0;s=(r|0)<0;h=((s^1)<<31>>31)+i|0;d=(h|0)>18;p=(d?-18:-h|0)+(s?i:r)|0;r=d?18:h;do{if((r|0)==0){b=e;v=0.0}else{if((r|0)>9){h=l;d=r;i=0;while(1){s=n[h]|0;m=h+1|0;if(s<<24>>24==46){g=n[m]|0;y=h+2|0}else{g=s;y=m}w=(i*10|0)-48+(g<<24>>24)|0;m=d-1|0;if((m|0)>9){h=y;d=m;i=w}else{break}}_=+(w|0)*1.0e9;S=9;k=y;x=1393}else{if((r|0)>0){_=0.0;S=r;k=l;x=1393}else{A=0.0;M=0.0}}if((x|0)==1393){i=k;d=S;h=0;while(1){m=n[i]|0;s=i+1|0;if(m<<24>>24==46){E=n[s]|0;T=i+2|0}else{E=m;T=s}I=(h*10|0)-48+(E<<24>>24)|0;s=d-1|0;if((s|0)>0){i=T;d=s;h=I}else{break}}A=+(I|0);M=_}P=M+A;do{if((u<<24>>24|0)==69|(u<<24>>24|0)==101){h=o+1|0;d=n[h]|0;if((d<<24>>24|0)==43){O=o+2|0;R=0}else if((d<<24>>24|0)==45){O=o+2|0;R=1}else{O=h;R=0}h=n[O]|0;if(((h<<24>>24)-48|0)>>>0<10){C=O;B=0;j=h}else{N=0;L=O;F=R;break}while(1){h=(B*10|0)-48+(j<<24>>24)|0;d=C+1|0;i=n[d]|0;if(((i<<24>>24)-48|0)>>>0<10){C=d;B=h;j=i}else{N=h;L=d;F=R;break}}}else{N=0;L=o;F=0}}while(0);d=p+((F|0)==0?N:-N|0)|0;h=(d|0)<0?-d|0:d;if((h|0)>511){a[($e()|0)>>2]=34;z=1.0;H=88;U=511;x=1410}else{if((h|0)==0){D=1.0}else{z=1.0;H=88;U=h;x=1410}}if((x|0)==1410){while(1){x=0;if((U&1|0)==0){q=z}else{q=z*+c[H>>3]}h=U>>1;if((h|0)==0){D=q;break}else{z=q;H=H+8|0;U=h;x=1410}}}if((d|0)>-1){b=L;v=P*D;break}else{b=L;v=P/D;break}}}while(0);if((t|0)!=0){a[t>>2]=b}if((f|0)==0){K=v;return+K}K=-0.0-v;return+K}function Kr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Yr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Vr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Wr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Xr(e){e=e|0;return+ +qr(e,0)}function Zr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Qr(e,t,i|0)}function Gr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;$r(e,t,i|0)}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=a[($e()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,336,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((t|0)!=0){i=a[m>>2]|0;Ye(i|0,t|0,r|0)|0;r=a[m>>2]|0;Ce(480,2,1,r|0)|0}r=a[m>>2]|0;t=Se(n|0)|0;xe(r|0,392,(E=l,l=l+8|0,a[E>>2]=t,E)|0)|0;Ne(e|0)}function $r(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;n=a[w>>2]|0;xe(a[m>>2]|0,440,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((t|0)!=0){n=a[m>>2]|0;Ye(n|0,t|0,r|0)|0}Oe(10,a[m>>2]|0)|0;Ne(e|0)}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;i=e|0;if((e&3)==(t&3)){while(e&3){if((r|0)==0)return i|0;n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){a[e>>2]=a[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function en(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,o=0,s=0;i=e+r|0;if((r|0)>=20){t=t&255;r=e&3;o=t|t<<8|t<<16|t<<24;s=i&~3;if(r){r=e+4-r|0;while((e|0)<(r|0)){n[e]=t;e=e+1|0}}while((e|0)<(s|0)){a[e>>2]=o;e=e+4|0}}while((e|0)<(i|0)){n[e]=t;e=e+1|0}}function tn(e){e=e|0;var t=0;t=e;while(n[t]|0){t=t+1|0}return t-e|0}function rn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=e+r>>>0;return(N=t+n+(i>>>0>>0|0)>>>0,i|0)|0}function nn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=t-n>>>0;i=t-n-(r>>>0>e>>>0|0)>>>0;return(N=i,e-r>>>0|0)|0}function an(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t<>>32-r;return e<>>r;return e>>>r|(t&(1<>>r-32|0}function sn(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t>>r;return e>>>r|(t&(1<>r-32|0}function fn(e){e=e|0;var t=0;t=n[v+(e>>>24)|0]|0;if((t|0)<8)return t|0;t=n[v+(e>>16&255)|0]|0;if((t|0)<8)return t+8|0;t=n[v+(e>>8&255)|0]|0;if((t|0)<8)return t+16|0;return(n[v+(e&255)|0]|0)+24|0}function un(e){e=e|0;var t=0;t=n[b+(e&255)|0]|0;if((t|0)<8)return t|0;t=n[b+(e>>8&255)|0]|0;if((t|0)<8)return t+8|0;t=n[b+(e>>16&255)|0]|0;if((t|0)<8)return t+16|0;return(n[b+(e>>>24)|0]|0)+24|0}function cn(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,a=0;r=e&65535;n=t&65535;i=oe(n,r)|0;a=e>>>16;e=(i>>>16)+(oe(n,a)|0)|0;n=t>>>16;t=oe(n,r)|0;return(N=(e>>>16)+(oe(n,a)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|i&65535|0)|0}function ln(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,s=0,f=0;i=t>>31|((t|0)<0?-1:0)<<1;a=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=n>>31|((n|0)<0?-1:0)<<1;s=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;f=nn(i^e,a^t,i,a)|0;t=N;e=o^i;i=s^a;a=nn((vn(f,t,nn(o^r,s^n,o,s)|0,N,0)|0)^e,N^i,e,i)|0;return(N=N,a)|0}function hn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,h=0;i=l;l=l+8|0;o=i|0;s=t>>31|((t|0)<0?-1:0)<<1;f=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;u=n>>31|((n|0)<0?-1:0)<<1;c=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;h=nn(s^e,f^t,s,f)|0;t=N;e=nn(u^r,c^n,u,c)|0;vn(h,t,e,N,o)|0;e=nn(a[o>>2]^s,a[o+4>>2]^f,s,f)|0;f=N;l=i;return(N=f,e)|0}function dn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0;i=e;e=r;r=cn(i,e)|0;a=N;return(N=(oe(t,e)|0)+(oe(n,i)|0)+a|a&0,r|0|0)|0}function pn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=vn(e,t,r,n,0)|0;return(N=N,i)|0}function bn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0;i=l;l=l+8|0;o=i|0;vn(e,t,r,n,o)|0;l=i;return(N=a[o+4>>2]|0,a[o>>2]|0)|0}function vn(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,L=0,F=0;o=e;s=t;f=s;u=r;c=n;l=c;if((f|0)==0){h=(i|0)!=0;if((l|0)==0){if(h){a[i>>2]=(o>>>0)%(u>>>0);a[i+4>>2]=0}d=0;p=(o>>>0)/(u>>>0)>>>0;return(N=d,p)|0}else{if(!h){d=0;p=0;return(N=d,p)|0}a[i>>2]=e|0;a[i+4>>2]=t&0;d=0;p=0;return(N=d,p)|0}}h=(l|0)==0;do{if((u|0)==0){if(h){if((i|0)!=0){a[i>>2]=(f>>>0)%(u>>>0);a[i+4>>2]=0}d=0;p=(f>>>0)/(u>>>0)>>>0;return(N=d,p)|0}if((o|0)==0){if((i|0)!=0){a[i>>2]=0;a[i+4>>2]=(f>>>0)%(l>>>0)}d=0;p=(f>>>0)/(l>>>0)>>>0;return(N=d,p)|0}b=l-1|0;if((b&l|0)==0){if((i|0)!=0){a[i>>2]=e|0;a[i+4>>2]=b&f|t&0}d=0;p=f>>>((un(l|0)|0)>>>0);return(N=d,p)|0}b=(fn(l|0)|0)-(fn(f|0)|0)|0;if(b>>>0<=30){v=b+1|0;m=31-b|0;g=v;y=f<>>(v>>>0);w=f>>>(v>>>0);_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;d=0;p=0;return(N=d,p)|0}else{if(!h){m=(fn(l|0)|0)-(fn(f|0)|0)|0;if(m>>>0<=31){v=m+1|0;b=31-m|0;k=m-31>>31;g=v;y=o>>>(v>>>0)&k|f<>>(v>>>0)&k;_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;d=0;p=0;return(N=d,p)|0}b=u-1|0;if((b&u|0)!=0){k=(fn(u|0)|0)+33-(fn(f|0)|0)|0;v=64-k|0;m=32-k|0;x=m>>31;A=k-32|0;M=A>>31;g=k;y=m-1>>31&f>>>(A>>>0)|(f<>>(k>>>0))&M;w=M&f>>>(k>>>0);_=o<>>(A>>>0))&x|o<>31;break}if((i|0)!=0){a[i>>2]=b&o;a[i+4>>2]=0}if((u|0)==1){d=s|t&0;p=e|0|0;return(N=d,p)|0}else{b=un(u|0)|0;d=f>>>(b>>>0)|0;p=f<<32-b|o>>>(b>>>0)|0;return(N=d,p)|0}}}while(0);if((g|0)==0){E=S;T=_;I=w;P=y;O=0;R=0}else{o=r|0|0;r=c|n&0;n=rn(o,r,-1,-1)|0;c=N;f=S;S=_;_=w;w=y;y=g;g=0;while(1){C=S>>>31|f<<1;B=g|S<<1;u=w<<1|f>>>31|0;e=w>>>31|_<<1|0;nn(n,c,u,e)|0;t=N;s=t>>31|((t|0)<0?-1:0)<<1;j=s&1;L=nn(u,e,s&o,(((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1)&r)|0;F=N;t=y-1|0;if((t|0)==0){break}else{f=C;S=B;_=F;w=L;y=t;g=j}}E=C;T=B;I=F;P=L;O=0;R=j}j=T;T=0;if((i|0)!=0){a[i>>2]=P;a[i+4>>2]=I}d=(j|0)>>>31|(E|T)<<1|(T<<1|j>>>31)&0|O;p=(j<<1|0>>>31)&-2|R;return(N=d,p)|0}function mn(e,t){e=e|0;t=t|0;In[e&15](t|0)}function gn(e,t,r){e=e|0;t=t|0;r=r|0;Pn[e&15](t|0,r|0)}function yn(e,t){e=e|0;t=t|0;return On[e&7](t|0)|0}function wn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;Rn[e&15](t|0,r|0,n|0)}function _n(e){e=e|0;Cn[e&1]()}function Sn(e,t,r){e=e|0;t=t|0;r=r|0;return Bn[e&1](t|0,r|0)|0}function kn(e){e=e|0;se(0)}function xn(e,t){e=e|0;t=t|0;se(1)}function An(e){e=e|0;se(2);return 0}function Mn(e,t,r){e=e|0;t=t|0;r=r|0;se(3)}function En(){se(4)}function Tn(e,t){e=e|0;t=t|0;se(5);return 0}var In=[kn,kn,xr,kn,Pr,kn,yr,kn,kr,kn,Ir,kn,kn,kn,kn,kn];var Pn=[xn,xn,zr,xn,Ur,xn,Hr,xn,Dr,xn,xn,xn,xn,xn,xn,xn];var On=[An,An,wr,An,_r,An,An,An];var Rn=[Mn,Mn,$r,Mn,Qr,Mn,Zr,Mn,Gr,Mn,Mn,Mn,Mn,Mn,Mn,Mn];var Cn=[En,En];var Bn=[Tn,Tn];return{_crypto_scrypt:Et,_strlen:tn,_free:Yt,_realloc:Wt,_memset:en,_malloc:Kt,_memcpy:Jr,_calloc:Vt,runPostSets:wt,stackAlloc:it,stackSave:at,stackRestore:ot,setThrew:st,setTempRet0:ct,setTempRet1:lt,setTempRet2:ht,setTempRet3:dt,setTempRet4:pt,setTempRet5:bt,setTempRet6:vt,setTempRet7:mt,setTempRet8:gt,setTempRet9:yt,dynCall_vi:mn,dynCall_vii:gn,dynCall_ii:yn,dynCall_viii:wn,dynCall_v:_n,dynCall_iii:Sn}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:wa,assert:w,asmPrintInt:function(e,t){s.print("int "+e+","+t)},asmPrintFloat:function(e,t){s.print("float "+e+","+t)},min:Xc,invoke_vi:function(e,t){try{s.dynCall_vi(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_vii:function(e,t,r){try{s.dynCall_vii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_ii:function(e,t){try{return s.dynCall_ii(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_viii:function(e,t,r,n){try{s.dynCall_viii(e,t,r,n)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_v:function(e){try{s.dynCall_v(e)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_iii:function(e,t,r){try{return s.dynCall_iii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},_strncmp:function(e,t,r){for(var n=0;na?1:-1;n++}return 0},_llvm_va_end:aa(),_sysconf:function(e){switch(e){case 8:return 4096;case 54:case 56:case 21:case 61:case 63:case 22:case 67:case 23:case 24:case 25:case 26:case 27:case 69:case 28:case 101:case 70:case 71:case 29:case 30:case 199:case 75:case 76:case 32:case 43:case 44:case 80:case 46:case 47:case 45:case 48:case 49:case 42:case 82:case 33:case 7:case 108:case 109:case 107:case 112:case 119:case 121:return 200809;case 13:case 104:case 94:case 95:case 34:case 35:case 77:case 81:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:case 94:case 95:case 110:case 111:case 113:case 114:case 115:case 116:case 117:case 118:case 120:case 40:case 16:case 79:case 19:return-1;case 92:case 93:case 5:case 72:case 6:case 74:case 92:case 93:case 96:case 97:case 98:case 99:case 102:case 103:case 105:return 1;case 38:case 66:case 50:case 51:case 4:return 1024;case 15:case 64:case 41:return 32;case 55:case 37:case 17:return 2147483647;case 18:case 1:return 47839;case 59:case 57:return 99;case 68:case 58:return 2048;case 0:return 2097152;case 3:return 65536;case 14:return 32768;case 73:return 32767;case 39:return 16384;case 60:return 1e3;case 106:return 700;case 52:return 256;case 62:return 255;case 2:return 100;case 65:return 64;case 36:return 20;case 100:return 16;case 20:return 6;case 53:return 4;case 10:return 1}return M(N.A),-1},___cxa_throw:rc,_strerror:zc,_abort:function(){s.abort()},_fprintf:mc,_llvm_eh_exception:U,___cxa_free_exception:sc,_fflush:aa(),___buildEnvironment:wc,__reallyNegative:jc,_strchr:function(e,t){e--;do{var r=A[++e];if(r==t)return e}while(r);return 0},_fputc:Bc,___setErrNo:M,_fwrite:hc,_send:fc,_write:gc,_exit:function(e){Ac(e)},___cxa_find_matching_catch:function(e,t){-1==e&&(e=B[U.m>>2]),-1==t&&(t=B[U.m+4>>2]);var r=Array.prototype.slice.call(arguments,2);0!=t&&!pc(t)&&0==B[B[t>>2]-8>>2]&&(e=B[e>>2]);for(var n=0;n=e},__formatString:kc,___resumeException:function(e){0==B[U.m>>2]&&(B[U.m>>2]=e),g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")},_llvm_uadd_with_overflow_i32:function(e,t){return e>>>=0,t>>>=0,0|(V.setTempRet0(4294967295>>0)},___cxa_does_inherit:qc,_getenv:xc,_vfprintf:function(e,t,r){return mc(e,t,B[r>>2])},___cxa_begin_catch:function(e){return oc.ta--,e},__ZSt18uncaught_exceptionv:oc,_pwrite:function(e,t,r,n){if(!(e=R[e]))return M(N.$),-1;try{return Ib(e,A,t,r,n)}catch(e){return Zb(e),-1}},___cxa_call_unexpected:function(e){s.P("Unexpected exception thrown, this is not properly supported - aborting"),za=l,g(e)},_sbrk:nc,_strerror_r:yc,___errno_location:function(){return rb},___gxx_personality_v0:aa(),___cxa_is_number_type:pc,_time:function(e){var t=Math.floor(Date.now()/1e3);return e&&(B[e>>2]=t),t},__exit:Ac,___cxa_end_catch:uc,STACKTOP:u,STACK_MAX:Ta,tempDoublePtr:qb,ABORT:za,cttz_i8:Wc,ctlz_i8:Vc,NaN:NaN,Infinity:1/0,_stderr:nb,__ZTVN10__cxxabiv120__si_class_type_infoE:ob,__ZTVN10__cxxabiv117__class_type_infoE:pb,___progname:k},I);s._crypto_scrypt=V._crypto_scrypt;var ic=s._strlen=V._strlen,tc=s._free=V._free;s._realloc=V._realloc;var tb=s._memset=V._memset,Oa=s._malloc=V._malloc,sb=s._memcpy=V._memcpy;s._calloc=V._calloc;var mb=s.runPostSets=V.runPostSets;s.dynCall_vi=V.dynCall_vi,s.dynCall_vii=V.dynCall_vii,s.dynCall_ii=V.dynCall_ii,s.dynCall_viii=V.dynCall_viii,s.dynCall_v=V.dynCall_v,s.dynCall_iii=V.dynCall_iii;var qa=function(e){return V.stackAlloc(e)},ja=function(){return V.stackSave()},ka=function(e){V.stackRestore(e)},lc;function X(e,t){e!=m&&("number"==typeof e?this.p(e):t==m&&"string"!=typeof e?this.k(e,256):this.k(e,t))}function Yc(){return new X(m)}function Zc(e,t){var r=$c[e.charCodeAt(t)];return r==m?-1:r}function ad(e){var t=Yc();return t.D(e),t}function Y(e,t){this.h=0|e,this.j=0|t}Y.Ca={},Y.D=function(e){if(-128<=e&&128>e){var t=Y.Ca[e];if(t)return t}return t=new Y(0|e,0>e?-1:0),-128<=e&&128>e&&(Y.Ca[e]=t),t},Y.p=function(e){return isNaN(e)||!isFinite(e)?Y.ZERO:e<=-Y.Ea?Y.MIN_VALUE:e+1>=Y.Ea?Y.MAX_VALUE:0>e?Y.p(-e).i():new Y(e%Y.B|0,e/Y.B|0)},Y.v=function(e,t){return new Y(e,t)},Y.k=function(e,t){0==e.length&&g(Error("number format error: empty string"));var r=t||10;if((2>r||36o?(o=Y.p(Math.pow(r,o)),i=i.multiply(o).add(Y.p(s))):i=(i=i.multiply(n)).add(Y.p(s))}return i},Y.ea=65536,Y.Od=16777216,Y.B=Y.ea*Y.ea,Y.Pd=Y.B/2,Y.Qd=Y.B*Y.ea,Y.eb=Y.B*Y.B,Y.Ea=Y.eb/2,Y.ZERO=Y.D(0),Y.ONE=Y.D(1),Y.Da=Y.D(-1),Y.MAX_VALUE=Y.v(-1,2147483647),Y.MIN_VALUE=Y.v(0,-2147483648),Y.cb=Y.D(16777216),q=Y.prototype,q.Z=function(){return this.j*Y.B+this.ob()},q.toString=function(e){if((2>(e=e||10)||36a.length;)a="0"+a;n=""+a+n}},q.ob=function(){return 0<=this.h?this.h:Y.B+this.h},q.G=function(){return 0==this.j&&0==this.h},q.n=function(){return 0>this.j},q.Pa=function(){return 1==(1&this.h)},q.o=function(e){return this.j==e.j&&this.h==e.h},q.Ra=function(){return 0>this.ja(Y.cb)},q.qb=function(e){return 0>>16,n=65535&this.j,i=this.h>>>16,a=e.j>>>16,o=65535&e.j,s=e.h>>>16;return e=0+((t=(65535&this.h)+(65535&e.h)+0)>>>16),i=0+((e+=i+s)>>>16),n=(n=0+((i+=n+o)>>>16))+(r+a)&65535,Y.v((65535&e)<<16|65535&t,n<<16|65535&i)},q.R=function(e){return this.add(e.i())},q.multiply=function(e){if(this.G()||e.G())return Y.ZERO;if(this.o(Y.MIN_VALUE))return e.Pa()?Y.MIN_VALUE:Y.ZERO;if(e.o(Y.MIN_VALUE))return this.Pa()?Y.MIN_VALUE:Y.ZERO;if(this.n())return e.n()?this.i().multiply(e.i()):this.i().multiply(e).i();if(e.n())return this.multiply(e.i()).i();if(this.Ra()&&e.Ra())return Y.p(this.Z()*e.Z());var t,r,n,i,a=this.j>>>16,o=65535&this.j,s=this.h>>>16,f=65535&this.h,u=e.j>>>16,c=65535&e.j,l=e.h>>>16;return n=0+((i=0+f*(e=65535&e.h))>>>16),r=0+((n+=s*e)>>>16),r+=(n=(65535&n)+f*l)>>>16,n&=65535,t=0+((r+=o*e)>>>16),t+=(r=(65535&r)+s*l)>>>16,r&=65535,t+=(r+=f*c)>>>16,r&=65535,t=t+(a*e+o*l+s*c+f*u)&65535,Y.v(n<<16|65535&i,t<<16|r)},q.F=function(e){if(e.G()&&g(Error("division by zero")),this.G())return Y.ZERO;if(this.o(Y.MIN_VALUE)){if(e.o(Y.ONE)||e.o(Y.Da))return Y.MIN_VALUE;if(e.o(Y.MIN_VALUE))return Y.ONE;if((n=this.Db().F(e).shiftLeft(1)).o(Y.ZERO))return e.n()?Y.ONE:Y.Da;var t=this.R(e.multiply(n));return n.add(t.F(e))}if(e.o(Y.MIN_VALUE))return Y.ZERO;if(this.n())return e.n()?this.i().F(e.i()):this.i().F(e).i();if(e.n())return this.F(e.i()).i();var r=Y.ZERO;for(t=this;t.rb(e);){for(var n=Math.max(1,Math.floor(t.Z()/e.Z())),i=48>=(i=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,i-48),a=Y.p(n),o=a.multiply(e);o.n()||o.qb(t);)n-=i,o=(a=Y.p(n)).multiply(e);a.G()&&(a=Y.ONE),r=r.add(a),t=t.R(o)}return r},q.xb=function(){return Y.v(~this.h,~this.j)},q.shiftLeft=function(e){if(0==(e&=63))return this;var t=this.h;return 32>e?Y.v(t<>>32-e):Y.v(0,t<>>1|e<<31,e>>1)},q=X.prototype,q.ga=function(e,t,r,n){for(var i=0,a=0;0<=--n;){var o=e*this[i++]+t[r]+a;a=Math.floor(o/67108864);t[r++]=67108863&o}return a},q.f=26,q.u=67108863,q.K=67108864,q.bb=Math.pow(2,52),q.Aa=26,q.Ba=0;var $c=[],bd,Z;for(bd=48,Z=0;9>=Z;++Z)$c[bd++]=Z;for(bd=97,Z=10;36>Z;++Z)$c[bd++]=Z;for(bd=65,Z=10;36>Z;++Z)$c[bd++]=Z;q=X.prototype,q.copyTo=function(e){for(var t=this.b-1;0<=t;--t)e[t]=this[t];e.b=this.b,e.c=this.c},q.D=function(e){this.b=1,this.c=0>e?-1:0,0e?this[0]=e+DV:this.b=0},q.k=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.nb(e,t);r=2}this.c=this.b=0;for(var n=e.length,i=p,a=0;0<=--n;){var o=8==r?255&e[n]:Zc(e,n);0>o?"-"==e.charAt(n)&&(i=l):(i=p,0==a?this[this.b++]=o:a+r>this.f?(this[this.b-1]|=(o&(1<>this.f-a):this[this.b-1]|=o<=this.f&&(a-=this.f))}8==r&&0!=(128&e[0])&&(this.c=-1,0>i|s,s=(this[r]&a)<=this.b)t.b=0;else{var n=e%this.f,i=this.f-n,a=(1<>n;for(var o=r+1;o>n;0>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n-=e.c}t.c=0>n?-1:0,-1>n?t[r++]=this.K+n:0=n.b)){var i=this.abs();if(i.b>>16)&&(f=a,u+=16),0!=(a=f>>8)&&(f=a,u+=8),0!=(a=f>>4)&&(f=a,u+=4),0!=(a=f>>2)&&(f=a,u+=2),0!=f>>1&&(u+=1),0<(f=this.f-u)?(n.Qa(f,o),i.Qa(f,r)):(n.copyTo(o),i.copyTo(r)),0!=(i=o[(n=o.b)-1])){a=i*(1<>this.Ba:0),u=this.bb/a,a=(1<s&&X.ZERO.t(r,r)}}}},q.toString=function(e){if(0>this.c)return"-"+this.i().toString(e);if(16==e)e=4;else if(8==e)e=3;else if(2==e)e=1;else if(32==e)e=5;else{if(4!=e)return this.Fb(e);e=2}var t,r=(1<>o)&&(n=l,i="0123456789abcdefghijklmnopqrstuvwxyz".charAt(t));0<=a;)o>(o+=this.f-e)):(t=this[a]>>(o-=e)&r,0>=o&&(o+=this.f,--a)),0this.c?this.i():this},q.U=function(e){if(0!=(t=this.c-e.c))return t;var t,r=this.b;if(0!=(t=r-e.b))return 0>this.c?-t:t;for(;0<=--r;)if(0!=(t=this[r]-e[r]))return t;return 0},X.ZERO=ad(0),X.ONE=ad(1),q=X.prototype,q.nb=function(e,t){this.D(0),t==m&&(t=10);for(var r=this.S(t),n=Math.pow(t,r),i=p,a=0,o=0,s=0;sf?"-"==e.charAt(s)&&0==this.ra()&&(i=l):(o=t*o+f,++a>=r&&(this.Ia(n),this.Ha(o),o=a=0))}0this.c?-1:0>=this.b||1==this.b&&0>=this[0]?0:1},q.Ia=function(e){this[this.b]=this.ga(e-1,this,0,this.b),++this.b,this.C()},q.Ha=function(e){var t=0;if(0!=e){for(;this.b<=t;)this[this.b++]=0;for(this[t]+=e;this[t]>=this.K;)this[t]-=this.K,++t>=this.b&&(this[this.b++]=0),++this[t]}},q.Fb=function(e){if(e==m&&(e=10),0==this.ra()||2>e||36this.c){if(1==this.b)return this[0]-this.K;if(0==this.b)return-1}else{if(1==this.b)return this[0];if(0==this.b)return 0}return(this[1]&(1<<32-this.f)-1)<>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n+=e.c}t.c=0>n?-1:0,0n&&(t[r++]=this.K+n),t.b=r,t.C()};var $={abs:function(e,t){var r=(r=new Y(e,t)).n()?r.i():r;B[qb>>2]=r.h,B[qb+4>>2]=r.j},Ka:function(){$.kb||($.kb=l,$.Xa=new X,$.Xa.k("4294967296",10),$.sa=new X,$.sa.k("18446744073709551616",10),$.xe=new X,$.ye=new X)},me:function(e,t){var r=new X;r.k(t.toString(),10);var n=new X;r.vb(n),(r=new X).k(e.toString(),10);var i=new X;return r.fa(n,i),i},stringify:function(e,t,r){return e=new Y(e,t).toString(),r&&"-"==e[0]&&($.Ka(),(r=new X).k(e,10),e=new X,$.sa.fa(r,e),e=e.toString(10)),e},k:function(e,t,r,n,i){$.Ka();var a=new X;a.k(e,t),(e=new X).k(r,10),(r=new X).k(n,10),i&&0>a.U(X.ZERO)&&(n=new X,a.fa($.sa,n),a=n),n=p,0>a.U(e)?(a=e,n=l):0>2]=a.h,B[qb+4>>2]=a.j,n&&g("range error")}},cd,dd;function lb(e){function t(){if(ab||(ab=l,Va(Xa)),Va(Ya),gb=l,s._main&&kb&&s.callMain(e),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)cb(s.postRun.shift());Va($a)}if(e=e||s.arguments,0e;e++)i.push(0)}w(0==L,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),w(0==Wa.length,"cannot call main when preRun functions remain to be called"),e=e||[],ab||(ab=l,Va(Xa));var r,n=e.length+1,i=[F(J("/bin/this.program"),"i8",Ka)];t();for(var a=0;a>4&15]),t.push("0123456789abcdef"[15&e[r]]);return t.join("")},e.crypto_scrypt=function(e,t,r,a,o,s){var f=new i(s),u=n(e),c=n(t);return function(e,t){if(0!==t)throw{message:"scrypt_raw."+e+" signalled an error"}}("_crypto_scrypt",scrypt_raw._crypto_scrypt(u,e.length,c,t.length,r,0,a,o,f.address,f.length)),function(e){for(var t=0;t=e)&&(n=e-1,console.error("invalid priority: "+a+" must be between 0 and "+n))),t[n].push(r)},n.dequeue=function(e){var r,n=null,a=t.length;for(i=null,r=0;rc.length);e+=1)l>=(s=o[e].timeout)&&(h("removeIdle() destroying obj - now:"+l+" timeout:"+s,"verbose"),c.push(o[e].obj));for(e=0,i=c.length;e0?(h("availableObjects.length="+n,"verbose"),p()):h("removeIdle() all objects removed","verbose")}function p(){u||(u=!0,c=setTimeout(d,i))}function b(){var e=null,n=s.size();if(h("dispense() clients="+n+" available="+o.length,"info"),n>0){for(;o.length>0;){if(h("dispense() - reusing obj","verbose"),e=o[0],t.validate(e.obj))return o.shift(),s.dequeue()(null,e.obj);r.destroy(e.obj)}f1?(t=arguments[0],n=arguments[1]):(t=arguments[0]instanceof Error?arguments[0]:null,n=arguments[0]instanceof Error?null:arguments[0]),t?(f-=1,i&&i(t,n),e.nextTick(function(){b()})):i?i(t,n):r.release(n)})}function m(){var e,r;if(!l&&f0?setTimeout(t,100):o.length!=f?setTimeout(t,100):e&&e()};t()},r.destroyAllNow=function(e){h("force destroying all objects","info");var t=o;o=[];for(var n=t.shift();null!==n&&void 0!==n;)r.destroy(n.obj),n=t.shift();u=!1,clearTimeout(c),e&&e()},r.pooled=function(e,t){return function(){var n=arguments,i=n[n.length-1],a="function"==typeof i;r.acquire(function(t,o){if(t)a&&i(t);else{var s=[o].concat(Array.prototype.slice.call(n,0,a?-1:void 0));s.push(function(){r.release(o),a&&i.apply(null,arguments)}),e.apply(null,s)}},t)}},r.getPoolSize=function(){return f},r.getName=function(){return t.name},r.availableObjectsCount=function(){return o.length},r.waitingClientsCount=function(){return s.size()},m(),r}}).call(this,r(9))},function(e,t,r){(function(t,n,i){var a=r(56),o=r(20).fork,s=r(102),f=r(101).cpus().length,u=u=new s.Pool({name:"scrypt-worker",create:function(e){var r=o(t+"/scrypt-async-worker.js");r.controlledExit=!1,r.on("exit",function(){r.controlledExit||n(u.destroy.bind(u,r))}),e(r)},destroy:function(e){try{e.controlledExit=!0,e.disconnect()}catch(e){}},max:Math.max(2,f-1),min:0,idleTimeoutMillis:15e3,log:!1});e.exports=function(e,t,r,n){var o=a.apply(null,arguments),s=o.callback||function(){};delete o.callback,o.password=o.password.toString("base64"),o.salt=o.salt.toString("base64");new Date;u.acquire(function(e,t){if(e)return u.release(t),s(e);t.once("message",function(e){new Date;u.release(t),e.error&&s(e.error),s(null,new i(e.data,"base64"))}),t.send(o)})}}).call(this,"/",r(37).setImmediate,r(7).Buffer)},function(e,t,r){e.exports={hash:r(103),hashSync:r(100)}},function(e,t,r){var n;e.exports=(n=r(5),r(31),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){var n,i;e.exports=(n=r(5),r(31),n.mode.ECB=((i=n.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),n.mode.ECB)},function(e,t,r){var n,i,a,o,s,f,u;e.exports=(n=r(5),a=(i=n).lib,o=a.Base,s=i.enc,f=s.Utf8,u=i.algo,void(u.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=f.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,s=a.words,u=0;u>>31}var l=(n<<5|n>>>27)+s+f[u];l+=u<20?1518500249+(i&a|~i&o):u<40?1859775393+(i^a^o):u<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=s._createHelper(u),i.HmacSHA1=s._createHmacHelper(u),n.SHA1)},function(e,t,r){var n;e.exports=(n=r(5),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var f=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],f=e[t+1],d=e[t+2],p=e[t+3],b=e[t+4],v=e[t+5],m=e[t+6],g=e[t+7],y=e[t+8],w=e[t+9],_=e[t+10],S=e[t+11],k=e[t+12],x=e[t+13],A=e[t+14],M=e[t+15],E=a[0],T=a[1],I=a[2],P=a[3];T=h(T=h(T=h(T=h(T=l(T=l(T=l(T=l(T=c(T=c(T=c(T=c(T=u(T=u(T=u(T=u(T,I=u(I,P=u(P,E=u(E,T,I,P,o,7,s[0]),T,I,f,12,s[1]),E,T,d,17,s[2]),P,E,p,22,s[3]),I=u(I,P=u(P,E=u(E,T,I,P,b,7,s[4]),T,I,v,12,s[5]),E,T,m,17,s[6]),P,E,g,22,s[7]),I=u(I,P=u(P,E=u(E,T,I,P,y,7,s[8]),T,I,w,12,s[9]),E,T,_,17,s[10]),P,E,S,22,s[11]),I=u(I,P=u(P,E=u(E,T,I,P,k,7,s[12]),T,I,x,12,s[13]),E,T,A,17,s[14]),P,E,M,22,s[15]),I=c(I,P=c(P,E=c(E,T,I,P,f,5,s[16]),T,I,m,9,s[17]),E,T,S,14,s[18]),P,E,o,20,s[19]),I=c(I,P=c(P,E=c(E,T,I,P,v,5,s[20]),T,I,_,9,s[21]),E,T,M,14,s[22]),P,E,b,20,s[23]),I=c(I,P=c(P,E=c(E,T,I,P,w,5,s[24]),T,I,A,9,s[25]),E,T,p,14,s[26]),P,E,y,20,s[27]),I=c(I,P=c(P,E=c(E,T,I,P,x,5,s[28]),T,I,d,9,s[29]),E,T,g,14,s[30]),P,E,k,20,s[31]),I=l(I,P=l(P,E=l(E,T,I,P,v,4,s[32]),T,I,y,11,s[33]),E,T,S,16,s[34]),P,E,A,23,s[35]),I=l(I,P=l(P,E=l(E,T,I,P,f,4,s[36]),T,I,b,11,s[37]),E,T,g,16,s[38]),P,E,_,23,s[39]),I=l(I,P=l(P,E=l(E,T,I,P,x,4,s[40]),T,I,o,11,s[41]),E,T,p,16,s[42]),P,E,m,23,s[43]),I=l(I,P=l(P,E=l(E,T,I,P,w,4,s[44]),T,I,k,11,s[45]),E,T,M,16,s[46]),P,E,d,23,s[47]),I=h(I,P=h(P,E=h(E,T,I,P,o,6,s[48]),T,I,g,10,s[49]),E,T,A,15,s[50]),P,E,v,21,s[51]),I=h(I,P=h(P,E=h(E,T,I,P,k,6,s[52]),T,I,p,10,s[53]),E,T,_,15,s[54]),P,E,f,21,s[55]),I=h(I,P=h(P,E=h(E,T,I,P,y,6,s[56]),T,I,M,10,s[57]),E,T,m,15,s[58]),P,E,x,21,s[59]),I=h(I,P=h(P,E=h(E,T,I,P,b,6,s[60]),T,I,S,10,s[61]),E,T,d,15,s[62]),P,E,w,21,s[63]),a[0]=a[0]+E|0,a[1]=a[1]+T|0,a[2]=a[2]+I|0,a[3]=a[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var a=e.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,u=0;u<4;u++){var c=f[u];f[u]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<>>32-a)+t}function c(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<>>32-a)+t}function h(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(f),t.HmacMD5=a._createHmacHelper(f)}(Math),n.MD5)},function(e,t,r){var n,i,a;e.exports=(n=r(5),a=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var f=n.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-o%4*2;n[i>>>2]|=(s|f)<<24-i%4*8,i++}return a.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},function(e,t,r){var n;e.exports=(n=r(5),r(110),r(109),r(57),r(31),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],f=[],u=[],c=[],l=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,a[p]=r;var b=e[r],v=e[b],m=e[v],g=257*e[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,u[r]=g,g=16843009*m^65537*v^257*b^16843008*r,c[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,h[p]=g<<8|g>>>24,d[p]=g,r?(r=b^e[e[e[m^b]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],b=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o6&&o%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[o/r|0]<<24),a[o]=a[o-r]^s}for(var f=this._invKeySchedule=[],u=0;u>>24]]^l[i[s>>>16&255]]^h[i[s>>>8&255]]^d[i[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,f,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,c,l,h,d,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var f=this._nRounds,u=e[t]^r[0],c=e[t+1]^r[1],l=e[t+2]^r[2],h=e[t+3]^r[3],d=4,p=1;p>>24]^i[c>>>16&255]^a[l>>>8&255]^o[255&h]^r[d++],v=n[c>>>24]^i[l>>>16&255]^a[h>>>8&255]^o[255&u]^r[d++],m=n[l>>>24]^i[h>>>16&255]^a[u>>>8&255]^o[255&c]^r[d++],g=n[h>>>24]^i[u>>>16&255]^a[c>>>8&255]^o[255&l]^r[d++];u=b,c=v,l=m,h=g}b=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[d++],v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[d++],m=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^r[d++],g=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[d++],e[t]=b,e[t+1]=v,e[t+2]=m,e[t+3]=g},keySize:8});e.AES=t._createHelper(b)}(),n.AES)},function(e,t,r){var n;e.exports=(n=r(5),n.enc.Latin1)},function(e,t){},function(e,t,r){(function(n,i){var a;!function(o){"use strict";function s(e,t){if(t=t||{type:"Array"},void 0!==n&&"number"==typeof n.pid)return function(e,t){var n=r(113).randomBytes(e);switch(t.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(e),a=0;a0||e===t?t:t-1}function w(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(f=i.length)<(u=a.length)?f:u,o=0;oa[o]^r?1:-1;return f==u?0:f>u^r?1:-1}function S(e,t,r){return(e=E(e))>=t&&e<=r}function k(e){return"[object Array]"==Object.prototype.toString.call(e)}function x(e,t,r){for(var n,i,a=[0],o=0,s=e.length;or-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function M(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t15&&J(R,l,e),s=!1):d.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=X(c,10,t,d.s)}else{if(e instanceof W)return d.s=e.s,d.e=e.e,d.c=(e=e.c)?e.slice():e,void(R=0);if((s="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;a>=10;a/=10,i++);return d.e=i,d.c=[e],void(R=0)}c=e+""}else{if(!o.test(c=e+""))return n(d,c,s);d.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((i=c.indexOf("."))>-1&&(c=c.replace(".","")),(a=c.search(/e/i))>0?(i<0&&(i=a),i+=+c.slice(a+1),c=c.substring(0,a)):i<0&&(i=c.length),a=0;48===c.charCodeAt(a);a++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(a,u+1))if(u=c.length,s&&U&&u>15&&(e>b||e!==f(e))&&J(R,l,d.s*e),(i=i-a-1)>H)d.c=d.e=null;else if(i=0&&(s=Y,Y=0,e=e.replace(".",""),u=(l=new W(n)).pow(e.length-d),Y=s,l.c=x(M(w(u.c),u.e),10,t),l.e=l.c.length),o=s=(c=x(e,n,t)).length;0==c[--s];c.pop());if(!c[0])return"0";if(d<0?--o:(u.c=c,u.e=o,u.s=i,c=(u=r(u,l,p,b,t)).c,f=u.r,o=u.e),d=c[a=o+p+1],s=t/2,f=f||a<0||null!=c[a+1],f=b<4?(null!=d||f)&&(0==b||b==(u.s<0?3:2)):d>s||d==s&&(4==b||f||6==b&&1&c[a-1]||b==(u.s<0?8:7)),a<1||!c[0])e=f?M("1",-p):"0";else{if(c.length=a,f)for(--t;++c[--a]>t;)c[a]=0,a||(++o,c=[1].concat(c));for(s=c.length;!c[--s];);for(d=0,e="";d<=s;e+=h.charAt(c[d++]));e=M(e,o)}return e}function Z(e,t,r,n){var i,a,o,s,f;if(r=null!=r&&D(r,0,8,n,c)?0|r:N,!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)f=w(e.c),f=19==n||24==n&&o<=L?A(f,o):M(f,o);else if(a=(e=ee(new W(e),t,r)).e,s=(f=w(e.c)).length,19==n||24==n&&(t<=a||a<=L)){for(;ss){if(--t>0)for(f+=".";t--;f+="0");}else if((t+=a-s)>0)for(a+1==s&&(f+=".");t--;f+="0");return e.s<0&&i?"-"+f:f}function G(e,t){var r,n,i=0;for(k(e[0])&&(e=e[0]),r=new W(e[0]);++ir||e!=E(e))&&J(n,(i||"decimal places")+(er?" out of range":" not an integer"),e),!0}function $(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*p-1)>H?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=p,o=t,h=(c=b[l=0])/m[i-o-1]%10|0;else if((l=s((a+1)/p))>=b.length){if(!n)break e;for(;b.length<=l;b.push(0));c=h=0,i=1,o=(a%=p)-p+1}else{for(c=u=b[l],i=1;u>=10;u/=10,i++);h=(o=(a%=p)-p+i)<0?0:c/m[i-o-1]%10|0}if(n=n||t<0||null!=b[l+1]||(o<0?c:c%m[i-o-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(a>0?o>0?c/m[i-o]:0:b[l-1])%10&1||r==(e.s<0?8:7)),t<1||!b[0])return b.length=0,n?(t-=e.e+1,b[0]=m[(p-t%p)%p],e.e=-t||0):b[0]=e.e=0,e;if(0==a?(b.length=l,u=1,l--):(b.length=l+1,u=m[p-a],b[l]=o>0?f(c/m[i-o]%m[o])*u:0),n)for(;;){if(0==l){for(a=1,o=b[0];o>=10;o/=10,a++);for(o=b[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,b[0]==d&&(b[0]=1));break}if(b[l]+=u,b[l]!=d)break;b[l--]=0,u=1}for(a=b.length;0===b[--a];b.pop());}e.e>H?e.c=e.e=null:e.er)return null!=(e=i[r++])};return o(t="DECIMAL_PLACES")&&D(e,0,g,2,t)&&(j=0|e),n[t]=j,o(t="ROUNDING_MODE")&&D(e,0,8,2,t)&&(N=0|e),n[t]=N,o(t="EXPONENTIAL_AT")&&(k(e)?D(e[0],-g,0,2,t)&&D(e[1],0,g,2,t)&&(L=0|e[0],F=0|e[1]):D(e,-g,g,2,t)&&(L=-(F=0|(e<0?-e:e)))),n[t]=[L,F],o(t="RANGE")&&(k(e)?D(e[0],-g,-1,2,t)&&D(e[1],1,g,2,t)&&(z=0|e[0],H=0|e[1]):D(e,-g,g,2,t)&&(0|e?z=-(H=0|(e<0?-e:e)):U&&J(2,t+" cannot be zero",e))),n[t]=[z,H],o(t="ERRORS")&&(e===!!e||1===e||0===e?(R=0,D=(U=!!e)?Q:S):U&&J(2,t+u,e)),n[t]=U,o(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?q=!0:U?J(2,"crypto unavailable",e?void 0:crypto):q=!1:q=!1:U&&J(2,t+u,e)),n[t]=q,o(t="MODULO_MODE")&&D(e,0,9,2,t)&&(K=0|e),n[t]=K,o(t="POW_PRECISION")&&D(e,0,g,2,t)&&(Y=0|e),n[t]=Y,o(t="FORMAT")&&("object"==typeof e?V=e:U&&J(2,t+" not an object",e)),n[t]=V,n},W.max=function(){return G(arguments,C.lt)},W.min=function(){return G(arguments,C.gt)},W.random=(i=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,o,u=0,c=[],l=new W(B);if(e=null!=e&&D(e,0,g,14)?0|e:j,a=s(e/p),q)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(c.push(o%1e14),u+=2);u=a/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(a*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(c.push(o%1e14),u+=7);u=a/7}else q=!1,U&&J(14,"crypto unavailable",crypto);if(!q)for(;u=10;o/=10,u++);un?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,c,l,h,b,v,m,g,w,_,S,k,x,A,M,E,T,I=n.s==i.s?1:-1,P=n.c,O=i.c;if(!(P&&P[0]&&O&&O[0]))return new W(n.s&&i.s&&(P?!O||P[0]!=O[0]:O)?P&&0==P[0]||!O?0*I:I/0:NaN);for(w=(g=new W(I)).c=[],I=a+(c=n.e-i.e)+1,s||(s=d,c=y(n.e/p)-y(i.e/p),I=I/p|0),l=0;O[l]==(P[l]||0);l++);if(O[l]>(P[l]||0)&&c--,I<0)w.push(1),h=!0;else{for(A=P.length,E=O.length,l=0,I+=2,(b=f(s/(O[0]+1)))>1&&(O=e(O,b,s),P=e(P,b,s),E=O.length,A=P.length),x=E,S=(_=P.slice(0,E)).length;S=s/2&&M++;do{if(b=0,(u=t(O,_,E,S))<0){if(k=_[0],E!=S&&(k=k*s+(_[1]||0)),(b=f(k/M))>1)for(b>=s&&(b=s-1),m=(v=e(O,b,s)).length,S=_.length;1==t(v,_,m,S);)b--,r(v,E=10;I/=10,l++);ee(g,a+(g.e=l+c*p-1)+1,o,h)}else g.e=c,g.r=+h;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,I=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(P.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(T,"$1").replace(I,"0.$1")),t!=o))return new W(o,i);U&&J(R,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,R=0},C.absoluteValue=C.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},C.ceil=function(){return ee(new W(this),this.e+1,2)},C.comparedTo=C.cmp=function(e,t){return R=1,_(this,new W(e,t))},C.decimalPlaces=C.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-y(this.e/p))*p,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},C.dividedBy=C.div=function(e,t){return R=3,r(this,new W(e,t),j,N)},C.dividedToIntegerBy=C.divToInt=function(e,t){return R=4,r(this,new W(e,t),0,1)},C.equals=C.eq=function(e,t){return R=5,0===_(this,new W(e,t))},C.floor=function(){return ee(new W(this),this.e+1,3)},C.greaterThan=C.gt=function(e,t){return R=6,_(this,new W(e,t))>0},C.greaterThanOrEqualTo=C.gte=function(e,t){return R=7,1===(t=_(this,new W(e,t)))||0===t},C.isFinite=function(){return!!this.c},C.isInteger=C.isInt=function(){return!!this.c&&y(this.e/p)>this.c.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.lessThan=C.lt=function(e,t){return R=8,_(this,new W(e,t))<0},C.lessThanOrEqualTo=C.lte=function(e,t){return R=9,-1===(t=_(this,new W(e,t)))||0===t},C.minus=C.sub=function(e,t){var r,n,i,a,o=this,s=o.s;if(R=10,t=(e=new W(e,t)).s,!s||!t)return new W(NaN);if(s!=t)return e.s=-t,o.plus(e);var f=o.e/p,u=e.e/p,c=o.c,l=e.c;if(!f||!u){if(!c||!l)return c?(e.s=-t,e):new W(l?o:NaN);if(!c[0]||!l[0])return l[0]?(e.s=-t,e):new W(c[0]?o:3==N?-0:0)}if(f=y(f),u=y(u),c=c.slice(),s=f-u){for((a=s<0)?(s=-s,i=c):(u=f,i=l),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=c.length)<(t=l.length))?s:t,s=t=0;t0)for(;t--;c[r++]=0);for(t=d-1;n>s;){if(c[--n]0?(o=a,r=f):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=f.length)<0&&(r=f,f=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+f[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++o),$(e,s,o)},C.precision=C.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(U&&J(13,"argument"+u,e),e!=!!e&&(e=null)),!i)return null;if(t=(r=i.length-1)*p+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},C.round=function(e,t){var r=new W(this);return(null==e||D(e,0,g,15))&&ee(r,~~e+this.e+1,null!=t&&D(t,0,8,15,c)?0|t:N),r},C.shift=function(e){var t=this;return D(e,-b,b,16,"argument")?t.times("1e"+E(e)):new W(t.c&&t.c[0]&&(e<-b||e>b)?t.s*(e<0?0:1/0):t)},C.squareRoot=C.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,f=o.s,u=o.e,c=j+4,l=new W("0.5");if(1!==f||!s||!s[0])return new W(!f||f<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(f=Math.sqrt(+o))||f==1/0?(((t=w(s)).length+u)%2==0&&(t+="0"),f=Math.sqrt(t),u=y((u+1)/2)-(u<0||u%2),n=new W(t=f==1/0?"1e"+u:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new W(f+""),n.c[0])for((f=(u=n.e)+c)<3&&(f=0);;)if(a=n,n=l.times(a.plus(r(o,a,c,1))),w(a.c).slice(0,f)===(t=w(n.c)).slice(0,f)){if(n.e=0;){for(r=0,h=k[i]%w,b=k[i]/w|0,a=i+(o=f);a>i;)r=((u=h*(u=S[--o]%w)+(s=b*u+(c=S[o]/w|0)*h)%w*w+v[a]+r)/g|0)+(s/w|0)+b*c,v[a--]=u%g;v[a]=r}return r?++n:v.splice(0,1),$(e,v,n)},C.toDigits=function(e,t){var r=new W(this);return e=null!=e&&D(e,1,g,18,"precision")?0|e:null,t=null!=t&&D(t,0,8,18,c)?0|t:N,e?ee(r,e,t):r},C.toExponential=function(e,t){return Z(this,null!=e&&D(e,0,g,19)?1+~~e:null,t,19)},C.toFixed=function(e,t){return Z(this,null!=e&&D(e,0,g,20)?~~e+this.e+1:null,t,20)},C.toFormat=function(e,t){var r=Z(this,null!=e&&D(e,0,g,21)?~~e+this.e+1:null,t,21);if(this.c){var n,i=r.split("."),a=+V.groupSize,o=+V.secondaryGroupSize,s=V.groupSeparator,f=i[0],u=i[1],c=this.s<0,l=c?f.slice(1):f,h=l.length;if(o&&(n=a,a=o,o=n,h-=n),a>0&&h>0){for(n=h%a||a,f=l.substr(0,n);n0&&(f+=s+l.slice(n)),c&&(f="-"+f)}r=u?f+V.decimalSeparator+((o=+V.fractionGroupSize)?u.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+V.fractionGroupSeparator):u):f}return r},C.toFraction=function(e){var t,n,i,a,o,s,f,u,c,l=U,h=this,d=h.c,b=new W(B),m=n=new W(B),g=f=new W(B);if(null!=e&&(U=!1,s=new W(e),U=l,(l=s.isInt())&&!s.lt(B)||(U&&J(22,"max denominator "+(l?"out of range":"not an integer"),e),e=!l&&s.c&&ee(s,s.e+1,1).gte(B)?s:null)),!d)return h.toString();for(c=w(d),a=b.e=c.length-h.e-1,b.c[0]=v[(o=a%p)<0?p+o:o],e=!e||s.cmp(b)>0?a>0?b:m:s,o=H,H=1/0,s=new W(c),f.c[0]=0;u=r(s,b,0,1),1!=(i=n.plus(u.times(g))).cmp(e);)n=g,g=i,m=f.plus(u.times(i=m)),f=i,b=s.minus(u.times(i=b)),s=i;return i=r(e.minus(n),g,0,1),f=f.plus(i.times(m)),n=n.plus(i.times(g)),f.s=m.s=h.s,t=r(m,g,a*=2,N).minus(h).abs().cmp(r(f,n,a,N).minus(h).abs())<1?[m.toString(),g.toString()]:[f.toString(),n.toString()],H=o,t},C.toNumber=function(){return+this},C.toPower=C.pow=function(e,t){var r,n,i,a=f(e<0?-e:+e),o=this;if(null!=t&&(R=23,t=new W(t)),!D(e,-b,b,23,"exponent")&&(!isFinite(e)||a>b&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+o,e),new W(t?r%t:r);for(t?e>1&&o.gt(B)&&o.isInt()&&t.gt(B)&&t.isInt()?o=o.mod(t):(i=t,t=null):Y&&(r=s(Y/p+2)),n=new W(B);;){if(a%2){if(!(n=n.times(o)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(a=f(a/2)))break;o=o.times(o),r?o.c&&o.c.length>r&&(o.c.length=r):t&&(o=o.mod(t))}return t?n:(e<0&&(n=B.div(n)),i?n.mod(i):r?ee(n,Y,N):n)},C.toPrecision=function(e,t){return Z(this,null!=e&&D(e,1,g,24,"precision")?0|e:null,t,24)},C.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=w(r.c),t=null!=e&&D(e,2,64,25,"base")?X(M(t,i),0|e,10,n):i<=L||i>=F?A(t,i):M(t,i),n<0&&r.c[0]&&(t="-"+t)),t},C.truncated=C.trunc=function(){return ee(new W(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=w(t.c),e=r<=L||r>=F?A(e,r):M(e,r),t.s<0?"-"+e:e)},C.isBigNumber=!0,null!=t&&W.config(t),W}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n;e.exports=(n=r(5), /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. @@ -16,11 +16,11 @@ var n=r(167),i=r(166),a=r(74);function o(){return f.TYPED_ARRAY_SUPPORT?21474836 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([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]),f=i.create([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]),u=i.create([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]),c=i.create([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]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),h=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,h,w,_,S,k,x,A,M,E,T=this._hash.words,I=l.words,P=d.words,O=s.words,R=f.words,C=u.words,B=c.words;for(S=a=T[0],k=o=T[1],x=h=T[2],A=w=T[3],M=_=T[4],r=0;r<80;r+=1)E=a+e[t+O[r]]|0,E+=r<16?p(o,h,w)+I[0]:r<32?b(o,h,w)+I[1]:r<48?v(o,h,w)+I[2]:r<64?m(o,h,w)+I[3]:g(o,h,w)+I[4],E=(E=y(E|=0,C[r]))+_|0,a=_,_=w,w=y(h,10),h=o,o=E,E=S+e[t+R[r]]|0,E+=r<16?g(k,x,A)+P[0]:r<32?m(k,x,A)+P[1]:r<48?v(k,x,A)+P[2]:r<64?b(k,x,A)+P[3]:p(k,x,A)+P[4],E=(E=y(E|=0,B[r]))+M|0,S=M,M=A,A=y(x,10),x=k,k=E;E=T[1]+h+A|0,T[1]=T[2]+w+M|0,T[2]=T[3]+_+S|0,T[3]=T[4]+a+k|0,T[4]=T[0]+o+x|0,T[0]=E},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function b(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function y(e,t){return e<>>32-t}t.RIPEMD160=a._createHelper(h),t.HmacRIPEMD160=a._createHmacHelper(h)}(Math),n.RIPEMD160)},function(e,t,r){"use strict";var n=r(11),i=r(7).utils,a=i.assert,o=i.cachedProperty,s=i.parseBytes;function f(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=f},function(e,t,r){"use strict";var n=r(7).utils,i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(34),i=r(7),a=i.utils,o=a.assert,s=a.parseBytes,f=r(119),u=r(118);function c(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:a})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=s(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=s(e,r);if(e.length!==f+r.place)return!1;var u=e.slice(r.place,f+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new n(o),this.s=new n(u),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var a=n.concat(r),o=[48];return u(o,a.length),o=o.concat(a),i.encode(o,e)}},function(e,t,r){"use strict";var n=r(11),i=r(7).utils.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},function(e,t,r){"use strict";var n=r(34),i=r(64),a=r(13);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),c=new i({hash:this.hash,entropy:s,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new n(1)),d=0;;d++){var h=a.k?a.k(d):new n(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var m=h.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new f({r:v,s:m,recoveryParam:g})}}}}}},u.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var a=(t=new f(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,u=o.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},u.prototype.recoverPubKey=function(e,t,r,i){o((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var a=this.n,s=new n(e),u=t.r,c=t.s,l=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var h=t.r.invm(a),p=a.sub(s).mul(h).umod(a),b=c.mul(h).umod(a);return this.g.mulAdd(p,u,b)},u.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),f=i.redMul(o),u=a.redMul(s),c=i.redMul(s),l=o.redMul(a);return this.curve.point(f,u,l,c)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(u=this.curve._mulA(i)).redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(u.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=n.redSub(i).redISub(a).redMul(f),t=o.redMul(u.redSub(a)),r=o.redMul(f)}}else{var u=i.redAdd(a);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=u.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(u)).redMul(f),t=this.curve._mulC(u).redMul(i.redISub(a)),r=u.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=a.redMul(o),c=s.redMul(f),l=a.redMul(f),d=o.redMul(s);return this.curve.point(u,c,d,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(u)):(t=n.redMul(u).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(u)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";var n=r(24),i=r(11),a=r(1),o=n.base,s=r(7).utils;function f(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(f,o),e.exports=f,f.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(u,o.BasePoint),f.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},f.prototype.point=function(e,t){return new u(this,e,t)},f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(24),i=r(7),a=r(11),o=r(1),s=n.base,f=i.utils.assert;function u(e){s.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],f(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,f,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),m=new a(1),g=0;0!==d.cmpn(0);){var y=h.div(d);u=h.sub(y.mul(d)),c=v.sub(y.mul(p));var w=m.sub(y.mul(b));if(!n&&u.cmp(l)<0)t=f.neg(),r=p,n=u.neg(),i=c;else if(n&&2==++g)break;f=u,h=d,d=u,v=p,p=c,m=b,b=w}o=u.neg(),s=c;var _=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(_)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),f=i.mul(r.b),u=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:f.add(u).neg()}},u.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=n.redMul(u),d=f.redSqr().redIAdd(c).redISub(l).redISub(l),h=f.redMul(l.redISub(d)).redISub(a.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),c=r.redMul(f),l=s.redSqr().redIAdd(u).redISub(c).redISub(c),d=s.redMul(c.redISub(l)).redISub(i.redMul(u)),h=this.z.redMul(o);return this.curve.jpoint(l,d,h)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(11),i=r(7).utils,a=i.getNAF,o=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<=f;t--)u=(u<<1)+n[t];o.push(u)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(f=0;f=0;u--){for(t=0;u>=0&&0===o[u];u--)t++;if(u>=0&&t++,f=f.dblp(t),u<0)break;var c=o[u];s(0!==c),f="affine"===e.type?c>0?f.mixedAdd(i[c-1>>1]):f.mixedAdd(i[-c-1>>1].neg()):c>0?f.add(i[c-1>>1]):f.add(i[-c-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,u=this._wnafT3,c=0,l=0;l=1;l-=2){var h=l-1,p=l;if(1===s[h]&&1===s[p]){var b=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(b[1]=t[h].add(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].add(t[p].neg())):(b[1]=t[h].toJ().mixedAdd(t[p]),b[2]=t[h].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],m=o(r[h],r[p]);c=Math.max(m[0].length,c),u[h]=new Array(c),u[p]=new Array(c);for(var g=0;g=0;l--){for(var k=0;l>=0;){var x=!0;for(g=0;g=0&&k++,_=_.dblp(k),l<0)break;for(g=0;g0?A=f[g][M-1>>1]:M<0&&(A=f[g][-M-1>>1].neg()),_="affine"===A.type?_.mixedAdd(A):_.add(A))}}for(l=0;l=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,f=1;f0||t.cmpn(-i)>0;){var a,o,s,f=e.andln(3)+n&3,u=t.andln(3)+i&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==u?f:-f,r[0].push(a),o=0==(1&u)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?u:-u,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e){e.exports={_from:"elliptic@^6.4.0",_id:"elliptic@6.4.0",_inBundle:!1,_integrity:"sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.4.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.4.0",saveSpec:null,fetchSpec:"^6.4.0"},_requiredBy:["/","/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_spec:"elliptic@^6.4.0",_where:"C:\\Users\\JunXiang\\Desktop\\neon-js",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},function(e,t,r){var n=r(4).Buffer;e.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),a=0;a>=8;for(;u>0;)a.push(255&u),u>>=8}for(var c=0;e[c]===i&&c0;)n.push(s%r),s=s/r|0}for(var f="",u=0;0===t[u]&&u=0;--c)f+=e[n[c]];return f},decodeUnsafe:s,decode:function(e){var t=s(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";var n=r(35),i=r(4).Buffer;e.exports=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return n.encode(i.concat([t,r],t.length+4))},decode:function(e){var r=t(n.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=n.decodeUnsafe(e);if(r)return t(r)}}}},function(e,t,r){var n=r(4).Buffer,i=r(72).Transform,a=r(36).StringDecoder;function o(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1)(o,i),o.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=o},function(e,t,r){var n=r(1),i=r(66),a=r(18),o=r(4).Buffer,s=new Array(160);function f(){this.init(),this._w=s,a.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t,r){var n=r(1),i=r(67),a=r(18),o=r(4).Buffer,s=new Array(64);function f(){this.init(),this._w=s,a.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),b=u(n)+l(p,i,a,s)+f+r[h]+o[p]|0;f=s,s=a,a=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+c(h,i,a,s)+f+r[d]+o[h];f=s,s=a,a=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(148),t.sha1=r(147),t.sha224=r(146),t.sha256=r(67),t.sha384=r(145),t.sha512=r(66)},function(e,t,r){e.exports=r(39).PassThrough},function(e,t,r){e.exports=r(39).Transform},function(e,t,r){e.exports=r(14)},function(e,t,r){e.exports=r(38)},function(e,t,r){"use strict";e.exports=a;var n=r(68),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r(1),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(15))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,o,s,f=1,u={},c=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){a.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,a=n.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=a,i=s,t.copy(r,i),s+=o.data.length,o=o.next;return a},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";(function(t){var n=r(72).Transform;function i(e){n.call(this),this._block=new t(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1)(i,n),i.prototype._transform=function(e,r,n){var i=null;try{"buffer"!==r&&(e=new t(e,r)),this.update(e)}catch(e){i=e}n(i)},i.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,r){if(!t.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");t.isBuffer(e)||(e=new t(e,r||"binary"));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=i}).call(this,r(5).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(160);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function o(e,t){return e<>>32-t}function s(e,t,r,n,i,a,s,f){return o(e+(t^r^n)+a+s|0,f)+i|0}function f(e,t,r,n,i,a,s,f){return o(e+(t&r|~t&n)+a+s|0,f)+i|0}function u(e,t,r,n,i,a,s,f){return o(e+((t|~r)^n)+a+s|0,f)+i|0}function c(e,t,r,n,i,a,s,f){return o(e+(t&n|r&~n)+a+s|0,f)+i|0}function l(e,t,r,n,i,a,s,f){return o(e+(t^(r|~n))+a+s|0,f)+i|0}n(a,i),a.prototype._update=function(){for(var e=new Array(16),t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d,d=this._e;d=s(d,r=s(r,n,i,a,d,e[0],0,11),n,i=o(i,10),a,e[1],0,14),n=s(n=o(n,10),i=s(i,a=s(a,d,r,n,i,e[2],0,15),d,r=o(r,10),n,e[3],0,12),a,d=o(d,10),r,e[4],0,5),a=s(a=o(a,10),d=s(d,r=s(r,n,i,a,d,e[5],0,8),n,i=o(i,10),a,e[6],0,7),r,n=o(n,10),i,e[7],0,9),r=s(r=o(r,10),n=s(n,i=s(i,a,d,r,n,e[8],0,11),a,d=o(d,10),r,e[9],0,13),i,a=o(a,10),d,e[10],0,14),i=s(i=o(i,10),a=s(a,d=s(d,r,n,i,a,e[11],0,15),r,n=o(n,10),i,e[12],0,6),d,r=o(r,10),n,e[13],0,7),d=f(d=o(d,10),r=s(r,n=s(n,i,a,d,r,e[14],0,9),i,a=o(a,10),d,e[15],0,8),n,i=o(i,10),a,e[7],1518500249,7),n=f(n=o(n,10),i=f(i,a=f(a,d,r,n,i,e[4],1518500249,6),d,r=o(r,10),n,e[13],1518500249,8),a,d=o(d,10),r,e[1],1518500249,13),a=f(a=o(a,10),d=f(d,r=f(r,n,i,a,d,e[10],1518500249,11),n,i=o(i,10),a,e[6],1518500249,9),r,n=o(n,10),i,e[15],1518500249,7),r=f(r=o(r,10),n=f(n,i=f(i,a,d,r,n,e[3],1518500249,15),a,d=o(d,10),r,e[12],1518500249,7),i,a=o(a,10),d,e[0],1518500249,12),i=f(i=o(i,10),a=f(a,d=f(d,r,n,i,a,e[9],1518500249,15),r,n=o(n,10),i,e[5],1518500249,9),d,r=o(r,10),n,e[2],1518500249,11),d=f(d=o(d,10),r=f(r,n=f(n,i,a,d,r,e[14],1518500249,7),i,a=o(a,10),d,e[11],1518500249,13),n,i=o(i,10),a,e[8],1518500249,12),n=u(n=o(n,10),i=u(i,a=u(a,d,r,n,i,e[3],1859775393,11),d,r=o(r,10),n,e[10],1859775393,13),a,d=o(d,10),r,e[14],1859775393,6),a=u(a=o(a,10),d=u(d,r=u(r,n,i,a,d,e[4],1859775393,7),n,i=o(i,10),a,e[9],1859775393,14),r,n=o(n,10),i,e[15],1859775393,9),r=u(r=o(r,10),n=u(n,i=u(i,a,d,r,n,e[8],1859775393,13),a,d=o(d,10),r,e[1],1859775393,15),i,a=o(a,10),d,e[2],1859775393,14),i=u(i=o(i,10),a=u(a,d=u(d,r,n,i,a,e[7],1859775393,8),r,n=o(n,10),i,e[0],1859775393,13),d,r=o(r,10),n,e[6],1859775393,6),d=u(d=o(d,10),r=u(r,n=u(n,i,a,d,r,e[13],1859775393,5),i,a=o(a,10),d,e[11],1859775393,12),n,i=o(i,10),a,e[5],1859775393,7),n=c(n=o(n,10),i=c(i,a=u(a,d,r,n,i,e[12],1859775393,5),d,r=o(r,10),n,e[1],2400959708,11),a,d=o(d,10),r,e[9],2400959708,12),a=c(a=o(a,10),d=c(d,r=c(r,n,i,a,d,e[11],2400959708,14),n,i=o(i,10),a,e[10],2400959708,15),r,n=o(n,10),i,e[0],2400959708,14),r=c(r=o(r,10),n=c(n,i=c(i,a,d,r,n,e[8],2400959708,15),a,d=o(d,10),r,e[12],2400959708,9),i,a=o(a,10),d,e[4],2400959708,8),i=c(i=o(i,10),a=c(a,d=c(d,r,n,i,a,e[13],2400959708,9),r,n=o(n,10),i,e[3],2400959708,14),d,r=o(r,10),n,e[7],2400959708,5),d=c(d=o(d,10),r=c(r,n=c(n,i,a,d,r,e[15],2400959708,6),i,a=o(a,10),d,e[14],2400959708,8),n,i=o(i,10),a,e[5],2400959708,6),n=l(n=o(n,10),i=c(i,a=c(a,d,r,n,i,e[6],2400959708,5),d,r=o(r,10),n,e[2],2400959708,12),a,d=o(d,10),r,e[4],2840853838,9),a=l(a=o(a,10),d=l(d,r=l(r,n,i,a,d,e[0],2840853838,15),n,i=o(i,10),a,e[5],2840853838,5),r,n=o(n,10),i,e[9],2840853838,11),r=l(r=o(r,10),n=l(n,i=l(i,a,d,r,n,e[7],2840853838,6),a,d=o(d,10),r,e[12],2840853838,8),i,a=o(a,10),d,e[2],2840853838,13),i=l(i=o(i,10),a=l(a,d=l(d,r,n,i,a,e[10],2840853838,12),r,n=o(n,10),i,e[14],2840853838,5),d,r=o(r,10),n,e[1],2840853838,12),d=l(d=o(d,10),r=l(r,n=l(n,i,a,d,r,e[3],2840853838,13),i,a=o(a,10),d,e[8],2840853838,14),n,i=o(i,10),a,e[11],2840853838,11),n=l(n=o(n,10),i=l(i,a=l(a,d,r,n,i,e[6],2840853838,8),d,r=o(r,10),n,e[15],2840853838,5),a,d=o(d,10),r,e[13],2840853838,6),a=o(a,10);var h=this._a,p=this._b,b=this._c,v=this._d,m=this._e;m=l(m,h=l(h,p,b,v,m,e[5],1352829926,8),p,b=o(b,10),v,e[14],1352829926,9),p=l(p=o(p,10),b=l(b,v=l(v,m,h,p,b,e[7],1352829926,9),m,h=o(h,10),p,e[0],1352829926,11),v,m=o(m,10),h,e[9],1352829926,13),v=l(v=o(v,10),m=l(m,h=l(h,p,b,v,m,e[2],1352829926,15),p,b=o(b,10),v,e[11],1352829926,15),h,p=o(p,10),b,e[4],1352829926,5),h=l(h=o(h,10),p=l(p,b=l(b,v,m,h,p,e[13],1352829926,7),v,m=o(m,10),h,e[6],1352829926,7),b,v=o(v,10),m,e[15],1352829926,8),b=l(b=o(b,10),v=l(v,m=l(m,h,p,b,v,e[8],1352829926,11),h,p=o(p,10),b,e[1],1352829926,14),m,h=o(h,10),p,e[10],1352829926,14),m=c(m=o(m,10),h=l(h,p=l(p,b,v,m,h,e[3],1352829926,12),b,v=o(v,10),m,e[12],1352829926,6),p,b=o(b,10),v,e[6],1548603684,9),p=c(p=o(p,10),b=c(b,v=c(v,m,h,p,b,e[11],1548603684,13),m,h=o(h,10),p,e[3],1548603684,15),v,m=o(m,10),h,e[7],1548603684,7),v=c(v=o(v,10),m=c(m,h=c(h,p,b,v,m,e[0],1548603684,12),p,b=o(b,10),v,e[13],1548603684,8),h,p=o(p,10),b,e[5],1548603684,9),h=c(h=o(h,10),p=c(p,b=c(b,v,m,h,p,e[10],1548603684,11),v,m=o(m,10),h,e[14],1548603684,7),b,v=o(v,10),m,e[15],1548603684,7),b=c(b=o(b,10),v=c(v,m=c(m,h,p,b,v,e[8],1548603684,12),h,p=o(p,10),b,e[12],1548603684,7),m,h=o(h,10),p,e[4],1548603684,6),m=c(m=o(m,10),h=c(h,p=c(p,b,v,m,h,e[9],1548603684,15),b,v=o(v,10),m,e[1],1548603684,13),p,b=o(b,10),v,e[2],1548603684,11),p=u(p=o(p,10),b=u(b,v=u(v,m,h,p,b,e[15],1836072691,9),m,h=o(h,10),p,e[5],1836072691,7),v,m=o(m,10),h,e[1],1836072691,15),v=u(v=o(v,10),m=u(m,h=u(h,p,b,v,m,e[3],1836072691,11),p,b=o(b,10),v,e[7],1836072691,8),h,p=o(p,10),b,e[14],1836072691,6),h=u(h=o(h,10),p=u(p,b=u(b,v,m,h,p,e[6],1836072691,6),v,m=o(m,10),h,e[9],1836072691,14),b,v=o(v,10),m,e[11],1836072691,12),b=u(b=o(b,10),v=u(v,m=u(m,h,p,b,v,e[8],1836072691,13),h,p=o(p,10),b,e[12],1836072691,5),m,h=o(h,10),p,e[2],1836072691,14),m=u(m=o(m,10),h=u(h,p=u(p,b,v,m,h,e[10],1836072691,13),b,v=o(v,10),m,e[0],1836072691,13),p,b=o(b,10),v,e[4],1836072691,7),p=f(p=o(p,10),b=f(b,v=u(v,m,h,p,b,e[13],1836072691,5),m,h=o(h,10),p,e[8],2053994217,15),v,m=o(m,10),h,e[6],2053994217,5),v=f(v=o(v,10),m=f(m,h=f(h,p,b,v,m,e[4],2053994217,8),p,b=o(b,10),v,e[1],2053994217,11),h,p=o(p,10),b,e[3],2053994217,14),h=f(h=o(h,10),p=f(p,b=f(b,v,m,h,p,e[11],2053994217,14),v,m=o(m,10),h,e[15],2053994217,6),b,v=o(v,10),m,e[0],2053994217,14),b=f(b=o(b,10),v=f(v,m=f(m,h,p,b,v,e[5],2053994217,6),h,p=o(p,10),b,e[12],2053994217,9),m,h=o(h,10),p,e[2],2053994217,12),m=f(m=o(m,10),h=f(h,p=f(p,b,v,m,h,e[13],2053994217,9),b,v=o(v,10),m,e[9],2053994217,12),p,b=o(b,10),v,e[7],2053994217,5),p=s(p=o(p,10),b=f(b,v=f(v,m,h,p,b,e[10],2053994217,15),m,h=o(h,10),p,e[14],2053994217,8),v,m=o(m,10),h,e[12],0,8),v=s(v=o(v,10),m=s(m,h=s(h,p,b,v,m,e[15],0,5),p,b=o(b,10),v,e[10],0,12),h,p=o(p,10),b,e[4],0,9),h=s(h=o(h,10),p=s(p,b=s(b,v,m,h,p,e[1],0,12),v,m=o(m,10),h,e[5],0,5),b,v=o(v,10),m,e[8],0,14),b=s(b=o(b,10),v=s(v,m=s(m,h,p,b,v,e[7],0,6),h,p=o(p,10),b,e[6],0,8),m,h=o(h,10),p,e[2],0,13),m=s(m=o(m,10),h=s(h,p=s(p,b,v,m,h,e[13],0,6),b,v=o(v,10),m,e[14],0,5),p,b=o(b,10),v,e[0],0,15),p=s(p=o(p,10),b=s(b,v=s(v,m,h,p,b,e[3],0,13),m,h=o(h,10),p,e[9],0,11),v,m=o(m,10),h,e[11],0,11),v=o(v,10);var g=this._b+i+v|0;this._b=this._c+a+m|0,this._c=this._d+d+h|0,this._d=this._e+r+p|0,this._e=this._a+n+b|0,this._a=g},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=a}).call(this,r(5).Buffer)},function(e,t,r){"use strict";(function(t){var r=4,n=new t(r);n.fill(0);e.exports=function(e,i){var a=i(function(e){if(e.length%r!=0){var i=e.length+(r-e.length%r);e=t.concat([e,n],i)}for(var a=new Array(e.length>>>2),o=0,s=0;o>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,i=-1732584194,a=271733878,l=0;l>>32-s,r);var o,s}function o(e,t,r,n,i,o,s){return a(t&r|~t&n,e,t,i,o,s)}function s(e,t,r,n,i,o,s){return a(t&n|r&~n,e,t,i,o,s)}function f(e,t,r,n,i,o,s){return a(t^r^n,e,t,i,o,s)}function u(e,t,r,n,i,o,s){return a(r^(t|~n),e,t,i,o,s)}function c(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}e.exports=function(e){return n(e,i)}},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(163),a=r(161),o=r(149),s=r(144);function f(e){s.call(this,"digest"),this._hash=e,this.buffers=[]}function u(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this.buffers.push(e)},f.prototype._final=function(){var e=t.concat(this.buffers),r=this._hash(e);return this.buffers=null,r},n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new f(i):new u("rmd160"===e||"ripemd160"===e?new a:o(e))}}).call(this,r(5).Buffer)},function(e,t,r){(function(t){var n=r(73);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,r,n){var i=new t(n?34:33);return i.writeUInt8(e,0),r.copy(i,1),n&&(i[33]=1),i}e.exports={decode:function(e,t){return i(n.decode(e),t)},decodeRaw:i,encode:function(e,t,r){return"number"==typeof e?n.encode(a(e,t,r)):n.encode(a(e.version,e.privateKey,e.compressed))},encodeRaw:a}}).call(this,r(5).Buffer)},function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,f=(1<>1,c=-7,l=r?i-1:0,d=r?-1:1,h=e[t+l];for(l+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+l],l+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+l],l+=d,c-=8);if(0===a)a=1-u;else{if(a===f)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,f,u=8*a-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),(t+=o+l>=1?d/f:d*Math.pow(2,1-l))*f>=2&&(o++,f/=2),o+l>=c?(s=0,o=c):o+l>=1?(s=(t*f-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=p,o/=256,u-=8);e[r+h-p]|=128*b}},function(e,t,r){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=u(e),n=r[0],o=r[1],s=new a(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),f=0,c=o>0?n-4:n,l=0;l>16&255,s[f++]=t>>8&255,s[f++]=255&t;2===o&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,s[f++]=255&t);1===o&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,s[f++]=t>>8&255,s[f++]=255&t);return s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(75);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(8),i=r(172),a=r(76),o=r(41),s=r(171),f=r(170);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!s(e.url)&&(e.url=f(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return u(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(u(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(8);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,a=String(e),o="",s=0,f=n;a.charAt(0|s)||(f="=",s%1);o+=f.charAt(63&t>>8-s%1*8)){if((r=a.charCodeAt(s+=.75))>255)throw new i;t=t<<8|r}return o}},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(8),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,o={};return e?(n.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o):o}},function(e,t,r){"use strict";var n=r(8);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))}))}),a=o.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},function(e,t,r){"use strict";var n=r(77);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(41),i=r(8),a=r(174),o=r(173);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[o,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=s},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} +function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=i.create([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]),f=i.create([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]),u=i.create([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]),c=i.create([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]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=o.RIPEMD160=a.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a,o,d,w,_,S,k,x,A,M,E,T=this._hash.words,I=l.words,P=h.words,O=s.words,R=f.words,C=u.words,B=c.words;for(S=a=T[0],k=o=T[1],x=d=T[2],A=w=T[3],M=_=T[4],r=0;r<80;r+=1)E=a+e[t+O[r]]|0,E+=r<16?p(o,d,w)+I[0]:r<32?b(o,d,w)+I[1]:r<48?v(o,d,w)+I[2]:r<64?m(o,d,w)+I[3]:g(o,d,w)+I[4],E=(E=y(E|=0,C[r]))+_|0,a=_,_=w,w=y(d,10),d=o,o=E,E=S+e[t+R[r]]|0,E+=r<16?g(k,x,A)+P[0]:r<32?m(k,x,A)+P[1]:r<48?v(k,x,A)+P[2]:r<64?b(k,x,A)+P[3]:p(k,x,A)+P[4],E=(E=y(E|=0,B[r]))+M|0,S=M,M=A,A=y(x,10),x=k,k=E;E=T[1]+d+A|0,T[1]=T[2]+w+M|0,T[2]=T[3]+_+S|0,T[3]=T[4]+a+k|0,T[4]=T[0]+o+x|0,T[0]=E},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,a=i.words,o=0;o<5;o++){var s=a[o];a[o]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function b(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function m(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function y(e,t){return e<>>32-t}t.RIPEMD160=a._createHelper(d),t.HmacRIPEMD160=a._createHmacHelper(d)}(Math),n.RIPEMD160)},function(e,t,r){"use strict";var n=r(11),i=r(6).utils,a=i.assert,o=i.cachedProperty,s=i.parseBytes;function f(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(f,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),o(f,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),o(f,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),o(f,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),f.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},f.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=f},function(e,t,r){"use strict";var n=r(6).utils,i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),o(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),o(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),o(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),o(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),o(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},function(e,t,r){"use strict";var n=r(34),i=r(6),a=i.utils,o=a.assert,s=a.parseBytes,f=r(120),u=r(119);function c(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=c,c.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),f=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:a})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new function(){this.place=0};if(48!==e[r.place++])return!1;if(s(e,r)+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=s(e,r),o=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var f=s(e,r);if(e.length!==f+r.place)return!1;var u=e.slice(r.place,f+r.place);return 0===o[0]&&128&o[1]&&(o=o.slice(1)),0===u[0]&&128&u[1]&&(u=u.slice(1)),this.r=new n(o),this.s=new n(u),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var a=n.concat(r),o=[48];return u(o,a.length),o=o.concat(a),i.encode(o,e)}},function(e,t,r){"use strict";var n=r(11),i=r(6).utils.assert;function a(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=a,a.fromPublic=function(e,t,r){return t instanceof a?t:new a(e,{pub:t,pubEnc:r})},a.fromPrivate=function(e,t,r){return t instanceof a?t:new a(e,{priv:t,privEnc:r})},a.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},a.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},a.prototype.derive=function(e){return e.mul(this.priv).getX()},a.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},a.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},a.prototype.inspect=function(){return""}},function(e,t,r){"use strict";var n=r(34),i=r(64),a=r(13);function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length0))return s.iaddn(1),this.keyFromPrivate(s)}},u.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},u.prototype.sign=function(e,t,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),c=new i({hash:this.hash,entropy:s,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=a.k?a.k(h):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),v=b.umod(this.n);if(0!==v.cmpn(0)){var m=d.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(v)?2:0);return a.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new f({r:v,s:m,recoveryParam:g})}}}}}},u.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var a=(t=new f(t,"hex")).r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s,u=o.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&s.eqXToP(a):!(s=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(a)},u.prototype.recoverPubKey=function(e,t,r,i){o((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var a=this.n,s=new n(e),u=t.r,c=t.s,l=1&r,h=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");u=h?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var d=t.r.invm(a),p=a.sub(s).mul(d).umod(a),b=c.mul(d).umod(a);return this.g.mulAdd(p,u,b)},u.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),f=i.redMul(o),u=a.redMul(s),c=i.redMul(s),l=o.redMul(a);return this.curve.point(f,u,l,c)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=(u=this.curve._mulA(i)).redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(o.redSub(this.curve.two)),t=o.redMul(u.redSub(a)),r=o.redSqr().redSub(o).redSub(o);else{var s=this.z.redSqr(),f=o.redSub(s).redISub(s);e=n.redSub(i).redISub(a).redMul(f),t=o.redMul(u.redSub(a)),r=o.redMul(f)}}else{var u=i.redAdd(a);s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),f=u.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(u)).redMul(f),t=this.curve._mulC(u).redMul(i.redISub(a)),r=u.redMul(f)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),f=r.redAdd(t),u=a.redMul(o),c=s.redMul(f),l=a.redMul(f),h=o.redMul(s);return this.curve.point(u,c,h,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),f=i.redSub(s),u=i.redAdd(s),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=n.redMul(f).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(a))),r=f.redMul(u)):(t=n.redMul(u).redMul(o.redSub(a)),r=this.curve._mulC(f).redMul(u)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(e,t,r){"use strict";var n=r(24),i=r(11),a=r(1),o=n.base,s=r(6).utils;function f(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(f,o),e.exports=f,f.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},a(u,o.BasePoint),f.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},f.prototype.point=function(e,t){return new u(this,e,t)},f.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),f=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,f)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";var n=r(24),i=r(6),a=r(11),o=r(1),s=n.base,f=i.utils.assert;function u(e){s.call(this,"short",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(t,16),this.y=new a(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(t,16),this.y=new a(r,16),this.z=new a(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new a(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new a(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],f(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new a(e.a,16),b:new a(e.b,16)}}):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:a.mont(e),r=new a(2).toRed(t).redInvm(),n=r.redNeg(),i=new a(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,f,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new a(1),b=new a(0),v=new a(0),m=new a(1),g=0;0!==h.cmpn(0);){var y=d.div(h);u=d.sub(y.mul(h)),c=v.sub(y.mul(p));var w=m.sub(y.mul(b));if(!n&&u.cmp(l)<0)t=f.neg(),r=p,n=u.neg(),i=c;else if(n&&2==++g)break;f=u,d=h,h=u,v=p,p=c,m=b,b=w}o=u.neg(),s=c;var _=n.sqr().add(i.sqr());return o.sqr().add(s.sqr()).cmp(_)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),f=i.mul(r.b),u=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:f.add(u).neg()}},u.prototype.pointFromX=function(e,t){(e=new a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new a(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),f=a.redSub(o);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=n.redMul(u),h=f.redSqr().redIAdd(c).redISub(l).redISub(l),d=f.redMul(l.redISub(h)).redISub(a.redMul(c)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=o.redSqr(),u=f.redMul(o),c=r.redMul(f),l=s.redSqr().redIAdd(u).redISub(c).redISub(c),h=s.redMul(c.redISub(l)).redISub(i.redMul(u)),d=this.z.redMul(o);return this.curve.jpoint(l,h,d)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,r){"use strict";var n=r(11),i=r(6).utils,a=i.getNAF,o=i.getJSF,s=i.assert;function f(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1),i=(1<=f;t--)u=(u<<1)+n[t];o.push(u)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(f=0;f=0;u--){for(t=0;u>=0&&0===o[u];u--)t++;if(u>=0&&t++,f=f.dblp(t),u<0)break;var c=o[u];s(0!==c),f="affine"===e.type?c>0?f.mixedAdd(i[c-1>>1]):f.mixedAdd(i[-c-1>>1].neg()):c>0?f.add(i[c-1>>1]):f.add(i[-c-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,u=this._wnafT3,c=0,l=0;l=1;l-=2){var d=l-1,p=l;if(1===s[d]&&1===s[p]){var b=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(b[1]=t[d].add(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].add(t[p].neg())):(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],m=o(r[d],r[p]);c=Math.max(m[0].length,c),u[d]=new Array(c),u[p]=new Array(c);for(var g=0;g=0;l--){for(var k=0;l>=0;){var x=!0;for(g=0;g=0&&k++,_=_.dblp(k),l<0)break;for(g=0;g0?A=f[g][M-1>>1]:M<0&&(A=f[g][-M-1>>1].neg()),_="affine"===A.type?_.mixedAdd(A):_.add(A))}}for(l=0;l=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,f=1;f0||t.cmpn(-i)>0;){var a,o,s,f=e.andln(3)+n&3,u=t.andln(3)+i&3;3===f&&(f=-1),3===u&&(u=-1),a=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==u?f:-f,r[0].push(a),o=0==(1&u)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?u:-u,r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},function(e){e.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},function(e,t,r){var n=r(4).Buffer;e.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),a=0;a>=8;for(;u>0;)a.push(255&u),u>>=8}for(var c=0;e[c]===i&&c0;)n.push(s%r),s=s/r|0}for(var f="",u=0;0===t[u]&&u=0;--c)f+=e[n[c]];return f},decodeUnsafe:s,decode:function(e){var t=s(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";var n=r(35),i=r(4).Buffer;e.exports=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return n.encode(i.concat([t,r],t.length+4))},decode:function(e){var r=t(n.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=n.decodeUnsafe(e);if(r)return t(r)}}}},function(e,t,r){var n=r(4).Buffer,i=r(72).Transform,a=r(36).StringDecoder;function o(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1)(o,i),o.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},o.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},o.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},o.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=o},function(e,t,r){var n=r(1),i=r(66),a=r(18),o=r(4).Buffer,s=new Array(160);function f(){this.init(),this._w=s,a.call(this,128,112)}n(f,i),f.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=f},function(e,t,r){var n=r(1),i=r(67),a=r(18),o=r(4).Buffer,s=new Array(64);function f(){this.init(),this._w=s,a.call(this,64,56)}n(f,i),f.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},f.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),b=u(n)+l(p,i,a,s)+f+r[d]+o[p]|0;f=s,s=a,a=c(i),i=n,n=b}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((t=n)<<5|t>>>27)+c(d,i,a,s)+f+r[h]+o[d];f=s,s=a,a=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0},f.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=f},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(149),t.sha1=r(148),t.sha224=r(147),t.sha256=r(67),t.sha384=r(146),t.sha512=r(66)},function(e,t,r){"use strict";var n=r(7).Buffer,i=r(1),a=r(73),o=new Array(16),s=[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],f=[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],u=[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],c=[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],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<>>32-t}function b(e,t,r,n,i,a,o,s){return p(e+(t^r^n)+a+o|0,s)+i|0}function v(e,t,r,n,i,a,o,s){return p(e+(t&r|~t&n)+a+o|0,s)+i|0}function m(e,t,r,n,i,a,o,s){return p(e+((t|~r)^n)+a+o|0,s)+i|0}function g(e,t,r,n,i,a,o,s){return p(e+(t&n|r&~n)+a+o|0,s)+i|0}function y(e,t,r,n,i,a,o,s){return p(e+(t^(r|~n))+a+o|0,s)+i|0}i(d,a),d.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,k=0|this._d,x=0|this._e,A=0;A<80;A+=1){var M,E;A<16?(M=b(r,n,i,a,d,e[s[A]],l[0],u[A]),E=y(w,_,S,k,x,e[f[A]],h[0],c[A])):A<32?(M=v(r,n,i,a,d,e[s[A]],l[1],u[A]),E=g(w,_,S,k,x,e[f[A]],h[1],c[A])):A<48?(M=m(r,n,i,a,d,e[s[A]],l[2],u[A]),E=m(w,_,S,k,x,e[f[A]],h[2],c[A])):A<64?(M=g(r,n,i,a,d,e[s[A]],l[3],u[A]),E=v(w,_,S,k,x,e[f[A]],h[3],c[A])):(M=y(r,n,i,a,d,e[s[A]],l[4],u[A]),E=b(w,_,S,k,x,e[f[A]],h[4],c[A])),r=d,d=a,a=p(i,10),i=n,n=M,w=x,x=k,k=p(S,10),S=_,_=E}var T=this._b+i+k|0;this._b=this._c+a+x|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},function(e,t,r){e.exports=r(39).PassThrough},function(e,t,r){e.exports=r(39).Transform},function(e,t,r){e.exports=r(14)},function(e,t,r){e.exports=r(38)},function(e,t,r){"use strict";e.exports=a;var n=r(68),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r(1),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(15))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,a,o,s,f=1,u={},c=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){p(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){a.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,a=n.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=a,i=s,t.copy(r,i),s+=o.data.length,o=o.next;return a},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(73),a=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<>>32-t}function f(e,t,r,n,i,a,o){return s(e+(t&r|~t&n)+i+a|0,o)+t|0}function u(e,t,r,n,i,a,o){return s(e+(t&n|r&~n)+i+a|0,o)+t|0}function c(e,t,r,n,i,a,o){return s(e+(t^r^n)+i+a|0,o)+t|0}function l(e,t,r,n,i,a,o){return s(e+(r^(t|~n))+i+a|0,o)+t|0}n(o,i),o.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;n=l(n=l(n=l(n=l(n=c(n=c(n=c(n=c(n=u(n=u(n=u(n=u(n=f(n=f(n=f(n=f(n,i=f(i,o=f(o,r=f(r,n,i,o,e[0],3614090360,7),n,i,e[1],3905402710,12),r,n,e[2],606105819,17),o,r,e[3],3250441966,22),i=f(i,o=f(o,r=f(r,n,i,o,e[4],4118548399,7),n,i,e[5],1200080426,12),r,n,e[6],2821735955,17),o,r,e[7],4249261313,22),i=f(i,o=f(o,r=f(r,n,i,o,e[8],1770035416,7),n,i,e[9],2336552879,12),r,n,e[10],4294925233,17),o,r,e[11],2304563134,22),i=f(i,o=f(o,r=f(r,n,i,o,e[12],1804603682,7),n,i,e[13],4254626195,12),r,n,e[14],2792965006,17),o,r,e[15],1236535329,22),i=u(i,o=u(o,r=u(r,n,i,o,e[1],4129170786,5),n,i,e[6],3225465664,9),r,n,e[11],643717713,14),o,r,e[0],3921069994,20),i=u(i,o=u(o,r=u(r,n,i,o,e[5],3593408605,5),n,i,e[10],38016083,9),r,n,e[15],3634488961,14),o,r,e[4],3889429448,20),i=u(i,o=u(o,r=u(r,n,i,o,e[9],568446438,5),n,i,e[14],3275163606,9),r,n,e[3],4107603335,14),o,r,e[8],1163531501,20),i=u(i,o=u(o,r=u(r,n,i,o,e[13],2850285829,5),n,i,e[2],4243563512,9),r,n,e[7],1735328473,14),o,r,e[12],2368359562,20),i=c(i,o=c(o,r=c(r,n,i,o,e[5],4294588738,4),n,i,e[8],2272392833,11),r,n,e[11],1839030562,16),o,r,e[14],4259657740,23),i=c(i,o=c(o,r=c(r,n,i,o,e[1],2763975236,4),n,i,e[4],1272893353,11),r,n,e[7],4139469664,16),o,r,e[10],3200236656,23),i=c(i,o=c(o,r=c(r,n,i,o,e[13],681279174,4),n,i,e[0],3936430074,11),r,n,e[3],3572445317,16),o,r,e[6],76029189,23),i=c(i,o=c(o,r=c(r,n,i,o,e[9],3654602809,4),n,i,e[12],3873151461,11),r,n,e[15],530742520,16),o,r,e[2],3299628645,23),i=l(i,o=l(o,r=l(r,n,i,o,e[0],4096336452,6),n,i,e[7],1126891415,10),r,n,e[14],2878612391,15),o,r,e[5],4237533241,21),i=l(i,o=l(o,r=l(r,n,i,o,e[12],1700485571,6),n,i,e[3],2399980690,10),r,n,e[10],4293915773,15),o,r,e[1],2240044497,21),i=l(i,o=l(o,r=l(r,n,i,o,e[8],1873313359,6),n,i,e[15],4264355552,10),r,n,e[6],2734768916,15),o,r,e[13],1309151649,21),i=l(i,o=l(o,r=l(r,n,i,o,e[4],4149444226,6),n,i,e[11],3174756917,10),r,n,e[2],718787259,15),o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},o.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new t(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=o}).call(this,r(7).Buffer)},function(e,t,r){"use strict";var n=r(1),i=r(162),a=r(151),o=r(150),s=r(145);function f(e){s.call(this,"digest"),this._hash=e}n(f,s),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new a:new f(o(e))}},function(e,t,r){(function(t){var n=r(74);function i(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function a(e,r,n){var i=new t(n?34:33);return i.writeUInt8(e,0),r.copy(i,1),n&&(i[33]=1),i}e.exports={decode:function(e,t){return i(n.decode(e),t)},decodeRaw:i,encode:function(e,t,r){return"number"==typeof e?n.encode(a(e,t,r)):n.encode(a(e.version,e.privateKey,e.compressed))},encodeRaw:a}}).call(this,r(7).Buffer)},function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,f=(1<>1,c=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+l],l+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+l],l+=h,c-=8);if(0===a)a=1-u;else{if(a===f)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,f,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,b=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),(t+=o+l>=1?h/f:h*Math.pow(2,1-l))*f>=2&&(o++,f/=2),o+l>=c?(s=0,o=c):o+l>=1?(s=(t*f-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,u-=8);e[r+d-p]|=128*b}},function(e,t,r){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){for(var t,r=u(e),n=r[0],o=r[1],s=new a(function(e,t,r){return 3*(t+r)/4-r}(0,n,o)),f=0,c=o>0?n-4:n,l=0;l>16&255,s[f++]=t>>8&255,s[f++]=255&t;2===o&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,s[f++]=255&t);1===o&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,s[f++]=t>>8&255,s[f++]=255&t);return s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,a,o=[],s=t;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(76);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t,r){return n.forEach(r,function(r){e=r(e,t)}),e}},function(e,t,r){"use strict";var n=r(8),i=r(171),a=r(77),o=r(41),s=r(170),f=r(169);function u(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return u(e),e.baseURL&&!s(e.url)&&(e.url=f(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return u(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(u(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,r){"use strict";var n=r(8);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){n.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,r,a=String(e),o="",s=0,f=n;a.charAt(0|s)||(f="=",s%1);o+=f.charAt(63&t>>8-s%1*8)){if((r=a.charCodeAt(s+=.75))>255)throw new i;t=t<<8|r}return o}},function(e,t,r){"use strict";var n=r(8);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(8),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,a,o={};return e?(n.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),r=n.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o):o}},function(e,t,r){"use strict";var n=r(8);function i(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a;if(r)a=r(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,function(e,t){null!==e&&void 0!==e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))}))}),a=o.join("&")}return a&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e}},function(e,t,r){"use strict";var n=r(78);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(8);e.exports=function(e,t){n.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})}},function(e,t,r){"use strict";var n=r(41),i=r(8),a=r(173),o=r(172);function s(e){this.defaults=e,this.interceptors={request:new a,response:new a}}s.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),(e=i.merge(n,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[o,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)r=r.then(t.shift(),t.shift());return r},i.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,r){return this.request(i.merge(r||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,r,n){return this.request(i.merge(n||{},{method:e,url:t,data:r}))}}),e.exports=s},function(e,t){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ -e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";var n=r(8),i=r(79),a=r(183),o=r(41);function s(e){var t=new a(e),r=i(a.prototype.request,t);return n.extend(r,a.prototype,t),n.extend(r,t),r}var f=s(o);f.Axios=a,f.create=function(e){return s(n.merge(o,e))},f.Cancel=r(75),f.CancelToken=r(169),f.isCancel=r(76),f.all=function(e){return Promise.all(e)},f.spread=r(168),e.exports=f,e.exports.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={neonDB:!0,cmc:!0,nep5:!0,neoscan:!0};t.neoscan=t.nep5=t.cmc=t.neonDB=t.default=void 0;var i=c(r(42));t.neonDB=i;var a=c(r(82));t.cmc=a;var o=c(r(81));t.nep5=o;var s=c(r(44));t.neoscan=s;var f=c(r(80));Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))});var u=r(43);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))});var l={get:{price:a.getPrice,prices:a.getPrices,balance:i.getBalance,claims:i.getClaims,transactionHistory:i.getTransactionHistory,tokenBalance:o.getTokenBalance,tokenInfo:o.getTokenInfo,token:o.getToken},do:{sendAsset:i.doSendAsset,claimAllGas:i.doClaimAllGas,mintTokens:i.doMintTokens},sendAsset:function(e){return f.sendAsset(e)},claimGas:function(e){return f.claimGas(e)},doInvoke:function(e){return f.doInvoke(e)}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logging=t.settings=t.u=t.wallet=t.tx=t.sc=t.CONST=t.rpc=t.api=t.default=void 0;var n=d(r(186));t.api=n;var i=d(r(19));t.rpc=i;var a=d(r(3));t.CONST=a;var o=d(r(29));t.sc=o;var s=d(r(17));t.tx=s;var f=d(r(12));t.wallet=f;var u=d(r(0));t.u=u;var c=d(r(16));t.settings=c;var l=d(r(2));function d(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}t.logging=l;var h=[o.default,s.default,f.default,n.default,i.default,c.default].reduce(function(e,t){return Object.keys(t).map(function(r){e[r]?Object.assign(e[r],t[r]):e[r]=t[r]}),e},{CONST:a,u:u});t.default=h}])}); \ No newline at end of file +e.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){"use strict";var n=r(8),i=r(80),a=r(182),o=r(41);function s(e){var t=new a(e),r=i(a.prototype.request,t);return n.extend(r,a.prototype,t),n.extend(r,t),r}var f=s(o);f.Axios=a,f.create=function(e){return s(n.merge(o,e))},f.Cancel=r(76),f.CancelToken=r(168),f.isCancel=r(77),f.all=function(e){return Promise.all(e)},f.spread=r(167),e.exports=f,e.exports.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={neonDB:!0,cmc:!0,nep5:!0,neoscan:!0};t.neoscan=t.nep5=t.cmc=t.neonDB=t.default=void 0;var i=c(r(42));t.neonDB=i;var a=c(r(83));t.cmc=a;var o=c(r(82));t.nep5=o;var s=c(r(44));t.neoscan=s;var f=c(r(81));Object.keys(f).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))});var u=r(43);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))});var l={get:{price:a.getPrice,prices:a.getPrices,balance:i.getBalance,claims:i.getClaims,transactionHistory:i.getTransactionHistory,tokenBalance:o.getTokenBalance,tokenInfo:o.getTokenInfo,token:o.getToken},do:{sendAsset:i.doSendAsset,claimAllGas:i.doClaimAllGas,mintTokens:i.doMintTokens},sendAsset:function(e){return f.sendAsset(e)},claimGas:function(e){return f.claimGas(e)},doInvoke:function(e){return f.doInvoke(e)}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logging=t.settings=t.u=t.wallet=t.tx=t.sc=t.CONST=t.rpc=t.api=t.default=void 0;var n=h(r(185));t.api=n;var i=h(r(19));t.rpc=i;var a=h(r(3));t.CONST=a;var o=h(r(29));t.sc=o;var s=h(r(17));t.tx=s;var f=h(r(12));t.wallet=f;var u=h(r(0));t.u=u;var c=h(r(16));t.settings=c;var l=h(r(2));function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}t.logging=l;var d=[o.default,s.default,f.default,n.default,i.default,c.default].reduce(function(e,t){return Object.keys(t).map(function(r){e[r]?Object.assign(e[r],t[r]):e[r]=t[r]}),e},{CONST:a,u:u});t.default=d}])}); \ No newline at end of file diff --git a/website/translated_docs/zh-CN/changelog-latest.md b/website/translated_docs/zh-CN/changelog-latest.md index ddb652fa7..3ce3ad442 100644 --- a/website/translated_docs/zh-CN/changelog-latest.md +++ b/website/translated_docs/zh-CN/changelog-latest.md @@ -3,7 +3,7 @@ id: changelog-latest title: Changelog (v3) --- -3.7.1 +3.7.3 ===== - Fixes @@ -11,6 +11,8 @@ title: Changelog (v3) - Fix scriptBuilder to ScriptParams error parsing nonce - Use generateRandomArray in attachAttributes - Fix timeout setting for api calls + - Correct semantic API for verify + - Typings update 3.7.0 =====

>>0){ke()}else{a[E+12>>2]=n;a[M>>2]=n;a[v+8>>2]=E;a[v+12>>2]=j;a[v+24>>2]=0;break}}}while(0);v=(a[216]|0)-1|0;a[216]=v;if((v|0)==0){H=1288}else{return}while(1){v=a[H>>2]|0;if((v|0)==0){break}else{H=v+8|0}}a[216]=-1;return}function Vt(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((e|0)==0){r=0}else{n=oe(t,e)|0;if((t|e)>>>0<=65535){r=n;break}r=((n>>>0)/(e>>>0)|0|0)==(t|0)?n:-1}}while(0);t=Yt(r)|0;if((t|0)==0){return t|0}if((a[t-4>>2]&3|0)==0){return t|0}en(t|0,0,r|0);return t|0}function Wt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0;if((e|0)==0){r=Yt(t)|0;return r|0}if(t>>>0>4294967231){a[(Je()|0)>>2]=12;r=0;return r|0}if(t>>>0<11){n=16}else{n=t+11&-8}i=Jt(e-8|0,n)|0;if((i|0)!=0){r=i+8|0;return r|0}i=Yt(t)|0;if((i|0)==0){r=0;return r|0}n=a[e-4>>2]|0;o=(n&-8)-((n&3|0)==0?8:4)|0;n=o>>>0>>0?o:t;$r(i|0,e|0,n)|0;Kt(e);r=i;return r|0}function Xt(e,t){e=e|0;t=t|0;var r=0;if((e|0)==0){return 0}if(t>>>0>4294967231){a[(Je()|0)>>2]=12;return 0}if(t>>>0<11){r=16}else{r=t+11&-8}t=e-8|0;return((Jt(t,r)|0)==(t|0)?e:0)|0}function Zt(e,t){e=e|0;t=t|0;var r=0;if(e>>>0<9){r=Yt(t)|0;return r|0}else{r=Gt(e,t)|0;return r|0}return 0}function Gt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0;r=e>>>0<16?16:e;if((r-1&r|0)==0){n=r}else{e=16;while(1){if(e>>>0>>0){e=e<<1}else{n=e;break}}}if((-64-n|0)>>>0<=t>>>0){a[(Je()|0)>>2]=12;i=0;return i|0}if(t>>>0<11){o=16}else{o=t+11&-8}t=Yt(n+12+o|0)|0;if((t|0)==0){i=0;return i|0}e=t-8|0;r=e;s=n-1|0;do{if((t&s|0)==0){f=r}else{u=t+s&-n;c=u-8|0;l=e;if((c-l|0)>>>0>15){d=c}else{d=u+(n-8)|0}u=d;c=d-l|0;l=t-4|0;h=a[l>>2]|0;p=(h&-8)-c|0;if((h&3|0)==0){a[d>>2]=(a[e>>2]|0)+c;a[d+4>>2]=p;f=u;break}else{h=d+4|0;a[h>>2]=p|a[h>>2]&1|2;h=d+(p+4)|0;a[h>>2]=a[h>>2]|1;a[l>>2]=c|a[l>>2]&1|2;l=t+(c-4)|0;a[l>>2]=a[l>>2]|1;vr(r,c);f=u;break}}}while(0);r=f+4|0;t=a[r>>2]|0;do{if((t&3|0)!=0){d=t&-8;if(d>>>0<=(o+16|0)>>>0){break}e=d-o|0;n=f;a[r>>2]=o|t&1|2;a[n+(o|4)>>2]=e|3;s=n+(d|4)|0;a[s>>2]=a[s>>2]|1;vr(n+o|0,e)}}while(0);i=f+8|0;return i|0}function Qt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if(e>>>0>=4294967232){r=0;return r|0}t=a[214]|0;if((t|0)==0){r=0;return r|0}n=a[211]|0;do{if(n>>>0>(e+40|0)>>>0){i=a[202]|0;o=oe((((-40-e-1+n+i|0)>>>0)/(i>>>0)|0)-1|0,i)|0;s=t;f=1280;while(1){u=a[f>>2]|0;if(u>>>0<=s>>>0){if((u+(a[f+4>>2]|0)|0)>>>0>s>>>0){c=f;break}}u=a[f+8>>2]|0;if((u|0)==0){c=0;break}else{f=u}}if((a[c+12>>2]&8|0)!=0){break}f=Ge(0)|0;s=c+4|0;if((f|0)!=((a[c>>2]|0)+(a[s>>2]|0)|0)){break}u=Ge(-(o>>>0>2147483646?-2147483648-i|0:o)|0)|0;l=Ge(0)|0;if(!((u|0)!=-1&l>>>0>>0)){break}u=f-l|0;if((f|0)==(l|0)){break}a[s>>2]=(a[s>>2]|0)-u;a[316]=(a[316]|0)-u;s=a[214]|0;d=(a[211]|0)-u|0;u=s;h=s+8|0;if((h&7|0)==0){p=0}else{p=-h&7}h=d-p|0;a[214]=u+p;a[211]=h;a[u+(p+4)>>2]=h|1;a[u+(d+4)>>2]=40;a[215]=a[204];r=(f|0)!=(l|0)|0;return r|0}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){r=0;return r|0}a[215]=-1;r=0;return r|0}function Jt(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0;r=e+4|0;n=a[r>>2]|0;i=n&-8;o=e;s=o+i|0;f=s;u=a[212]|0;if(o>>>0>>0){ke();return 0}c=n&3;if(!((c|0)!=1&o>>>0>>0)){ke();return 0}l=o+(i|4)|0;d=a[l>>2]|0;if((d&1|0)==0){ke();return 0}if((c|0)==0){if(t>>>0<256){h=0;return h|0}do{if(i>>>0>=(t+4|0)>>>0){if((i-t|0)>>>0>a[202]<<1>>>0){break}else{h=e}return h|0}}while(0);h=0;return h|0}if(i>>>0>=t>>>0){c=i-t|0;if(c>>>0<=15){h=e;return h|0}a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|3;a[l>>2]=a[l>>2]|1;vr(o+t|0,c);h=e;return h|0}if((f|0)==(a[214]|0)){c=(a[211]|0)+i|0;if(c>>>0<=t>>>0){h=0;return h|0}l=c-t|0;a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=l|1;a[214]=o+t;a[211]=l;h=e;return h|0}if((f|0)==(a[213]|0)){l=(a[210]|0)+i|0;if(l>>>0>>0){h=0;return h|0}c=l-t|0;if(c>>>0>15){a[r>>2]=n&1|t|2;a[o+(t+4)>>2]=c|1;a[o+l>>2]=c;p=o+(l+4)|0;a[p>>2]=a[p>>2]&-2;b=o+t|0;v=c}else{a[r>>2]=n&1|l|2;n=o+(l+4)|0;a[n>>2]=a[n>>2]|1;b=0;v=0}a[210]=v;a[213]=b;h=e;return h|0}if((d&2|0)!=0){h=0;return h|0}b=(d&-8)+i|0;if(b>>>0>>0){h=0;return h|0}v=b-t|0;n=d>>>3;e:do{if(d>>>0<256){l=a[o+(i+8)>>2]|0;c=a[o+(i+12)>>2]|0;p=872+(n<<1<<2)|0;do{if((l|0)!=(p|0)){if(l>>>0>>0){ke();return 0}if((a[l+12>>2]|0)==(f|0)){break}ke();return 0}}while(0);if((c|0)==(l|0)){a[208]=a[208]&~(1<>>0>>0){ke();return 0}g=c+8|0;if((a[g>>2]|0)==(f|0)){m=g;break}ke();return 0}}while(0);a[l+12>>2]=c;a[m>>2]=l}else{p=s;g=a[o+(i+24)>>2]|0;y=a[o+(i+12)>>2]|0;do{if((y|0)==(p|0)){w=o+(i+20)|0;_=a[w>>2]|0;if((_|0)==0){S=o+(i+16)|0;k=a[S>>2]|0;if((k|0)==0){x=0;break}else{A=k;M=S}}else{A=_;M=w}while(1){w=A+20|0;_=a[w>>2]|0;if((_|0)!=0){A=_;M=w;continue}w=A+16|0;_=a[w>>2]|0;if((_|0)==0){break}else{A=_;M=w}}if(M>>>0>>0){ke();return 0}else{a[M>>2]=0;x=A;break}}else{w=a[o+(i+8)>>2]|0;if(w>>>0>>0){ke();return 0}_=w+12|0;if((a[_>>2]|0)!=(p|0)){ke();return 0}S=y+8|0;if((a[S>>2]|0)==(p|0)){a[_>>2]=y;a[S>>2]=w;x=y;break}else{ke();return 0}}}while(0);if((g|0)==0){break}y=o+(i+28)|0;l=1136+(a[y>>2]<<2)|0;do{if((p|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(g>>>0<(a[212]|0)>>>0){ke();return 0}c=g+16|0;if((a[c>>2]|0)==(p|0)){a[c>>2]=x}else{a[g+20>>2]=x}if((x|0)==0){break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke();return 0}a[x+24>>2]=g;p=a[o+(i+16)>>2]|0;do{if((p|0)!=0){if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+16>>2]=p;a[p+24>>2]=x;break}}}while(0);p=a[o+(i+20)>>2]|0;if((p|0)==0){break}if(p>>>0<(a[212]|0)>>>0){ke();return 0}else{a[x+20>>2]=p;a[p+24>>2]=x;break}}}while(0);if(v>>>0<16){a[r>>2]=b|a[r>>2]&1|2;x=o+(b|4)|0;a[x>>2]=a[x>>2]|1;h=e;return h|0}else{a[r>>2]=a[r>>2]&1|t|2;a[o+(t+4)>>2]=v|3;r=o+(b|4)|0;a[r>>2]=a[r>>2]|1;vr(o+t|0,v);h=e;return h|0}return 0}function $t(){return a[316]|0}function er(){return a[317]|0}function tr(){var e=0;e=a[318]|0;return((e|0)==0?-1:e)|0}function rr(e){e=e|0;var t=0,r=0;if((e|0)==-1){t=0}else{r=a[202]|0;t=e-1+r&-r}a[318]=t;return t|0}function nr(e){e=e|0;var t=0,r=0,n=0;do{if((e|0)==0){t=0}else{r=a[e-4>>2]|0;n=r&3;if((n|0)==1){t=0;break}t=(r&-8)-((n|0)==0?8:4)|0}}while(0);return t|0}function ir(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0;do{if((t|0)==8){n=Yt(r)|0}else{i=t>>>2;if((t&3|0)!=0|(i|0)==0){o=22;return o|0}if((i+1073741823&i|0)!=0){o=22;return o|0}if((-64-t|0)>>>0>>0){o=12;return o|0}else{n=Gt(t>>>0<16?16:t,r)|0;break}}}while(0);if((n|0)==0){o=12;return o|0}a[e>>2]=n;o=0;return o|0}function ar(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+8|0;i=n|0;a[i>>2]=t;t=ur(e,i,3,r)|0;l=n;return t|0}function or(e,t,r){e=e|0;t=t|0;r=r|0;return ur(e,t,0,r)|0}function sr(e){e=e|0;var t=0,r=0,n=0;if((a[200]|0)!=0){t=a[201]|0;r=Zt(t,e)|0;return r|0}n=we(8)|0;if((n-1&n|0)!=0){ke();return 0}a[202]=n;a[201]=n;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=a[201]|0;r=Zt(t,e)|0;return r|0}function fr(e){e=e|0;var t=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);t=a[201]|0;return Zt(t,e-1+t&-t)|0}function ur(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;do{if((a[200]|0)==0){i=we(8)|0;if((i-1&i|0)==0){a[202]=i;a[201]=i;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);i=(e|0)==0;do{if((n|0)==0){if(i){o=Yt(0)|0;return o|0}else{s=e<<2;if(s>>>0<11){f=0;u=16;break}f=0;u=s+11&-8;break}}else{if(i){o=n}else{f=n;u=0;break}return o|0}}while(0);do{if((r&1|0)==0){if(i){c=0;l=0;break}else{d=0;h=0}while(1){n=a[t+(h<<2)>>2]|0;if(n>>>0<11){p=16}else{p=n+11&-8}n=p+d|0;s=h+1|0;if((s|0)==(e|0)){c=0;l=n;break}else{d=n;h=s}}}else{s=a[t>>2]|0;if(s>>>0<11){b=16}else{b=s+11&-8}c=b;l=oe(b,e)|0}}while(0);b=Yt(u-4+l|0)|0;if((b|0)==0){o=0;return o|0}h=b-8|0;d=a[b-4>>2]&-8;if((r&2|0)!=0){en(b|0,0,-4-u+d|0)}if((f|0)==0){a[b+(l-4)>>2]=d-l|3;v=b+l|0;m=l}else{v=f;m=d}a[v>>2]=b;b=e-1|0;e:do{if((b|0)==0){g=h;y=m}else{if((c|0)==0){w=h;_=m;S=0}else{e=h;d=m;f=0;while(1){l=d-c|0;a[e+4>>2]=c|3;u=e+c|0;r=f+1|0;a[v+(r<<2)>>2]=e+(c+8);if((r|0)==(b|0)){g=u;y=l;break e}else{e=u;d=l;f=r}}}while(1){f=a[t+(S<<2)>>2]|0;if(f>>>0<11){k=16}else{k=f+11&-8}f=_-k|0;a[w+4>>2]=k|3;d=w+k|0;e=S+1|0;a[v+(e<<2)>>2]=w+(k+8);if((e|0)==(b|0)){g=d;y=f;break}else{w=d;_=f;S=e}}}}while(0);a[g+4>>2]=y|3;o=v;return o|0}function cr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0;r=e+(t<<2)|0;e:do{if((t|0)!=0){n=e;t:while(1){i=a[n>>2]|0;r:do{if((i|0)==0){o=n+4|0}else{s=i-8|0;f=s;u=i-4|0;c=a[u>>2]&-8;a[n>>2]=0;if(s>>>0<(a[212]|0)>>>0){l=935;break t}s=a[u>>2]|0;if((s&3|0)==1){l=936;break t}d=n+4|0;h=s-8&-8;do{if((d|0)!=(r|0)){if((a[d>>2]|0)!=(i+(h+8)|0)){break}p=(a[i+(h|4)>>2]&-8)+c|0;a[u>>2]=s&1|p|2;b=i+(p-4)|0;a[b>>2]=a[b>>2]|1;a[d>>2]=i;o=d;break r}}while(0);vr(f,c);o=d}}while(0);if((o|0)==(r|0)){break e}else{n=o}}if((l|0)==935){ke();return 0}else if((l|0)==936){ke();return 0}}}while(0);if((a[211]|0)>>>0<=(a[215]|0)>>>0){return 0}Qt(0)|0;return 0}function lr(e){e=e|0;var t=0,r=0;if((a[200]|0)!=0){t=Qt(e)|0;return t|0}r=we(8)|0;if((r-1&r|0)!=0){ke();return 0}a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;t=Qt(e)|0;return t|0}function dr(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0;o=0;s=0;f=0;u=0}else{c=a[211]|0;l=c+40|0;d=1;h=l;p=l;l=1280;while(1){b=a[l>>2]|0;v=b+8|0;if((v&7|0)==0){m=0}else{m=-v&7}v=b+(a[l+4>>2]|0)|0;g=d;y=h;w=p;_=b+m|0;while(1){if(_>>>0>=v>>>0|(_|0)==(t|0)){S=g;k=y;x=w;break}A=a[_+4>>2]|0;if((A|0)==7){S=g;k=y;x=w;break}M=A&-8;E=M+w|0;if((A&3|0)==1){T=M+y|0;I=g+1|0}else{T=y;I=g}A=_+M|0;if(A>>>0>>0){S=I;k=T;x=E;break}else{g=I;y=T;w=E;_=A}}_=a[l+8>>2]|0;if((_|0)==0){break}else{d=S;h=k;p=x;l=_}}l=a[316]|0;r=c;n=x;i=S;o=l-x|0;s=a[317]|0;f=l-k|0;u=k}a[e>>2]=n;a[e+4>>2]=i;i=e+8|0;a[i>>2]=0;a[i+4>>2]=0;a[e+16>>2]=o;a[e+20>>2]=s;a[e+24>>2]=0;a[e+28>>2]=f;a[e+32>>2]=u;a[e+36>>2]=r;return}function hr(){var e=0,t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,g=0,y=0,w=0;e=l;do{if((a[200]|0)==0){t=we(8)|0;if((t-1&t|0)==0){a[202]=t;a[201]=t;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke()}}}while(0);t=a[214]|0;if((t|0)==0){r=0;n=0;i=0}else{o=a[317]|0;s=a[316]|0;f=s-40-(a[211]|0)|0;u=1280;while(1){c=a[u>>2]|0;d=c+8|0;if((d&7|0)==0){h=0}else{h=-d&7}d=c+(a[u+4>>2]|0)|0;p=f;b=c+h|0;while(1){if(b>>>0>=d>>>0|(b|0)==(t|0)){v=p;break}g=a[b+4>>2]|0;if((g|0)==7){v=p;break}y=g&-8;w=p-((g&3|0)==1?y:0)|0;g=b+y|0;if(g>>>0>>0){v=w;break}else{p=w;b=g}}b=a[u+8>>2]|0;if((b|0)==0){r=v;n=s;i=o;break}else{f=v;u=b}}}xe(a[m>>2]|0,520,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;xe(a[m>>2]|0,488,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;xe(a[m>>2]|0,400,(E=l,l=l+8|0,a[E>>2]=r,E)|0)|0;l=e;return}function pr(e,t){e=e|0;t=t|0;var r=0,n=0;do{if((a[200]|0)==0){r=we(8)|0;if((r-1&r|0)==0){a[202]=r;a[201]=r;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);if((e|0)==(-1|0)){a[204]=t;n=1;return n|0}else if((e|0)==(-2|0)){if((a[201]|0)>>>0>t>>>0){n=0;return n|0}if((t-1&t|0)!=0){n=0;return n|0}a[202]=t;n=1;return n|0}else if((e|0)==(-3|0)){a[203]=t;n=1;return n|0}else{n=0;return n|0}return 0}function br(){return(B=a[328]|0,a[328]=B+0,B)|0}function vr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0;r=e;n=r+t|0;i=n;o=a[e+4>>2]|0;e:do{if((o&1|0)==0){s=a[e>>2]|0;if((o&3|0)==0){return}f=r+(-s|0)|0;u=f;c=s+t|0;l=a[212]|0;if(f>>>0>>0){ke()}if((u|0)==(a[213]|0)){d=r+(t+4)|0;if((a[d>>2]&3|0)!=3){h=u;p=c;break}a[210]=c;a[d>>2]=a[d>>2]&-2;a[r+(4-s)>>2]=c|1;a[n>>2]=c;return}d=s>>>3;if(s>>>0<256){b=a[r+(8-s)>>2]|0;v=a[r+(12-s)>>2]|0;m=872+(d<<1<<2)|0;do{if((b|0)!=(m|0)){if(b>>>0>>0){ke()}if((a[b+12>>2]|0)==(u|0)){break}ke()}}while(0);if((v|0)==(b|0)){a[208]=a[208]&~(1<>>0>>0){ke()}y=v+8|0;if((a[y>>2]|0)==(u|0)){g=y;break}ke()}}while(0);a[b+12>>2]=v;a[g>>2]=b;h=u;p=c;break}m=f;d=a[r+(24-s)>>2]|0;y=a[r+(12-s)>>2]|0;do{if((y|0)==(m|0)){w=16-s|0;_=r+(w+4)|0;S=a[_>>2]|0;if((S|0)==0){k=r+w|0;w=a[k>>2]|0;if((w|0)==0){x=0;break}else{A=w;M=k}}else{A=S;M=_}while(1){_=A+20|0;S=a[_>>2]|0;if((S|0)!=0){A=S;M=_;continue}_=A+16|0;S=a[_>>2]|0;if((S|0)==0){break}else{A=S;M=_}}if(M>>>0>>0){ke()}else{a[M>>2]=0;x=A;break}}else{_=a[r+(8-s)>>2]|0;if(_>>>0>>0){ke()}S=_+12|0;if((a[S>>2]|0)!=(m|0)){ke()}k=y+8|0;if((a[k>>2]|0)==(m|0)){a[S>>2]=y;a[k>>2]=_;x=y;break}else{ke()}}}while(0);if((d|0)==0){h=u;p=c;break}y=r+(28-s)|0;l=1136+(a[y>>2]<<2)|0;do{if((m|0)==(a[l>>2]|0)){a[l>>2]=x;if((x|0)!=0){break}a[209]=a[209]&~(1<>2]);h=u;p=c;break e}else{if(d>>>0<(a[212]|0)>>>0){ke()}f=d+16|0;if((a[f>>2]|0)==(m|0)){a[f>>2]=x}else{a[d+20>>2]=x}if((x|0)==0){h=u;p=c;break e}}}while(0);if(x>>>0<(a[212]|0)>>>0){ke()}a[x+24>>2]=d;m=16-s|0;y=a[r+m>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+16>>2]=y;a[y+24>>2]=x;break}}}while(0);y=a[r+(m+4)>>2]|0;if((y|0)==0){h=u;p=c;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[x+20>>2]=y;a[y+24>>2]=x;h=u;p=c;break}}else{h=e;p=t}}while(0);e=a[212]|0;if(n>>>0>>0){ke()}x=r+(t+4)|0;A=a[x>>2]|0;do{if((A&2|0)==0){if((i|0)==(a[214]|0)){M=(a[211]|0)+p|0;a[211]=M;a[214]=h;a[h+4>>2]=M|1;if((h|0)!=(a[213]|0)){return}a[213]=0;a[210]=0;return}if((i|0)==(a[213]|0)){M=(a[210]|0)+p|0;a[210]=M;a[213]=h;a[h+4>>2]=M|1;a[h+M>>2]=M;return}M=(A&-8)+p|0;g=A>>>3;e:do{if(A>>>0<256){o=a[r+(t+8)>>2]|0;y=a[r+(t+12)>>2]|0;s=872+(g<<1<<2)|0;do{if((o|0)!=(s|0)){if(o>>>0>>0){ke()}if((a[o+12>>2]|0)==(i|0)){break}ke()}}while(0);if((y|0)==(o|0)){a[208]=a[208]&~(1<>>0>>0){ke()}d=y+8|0;if((a[d>>2]|0)==(i|0)){E=d;break}ke()}}while(0);a[o+12>>2]=y;a[E>>2]=o}else{s=n;d=a[r+(t+24)>>2]|0;l=a[r+(t+12)>>2]|0;do{if((l|0)==(s|0)){f=r+(t+20)|0;b=a[f>>2]|0;if((b|0)==0){v=r+(t+16)|0;_=a[v>>2]|0;if((_|0)==0){T=0;break}else{I=_;P=v}}else{I=b;P=f}while(1){f=I+20|0;b=a[f>>2]|0;if((b|0)!=0){I=b;P=f;continue}f=I+16|0;b=a[f>>2]|0;if((b|0)==0){break}else{I=b;P=f}}if(P>>>0>>0){ke()}else{a[P>>2]=0;T=I;break}}else{f=a[r+(t+8)>>2]|0;if(f>>>0>>0){ke()}b=f+12|0;if((a[b>>2]|0)!=(s|0)){ke()}v=l+8|0;if((a[v>>2]|0)==(s|0)){a[b>>2]=l;a[v>>2]=f;T=l;break}else{ke()}}}while(0);if((d|0)==0){break}l=r+(t+28)|0;o=1136+(a[l>>2]<<2)|0;do{if((s|0)==(a[o>>2]|0)){a[o>>2]=T;if((T|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(d>>>0<(a[212]|0)>>>0){ke()}y=d+16|0;if((a[y>>2]|0)==(s|0)){a[y>>2]=T}else{a[d+20>>2]=T}if((T|0)==0){break e}}}while(0);if(T>>>0<(a[212]|0)>>>0){ke()}a[T+24>>2]=d;s=a[r+(t+16)>>2]|0;do{if((s|0)!=0){if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+16>>2]=s;a[s+24>>2]=T;break}}}while(0);s=a[r+(t+20)>>2]|0;if((s|0)==0){break}if(s>>>0<(a[212]|0)>>>0){ke()}else{a[T+20>>2]=s;a[s+24>>2]=T;break}}}while(0);a[h+4>>2]=M|1;a[h+M>>2]=M;if((h|0)!=(a[213]|0)){O=M;break}a[210]=M;return}else{a[x>>2]=A&-2;a[h+4>>2]=p|1;a[h+p>>2]=p;O=p}}while(0);p=O>>>3;if(O>>>0<256){A=p<<1;x=872+(A<<2)|0;T=a[208]|0;t=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){R=r;C=p;break}ke()}}while(0);a[C>>2]=h;a[R+12>>2]=h;a[h+8>>2]=R;a[h+12>>2]=x;return}x=h;R=O>>>8;do{if((R|0)==0){B=0}else{if(O>>>0>16777215){B=31;break}C=(R+1048320|0)>>>16&8;A=R<>>16&4;T=A<>>16&2;p=14-(t|C|A)+(T<>>15)|0;B=O>>>((p+7|0)>>>0)&1|p<<1}}while(0);R=1136+(B<<2)|0;a[h+28>>2]=B;a[h+20>>2]=0;a[h+16>>2]=0;p=a[209]|0;A=1<>2]=x;a[h+24>>2]=R;a[h+12>>2]=h;a[h+8>>2]=h;return}if((B|0)==31){j=0}else{j=25-(B>>>1)|0}B=O<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(O|0)){break}N=j+16+(B>>>31<<2)|0;R=a[N>>2]|0;if((R|0)==0){L=1120;break}else{B=B<<1;j=R}}if((L|0)==1120){if(N>>>0<(a[212]|0)>>>0){ke()}a[N>>2]=x;a[h+24>>2]=j;a[h+12>>2]=h;a[h+8>>2]=h;return}N=j+8|0;L=a[N>>2]|0;B=a[212]|0;if(j>>>0>>0){ke()}if(L>>>0>>0){ke()}a[L+12>>2]=x;a[N>>2]=x;a[h+8>>2]=L;a[h+12>>2]=j;a[h+24>>2]=0;return}function mr(e){e=e|0;var t=0,r=0,n=0;t=(e|0)==0?1:e;while(1){r=Yt(t)|0;if((r|0)!=0){n=1164;break}e=(B=a[328]|0,a[328]=B+0,B);if((e|0)==0){break}Cn[e&1]()}if((n|0)==1164){return r|0}r=Fe(4)|0;a[r>>2]=560;_e(r|0,688,6);return 0}function gr(e,t){e=e|0;t=t|0;return mr(e)|0}function yr(e){e=e|0;return}function wr(e){e=e|0;return 360|0}function _r(e){e=e|0;return 448|0}function Sr(e){e=e|0;return(B=a[328]|0,a[328]=e,B)|0}function kr(e){e=e|0;a[e>>2]=560;return}function xr(e){e=e|0;a[e>>2]=592;return}function Ar(e){e=e|0;if((e|0)!=0){Kt(e)}return}function Mr(e,t){e=e|0;t=t|0;Ar(e);return}function Er(e){e=e|0;Ar(e);return}function Tr(e,t){e=e|0;t=t|0;Er(e);return}function Ir(e){e=e|0;Ar(e);return}function Pr(e){e=e|0;Ar(e);return}function Or(e,t,r){e=e|0;t=t|0;r=r|0;return Rr(e,t,r,0,0,0)|0}function Rr(e,t,r,i,o,s){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;s=s|0;var f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,D=0,U=0,q=0,Y=0,K=0,V=0,W=0,X=0,Z=0,G=0,Q=0,J=0,$=0,ee=0,te=0,re=0,ne=0;f=l;if((r|0)==0){u=-1;l=f;return u|0}c=a[44]|0;if((c|0)==0){a[196]=1;a[44]=1;d=1;h=1;p=1190}else{b=a[196]|0;v=a[74]|0;if((v|0)==-1|(b|0)!=0){d=b;h=c;p=1190}else{m=v;g=b;y=c}}if((p|0)==1190){c=(Ye(344)|0)!=0|0;a[74]=c;m=c;g=d;y=h}h=n[r]|0;if(h<<24>>24==45){w=s|2;p=1194}else{d=(m|0)!=0|h<<24>>24==43?s&-2:s;if(h<<24>>24==43){w=d;p=1194}else{_=r;S=d}}if((p|0)==1194){_=r+1|0;S=w}a[198]=0;if((g|0)==0){k=y;p=1198}else{a[50]=-1;a[48]=-1;x=y;A=g;p=1197}while(1){if((p|0)==1197){p=0;if((A|0)==0){k=x;p=1198;continue}else{M=x}}else if((p|0)==1198){p=0;g=a[40]|0;if((n[g]|0)==0){M=k}else{T=g;I=k;break}}a[196]=0;if((M|0)>=(e|0)){p=1200;break}P=t+(M<<2)|0;O=a[P>>2]|0;a[40]=O;if((n[O]|0)==45){R=O+1|0;C=n[R]|0;if(C<<24>>24!=0){p=1232;break}if((Pe(_|0,45)|0)!=0){p=1232;break}}a[40]=824;if((S&2|0)!=0){p=1217;break}if((S&1|0)==0){u=-1;p=1298;break}g=a[48]|0;do{if((g|0)==-1){a[48]=M;B=M;j=0}else{y=a[50]|0;if((y|0)==-1){B=M;j=0;break}w=y-g|0;r=M-y|0;d=(w|0)%(r|0)|0;if((d|0)==0){N=r}else{h=r;s=d;while(1){d=(h|0)%(s|0)|0;if((d|0)==0){N=s;break}else{h=s;s=d}}}s=(M-g|0)/(N|0)|0;do{if((N|0)>0){h=-w|0;if((s|0)>0){L=0}else{F=M;z=y;H=g;D=0;break}do{d=L+y|0;m=t+(d<<2)|0;c=0;b=d;d=a[m>>2]|0;while(1){v=((b|0)<(y|0)?r:h)+b|0;U=t+(v<<2)|0;q=a[U>>2]|0;a[U>>2]=d;a[m>>2]=q;U=c+1|0;if((U|0)<(s|0)){c=U;b=v;d=q}else{break}}L=L+1|0}while((L|0)<(N|0));F=a[44]|0;z=a[50]|0;H=a[48]|0;D=a[196]|0}else{F=M;z=y;H=g;D=0}}while(0);a[48]=F-z+H;a[50]=-1;B=F;j=D}}while(0);g=B+1|0;a[44]=g;x=g;A=j;p=1197}do{if((p|0)==1298){l=f;return u|0}else if((p|0)==1232){j=a[48]|0;A=a[50]|0;if((j|0)!=-1&(A|0)==-1){a[50]=M;Y=n[R]|0;K=M}else{Y=C;K=A}if(Y<<24>>24==0){T=O;I=M;break}a[40]=R;if((n[R]|0)!=45){T=R;I=M;break}if((n[O+2|0]|0)!=0){T=R;I=M;break}A=M+1|0;a[44]=A;a[40]=824;if((K|0)!=-1){x=K-j|0;B=A-K|0;D=(x|0)%(B|0)|0;if((D|0)==0){V=B}else{F=B;H=D;while(1){D=(F|0)%(H|0)|0;if((D|0)==0){V=H;break}else{F=H;H=D}}}H=(A-j|0)/(V|0)|0;do{if((V|0)>0){F=-x|0;if((H|0)>0){W=0}else{X=K;Z=j;G=A;break}do{D=W+K|0;z=t+(D<<2)|0;N=0;L=D;D=a[z>>2]|0;while(1){k=((L|0)<(K|0)?B:F)+L|0;g=t+(k<<2)|0;y=a[g>>2]|0;a[g>>2]=D;a[z>>2]=y;g=N+1|0;if((g|0)<(H|0)){N=g;L=k;D=y}else{break}}W=W+1|0}while((W|0)<(V|0));X=a[50]|0;Z=a[48]|0;G=a[44]|0}else{X=K;Z=j;G=A}}while(0);a[44]=Z-X+G}a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1200){a[40]=824;A=a[50]|0;j=a[48]|0;do{if((A|0)==-1){if((j|0)==-1){break}a[44]=j}else{H=A-j|0;B=M-A|0;x=(H|0)%(B|0)|0;if((x|0)==0){Q=B}else{F=B;D=x;while(1){x=(F|0)%(D|0)|0;if((x|0)==0){Q=D;break}else{F=D;D=x}}}D=(M-j|0)/(Q|0)|0;do{if((Q|0)>0){F=-H|0;if((D|0)>0){J=0}else{$=A;ee=j;te=M;break}do{x=J+A|0;L=t+(x<<2)|0;N=0;z=x;x=a[L>>2]|0;while(1){y=((z|0)<(A|0)?B:F)+z|0;k=t+(y<<2)|0;g=a[k>>2]|0;a[k>>2]=x;a[L>>2]=g;k=N+1|0;if((k|0)<(D|0)){N=k;z=y;x=g}else{break}}J=J+1|0}while((J|0)<(Q|0));$=a[50]|0;ee=a[48]|0;te=a[44]|0}else{$=A;ee=j;te=M}}while(0);a[44]=ee-$+te}}while(0);a[50]=-1;a[48]=-1;u=-1;l=f;return u|0}else if((p|0)==1217){a[44]=M+1;a[198]=a[P>>2];u=1;l=f;return u|0}}while(0);P=(i|0)!=0;e:do{if(P){if((T|0)==(a[t+(I<<2)>>2]|0)){re=T;break}M=n[T]|0;do{if(M<<24>>24==45){a[40]=T+1;ne=0}else{if((S&4|0)==0){re=T;break e}if(M<<24>>24==58){ne=0;break}ne=(Pe(_|0,M<<24>>24|0)|0)!=0|0}}while(0);M=Fr(t,_,i,o,ne)|0;if((M|0)==-1){re=a[40]|0;break}a[40]=824;u=M;l=f;return u|0}else{re=T}}while(0);T=re+1|0;a[40]=T;ne=n[re]|0;re=ne<<24>>24;if((ne<<24>>24|0)==45){if((n[T]|0)==0){p=1260}}else if((ne<<24>>24|0)==58){p=1263}else{p=1260}do{if((p|0)==1260){S=Pe(_|0,re|0)|0;if((S|0)==0){if(ne<<24>>24!=45){p=1263;break}if((n[T]|0)==0){u=-1}else{break}l=f;return u|0}I=n[S+1|0]|0;if(P&ne<<24>>24==87&I<<24>>24==59){do{if((n[T]|0)==0){M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[40]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}}while(0);M=Fr(t,_,i,o,0)|0;a[40]=824;u=M;l=f;return u|0}if(I<<24>>24!=58){if((n[T]|0)!=0){u=re;l=f;return u|0}a[44]=(a[44]|0)+1;u=re;l=f;return u|0}a[198]=0;do{if((n[T]|0)==0){if((n[S+2|0]|0)==58){break}M=(a[44]|0)+1|0;a[44]=M;if((M|0)<(e|0)){a[198]=a[t+(M<<2)>>2];break}a[40]=824;do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(48,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=(n[_]|0)==58?58:63;l=f;return u|0}else{a[198]=T}}while(0);a[40]=824;a[44]=(a[44]|0)+1;u=re;l=f;return u|0}}while(0);do{if((p|0)==1263){if((n[T]|0)!=0){break}a[44]=(a[44]|0)+1}}while(0);do{if((a[46]|0)!=0){if((n[_]|0)==58){break}Hr(272,(E=l,l=l+8|0,a[E>>2]=re,E)|0)}}while(0);a[42]=re;u=63;l=f;return u|0}function Cr(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,1)|0}function Br(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;return Rr(e,t,r,n,i,5)|0}function jr(e){e=e|0;return mr(e)|0}function Nr(e,t){e=e|0;t=t|0;return jr(e)|0}function Lr(){var e=0;e=Fe(4)|0;a[e>>2]=560;_e(e|0,688,6)}function Fr(e,t,r,i,o){e=e|0;t=t|0;r=r|0;i=i|0;o=o|0;var s=0,f=0,u=0,c=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0;s=l;f=a[40]|0;u=a[44]|0;c=u+1|0;a[44]=c;d=Pe(f|0,61)|0;if((d|0)==0){h=tn(f|0)|0;p=0}else{h=d-f|0;p=d+1|0}d=a[r>>2]|0;e:do{if((d|0)!=0){t:do{if((o|0)!=0&(h|0)==1){b=0;v=d;while(1){if((n[f]|0)==(n[v]|0)){if((tn(v|0)|0)==1){m=b;break t}}b=b+1|0;v=a[r+(b<<4)>>2]|0;if((v|0)==0){break e}}}else{v=0;b=-1;g=d;while(1){if((ge(f|0,g|0,h|0)|0)==0){if((tn(g|0)|0)==(h|0)){m=v;break t}if((b|0)==-1){y=v}else{break}}else{y=b}w=v+1|0;_=a[r+(w<<4)>>2]|0;if((_|0)==0){m=y;break t}else{v=w;b=y;g=_}}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(304,(E=l,l=l+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}}while(0);if((m|0)==-1){break}g=r+(m<<4)+4|0;b=a[g>>2]|0;v=(p|0)==0;if(!((b|0)!=0|v)){do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(208,(E=l,l=l+16|0,a[E>>2]=h,a[E+8>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){k=a[r+(m<<4)+12>>2]|0}else{k=0}a[42]=k;S=(n[t]|0)==58?58:63;l=s;return S|0}do{if((b-1|0)>>>0<2){if(!v){a[198]=p;break}if((b|0)!=1){break}a[44]=u+2;a[198]=a[e+(c<<2)>>2]}}while(0);if(!((a[g>>2]|0)==1&(a[198]|0)==0)){if((i|0)!=0){a[i>>2]=m}b=a[r+(m<<4)+8>>2]|0;v=a[r+(m<<4)+12>>2]|0;if((b|0)==0){S=v;l=s;return S|0}a[b>>2]=v;S=0;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(8,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);if((a[r+(m<<4)+8>>2]|0)==0){x=a[r+(m<<4)+12>>2]|0}else{x=0}a[42]=x;a[44]=(a[44]|0)-1;S=(n[t]|0)==58?58:63;l=s;return S|0}}while(0);if((o|0)!=0){a[44]=u;S=-1;l=s;return S|0}do{if((a[46]|0)!=0){if((n[t]|0)==58){break}Hr(248,(E=l,l=l+8|0,a[E>>2]=f,E)|0)}}while(0);a[42]=0;S=63;l=s;return S|0}function zr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Dr(e,n|0);l=r;return}function Hr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+16|0;n=r|0;i=n;a[i>>2]=t;a[i+4>>2]=0;Ur(e,n|0);l=r;return}function Dr(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;n=a[(Je()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,432,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((e|0)!=0){i=a[m>>2]|0;Ke(i|0,e|0,t|0)|0;t=a[m>>2]|0;Ce(472,2,1,t|0)|0}t=a[m>>2]|0;e=Se(n|0)|0;xe(t|0,384,(E=l,l=l+8|0,a[E>>2]=e,E)|0)|0;l=r;return}function Ur(e,t){e=e|0;t=t|0;var r=0,n=0;r=l;n=a[w>>2]|0;xe(a[m>>2]|0,376,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((e|0)!=0){n=a[m>>2]|0;Ke(n|0,e|0,t|0)|0}Oe(10,a[m>>2]|0)|0;l=r;return}function qr(e,t){e=e|0;t=t|0;var r=0,i=0,o=0,s=0,f=0,u=0,l=0,d=0,h=0,p=0,b=0,v=0.0,m=0,g=0,y=0,w=0,_=0.0,S=0,k=0,x=0,A=0.0,M=0.0,E=0,T=0,I=0,P=0.0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0.0,H=0,D=0,U=0.0,q=0.0,Y=0.0;r=e;while(1){i=r+1|0;if((ze(n[r]|0)|0)==0){break}else{r=i}}o=n[r]|0;if((o<<24>>24|0)==45){s=i;f=1}else if((o<<24>>24|0)==43){s=i;f=0}else{s=r;f=0}r=-1;i=0;o=s;while(1){u=n[o]|0;if(((u<<24>>24)-48|0)>>>0<10){l=r}else{if(u<<24>>24!=46|(r|0)>-1){break}else{l=i}}r=l;i=i+1|0;o=o+1|0}l=o+(-i|0)|0;s=(r|0)<0;d=((s^1)<<31>>31)+i|0;h=(d|0)>18;p=(h?-18:-d|0)+(s?i:r)|0;r=h?18:d;do{if((r|0)==0){b=e;v=0.0}else{if((r|0)>9){d=l;h=r;i=0;while(1){s=n[d]|0;m=d+1|0;if(s<<24>>24==46){g=n[m]|0;y=d+2|0}else{g=s;y=m}w=(i*10|0)-48+(g<<24>>24)|0;m=h-1|0;if((m|0)>9){d=y;h=m;i=w}else{break}}_=+(w|0)*1.0e9;S=9;k=y;x=1393}else{if((r|0)>0){_=0.0;S=r;k=l;x=1393}else{A=0.0;M=0.0}}if((x|0)==1393){i=k;h=S;d=0;while(1){m=n[i]|0;s=i+1|0;if(m<<24>>24==46){E=n[s]|0;T=i+2|0}else{E=m;T=s}I=(d*10|0)-48+(E<<24>>24)|0;s=h-1|0;if((s|0)>0){i=T;h=s;d=I}else{break}}A=+(I|0);M=_}P=M+A;do{if((u<<24>>24|0)==69|(u<<24>>24|0)==101){d=o+1|0;h=n[d]|0;if((h<<24>>24|0)==43){O=o+2|0;R=0}else if((h<<24>>24|0)==45){O=o+2|0;R=1}else{O=d;R=0}d=n[O]|0;if(((d<<24>>24)-48|0)>>>0<10){C=O;B=0;j=d}else{N=0;L=O;F=R;break}while(1){d=(B*10|0)-48+(j<<24>>24)|0;h=C+1|0;i=n[h]|0;if(((i<<24>>24)-48|0)>>>0<10){C=h;B=d;j=i}else{N=d;L=h;F=R;break}}}else{N=0;L=o;F=0}}while(0);h=p+((F|0)==0?N:-N|0)|0;d=(h|0)<0?-h|0:h;if((d|0)>511){a[(Je()|0)>>2]=34;z=1.0;H=88;D=511;x=1410}else{if((d|0)==0){U=1.0}else{z=1.0;H=88;D=d;x=1410}}if((x|0)==1410){while(1){x=0;if((D&1|0)==0){q=z}else{q=z*+c[H>>3]}d=D>>1;if((d|0)==0){U=q;break}else{z=q;H=H+8|0;D=d;x=1410}}}if((h|0)>-1){b=L;v=P*U;break}else{b=L;v=P/U;break}}}while(0);if((t|0)!=0){a[t>>2]=b}if((f|0)==0){Y=v;return+Y}Y=-0.0-v;return+Y}function Yr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Kr(e,t){e=e|0;t=t|0;return+ +qr(e,t)}function Vr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Wr(e,t,r){e=e|0;t=t|0;r=r|0;return+ +qr(e,t)}function Xr(e){e=e|0;return+ +qr(e,0)}function Zr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Qr(e,t,i|0)}function Gr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=l;l=l+16|0;i=n|0;n=i;a[n>>2]=r;a[n+4>>2]=0;Jr(e,t,i|0)}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=a[(Je()|0)>>2]|0;i=a[w>>2]|0;xe(a[m>>2]|0,336,(E=l,l=l+8|0,a[E>>2]=i,E)|0)|0;if((t|0)!=0){i=a[m>>2]|0;Ke(i|0,t|0,r|0)|0;r=a[m>>2]|0;Ce(480,2,1,r|0)|0}r=a[m>>2]|0;t=Se(n|0)|0;xe(r|0,392,(E=l,l=l+8|0,a[E>>2]=t,E)|0)|0;Ne(e|0)}function Jr(e,t,r){e=e|0;t=t|0;r=r|0;var n=0;n=a[w>>2]|0;xe(a[m>>2]|0,440,(E=l,l=l+8|0,a[E>>2]=n,E)|0)|0;if((t|0)!=0){n=a[m>>2]|0;Ke(n|0,t|0,r|0)|0}Oe(10,a[m>>2]|0)|0;Ne(e|0)}function $r(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;i=e|0;if((e&3)==(t&3)){while(e&3){if((r|0)==0)return i|0;n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){a[e>>2]=a[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){n[e]=n[t]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function en(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,o=0,s=0;i=e+r|0;if((r|0)>=20){t=t&255;r=e&3;o=t|t<<8|t<<16|t<<24;s=i&~3;if(r){r=e+4-r|0;while((e|0)<(r|0)){n[e]=t;e=e+1|0}}while((e|0)<(s|0)){a[e>>2]=o;e=e+4|0}}while((e|0)<(i|0)){n[e]=t;e=e+1|0}}function tn(e){e=e|0;var t=0;t=e;while(n[t]|0){t=t+1|0}return t-e|0}function rn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=e+r>>>0;return(N=t+n+(i>>>0>>0|0)>>>0,i|0)|0}function nn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=t-n>>>0;i=t-n-(r>>>0>e>>>0|0)>>>0;return(N=i,e-r>>>0|0)|0}function an(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t<>>32-r;return e<>>r;return e>>>r|(t&(1<>>r-32|0}function sn(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){N=t>>r;return e>>>r|(t&(1<>r-32|0}function fn(e){e=e|0;var t=0;t=n[v+(e>>>24)|0]|0;if((t|0)<8)return t|0;t=n[v+(e>>16&255)|0]|0;if((t|0)<8)return t+8|0;t=n[v+(e>>8&255)|0]|0;if((t|0)<8)return t+16|0;return(n[v+(e&255)|0]|0)+24|0}function un(e){e=e|0;var t=0;t=n[b+(e&255)|0]|0;if((t|0)<8)return t|0;t=n[b+(e>>8&255)|0]|0;if((t|0)<8)return t+8|0;t=n[b+(e>>16&255)|0]|0;if((t|0)<8)return t+16|0;return(n[b+(e>>>24)|0]|0)+24|0}function cn(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,a=0;r=e&65535;n=t&65535;i=oe(n,r)|0;a=e>>>16;e=(i>>>16)+(oe(n,a)|0)|0;n=t>>>16;t=oe(n,r)|0;return(N=(e>>>16)+(oe(n,a)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|i&65535|0)|0}function ln(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0,o=0,s=0,f=0;i=t>>31|((t|0)<0?-1:0)<<1;a=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=n>>31|((n|0)<0?-1:0)<<1;s=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;f=nn(i^e,a^t,i,a)|0;t=N;e=o^i;i=s^a;a=nn((vn(f,t,nn(o^r,s^n,o,s)|0,N,0)|0)^e,N^i,e,i)|0;return(N=N,a)|0}function dn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0,s=0,f=0,u=0,c=0,d=0;i=l;l=l+8|0;o=i|0;s=t>>31|((t|0)<0?-1:0)<<1;f=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;u=n>>31|((n|0)<0?-1:0)<<1;c=((n|0)<0?-1:0)>>31|((n|0)<0?-1:0)<<1;d=nn(s^e,f^t,s,f)|0;t=N;e=nn(u^r,c^n,u,c)|0;vn(d,t,e,N,o)|0;e=nn(a[o>>2]^s,a[o+4>>2]^f,s,f)|0;f=N;l=i;return(N=f,e)|0}function hn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,a=0;i=e;e=r;r=cn(i,e)|0;a=N;return(N=(oe(t,e)|0)+(oe(n,i)|0)+a|a&0,r|0|0)|0}function pn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0;i=vn(e,t,r,n,0)|0;return(N=N,i)|0}function bn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;var i=0,o=0;i=l;l=l+8|0;o=i|0;vn(e,t,r,n,o)|0;l=i;return(N=a[o+4>>2]|0,a[o>>2]|0)|0}function vn(e,t,r,n,i){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;var o=0,s=0,f=0,u=0,c=0,l=0,d=0,h=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,L=0,F=0;o=e;s=t;f=s;u=r;c=n;l=c;if((f|0)==0){d=(i|0)!=0;if((l|0)==0){if(d){a[i>>2]=(o>>>0)%(u>>>0);a[i+4>>2]=0}h=0;p=(o>>>0)/(u>>>0)>>>0;return(N=h,p)|0}else{if(!d){h=0;p=0;return(N=h,p)|0}a[i>>2]=e|0;a[i+4>>2]=t&0;h=0;p=0;return(N=h,p)|0}}d=(l|0)==0;do{if((u|0)==0){if(d){if((i|0)!=0){a[i>>2]=(f>>>0)%(u>>>0);a[i+4>>2]=0}h=0;p=(f>>>0)/(u>>>0)>>>0;return(N=h,p)|0}if((o|0)==0){if((i|0)!=0){a[i>>2]=0;a[i+4>>2]=(f>>>0)%(l>>>0)}h=0;p=(f>>>0)/(l>>>0)>>>0;return(N=h,p)|0}b=l-1|0;if((b&l|0)==0){if((i|0)!=0){a[i>>2]=e|0;a[i+4>>2]=b&f|t&0}h=0;p=f>>>((un(l|0)|0)>>>0);return(N=h,p)|0}b=(fn(l|0)|0)-(fn(f|0)|0)|0;if(b>>>0<=30){v=b+1|0;m=31-b|0;g=v;y=f<>>(v>>>0);w=f>>>(v>>>0);_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(N=h,p)|0}else{if(!d){m=(fn(l|0)|0)-(fn(f|0)|0)|0;if(m>>>0<=31){v=m+1|0;b=31-m|0;k=m-31>>31;g=v;y=o>>>(v>>>0)&k|f<>>(v>>>0)&k;_=0;S=o<>2]=e|0;a[i+4>>2]=s|t&0;h=0;p=0;return(N=h,p)|0}b=u-1|0;if((b&u|0)!=0){k=(fn(u|0)|0)+33-(fn(f|0)|0)|0;v=64-k|0;m=32-k|0;x=m>>31;A=k-32|0;M=A>>31;g=k;y=m-1>>31&f>>>(A>>>0)|(f<>>(k>>>0))&M;w=M&f>>>(k>>>0);_=o<>>(A>>>0))&x|o<>31;break}if((i|0)!=0){a[i>>2]=b&o;a[i+4>>2]=0}if((u|0)==1){h=s|t&0;p=e|0|0;return(N=h,p)|0}else{b=un(u|0)|0;h=f>>>(b>>>0)|0;p=f<<32-b|o>>>(b>>>0)|0;return(N=h,p)|0}}}while(0);if((g|0)==0){E=S;T=_;I=w;P=y;O=0;R=0}else{o=r|0|0;r=c|n&0;n=rn(o,r,-1,-1)|0;c=N;f=S;S=_;_=w;w=y;y=g;g=0;while(1){C=S>>>31|f<<1;B=g|S<<1;u=w<<1|f>>>31|0;e=w>>>31|_<<1|0;nn(n,c,u,e)|0;t=N;s=t>>31|((t|0)<0?-1:0)<<1;j=s&1;L=nn(u,e,s&o,(((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1)&r)|0;F=N;t=y-1|0;if((t|0)==0){break}else{f=C;S=B;_=F;w=L;y=t;g=j}}E=C;T=B;I=F;P=L;O=0;R=j}j=T;T=0;if((i|0)!=0){a[i>>2]=P;a[i+4>>2]=I}h=(j|0)>>>31|(E|T)<<1|(T<<1|j>>>31)&0|O;p=(j<<1|0>>>31)&-2|R;return(N=h,p)|0}function mn(e,t){e=e|0;t=t|0;In[e&15](t|0)}function gn(e,t,r){e=e|0;t=t|0;r=r|0;Pn[e&15](t|0,r|0)}function yn(e,t){e=e|0;t=t|0;return On[e&7](t|0)|0}function wn(e,t,r,n){e=e|0;t=t|0;r=r|0;n=n|0;Rn[e&15](t|0,r|0,n|0)}function _n(e){e=e|0;Cn[e&1]()}function Sn(e,t,r){e=e|0;t=t|0;r=r|0;return Bn[e&1](t|0,r|0)|0}function kn(e){e=e|0;se(0)}function xn(e,t){e=e|0;t=t|0;se(1)}function An(e){e=e|0;se(2);return 0}function Mn(e,t,r){e=e|0;t=t|0;r=r|0;se(3)}function En(){se(4)}function Tn(e,t){e=e|0;t=t|0;se(5);return 0}var In=[kn,kn,xr,kn,Pr,kn,yr,kn,kr,kn,Ir,kn,kn,kn,kn,kn];var Pn=[xn,xn,zr,xn,Dr,xn,Hr,xn,Ur,xn,xn,xn,xn,xn,xn,xn];var On=[An,An,wr,An,_r,An,An,An];var Rn=[Mn,Mn,Jr,Mn,Qr,Mn,Zr,Mn,Gr,Mn,Mn,Mn,Mn,Mn,Mn,Mn];var Cn=[En,En];var Bn=[Tn,Tn];return{_crypto_scrypt:Et,_strlen:tn,_free:Kt,_realloc:Wt,_memset:en,_malloc:Yt,_memcpy:$r,_calloc:Vt,runPostSets:wt,stackAlloc:it,stackSave:at,stackRestore:ot,setThrew:st,setTempRet0:ct,setTempRet1:lt,setTempRet2:dt,setTempRet3:ht,setTempRet4:pt,setTempRet5:bt,setTempRet6:vt,setTempRet7:mt,setTempRet8:gt,setTempRet9:yt,dynCall_vi:mn,dynCall_vii:gn,dynCall_ii:yn,dynCall_viii:wn,dynCall_v:_n,dynCall_iii:Sn}}({Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:wa,assert:w,asmPrintInt:function(e,t){s.print("int "+e+","+t)},asmPrintFloat:function(e,t){s.print("float "+e+","+t)},min:Xc,invoke_vi:function(e,t){try{s.dynCall_vi(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_vii:function(e,t,r){try{s.dynCall_vii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_ii:function(e,t){try{return s.dynCall_ii(e,t)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_viii:function(e,t,r,n){try{s.dynCall_viii(e,t,r,n)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_v:function(e){try{s.dynCall_v(e)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},invoke_iii:function(e,t,r){try{return s.dynCall_iii(e,t,r)}catch(e){"number"!=typeof e&&"longjmp"!==e&&g(e),V.setThrew(1,0)}},_strncmp:function(e,t,r){for(var n=0;na?1:-1;n++}return 0},_llvm_va_end:aa(),_sysconf:function(e){switch(e){case 8:return 4096;case 54:case 56:case 21:case 61:case 63:case 22:case 67:case 23:case 24:case 25:case 26:case 27:case 69:case 28:case 101:case 70:case 71:case 29:case 30:case 199:case 75:case 76:case 32:case 43:case 44:case 80:case 46:case 47:case 45:case 48:case 49:case 42:case 82:case 33:case 7:case 108:case 109:case 107:case 112:case 119:case 121:return 200809;case 13:case 104:case 94:case 95:case 34:case 35:case 77:case 81:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 91:case 94:case 95:case 110:case 111:case 113:case 114:case 115:case 116:case 117:case 118:case 120:case 40:case 16:case 79:case 19:return-1;case 92:case 93:case 5:case 72:case 6:case 74:case 92:case 93:case 96:case 97:case 98:case 99:case 102:case 103:case 105:return 1;case 38:case 66:case 50:case 51:case 4:return 1024;case 15:case 64:case 41:return 32;case 55:case 37:case 17:return 2147483647;case 18:case 1:return 47839;case 59:case 57:return 99;case 68:case 58:return 2048;case 0:return 2097152;case 3:return 65536;case 14:return 32768;case 73:return 32767;case 39:return 16384;case 60:return 1e3;case 106:return 700;case 52:return 256;case 62:return 255;case 2:return 100;case 65:return 64;case 36:return 20;case 100:return 16;case 20:return 6;case 53:return 4;case 10:return 1}return M(N.A),-1},___cxa_throw:rc,_strerror:zc,_abort:function(){s.abort()},_fprintf:mc,_llvm_eh_exception:U,___cxa_free_exception:sc,_fflush:aa(),___buildEnvironment:wc,__reallyNegative:jc,_strchr:function(e,t){e--;do{var r=A[++e];if(r==t)return e}while(r);return 0},_fputc:Bc,___setErrNo:M,_fwrite:hc,_send:fc,_write:gc,_exit:function(e){Ac(e)},___cxa_find_matching_catch:function(e,t){-1==e&&(e=B[U.m>>2]),-1==t&&(t=B[U.m+4>>2]);var r=Array.prototype.slice.call(arguments,2);0!=t&&!pc(t)&&0==B[B[t>>2]-8>>2]&&(e=B[e>>2]);for(var n=0;n=e},__formatString:kc,___resumeException:function(e){0==B[U.m>>2]&&(B[U.m>>2]=e),g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")},_llvm_uadd_with_overflow_i32:function(e,t){return e>>>=0,t>>>=0,0|(V.setTempRet0(4294967295>>0)},___cxa_does_inherit:qc,_getenv:xc,_vfprintf:function(e,t,r){return mc(e,t,B[r>>2])},___cxa_begin_catch:function(e){return oc.ta--,e},__ZSt18uncaught_exceptionv:oc,_pwrite:function(e,t,r,n){if(!(e=R[e]))return M(N.$),-1;try{return Ib(e,A,t,r,n)}catch(e){return Zb(e),-1}},___cxa_call_unexpected:function(e){s.P("Unexpected exception thrown, this is not properly supported - aborting"),za=l,g(e)},_sbrk:nc,_strerror_r:yc,___errno_location:function(){return rb},___gxx_personality_v0:aa(),___cxa_is_number_type:pc,_time:function(e){var t=Math.floor(Date.now()/1e3);return e&&(B[e>>2]=t),t},__exit:Ac,___cxa_end_catch:uc,STACKTOP:u,STACK_MAX:Ta,tempDoublePtr:qb,ABORT:za,cttz_i8:Wc,ctlz_i8:Vc,NaN:NaN,Infinity:1/0,_stderr:nb,__ZTVN10__cxxabiv120__si_class_type_infoE:ob,__ZTVN10__cxxabiv117__class_type_infoE:pb,___progname:k},I);s._crypto_scrypt=V._crypto_scrypt;var ic=s._strlen=V._strlen,tc=s._free=V._free;s._realloc=V._realloc;var tb=s._memset=V._memset,Oa=s._malloc=V._malloc,sb=s._memcpy=V._memcpy;s._calloc=V._calloc;var mb=s.runPostSets=V.runPostSets;s.dynCall_vi=V.dynCall_vi,s.dynCall_vii=V.dynCall_vii,s.dynCall_ii=V.dynCall_ii,s.dynCall_viii=V.dynCall_viii,s.dynCall_v=V.dynCall_v,s.dynCall_iii=V.dynCall_iii;var qa=function(e){return V.stackAlloc(e)},ja=function(){return V.stackSave()},ka=function(e){V.stackRestore(e)},lc;function X(e,t){e!=m&&("number"==typeof e?this.p(e):t==m&&"string"!=typeof e?this.k(e,256):this.k(e,t))}function Yc(){return new X(m)}function Zc(e,t){var r=$c[e.charCodeAt(t)];return r==m?-1:r}function ad(e){var t=Yc();return t.D(e),t}function Y(e,t){this.h=0|e,this.j=0|t}Y.Ca={},Y.D=function(e){if(-128<=e&&128>e){var t=Y.Ca[e];if(t)return t}return t=new Y(0|e,0>e?-1:0),-128<=e&&128>e&&(Y.Ca[e]=t),t},Y.p=function(e){return isNaN(e)||!isFinite(e)?Y.ZERO:e<=-Y.Ea?Y.MIN_VALUE:e+1>=Y.Ea?Y.MAX_VALUE:0>e?Y.p(-e).i():new Y(e%Y.B|0,e/Y.B|0)},Y.v=function(e,t){return new Y(e,t)},Y.k=function(e,t){0==e.length&&g(Error("number format error: empty string"));var r=t||10;if((2>r||36o?(o=Y.p(Math.pow(r,o)),i=i.multiply(o).add(Y.p(s))):i=(i=i.multiply(n)).add(Y.p(s))}return i},Y.ea=65536,Y.Od=16777216,Y.B=Y.ea*Y.ea,Y.Pd=Y.B/2,Y.Qd=Y.B*Y.ea,Y.eb=Y.B*Y.B,Y.Ea=Y.eb/2,Y.ZERO=Y.D(0),Y.ONE=Y.D(1),Y.Da=Y.D(-1),Y.MAX_VALUE=Y.v(-1,2147483647),Y.MIN_VALUE=Y.v(0,-2147483648),Y.cb=Y.D(16777216),q=Y.prototype,q.Z=function(){return this.j*Y.B+this.ob()},q.toString=function(e){if((2>(e=e||10)||36a.length;)a="0"+a;n=""+a+n}},q.ob=function(){return 0<=this.h?this.h:Y.B+this.h},q.G=function(){return 0==this.j&&0==this.h},q.n=function(){return 0>this.j},q.Pa=function(){return 1==(1&this.h)},q.o=function(e){return this.j==e.j&&this.h==e.h},q.Ra=function(){return 0>this.ja(Y.cb)},q.qb=function(e){return 0>>16,n=65535&this.j,i=this.h>>>16,a=e.j>>>16,o=65535&e.j,s=e.h>>>16;return e=0+((t=(65535&this.h)+(65535&e.h)+0)>>>16),i=0+((e+=i+s)>>>16),n=(n=0+((i+=n+o)>>>16))+(r+a)&65535,Y.v((65535&e)<<16|65535&t,n<<16|65535&i)},q.R=function(e){return this.add(e.i())},q.multiply=function(e){if(this.G()||e.G())return Y.ZERO;if(this.o(Y.MIN_VALUE))return e.Pa()?Y.MIN_VALUE:Y.ZERO;if(e.o(Y.MIN_VALUE))return this.Pa()?Y.MIN_VALUE:Y.ZERO;if(this.n())return e.n()?this.i().multiply(e.i()):this.i().multiply(e).i();if(e.n())return this.multiply(e.i()).i();if(this.Ra()&&e.Ra())return Y.p(this.Z()*e.Z());var t,r,n,i,a=this.j>>>16,o=65535&this.j,s=this.h>>>16,f=65535&this.h,u=e.j>>>16,c=65535&e.j,l=e.h>>>16;return n=0+((i=0+f*(e=65535&e.h))>>>16),r=0+((n+=s*e)>>>16),r+=(n=(65535&n)+f*l)>>>16,n&=65535,t=0+((r+=o*e)>>>16),t+=(r=(65535&r)+s*l)>>>16,r&=65535,t+=(r+=f*c)>>>16,r&=65535,t=t+(a*e+o*l+s*c+f*u)&65535,Y.v(n<<16|65535&i,t<<16|r)},q.F=function(e){if(e.G()&&g(Error("division by zero")),this.G())return Y.ZERO;if(this.o(Y.MIN_VALUE)){if(e.o(Y.ONE)||e.o(Y.Da))return Y.MIN_VALUE;if(e.o(Y.MIN_VALUE))return Y.ONE;if((n=this.Db().F(e).shiftLeft(1)).o(Y.ZERO))return e.n()?Y.ONE:Y.Da;var t=this.R(e.multiply(n));return n.add(t.F(e))}if(e.o(Y.MIN_VALUE))return Y.ZERO;if(this.n())return e.n()?this.i().F(e.i()):this.i().F(e).i();if(e.n())return this.F(e.i()).i();var r=Y.ZERO;for(t=this;t.rb(e);){for(var n=Math.max(1,Math.floor(t.Z()/e.Z())),i=48>=(i=Math.ceil(Math.log(n)/Math.LN2))?1:Math.pow(2,i-48),a=Y.p(n),o=a.multiply(e);o.n()||o.qb(t);)n-=i,o=(a=Y.p(n)).multiply(e);a.G()&&(a=Y.ONE),r=r.add(a),t=t.R(o)}return r},q.xb=function(){return Y.v(~this.h,~this.j)},q.shiftLeft=function(e){if(0==(e&=63))return this;var t=this.h;return 32>e?Y.v(t<>>32-e):Y.v(0,t<>>1|e<<31,e>>1)},q=X.prototype,q.ga=function(e,t,r,n){for(var i=0,a=0;0<=--n;){var o=e*this[i++]+t[r]+a;a=Math.floor(o/67108864);t[r++]=67108863&o}return a},q.f=26,q.u=67108863,q.K=67108864,q.bb=Math.pow(2,52),q.Aa=26,q.Ba=0;var $c=[],bd,Z;for(bd=48,Z=0;9>=Z;++Z)$c[bd++]=Z;for(bd=97,Z=10;36>Z;++Z)$c[bd++]=Z;for(bd=65,Z=10;36>Z;++Z)$c[bd++]=Z;q=X.prototype,q.copyTo=function(e){for(var t=this.b-1;0<=t;--t)e[t]=this[t];e.b=this.b,e.c=this.c},q.D=function(e){this.b=1,this.c=0>e?-1:0,0e?this[0]=e+DV:this.b=0},q.k=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(256==t)r=8;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return void this.nb(e,t);r=2}this.c=this.b=0;for(var n=e.length,i=p,a=0;0<=--n;){var o=8==r?255&e[n]:Zc(e,n);0>o?"-"==e.charAt(n)&&(i=l):(i=p,0==a?this[this.b++]=o:a+r>this.f?(this[this.b-1]|=(o&(1<>this.f-a):this[this.b-1]|=o<=this.f&&(a-=this.f))}8==r&&0!=(128&e[0])&&(this.c=-1,0>i|s,s=(this[r]&a)<=this.b)t.b=0;else{var n=e%this.f,i=this.f-n,a=(1<>n;for(var o=r+1;o>n;0>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n-=e.c}t.c=0>n?-1:0,-1>n?t[r++]=this.K+n:0=n.b)){var i=this.abs();if(i.b>>16)&&(f=a,u+=16),0!=(a=f>>8)&&(f=a,u+=8),0!=(a=f>>4)&&(f=a,u+=4),0!=(a=f>>2)&&(f=a,u+=2),0!=f>>1&&(u+=1),0<(f=this.f-u)?(n.Qa(f,o),i.Qa(f,r)):(n.copyTo(o),i.copyTo(r)),0!=(i=o[(n=o.b)-1])){a=i*(1<>this.Ba:0),u=this.bb/a,a=(1<s&&X.ZERO.t(r,r)}}}},q.toString=function(e){if(0>this.c)return"-"+this.i().toString(e);if(16==e)e=4;else if(8==e)e=3;else if(2==e)e=1;else if(32==e)e=5;else{if(4!=e)return this.Fb(e);e=2}var t,r=(1<>o)&&(n=l,i="0123456789abcdefghijklmnopqrstuvwxyz".charAt(t));0<=a;)o>(o+=this.f-e)):(t=this[a]>>(o-=e)&r,0>=o&&(o+=this.f,--a)),0this.c?this.i():this},q.U=function(e){if(0!=(t=this.c-e.c))return t;var t,r=this.b;if(0!=(t=r-e.b))return 0>this.c?-t:t;for(;0<=--r;)if(0!=(t=this[r]-e[r]))return t;return 0},X.ZERO=ad(0),X.ONE=ad(1),q=X.prototype,q.nb=function(e,t){this.D(0),t==m&&(t=10);for(var r=this.S(t),n=Math.pow(t,r),i=p,a=0,o=0,s=0;sf?"-"==e.charAt(s)&&0==this.ra()&&(i=l):(o=t*o+f,++a>=r&&(this.Ia(n),this.Ha(o),o=a=0))}0this.c?-1:0>=this.b||1==this.b&&0>=this[0]?0:1},q.Ia=function(e){this[this.b]=this.ga(e-1,this,0,this.b),++this.b,this.C()},q.Ha=function(e){var t=0;if(0!=e){for(;this.b<=t;)this[this.b++]=0;for(this[t]+=e;this[t]>=this.K;)this[t]-=this.K,++t>=this.b&&(this[this.b++]=0),++this[t]}},q.Fb=function(e){if(e==m&&(e=10),0==this.ra()||2>e||36this.c){if(1==this.b)return this[0]-this.K;if(0==this.b)return-1}else{if(1==this.b)return this[0];if(0==this.b)return 0}return(this[1]&(1<<32-this.f)-1)<>=this.f;if(e.b>=this.f;n+=this.c}else{for(n+=this.c;r>=this.f;n+=e.c}t.c=0>n?-1:0,0n&&(t[r++]=this.K+n),t.b=r,t.C()};var $={abs:function(e,t){var r=(r=new Y(e,t)).n()?r.i():r;B[qb>>2]=r.h,B[qb+4>>2]=r.j},Ka:function(){$.kb||($.kb=l,$.Xa=new X,$.Xa.k("4294967296",10),$.sa=new X,$.sa.k("18446744073709551616",10),$.xe=new X,$.ye=new X)},me:function(e,t){var r=new X;r.k(t.toString(),10);var n=new X;r.vb(n),(r=new X).k(e.toString(),10);var i=new X;return r.fa(n,i),i},stringify:function(e,t,r){return e=new Y(e,t).toString(),r&&"-"==e[0]&&($.Ka(),(r=new X).k(e,10),e=new X,$.sa.fa(r,e),e=e.toString(10)),e},k:function(e,t,r,n,i){$.Ka();var a=new X;a.k(e,t),(e=new X).k(r,10),(r=new X).k(n,10),i&&0>a.U(X.ZERO)&&(n=new X,a.fa($.sa,n),a=n),n=p,0>a.U(e)?(a=e,n=l):0>2]=a.h,B[qb+4>>2]=a.j,n&&g("range error")}},cd,dd;function lb(e){function t(){if(ab||(ab=l,Va(Xa)),Va(Ya),gb=l,s._main&&kb&&s.callMain(e),s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)cb(s.postRun.shift());Va($a)}if(e=e||s.arguments,0e;e++)i.push(0)}w(0==L,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),w(0==Wa.length,"cannot call main when preRun functions remain to be called"),e=e||[],ab||(ab=l,Va(Xa));var r,n=e.length+1,i=[F(J("/bin/this.program"),"i8",Ka)];t();for(var a=0;a>4&15]),t.push("0123456789abcdef"[15&e[r]]);return t.join("")},e.crypto_scrypt=function(e,t,r,a,o,s){var f=new i(s),u=n(e),c=n(t);return function(e,t){if(0!==t)throw{message:"scrypt_raw."+e+" signalled an error"}}("_crypto_scrypt",scrypt_raw._crypto_scrypt(u,e.length,c,t.length,r,0,a,o,f.address,f.length)),function(e){for(var t=0;t=e)&&(n=e-1,console.error("invalid priority: "+a+" must be between 0 and "+n))),t[n].push(r)},n.dequeue=function(e){var r,n=null,a=t.length;for(i=null,r=0;rc.length);e+=1)l>=(s=o[e].timeout)&&(d("removeIdle() destroying obj - now:"+l+" timeout:"+s,"verbose"),c.push(o[e].obj));for(e=0,i=c.length;e0?(d("availableObjects.length="+n,"verbose"),p()):d("removeIdle() all objects removed","verbose")}function p(){u||(u=!0,c=setTimeout(h,i))}function b(){var e=null,n=s.size();if(d("dispense() clients="+n+" available="+o.length,"info"),n>0){for(;o.length>0;){if(d("dispense() - reusing obj","verbose"),e=o[0],t.validate(e.obj))return o.shift(),s.dequeue()(null,e.obj);r.destroy(e.obj)}f1?(t=arguments[0],n=arguments[1]):(t=arguments[0]instanceof Error?arguments[0]:null,n=arguments[0]instanceof Error?null:arguments[0]),t?(f-=1,i&&i(t,n),e.nextTick(function(){b()})):i?i(t,n):r.release(n)})}function m(){var e,r;if(!l&&f0?setTimeout(t,100):o.length!=f?setTimeout(t,100):e&&e()};t()},r.destroyAllNow=function(e){d("force destroying all objects","info");var t=o;o=[];for(var n=t.shift();null!==n&&void 0!==n;)r.destroy(n.obj),n=t.shift();u=!1,clearTimeout(c),e&&e()},r.pooled=function(e,t){return function(){var n=arguments,i=n[n.length-1],a="function"==typeof i;r.acquire(function(t,o){if(t)a&&i(t);else{var s=[o].concat(Array.prototype.slice.call(n,0,a?-1:void 0));s.push(function(){r.release(o),a&&i.apply(null,arguments)}),e.apply(null,s)}},t)}},r.getPoolSize=function(){return f},r.getName=function(){return t.name},r.availableObjectsCount=function(){return o.length},r.waitingClientsCount=function(){return s.size()},m(),r}}).call(this,r(9))},function(e,t,r){(function(t,n,i){var a=r(56),o=r(20).fork,s=r(101),f=r(100).cpus().length,u=u=new s.Pool({name:"scrypt-worker",create:function(e){var r=o(t+"/scrypt-async-worker.js");r.controlledExit=!1,r.on("exit",function(){r.controlledExit||n(u.destroy.bind(u,r))}),e(r)},destroy:function(e){try{e.controlledExit=!0,e.disconnect()}catch(e){}},max:Math.max(2,f-1),min:0,idleTimeoutMillis:15e3,log:!1});e.exports=function(e,t,r,n){var o=a.apply(null,arguments),s=o.callback||function(){};delete o.callback,o.password=o.password.toString("base64"),o.salt=o.salt.toString("base64");new Date;u.acquire(function(e,t){if(e)return u.release(t),s(e);t.once("message",function(e){new Date;u.release(t),e.error&&s(e.error),s(null,new i(e.data,"base64"))}),t.send(o)})}}).call(this,"/",r(37).setImmediate,r(5).Buffer)},function(e,t,r){e.exports={hash:r(102),hashSync:r(99)}},function(e,t,r){var n;e.exports=(n=r(6),r(31),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},function(e,t,r){var n,i;e.exports=(n=r(6),r(31),n.mode.ECB=((i=n.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),n.mode.ECB)},function(e,t,r){var n,i,a,o,s,f,u;e.exports=(n=r(6),a=(i=n).lib,o=a.Base,s=i.enc,f=s.Utf8,u=i.algo,void(u.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=f.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),o=i.words,s=a.words,u=0;u>>31}var l=(n<<5|n>>>27)+s+f[u];l+=u<20?1518500249+(i&a|~i&o):u<40?1859775393+(i^a^o):u<60?(i&a|i&o|a&o)-1894007588:(i^a^o)-899497514,s=o,o=a,a=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=s._createHelper(u),i.HmacSHA1=s._createHmacHelper(u),n.SHA1)},function(e,t,r){var n;e.exports=(n=r(6),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var f=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],f=e[t+1],h=e[t+2],p=e[t+3],b=e[t+4],v=e[t+5],m=e[t+6],g=e[t+7],y=e[t+8],w=e[t+9],_=e[t+10],S=e[t+11],k=e[t+12],x=e[t+13],A=e[t+14],M=e[t+15],E=a[0],T=a[1],I=a[2],P=a[3];T=d(T=d(T=d(T=d(T=l(T=l(T=l(T=l(T=c(T=c(T=c(T=c(T=u(T=u(T=u(T=u(T,I=u(I,P=u(P,E=u(E,T,I,P,o,7,s[0]),T,I,f,12,s[1]),E,T,h,17,s[2]),P,E,p,22,s[3]),I=u(I,P=u(P,E=u(E,T,I,P,b,7,s[4]),T,I,v,12,s[5]),E,T,m,17,s[6]),P,E,g,22,s[7]),I=u(I,P=u(P,E=u(E,T,I,P,y,7,s[8]),T,I,w,12,s[9]),E,T,_,17,s[10]),P,E,S,22,s[11]),I=u(I,P=u(P,E=u(E,T,I,P,k,7,s[12]),T,I,x,12,s[13]),E,T,A,17,s[14]),P,E,M,22,s[15]),I=c(I,P=c(P,E=c(E,T,I,P,f,5,s[16]),T,I,m,9,s[17]),E,T,S,14,s[18]),P,E,o,20,s[19]),I=c(I,P=c(P,E=c(E,T,I,P,v,5,s[20]),T,I,_,9,s[21]),E,T,M,14,s[22]),P,E,b,20,s[23]),I=c(I,P=c(P,E=c(E,T,I,P,w,5,s[24]),T,I,A,9,s[25]),E,T,p,14,s[26]),P,E,y,20,s[27]),I=c(I,P=c(P,E=c(E,T,I,P,x,5,s[28]),T,I,h,9,s[29]),E,T,g,14,s[30]),P,E,k,20,s[31]),I=l(I,P=l(P,E=l(E,T,I,P,v,4,s[32]),T,I,y,11,s[33]),E,T,S,16,s[34]),P,E,A,23,s[35]),I=l(I,P=l(P,E=l(E,T,I,P,f,4,s[36]),T,I,b,11,s[37]),E,T,g,16,s[38]),P,E,_,23,s[39]),I=l(I,P=l(P,E=l(E,T,I,P,x,4,s[40]),T,I,o,11,s[41]),E,T,p,16,s[42]),P,E,m,23,s[43]),I=l(I,P=l(P,E=l(E,T,I,P,w,4,s[44]),T,I,k,11,s[45]),E,T,M,16,s[46]),P,E,h,23,s[47]),I=d(I,P=d(P,E=d(E,T,I,P,o,6,s[48]),T,I,g,10,s[49]),E,T,A,15,s[50]),P,E,v,21,s[51]),I=d(I,P=d(P,E=d(E,T,I,P,k,6,s[52]),T,I,p,10,s[53]),E,T,_,15,s[54]),P,E,f,21,s[55]),I=d(I,P=d(P,E=d(E,T,I,P,y,6,s[56]),T,I,M,10,s[57]),E,T,m,15,s[58]),P,E,x,21,s[59]),I=d(I,P=d(P,E=d(E,T,I,P,b,6,s[60]),T,I,S,10,s[61]),E,T,h,15,s[62]),P,E,w,21,s[63]),a[0]=a[0]+E|0,a[1]=a[1]+T|0,a[2]=a[2]+I|0,a[3]=a[3]+P|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var a=e.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,u=0;u<4;u++){var c=f[u];f[u]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<>>32-a)+t}function c(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<>>32-a)+t}function d(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<>>32-a)+t}t.MD5=a._createHelper(f),t.HmacMD5=a._createHmacHelper(f)}(Math),n.MD5)},function(e,t,r){var n,i,a;e.exports=(n=r(6),a=(i=n).lib.WordArray,i.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var f=n.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-o%4*2;n[i>>>2]|=(s|f)<<24-i%4*8,i++}return a.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},function(e,t,r){var n;e.exports=(n=r(6),r(109),r(108),r(57),r(31),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,i=[],a=[],o=[],s=[],f=[],u=[],c=[],l=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,a[p]=r;var b=e[r],v=e[b],m=e[v],g=257*e[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,u[r]=g,g=16843009*m^65537*v^257*b^16843008*r,c[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,d[p]=g<<8|g>>>24,h[p]=g,r?(r=b^e[e[e[m^b]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],b=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o6&&o%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[o/r|0]<<24),a[o]=a[o-r]^s}for(var f=this._invKeySchedule=[],u=0;u>>24]]^l[i[s>>>16&255]]^d[i[s>>>8&255]]^h[i[255&s]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,f,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,c,l,d,h,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var f=this._nRounds,u=e[t]^r[0],c=e[t+1]^r[1],l=e[t+2]^r[2],d=e[t+3]^r[3],h=4,p=1;p>>24]^i[c>>>16&255]^a[l>>>8&255]^o[255&d]^r[h++],v=n[c>>>24]^i[l>>>16&255]^a[d>>>8&255]^o[255&u]^r[h++],m=n[l>>>24]^i[d>>>16&255]^a[u>>>8&255]^o[255&c]^r[h++],g=n[d>>>24]^i[u>>>16&255]^a[c>>>8&255]^o[255&l]^r[h++];u=b,c=v,l=m,d=g}b=(s[u>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&d])^r[h++],v=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^r[h++],m=(s[l>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&c])^r[h++],g=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^r[h++],e[t]=b,e[t+1]=v,e[t+2]=m,e[t+3]=g},keySize:8});e.AES=t._createHelper(b)}(),n.AES)},function(e,t,r){var n;e.exports=(n=r(6),n.enc.Latin1)},function(e,t){},function(e,t,r){(function(n,i){var a;!function(o){"use strict";function s(e,t){if(t=t||{type:"Array"},void 0!==n&&"number"==typeof n.pid)return function(e,t){var n=r(112).randomBytes(e);switch(t.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(e),a=0;a0||e===t?t:t-1}function w(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(f=i.length)<(u=a.length)?f:u,o=0;oa[o]^r?1:-1;return f==u?0:f>u^r?1:-1}function S(e,t,r){return(e=E(e))>=t&&e<=r}function k(e){return"[object Array]"==Object.prototype.toString.call(e)}function x(e,t,r){for(var n,i,a=[0],o=0,s=e.length;or-1&&(null==a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function M(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t15&&$(R,l,e),s=!1):h.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=X(c,10,t,h.s)}else{if(e instanceof W)return h.s=e.s,h.e=e.e,h.c=(e=e.c)?e.slice():e,void(R=0);if((s="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,a=e;a>=10;a/=10,i++);return h.e=i,h.c=[e],void(R=0)}c=e+""}else{if(!o.test(c=e+""))return n(h,c,s);h.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((i=c.indexOf("."))>-1&&(c=c.replace(".","")),(a=c.search(/e/i))>0?(i<0&&(i=a),i+=+c.slice(a+1),c=c.substring(0,a)):i<0&&(i=c.length),a=0;48===c.charCodeAt(a);a++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(a,u+1))if(u=c.length,s&&D&&u>15&&(e>b||e!==f(e))&&$(R,l,h.s*e),(i=i-a-1)>H)h.c=h.e=null;else if(i=0&&(s=K,K=0,e=e.replace(".",""),u=(l=new W(n)).pow(e.length-h),K=s,l.c=x(M(w(u.c),u.e),10,t),l.e=l.c.length),o=s=(c=x(e,n,t)).length;0==c[--s];c.pop());if(!c[0])return"0";if(h<0?--o:(u.c=c,u.e=o,u.s=i,c=(u=r(u,l,p,b,t)).c,f=u.r,o=u.e),h=c[a=o+p+1],s=t/2,f=f||a<0||null!=c[a+1],f=b<4?(null!=h||f)&&(0==b||b==(u.s<0?3:2)):h>s||h==s&&(4==b||f||6==b&&1&c[a-1]||b==(u.s<0?8:7)),a<1||!c[0])e=f?M("1",-p):"0";else{if(c.length=a,f)for(--t;++c[--a]>t;)c[a]=0,a||(++o,c=[1].concat(c));for(s=c.length;!c[--s];);for(h=0,e="";h<=s;e+=d.charAt(c[h++]));e=M(e,o)}return e}function Z(e,t,r,n){var i,a,o,s,f;if(r=null!=r&&U(r,0,8,n,c)?0|r:N,!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)f=w(e.c),f=19==n||24==n&&o<=L?A(f,o):M(f,o);else if(a=(e=ee(new W(e),t,r)).e,s=(f=w(e.c)).length,19==n||24==n&&(t<=a||a<=L)){for(;ss){if(--t>0)for(f+=".";t--;f+="0");}else if((t+=a-s)>0)for(a+1==s&&(f+=".");t--;f+="0");return e.s<0&&i?"-"+f:f}function G(e,t){var r,n,i=0;for(k(e[0])&&(e=e[0]),r=new W(e[0]);++ir||e!=E(e))&&$(n,(i||"decimal places")+(er?" out of range":" not an integer"),e),!0}function J(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*p-1)>H?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=p,o=t,d=(c=b[l=0])/m[i-o-1]%10|0;else if((l=s((a+1)/p))>=b.length){if(!n)break e;for(;b.length<=l;b.push(0));c=d=0,i=1,o=(a%=p)-p+1}else{for(c=u=b[l],i=1;u>=10;u/=10,i++);d=(o=(a%=p)-p+i)<0?0:c/m[i-o-1]%10|0}if(n=n||t<0||null!=b[l+1]||(o<0?c:c%m[i-o-1]),n=r<4?(d||n)&&(0==r||r==(e.s<0?3:2)):d>5||5==d&&(4==r||n||6==r&&(a>0?o>0?c/m[i-o]:0:b[l-1])%10&1||r==(e.s<0?8:7)),t<1||!b[0])return b.length=0,n?(t-=e.e+1,b[0]=m[(p-t%p)%p],e.e=-t||0):b[0]=e.e=0,e;if(0==a?(b.length=l,u=1,l--):(b.length=l+1,u=m[p-a],b[l]=o>0?f(c/m[i-o]%m[o])*u:0),n)for(;;){if(0==l){for(a=1,o=b[0];o>=10;o/=10,a++);for(o=b[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,b[0]==h&&(b[0]=1));break}if(b[l]+=u,b[l]!=h)break;b[l--]=0,u=1}for(a=b.length;0===b[--a];b.pop());}e.e>H?e.c=e.e=null:e.er)return null!=(e=i[r++])};return o(t="DECIMAL_PLACES")&&U(e,0,g,2,t)&&(j=0|e),n[t]=j,o(t="ROUNDING_MODE")&&U(e,0,8,2,t)&&(N=0|e),n[t]=N,o(t="EXPONENTIAL_AT")&&(k(e)?U(e[0],-g,0,2,t)&&U(e[1],0,g,2,t)&&(L=0|e[0],F=0|e[1]):U(e,-g,g,2,t)&&(L=-(F=0|(e<0?-e:e)))),n[t]=[L,F],o(t="RANGE")&&(k(e)?U(e[0],-g,-1,2,t)&&U(e[1],1,g,2,t)&&(z=0|e[0],H=0|e[1]):U(e,-g,g,2,t)&&(0|e?z=-(H=0|(e<0?-e:e)):D&&$(2,t+" cannot be zero",e))),n[t]=[z,H],o(t="ERRORS")&&(e===!!e||1===e||0===e?(R=0,U=(D=!!e)?Q:S):D&&$(2,t+u,e)),n[t]=D,o(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?q=!0:D?$(2,"crypto unavailable",e?void 0:crypto):q=!1:q=!1:D&&$(2,t+u,e)),n[t]=q,o(t="MODULO_MODE")&&U(e,0,9,2,t)&&(Y=0|e),n[t]=Y,o(t="POW_PRECISION")&&U(e,0,g,2,t)&&(K=0|e),n[t]=K,o(t="FORMAT")&&("object"==typeof e?V=e:D&&$(2,t+" not an object",e)),n[t]=V,n},W.max=function(){return G(arguments,C.lt)},W.min=function(){return G(arguments,C.gt)},W.random=(i=9007199254740992*Math.random()&2097151?function(){return f(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,a,o,u=0,c=[],l=new W(B);if(e=null!=e&&U(e,0,g,14)?0|e:j,a=s(e/p),q)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[u]=r[0],t[u+1]=r[1]):(c.push(o%1e14),u+=2);u=a/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(a*=7);u=9e15?crypto.randomBytes(7).copy(t,u):(c.push(o%1e14),u+=7);u=a/7}else q=!1,D&&$(14,"crypto unavailable",crypto);if(!q)for(;u=10;o/=10,u++);un?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,c,l,d,b,v,m,g,w,_,S,k,x,A,M,E,T,I=n.s==i.s?1:-1,P=n.c,O=i.c;if(!(P&&P[0]&&O&&O[0]))return new W(n.s&&i.s&&(P?!O||P[0]!=O[0]:O)?P&&0==P[0]||!O?0*I:I/0:NaN);for(w=(g=new W(I)).c=[],I=a+(c=n.e-i.e)+1,s||(s=h,c=y(n.e/p)-y(i.e/p),I=I/p|0),l=0;O[l]==(P[l]||0);l++);if(O[l]>(P[l]||0)&&c--,I<0)w.push(1),d=!0;else{for(A=P.length,E=O.length,l=0,I+=2,(b=f(s/(O[0]+1)))>1&&(O=e(O,b,s),P=e(P,b,s),E=O.length,A=P.length),x=E,S=(_=P.slice(0,E)).length;S=s/2&&M++;do{if(b=0,(u=t(O,_,E,S))<0){if(k=_[0],E!=S&&(k=k*s+(_[1]||0)),(b=f(k/M))>1)for(b>=s&&(b=s-1),m=(v=e(O,b,s)).length,S=_.length;1==t(v,_,m,S);)b--,r(v,E=10;I/=10,l++);ee(g,a+(g.e=l+c*p-1)+1,o,d)}else g.e=c,g.r=+d;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,I=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var i,o=r?t:t.replace(O,"");if(P.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(T,"$1").replace(I,"0.$1")),t!=o))return new W(o,i);D&&$(R,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,R=0},C.absoluteValue=C.abs=function(){var e=new W(this);return e.s<0&&(e.s=1),e},C.ceil=function(){return ee(new W(this),this.e+1,2)},C.comparedTo=C.cmp=function(e,t){return R=1,_(this,new W(e,t))},C.decimalPlaces=C.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-y(this.e/p))*p,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},C.dividedBy=C.div=function(e,t){return R=3,r(this,new W(e,t),j,N)},C.dividedToIntegerBy=C.divToInt=function(e,t){return R=4,r(this,new W(e,t),0,1)},C.equals=C.eq=function(e,t){return R=5,0===_(this,new W(e,t))},C.floor=function(){return ee(new W(this),this.e+1,3)},C.greaterThan=C.gt=function(e,t){return R=6,_(this,new W(e,t))>0},C.greaterThanOrEqualTo=C.gte=function(e,t){return R=7,1===(t=_(this,new W(e,t)))||0===t},C.isFinite=function(){return!!this.c},C.isInteger=C.isInt=function(){return!!this.c&&y(this.e/p)>this.c.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.lessThan=C.lt=function(e,t){return R=8,_(this,new W(e,t))<0},C.lessThanOrEqualTo=C.lte=function(e,t){return R=9,-1===(t=_(this,new W(e,t)))||0===t},C.minus=C.sub=function(e,t){var r,n,i,a,o=this,s=o.s;if(R=10,t=(e=new W(e,t)).s,!s||!t)return new W(NaN);if(s!=t)return e.s=-t,o.plus(e);var f=o.e/p,u=e.e/p,c=o.c,l=e.c;if(!f||!u){if(!c||!l)return c?(e.s=-t,e):new W(l?o:NaN);if(!c[0]||!l[0])return l[0]?(e.s=-t,e):new W(c[0]?o:3==N?-0:0)}if(f=y(f),u=y(u),c=c.slice(),s=f-u){for((a=s<0)?(s=-s,i=c):(u=f,i=l),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=c.length)<(t=l.length))?s:t,s=t=0;t0)for(;t--;c[r++]=0);for(t=h-1;n>s;){if(c[--n]0?(o=a,r=f):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=f.length)<0&&(r=f,f=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+f[t]+i)/h|0,s[t]=h===s[t]?0:s[t]%h;return i&&(s=[i].concat(s),++o),J(e,s,o)},C.precision=C.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(D&&$(13,"argument"+u,e),e!=!!e&&(e=null)),!i)return null;if(t=(r=i.length-1)*p+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},C.round=function(e,t){var r=new W(this);return(null==e||U(e,0,g,15))&&ee(r,~~e+this.e+1,null!=t&&U(t,0,8,15,c)?0|t:N),r},C.shift=function(e){var t=this;return U(e,-b,b,16,"argument")?t.times("1e"+E(e)):new W(t.c&&t.c[0]&&(e<-b||e>b)?t.s*(e<0?0:1/0):t)},C.squareRoot=C.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,f=o.s,u=o.e,c=j+4,l=new W("0.5");if(1!==f||!s||!s[0])return new W(!f||f<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(f=Math.sqrt(+o))||f==1/0?(((t=w(s)).length+u)%2==0&&(t+="0"),f=Math.sqrt(t),u=y((u+1)/2)-(u<0||u%2),n=new W(t=f==1/0?"1e"+u:(t=f.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new W(f+""),n.c[0])for((f=(u=n.e)+c)<3&&(f=0);;)if(a=n,n=l.times(a.plus(r(o,a,c,1))),w(a.c).slice(0,f)===(t=w(n.c)).slice(0,f)){if(n.e=0;){for(r=0,d=k[i]%w,b=k[i]/w|0,a=i+(o=f);a>i;)r=((u=d*(u=S[--o]%w)+(s=b*u+(c=S[o]/w|0)*d)%w*w+v[a]+r)/g|0)+(s/w|0)+b*c,v[a--]=u%g;v[a]=r}return r?++n:v.splice(0,1),J(e,v,n)},C.toDigits=function(e,t){var r=new W(this);return e=null!=e&&U(e,1,g,18,"precision")?0|e:null,t=null!=t&&U(t,0,8,18,c)?0|t:N,e?ee(r,e,t):r},C.toExponential=function(e,t){return Z(this,null!=e&&U(e,0,g,19)?1+~~e:null,t,19)},C.toFixed=function(e,t){return Z(this,null!=e&&U(e,0,g,20)?~~e+this.e+1:null,t,20)},C.toFormat=function(e,t){var r=Z(this,null!=e&&U(e,0,g,21)?~~e+this.e+1:null,t,21);if(this.c){var n,i=r.split("."),a=+V.groupSize,o=+V.secondaryGroupSize,s=V.groupSeparator,f=i[0],u=i[1],c=this.s<0,l=c?f.slice(1):f,d=l.length;if(o&&(n=a,a=o,o=n,d-=n),a>0&&d>0){for(n=d%a||a,f=l.substr(0,n);n0&&(f+=s+l.slice(n)),c&&(f="-"+f)}r=u?f+V.decimalSeparator+((o=+V.fractionGroupSize)?u.replace(new RegExp("\\d{"+o+"}\\B","g"),"$&"+V.fractionGroupSeparator):u):f}return r},C.toFraction=function(e){var t,n,i,a,o,s,f,u,c,l=D,d=this,h=d.c,b=new W(B),m=n=new W(B),g=f=new W(B);if(null!=e&&(D=!1,s=new W(e),D=l,(l=s.isInt())&&!s.lt(B)||(D&&$(22,"max denominator "+(l?"out of range":"not an integer"),e),e=!l&&s.c&&ee(s,s.e+1,1).gte(B)?s:null)),!h)return d.toString();for(c=w(h),a=b.e=c.length-d.e-1,b.c[0]=v[(o=a%p)<0?p+o:o],e=!e||s.cmp(b)>0?a>0?b:m:s,o=H,H=1/0,s=new W(c),f.c[0]=0;u=r(s,b,0,1),1!=(i=n.plus(u.times(g))).cmp(e);)n=g,g=i,m=f.plus(u.times(i=m)),f=i,b=s.minus(u.times(i=b)),s=i;return i=r(e.minus(n),g,0,1),f=f.plus(i.times(m)),n=n.plus(i.times(g)),f.s=m.s=d.s,t=r(m,g,a*=2,N).minus(d).abs().cmp(r(f,n,a,N).minus(d).abs())<1?[m.toString(),g.toString()]:[f.toString(),n.toString()],H=o,t},C.toNumber=function(){return+this},C.toPower=C.pow=function(e,t){var r,n,i,a=f(e<0?-e:+e),o=this;if(null!=t&&(R=23,t=new W(t)),!U(e,-b,b,23,"exponent")&&(!isFinite(e)||a>b&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+o,e),new W(t?r%t:r);for(t?e>1&&o.gt(B)&&o.isInt()&&t.gt(B)&&t.isInt()?o=o.mod(t):(i=t,t=null):K&&(r=s(K/p+2)),n=new W(B);;){if(a%2){if(!(n=n.times(o)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(a=f(a/2)))break;o=o.times(o),r?o.c&&o.c.length>r&&(o.c.length=r):t&&(o=o.mod(t))}return t?n:(e<0&&(n=B.div(n)),i?n.mod(i):r?ee(n,K,N):n)},C.toPrecision=function(e,t){return Z(this,null!=e&&U(e,1,g,24,"precision")?0|e:null,t,24)},C.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=w(r.c),t=null!=e&&U(e,2,64,25,"base")?X(M(t,i),0|e,10,n):i<=L||i>=F?A(t,i):M(t,i),n<0&&r.c[0]&&(t="-"+t)),t},C.truncated=C.trunc=function(){return ee(new W(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=w(t.c),e=r<=L||r>=F?A(e,r):M(e,r),t.s<0?"-"+e:e)},C.isBigNumber=!0,null!=t&&W.config(t),W}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n;e.exports=(n=r(6), +var n=r(166),i=r(165),a=r(75);function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(f.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(n)return H(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var a,o=1,s=e.length,f=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,f/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-f),a=r;a>=0;a--){for(var l=!0,h=0;hi&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function x(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[i+1]))&&(f=(31&u)<<6|63&a)>127&&(c=f);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(f=(15&u)<<12|(63&a)<<6|63&o)>2047&&(f<55296||f>57343)&&(c=f);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(f=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&f<1114112&&(c=f)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(e){var t=e.length;if(t<=M)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return E(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},f.prototype.compare=function(e,t,r,n,i){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,s=Math.min(a,o),u=this.slice(n,i),c=e.slice(t,r),l=0;li)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function E(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,a){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function j(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,a){return a||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,a){return a||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}f.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},f.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},f.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),f.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):C(this,e,t,!0),t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):C(this,e,t,!1),t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),f.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},f.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function U(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(15))},function(e,t,r){"use strict";var n=r(80),i=r(183),a=Object.prototype.toString;function o(e){return"[object Array]"===a.call(e)}function s(e){return null!==e&&"object"==typeof e}function f(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),o(e))for(var r=0,n=e.length;r1)for(var r=1;r>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(n=0;n>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var f=0,u=t;return f+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,f,u){var c=0,l=t;return c+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,f,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(140).Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function f(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,f=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,l=67108863&f,h=Math.min(u,t.length-1),d=Math.max(0,u-e.length+1);d<=h;d++){var p=u-d|0;c+=(o=(i=0|e.words[p])*(a=0|t.words[d])+l)/67108864|0,l=67108863&o}r.words[u]=0|l,f=0|c}return 0!==f?r.words[u]=0|f:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=c[e],d=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?b+r:u[h-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,f="le"===t,u=new e(a),c=this.clone();if(f){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,d=0|o[1],p=8191&d,b=d>>>13,v=0|o[2],m=8191&v,g=v>>>13,y=0|o[3],w=8191&y,_=y>>>13,S=0|o[4],k=8191&S,x=S>>>13,A=0|o[5],M=8191&A,E=A>>>13,T=0|o[6],I=8191&T,P=T>>>13,O=0|o[7],R=8191&O,C=O>>>13,B=0|o[8],j=8191&B,N=B>>>13,L=0|o[9],F=8191&L,z=L>>>13,H=0|s[0],U=8191&H,D=H>>>13,q=0|s[1],K=8191&q,Y=q>>>13,V=0|s[2],W=8191&V,X=V>>>13,Z=0|s[3],G=8191&Z,Q=Z>>>13,$=0|s[4],J=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],fe=8191&se,ue=se>>>13,ce=0|s[8],le=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(u+(n=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,D))+Math.imul(h,U)|0))<<13)|0;u=((a=Math.imul(h,D))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,D))+Math.imul(b,U)|0,a=Math.imul(b,D);var me=(u+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,K)|0))<<13)|0;u=((a=a+Math.imul(h,Y)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,U),i=(i=Math.imul(m,D))+Math.imul(g,U)|0,a=Math.imul(g,D),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,Y)|0;var ge=(u+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,W)|0))<<13)|0;u=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,D))+Math.imul(_,U)|0,a=Math.imul(_,D),n=n+Math.imul(m,K)|0,i=(i=i+Math.imul(m,Y)|0)+Math.imul(g,K)|0,a=a+Math.imul(g,Y)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,W)|0,a=a+Math.imul(b,X)|0;var ye=(u+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,G)|0))<<13)|0;u=((a=a+Math.imul(h,Q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,D))+Math.imul(x,U)|0,a=Math.imul(x,D),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,K)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(m,W)|0,i=(i=i+Math.imul(m,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,G)|0,a=a+Math.imul(b,Q)|0;var we=(u+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,J)|0))<<13)|0;u=((a=a+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,D))+Math.imul(E,U)|0,a=Math.imul(E,D),n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,Y)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(m,G)|0,i=(i=i+Math.imul(m,Q)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,Q)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,ee)|0;var _e=(u+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(h,re)|0))<<13)|0;u=((a=a+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,D))+Math.imul(P,U)|0,a=Math.imul(P,D),n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,Y)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(x,W)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,Q)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0;var Se=(u+(n=n+Math.imul(l,ae)|0)|0)+((8191&(i=(i=i+Math.imul(l,oe)|0)+Math.imul(h,ae)|0))<<13)|0;u=((a=a+Math.imul(h,oe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,D))+Math.imul(C,U)|0,a=Math.imul(C,D),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(P,K)|0,a=a+Math.imul(P,Y)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,W)|0,a=a+Math.imul(E,X)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,G)|0,a=a+Math.imul(x,Q)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(m,re)|0,i=(i=i+Math.imul(m,ne)|0)+Math.imul(g,re)|0,a=a+Math.imul(g,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0;var ke=(u+(n=n+Math.imul(l,fe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(h,fe)|0))<<13)|0;u=((a=a+Math.imul(h,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,D))+Math.imul(N,U)|0,a=Math.imul(N,D),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,Y)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(P,W)|0,a=a+Math.imul(P,X)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(E,G)|0,a=a+Math.imul(E,Q)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(m,ae)|0,i=(i=i+Math.imul(m,oe)|0)+Math.imul(g,ae)|0,a=a+Math.imul(g,oe)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,fe)|0,a=a+Math.imul(b,ue)|0;var xe=(u+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;u=((a=a+Math.imul(h,he)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,D))+Math.imul(z,U)|0,a=Math.imul(z,D),n=n+Math.imul(j,K)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(N,K)|0,a=a+Math.imul(N,Y)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,X)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,G)|0,a=a+Math.imul(P,Q)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,ue)|0)+Math.imul(g,fe)|0,a=a+Math.imul(g,ue)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(b,le)|0,a=a+Math.imul(b,he)|0;var Ae=(u+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(h,pe)|0))<<13)|0;u=((a=a+Math.imul(h,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,K),i=(i=Math.imul(F,Y))+Math.imul(z,K)|0,a=Math.imul(z,Y),n=n+Math.imul(j,W)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(C,G)|0,a=a+Math.imul(C,Q)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,J)|0,a=a+Math.imul(P,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(E,re)|0,a=a+Math.imul(E,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,ue)|0,n=n+Math.imul(m,le)|0,i=(i=i+Math.imul(m,he)|0)+Math.imul(g,le)|0,a=a+Math.imul(g,he)|0;var Me=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((a=a+Math.imul(b,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,W),i=(i=Math.imul(F,X))+Math.imul(z,W)|0,a=Math.imul(z,X),n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,Q)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,a=a+Math.imul(P,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,oe)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(x,fe)|0,a=a+Math.imul(x,ue)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,le)|0,a=a+Math.imul(_,he)|0;var Ee=(u+(n=n+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,be)|0)+Math.imul(g,pe)|0))<<13)|0;u=((a=a+Math.imul(g,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,Q))+Math.imul(z,G)|0,a=Math.imul(z,Q),n=n+Math.imul(j,J)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(C,re)|0,a=a+Math.imul(C,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(P,ae)|0,a=a+Math.imul(P,oe)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,ue)|0)+Math.imul(E,fe)|0,a=a+Math.imul(E,ue)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(x,le)|0,a=a+Math.imul(x,he)|0;var Te=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((a=a+Math.imul(_,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,J),i=(i=Math.imul(F,ee))+Math.imul(z,J)|0,a=Math.imul(z,ee),n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(N,re)|0,a=a+Math.imul(N,ne)|0,n=n+Math.imul(R,ae)|0,i=(i=i+Math.imul(R,oe)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,oe)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(P,fe)|0,a=a+Math.imul(P,ue)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(E,le)|0,a=a+Math.imul(E,he)|0;var Ie=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(x,pe)|0))<<13)|0;u=((a=a+Math.imul(x,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,oe)|0)+Math.imul(N,ae)|0,a=a+Math.imul(N,oe)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,ue)|0)+Math.imul(C,fe)|0,a=a+Math.imul(C,ue)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(P,le)|0,a=a+Math.imul(P,he)|0;var Pe=(u+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,be)|0)+Math.imul(E,pe)|0))<<13)|0;u=((a=a+Math.imul(E,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(F,ae),i=(i=Math.imul(F,oe))+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(N,fe)|0,a=a+Math.imul(N,ue)|0,n=n+Math.imul(R,le)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(C,le)|0,a=a+Math.imul(C,he)|0;var Oe=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(P,pe)|0))<<13)|0;u=((a=a+Math.imul(P,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,fe),i=(i=Math.imul(F,ue))+Math.imul(z,fe)|0,a=Math.imul(z,ue),n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,he)|0)+Math.imul(N,le)|0,a=a+Math.imul(N,he)|0;var Re=(u+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(C,pe)|0))<<13)|0;u=((a=a+Math.imul(C,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,he))+Math.imul(z,le)|0,a=Math.imul(z,he);var Ce=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(N,pe)|0))<<13)|0;u=((a=a+Math.imul(N,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Be=(u+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,be))+Math.imul(z,pe)|0))<<13)|0;return u=((a=Math.imul(z,be))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,f[0]=ve,f[1]=me,f[2]=ge,f[3]=ye,f[4]=we,f[5]=_e,f[6]=Se,f[7]=ke,f[8]=xe,f[9]=Ae,f[10]=Me,f[11]=Ee,f[12]=Te,f[13]=Ie,f[14]=Pe,f[15]=Oe,f[16]=Re,f[17]=Ce,f[18]=Be,0!==u&&(f[19]=u,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(d=h),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var l=0|this.words[u];this.words[u]=c<<26-a|l>>>a,c=l&s}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new a(null)).length=f+1,s.words=new Array(s.length);for(var u=0;u=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),f=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),l=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(l)),i.iushrn(1),o.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(c),f.isub(l)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(f)):(r.isub(t),s.isub(i),f.isub(o))}return{a:s,b:f,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(g,m),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),f=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(f);)c.redIAdd(f);for(var l=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;0!==d.cmp(s);){for(var b=d,v=0;0!==b.cmp(s);v++)b=b.redSqr();n(v=0;n--){for(var u=t.words[n],c=f-1;c>=0;c--){var l=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==o?(o<<=1,o|=l,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}f=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,S),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)}).call(this,r(65)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Account:!0,Balance:!0,Wallet:!0,Claims:!0,AssetBalance:!0,Coin:!0,ClaimItem:!0};Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"Balance",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Claims",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"AssetBalance",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Coin",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ClaimItem",{enumerable:!0,get:function(){return p.ClaimItem}}),t.default=void 0;var i=v(r(26));Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))});var a=v(r(32));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=v(r(58));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=v(r(94));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=b(r(30)),u=b(r(93)),c=b(r(85)),l=b(r(84)),h=b(r(55)),d=b(r(54)),p=r(45);function b(e){return e&&e.__esModule?e:{default:e}}function v(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var m={create:{account:function(e){return new f.default(e)},privateKey:i.generatePrivateKey,signature:i.generateSignature,wallet:function(e){return new c.default(e)}},is:{address:a.isAddress,publicKey:a.isPublicKey,encryptedKey:a.isNEP2,privateKey:a.isPrivateKey,wif:a.isWIF,scriptHash:a.isScriptHash},encrypt:{privateKey:o.encrypt},decrypt:{privateKey:o.decrypt},get:{privateKeyFromWIF:i.getPrivateKeyFromWIF,WIFFromPrivateKey:i.getWIFFromPrivateKey,publicKeyFromPrivateKey:i.getPublicKeyFromPrivateKey,scriptHashFromPublicKey:i.getScriptHashFromPublicKey,addressFromScriptHash:i.getAddressFromScriptHash,scriptHashFromAddress:i.getScriptHashFromAddress},sign:{message:s.signMessage},verify:{message:s.verifyMessage}};t.default=m},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict";var n=r(25),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var a=r(22);a.inherits=r(1);var o=r(71),s=r(38);a.inherits(l,o);for(var f=i(s.prototype),u=0;u1&&void 0!==arguments[1]&&arguments[1]&&s[e.name])&&(s[e.name]=e,!0)};t.addNetwork=u;var c=function(e){return!!s[e]&&(delete s[e],!0)};t.removeNetwork=c;var l={add:{network:function(e,t){return u(e,t)}},remove:{network:function(e){return c(e)}}};t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={Transaction:!0,calculationStrategy:!0,TxAttrUsage:!0};Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"TxAttrUsage",{enumerable:!0,get:function(){return u.default}}),t.calculationStrategy=t.default=void 0;var i=l(r(92)),a=c(r(50));Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))});var o=c(r(23));Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))});var s=c(r(28));Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var f=c(r(48));t.calculationStrategy=f;var u=l(r(51));function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}function h(e,t,r){return(h="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&d(i,r.prototype),i}).apply(null,arguments)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p={create:{tx:function(){for(var e=arguments.length,t=new Array(e),r=0;r=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={RPCClient:!0,Query:!0,queryRPC:!0,Network:!0};Object.defineProperty(t,"RPCClient",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Query",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"queryRPC",{enumerable:!0,get:function(){return a.queryRPC}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(47)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(46)),o=f(r(49)),s=r(86);function f(e){return e&&e.__esModule?e:{default:e}}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var u={create:{rpcClient:function(e){return new i.default(e)},query:function(e){return new a.default(e)}}};t.default=u},function(e,t){},function(e,t,r){"use strict";var n=r(10),i=r(13);function a(){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}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a65535)throw new Error;var t=(0,n.num2hexstring)(e.usage);return 129===e.usage?t+=(0,n.num2hexstring)(e.data.length/2):(144===e.usage||e.usage>=240)&&(t+=(0,n.num2VarInt)(e.data.length/2)),2===e.usage||3===e.usage?t+=e.data.substr(2,64):t+=e.data,t};t.deserializeTransactionAttribute=function(e){var t={usage:parseInt(e.read(1),16)};if(0===t.usage||48===t.usage||t.usage>=161&&t.usage<=175)t.data=e.read(32);else if(2===t.usage||3===t.usage)t.data=(0,n.num2hexstring)(t.usage)+e.read(32);else if(32===t.usage)t.data=e.read(20);else if(129===t.usage)t.data=e.read(parseInt(e.read(1),16));else{if(!(144===t.usage||t.usage>=240))throw new Error;t.data=e.readVarBytes()}return t};t.serializeWitness=function(e){var t=(0,n.num2VarInt)(e.invocationScript.length/2),r=(0,n.num2VarInt)(e.verificationScript.length/2);return t+e.invocationScript+r+e.verificationScript};t.deserializeWitness=function(e){return{invocationScript:e.readVarBytes(),verificationScript:e.readVarBytes()}}},function(e,t,r){"use strict";var n=t;n.base=r(137),n.short=r(136),n.mont=r(135),n.edwards=r(134)},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(a=new Array(s-1),o=0;o1&&void 0!==arguments[1])||arguments[1],r=new i.ec("p256").keyFromPrivate(e,"hex").getPublic().encode("hex");return t?parseInt(r.substr(128,2),16)%2==1?"03"+r.substr(2,64):"02"+r.substr(2,64):r};var h=function(e){return"21"+e+"ac"};t.getVerificationScriptFromPublicKey=h;t.getScriptHashFromPublicKey=function(e){"04"===e.substring(0,2)&&(e=l(e));var t=h(e);return(0,o.reverseHex)((0,o.hash160)(t))};t.getAddressFromScriptHash=function(t){t=(0,o.reverseHex)(t);var r=(0,o.hash256)(s.ADDR_VERSION+t).substr(0,8);return a.default.encode(e.from(s.ADDR_VERSION+t+r,"hex"))};t.getScriptHashFromAddress=function(e){var t=(0,o.ab2hexstring)(a.default.decode(e));return(0,o.reverseHex)(t.substr(2,40))};t.generateSignature=function(t,r){var n=(0,o.sha256)(t),a=e.from(n,"hex"),s=new i.ec("p256").sign(a,r,null);return e.concat([s.r.toArrayLike(e,"be",32),s.s.toArrayLike(e,"be",32)]).toString("hex")};t.generatePrivateKey=function(){return(0,o.ab2hexstring)((0,f.default)(32))};t.generateRandomArray=function(e){return(0,f.default)(e)}}).call(this,r(7).Buffer)},function(e,t,r){e.exports=r(184)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExclusive=t.deserializeExclusive=t.serializeExclusive=void 0;var n=r(0),i=r(23),a={2:function(e){if(2!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.claims.length),r=!0,a=!1,o=void 0;try{for(var s,f=e.claims[Symbol.iterator]();!(r=(s=f.next()).done);r=!0){var u=s.value;t+=(0,i.serializeTransactionInput)(u)}}catch(e){a=!0,o=e}finally{try{r||null==f.return||f.return()}finally{if(a)throw o}}return t},128:function(e){if(128!==e.type)throw new Error;return""},209:function(e){if(209!==e.type)throw new Error;var t=(0,n.num2VarInt)(e.script.length/2);return t+=e.script,e.version>=1&&(t+=(0,n.num2fixed8)(e.gas)),t}};t.serializeExclusive=a;var o={2:function(e){for(var t={claims:[]},r=e.readVarInt(),n=0;n=1?(0,n.fixed82num)(e.read(8)):0}}};t.deserializeExclusive=o;var s={2:function(e){return Object.assign({claims:[]},{claims:e.claims})},128:function(e){return{}},209:function(e){return{script:e.script||"",gas:e.gas||0}}};t.getExclusive=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={OpCode:!0,ScriptBuilder:!0,ContractParam:!0};Object.defineProperty(t,"OpCode",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"ScriptBuilder",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ContractParam",{enumerable:!0,get:function(){return o.default}}),t.default=void 0;var i=f(r(53)),a=f(r(52)),o=f(r(91)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(90));function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t,r){return(u="undefined"!=typeof Reflect&&Reflect.construct?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&c(i,r.prototype),i}).apply(null,arguments)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))});var l={create:{contractParam:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0])return this.publicKey;var e=this.publicKey;return n.getPublicKeyUnencoded(e)}},{key:"encrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._encrypted=(0,a.encrypt)(this.privateKey,e,t),this}},{key:"decrypt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this._WIF=(0,a.decrypt)(this.encrypted,e,t),this._updateContractScript(),this}},{key:"export",value:function(){var e=null;if(this._privateKey&&!this._encrypted)throw new Error("Encrypt private key first!");return this._encrypted&&(e=this._encrypted),{address:this.address,label:this.label,isDefault:this.isDefault,lock:this.lock,key:e,contract:this.contract,extra:this.extra}}},{key:Symbol.toStringTag,get:function(){return"Account"}},{key:"encrypted",get:function(){if(this._encrypted)return this._encrypted;throw new Error("No encrypted key found")}},{key:"WIF",get:function(){return this._WIF?this._WIF:(this._WIF=n.getWIFFromPrivateKey(this._privateKey),this._WIF)}},{key:"privateKey",get:function(){if(this._privateKey)return this._privateKey;if(this._WIF)return this._privateKey=n.getPrivateKeyFromWIF(this._WIF),this._privateKey;throw this._encrypted?new ReferenceError("Private Key encrypted!"):new ReferenceError("No Private Key provided!")}},{key:"publicKey",get:function(){return this._publicKey?this._publicKey:(this._publicKey=n.getPublicKeyFromPrivateKey(this.privateKey),this._publicKey)}},{key:"scriptHash",get:function(){return this._scriptHash?this._scriptHash:this._address?(this._scriptHash=n.getScriptHashFromAddress(this.address),this._scriptHash):(this._scriptHash=n.getScriptHashFromPublicKey(this.publicKey),this._scriptHash)}},{key:"address",get:function(){return this._address?this._address:(this._address=n.getAddressFromScriptHash(this.scriptHash),this._address)}}])&&c(t.prototype,r),f&&c(t,f),e}();t.default=h},function(e,t,r){var n;e.exports=(n=r(5),r(57),void(n.lib.Cipher||function(e){var t=n,r=t.lib,i=r.Base,a=r.WordArray,o=r.BufferedBlockAlgorithm,s=t.enc,f=(s.Utf8,s.Base64),u=t.algo,c=u.EvpKDF,l=r.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:w}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),h=(r.StreamCipher=l.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),d=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=h.CBC=function(){var t=d.extend();function r(t,r,n){var i=this._iv;if(i){var a=i;this._iv=e}else var a=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},m=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:v}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{var n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),g=t.format={},y=g.OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=a.create([1398893684,1701076831]).concat(r).concat(t);else var n=t;return n.toString(f)},parse:function(e){var t=f.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=a.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return m.create({ciphertext:t,salt:n})}},w=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=e.createDecryptor(r,n).finalize(t.ciphertext);return i},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=t.kdf={},S=_.OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=c.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},k=r.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=w.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);n.iv=i.iv;var a=w.decrypt.call(this,e,t,i.key,n);return a}})}()))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAddress=t.isScriptHash=t.isPublicKey=t.isPrivateKey=t.isWIF=t.isNEP2=void 0;var n,i=(n=r(35))&&n.__esModule?n:{default:n},a=r(0),o=r(26);t.isNEP2=function(e){try{if(58!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return!!t&&86===t.length&&"01"===t.substr(0,2)&&"42"===t.substr(2,2)&&"e0"===t.substr(4,2)}catch(e){return!1}};t.isWIF=function(e){try{if(52!==e.length)return!1;var t=(0,a.ab2hexstring)(i.default.decode(e));return(0,a.hash256)(t.substr(0,t.length-8)).substr(0,8)===t.substr(t.length-8,8)}catch(e){return!1}};t.isPrivateKey=function(e){return/^[0-9A-Fa-f]{64}$/.test(e)};t.isPublicKey=function(e,t){try{var r;switch(e.substr(0,2)){case"04":if(!0===t)return!1;r=(0,o.getPublicKeyEncoded)(e);break;case"02":case"03":if(!1===t)return!1;r=e;break;default:return!1}var n=(0,o.getPublicKeyUnencoded)(r),i=parseInt(n.substr(n.length-2,2),16);if("02"===r.substr(0,2)&&i%2==0)return!0;if("03"===r.substr(0,2)&&i%2==1)return!0}catch(e){}return!1};t.isScriptHash=function(e){return(0,a.isHex)(e)&&40===e.length};t.isAddress=function(e){try{var t=(0,a.ab2hexstring)(i.default.decode(e));if((0,a.hash256)(t.slice(0,42)).substr(0,8)!==t.substr(42,8))return!1;var r=(0,a.reverseHex)(t.slice(2,42));return(0,o.getAddressFromScriptHash)(r)===e}catch(e){return!1}}},function(e,t,r){(function(e,n){var i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),f=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),c(n,e,n.depth)}function f(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function u(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=c(e,i,n)),i}var a=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(t))return e.stylize("null","null")}(e,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),S(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(k(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(y(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var u,w="",x=!1,A=["{","}"];(d(r)&&(x=!0,A=["[","]"]),k(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),S(r)&&(w=" "+l(r)),0!==o.length||x&&0!=r.length?n<0?y(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=x?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,a){var o,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),E(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=b(r)?c(e,f.value,null):c(e,f.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),g(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function v(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===x(e)}function S(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function k(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(g(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=y,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(116);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(115),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,r(15),r(9))},function(e,t,r){var n=t;n.utils=r(10),n.common=r(21),n.sha=r(132),n.ripemd=r(128),n.hmac=r(127),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){var n=r(143);e.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(e,t,r){"use strict";var n=r(4).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=f,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=l,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function f(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(158),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(15))},function(e,t,r){"use strict";(function(t,n,i){var a=r(25);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,f=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:a.nextTick;g.WritableState=m;var u=r(22);u.inherits=r(1);var c={deprecate:r(157)},l=r(70),h=r(4).Buffer,d=i.Uint8Array||function(){};var p,b=r(69);function v(){}function m(e,t){s=s||r(14),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(a.nextTick(i,n),a.nextTick(x,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),x(e,t))}(e,r,n,t,i);else{var o=S(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?f(w,e,r,o,i):w(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(e){if(s=s||r(14),!(p.call(g,this)||this instanceof s))return new g(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function y(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,y(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback;if(y(e,t,!1,t.objectMode?1:u.length,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),x(e,t)})}function x(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,a.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=v),i.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),a.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),a.nextTick(n,o),i=!1),i}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?a.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=b.destroy,g.prototype._undestroy=b.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(9),r(37).setImmediate,r(15))},function(e,t,r){(t=e.exports=r(71)).Stream=t,t.Readable=t,t.Writable=r(38),t.Duplex=r(14),t.Transform=r(68),t.PassThrough=r(156)},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,f,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(a(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),o=(u=r.slice()).length,f=0;f0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},r.prototype.removeListener=function(e,t){var r,a,o,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,a=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(a<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";(function(t){var n=r(8),i=r(181),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,f={adapter:("undefined"!=typeof XMLHttpRequest?s=r(79):void 0!==t&&(s=r(79)),s),transformRequest:[function(e,t){return i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};f.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){f.headers[e]={}}),n.forEach(["post","put","patch"],function(e){f.headers[e]=n.merge(a)}),e.exports=f}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doSendAsset=t.doMintTokens=t.doClaimAllGas=t.getWalletDBHeight=t.getTransactionHistory=t.getRPCEndpoint=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(17),o=r(19),s=r(3),f=r(0),u=r(16);function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,c(r(2)).default)("api");t.name="neonDB";var h=null,d=function(e){return u.networks[e]?u.networks[e].extra.neonDB:e};t.getAPIEndpoint=d;var p=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/balance/"+t).then(function(r){var n=new i.Balance({net:e,address:r.data.address});return Object.keys(r.data).map(function(e){"net"!==e&&"address"!==e&&n.addAsset(e,r.data[e])}),l.info("Retrieved Balance for ".concat(t," from neonDB ").concat(e)),n})};t.getBalance=p;var b=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){var n=r.data;return n.claims=n.claims.map(function(e){return{claim:new f.Fixed8(e.claim).div(1e8),index:e.index,txid:e.txid,start:new f.Fixed8(e.start),end:new f.Fixed8(e.end),value:e.value}}),l.info("Retrieved Claims for ".concat(t," from neonDB ").concat(e)),new i.Claims(n)})};t.getClaims=b;t.getMaxClaimAmount=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/claims/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neonDB ").concat(e)),new f.Fixed8(r.data.total_claim+r.data.total_unspent_claim).div(1e8)})};var v=function e(t){var r=d(t);return n.default.get(r+"/v2/network/nodes").then(function(r){var n=r.data.nodes.filter(function(e){return e.status}),i=0,a=[],s=!0,f=!1,c=void 0;try{for(var l,d=n[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var p=l.value;u.httpsOnly&&!p.url.includes("https://")||(p.block_height>i?(i=p.block_height,a=[p]):p.block_height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{s||null==d.return||d.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(h))return new o.RPCClient(h).ping().then(function(r){return r<=u.timeout.ping?h:(h=null,e(t))});var v=b.map(function(e){return new o.RPCClient(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return h=e,e})};t.getRPCEndpoint=v;t.getTransactionHistory=function(e,t){var r=d(e);return n.default.get(r+"/v2/address/history/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neonDB ").concat(e)),r.data.history.map(function(e){return{change:{NEO:new f.Fixed8(e.NEO||0),GAS:new f.Fixed8(e.GAS||0)},blockHeight:new f.Fixed8(e.block_index),txid:e.txid}})})};t.getWalletDBHeight=function(e){var t=d(e);return n.default.get(t+"/v2/block/height").then(function(e){return parseInt(e.data.block_height)})};t.doClaimAllGas=function(e,t,r){l.warn("doClaimAllGas will be deprecated in favor of claimGas");var n,s,f=new i.Account(t),u=v(e),c=b(e,f.address);return Promise.all([u,c]).then(function(e){s=e[0];var t=e[1];if(0===t.length)throw new Error("No claimable gas!");var n=a.Transaction.createClaimTx(f.publicKey,t);return r?r(n,f.publicKey):n.sign(f.privateKey)}).then(function(e){return n=e,o.Query.sendRawTransaction(n).execute(s)}).then(function(e){return!0===e.result?e.txid=n:l.error("Transaction failed: ".concat(n.serialize())),e})};t.doMintTokens=function(e,t,r,n,u,c){l.warn("doMintTokens will be deprecated in favor of doInvoke");var h,d,b=new i.Account(r),m=[{assetId:s.ASSET_ID.NEO,value:n,scriptHash:t}],g={operation:"mintTokens",scriptHash:t,args:[]},y=v(e),w=p(e,b.address);return Promise.all([y,w]).then(function(e){d=e[0];var r=e[1],n=[{data:(0,f.reverseHex)(t),usage:a.TxAttrUsage.Script}],i=a.Transaction.createInvocationTx(r,m,g,u,{attributes:n});return c?c(i,b.publicKey):i.sign(b.privateKey)}).then(function(e){return h=e,o.Query.getContractState(t).execute(d)}).then(function(e){var t={invocationScript:"0000",verificationScript:e.result.script};return h.scripts.unshift(t),o.Query.sendRawTransaction(h).execute(d)}).then(function(e){return!0===e.result?e.txid=h.hash:l.error("Transaction failed: ".concat(h.serialize())),e})};t.doSendAsset=function(e,t,r,n,f){l.warn("doSendAsset will be deprecated in favor of sendAsset");var u,c,h=new i.Account(r),d=new i.Account(t),b=v(e),m=p(e,h.address),g=Object.keys(n).map(function(e){return{assetId:s.ASSET_ID[e],value:n[e],scriptHash:d.scriptHash}});return Promise.all([b,m]).then(function(e){c=e[0];var t=e[1],r=a.Transaction.createContractTx(t,g);return f?f(r,h.publicKey):r.sign(h.privateKey)}).then(function(e){return u=e,o.Query.sendRawTransaction(u).execute(c)}).then(function(e){return!0===e.result?e.txid=u.hash:l.error("Transaction failed: ".concat(u.serialize())),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadBalance=t.setSwitchFreeze=t.setApiSwitch=void 0;var n,i=o(r(42)),a=o(r(44));function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}var s=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("api"),f=0,u=!1;t.setApiSwitch=function(e){e>=0&&e<=1&&(f=e)};t.setSwitchFreeze=function(e){u=!!e,s.info("core/setSwitchFreeze API switch is frozen: ".concat(u))};var c=function(){!u&&f>0&&(f-=.2,s.info("core API Switch increasing weight towards neoscan"))},l=function(){!u&&f<1&&(f+=.2,s.info("core API Switch increasing weight towards neonDB"))};t.loadBalance=function(e,t){return Math.random()>f?e(t,a).then(function(e){return c(),e}).catch(function(){return l(),e(t,i)}):e(t,i).then(function(e){return l(),e}).catch(function(){return c(),e(t,a)})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHistory=t.getWalletDBHeight=t.getMaxClaimAmount=t.getClaims=t.getBalance=t.getRPCEndpoint=t.getAPIEndpoint=t.name=void 0;var n=c(r(27)),i=r(12),a=r(3),o=r(0),s=r(16),f=c(r(2)),u=c(r(47));function c(e){return e&&e.__esModule?e:{default:e}}var l=(0,f.default)("api");t.name="neoscan";var h=null,d=function(e){return s.networks[e]?s.networks[e].extra.neoscan:e};t.getAPIEndpoint=d;t.getRPCEndpoint=function e(t){var r=d(t);return n.default.get(r+"/v1/get_all_nodes").then(function(r){var n=r.data,i=0,a=[],o=!0,f=!1,c=void 0;try{for(var l,d=n[Symbol.iterator]();!(o=(l=d.next()).done);o=!0){var p=l.value;s.httpsOnly&&!p.url.includes("https://")||(p.height>i?(i=p.height,a=[p]):p.height===i&&a.push(p))}}catch(e){f=!0,c=e}finally{try{o||null==d.return||d.return()}finally{if(f)throw c}}if(0===a.length)throw new Error("No eligible nodes found!");var b=a.map(function(e){return e.url});if(b.includes(h))return new u.default(h).ping().then(function(r){return r<=s.timeout.ping?h:(h=null,e(t))});var v=b.map(function(e){return new u.default(e)});return Promise.race(v.map(function(e){return e.ping().then(function(t){return e.net})}))}).then(function(e){return h=e,e})};t.getBalance=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_balance/"+t).then(function(r){if(r.data.address!==t&&null===r.data.balance)return new i.Balance({address:r.data.address});var n=new i.Balance({address:r.data.address,net:e});return r.data.balance.map(function(e){n.addAsset(e.asset,{balance:e.amount,unspent:p(e.unspent)})}),l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),n})};t.getClaims=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_claimable/"+t).then(function(r){if(r.address!==t&&null===r.data.claimable)return new i.Claims({address:r.data.address});var n=b(r.data.claimable);return l.info("Retrieved Balance for ".concat(t," from neoscan ").concat(e)),new i.Claims({net:e,address:r.data.address,claims:n})})};t.getMaxClaimAmount=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_unclaimed/"+t).then(function(r){return l.info("Retrieved maximum amount of gas claimable after spending all NEO for ".concat(t," from neoscan ").concat(e)),new o.Fixed8(r.data.unclaimed||0)})};var p=function(e){return e.map(function(e){return{index:e.n,txid:e.txid,value:e.value}})},b=function(e){return e.map(function(e){return{start:new o.Fixed8(e.start_height),end:new o.Fixed8(e.end_height),index:e.n,claim:new o.Fixed8(e.unclaimed),txid:e.txid,value:e.value}})};t.getWalletDBHeight=function(e){var t=d(e);return n.default.get(t+"/v1/get_height").then(function(e){return parseInt(e.data.height)})};t.getTransactionHistory=function(e,t){var r=d(e);return n.default.get(r+"/v1/get_address_neon/"+t).then(function(r){return l.info("Retrieved History for ".concat(t," from neoscan ").concat(e)),v(r.data.txids)})};var v=function(e){var t=[],r=e.length-1;return e.forEach(function(n,i){var s,f,u,c;if(i!==r){var l=e[i+1],h=m(n.balance),d=m(l.balance);s={NEO:new o.Fixed8(h.NEO||0).minus(d.NEO||0),GAS:new o.Fixed8(h.GAS||0).minus(d.GAS||0)}}else{var p=n.asset_moved===a.ASSET_ID.NEO?"NEO":"GAS";f={},u=p,c=new o.Fixed8(n.amount_moved),u in f?Object.defineProperty(f,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[u]=c,s=f}t.push({txid:n.txid,blockHeight:n.block_height,change:s})}),t},m=function(e){return e.reduce(function(e,t){return e[t.asset]=new o.Fixed8(t.amount),e},{})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exportClaimItem=t.ClaimItem=void 0;var n=r(0);t.ClaimItem=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{claim:e.claim?new n.Fixed8(e.claim):new n.Fixed8(0),txid:e.txid||"",index:e.index||0,value:e.value||0,start:e.start?new n.Fixed8(e.start):null,end:e.end?new n.Fixed8(e.end):null}};t.exportClaimItem=function(e){return{claim:e.claim.toNumber(),txid:e.txid,index:e.index,value:e.value,start:e.start?e.start.toNumber():null,end:e.end?e.end.toNumber():null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queryRPC=t.default=void 0;var n=f(r(27)),i=r(17),a=r(3),o=f(r(2)),s=r(16);function f(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};if(this.completed)throw new Error("This request has been sent");return d(e,this.req,r).then(function(e){if(t.res=e,t.completed=!0,e.error)throw new Error(e.error.message);return t.parse?(l.info("Query[".concat(t.req.method,"] successful")),t.parse(e)):e})}},{key:Symbol.toStringTag,get:function(){return"Query"}}],n=[{key:"getAccountState",value:function(t){return new e({method:"getaccountstate",params:[t]})}},{key:"getAssetState",value:function(t){return new e({method:"getassetstate",params:[t]})}},{key:"getBlock",value:function(t){return new e({method:"getblock",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getBlockHash",value:function(t){return new e({method:"getblockhash",params:[t]})}},{key:"getBestBlockHash",value:function(){return new e({method:"getbestblockhash"})}},{key:"getBlockCount",value:function(){return new e({method:"getblockcount"})}},{key:"getBlockSysFee",value:function(t){return new e({method:"getblocksysfee",params:[t]})}},{key:"getConnectionCount",value:function(){return new e({method:"getconnectioncount"})}},{key:"getContractState",value:function(t){return new e({method:"getcontractstate",params:[t]})}},{key:"getPeers",value:function(){return new e({method:"getpeers"})}},{key:"getRawMemPool",value:function(){return new e({method:"getrawmempool"})}},{key:"getRawTransaction",value:function(t){return new e({method:"getrawtransaction",params:[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1]})}},{key:"getStorage",value:function(t,r){return new e({method:"getstorage",params:[t,r]})}},{key:"getTxOut",value:function(t,r){return new e({method:"gettxout",params:[t,r]})}},{key:"getVersion",value:function(){return new e({method:"getversion"})}},{key:"invoke",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2?n-2:0),a=2;a2&&void 0!==arguments[2]?arguments[2]:{},i=n.default.create({headers:{"Content-Type":"application/json"},timeout:s.timeout.rpc}),o=Object.assign({},a.DEFAULT_REQ,t);return i.post(e,o,r).then(function(e){return e.data})};t.queryRPC=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(r(46)),i=r(12),a=u(r(87)),o=r(3),s=u(r(2)),f=r(16);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:o.RPC_VERSION;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t===o.NEO_NETWORK.MAIN?this.net=o.DEFAULT_RPC.MAIN:t===o.NEO_NETWORK.TEST?this.net=o.DEFAULT_RPC.TEST:this.net=t,this.history=[],this.lastSeenHeight=0,this._latencies=[],this.version="",!a.default.valid(r))throw new Error("Invalid Version: ".concat(r));this.version=a.default.clean(r)}var t,r,s;return t=e,(r=[{key:"ping",value:function(){var e=this,t=Date.now(),r=n.default.getBlockCount();return this.execute(r,{timeout:f.timeout.ping}).then(function(r){e.lastSeenHeight=r.result;var n=Date.now()-t;return e.latency=n,n}).catch(function(t){return e.latency=f.timeout.ping,f.timeout.ping})}},{key:"execute",value:function(e,t){return this.history.push(e),l.info("RPC: ".concat(this.net," executing Query[").concat(e.req.method,"]")),e.execute(this.net,t)}},{key:"query",value:function(e,t){var r=new n.default(e);return this.execute(r,t)}},{key:"getAccountState",value:function(e){if(!(0,i.isAddress)(e))throw new Error("Invalid address given: ".concat(e));return this.execute(n.default.getAccountState(e)).then(function(e){return e.result})}},{key:"getAssetState",value:function(e){return this.execute(n.default.getAssetState(e)).then(function(e){return e.result})}},{key:"getBlock",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getBlock(e,t)).then(function(e){return e.result})}},{key:"getBlockHash",value:function(e){return this.execute(n.default.getBlockHash(e)).then(function(e){return e.result})}},{key:"getBestBlockHash",value:function(){return this.execute(n.default.getBestBlockHash()).then(function(e){return e.result})}},{key:"getBlockCount",value:function(){return this.execute(n.default.getBlockCount()).then(function(e){return e.result})}},{key:"getBlockSysFee",value:function(e){return this.execute(n.default.getBlockSysFee(e)).then(function(e){return e.result})}},{key:"getConnectionCount",value:function(){return this.execute(n.default.getConnectionCount()).then(function(e){return e.result})}},{key:"getContractState",value:function(e){return this.execute(n.default.getContractState(e)).then(function(e){return e.result})}},{key:"getPeers",value:function(){return this.execute(n.default.getPeers()).then(function(e){return e.result})}},{key:"getRawMemPool",value:function(){return this.execute(n.default.getRawMemPool()).then(function(e){return e.result})}},{key:"getRawTransaction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.execute(n.default.getRawTransaction(e,t)).then(function(e){return e.result})}},{key:"getStorage",value:function(e,t){return this.execute(n.default.getStorage(e,t)).then(function(e){return e.result})}},{key:"getTxOut",value:function(e,t){return this.execute(n.default.getTxOut(e,t)).then(function(e){return e.result})}},{key:"getVersion",value:function(){var e=this;return this.execute(n.default.getVersion()).then(function(t){var r=t.result.useragent.match(h)[1];return e.version=a.default.clean(r),e.version}).catch(function(t){if(t.message.includes("Method not found"))return e.version=o.RPC_VERSION,e.version;throw t})}},{key:"invoke",value:function(e,t){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invoke(e,t)).then(function(e){return e.result})}},{key:"invokeFunction",value:function(e,t,r){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeFunction(e,t,r)).then(function(e){return e.result})}},{key:"invokeScript",value:function(e){return a.default.lt(this.version,"2.3.3")?Promise.reject(new Error("This method is not implemented for this version")):this.execute(n.default.invokeScript(e)).then(function(e){return e.result})}},{key:"sendRawTransaction",value:function(e){return this.execute(n.default.sendRawTransaction(e)).then(function(e){return e.result})}},{key:"submitBlock",value:function(e){return this.execute(n.default.submitBlock(e)).then(function(e){return e.result})}},{key:"validateAddress",value:function(e){return this.execute(n.default.validateAddress(e)).then(function(e){return e.result.isvalid})}},{key:Symbol.toStringTag,get:function(){return"RPC Client"}},{key:"latency",get:function(){return 0===this._latencies.length?99999:Math.floor(this._latencies.reduce(function(e,t){return e+t},0)/this._latencies.length)},set:function(e){this._latencies.length>4&&this._latencies.shift(),this._latencies.push(e)}}])&&c(t.prototype,r),s&&c(t,s),e}();t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.balancedApproach=t.biggestFirst=t.smallestFirst=void 0;var n=r(0);t.smallestFirst=function(e,t){return e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()}),i(t,e.unspent)};t.biggestFirst=function(e,t){return e.unspent.sort(function(e,t){return t.value.sub(e.value).toNumber()}),i(t,e.unspent)};t.balancedApproach=function(e,t){e.unspent.sort(function(e,t){return e.value.sub(t.value).toNumber()});var r=e.unspent.filter(function(e){return e.value.lte(t)});if(0===r.length)return[e.unspent[0]];var n=r.findIndex(function(e){return t.eq(e.value)});if(n>=0)return[r[n]];var a=e.unspent.slice(r.length),o=[];r.length>0&&o.push(r.pop());var s=t.minus(o.length>0?o[0].value:0),f=i(s,r.concat(a));return o.concat(f)};var i=function(e,t){for(var r=0,i=new n.Fixed8(0);i.lt(e);){if((r+=1)>t.length)throw new Error("Insufficient assets! Reached end of unspent coins! ".concat(t.length));i=i.add(t[r-1].value)}return t.slice(0,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(88)),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.Name||t.name||r||"RandomNet",r&&(this.name=r);var i=t.protocol||t.ProtocolConfiguration||{};this.protocol=new n.default(i),this.nodes=t.Nodes||t.nodes||[],this.extra=t.ExtraConfiguration||t.extra||{}}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new e("string"==typeof jsonString?JSON.parse(t):t,r)}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing Network file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"export",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?JSON.stringify({ProtocolConfiguration:this.protocol.export()}):{Name:this.name,ProtocolConfiguration:this.protocol.export(),ExtraConfiguration:this.extra,Nodes:this.nodes}}},{key:"writeFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.default.writeFile(e,this.export(t),function(e){if(e)throw e;return s.info("Network file written!"),!0})}},{key:"update",value:function(){return this}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionHash=t.signTransaction=t.deserializeTransaction=t.serializeTransaction=t.calculateInputs=void 0;var n,i=r(0),a=r(12),o=r(28),s=r(3),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(r(23)),u=r(16);var c=(0,((n=r(2))&&n.__esModule?n:{default:n}).default)("tx");t.calculateInputs=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;null===t&&(t=[]),null===n&&(n=u.defaultCalculationStrategy);var o=t.reduce(function(e,t){return e[t.assetId]?e[t.assetId]=e[t.assetId].add(t.value):e[t.assetId]=t.value,e},{});return(r=new i.Fixed8(r)).gt(0)&&(o[s.ASSET_ID.GAS]?o[s.ASSET_ID.GAS]=o[s.ASSET_ID.GAS].add(r):o[s.ASSET_ID.GAS]=r),Object.keys(o).map(function(t){var r=o[t],i=s.ASSETS[t];if(-1===e.assetSymbols.indexOf(i))throw new Error("This balance does not contain any ".concat(i,"!"));var f=e.assets[i];if(f.balance.lt(r))throw new Error("Insufficient ".concat(s.ASSETS[t],"! Need ").concat(r.toString()," but only found ").concat(f.balance.toString()));return l((0,a.AssetBalance)(f),r,t,e.address,n)}).reduce(function(e,t){return{inputs:e.inputs.concat(t.inputs),change:e.change.concat(t.change)}},{inputs:[],change:[]})};var l=function(e,t,r,n,o){var s=o(e,t),f=s.reduce(function(e,t){return e.add(t.value)},new i.Fixed8(0)),u=[];return f.gt(t)&&u.push({assetId:r,value:f.sub(t),scriptHash:(0,a.getScriptHashFromAddress)(n)}),{inputs:s.map(function(e){return{prevHash:e.txid,prevIndex:e.index}}),change:u}},h=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";r+=(0,i.num2hexstring)(e.type),r+=(0,i.num2hexstring)(e.version),r+=o.serializeExclusive[e.type](e),r+=(0,i.num2VarInt)(e.attributes.length);var n=!0,a=!1,s=void 0;try{for(var u,c=e.attributes[Symbol.iterator]();!(n=(u=c.next()).done);n=!0){var l=u.value;r+=f.serializeTransactionAttribute(l)}}catch(e){a=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw s}}r+=(0,i.num2VarInt)(e.inputs.length);var h=!0,d=!1,p=void 0;try{for(var b,v=e.inputs[Symbol.iterator]();!(h=(b=v.next()).done);h=!0){var m=b.value;r+=f.serializeTransactionInput(m)}}catch(e){d=!0,p=e}finally{try{h||null==v.return||v.return()}finally{if(d)throw p}}r+=(0,i.num2VarInt)(e.outputs.length);var g=!0,y=!1,w=void 0;try{for(var _,S=e.outputs[Symbol.iterator]();!(g=(_=S.next()).done);g=!0){var k=_.value;r+=f.serializeTransactionOutput(k)}}catch(e){y=!0,w=e}finally{try{g||null==S.return||S.return()}finally{if(y)throw w}}if(t&&e.scripts&&e.scripts.length>0){r+=(0,i.num2VarInt)(e.scripts.length);var x=!0,A=!1,M=void 0;try{for(var E,T=e.scripts[Symbol.iterator]();!(x=(E=T.next()).done);x=!0){var I=E.value;r+=f.serializeWitness(I)}}catch(e){A=!0,M=e}finally{try{x||null==T.return||T.return()}finally{if(A)throw M}}}return r};t.serializeTransaction=h;t.deserializeTransaction=function(e){var t=new i.StringStream(e),r={};r.type=parseInt(t.read(1),16),r.version=parseInt(t.read(1),16);var n=o.deserializeExclusive[r.type](t);r.attributes=[],r.inputs=[],r.outputs=[],r.scripts=[];for(var a=t.readVarInt(),s=0;s1&&void 0!==arguments[1]&&arguments[1];if((0,i.ensureHex)(e),40!==e.length)throw new Error("ScriptHash should be 20 bytes long!");return this.emit(t?a.default.TAILCALL:a.default.APPCALL,(0,i.reverseHex)(e))}},{key:"_emitArray",value:function(e){for(var t=e.length-1;t>=0;t--)this.emitPush(e[t]);return this.emitPush(e.length).emit(a.default.PACK)}},{key:"_emitString",value:function(e){(0,i.ensureHex)(e);var t=e.length/2;if(t<=a.default.PUSHBYTES75)this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<256)this.emit(a.default.PUSHDATA1),this.str+=(0,i.num2hexstring)(t),this.str+=e;else if(t<65536)this.emit(a.default.PUSHDATA2),this.str+=(0,i.num2hexstring)(t,2,!0),this.str+=e;else{if(!(t<4294967296))throw new Error("String too big to emit!");this.emit(a.default.PUSHDATA4),this.str+=(0,i.num2hexstring)(t,4,!0),this.str+=e}return this}},{key:"_emitNum",value:function(e){if(-1===e)return this.emit(a.default.PUSHM1);if(0===e)return this.emit(a.default.PUSH0);if(e>0&&e<=16)return this.emit(a.default.PUSH1-1+e);var t=(0,i.int2hex)(e);return this.emitPush((0,i.reverseHex)("0".repeat(16-t.length)+t))}},{key:"_emitParam",value:function(e){if(!e.type)throw new Error("No type available!");if(!h(e.value))throw new Error("Invalid value provided!");switch(e.type){case"String":return this._emitString((0,i.str2hexstring)(e.value));case"Boolean":return this.emit(e.value?a.default.PUSHT:a.default.PUSHF);case"Integer":return this._emitNum(e.value);case"ByteArray":return this._emitString(e.value);case"Array":return this._emitArray(e.value);case"Hash160":return this._emitString((0,i.reverseHex)(e.value))}}},{key:"emit",value:function(e,t){return this.str+=(0,i.num2hexstring)(e),t&&(this.str+=t),this}},{key:"emitAppCall",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.emitPush(r),t){for(var a="",o=0;o=81&&n<=96:t.args.unshift(n-80);break;case 193===n:for(var a=t.args.shift(),o=[],s=0;s0&&void 0!==arguments[0]?arguments[0]:{};return{index:e.index||0,txid:e.txid||"",value:e.value?new n.Fixed8(e.value):new n.Fixed8(0)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(0),a=(n=r(54))&&n.__esModule?n:{default:n};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.balance,r=e.unspent,n=e.spent,o=e.unconfirmed;return{balance:t?new i.Fixed8(t):new i.Fixed8(0),unspent:r?r.map(function(e){return(0,a.default)(e)}):[],spent:n?n.map(function(e){return(0,a.default)(e)}):[],unconfirmed:o?o.map(function(e){return(0,a.default)(e)}):[]}}},function(e,t,r){(function(t){function r(e){return"function"==typeof e?t("","utf8"):e instanceof t?e:new t("string"==typeof e?e:String(e||""),"utf8")}function n(e){return"number"!=typeof e?null:(e=Math.round(e))<1?null:e>256?null:e}e.exports=function(e,t,i,a){return{password:r(e),salt:r(t),options:function(e){return{maxmem:function(e){if("number"!=typeof e)return null;for(var t=4;t<=2048;t*=2){var r=1048576*t;if(r>e)return null;if(r==e)return r}return null}((e=null!==e&&"object"==typeof e?e:{}).maxmem)||33554432,cost:function(e){if("number"!=typeof e)return null;for(var t=8;t<=64;t++){var r=Math.pow(2,t);if(r>e)return null;if(r==e)return r}return null}(e.cost)||Math.pow(2,14),blockSize:n(e.blockSize)||8,parallel:n(e.parallel)||1,size:(t=e.size,("number"!=typeof t?null:(t=Math.round(t))<1?null:t>2048?null:t)||64)};var t}(i),callback:function(e){return"function"==typeof e?e:null}(arguments[arguments.length-1])}}}).call(this,r(7).Buffer)},function(e,t,r){var n,i,a,o,s,f,u,c;e.exports=(n=r(5),r(108),r(107),a=(i=n).lib,o=a.Base,s=a.WordArray,f=i.algo,u=f.MD5,c=f.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),i=s.create(),a=i.words,o=r.keySize,f=r.iterations;a.length2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by encryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=new h.default(t),u=(0,o.default)((0,o.default)(m.Latin1.parse(f.address))).toString().slice(0,8),l=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),b=l.slice(0,64),v=l.slice(64),_=(0,d.hexXor)(f.privateKey,b),S=s.default.encrypt(m.Hex.parse(_),m.Hex.parse(v),g),k=p.NEP_HEADER+p.NEP_FLAG+u+S.ciphertext.toString(),x=n.default.encode(e.from(k,"hex"));return y.info("Successfully encrypted key to ".concat(x)),x};t.encryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to encrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,b=u.r,v=u.p,_=new h.default(t),S=(0,o.default)((0,o.default)(m.Latin1.parse(_.address))).toString().slice(0,8);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(S,"hex"),c,b,v,64,function(t,r,i){if(null!=t)f(t);else if(i){var o=e.from(i).toString("hex"),u=o.slice(0,64),c=o.slice(64),l=(0,d.hexXor)(_.privateKey,u),h=s.default.encrypt(m.Hex.parse(l),m.Hex.parse(c),g),b=p.NEP_HEADER+p.NEP_FLAG+S+h.ciphertext.toString(),v=n.default.encode(e.from(b,"hex"));y.info("Successfully encrypted key to ".concat(v)),a(v)}})})};t.decrypt=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;y.warn("This method will be replaced by decryptAsync in the next major version bump");var a={cost:(i=w(i)).n,blockSize:i.r,parallel:i.p},f=(0,d.ab2hexstring)(n.default.decode(t)),u=f.substr(6,8),l=f.substr(-64),b=c.default.hashSync(e.from(r.normalize("NFC"),"utf8"),e.from(u,"hex"),a).toString("hex"),v=b.slice(0,64),_=b.slice(64),S={ciphertext:m.Hex.parse(l),salt:""},k=s.default.decrypt(S,m.Hex.parse(_),g),x=(0,d.hexXor)(k.toString(),v),A=new h.default(x);if(u!==(0,o.default)((0,o.default)(m.Latin1.parse(A.address))).toString().slice(0,8))throw new Error("Wrong Password!");return y.info("Successfully decrypted ".concat(t)),A.WIF};t.decryptAsync=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.DEFAULT_SCRYPT;return y.warn("This method will be renamed to decrypt in the next major version bump"),new Promise(function(a,f){var u=i=w(i),c=u.n,p=u.r,b=u.p,v=(0,d.ab2hexstring)(n.default.decode(t)),_=v.substr(6,8),S=v.substr(-64);(0,l.default)(e.from(r.normalize("NFC"),"utf8"),e.from(_,"hex"),c,p,b,64,function(r,n,i){if(null!=r)f(r);else if(i){var u=e.from(i).toString("hex"),c=u.slice(0,64),l=u.slice(64),p={ciphertext:m.Hex.parse(S),salt:""},b=s.default.decrypt(p,m.Hex.parse(l),g),v=(0,d.hexXor)(b.toString(),c),w=new h.default(v),k=(0,o.default)((0,o.default)(m.Latin1.parse(w.address))).toString().slice(0,8);_!==k&&f(new Error("Wrong Password or scrypt parameters!")),y.info("Successfully decrypted ".concat(t)),a(w.WIF)}})})};var w=function(e){var t=Object.assign({},p.DEFAULT_SCRYPT,e);return{n:t.n||t.cost,r:t.r||t.blockSize,p:t.p||t.parallel}}}).call(this,r(7).Buffer)},function(e,t,r){var n;e.exports=(n=r(5),function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[],f=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),f[i]=r(e.pow(n,1/3)),i++),n++}();var u=[],c=o.SHA256=a.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6],h=r[7],d=0;d<64;d++){if(d<16)u[d]=0|e[t+d];else{var p=u[d-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=u[d-2],m=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[d]=b+u[d-7]+m+u[d-16]}var g=n&i^n&a^i&a,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&l)+f[d]+u[d];h=l,l=c,c=s,s=o+w|0,o=a,a=i,i=n,n=w+(y+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+c|0,r[6]=r[6]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(c),t.HmacSHA256=a._createHmacHelper(c)}(Math),n.SHA256)},function(e,t,r){var n;e.exports=(n=r(5),n.enc.Hex)},function(e,t,r){"use strict";var n=r(10),i=r(21),a=r(13),o=n.rotr64_hi,s=n.rotr64_lo,f=n.shr64_hi,u=n.shr64_lo,c=n.sum64,l=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,v=n.sum64_5_lo,m=i.BlockHash,g=[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 y(){if(!(this instanceof y))return new y;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function S(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function k(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function x(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=o(e,t,1)^o(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=o(e,t,19)^o(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(y,m),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},function(e,t,r){"use strict";var n=t;function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r>8,o=255&i;a?r.push(a,o):r.push(o)}return r},n.zero2=i,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(160);function f(){this.init(),this._w=s,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}n(f,i),f.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},f.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,f=0|this._fh,g=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,x=0|this._el,A=0|this._fl,M=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var I=t[T-30],P=t[T-30+1],O=d(I,P),R=p(P,I),C=b(I=t[T-4],P=t[T-4+1]),B=v(P,I),j=t[T-14],N=t[T-14+1],L=t[T-32],F=t[T-32+1],z=R+N|0,H=O+j+m(z,R)|0;H=(H=H+C+m(z=z+B|0,B)|0)+L+m(z=z+F|0,F)|0,t[T]=H,t[T+1]=z}for(var U=0;U<160;U+=2){H=t[U],z=t[U+1];var D=c(r,n,i),q=c(w,_,S),K=l(r,w),Y=l(w,r),V=h(s,x),W=h(x,s),X=o[U],Z=o[U+1],G=u(s,f,g),Q=u(x,A,M),$=E+W|0,J=y+V+m($,E)|0;J=(J=(J=J+G+m($=$+Q|0,Q)|0)+X+m($=$+Z|0,Z)|0)+H+m($=$+z|0,z)|0;var ee=Y+q|0,te=K+D+m(ee,Y)|0;y=g,E=M,g=f,M=A,f=s,A=x,s=a+J+m(x=k+$|0,k)|0,a=i,k=S,i=n,S=_,n=r,_=w,r=J+te+m(w=$+ee|0,$)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+x|0,this._fl=this._fl+A|0,this._gl=this._gl+M|0,this._hl=this._hl+E|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+i+m(this._cl,S)|0,this._dh=this._dh+a+m(this._dl,k)|0,this._eh=this._eh+s+m(this._el,x)|0,this._fh=this._fh+f+m(this._fl,A)|0,this._gh=this._gh+g+m(this._gl,M)|0,this._hh=this._hh+y+m(this._hl,E)|0},f.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=f},function(e,t,r){var n=r(1),i=r(18),a=r(4).Buffer,o=[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],s=new Array(64);function f(){this.init(),this._w=s,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function l(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(f,i),f.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},f.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,s=0|this._d,f=0|this._e,p=0|this._f,b=0|this._g,v=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+d(r[m-15])+r[m-16];for(var g=0;g<64;++g){var y=v+h(f)+u(f,p,b)+o[g]+r[g]|0,w=l(n)+c(n,i,a)|0;v=b,b=p,p=f,f=s+y|0,s=a,a=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=f+this._e|0,this._f=p+this._f|0,this._g=b+this._g|0,this._h=v+this._h|0},f.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=f},function(e,t,r){"use strict";e.exports=a;var n=r(14),i=r(22);function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?_(e,o,t,!1):M(e,o)):_(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){d("emit readable"),e.emit("readable"),P(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(E,e,t))}function E(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function R(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):x(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&R(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:y;function u(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",v),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",b),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){d("onend"),e.end()}a.endEmitted?i.nextTick(f):r.once("end",f),e.on("unpipe",u);var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",l);var h=!1;var p=!1;function b(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==B(a.pipes,e))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function v(t){d("onerror",t),y(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",g),y()}function g(){d("onfinish"),e.removeListener("close",m),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",b),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",v),e.once("close",m),e.once("finish",g),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=a},function(e,t,r){"use strict";var n=r(163),i=r(144);e.exports=i(function(e){var t=n("sha256").update(e).digest();return n("sha256").update(t).digest()})},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(179);e.exports=function(e,t,r,i,a){var o=new Error(e);return n(o,t,r,i,a)}},function(e,t,r){"use strict";var n=r(8),i=r(180),a=r(178),o=r(177),s=r(176),f=r(78),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(175);e.exports=function(e){return new Promise(function(t,c){var l=e.data,h=e.headers;n.isFormData(l)&&delete h["Content-Type"];var d=new XMLHttpRequest,p="onreadystatechange",b=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(e.url)||(d=new window.XDomainRequest,p="onload",b=!0,d.onprogress=function(){},d.ontimeout=function(){}),e.auth){var v=e.auth.username||"",m=e.auth.password||"";h.Authorization="Basic "+u(v+":"+m)}if(d.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d[p]=function(){if(d&&(4===d.readyState||b)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?o(d.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:r,config:e,request:d};i(t,c,n),d=null}},d.onerror=function(){c(f("Network Error",e,null,d)),d=null},d.ontimeout=function(){c(f("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},n.isStandardBrowserEnv()){var g=r(174),y=(e.withCredentials||s(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;y&&(h[e.xsrfHeaderName]=y)}if("setRequestHeader"in d&&n.forEach(h,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete h[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),c(e),d=null)}),void 0===l&&(l=null),d.send(l)})}},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;nparseInt(a.scriptHash,16)?e.tx.scripts.push(n):e.tx.scripts.unshift(n),e}):Promise.resolve(e)},_=function(e){if(e.override||(e.override={}),e.sendingFromSmartContract){var t=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)(t.scriptHash))}return Promise.resolve(e)},S=function(e){if(e.sendingFromSmartContract){var t=(0,i.getScriptHashFromAddress)(e.address);return o.Query.getContractState(t).execute(e.url).then(function(r){var n=r.result.parameters,a={invocationScript:"00".repeat(n.length),verificationScript:""},o=e.privateKey?new i.Account(e.privateKey):new i.Account(e.publicKey);return parseInt(t,16)>parseInt(o.scriptHash,16)?e.tx.scripts.push(a):e.tx.scripts.unshift(a),e})}return Promise.resolve(e)},k=function(e){return 0===e.tx.inputs.length&&0===e.tx.outputs.length&&(e.tx.addAttribute(s.TxAttrUsage.Script,(0,f.reverseHex)((0,i.getScriptHashFromAddress)(e.address))),e.tx.addRemark(Date.now().toString()+(0,f.ab2hexstring)((0,i.generateRandomArray)(4)))),Promise.resolve(e)},x=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n5&&void 0!==arguments[5]?arguments[5]:0,d=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;l.warn("doTransferToken will be deprecated in favor of doInvoke");var p,b,v=new a.Account(r),m=(0,f.getRPCEndpoint)(e),g=(0,f.getBalance)(e,v.address);return Promise.all([m,g]).then(function(e){b=e[0];var r=e[1],o=(0,a.getScriptHashFromAddress)(v.address),f=(0,s.reverseHex)((0,a.getScriptHashFromAddress)(n)),l=[{assetId:c.ASSET_ID.GAS,value:1e-8,scriptHash:o}],p={scriptHash:t,operation:"transfer",args:[(0,s.reverseHex)(o),f,i]},m=u.Transaction.createInvocationTx(r,l,p,h,{version:1});return d?d(m,v.publicKey):m.sign(v.privateKey)}).then(function(e){return p=e,o.Query.sendRawTransaction(p).execute(b)}).then(function(e){return!0===e.result&&(e.txid=p.hash),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrices=t.getPrice=void 0;var n=i(r(27));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:"NEO",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd";return o.warn("This is deprecated in favor of getPrices. There is a known bug for NEP5 tokens with this function."),f("https://api.coinmarketcap.com/v1/ticker/".concat(e.toLowerCase(),"/"),t).then(function(t){var r=t[e.toUpperCase()];if(r)return r;throw new Error("Something went wrong with the CoinMarketCap API!")}).catch(function(e){throw o.error(e.message),e})};function f(e,t){return t=t.toLowerCase(),s.includes(t)?n.default.get("".concat(e,"?limit=0&convert=").concat(t)).then(function(e){var r=e.data;if(r.error)throw new Error(r.error);return function(e,t){var r={};return e.forEach(function(e){r[e.symbol]=parseFloat(e["price_".concat(t.toLowerCase())])}),r}(r,t)}):Promise.reject(new ReferenceError("".concat(t," is not one of the accepted currencies!")))}t.getPrices=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["NEO"];return f("https://api.coinmarketcap.com/v1/ticker/",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"usd").then(function(t){e=e.map(function(e){return e.toUpperCase()});var r=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=t.address||"",this.net=t.net||"NoNet",this.claims=t.claims?t.claims.map(function(e){return(0,i.ClaimItem)(e)}):[]}var t,r,n;return t=e,(r=[{key:a.default.inspect.custom,value:function(e,t){var r=this.claims.map(function(e){return"".concat(e.txid," <").concat(e.index,">: ").concat(e.claim.toString())});return"[Claims(".concat(this.net,"): ").concat(this.address,"]\n").concat(JSON.stringify(r,null,2))}},{key:"export",value:function(){return{address:this.address,net:this.net,claims:this.claims.map(i.exportClaimItem)}}},{key:"slice",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new e({address:this.address,net:this.net,claims:this.claims.slice(t,r)})}},{key:Symbol.toStringTag,get:function(){return"Claims"}}])&&o(t.prototype,r),n&&o(t,n),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(20)),i=o(r(30)),a=r(3);function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:a.DEFAULT_WALLET,r=t.name,n=void 0===r?"myWallet":r,i=t.version,o=void 0===i?a.DEFAULT_WALLET.version:i,s=t.scrypt,u=void 0===s?a.DEFAULT_SCRYPT:s,c=t.accounts,l=void 0===c?[]:c,h=t.extra,d=void 0===h?null:h;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=n,this.version=o,this.scrypt={n:u.n||u.cost,r:u.r||u.blockSize,p:u.p||u.parallel},this.accounts=[];var p=!0,b=!1,v=void 0;try{for(var m,g=l[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var y=m.value;this.addAccount(y)}}catch(e){b=!0,v=e}finally{try{p||null==g.return||g.return()}finally{if(b)throw v}}this.extra=d,f.info("New Wallet created: ".concat(this.name))}var t,r,o;return t=e,r=[{key:"addAccount",value:function(e){var t=this.accounts.length;e instanceof i.default||(e=new i.default(e)),this.accounts.push(e);try{var r=e.address;f.info("Added Account: ".concat(r," to Wallet ").concat(this.name))}catch(e){f.warn("Encrypted account added to Wallet ".concat(this.name,". You will not be able to export this wallet without first decrypting this account"))}return t}},{key:"decrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].decrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"decryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.decrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"encrypt",value:function(e,t){if(e<0)throw new Error("Index cannot be negative!");if(e>=this.accounts.length)throw new Error("Index cannot larger than Accounts array!");try{return this.accounts[e].encrypt(t,this.scrypt),!0}catch(e){return!1}}},{key:"encryptAll",value:function(e){var t=this,r=[];return this.accounts.map(function(n,i){r.push(t.encrypt(i,e))}),f.info("decryptAll for Wallet ".concat(this.name,": ").concat(r.reduce(function(e,t){return t+(e?"1":"0")},""))),r}},{key:"export",value:function(){return{name:this.name,version:this.version,scrypt:this.scrypt,accounts:this.accounts.map(function(e){return e.export()}),extra:this.extra}}},{key:"setDefault",value:function(e){for(var t=0;t)?=?)";var A=f++;s[A]=s[c]+"|x|X|\\*";var M=f++;s[M]=s[u]+"|x|X|\\*";var E=f++;s[E]="[v=\\s]*("+s[M]+")(?:\\.("+s[M]+")(?:\\.("+s[M]+")(?:"+s[v]+")?"+s[y]+"?)?)?";var T=f++;s[T]="[v=\\s]*("+s[A]+")(?:\\.("+s[A]+")(?:\\.("+s[A]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var I=f++;s[I]="^"+s[x]+"\\s*"+s[E]+"$";var P=f++;s[P]="^"+s[x]+"\\s*"+s[T]+"$";var O=f++;s[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var R=f++;s[R]="(?:~>?)";var C=f++;s[C]="(\\s*)"+s[R]+"\\s+",o[C]=new RegExp(s[C],"g");var B=f++;s[B]="^"+s[R]+s[E]+"$";var j=f++;s[j]="^"+s[R]+s[T]+"$";var N=f++;s[N]="(?:\\^)";var L=f++;s[L]="(\\s*)"+s[N]+"\\s+",o[L]=new RegExp(s[L],"g");var F=f++;s[F]="^"+s[N]+s[E]+"$";var z=f++;s[z]="^"+s[N]+s[T]+"$";var H=f++;s[H]="^"+s[x]+"\\s*("+S+")$|^$";var U=f++;s[U]="^"+s[x]+"\\s*("+_+")$|^$";var D=f++;s[D]="(\\s*)"+s[x]+"\\s*("+S+"|"+s[E]+")",o[D]=new RegExp(s[D],"g");var q=f++;s[q]="^\\s*("+s[E]+")\\s+-\\s+("+s[E]+")\\s*$";var K=f++;s[K]="^\\s*("+s[T]+")\\s+-\\s+("+s[T]+")\\s*$";var Y=f++;s[Y]="(<|>)?=?\\s*\\*";for(var V=0;Vi)return null;if(!(t?o[k]:o[w]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(e instanceof X){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError("version is longer than "+i+" characters");if(!(this instanceof X))return new X(e,t);n("SemVer",e,t),this.loose=t;var r=e.trim().match(t?o[k]:o[w]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new X(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(ee(e,t))return null;var r=W(e),n=W(t);if(r.prerelease.length||n.prerelease.length){for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return"pre"+i;return"prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return i},t.compareIdentifiers=G;var Z=/^[0-9]+$/;function G(e,t){var r=Z.test(e),n=Z.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:et?1:0}function Q(e,t,r){return new X(e,r).compare(new X(t,r))}function $(e,t,r){return Q(e,t,r)>0}function J(e,t,r){return Q(e,t,r)<0}function ee(e,t,r){return 0===Q(e,t,r)}function te(e,t,r){return 0!==Q(e,t,r)}function re(e,t,r){return Q(e,t,r)>=0}function ne(e,t,r){return Q(e,t,r)<=0}function ie(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=ee(e,r,n);break;case"!=":i=te(e,r,n);break;case">":i=$(e,r,n);break;case">=":i=re(e,r,n);break;case"<":i=J(e,r,n);break;case"<=":i=ne(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function ae(e,t){if(e instanceof ae){if(e.loose===t)return e;e=e.value}if(!(this instanceof ae))return new ae(e,t);n("comparator",e,t),this.loose=t,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return G(t,e)},t.major=function(e,t){return new X(e,t).major},t.minor=function(e,t){return new X(e,t).minor},t.patch=function(e,t){return new X(e,t).patch},t.compare=Q,t.compareLoose=function(e,t){return Q(e,t,!0)},t.rcompare=function(e,t,r){return Q(t,e,r)},t.sort=function(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})},t.rsort=function(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})},t.gt=$,t.lt=J,t.eq=ee,t.neq=te,t.gte=re,t.lte=ne,t.cmp=ie,t.Comparator=ae;var oe={};function se(e,t){if(e instanceof se)return e.loose===t?e:new se(e.raw,t);if(e instanceof ae)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function fe(e){return!e||"x"===e.toLowerCase()||"*"===e}function ue(e,t,r,n,i,a,o,s,f,u,c,l,h){return((t=fe(r)?"":fe(n)?">="+r+".0.0":fe(i)?">="+r+"."+n+".0":">="+t)+" "+(s=fe(f)?"":fe(u)?"<"+(+f+1)+".0.0":fe(c)?"<"+f+"."+(+u+1)+".0":l?"<="+f+"."+u+"."+c+"-"+l:"<="+s)).trim()}function ce(e,t){for(var r=0;r0){var i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function le(e,t,r){try{t=new se(t,r)}catch(e){return!1}return t.test(e)}function he(e,t,r,n){var i,a,o,s,f;switch(e=new X(e,n),t=new se(t,n),r){case">":i=$,a=ne,o=J,s=">",f=">=";break;case"<":i=J,a=re,o=$,s="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(le(e,t,n))return!1;for(var u=0;u=0.0.0")),c=c||e,l=l||e,i(e.semver,c.semver,n)?c=e:o(e.semver,l.semver,n)&&(l=e)}),c.operator===s||c.operator===f)return!1;if((!l.operator||l.operator===s)&&a(e,l.semver))return!1;if(l.operator===f&&o(e,l.semver))return!1}return!0}ae.prototype.parse=function(e){var t=this.loose?o[H]:o[U],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new X(r[2],this.loose):this.semver=oe},ae.prototype.toString=function(){return this.value},ae.prototype.test=function(e){return n("Comparator.test",e,this.loose),this.semver===oe||("string"==typeof e&&(e=new X(e,this.loose)),ie(e,this.operator,this.semver,this.loose))},ae.prototype.intersects=function(e,t){if(!(e instanceof ae))throw new TypeError("a Comparator is required");var r;if(""===this.operator)return r=new se(e.value,t),le(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),le(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=ie(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),f=ie(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||f},t.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),n("range",e,t);var r=t?o[K]:o[q];e=e.replace(r,ue),n("hyphen replace",e),e=e.replace(o[D],"$1$2$3"),n("comparator trim",e,o[D]),e=(e=(e=e.replace(o[C],"$1~")).replace(o[L],"$1^")).split(/\s+/).join(" ");var i=t?o[H]:o[U],a=e.split(" ").map(function(e){return function(e,t){return n("comp",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){n("caret",e,t);var r=t?o[z]:o[F];return e.replace(r,function(t,r,i,a,o){var s;return n("caret",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":o?(n("replaceCaret pr",o),"-"!==o.charAt(0)&&(o="-"+o),s="0"===r?"0"===i?">="+r+"."+i+"."+a+o+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+o+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===i?">="+r+"."+i+"."+a+" <"+r+"."+i+"."+(+a+1):">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+a+" <"+(+r+1)+".0.0"),n("caret return",s),s})}(e,t)}).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var r=t?o[j]:o[B];return e.replace(r,function(t,r,i,a,o){var s;return n("tilde",e,t,r,i,a,o),fe(r)?s="":fe(i)?s=">="+r+".0.0 <"+(+r+1)+".0.0":fe(a)?s=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":o?(n("replaceTilde pr",o),"-"!==o.charAt(0)&&(o="-"+o),s=">="+r+"."+i+"."+a+o+" <"+r+"."+(+i+1)+".0"):s=">="+r+"."+i+"."+a+" <"+r+"."+(+i+1)+".0",n("tilde return",s),s})}(e,t)}).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var r=t?o[P]:o[I];return e.replace(r,function(t,r,i,a,o,s){n("xRange",e,t,r,i,a,o,s);var f=fe(i),u=f||fe(a),c=u||fe(o),l=c;return"="===r&&l&&(r=""),f?t=">"===r||"<"===r?"<0.0.0":"*":r&&l?(u&&(a=0),c&&(o=0),">"===r?(r=">=",u?(i=+i+1,a=0,o=0):c&&(a=+a+1,o=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),t=r+i+"."+a+"."+o):u?t=">="+i+".0.0 <"+(+i+1)+".0.0":c&&(t=">="+i+"."+a+".0 <"+i+"."+(+a+1)+".0"),n("xRange return",t),t})}(e,t)}).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[Y],"")}(e,t),n("stars",e),e}(e,t)}).join(" ").split(/\s+/);return this.loose&&(a=a.filter(function(e){return!!e.match(i)})),a=a.map(function(e){return new ae(e,t)})},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},t.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.loose));for(var t=0;t",r)},t.outside=he,t.prerelease=function(e,t){var r=W(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(o[O]);return null==t?null:W((t[1]||"0")+"."+(t[2]||"0")+"."+(t[3]||"0"))}}).call(this,r(9))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(3),i=a(r(20));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.magic=t.magic||t.Magic||0,this.addressVersion=t.addressVersion||t.AddressVersion||23,this.standbyValidators=t.standbyValidators||t.StandbyValidators||[],this.seedList=t.seedList||t.SeedList||[],this.systemFee=t.systemFee||t.SystemFee||n.DEFAULT_SYSFEE}var t,r,a;return t=e,a=[{key:"import",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?JSON.parse(t):t;return new e(Object.assign(n,{extra:n.extra||n.Extra,name:n.name||n.Name||r}))}},{key:"readFile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return s.info("Importing protocol file from ".concat(e)),this.import(i.default.readFileSync(e,"utf8"),t)}}],(r=[{key:"writeFile",value:function(e){return i.default.writeFile(e,this.export(),function(e){if(e)throw e;return console.log("Protocol file written!"),!0})}},{key:"export",value:function(){return{Magic:this.magic,AddressVersion:this.addressVersion,StandbyValidators:this.standbyValidators,SeedList:this.seedList,SystemFee:this.systemFee}}}])&&o(t.prototype,r),a&&o(t,a),e}();t.default=f},function(e){e.exports={MainNet:{Name:"MainNet",ProtocolConfiguration:{Magic:7630401,AddressVersion:23,StandbyValidators:["03b209fd4f53a7170ea4444e0cb0a6bb6a53c2bd016926989cf85f9b0fba17a70c","02df48f60e8f3e01c48ff40b9b7f1310d7a8b2a193188befe1c2e3df740e895093","03b8d9d5771d8f513aa0869b9cc8d50986403b78c6da36890638c3d46a5adce04a","02ca0e27697b9c248f6f16e085fd0061e26f44da85b58ee835c110caa5ec3ba554","024c7b7fb6c310fccf1ba33b082519d82964ea93868d676662d4a59ad548df0e7d","02aaec38470f6aad0042c6e877cfd8087d2676b0f516fddd362801b9bd3936399e","02486fd15702c4490a26703112a5cc1d0923fd697a33406bd5a1c00e0013b09a70"],SeedList:["seed1.neo.org:10333","seed2.neo.org:10333","seed3.neo.org:10333","seed4.neo.org:10333","seed5.neo.org:10333"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neonDB:"http://api.wallet.cityofzion.io",neoscan:"https://api.neoscan.io/api/main_net"}},TestNet:{Name:"TestNet",ProtocolConfiguration:{Magic:1953787457,AddressVersion:23,StandbyValidators:["0327da12b5c40200e9f65569476bbff2218da4f32548ff43b6387ec1416a231ee8","026ce35b29147ad09e4afe4ec4a7319095f08198fa8babbe3c56e970b143528d22","0209e7fd41dfb5c2f8dc72eb30358ac100ea8c72da18847befe06eade68cebfcb9","039dafd8571a641058ccc832c5e2111ea39b09c0bde36050914384f7a48bce9bf9","038dddc06ce687677a53d54f096d2591ba2302068cf123c1f2d75c2dddc5425579","02d02b1873a0863cd042cc717da31cea0d7cf9db32b74d4c72c01b0011503e2e22","034ff5ceeac41acf22cd5ed2da17a6df4dd8358fcb2bfb1a43208ad0feaab2746b"],SeedList:["seed1.neo.org:20333","seed2.neo.org:20333","seed3.neo.org:20333","seed4.neo.org:20333","seed5.neo.org:20333"],SystemFee:{EnrollmentTransaction:10,IssueTransaction:5,PublishTransaction:5,RegisterTransaction:100}},ExtraConfiguration:{neonDB:"http://testnet-api.wallet.cityofzion.io",neoscan:"https://neoscan-testnet.io/api/test_net"}},CozNet:{Name:"CozNet",ProtocolConfiguration:{Magic:1010102,AddressVersion:23,StandbyValidators:["032d9e51c7d48b0f5cc63d63deb89767685832cf69eb7113900290f217ae0504ee","022a5b7ccf03166a95e1750f0c350c734c34fe7aac66622eecdb5a529d2e69b1df","03c478d43271c297696ee3ab5a7946ee60287015c7dca6cba867819c7f271bc4ea","0393ef777d01fb60eef1da3474b975c6a393b464bcfe588e2ad7dbc4dbdfa2c244"],SeedList:["188.68.34.29:10330","188.68.34.29:10332","188.68.34.29:10334","188.68.34.29:10336"],SystemFee:{EnrollmentTransaction:1e3,IssueTransaction:500,PublishTransaction:500,RegisterTransaction:1e4}},ExtraConfiguration:{neoscan:"https://coz.neoscan-testnet.io/api/main_net"}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateDeployScript=t.createScript=void 0;var n,i=r(0),a=(n=r(52))&&n.__esModule?n:{default:n};t.createScript=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=r.type||128,this.version=r.version||i.TX_VERSION.CONTRACT,this.attributes=r.attributes||[],this.inputs=r.inputs||[],this.outputs=r.outputs?r.outputs.map(function(e){return f.TransactionOutput(e)}):[],this.scripts=r.scripts||[];var n=c.getExclusive[this.type](r);Object.keys(n).map(function(e){t[e]=n[e]})}var t,r,l;return t=e,r=[{key:"addOutput",value:function(e,t,r){if(3===arguments.length)this.outputs.push(f.createTransactionOutput(e,t,r));else{if("object"!==d(arguments[0]))throw new Error("Invalid input given! Give either 1 or 3 arguments!");this.outputs.push(arguments[0])}return this}},{key:"addAttribute",value:function(e,t){if("string"!=typeof t)throw new TypeError("data should be formatted as string!");return this.attributes.push({usage:e,data:t}),this}},{key:"addRemark",value:function(e){var t=(0,o.str2hexstring)(e);return this.addAttribute(s.default.Remark,t)}},{key:"calculate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=u.calculateInputs(e,this.outputs,this.gas,t),n=r.inputs,i=r.change;return this.inputs=n,this.outputs=this.outputs.concat(i),e.applyTx(this),b.info("Calculated the inputs required for Transaction with Balance: ".concat(e.address)),this}},{key:"serialize",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return u.serializeTransaction(this,e)}},{key:"serializeExclusiveData",value:function(){return c.serializeExclusive[this.type](this)}},{key:"sign",value:function(e){return"string"==typeof e&&(e=new n.Account(e)),u.signTransaction(this,e.privateKey),b.info("Signed Transaction with Account: ".concat(e.label)),this}},{key:Symbol.toStringTag,get:function(){return"Transaction"}},{key:"exclusiveData",get:function(){return c.getExclusive[this.type](this)}},{key:"hash",get:function(){return u.getTransactionHash(this)}}],l=[{key:"createClaimTx",value:function(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.claims.length)throw new Error("Useless transaction! There is no claims!");var s=new n.Account(t),f=Object.assign({type:2,version:i.TX_VERSION.CLAIM},a),u=new o.Fixed8(0);f.claims=r.claims.slice(0,255).map(function(e){return u=u.add(e.claim),{prevHash:e.txid,prevIndex:e.index}}),f.outputs=[{assetId:i.ASSET_ID.GAS,value:u,scriptHash:s.scriptHash}];var c=new e(Object.assign(f,a));return b.info("New ClaimTransaction for ".concat(s.address)),c}},{key:"createContractTx",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===r)throw new Error("Useless transaction! You are not sending anything!");var a=new e(Object.assign({type:128,version:i.TX_VERSION.CONTRACT,outputs:r},n)).calculate(t);return b.info("New ContractTransaction for ".concat(t.address)),a}},{key:"createInvocationTx",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};null===r&&(r=[]);var f=new e(Object.assign({type:209,version:i.TX_VERSION.INVOCATION,outputs:r,script:"string"==typeof n?n:(0,a.createScript)(n),gas:o},s)).calculate(t);return b.info("New InvocationTransaction for ".concat(t.address)),f}},{key:"deserialize",value:function(t){var r=u.deserializeTransaction(t),n=c.getExclusive[r.type](r);return new e(Object.assign(r,n))}}],r&&p(t.prototype,r),l&&p(t,l),e}();t.default=v},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(55))&&n.__esModule?n:{default:n},a=r(17),o=r(3),s=r(0),f=r(19);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.address=r.address||"",this.net=r.net||"NoNet",this.assetSymbols=r.assetSymbols?r.assetSymbols:[],this.assets={},r.assets&&Object.keys(r.assets).map(function(e){"object"===u(r.assets[e])&&t.addAsset(e,r.assets[e])}),this.tokenSymbols=r.tokenSymbols?r.tokenSymbols:[],this.tokens=r.tokens?r.tokens:{}}var t,r,n;return t=e,r=[{key:"addAsset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,i.default)();e=e.toUpperCase(),this.assetSymbols.push(e);var r=(0,i.default)(t);return this.assets[e]=r,this}},{key:"addToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e=e.toUpperCase(),this.tokenSymbols.push(e),this.tokens[e]=new s.Fixed8(t),this}},{key:"applyTx",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=e instanceof a.Transaction?e:a.Transaction.deserialize(e);var n=this.assetSymbols,i=!0,s=!1,f=void 0;try{for(var u,c=function(){var e=u.value,r=function(t){return t.txid===e.prevHash&&t.index===e.prevIndex},i=!0,a=!1,o=void 0;try{for(var s,f=n[Symbol.iterator]();!(i=(s=f.next()).done);i=!0){var c=s.value,l=t.assets[c],h=l.unspent.findIndex(r);if(h>=0){var d=l.unspent.splice(h,1);l.spent=l.spent.concat(d);break}}}catch(e){a=!0,o=e}finally{try{i||null==f.return||f.return()}finally{if(a)throw o}}},l=e.inputs[Symbol.iterator]();!(i=(u=l.next()).done);i=!0)c()}catch(e){s=!0,f=e}finally{try{i||null==l.return||l.return()}finally{if(s)throw f}}for(var h=e.hash,d=function(n){var i=e.outputs[n],a=o.ASSETS[i.assetId],s=t.assets[a];s||t.addAsset(a);var f={index:n,txid:h,value:i.value};if(r){var u=s.unconfirmed.findIndex(function(e){return e.txid===f.txid&&e.index===f.index});u>=0&&s.unconfirmed.splice(u,1),s.balance=s.balance.add(i.value),s.unspent||(s.unspent=[]),s.unspent.push(f)}else s.unconfirmed||(s.unconfirmed=[]),s.unconfirmed.push(f);t.assets[a]=s},p=0;p=0&&n<=f.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==a&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window===t)return;try{return void(window.localStorage[u]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(e){}}(n),i.call(f,n,e),typeof console===t&&n=64;){var d,p,b,v,m,g=r,y=n,w=i,_=a,S=o,k=s,x=f,A=u;for(p=0;p<16;p++)b=l+4*p,c[p]=(255&e[b])<<24|(255&e[b+1])<<16|(255&e[b+2])<<8|255&e[b+3];for(p=16;p<64;p++)v=((d=c[p-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,m=((d=c[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,c[p]=(v+c[p-7]|0)+(m+c[p-16]|0)|0;for(p=0;p<64;p++)v=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&k^~S&x)|0)+(A+(t[p]+c[p]|0)|0)|0,m=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&y^g&w^y&w)|0,A=x,x=k,k=S,S=_+v|0,_=w,w=y,y=g,g=v+m|0;r=r+g|0,n=n+y|0,i=i+w|0,a=a+_|0,o=o+S|0,s=s+k|0,f=f+x|0,u=u+A|0,l+=64,h-=64}}l(e);var h,d=e.length%64,p=e.length/536870912|0,b=e.length<<3,v=d<56?56:120,m=e.slice(e.length-d,e.length);for(m.push(128),h=d+1;h>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(b>>>24&255),m.push(b>>>16&255),m.push(b>>>8&255),m.push(b>>>0&255),l(m),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255]}function a(e,t,r){var n;e=e.length<=64?e:i(e);var a=64+t.length+4,o=new Array(a),s=new Array(64),f=[];for(n=0;n<64;n++)o[n]=54;for(n=0;n=a-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)u(),f=f.concat(i(s.concat(i(o)))),r-=32;return r>0&&(u(),f=f.concat(i(s.concat(i(o))).slice(0,r))),f}function o(e,t,r,n,i){var a;for(c(e,16*(2*r-1),i,0,16),a=0;a<2*r;a++)u(e,16*a,i,16),f(i,n),c(i,0,e,t+16*a,16);for(a=0;a>>32-t}function f(e,t){c(e,0,t,0,16);for(var r=8;r>0;r-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(r=0;r<16;++r)e[r]+=t[r]}function u(e,t,r,n){for(var i=0;i=256)return!1}return!0}function h(e,t){var r=parseInt(e);if(e!=r)throw new Error("invalid "+t);return r}e.exports=function(e,r,i,s,f,d,p){if(!p)throw new Error("missing callback");if(i=h(i,"N"),s=h(s,"r"),f=h(f,"p"),d=h(d,"dkLen"),0===i||0!=(i&i-1))throw new Error("N must be power of 2");if(i>n/128/s)throw new Error("N too large");if(s>n/128/f)throw new Error("r too large");if(!l(e))throw new Error("password must be an array or buffer");if(!l(r))throw new Error("salt must be an array or buffer");for(var b=a(e,r,128*f*s),v=new Uint32Array(32*f*s),m=0;mR&&(r=R);for(var t=0;tR&&(r=R),t=0;t>0&255),b.push(v[t]>>8&255),b.push(v[t]>>16&255),b.push(v[t]>>24&255);var h=a(e,b,d);return p(null,1,h)}C(B)};B()}}()}).call(this,r(37).setImmediate)},function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)};function a(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!n;i--){var o=i>=0?arguments[i]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return t=r(a(t.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),i="/"===o(e,-1);return(e=r(a(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(a(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),a=n(r.split("/")),o=Math.min(i.length,a.length),s=o,f=0;fr?String.fromCharCode(r):(e.push(r),t=191r?1:2,"");if(0r?String.fromCharCode((31&r)<<6|63&n):String.fromCharCode((15&r)<<12|(63&n)<<6|63&i);return e.length=0,r},this.yb=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>3<<3,t}function ra(e){var t=sa;return sa=(sa=sa+e|0)+7>>3<<3,t}function ua(e){var t=z;return(z=(z=z+e|0)+7>>3<<3)>=va&&wa("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value, or (2) set Module.TOTAL_MEMORY before the program runs."),t}function xa(e,t){return Math.ceil(e/(t||8))*(t||8)}var ma=4,ya={},za=p,Aa;function w(e,t){e||wa("Assertion failed: "+t)}function Ca(a){try{var b=s["_"+a];b||(b=eval("_"+a))}catch(e){}return w(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function Ba(e,t,r,n){var i=0,a=0;n=n?n.map(function(e){return function(e,t){if("string"==t){if(e===m||e===k||0===e)return 0;i||(i=ja());var r=qa(e.length+1);return Da(e,r),r}return"array"==t?(i||(i=ja()),Ea(e,r=qa(e.length)),r):e}(e,r[a++])}):[];return e=e.apply(m,n),"string"==t?t=Fa(e):(w("array"!=t),t=e),i&&ka(i),t}function Ga(e,t,r){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":A[e]=t;break;case"i16":Ha[e>>1]=t;break;case"i32":B[e>>2]=t;break;case"i64":Aa=[t>>>0,(0|Math.min(+Math.floor(t/4294967296),4294967295))>>>0],B[e>>2]=Aa[0],B[e+4>>2]=Aa[1];break;case"float":Ia[e>>2]=t;break;case"double":Ja[e>>3]=t;break;default:wa("invalid type for setValue: "+r)}}s.ccall=function(e,t,r,n){return Ba(Ca(e),t,r,n)},s.cwrap=function(e,t,r){var n=Ca(e);return function(){return Ba(n,t,r,Array.prototype.slice.call(arguments))}},s.setValue=Ga,s.getValue=function(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return A[e];case"i16":return Ha[e>>1];case"i32":case"i64":return B[e>>2];case"float":return Ia[e>>2];case"double":return Ja[e>>3];default:wa("invalid type for setValue: "+t)}return m};var Ka=0,La=1,E=2,Na=4;function F(e,t,r,n){var i,a;"number"==typeof e?(i=l,a=e):(i=p,a=e.length);var o="string"==typeof t?t:m;r=r==Na?n:[Oa,qa,ra,ua][r===k?E:r](Math.max(a,o?1:t.length));if(i){for(n=r,w(0==(3&r)),e=r+(-4&a);n>2]=0;for(e=r+a;n=t?2*Math.abs(1<=e)return e;var r=32>=t?Math.abs(1<=r&&(32>=t||e>r)&&(e=-2*r+e),e}s.addOnPreRun=s.Vd=bb,s.addOnInit=s.Sd=function(e){Xa.unshift(e)},s.addOnPreMain=s.Ud=function(e){Ya.unshift(e)},s.addOnExit=s.Rd=function(e){Za.unshift(e)},s.addOnPostRun=s.Td=cb,s.intArrayFromString=J,s.intArrayToString=function(e){for(var t=[],r=0;r>>16)*n+r*(t>>>16)<<16)|0}),Math.ie=Math.imul;var L=0,fb={},gb=p,hb=m,nb,ob,pb;function ib(e){L++,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(!fb[e]),fb[e]=1):s.P("warning: run dependency added without ID")}function jb(e){L--,s.monitorRunDependencies&&s.monitorRunDependencies(L),e?(w(fb[e]),delete fb[e]):s.P("warning: run dependency removed without ID"),0==L&&(hb!==m&&(clearInterval(hb),hb=m),!gb&&kb&&lb())}s.addRunDependency=ib,s.removeRunDependency=jb,s.preloadedImages={},s.preloadedAudios={},Ra=8,sa=Ra+1312,Xa.push({V:function(){mb()}}),nb=nb=F([0,0,0,0,0,0,0,0],"i8",E),ob=ob=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),pb=pb=F([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",E),F([111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,115,0,0,0,0,0,0,0,111,112,116,105,111,110,32,114,101,113,117,105,114,101,115,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,99,0,0,0,0,0,0,0,0,0,0,0,0,0,36,64,0,0,0,0,0,0,89,64,0,0,0,0,0,136,195,64,0,0,0,0,132,215,151,65,0,128,224,55,121,195,65,67,23,110,5,181,181,184,147,70,245,249,63,233,3,79,56,77,50,29,48,249,72,119,130,90,60,191,115,127,221,79,21,117,56,3,0,0,0,0,0,0,63,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255,0,0,0,0,111,112,116,105,111,110,32,100,111,101,115,110,39,116,32,116,97,107,101,32,97,110,32,97,114,103,117,109,101,110,116,32,45,45,32,37,46,42,115,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,115,0,0,0,0,117,110,107,110,111,119,110,32,111,112,116,105,111,110,32,45,45,32,37,99,0,0,0,0,255,255,255,255,0,0,0,0,97,109,98,105,103,117,111,117,115,32,111,112,116,105,111,110,32,45,45,32,37,46,42,115,0,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,80,79,83,73,88,76,89,95,67,79,82,82,69,67,84,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,0,37,115,58,32,0,0,0,0,37,115,10,0,0,0,0,0,37,115,10,0,0,0,0,0,105,110,32,117,115,101,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,37,115,58,32,0,0,0,0,37,115,58,32,0,0,0,0,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,58,32,0,0,0,0,0,0,58,32,0,0,0,0,0,0,115,121,115,116,101,109,32,98,121,116,101,115,32,32,32,32,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,109,97,120,32,115,121,115,116,101,109,32,98,121,116,101,115,32,61,32,37,49,48,108,117,10,0,0,0,0,0,0,0,0,0,0,0,176,2,0,0,6,0,0,0,10,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,2,0,0,6,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,116,57,101,120,99,101,112,116,105,111,110,0,0,0,0,83,116,57,98,97,100,95,97,108,108,111,99,0,0,0,0,83,116,50,48,98,97,100,95,97,114,114,97,121,95,110,101,119,95,108,101,110,103,116,104,0,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,0,0,0,0,120,2,0,0,168,2,0,0,0,0,0,0,0,0,0,0,136,2,0,0,176,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",Na,8);var qb=xa(F(12,"i8",E),8);w(0==qb%8);var rb=0;function M(e){return B[rb>>2]=e}s._memcpy=sb,s._memset=tb;var N={L:1,ca:2,Bd:3,sc:4,I:5,za:6,Jb:7,Sc:8,$:9,Zb:10,ua:11,Ld:11,$a:12,Ya:13,kc:14,ed:15,Wb:16,va:17,Md:18,wa:19,gd:20,aa:21,A:22,Mc:23,Za:24,ld:25,Id:26,lc:27,ad:28,da:29,yd:30,Fc:31,rd:32,hc:33,ab:34,Wc:35,pc:36,$b:37,vc:38,wc:39,xc:40,Ec:41,Jd:42,Qc:43,uc:44,ec:45,Tc:46,Pb:50,Sb:51,Nd:52,Oc:53,Tb:54,Ub:55,fc:56,Vb:57,cd:60,Rc:61,Fd:62,bd:63,Xc:64,Yc:65,xd:66,Uc:67,Mb:68,Cd:69,ac:70,td:71,Hc:74,yc:75,ic:76,Rb:77,mc:79,md:80,Qb:81,wd:82,zc:83,Ac:84,Dc:85,Cc:86,Bc:87,dd:88,Nc:89,ya:90,Ic:91,ba:92,nd:95,qd:96,dc:104,Pc:105,Nb:106,vd:107,jd:108,Zc:109,zd:110,cc:111,Kb:112,bc:113,Lc:114,Jc:115,Gd:116,nc:117,oc:118,rc:119,Ob:120,gc:121,Gc:122,ud:123,Ad:124,Lb:125,Kc:126,tc:127,fd:128,Hd:129,sd:130,Kd:131,jc:132,Dd:133,kd:134,Vc:135,$c:136,Yb:137,qc:138,od:139,Xb:140,hd:141,pd:142,Ed:143},ub={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"No message of desired type",36:"Identifier removed",37:"Channel number out of range",38:"Level 2 not synchronized",39:"Level 3 halted",40:"Level 3 reset",41:"Link number out of range",42:"Protocol driver not attached",43:"No CSI structure available",44:"Level 2 halted",45:"Deadlock condition",46:"No record locks available",50:"Invalid exchange",51:"Invalid request descriptor",52:"Exchange full",53:"No anode",54:"Invalid request code",55:"Invalid slot",56:"File locking deadlock error",57:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",74:"Multihop attempted",75:"Inode is remote (not really error)",76:"Cross mount point (not really error)",77:"Trying to read unreadable message",79:"Inappropriate file type or format",80:"Given log. name not unique",81:"f.d. invalid for this operation",82:"Remote address changed",83:"Can\t access a needed shared lib",84:"Accessing a corrupted shared lib",85:".lib section in a.out corrupted",86:"Attempting to link in too many libs",87:"Attempting to exec a shared library",88:"Function not implemented",89:"No more files",90:"Directory not empty",91:"File or path name too long",92:"Too many symbolic links",95:"Operation not supported on transport endpoint",96:"Protocol family not supported",104:"Connection reset by peer",105:"No buffer space available",106:"Address family not supported by protocol family",107:"Protocol wrong type for socket",108:"Socket operation on non-socket",109:"Protocol not available",110:"Can't send after socket shutdown",111:"Connection refused",112:"Address already in use",113:"Connection aborted",114:"Network is unreachable",115:"Network interface is not configured",116:"Connection timed out",117:"Host is down",118:"Host is unreachable",119:"Connection already in progress",120:"Socket already connected",121:"Destination address required",122:"Message too long",123:"Unknown protocol",124:"Socket type not supported",125:"Address not available",126:"ENETRESET",127:"Socket is already connected",128:"Socket is not connected",129:"TOOMANYREFS",130:"EPROCLIM",131:"EUSERS",132:"EDQUOT",133:"ESTALE",134:"Not supported",135:"No medium (in tape drive)",136:"No such host or network path",137:"Filename exists with different case",138:"EILSEQ",139:"Value too large for defined data type",140:"Operation canceled",141:"State not recoverable",142:"Previous owner died",143:"Streams pipe error"};function vb(e,t,r){var n=O(e,{parent:l}).d,i=xb(n,e="/"===e?"/":wb(e)[2]);return i&&g(new Q(i)),n.l.Ta||g(new Q(N.L)),n.l.Ta(n,e,t,r)}function yb(e,t){return vb(e,t=4095&t|32768,0)}function zb(e,t){return vb(e,t=1023&t|16384,0)}function Ab(e,t,r){return vb(e,8192|t,r)}function Bb(e,t){var r=O(t,{parent:l}).d,n="/"===t?"/":wb(t)[2],i=xb(r,n);return i&&g(new Q(i)),r.l.Wa||g(new Q(N.L)),r.l.Wa(r,n,e)}function Cb(e,t){var r;(r="string"==typeof e?O(e,{N:l}).d:e).l.Y||g(new Q(N.L)),r.l.Y(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})}function Db(e,t){var r,n,i;e=Eb(e);"string"==typeof t?void 0===(n=Fb[t])&&g(Error("Unknown file open mode: "+t)):n=t,r=512&(t=n)?4095&r|32768:0;try{var a=O(e,{N:!(65536&t)});i=a.d,e=a.path}catch(e){}512&t&&(i?2048&t&&g(new Q(N.va)):i=vb(e,r,0)),i||g(new Q(N.ca)),8192==(61440&i.mode)&&(t&=-1025),i?40960==(61440&i.mode)?r=N.ba:16384==(61440&i.mode)&&(0!=(3&t)||1024&t)?r=N.aa:(r=["r","w","rw"][3&t],1024&t&&(r+="w"),r=Gb(i,r)):r=N.ca,r&&g(new Q(r)),1024&t&&((r="string"==typeof(r=i)?O(r,{N:l}).d:r).l.Y||g(new Q(N.L)),16384==(61440&r.mode)&&g(new Q(N.aa)),32768!=(61440&r.mode)&&g(new Q(N.A)),(a=Gb(r,"w"))&&g(new Q(a)),r.l.Y(r,{size:0,timestamp:Date.now()}));var o,s={path:e,d:i,M:t,seekable:l,position:0,e:i.e,Gb:[],error:p};e:{for(i=k||4096,r=k||1;r<=i;r++)if(!R[r]){o=r;break e}g(new Q(N.Za))}return s.s=o,Object.defineProperty(s,"object",{get:function(){return s.d},set:function(e){s.d=e}}),Object.defineProperty(s,"isRead",{get:function(){return 1!=(3&s.M)}}),Object.defineProperty(s,"isWrite",{get:function(){return 0!=(3&s.M)}}),Object.defineProperty(s,"isAppend",{get:function(){return 8&s.M}}),R[o]=s,s.e.open&&s.e.open(s),s}function Hb(e){try{e.e.close&&e.e.close(e)}catch(e){g(e)}finally{R[e.s]=m}}function Ib(e,t,r,n,i){(0>n||0>i)&&g(new Q(N.A)),0==(3&e.M)&&g(new Q(N.$)),16384==(61440&e.d.mode)&&g(new Q(N.aa)),e.e.write||g(new Q(N.A));var a=l;return void 0===i?(i=e.position,a=p):e.seekable||g(new Q(N.da)),8&e.M&&((!e.seekable||!e.e.na)&&g(new Q(N.da)),e.e.na(e,0,2)),t=e.e.write(e,t,r,n,i),a||(e.position+=t),t}function wb(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)}function Jb(e,t){for(var r=0,n=e.length-1;0<=n;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function Eb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return!(e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"))&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function S(){return Eb(Array.prototype.slice.call(arguments,0).filter(function(e){return"string"!=typeof e&&g(new TypeError("Arguments to path.join must be strings")),e}).join("/"))}function Kb(){for(var e="",t=p,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:"/";"string"!=typeof n&&g(new TypeError("Arguments to path.resolve must be strings")),n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=Jb(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}var Lb=[];function Mb(e,t){Lb[e]={input:[],H:[],O:t},Nb[e]={e:Ob}}var Ob={open:function(e){Pb||(Pb=new pa);var t=Lb[e.d.X];t||g(new Q(N.wa)),e.q=t,e.seekable=p},close:function(e){e.q.H.length&&e.q.O.W(e.q,10)},Q:function(e,t,r,n){(!e.q||!e.q.O.Na)&&g(new Q(N.za));for(var i=0,a=0;ar.length;)r.push(0)}},tb:function(){g(new Q(N.ca))},Ta:function(e,t,r,n){return T.ka(e,t,r,n)},rename:function(e,t,r){if(16384==(61440&e.mode)){var n;try{n=Sb(t,r)}catch(e){}if(n)for(var i in n.g)g(new Q(N.ya))}delete e.parent.g[e.name],e.name=r,t.g[r]=e},ze:function(e,t){delete e.g[t]},ve:function(e,t){var r,n=Sb(e,t);for(r in n.g)g(new Q(N.ya));delete e.g[t]},Wa:function(e,t,r){return(e=T.ka(e,t,41471,0)).link=r,e},Va:function(e){return 40960!=(61440&e.mode)&&g(new Q(N.A)),e.link}},e:{open:function(e){if(16384==(61440&e.d.mode)){var t,r=[".",".."];for(t in e.d.g)e.d.g.hasOwnProperty(t)&&r.push(t);e.lb=r}},Q:function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.subarray)t.set(e.subarray(i,i+n),r);else for(var a=0;at&&g(new Q(N.A)),e.Gb=[],e.position=t},ue:function(e){return e.lb},Wd:function(e,t,r){for(e=e.d.g,t+=r;t>e.length;)e.push(0)},ne:function(e,t,r,n,i,a,o){return 32768!=(61440&e.d.mode)&&g(new Q(N.wa)),e=e.d.g,2&o?((0e||0===e&&-1/0==1/e}function kc(e,t){function r(e){var r;return"double"===e?r=Ja[t+o>>3]:"i64"==e?(r=[B[t+o>>2],B[t+(o+8)>>2]],o+=8):(e="i32",r=B[t+o>>2]),o+=Math.max(Math.max(la(e),ma),8),r}for(var n,i,a=e,o=0,s=[];;){var f=a;if(0===(n=A[a]))break;if(i=A[a+1|0],37==n){var u=p,c=p,h=p,d=p;e:for(;;){switch(i){case 43:u=l;break;case 45:c=l;break;case 35:h=l;break;case 48:if(d)break e;d=l;break;default:break e}i=A[++a+1|0]}var b=0;if(42==i)b=r("i32"),i=A[++a+1|0];else for(;48<=i&&57>=i;)b=10*b+(i-48),i=A[++a+1|0];var v,g=p;if(46==i){var y=0;g=l;if(42==(i=A[++a+1|0]))y=r("i32"),a++;else for(;!(48>(i=A[a+1|0])||57>>0)+4294967296*+(n[1]>>>0):+(n[0]>>>0)+4294967296*+(0|n[1])),4>=v&&(n=(f?eb:db)(n&Math.pow(256,v)-1,8*v));var S=Math.abs(n);f="";if(100==i||105==i)w=8==v&&lc?lc.stringify(_[0],_[1],m):eb(n,8*v).toString(10);else if(117==i)w=8==v&&lc?lc.stringify(_[0],_[1],l):db(n,8*v).toString(10),n=Math.abs(n);else if(111==i)w=(h?"0":"")+S.toString(8);else if(120==i||88==i){if(f=h&&0!=n?"0x":"",8==v&&lc)if(_[1]){for(w=(_[1]>>>0).toString(16),h=(_[0]>>>0).toString(16);8>h.length;)h="0"+h;w+=h}else w=(_[0]>>>0).toString(16);else if(0>n){for(n=-n,w=(S-1).toString(16),_=[],h=0;hn?"-"+f:"+"+f);f.length+w.length(v=parseInt(n.toExponential(v).split("e")[1],10))&&-4<=v?(i=(103==i?"f":"F").charCodeAt(0),y-=v+1):(i=(103==i?"e":"E").charCodeAt(0),y--),v=Math.min(y,20)),101==i||69==i?(w=n.toExponential(v),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):102!=i&&70!=i||(w=n.toFixed(v),0===n&&jc(n)&&(w="-"+w)),f=w.split("e"),g&&!h)for(;1v++;)f[0]+="0";w=f[0]+(1n?"-":"")+"inf",d=p;for(;w.lengthi&&(w=w.toUpperCase()),w.split("").forEach(function(e){s.push(e.charCodeAt(0))});break;case"s":if(d=(u=r("i8*"))?ic(u):6,g&&(d=Math.min(d,y)),!c)for(;d>2]=s.length;break;case"%":s.push(n);break;default:for(h=f;h>12<<12,nc.ia=l,w(ua),nc.hb=ua,ua=function(){wa("cannot dynamically allocate, sbrk now has control")});var t=z;return 0!=e&&nc.hb(e),t}function U(){return B[U.m>>2]}function oc(){return!!oc.ta}function pc(e){var t=p;try{e==__ZTIi&&(t=l)}catch(e){}try{e==__ZTIj&&(t=l)}catch(e){}try{e==__ZTIl&&(t=l)}catch(e){}try{e==__ZTIm&&(t=l)}catch(e){}try{e==__ZTIx&&(t=l)}catch(e){}try{e==__ZTIy&&(t=l)}catch(e){}try{e==__ZTIf&&(t=l)}catch(e){}try{e==__ZTId&&(t=l)}catch(e){}try{e==__ZTIe&&(t=l)}catch(e){}try{e==__ZTIc&&(t=l)}catch(e){}try{e==__ZTIa&&(t=l)}catch(e){}try{e==__ZTIh&&(t=l)}catch(e){}try{e==__ZTIs&&(t=l)}catch(e){}try{e==__ZTIt&&(t=l)}catch(e){}return t}function qc(e,t,r){if(0==r)return p;if(0==t||t==e)return l;switch(pc(t)?t:B[B[t>>2]-8>>2]){case 0:return 0==B[B[e>>2]-8>>2]?qc(B[e+8>>2],B[t+8>>2],r):p;case 1:return p;case 2:return qc(e,B[t+8>>2],r);default:return p}}function rc(e,t,r){if(!rc.sb){try{B[__ZTVN10__cxxabiv119__pointer_type_infoE>>2]=0}catch(e){}try{B[pb>>2]=1}catch(e){}try{B[ob>>2]=2}catch(e){}rc.sb=l}B[U.m>>2]=e,B[U.m+4>>2]=t,B[U.m+8>>2]=r,"uncaught_exception"in oc?oc.ta++:oc.ta=1,g(e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.")}function sc(e){try{return tc(e)}catch(e){}}function uc(){if(uc.Bb)uc.Bb=p;else{V.setThrew(0),B[U.m+4>>2]=0;var e=B[U.m>>2],t=B[U.m+8>>2];t&&(na("vi",t,[e]),B[U.m+8>>2]=0),e&&(sc(e),B[U.m>>2]=0)}}s._strlen=ic;var vc=F(1,"i32*",E);function wc(e){var t,r;wc.ia?(r=B[vc>>2],t=B[r>>2]):(wc.ia=l,W.USER="root",W.PATH="/",W.PWD="/",W.HOME="/home/emscripten",W.LANG="en_US.UTF-8",W._="./this.program",t=F(1024,"i8",E),r=F(256,"i8*",E),B[r>>2]=t,B[vc>>2]=r);var n,i=[],a=0;for(n in e)if("string"==typeof e[n]){var o=n+"="+e[n];i.push(o),a+=o.length}for(1024>2]=t,t+=o.length+1}B[r+4*i.length>>2]=0}var W={};function xc(e){return 0===e?0:(e=Fa(e),W.hasOwnProperty(e)?(xc.J&&tc(xc.J),xc.J=F(J(W[e]),"i8",Ka),xc.J):0)}function yc(e,t,r){if(e in ub){if(ub[e].length>r-1)return M(N.ab);for(e=ub[e],r=0;r>2],B[SDL.screen+0*ma>>2]=8388608|e),Kc()}function Mc(){var e=s.canvas;e.width=this.Ib,e.height=this.Hb,"undefined"!=typeof SDL&&(e=Qa[SDL.screen+0*ma>>2],B[SDL.screen+0*ma>>2]=-8388609&e),Kc()}var Nc,Oc,Pc,Qc,rb=ra(4);B[rb>>2]=0;var Vb=Qb(m,"/",16895,0),Rc=T,Sc={type:Rc,se:{},Ua:"/",root:m},Tc;Tc=O("/",{N:p});var Uc=Rc.z(Sc);Uc.z=Sc,Sc.root=Uc,Tc&&(Tc.d.z=Sc,Tc.d.ub=l,Vb=Sc.root),zb("/tmp",511),zb("/dev",511),Nb[259]={e:{Q:function(){return 0},write:function(){return 0}}},Ab("/dev/null",438,259),Mb(1280,{Na:function(e){if(!e.input.length){var t=m;if(ca){if(process.Eb.be)return;t=process.Eb.Q()}else"undefined"!=typeof window&&"function"==typeof window.prompt?(t=window.prompt("Input: "))!==m&&(t+="\n"):"function"==typeof readline&&((t=readline())!==m&&(t+="\n"));if(!t)return m;e.input=J(t,l)}return e.input.shift()},W:function(e,t){t===m||10===t?(s.print(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Mb(1536,{W:function(e,t){t===m||10===t?(s.printErr(e.H.join("")),e.H=[]):e.H.push(Pb.oa(t))}}),Ab("/dev/tty",438,1280),Ab("/dev/tty1",438,1536),zb("/dev/shm",511),zb("/dev/shm/tmp",511),Xa.unshift({V:function(){if(!s.noFSInit&&!bc){w(!bc,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),bc=l,s.stdin=s.stdin,s.stdout=s.stdout,s.stderr=s.stderr,s.stdin?ec("/dev","stdin",s.stdin):Bb("/dev/tty","/dev/stdin"),s.stdout?ec("/dev","stdout",m,s.stdout):Bb("/dev/tty","/dev/stdout"),s.stderr?ec("/dev","stderr",m,s.stderr):Bb("/dev/tty1","/dev/stderr");var e=Db("/dev/stdin","r");B[Tb>>2]=e.s,w(1===e.s,"invalid handle for stdin ("+e.s+")"),e=Db("/dev/stdout","w"),B[Ub>>2]=e.s,w(2===e.s,"invalid handle for stdout ("+e.s+")"),e=Db("/dev/stderr","w"),B[nb>>2]=e.s,w(3===e.s,"invalid handle for stderr ("+e.s+")")}}}),Ya.push({V:function(){Yb=p}}),Za.push({V:function(){bc=p;for(var e=0;e>a-6&63;a=a-6,r=r+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f]}2==a?(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&n)<<4],r+="=="):4==a&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&n)<<2],r+="="),u.src="data:audio/x-"+t.substr(-3)+";base64,"+r,i(u)}},u.src=f,setTimeout(function(){za||i(u)},1e4)}});var h=s.canvas;h.qa=h.requestPointerLock||h.mozRequestPointerLock||h.webkitRequestPointerLock,h.La=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||aa(),h.La=h.La.bind(document),document.addEventListener("pointerlockchange",u,p),document.addEventListener("mozpointerlockchange",u,p),document.addEventListener("webkitpointerlockchange",u,p),s.elementPointerLock&&h.addEventListener("click",function(e){!Ec&&h.qa&&(h.qa(),e.preventDefault())},p)}var d,b=S.apply(m,[e,t]);if("/"==b[0]&&(b=b.substr(1)),ib("cp "+(d=b)),"string"==typeof r){var v=o,y=function(){v?v():g('Loading data file "'+r+'" failed.')},_=new XMLHttpRequest;_.open("GET",r,l),_.responseType="arraybuffer",_.onload=function(){if(200==_.status||0==_.status&&_.response){var e=_.response;w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),c(e=new Uint8Array(e)),jb("al "+r)}else y()},_.onerror=y,_.send(m),ib("al "+r)}else c(r)},s.FS_createLazyFile=function(e,t,r,n,i){var a,o;"undefined"!=typeof XMLHttpRequest?(ea||g("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc"),(a=function(){this.ma=p,this.T=[]}).prototype.get=function(e){if(!(e>this.length-1||0>e)){var t=e%this.S;return this.pb(Math.floor(e/this.S))[t]}},a.prototype.Cb=function(e){this.pb=e},a.prototype.Fa=function(){var e=new XMLHttpRequest;e.open("HEAD",r,p),e.send(m),200<=e.status&&300>e.status||304===e.status||g(Error("Couldn't load "+r+". Status: "+e.status));var t,n=Number(e.getResponseHeader("Content-length")),i=1048576;(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t||(i=n);var a=this;a.Cb(function(e){var t=e*i,o=(e+1)*i-1;o=Math.min(o,n-1);if(void 0===a.T[e]){var s=a.T;t>o&&g(Error("invalid range ("+t+", "+o+") or no bytes requested!")),o>n-1&&g(Error("only "+n+" bytes available! programmer error!"));var f=new XMLHttpRequest;f.open("GET",r,p),n!==i&&f.setRequestHeader("Range","bytes="+t+"-"+o),"undefined"!=typeof Uint8Array&&(f.responseType="arraybuffer"),f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined"),f.send(m),200<=f.status&&300>f.status||304===f.status||g(Error("Couldn't load "+r+". Status: "+f.status)),t=f.response!==k?new Uint8Array(f.response||[]):J(f.responseText||"",l),s[e]=t}return void 0===a.T[e]&&g(Error("doXHR failed!")),a.T[e]}),this.gb=n,this.fb=i,this.ma=l},a=new a,Object.defineProperty(a,"length",{get:function(){return this.ma||this.Fa(),this.gb}}),Object.defineProperty(a,"chunkSize",{get:function(){return this.ma||this.Fa(),this.fb}}),o=k):(o=r,a=k);var f;e=S("string"==typeof e?e:ac(e),t);f=yb(e,cc(n,i)),a?f.g=a:o&&(f.g=m,f.url=o);var u={};return Object.keys(f.e).forEach(function(e){var t=f.e[e];u[e]=function(){var e;if(f.ke||f.le||f.link||f.g)e=l;else{if(e=l,"undefined"!=typeof XMLHttpRequest&&g(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")),s.read)try{f.g=J(s.read(f.url),l)}catch(t){e=p}else g(Error("Cannot load without read() or XMLHttpRequest."));e||M(N.I)}return e||g(new Q(N.I)),t.apply(m,arguments)}}),u.Q=function(e,t,r,n,i){if(e=e.d.g,n=Math.min(e.length-i,n),e.slice)for(var a=0;a>3<<3;return t|0}function at(){return l|0}function ot(e){e=e|0;l=e}function st(e,t){e=e|0;t=t|0;if((k|0)==0){k=e;x=t}}function ft(e){e=e|0;n[d]=n[e];n[d+1|0]=n[e+1|0];n[d+2|0]=n[e+2|0];n[d+3|0]=n[e+3|0]}function ut(e){e=e|0;n[d]=n[e];n[d+1|0]=n[e+1|0];n[d+2|0]=n[e+2|0];n[d+3|0]=n[e+3|0];n[d+4|0]=n[e+4|0];n[d+5|0]=n[e+5|0];n[d+6|0]=n[e+6|0];n[d+7|0]=n[e+7|0]}function ct(e){e=e|0;N=e}function lt(e){e=e|0;L=e}function ht(e){e=e|0;F=e}function dt(e){e=e|0;z=e}function pt(e){e=e|0;H=e}function bt(e){e=e|0;U=e}function vt(e){e=e|0;D=e}function mt(e){e=e|0;q=e}function gt(e){e=e|0;K=e}function yt(e){e=e|0;Y=e}function wt(){a[170]=y+8;a[172]=g+8;a[176]=g+8}function _t(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)==0){return}else{i=0}do{n[e+i|0]=n[t+i|0]|0;i=i+1|0}while(i>>>0>>0);return}function St(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0;if((r|0)==0){return}else{i=0}do{a=e+i|0;n[a]=n[a]^n[t+i|0];i=i+1|0}while(i>>>0>>0);return}function kt(e){e=e|0;var t=0,r=0,n=0,i=0;t=o[e+1|0]|0;r=o[e+2|0]|0;n=o[e+3|0]|0;i=rn(t<<8|0>>>24|(o[e]|0)|(r<<16|0>>>16)|(n<<24|0>>>8)|(0<<8|0>>>24),0<<8|t>>>24|(0<<16|r>>>16)|(0<<24|n>>>8)|(o[e+4|0]|0)|((o[e+5|0]|0)<<8|0>>>24),0<<16|0>>>16,(o[e+6|0]|0)<<16|0>>>16)|0;n=rn(i,N,0<<24|0>>>8,(o[e+7|0]|0)<<24|0>>>8)|0;return(N=N,n)|0}function xt(e){e=e|0;return(o[e+1|0]|0)<<8|(o[e]|0)|(o[e+2|0]|0)<<16|(o[e+3|0]|0)<<24|0}function At(e,t){e=e|0;t=t|0;n[e]=t&255;n[e+1|0]=t>>>8&255;n[e+2|0]=t>>>16&255;n[e+3|0]=t>>>24&255;return}function Mt(e){e=e|0;a[e+36>>2]=0;a[e+32>>2]=0;a[e>>2]=1779033703;a[e+4>>2]=-1150833019;a[e+8>>2]=1013904242;a[e+12>>2]=-1521486534;a[e+16>>2]=1359893119;a[e+20>>2]=-1694144372;a[e+24>>2]=528734635;a[e+28>>2]=1541459225;return}function Et(e,t,r,n,i,o,s,f,u,c){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;o=o|0;s=s|0;f=f|0;u=u|0;c=c|0;var l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0;l=dn(f,0,s,0)|0;h=N;d=0;if(h>>>0>d>>>0|h>>>0==d>>>0&l>>>0>1073741823>>>0){a[($e()|0)>>2]=27;p=-1;return p|0}l=rn(i,o,-1,-1)|0;if((l&i|0)!=0|(N&o|0)!=0|(i|0)==0&(o|0)==0){a[($e()|0)>>2]=22;p=-1;return p|0}do{if(!((33554431/(f>>>0)|0)>>>0>>0|s>>>0>16777215)){l=0;if(l>>>0>>0|l>>>0==o>>>0&(33554431/(s>>>0)|0)>>>0>>0){break}l=s<<7;d=Kt(oe(l,f)|0)|0;if((d|0)==0){p=-1;return p|0}h=Kt(s<<8)|0;do{if((h|0)!=0){b=dn(l,0,i,o)|0;v=Kt(b)|0;if((v|0)==0){Yt(h);break}b=oe(f<<7,s)|0;Dt(e,t,r,n,1,0,d,b);if((f|0)!=0){m=s<<7;g=0;do{Tt(d+(oe(m,g)|0)|0,s,i,o,v,h);g=g+1|0}while(g>>>0>>0)}Dt(e,t,d,b,1,0,u,c);Yt(v);Yt(h);Yt(d);p=0;return p|0}}while(0);Yt(d);p=-1;return p|0}}while(0);a[($e()|0)>>2]=12;p=-1;return p|0}function Tt(e,t,r,n,i,a){e=e|0;t=t|0;r=r|0;n=n|0;i=i|0;a=a|0;var o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0;o=t<<7;s=a+o|0;_t(a,e,o);if((r|0)==0&(n|0)==0){_t(e,a,o);return}f=o;u=0;c=0;l=0;do{h=dn(l,c,f,u)|0;_t(i+h|0,a,o);It(a,s,t);l=rn(l,c,1,0)|0;c=N}while(c>>>0>>0|c>>>0==n>>>0&l>>>0>>0);if((r|0)==0&(n|0)==0){_t(e,a,o);return}l=rn(r,n,-1,-1)|0;c=N;u=o;f=0;h=0;d=0;do{p=Pt(a,t)|0;b=dn(p&l,N&c,u,f)|0;St(a,i+b|0,o);It(a,s,t);d=rn(d,h,1,0)|0;h=N}while(h>>>0>>0|h>>>0==n>>>0&d>>>0>>0);_t(e,a,o);return}function It(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,a=0,o=0,s=0,f=0,u=0;n=l;l=l+64|0;i=n|0;a=r<<1;_t(i,e+((r<<7)-64)|0,64);if((a|0)!=0){o=0;do{s=o<<6;St(i,e+s|0,64);Ot(i);_t(t+s|0,i,64);o=o+1|0}while(o>>>0>>0)}if((r|0)==0){l=n;return}else{f=0}do{_t(e+(f<<6)|0,t+(f<<7)|0,64);f=f+1|0}while(f>>>0>>0);if((r|0)==0){l=n;return}else{u=0}do{_t(e+(u+r<<6)|0,t+(u<<7|64)|0,64);u=u+1|0}while(u>>>0>>0);l=n;return}function Pt(e,t){e=e|0;t=t|0;var r=0;r=kt(e+((t<<7)-64)|0)|0;return(N=N,r)|0}function Ot(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,U=0,D=0,q=0,K=0,Y=0,V=0,W=0,X=0,Z=0,G=0,Q=0,$=0,J=0,ee=0,te=0;t=l;l=l+128|0;r=t|0;n=t+64|0;i=0;do{a[r+(i<<2)>>2]=xt(e+(i<<2)|0)|0;i=i+1|0}while(i>>>0<16);i=r;o=n;Jr(o|0,i|0,64)|0;i=n|0;o=n+48|0;s=n+16|0;f=n+32|0;u=n+20|0;c=n+4|0;h=n+36|0;d=n+52|0;p=n+40|0;b=n+24|0;v=n+56|0;m=n+8|0;g=n+60|0;y=n+44|0;w=n+12|0;_=n+28|0;S=0;k=a[i>>2]|0;x=a[o>>2]|0;A=a[s>>2]|0;M=a[f>>2]|0;E=a[u>>2]|0;T=a[c>>2]|0;I=a[h>>2]|0;P=a[d>>2]|0;O=a[p>>2]|0;R=a[b>>2]|0;C=a[v>>2]|0;B=a[m>>2]|0;j=a[g>>2]|0;N=a[y>>2]|0;L=a[w>>2]|0;F=a[_>>2]|0;do{z=x+k|0;H=(z<<7|z>>>25)^A;z=H+k|0;U=(z<<9|z>>>23)^M;z=U+H|0;D=(z<<13|z>>>19)^x;z=D+U|0;q=(z<<18|z>>>14)^k;z=T+E|0;K=(z<<7|z>>>25)^I;z=K+E|0;Y=(z<<9|z>>>23)^P;z=Y+K|0;V=(z<<13|z>>>19)^T;z=V+Y|0;W=(z<<18|z>>>14)^E;z=R+O|0;X=(z<<7|z>>>25)^C;z=X+O|0;Z=(z<<9|z>>>23)^B;z=Z+X|0;G=(z<<13|z>>>19)^R;z=G+Z|0;Q=(z<<18|z>>>14)^O;z=N+j|0;$=(z<<7|z>>>25)^L;z=$+j|0;J=(z<<9|z>>>23)^F;z=J+$|0;ee=(z<<13|z>>>19)^N;z=ee+J|0;te=(z<<18|z>>>14)^j;z=$+q|0;T=(z<<7|z>>>25)^V;V=T+q|0;B=(V<<9|V>>>23)^Z;Z=B+T|0;L=(Z<<13|Z>>>19)^$;$=L+B|0;k=($<<18|$>>>14)^q;q=H+W|0;R=(q<<7|q>>>25)^G;G=R+W|0;F=(G<<9|G>>>23)^J;J=F+R|0;A=(J<<13|J>>>19)^H;H=A+F|0;E=(H<<18|H>>>14)^W;W=K+Q|0;N=(W<<7|W>>>25)^ee;ee=N+Q|0;M=(ee<<9|ee>>>23)^U;U=M+N|0;I=(U<<13|U>>>19)^K;K=I+M|0;O=(K<<18|K>>>14)^Q;Q=X+te|0;x=(Q<<7|Q>>>25)^D;D=x+te|0;P=(D<<9|D>>>23)^Y;Y=P+x|0;C=(Y<<13|Y>>>19)^X;X=C+P|0;j=(X<<18|X>>>14)^te;S=S+2|0}while(S>>>0<8);a[i>>2]=k;a[o>>2]=x;a[s>>2]=A;a[f>>2]=M;a[u>>2]=E;a[c>>2]=T;a[h>>2]=I;a[d>>2]=P;a[p>>2]=O;a[b>>2]=R;a[v>>2]=C;a[m>>2]=B;a[g>>2]=j;a[y>>2]=N;a[w>>2]=L;a[_>>2]=F;F=r|0;a[F>>2]=(a[F>>2]|0)+(a[n>>2]|0);F=r+4|0;a[F>>2]=(a[F>>2]|0)+(a[n+4>>2]|0);F=r+8|0;a[F>>2]=(a[F>>2]|0)+(a[n+8>>2]|0);F=r+12|0;a[F>>2]=(a[F>>2]|0)+(a[n+12>>2]|0);F=r+16|0;a[F>>2]=(a[F>>2]|0)+(a[n+16>>2]|0);F=r+20|0;a[F>>2]=(a[F>>2]|0)+(a[n+20>>2]|0);F=r+24|0;a[F>>2]=(a[F>>2]|0)+(a[n+24>>2]|0);F=r+28|0;a[F>>2]=(a[F>>2]|0)+(a[n+28>>2]|0);F=r+32|0;a[F>>2]=(a[F>>2]|0)+(a[n+32>>2]|0);F=r+36|0;a[F>>2]=(a[F>>2]|0)+(a[n+36>>2]|0);F=r+40|0;a[F>>2]=(a[F>>2]|0)+(a[n+40>>2]|0);F=r+44|0;a[F>>2]=(a[F>>2]|0)+(a[n+44>>2]|0);F=r+48|0;a[F>>2]=(a[F>>2]|0)+(a[n+48>>2]|0);F=r+52|0;a[F>>2]=(a[F>>2]|0)+(a[n+52>>2]|0);F=r+56|0;a[F>>2]=(a[F>>2]|0)+(a[n+56>>2]|0);F=r+60|0;a[F>>2]=(a[F>>2]|0)+(a[n+60>>2]|0);n=0;do{At(e+(n<<2)|0,a[r+(n<<2)>>2]|0);n=n+1|0}while(n>>>0<16);l=t;return}function Rt(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0,o=0,s=0,f=0,u=0,c=0;n=e+32|0;i=e+36|0;o=a[i>>2]|0;s=o>>>3&63;f=De(o|0,r<<3|0)|0;a[i>>2]=f;if(N){f=n|0;a[f>>2]=(a[f>>2]|0)+1}f=n|0;a[f>>2]=(a[f>>2]|0)+(r>>>29);f=64-s|0;n=e+40+s|0;if(f>>>0>r>>>0){Jr(n|0,t|0,r)|0;return}Jr(n|0,t|0,f)|0;n=e|0;s=e+40|0;Ct(n,s);e=t+f|0;t=r-f|0;if(t>>>0>63){f=t;r=e;while(1){Ct(n,r);i=r+64|0;o=f-64|0;if(o>>>0>63){f=o;r=i}else{u=o;c=i;break}}}else{u=t;c=e}Jr(s|0,c|0,u)|0;return}function Ct(e,t){e=e|0;t=t|0;var r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0;r=l;l=l+288|0;n=r|0;i=r+256|0;o=n|0;qt(o,t);t=16;do{s=a[n+(t-2<<2)>>2]|0;f=a[n+(t-15<<2)>>2]|0;a[n+(t<<2)>>2]=(a[n+(t-16<<2)>>2]|0)+(a[n+(t-7<<2)>>2]|0)+((s>>>19|s<<13)^s>>>10^(s>>>17|s<<15))+((f>>>18|f<<14)^f>>>3^(f>>>7|f<<25));t=t+1|0}while((t|0)<64);t=i;f=e;Jr(t|0,f|0,32)|0;f=i+28|0;t=i+16|0;s=a[t>>2]|0;u=i+20|0;c=i+24|0;h=a[c>>2]|0;d=(a[f>>2]|0)+1116352408+(a[o>>2]|0)+((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+((h^a[u>>2])&s^h)|0;h=i|0;s=a[h>>2]|0;o=i+4|0;p=a[o>>2]|0;b=i+8|0;v=a[b>>2]|0;m=i+12|0;a[m>>2]=(a[m>>2]|0)+d;g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+d+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+1899447441+(a[n+4>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=d;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1245643825+(a[n+8>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;d=(a[t>>2]|0)-373957723+(a[n+12>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[h>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+961987163+(a[n+16>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=d;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1508970993+(a[n+20>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[h>>2]|0;d=(a[o>>2]|0)-1841331548+(a[n+24>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[h>>2]|0)-1424204075+(a[n+28>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[h>>2]=d;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)-670586216+(a[n+32>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;d=(a[c>>2]|0)+310598401+(a[n+36>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+607225278+(a[n+40>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=d;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1426881987+(a[n+44>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[t>>2]=s;v=a[h>>2]|0;p=a[b>>2]|0;d=(a[m>>2]|0)+1925078388+(a[n+48>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-2132889090+(a[n+52>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=d;v=a[c>>2]|0;p=a[h>>2]|0;g=(a[o>>2]|0)-1680079193+(a[n+56>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;d=(a[h>>2]|0)-1046744716+(a[n+60>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[h>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-459576895+(a[n+64>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=d;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-272742522+(a[n+68>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;d=(a[u>>2]|0)+264347078+(a[n+72>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)+604807628+(a[n+76>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=d;v=a[h>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)+770255983+(a[n+80>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;d=(a[b>>2]|0)+1249150122+(a[n+84>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[h>>2]|0;s=(a[o>>2]|0)+1555081692+(a[n+88>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=d;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[h>>2]|0)+1996064986+(a[n+92>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[h>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;d=(a[f>>2]|0)-1740746414+(a[n+96>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)-1473132947+(a[n+100>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=d;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)-1341970488+(a[n+104>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;d=(a[t>>2]|0)-1084653625+(a[n+108>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[h>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)-958395405+(a[n+112>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=d;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)-710438585+(a[n+116>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[h>>2]|0;d=(a[o>>2]|0)+113926993+(a[n+120>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[h>>2]|0)+338241895+(a[n+124>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[h>>2]=d;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+666307205+(a[n+128>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;d=(a[c>>2]|0)+773529912+(a[n+132>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)+1294757372+(a[n+136>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=d;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)+1396182291+(a[n+140>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[t>>2]=s;v=a[h>>2]|0;p=a[b>>2]|0;d=(a[m>>2]|0)+1695183700+(a[n+144>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)+1986661051+(a[n+148>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=d;v=a[c>>2]|0;p=a[h>>2]|0;g=(a[o>>2]|0)-2117940946+(a[n+152>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[o>>2]=s;p=a[u>>2]|0;v=a[f>>2]|0;d=(a[h>>2]|0)-1838011259+(a[n+156>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[h>>2]=g;v=a[t>>2]|0;p=a[c>>2]|0;s=(a[f>>2]|0)-1564481375+(a[n+160>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[f>>2]=d;p=a[m>>2]|0;v=a[u>>2]|0;g=(a[c>>2]|0)-1474664885+(a[n+164>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[c>>2]=s;v=a[b>>2]|0;p=a[t>>2]|0;d=(a[u>>2]|0)-1035236496+(a[n+168>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[u>>2]=g;p=a[o>>2]|0;v=a[m>>2]|0;s=(a[t>>2]|0)-949202525+(a[n+172>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[t>>2]=d;v=a[h>>2]|0;p=a[b>>2]|0;g=(a[m>>2]|0)-778901479+(a[n+176>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[m>>2]=s;p=a[f>>2]|0;v=a[o>>2]|0;d=(a[b>>2]|0)-694614492+(a[n+180>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[b>>2]=g;v=a[c>>2]|0;p=a[h>>2]|0;s=(a[o>>2]|0)-200395387+(a[n+184>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[o>>2]=d;p=a[u>>2]|0;v=a[f>>2]|0;g=(a[h>>2]|0)+275423344+(a[n+188>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[h>>2]=s;v=a[t>>2]|0;p=a[c>>2]|0;d=(a[f>>2]|0)+430227734+(a[n+192>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[f>>2]=g;p=a[m>>2]|0;v=a[u>>2]|0;s=(a[c>>2]|0)+506948616+(a[n+196>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[c>>2]=d;v=a[b>>2]|0;p=a[t>>2]|0;g=(a[u>>2]|0)+659060556+(a[n+200>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[u>>2]=s;p=a[o>>2]|0;v=a[m>>2]|0;d=(a[t>>2]|0)+883997877+(a[n+204>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[t>>2]=g;v=a[h>>2]|0;p=a[b>>2]|0;s=(a[m>>2]|0)+958139571+(a[n+208>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[m>>2]=d;p=a[f>>2]|0;v=a[o>>2]|0;g=(a[b>>2]|0)+1322822218+(a[n+212>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[b>>2]=s;v=a[c>>2]|0;p=a[h>>2]|0;d=(a[o>>2]|0)+1537002063+(a[n+216>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[o>>2]=g;p=a[u>>2]|0;v=a[f>>2]|0;s=(a[h>>2]|0)+1747873779+(a[n+220>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[c>>2])&p^v)|0;v=a[b>>2]|0;p=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[h>>2]=d;v=a[t>>2]|0;p=a[c>>2]|0;g=(a[f>>2]|0)+1955562222+(a[n+224>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[u>>2])&v^p)|0;p=a[o>>2]|0;v=a[b>>2]|0;a[m>>2]=(a[m>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[f>>2]=s;p=a[m>>2]|0;v=a[u>>2]|0;d=(a[c>>2]|0)+2024104815+(a[n+228>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[t>>2])&p^v)|0;v=a[h>>2]|0;p=a[o>>2]|0;a[b>>2]=(a[b>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((p|v)&s|p&v)|0;a[c>>2]=g;v=a[b>>2]|0;p=a[t>>2]|0;s=(a[u>>2]|0)-2067236844+(a[n+232>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[m>>2])&v^p)|0;p=a[f>>2]|0;v=a[h>>2]|0;a[o>>2]=(a[o>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((v|p)&g|v&p)|0;a[u>>2]=d;p=a[o>>2]|0;v=a[m>>2]|0;g=(a[t>>2]|0)-1933114872+(a[n+236>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[b>>2])&p^v)|0;v=a[c>>2]|0;p=a[f>>2]|0;a[h>>2]=(a[h>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((p|v)&d|p&v)|0;a[t>>2]=s;v=a[h>>2]|0;p=a[b>>2]|0;d=(a[m>>2]|0)-1866530822+(a[n+240>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[o>>2])&v^p)|0;p=a[u>>2]|0;v=a[c>>2]|0;a[f>>2]=(a[f>>2]|0)+d;g=d+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((v|p)&s|v&p)|0;a[m>>2]=g;p=a[f>>2]|0;v=a[o>>2]|0;s=(a[b>>2]|0)-1538233109+(a[n+244>>2]|0)+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+((v^a[h>>2])&p^v)|0;v=a[t>>2]|0;p=a[u>>2]|0;a[c>>2]=(a[c>>2]|0)+s;d=s+((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+((p|v)&g|p&v)|0;a[b>>2]=d;v=a[c>>2]|0;p=a[h>>2]|0;g=(a[o>>2]|0)-1090935817+(a[n+248>>2]|0)+((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+((p^a[f>>2])&v^p)|0;p=a[m>>2]|0;v=a[t>>2]|0;a[u>>2]=(a[u>>2]|0)+g;s=g+((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+((v|p)&d|v&p)|0;a[o>>2]=s;o=a[u>>2]|0;u=a[f>>2]|0;f=(a[h>>2]|0)-965641998+(a[n+252>>2]|0)+((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+((u^a[c>>2])&o^u)|0;u=a[b>>2]|0;b=a[m>>2]|0;a[t>>2]=(a[t>>2]|0)+f;t=f+((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+((b|u)&s|b&u)|0;a[h>>2]=t;a[e>>2]=(a[e>>2]|0)+t;t=e+4|0;a[t>>2]=(a[t>>2]|0)+(a[i+4>>2]|0);t=e+8|0;a[t>>2]=(a[t>>2]|0)+(a[i+8>>2]|0);t=e+12|0;a[t>>2]=(a[t>>2]|0)+(a[i+12>>2]|0);t=e+16|0;a[t>>2]=(a[t>>2]|0)+(a[i+16>>2]|0);t=e+20|0;a[t>>2]=(a[t>>2]|0)+(a[i+20>>2]|0);t=e+24|0;a[t>>2]=(a[t>>2]|0)+(a[i+24>>2]|0);t=e+28|0;a[t>>2]=(a[t>>2]|0)+(a[i+28>>2]|0);l=r;return}function Bt(e,t){e=e|0;t=t|0;n[e+3|0]=t&255;n[e+2|0]=t>>>8&255;n[e+1|0]=t>>>16&255;n[e]=t>>>24&255;return}function jt(e){e=e|0;return(o[e+2|0]|0)<<8|(o[e+3|0]|0)|(o[e+1|0]|0)<<16|(o[e]|0)<<24|0}function Nt(e,t){e=e|0;t=t|0;Lt(t);Ft(e,t|0,32);en(t|0,0,104);return}function Lt(e){e=e|0;var t=0,r=0,n=0;t=l;l=l+8|0;r=t|0;Ft(r,e+32|0,8);n=(a[e+36>>2]|0)>>>3&63;Rt(e,720,(n>>>0<56?56:120)-n|0);Rt(e,r,8);l=t;return}function Ft(e,t,r){e=e|0;t=t|0;r=r|0;var n=0,i=0;n=r>>>2;if((n|0)==0){return}else{i=0}do{Bt(e+(i<<2)|0,a[t+(i<<2)>>2]|0);i=i+1|0}while(i>>>0>>0);return}function zt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,a=0,o=0,s=0,f=0,u=0,c=0;i=l;l=l+96|0;a=i|0;if(r>>>0>64){o=e|0;Mt(o);Rt(o,t,r);s=i+64|0;Nt(s,o);f=s;u=32}else{f=t;u=r}r=e|0;Mt(r);t=a|0;en(t|0,54,64);if((u|0)!=0){s=0;do{o=a+s|0;n[o]=n[o]^n[f+s|0];s=s+1|0}while(s>>>0>>0)}Rt(r,t,64);r=e+104|0;Mt(r);en(t|0,92,64);if((u|0)==0){Rt(r,t,64);l=i;return}else{c=0}do{e=a+c|0;n[e]=n[e]^n[f+c|0];c=c+1|0}while(c>>>0>>0);Rt(r,t,64);l=i;return}function Ht(e,t,r){e=e|0;t=t|0;r=r|0;Rt(e|0,t,r);return}function Ut(e,t){e=e|0;t=t|0;var r=0,n=0,i=0;r=l;l=l+32|0;n=r|0;Nt(n,t|0);i=t+104|0;Rt(i,n,32);Nt(e,i);l=r;return}function Dt(e,t,r,i,a,o,s,f){e=e|0;t=t|0;r=r|0;i=i|0;a=a|0;o=o|0;s=s|0;f=f|0;var u=0,c=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0;u=l;l=l+488|0;c=u|0;h=u+208|0;d=u+424|0;p=u+456|0;zt(c,e,t);Ht(c,r,i);if((f|0)==0){l=u;return}i=u+416|0;r=h;b=c;c=d|0;v=p|0;m=0;g=o>>>0>>0|o>>>0==m>>>0&a>>>0<2>>>0;m=0;y=0;do{m=m+1|0;Bt(i,m);Jr(r|0,b|0,208)|0;Ht(h,i,4);Ut(c,h);Jr(v|0,c|0,32)|0;if(!g){w=0;_=2;do{zt(h,e,t);Ht(h,c,32);Ut(c,h);S=0;do{k=p+S|0;n[k]=n[k]^n[d+S|0];S=S+1|0}while((S|0)<32);_=rn(_,w,1,0)|0;w=N}while(!(w>>>0>o>>>0|w>>>0==o>>>0&_>>>0>a>>>0))}_=f-y|0;w=_>>>0>32?32:_;_=s+y|0;Jr(_|0,v|0,w)|0;y=m<<5}while(y>>>0>>0);l=u;return}function qt(e,t){e=e|0;t=t|0;var r=0;r=0;do{a[e+(r<<2)>>2]=jt(t+(r<<2)|0)|0;r=r+1|0}while(r>>>0<16);return}function Kt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0,U=0,D=0,q=0,K=0,Y=0,V=0,W=0,X=0,Z=0,G=0,Q=0,$=0,J=0,ee=0,te=0,re=0,ne=0,ie=0,ae=0,oe=0,se=0,fe=0,ue=0,ce=0,le=0,he=0,de=0,pe=0,be=0,ve=0,me=0,ge=0,ye=0,_e=0,Se=0,xe=0,Ae=0,Me=0,Ee=0,Te=0,Ie=0,Pe=0,Oe=0,Re=0,Ce=0,Be=0;do{if(e>>>0<245){if(e>>>0<11){t=16}else{t=e+11&-8}r=t>>>3;n=a[208]|0;i=n>>>(r>>>0);if((i&3|0)!=0){o=(i&1^1)+r|0;s=o<<1;f=872+(s<<2)|0;u=872+(s+2<<2)|0;s=a[u>>2]|0;c=s+8|0;l=a[c>>2]|0;do{if((f|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}h=l+12|0;if((a[h>>2]|0)==(s|0)){a[h>>2]=f;a[u>>2]=l;break}else{ke();return 0}}}while(0);l=o<<3;a[s+4>>2]=l|3;u=s+(l|4)|0;a[u>>2]=a[u>>2]|1;d=c;return d|0}if(t>>>0<=(a[210]|0)>>>0){p=t;break}if((i|0)!=0){u=2<>>12&16;f=u>>>(l>>>0);u=f>>>5&8;h=f>>>(u>>>0);f=h>>>2&4;b=h>>>(f>>>0);h=b>>>1&2;v=b>>>(h>>>0);b=v>>>1&1;m=(u|l|f|h|b)+(v>>>(b>>>0))|0;b=m<<1;v=872+(b<<2)|0;h=872+(b+2<<2)|0;b=a[h>>2]|0;f=b+8|0;l=a[f>>2]|0;do{if((v|0)==(l|0)){a[208]=n&~(1<>>0<(a[212]|0)>>>0){ke();return 0}u=l+12|0;if((a[u>>2]|0)==(b|0)){a[u>>2]=v;a[h>>2]=l;break}else{ke();return 0}}}while(0);l=m<<3;h=l-t|0;a[b+4>>2]=t|3;v=b;n=v+t|0;a[v+(t|4)>>2]=h|1;a[v+l>>2]=h;l=a[210]|0;if((l|0)!=0){v=a[213]|0;r=l>>>3;l=r<<1;i=872+(l<<2)|0;c=a[208]|0;s=1<>2]|0;if(o>>>0>=(a[212]|0)>>>0){g=o;y=r;break}ke();return 0}}while(0);a[y>>2]=v;a[g+12>>2]=v;a[v+8>>2]=g;a[v+12>>2]=i}a[210]=h;a[213]=n;d=f;return d|0}l=a[209]|0;if((l|0)==0){p=t;break}s=(l&-l)-1|0;l=s>>>12&16;c=s>>>(l>>>0);s=c>>>5&8;b=c>>>(s>>>0);c=b>>>2&4;m=b>>>(c>>>0);b=m>>>1&2;r=m>>>(b>>>0);m=r>>>1&1;o=a[1136+((s|l|c|b|m)+(r>>>(m>>>0))<<2)>>2]|0;m=o;r=o;b=(a[o+4>>2]&-8)-t|0;while(1){o=a[m+16>>2]|0;if((o|0)==0){c=a[m+20>>2]|0;if((c|0)==0){break}else{w=c}}else{w=o}o=(a[w+4>>2]&-8)-t|0;c=o>>>0>>0;m=w;r=c?w:r;b=c?o:b}m=r;f=a[212]|0;if(m>>>0>>0){ke();return 0}n=m+t|0;h=n;if(m>>>0>=n>>>0){ke();return 0}n=a[r+24>>2]|0;i=a[r+12>>2]|0;do{if((i|0)==(r|0)){v=r+20|0;o=a[v>>2]|0;if((o|0)==0){c=r+16|0;l=a[c>>2]|0;if((l|0)==0){_=0;break}else{S=l;k=c}}else{S=o;k=v}while(1){v=S+20|0;o=a[v>>2]|0;if((o|0)!=0){S=o;k=v;continue}v=S+16|0;o=a[v>>2]|0;if((o|0)==0){break}else{S=o;k=v}}if(k>>>0>>0){ke();return 0}else{a[k>>2]=0;_=S;break}}else{v=a[r+8>>2]|0;if(v>>>0>>0){ke();return 0}o=v+12|0;if((a[o>>2]|0)!=(r|0)){ke();return 0}c=i+8|0;if((a[c>>2]|0)==(r|0)){a[o>>2]=i;a[c>>2]=v;_=i;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){i=r+28|0;f=1136+(a[i>>2]<<2)|0;do{if((r|0)==(a[f>>2]|0)){a[f>>2]=_;if((_|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}v=n+16|0;if((a[v>>2]|0)==(r|0)){a[v>>2]=_}else{a[n+20>>2]=_}if((_|0)==0){break e}}}while(0);if(_>>>0<(a[212]|0)>>>0){ke();return 0}a[_+24>>2]=n;i=a[r+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+16>>2]=i;a[i+24>>2]=_;break}}}while(0);i=a[r+20>>2]|0;if((i|0)==0){break}if(i>>>0<(a[212]|0)>>>0){ke();return 0}else{a[_+20>>2]=i;a[i+24>>2]=_;break}}}while(0);if(b>>>0<16){n=b+t|0;a[r+4>>2]=n|3;i=m+(n+4)|0;a[i>>2]=a[i>>2]|1}else{a[r+4>>2]=t|3;a[m+(t|4)>>2]=b|1;a[m+(b+t)>>2]=b;i=a[210]|0;if((i|0)!=0){n=a[213]|0;f=i>>>3;i=f<<1;v=872+(i<<2)|0;c=a[208]|0;o=1<>2]|0;if(l>>>0>=(a[212]|0)>>>0){x=l;A=f;break}ke();return 0}}while(0);a[A>>2]=n;a[x+12>>2]=n;a[n+8>>2]=x;a[n+12>>2]=v}a[210]=b;a[213]=h}i=r+8|0;if((i|0)==0){p=t;break}else{d=i}return d|0}else{if(e>>>0>4294967231){p=-1;break}i=e+11|0;o=i&-8;c=a[209]|0;if((c|0)==0){p=o;break}m=-o|0;f=i>>>8;do{if((f|0)==0){M=0}else{if(o>>>0>16777215){M=31;break}i=(f+1048320|0)>>>16&8;l=f<>>16&4;u=l<>>16&2;E=14-(s|i|l)+(u<>>15)|0;M=o>>>((E+7|0)>>>0)&1|E<<1}}while(0);f=a[1136+(M<<2)>>2]|0;e:do{if((f|0)==0){T=0;I=m;P=0}else{if((M|0)==31){O=0}else{O=25-(M>>>1)|0}r=0;h=m;b=f;v=o<>2]&-8;l=E-o|0;if(l>>>0>>0){if((E|0)==(o|0)){T=b;I=l;P=b;break e}else{R=b;C=l}}else{R=r;C=h}l=a[b+20>>2]|0;E=a[b+16+(v>>>31<<2)>>2]|0;u=(l|0)==0|(l|0)==(E|0)?n:l;if((E|0)==0){T=R;I=C;P=u;break}else{r=R;h=C;b=E;v=v<<1;n=u}}}}while(0);if((P|0)==0&(T|0)==0){f=2<>>12&16;n=f>>>(m>>>0);f=n>>>5&8;v=n>>>(f>>>0);n=v>>>2&4;b=v>>>(n>>>0);v=b>>>1&2;h=b>>>(v>>>0);b=h>>>1&1;B=a[1136+((f|m|n|v|b)+(h>>>(b>>>0))<<2)>>2]|0}else{B=P}if((B|0)==0){j=I;N=T}else{b=B;h=I;v=T;while(1){n=(a[b+4>>2]&-8)-o|0;m=n>>>0>>0;f=m?n:h;n=m?b:v;m=a[b+16>>2]|0;if((m|0)!=0){b=m;h=f;v=n;continue}m=a[b+20>>2]|0;if((m|0)==0){j=f;N=n;break}else{b=m;h=f;v=n}}}if((N|0)==0){p=o;break}if(j>>>0>=((a[210]|0)-o|0)>>>0){p=o;break}v=N;h=a[212]|0;if(v>>>0>>0){ke();return 0}b=v+o|0;c=b;if(v>>>0>=b>>>0){ke();return 0}n=a[N+24>>2]|0;f=a[N+12>>2]|0;do{if((f|0)==(N|0)){m=N+20|0;r=a[m>>2]|0;if((r|0)==0){u=N+16|0;E=a[u>>2]|0;if((E|0)==0){L=0;break}else{F=E;z=u}}else{F=r;z=m}while(1){m=F+20|0;r=a[m>>2]|0;if((r|0)!=0){F=r;z=m;continue}m=F+16|0;r=a[m>>2]|0;if((r|0)==0){break}else{F=r;z=m}}if(z>>>0>>0){ke();return 0}else{a[z>>2]=0;L=F;break}}else{m=a[N+8>>2]|0;if(m>>>0>>0){ke();return 0}r=m+12|0;if((a[r>>2]|0)!=(N|0)){ke();return 0}u=f+8|0;if((a[u>>2]|0)==(N|0)){a[r>>2]=f;a[u>>2]=m;L=f;break}else{ke();return 0}}}while(0);e:do{if((n|0)!=0){f=N+28|0;h=1136+(a[f>>2]<<2)|0;do{if((N|0)==(a[h>>2]|0)){a[h>>2]=L;if((L|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(n>>>0<(a[212]|0)>>>0){ke();return 0}m=n+16|0;if((a[m>>2]|0)==(N|0)){a[m>>2]=L}else{a[n+20>>2]=L}if((L|0)==0){break e}}}while(0);if(L>>>0<(a[212]|0)>>>0){ke();return 0}a[L+24>>2]=n;f=a[N+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+16>>2]=f;a[f+24>>2]=L;break}}}while(0);f=a[N+20>>2]|0;if((f|0)==0){break}if(f>>>0<(a[212]|0)>>>0){ke();return 0}else{a[L+20>>2]=f;a[f+24>>2]=L;break}}}while(0);do{if(j>>>0<16){n=j+o|0;a[N+4>>2]=n|3;f=v+(n+4)|0;a[f>>2]=a[f>>2]|1}else{a[N+4>>2]=o|3;a[v+(o|4)>>2]=j|1;a[v+(j+o)>>2]=j;f=j>>>3;if(j>>>0<256){n=f<<1;h=872+(n<<2)|0;m=a[208]|0;u=1<>2]|0;if(r>>>0>=(a[212]|0)>>>0){H=r;U=f;break}ke();return 0}}while(0);a[U>>2]=c;a[H+12>>2]=c;a[v+(o+8)>>2]=H;a[v+(o+12)>>2]=h;break}n=b;u=j>>>8;do{if((u|0)==0){D=0}else{if(j>>>0>16777215){D=31;break}m=(u+1048320|0)>>>16&8;f=u<>>16&4;E=f<>>16&2;l=14-(r|m|f)+(E<>>15)|0;D=j>>>((l+7|0)>>>0)&1|l<<1}}while(0);u=1136+(D<<2)|0;a[v+(o+28)>>2]=D;a[v+(o+20)>>2]=0;a[v+(o+16)>>2]=0;h=a[209]|0;l=1<>2]=n;a[v+(o+24)>>2]=u;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}if((D|0)==31){q=0}else{q=25-(D>>>1)|0}l=j<>2]|0;while(1){if((a[h+4>>2]&-8|0)==(j|0)){break}K=h+16+(l>>>31<<2)|0;u=a[K>>2]|0;if((u|0)==0){Y=262;break}else{l=l<<1;h=u}}if((Y|0)==262){if(K>>>0<(a[212]|0)>>>0){ke();return 0}else{a[K>>2]=n;a[v+(o+24)>>2]=h;a[v+(o+12)>>2]=n;a[v+(o+8)>>2]=n;break}}l=h+8|0;u=a[l>>2]|0;f=a[212]|0;if(h>>>0>>0){ke();return 0}if(u>>>0>>0){ke();return 0}else{a[u+12>>2]=n;a[l>>2]=n;a[v+(o+8)>>2]=u;a[v+(o+12)>>2]=h;a[v+(o+24)>>2]=0;break}}}while(0);v=N+8|0;if((v|0)==0){p=o;break}else{d=v}return d|0}}while(0);N=a[210]|0;if(p>>>0<=N>>>0){K=N-p|0;j=a[213]|0;if(K>>>0>15){q=j;a[213]=q+p;a[210]=K;a[q+(p+4)>>2]=K|1;a[q+N>>2]=K;a[j+4>>2]=p|3}else{a[210]=0;a[213]=0;a[j+4>>2]=N|3;K=j+(N+4)|0;a[K>>2]=a[K>>2]|1}d=j+8|0;return d|0}j=a[211]|0;if(p>>>0>>0){K=j-p|0;a[211]=K;j=a[214]|0;N=j;a[214]=N+p;a[N+(p+4)>>2]=K|1;a[j+4>>2]=p|3;d=j+8|0;return d|0}do{if((a[200]|0)==0){j=we(8)|0;if((j-1&j|0)==0){a[202]=j;a[201]=j;a[203]=-1;a[204]=2097152;a[205]=0;a[319]=0;a[200]=(tt(0)|0)&-16^1431655768;break}else{ke();return 0}}}while(0);j=p+48|0;K=a[202]|0;N=p+47|0;q=K+N|0;D=-K|0;K=q&D;if(K>>>0<=p>>>0){d=0;return d|0}H=a[318]|0;do{if((H|0)!=0){U=a[316]|0;L=U+K|0;if(L>>>0<=U>>>0|L>>>0>H>>>0){d=0}else{break}return d|0}}while(0);e:do{if((a[319]&4|0)==0){H=a[214]|0;t:do{if((H|0)==0){Y=292}else{L=H;U=1280;while(1){V=U|0;F=a[V>>2]|0;if(F>>>0<=L>>>0){W=U+4|0;if((F+(a[W>>2]|0)|0)>>>0>L>>>0){break}}F=a[U+8>>2]|0;if((F|0)==0){Y=292;break t}else{U=F}}if((U|0)==0){Y=292;break}L=q-(a[211]|0)&D;if(L>>>0>=2147483647){X=0;break}h=Ge(L|0)|0;n=(h|0)==((a[V>>2]|0)+(a[W>>2]|0)|0);Z=n?h:-1;G=n?L:0;Q=h;$=L;Y=301}}while(0);do{if((Y|0)==292){H=Ge(0)|0;if((H|0)==-1){X=0;break}o=H;L=a[201]|0;h=L-1|0;if((h&o|0)==0){J=K}else{J=K-o+(h+o&-L)|0}L=a[316]|0;o=L+J|0;if(!(J>>>0>p>>>0&J>>>0<2147483647)){X=0;break}h=a[318]|0;if((h|0)!=0){if(o>>>0<=L>>>0|o>>>0>h>>>0){X=0;break}}h=Ge(J|0)|0;o=(h|0)==(H|0);Z=o?H:-1;G=o?J:0;Q=h;$=J;Y=301}}while(0);t:do{if((Y|0)==301){h=-$|0;if((Z|0)!=-1){ee=G;te=Z;Y=312;break e}do{if((Q|0)!=-1&$>>>0<2147483647&$>>>0>>0){o=a[202]|0;H=N-$+o&-o;if(H>>>0>=2147483647){re=$;break}if((Ge(H|0)|0)==-1){Ge(h|0)|0;X=G;break t}else{re=H+$|0;break}}else{re=$}}while(0);if((Q|0)==-1){X=G}else{ee=re;te=Q;Y=312;break e}}}while(0);a[319]=a[319]|4;ne=X;Y=309}else{ne=0;Y=309}}while(0);do{if((Y|0)==309){if(K>>>0>=2147483647){break}X=Ge(K|0)|0;Q=Ge(0)|0;if(!((Q|0)!=-1&(X|0)!=-1&X>>>0>>0)){break}re=Q-X|0;Q=re>>>0>(p+40|0)>>>0;G=Q?X:-1;if((G|0)!=-1){ee=Q?re:ne;te=G;Y=312}}}while(0);do{if((Y|0)==312){ne=(a[316]|0)+ee|0;a[316]=ne;if(ne>>>0>(a[317]|0)>>>0){a[317]=ne}ne=a[214]|0;e:do{if((ne|0)==0){K=a[212]|0;if((K|0)==0|te>>>0>>0){a[212]=te}a[320]=te;a[321]=ee;a[323]=0;a[217]=a[200];a[216]=-1;K=0;do{G=K<<1;re=872+(G<<2)|0;a[872+(G+3<<2)>>2]=re;a[872+(G+2<<2)>>2]=re;K=K+1|0}while(K>>>0<32);K=te+8|0;if((K&7|0)==0){ie=0}else{ie=-K&7}K=ee-40-ie|0;a[214]=te+ie;a[211]=K;a[te+(ie+4)>>2]=K|1;a[te+(ee-36)>>2]=40;a[215]=a[204]}else{K=1280;while(1){ae=a[K>>2]|0;oe=K+4|0;se=a[oe>>2]|0;if((te|0)==(ae+se|0)){Y=324;break}re=a[K+8>>2]|0;if((re|0)==0){break}else{K=re}}do{if((Y|0)==324){if((a[K+12>>2]&8|0)!=0){break}re=ne;if(!(re>>>0>=ae>>>0&re>>>0>>0)){break}a[oe>>2]=se+ee;re=a[214]|0;G=(a[211]|0)+ee|0;Q=re;X=re+8|0;if((X&7|0)==0){fe=0}else{fe=-X&7}X=G-fe|0;a[214]=Q+fe;a[211]=X;a[Q+(fe+4)>>2]=X|1;a[Q+(G+4)>>2]=40;a[215]=a[204];break e}}while(0);if(te>>>0<(a[212]|0)>>>0){a[212]=te}K=te+ee|0;G=1280;while(1){ue=G|0;if((a[ue>>2]|0)==(K|0)){Y=334;break}Q=a[G+8>>2]|0;if((Q|0)==0){break}else{G=Q}}do{if((Y|0)==334){if((a[G+12>>2]&8|0)!=0){break}a[ue>>2]=te;K=G+4|0;a[K>>2]=(a[K>>2]|0)+ee;K=te+8|0;if((K&7|0)==0){ce=0}else{ce=-K&7}K=te+(ee+8)|0;if((K&7|0)==0){le=0}else{le=-K&7}K=te+(le+ee)|0;Q=K;X=ce+p|0;re=te+X|0;$=re;N=K-(te+ce)-p|0;a[te+(ce+4)>>2]=p|3;do{if((Q|0)==(a[214]|0)){j=(a[211]|0)+N|0;a[211]=j;a[214]=$;a[te+(X+4)>>2]=j|1}else{if((Q|0)==(a[213]|0)){j=(a[210]|0)+N|0;a[210]=j;a[213]=$;a[te+(X+4)>>2]=j|1;a[te+(j+X)>>2]=j;break}j=ee+4|0;Z=a[te+(j+le)>>2]|0;if((Z&3|0)==1){J=Z&-8;W=Z>>>3;t:do{if(Z>>>0<256){V=a[te+((le|8)+ee)>>2]|0;D=a[te+(ee+12+le)>>2]|0;q=872+(W<<1<<2)|0;do{if((V|0)!=(q|0)){if(V>>>0<(a[212]|0)>>>0){ke();return 0}if((a[V+12>>2]|0)==(Q|0)){break}ke();return 0}}while(0);if((D|0)==(V|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke();return 0}h=D+8|0;if((a[h>>2]|0)==(Q|0)){he=h;break}ke();return 0}}while(0);a[V+12>>2]=D;a[he>>2]=V}else{q=K;h=a[te+((le|24)+ee)>>2]|0;U=a[te+(ee+12+le)>>2]|0;do{if((U|0)==(q|0)){H=le|16;o=te+(j+H)|0;L=a[o>>2]|0;if((L|0)==0){n=te+(H+ee)|0;H=a[n>>2]|0;if((H|0)==0){de=0;break}else{pe=H;be=n}}else{pe=L;be=o}while(1){o=pe+20|0;L=a[o>>2]|0;if((L|0)!=0){pe=L;be=o;continue}o=pe+16|0;L=a[o>>2]|0;if((L|0)==0){break}else{pe=L;be=o}}if(be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[be>>2]=0;de=pe;break}}else{o=a[te+((le|8)+ee)>>2]|0;if(o>>>0<(a[212]|0)>>>0){ke();return 0}L=o+12|0;if((a[L>>2]|0)!=(q|0)){ke();return 0}n=U+8|0;if((a[n>>2]|0)==(q|0)){a[L>>2]=U;a[n>>2]=o;de=U;break}else{ke();return 0}}}while(0);if((h|0)==0){break}U=te+(ee+28+le)|0;V=1136+(a[U>>2]<<2)|0;do{if((q|0)==(a[V>>2]|0)){a[V>>2]=de;if((de|0)!=0){break}a[209]=a[209]&~(1<>2]);break t}else{if(h>>>0<(a[212]|0)>>>0){ke();return 0}D=h+16|0;if((a[D>>2]|0)==(q|0)){a[D>>2]=de}else{a[h+20>>2]=de}if((de|0)==0){break t}}}while(0);if(de>>>0<(a[212]|0)>>>0){ke();return 0}a[de+24>>2]=h;q=le|16;U=a[te+(q+ee)>>2]|0;do{if((U|0)!=0){if(U>>>0<(a[212]|0)>>>0){ke();return 0}else{a[de+16>>2]=U;a[U+24>>2]=de;break}}}while(0);U=a[te+(j+q)>>2]|0;if((U|0)==0){break}if(U>>>0<(a[212]|0)>>>0){ke();return 0}else{a[de+20>>2]=U;a[U+24>>2]=de;break}}}while(0);ve=te+((J|le)+ee)|0;me=J+N|0}else{ve=Q;me=N}j=ve+4|0;a[j>>2]=a[j>>2]&-2;a[te+(X+4)>>2]=me|1;a[te+(me+X)>>2]=me;j=me>>>3;if(me>>>0<256){W=j<<1;Z=872+(W<<2)|0;U=a[208]|0;h=1<>2]|0;if(V>>>0>=(a[212]|0)>>>0){ge=V;ye=j;break}ke();return 0}}while(0);a[ye>>2]=$;a[ge+12>>2]=$;a[te+(X+8)>>2]=ge;a[te+(X+12)>>2]=Z;break}W=re;h=me>>>8;do{if((h|0)==0){_e=0}else{if(me>>>0>16777215){_e=31;break}U=(h+1048320|0)>>>16&8;J=h<>>16&4;V=J<>>16&2;D=14-(j|U|J)+(V<>>15)|0;_e=me>>>((D+7|0)>>>0)&1|D<<1}}while(0);h=1136+(_e<<2)|0;a[te+(X+28)>>2]=_e;a[te+(X+20)>>2]=0;a[te+(X+16)>>2]=0;Z=a[209]|0;D=1<<_e;if((Z&D|0)==0){a[209]=Z|D;a[h>>2]=W;a[te+(X+24)>>2]=h;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}if((_e|0)==31){Se=0}else{Se=25-(_e>>>1)|0}D=me<>2]|0;while(1){if((a[Z+4>>2]&-8|0)==(me|0)){break}xe=Z+16+(D>>>31<<2)|0;h=a[xe>>2]|0;if((h|0)==0){Y=407;break}else{D=D<<1;Z=h}}if((Y|0)==407){if(xe>>>0<(a[212]|0)>>>0){ke();return 0}else{a[xe>>2]=W;a[te+(X+24)>>2]=Z;a[te+(X+12)>>2]=W;a[te+(X+8)>>2]=W;break}}D=Z+8|0;h=a[D>>2]|0;J=a[212]|0;if(Z>>>0>>0){ke();return 0}if(h>>>0>>0){ke();return 0}else{a[h+12>>2]=W;a[D>>2]=W;a[te+(X+8)>>2]=h;a[te+(X+12)>>2]=Z;a[te+(X+24)>>2]=0;break}}}while(0);d=te+(ce|8)|0;return d|0}}while(0);G=ne;X=1280;while(1){Ae=a[X>>2]|0;if(Ae>>>0<=G>>>0){Me=a[X+4>>2]|0;Ee=Ae+Me|0;if(Ee>>>0>G>>>0){break}}X=a[X+8>>2]|0}X=Ae+(Me-39)|0;if((X&7|0)==0){Te=0}else{Te=-X&7}X=Ae+(Me-47+Te)|0;re=X>>>0<(ne+16|0)>>>0?G:X;X=re+8|0;$=te+8|0;if(($&7|0)==0){Ie=0}else{Ie=-$&7}$=ee-40-Ie|0;a[214]=te+Ie;a[211]=$;a[te+(Ie+4)>>2]=$|1;a[te+(ee-36)>>2]=40;a[215]=a[204];a[re+4>>2]=27;a[X>>2]=a[320];a[X+4>>2]=a[1284>>2];a[X+8>>2]=a[1288>>2];a[X+12>>2]=a[1292>>2];a[320]=te;a[321]=ee;a[323]=0;a[322]=X;X=re+28|0;a[X>>2]=7;if((re+32|0)>>>0>>0){$=X;while(1){X=$+4|0;a[X>>2]=7;if(($+8|0)>>>0>>0){$=X}else{break}}}if((re|0)==(G|0)){break}$=re-ne|0;X=G+($+4)|0;a[X>>2]=a[X>>2]&-2;a[ne+4>>2]=$|1;a[G+$>>2]=$;X=$>>>3;if($>>>0<256){N=X<<1;Q=872+(N<<2)|0;K=a[208]|0;h=1<>2]|0;if(D>>>0>=(a[212]|0)>>>0){Pe=D;Oe=X;break}ke();return 0}}while(0);a[Oe>>2]=ne;a[Pe+12>>2]=ne;a[ne+8>>2]=Pe;a[ne+12>>2]=Q;break}N=ne;h=$>>>8;do{if((h|0)==0){Re=0}else{if($>>>0>16777215){Re=31;break}K=(h+1048320|0)>>>16&8;G=h<>>16&4;X=G<>>16&2;D=14-(re|K|G)+(X<>>15)|0;Re=$>>>((D+7|0)>>>0)&1|D<<1}}while(0);h=1136+(Re<<2)|0;a[ne+28>>2]=Re;a[ne+20>>2]=0;a[ne+16>>2]=0;Q=a[209]|0;D=1<>2]=N;a[ne+24>>2]=h;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}if((Re|0)==31){Ce=0}else{Ce=25-(Re>>>1)|0}D=$<>2]|0;while(1){if((a[Q+4>>2]&-8|0)==($|0)){break}Be=Q+16+(D>>>31<<2)|0;h=a[Be>>2]|0;if((h|0)==0){Y=442;break}else{D=D<<1;Q=h}}if((Y|0)==442){if(Be>>>0<(a[212]|0)>>>0){ke();return 0}else{a[Be>>2]=N;a[ne+24>>2]=Q;a[ne+12>>2]=ne;a[ne+8>>2]=ne;break}}D=Q+8|0;$=a[D>>2]|0;h=a[212]|0;if(Q>>>0>>0){ke();return 0}if($>>>0>>0){ke();return 0}else{a[$+12>>2]=N;a[D>>2]=N;a[ne+8>>2]=$;a[ne+12>>2]=Q;a[ne+24>>2]=0;break}}}while(0);ne=a[211]|0;if(ne>>>0<=p>>>0){break}$=ne-p|0;a[211]=$;ne=a[214]|0;D=ne;a[214]=D+p;a[D+(p+4)>>2]=$|1;a[ne+4>>2]=p|3;d=ne+8|0;return d|0}}while(0);a[($e()|0)>>2]=12;d=0;return d|0}function Yt(e){e=e|0;var t=0,r=0,n=0,i=0,o=0,s=0,f=0,u=0,c=0,l=0,h=0,d=0,p=0,b=0,v=0,m=0,g=0,y=0,w=0,_=0,S=0,k=0,x=0,A=0,M=0,E=0,T=0,I=0,P=0,O=0,R=0,C=0,B=0,j=0,N=0,L=0,F=0,z=0,H=0;if((e|0)==0){return}t=e-8|0;r=t;n=a[212]|0;if(t>>>0>>0){ke()}i=a[e-4>>2]|0;o=i&3;if((o|0)==1){ke()}s=i&-8;f=e+(s-8)|0;u=f;e:do{if((i&1|0)==0){c=a[t>>2]|0;if((o|0)==0){return}l=-8-c|0;h=e+l|0;d=h;p=c+s|0;if(h>>>0>>0){ke()}if((d|0)==(a[213]|0)){b=e+(s-4)|0;if((a[b>>2]&3|0)!=3){v=d;m=p;break}a[210]=p;a[b>>2]=a[b>>2]&-2;a[e+(l+4)>>2]=p|1;a[f>>2]=p;return}b=c>>>3;if(c>>>0<256){c=a[e+(l+8)>>2]|0;g=a[e+(l+12)>>2]|0;y=872+(b<<1<<2)|0;do{if((c|0)!=(y|0)){if(c>>>0>>0){ke()}if((a[c+12>>2]|0)==(d|0)){break}ke()}}while(0);if((g|0)==(c|0)){a[208]=a[208]&~(1<>>0>>0){ke()}_=g+8|0;if((a[_>>2]|0)==(d|0)){w=_;break}ke()}}while(0);a[c+12>>2]=g;a[w>>2]=c;v=d;m=p;break}y=h;b=a[e+(l+24)>>2]|0;_=a[e+(l+12)>>2]|0;do{if((_|0)==(y|0)){S=e+(l+20)|0;k=a[S>>2]|0;if((k|0)==0){x=e+(l+16)|0;A=a[x>>2]|0;if((A|0)==0){M=0;break}else{E=A;T=x}}else{E=k;T=S}while(1){S=E+20|0;k=a[S>>2]|0;if((k|0)!=0){E=k;T=S;continue}S=E+16|0;k=a[S>>2]|0;if((k|0)==0){break}else{E=k;T=S}}if(T>>>0>>0){ke()}else{a[T>>2]=0;M=E;break}}else{S=a[e+(l+8)>>2]|0;if(S>>>0>>0){ke()}k=S+12|0;if((a[k>>2]|0)!=(y|0)){ke()}x=_+8|0;if((a[x>>2]|0)==(y|0)){a[k>>2]=_;a[x>>2]=S;M=_;break}else{ke()}}}while(0);if((b|0)==0){v=d;m=p;break}_=e+(l+28)|0;h=1136+(a[_>>2]<<2)|0;do{if((y|0)==(a[h>>2]|0)){a[h>>2]=M;if((M|0)!=0){break}a[209]=a[209]&~(1<>2]);v=d;m=p;break e}else{if(b>>>0<(a[212]|0)>>>0){ke()}c=b+16|0;if((a[c>>2]|0)==(y|0)){a[c>>2]=M}else{a[b+20>>2]=M}if((M|0)==0){v=d;m=p;break e}}}while(0);if(M>>>0<(a[212]|0)>>>0){ke()}a[M+24>>2]=b;y=a[e+(l+16)>>2]|0;do{if((y|0)!=0){if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+16>>2]=y;a[y+24>>2]=M;break}}}while(0);y=a[e+(l+20)>>2]|0;if((y|0)==0){v=d;m=p;break}if(y>>>0<(a[212]|0)>>>0){ke()}else{a[M+20>>2]=y;a[y+24>>2]=M;v=d;m=p;break}}else{v=r;m=s}}while(0);r=v;if(r>>>0>=f>>>0){ke()}M=e+(s-4)|0;n=a[M>>2]|0;if((n&1|0)==0){ke()}do{if((n&2|0)==0){if((u|0)==(a[214]|0)){E=(a[211]|0)+m|0;a[211]=E;a[214]=v;a[v+4>>2]=E|1;if((v|0)==(a[213]|0)){a[213]=0;a[210]=0}if(E>>>0<=(a[215]|0)>>>0){return}Qt(0)|0;return}if((u|0)==(a[213]|0)){E=(a[210]|0)+m|0;a[210]=E;a[213]=v;a[v+4>>2]=E|1;a[r+E>>2]=E;return}E=(n&-8)+m|0;T=n>>>3;e:do{if(n>>>0<256){w=a[e+s>>2]|0;o=a[e+(s|4)>>2]|0;t=872+(T<<1<<2)|0;do{if((w|0)!=(t|0)){if(w>>>0<(a[212]|0)>>>0){ke()}if((a[w+12>>2]|0)==(u|0)){break}ke()}}while(0);if((o|0)==(w|0)){a[208]=a[208]&~(1<>>0<(a[212]|0)>>>0){ke()}i=o+8|0;if((a[i>>2]|0)==(u|0)){I=i;break}ke()}}while(0);a[w+12>>2]=o;a[I>>2]=w}else{t=f;i=a[e+(s+16)>>2]|0;y=a[e+(s|4)>>2]|0;do{if((y|0)==(t|0)){b=e+(s+12)|0;_=a[b>>2]|0;if((_|0)==0){h=e+(s+8)|0;c=a[h>>2]|0;if((c|0)==0){P=0;break}else{O=c;R=h}}else{O=_;R=b}while(1){b=O+20|0;_=a[b>>2]|0;if((_|0)!=0){O=_;R=b;continue}b=O+16|0;_=a[b>>2]|0;if((_|0)==0){break}else{O=_;R=b}}if(R>>>0<(a[212]|0)>>>0){ke()}else{a[R>>2]=0;P=O;break}}else{b=a[e+s>>2]|0;if(b>>>0<(a[212]|0)>>>0){ke()}_=b+12|0;if((a[_>>2]|0)!=(t|0)){ke()}h=y+8|0;if((a[h>>2]|0)==(t|0)){a[_>>2]=y;a[h>>2]=b;P=y;break}else{ke()}}}while(0);if((i|0)==0){break}y=e+(s+20)|0;w=1136+(a[y>>2]<<2)|0;do{if((t|0)==(a[w>>2]|0)){a[w>>2]=P;if((P|0)!=0){break}a[209]=a[209]&~(1<>2]);break e}else{if(i>>>0<(a[212]|0)>>>0){ke()}o=i+16|0;if((a[o>>2]|0)==(t|0)){a[o>>2]=P}else{a[i+20>>2]=P}if((P|0)==0){break e}}}while(0);if(P>>>0<(a[212]|0)>>>0){ke()}a[P+24>>2]=i;t=a[e+(s+8)>>2]|0;do{if((t|0)!=0){if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+16>>2]=t;a[t+24>>2]=P;break}}}while(0);t=a[e+(s+12)>>2]|0;if((t|0)==0){break}if(t>>>0<(a[212]|0)>>>0){ke()}else{a[P+20>>2]=t;a[t+24>>2]=P;break}}}while(0);a[v+4>>2]=E|1;a[r+E>>2]=E;if((v|0)!=(a[213]|0)){C=E;break}a[210]=E;return}else{a[M>>2]=n&-2;a[v+4>>2]=m|1;a[r+m>>2]=m;C=m}}while(0);m=C>>>3;if(C>>>0<256){r=m<<1;n=872+(r<<2)|0;M=a[208]|0;P=1<>2]|0;if(s>>>0>=(a[212]|0)>>>0){B=s;j=m;break}ke()}}while(0);a[j>>2]=v;a[B+12>>2]=v;a[v+8>>2]=B;a[v+12>>2]=n;return}n=v;B=C>>>8;do{if((B|0)==0){N=0}else{if(C>>>0>16777215){N=31;break}j=(B+1048320|0)>>>16&8;r=B<>>16&4;M=r<>>16&2;m=14-(P|j|r)+(M<>>15)|0;N=C>>>((m+7|0)>>>0)&1|m<<1}}while(0);B=1136+(N<<2)|0;a[v+28>>2]=N;a[v+20>>2]=0;a[v+16>>2]=0;m=a[209]|0;r=1<>2]=n;a[v+24>>2]=B;a[v+12>>2]=v;a[v+8>>2]=v}else{if((N|0)==31){L=0}else{L=25-(N>>>1)|0}M=C<>2]|0;while(1){if((a[j+4>>2]&-8|0)==(C|0)){break}F=j+16+(M>>>31<<2)|0;P=a[F>>2]|0;if((P|0)==0){z=621;break}else{M=M<<1;j=P}}if((z|0)==621){if(F>>>0<(a[212]|0)>>>0){ke()}else{a[F>>2]=n;a[v+24>>2]=j;a[v+12>>2]=v;a[v+8>>2]=v;break}}M=j+8|0;E=a[M>>2]|0;P=a[212]|0;if(j>>>0