diff --git a/CHANGELOG.md b/CHANGELOG.md index 79ec934..83b920b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.6 -- hex prefix +# 0.1.7 -- hex prefix 1. Updates number-to-bn diff --git a/dist/ethjs-format.js b/dist/ethjs-format.js index e68d8a9..a855d7c 100644 --- a/dist/ethjs-format.js +++ b/dist/ethjs-format.js @@ -2742,6 +2742,8 @@ module.exports = { var BN = __webpack_require__(8); var stripHexPrefix = __webpack_require__(0); +console.log(new BN('87234987239872349872489724897248972348972389472498728723897234', 16).toString(10)); + /** * Returns a BN object, converts a number value to a BN * @param {String|Number|Object} `arg` input a string number, hex string number, number, BigNumber or BN object @@ -2751,24 +2753,27 @@ var stripHexPrefix = __webpack_require__(0); module.exports = function numberToBN(arg) { if (typeof arg === 'string' || typeof arg === 'number') { var multiplier = new BN(1); // eslint-disable-line - var stringArg = stripHexPrefix(String(arg).toLowerCase().trim()); // eslint-disable-line + var formattedString = String(arg).toLowerCase().trim(); + var isHexPrefixed = formattedString.substr(0, 2) === '0x' || formattedString.substr(0, 3) === '-0x'; + var stringArg = stripHexPrefix(formattedString); // eslint-disable-line if (stringArg.substr(0, 1) === '-') { stringArg = stripHexPrefix(stringArg.slice(1)); - multiplier = new BN(-1); + multiplier = new BN(-1, 10); } + stringArg = stringArg === '' ? '0' : stringArg; - if (!stringArg.match(/^-?[0-9]+$/) && - stringArg.match(/^[0-9A-Fa-f]+$/) - || stringArg.match(/^[a-fA-F]+$/)) { + if ((!stringArg.match(/^-?[0-9]+$/) && stringArg.match(/^[0-9A-Fa-f]+$/)) + || stringArg.match(/^[a-fA-F]+$/) + || (isHexPrefixed === true && stringArg.match(/^[0-9A-Fa-f]+$/))) { return new BN(stringArg, 16).mul(multiplier); } - if (stringArg.match(/^-?[0-9]+$/) || stringArg === '') { + if ((stringArg.match(/^-?[0-9]+$/) || stringArg === '') && isHexPrefixed === false) { return new BN(stringArg, 10).mul(multiplier); } } else if (typeof arg === 'object' && arg.toString && (!arg.pop && !arg.push)) { if (arg.toString(10).match(/^-?[0-9]+$/) && (arg.mul || arg.dividedToIntegerBy)) { - return new BN(arg.toString(10)); + return new BN(arg.toString(10), 10); } } diff --git a/dist/ethjs-format.js.map b/dist/ethjs-format.js.map index aff7164..c451939 100644 --- a/dist/ethjs-format.js.map +++ b/dist/ethjs-format.js.map @@ -1 +1 @@ -{"version":3,"file":"ethjs-format.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 42ea797e30158adf07be","webpack:///./~/strip-hex-prefix/src/index.js","webpack:///./~/buffer/index.js","webpack:///./~/is-hex-prefixed/src/index.js","webpack:///./~/ethjs-util/lib/index.js","webpack:///./~/ethjs-schema/src/schema.json","webpack:///./~/number-to-bn/src/index.js","webpack:///lib/index.js","webpack:///./~/base64-js/index.js","webpack:///./~/bn.js/lib/bn.js","webpack:///./~/ieee754/index.js","webpack:///./~/isarray/index.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"ethFormat\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ethFormat\"] = factory();\n\telse\n\t\troot[\"ethFormat\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmory imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmory exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tObject.defineProperty(exports, name, {\n \t\t\tconfigurable: false,\n \t\t\tenumerable: true,\n \t\t\tget: getter\n \t\t});\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42ea797e30158adf07be","var isHexPrefixed = require('is-hex-prefixed');\n\n/**\n * Removes '0x' from a given `String` is present\n * @param {String} str the string value\n * @return {String|Optional} a string by pass if necessary\n */\nmodule.exports = function stripHexPrefix(str) {\n if (typeof str !== 'string') {\n return str;\n }\n\n return isHexPrefixed(str) ? str.slice(2) : str;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/strip-hex-prefix/src/index.js\n// module id = 0\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/buffer/index.js\n// module id = 1\n// module chunks = 0","/**\n * Returns a `Boolean` on whether or not the a `String` starts with '0x'\n * @param {String} str the string input value\n * @return {Boolean} a boolean if it is or is not hex prefixed\n * @throws if the str input is not a string\n */\nmodule.exports = function isHexPrefixed(str) {\n if (typeof str !== 'string') {\n throw new Error(\"[is-hex-prefixed] value must be type 'string', is currently type \" + (typeof str) + \", while checking isHexPrefixed.\");\n }\n\n return str.slice(0, 2) === '0x';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/is-hex-prefixed/src/index.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar isHexPrefixed = require('is-hex-prefixed');\nvar stripHexPrefix = require('strip-hex-prefix');\n\n/**\n * Pads a `String` to have an even length\n * @param {String} value\n * @return {String} output\n */\nfunction padToEven(value) {\n var a = value; // eslint-disable-line\n\n if (typeof a !== 'string') {\n throw new Error('[ethjs-util] while padding to even, value must be string, is currently ' + typeof a + ', while padToEven.');\n }\n\n if (a.length % 2) {\n a = '0' + a;\n }\n\n return a;\n}\n\n/**\n * Converts a `Number` into a hex `String`\n * @param {Number} i\n * @return {String}\n */\nfunction intToHex(i) {\n var hex = i.toString(16); // eslint-disable-line\n\n return '0x' + padToEven(hex);\n}\n\n/**\n * Converts an `Number` to a `Buffer`\n * @param {Number} i\n * @return {Buffer}\n */\nfunction intToBuffer(i) {\n var hex = intToHex(i);\n\n return Buffer.from(hex.slice(2), 'hex');\n}\n\n/**\n * Get the binary size of a string\n * @param {String} str\n * @return {Number}\n */\nfunction getBinarySize(str) {\n if (typeof str !== 'string') {\n throw new Error('[ethjs-util] while getting binary size, method getBinarySize requires input \\'str\\' to be type String, got \\'' + typeof str + '\\'.');\n }\n\n return Buffer.byteLength(str, 'utf8');\n}\n\n/**\n * Returns TRUE if the first specified array contains all elements\n * from the second one. FALSE otherwise.\n *\n * @param {array} superset\n * @param {array} subset\n *\n * @returns {boolean}\n */\nfunction arrayContainsArray(superset, subset, some) {\n if (Array.isArray(superset) !== true) {\n throw new Error('[ethjs-util] method arrayContainsArray requires input \\'superset\\' to be an array got type \\'' + typeof superset + '\\'');\n }\n if (Array.isArray(subset) !== true) {\n throw new Error('[ethjs-util] method arrayContainsArray requires input \\'subset\\' to be an array got type \\'' + typeof subset + '\\'');\n }\n\n return subset[Boolean(some) && 'some' || 'every'](function (value) {\n return superset.indexOf(value) >= 0;\n });\n}\n\n/**\n * Should be called to get utf8 from it's hex representation\n *\n * @method toUtf8\n * @param {String} string in hex\n * @returns {String} ascii string representation of hex value\n */\nfunction toUtf8(hex) {\n var bufferValue = new Buffer(padToEven(stripHexPrefix(hex).replace(/^0+|0+$/g, '')), 'hex');\n\n return bufferValue.toString('utf8');\n}\n\n/**\n * Should be called to get ascii from it's hex representation\n *\n * @method toAscii\n * @param {String} string in hex\n * @returns {String} ascii string representation of hex value\n */\nfunction toAscii(hex) {\n var str = ''; // eslint-disable-line\n var i = 0,\n l = hex.length; // eslint-disable-line\n\n if (hex.substring(0, 2) === '0x') {\n i = 2;\n }\n\n for (; i < l; i += 2) {\n var code = parseInt(hex.substr(i, 2), 16);\n str += String.fromCharCode(code);\n }\n\n return str;\n}\n\n/**\n * Should be called to get hex representation (prefixed by 0x) of utf8 string\n *\n * @method fromUtf8\n * @param {String} string\n * @param {Number} optional padding\n * @returns {String} hex representation of input string\n */\nfunction fromUtf8(stringValue) {\n var str = new Buffer(stringValue, 'utf8');\n\n return '0x' + padToEven(str.toString('hex')).replace(/^0+|0+$/g, '');\n}\n\n/**\n * Should be called to get hex representation (prefixed by 0x) of ascii string\n *\n * @method fromAscii\n * @param {String} string\n * @param {Number} optional padding\n * @returns {String} hex representation of input string\n */\nfunction fromAscii(stringValue) {\n var hex = ''; // eslint-disable-line\n for (var i = 0; i < stringValue.length; i++) {\n // eslint-disable-line\n var code = stringValue.charCodeAt(i);\n var n = code.toString(16);\n hex += n.length < 2 ? '0' + n : n;\n }\n\n return '0x' + hex;\n}\n\n/**\n * getKeys([{a: 1, b: 2}, {a: 3, b: 4}], 'a') => [1, 3]\n *\n * @method getKeys get specific key from inner object array of objects\n * @param {String} params\n * @param {String} key\n * @param {Boolean} allowEmpty\n * @returns {Array} output just a simple array of output keys\n */\nfunction getKeys(params, key, allowEmpty) {\n if (!Array.isArray(params)) {\n throw new Error('[ethjs-util] method getKeys expecting type Array as \\'params\\' input, got \\'' + typeof params + '\\'');\n }\n if (typeof key !== 'string') {\n throw new Error('[ethjs-util] method getKeys expecting type String for input \\'key\\' got \\'' + typeof key + '\\'.');\n }\n\n var result = []; // eslint-disable-line\n\n for (var i = 0; i < params.length; i++) {\n // eslint-disable-line\n var value = params[i][key]; // eslint-disable-line\n if (allowEmpty && !value) {\n value = '';\n } else if (typeof value !== 'string') {\n throw new Error('invalid abi');\n }\n result.push(value);\n }\n\n return result;\n}\n\n/**\n * Is the string a hex string.\n *\n * @method check if string is hex string of specific length\n * @param {String} value\n * @param {Number} length\n * @returns {Boolean} output the string is a hex string\n */\nfunction isHexString(value, length) {\n if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = {\n arrayContainsArray: arrayContainsArray,\n intToBuffer: intToBuffer,\n getBinarySize: getBinarySize,\n isHexPrefixed: isHexPrefixed,\n stripHexPrefix: stripHexPrefix,\n padToEven: padToEven,\n intToHex: intToHex,\n fromAscii: fromAscii,\n fromUtf8: fromUtf8,\n toAscii: toAscii,\n toUtf8: toUtf8,\n getKeys: getKeys,\n isHexString: isHexString\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ethjs-util/lib/index.js\n// module id = 3\n// module chunks = 0","module.exports = {\n\t\"methods\": {\n\t\t\"web3_clientVersion\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"web3_sha3\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"net_version\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"net_peerCount\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"net_listening\": [\n\t\t\t[],\n\t\t\t\"B\"\n\t\t],\n\t\t\"eth_protocolVersion\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"eth_syncing\": [\n\t\t\t[],\n\t\t\t\"Boolean|EthSyncing\"\n\t\t],\n\t\t\"eth_coinbase\": [\n\t\t\t[],\n\t\t\t\"D20\"\n\t\t],\n\t\t\"eth_mining\": [\n\t\t\t[],\n\t\t\t\"B\"\n\t\t],\n\t\t\"eth_hashrate\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_gasPrice\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_accounts\": [\n\t\t\t[],\n\t\t\t[\n\t\t\t\t\"D20\"\n\t\t\t]\n\t\t],\n\t\t\"eth_blockNumber\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_getBalance\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_getStorageAt\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t2,\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionCount\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_getBlockTransactionCountByHash\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getBlockTransactionCountByNumber\": [\n\t\t\t[\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleCountByBlockHash\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleCountByBlockNumber\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getCode\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_sign\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t2\n\t\t],\n\t\t\"eth_sendTransaction\": [\n\t\t\t[\n\t\t\t\t\"SendTransaction\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_sendRawTransaction\": [\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"D32\",\n\t\t\t1\n\t\t],\n\t\t\"eth_call\": [\n\t\t\t[\n\t\t\t\t\"CallTransaction\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_estimateGas\": [\n\t\t\t[\n\t\t\t\t\"EstimateTransaction\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getBlockByHash\": [\n\t\t\t[\n\t\t\t\t\"D32\",\n\t\t\t\t\"B\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getBlockByNumber\": [\n\t\t\t[\n\t\t\t\t\"Q|T\",\n\t\t\t\t\"B\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionByHash\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Transaction\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getTransactionByBlockHashAndIndex\": [\n\t\t\t[\n\t\t\t\t\"D32\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Transaction\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionByBlockNumberAndIndex\": [\n\t\t\t[\n\t\t\t\t\"Q|T\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Transaction\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionReceipt\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Receipt\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleByBlockHashAndIndex\": [\n\t\t\t[\n\t\t\t\t\"D32\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleByBlockNumberAndIndex\": [\n\t\t\t[\n\t\t\t\t\"Q|T\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getCompilers\": [\n\t\t\t[],\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t]\n\t\t],\n\t\t\"eth_compileLLL\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_compileSolidity\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_compileSerpent\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_newFilter\": [\n\t\t\t[\n\t\t\t\t\"Filter\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_newBlockFilter\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_newPendingTransactionFilter\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_uninstallFilter\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getFilterChanges\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"FilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"eth_getFilterLogs\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"FilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"eth_getLogs\": [\n\t\t\t[\n\t\t\t\t\"Filter\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"FilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"eth_getWork\": [\n\t\t\t[],\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t],\n\t\t\"eth_submitWork\": [\n\t\t\t[\n\t\t\t\t\"D\",\n\t\t\t\t\"D32\",\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t3\n\t\t],\n\t\t\"eth_submitHashrate\": [\n\t\t\t[\n\t\t\t\t\"D\",\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t2\n\t\t],\n\t\t\"db_putString\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\",\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t2\n\t\t],\n\t\t\"db_getString\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"S\",\n\t\t\t2\n\t\t],\n\t\t\"db_putHex\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\",\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t2\n\t\t],\n\t\t\"db_getHex\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t2\n\t\t],\n\t\t\"shh_post\": [\n\t\t\t[\n\t\t\t\t\"SHHPost\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"shh_version\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"shh_newIdentity\": [\n\t\t\t[],\n\t\t\t\"D\"\n\t\t],\n\t\t\"shh_hasIdentity\": [\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\"\n\t\t],\n\t\t\"shh_newGroup\": [\n\t\t\t[],\n\t\t\t\"D\"\n\t\t],\n\t\t\"shh_addToGroup\": [\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"shh_newFilter\": [\n\t\t\t[\n\t\t\t\t\"SHHFilter\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"shh_uninstallFilter\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"shh_getFilterChanges\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"SHHFilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"shh_getMessages\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"SHHFilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t]\n\t},\n\t\"tags\": [\n\t\t\"latest\",\n\t\t\"earliest\",\n\t\t\"pending\"\n\t],\n\t\"objects\": {\n\t\t\"EthSyncing\": {\n\t\t\t\"__required\": [],\n\t\t\t\"startingBlock\": \"Q\",\n\t\t\t\"currentBlock\": \"Q\",\n\t\t\t\"highestBlock\": \"Q\"\n\t\t},\n\t\t\"SendTransaction\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"from\",\n\t\t\t\t\"data\"\n\t\t\t],\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"data\": \"D\",\n\t\t\t\"nonce\": \"Q\"\n\t\t},\n\t\t\"EstimateTransaction\": {\n\t\t\t\"__required\": [],\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"data\": \"D\",\n\t\t\t\"nonce\": \"Q\"\n\t\t},\n\t\t\"CallTransaction\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"to\"\n\t\t\t],\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"data\": \"D\",\n\t\t\t\"nonce\": \"Q\"\n\t\t},\n\t\t\"Block\": {\n\t\t\t\"__required\": [],\n\t\t\t\"number\": \"Q\",\n\t\t\t\"hash\": \"D32\",\n\t\t\t\"parentHash\": \"D32\",\n\t\t\t\"nonce\": \"D\",\n\t\t\t\"sha3Uncles\": \"D\",\n\t\t\t\"logsBloom\": \"D\",\n\t\t\t\"transactionsRoot\": \"D\",\n\t\t\t\"stateRoot\": \"D\",\n\t\t\t\"receiptsRoot\": \"D\",\n\t\t\t\"miner\": \"D\",\n\t\t\t\"difficulty\": \"Q\",\n\t\t\t\"totalDifficulty\": \"Q\",\n\t\t\t\"extraData\": \"D\",\n\t\t\t\"size\": \"Q\",\n\t\t\t\"gasLimit\": \"Q\",\n\t\t\t\"gasUsed\": \"Q\",\n\t\t\t\"timestamp\": \"Q\",\n\t\t\t\"transactions\": [\n\t\t\t\t\"DATA|Transaction\"\n\t\t\t],\n\t\t\t\"uncles\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"Transaction\": {\n\t\t\t\"__required\": [],\n\t\t\t\"hash\": \"D32\",\n\t\t\t\"nonce\": \"Q\",\n\t\t\t\"blockHash\": \"D32\",\n\t\t\t\"blockNumber\": \"Q\",\n\t\t\t\"transactionIndex\": \"Q\",\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"input\": \"D\"\n\t\t},\n\t\t\"Receipt\": {\n\t\t\t\"__required\": [],\n\t\t\t\"transactionHash\": \"D32\",\n\t\t\t\"transactionIndex\": \"Q\",\n\t\t\t\"blockHash\": \"D32\",\n\t\t\t\"blockNumber\": \"Q\",\n\t\t\t\"cumulativeGasUsed\": \"Q\",\n\t\t\t\"gasUsed\": \"Q\",\n\t\t\t\"contractAddress\": \"D20\",\n\t\t\t\"logs\": [\n\t\t\t\t\"FilterChange\"\n\t\t\t]\n\t\t},\n\t\t\"Filter\": {\n\t\t\t\"__required\": [],\n\t\t\t\"fromBlock\": \"Q|T\",\n\t\t\t\"toBlock\": \"Q|T\",\n\t\t\t\"address\": \"Array|Data\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"FilterChange\": {\n\t\t\t\"__required\": [],\n\t\t\t\"removed\": \"B\",\n\t\t\t\"logIndex\": \"Q\",\n\t\t\t\"transactionIndex\": \"Q\",\n\t\t\t\"transactionHash\": \"D32\",\n\t\t\t\"blockHash\": \"D32\",\n\t\t\t\"blockNumber\": \"Q\",\n\t\t\t\"address\": \"D20\",\n\t\t\t\"data\": \"Array|DATA\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"SHHPost\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"topics\",\n\t\t\t\t\"payload\",\n\t\t\t\t\"priority\",\n\t\t\t\t\"ttl\"\n\t\t\t],\n\t\t\t\"from\": \"D\",\n\t\t\t\"to\": \"D\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"payload\": \"D\",\n\t\t\t\"priority\": \"Q\",\n\t\t\t\"ttl\": \"Q\"\n\t\t},\n\t\t\"SHHFilter\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"topics\"\n\t\t\t],\n\t\t\t\"to\": \"D\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"SHHFilterChange\": {\n\t\t\t\"__required\": [],\n\t\t\t\"hash\": \"D\",\n\t\t\t\"from\": \"D\",\n\t\t\t\"to\": \"D\",\n\t\t\t\"expiry\": \"Q\",\n\t\t\t\"ttl\": \"Q\",\n\t\t\t\"sent\": \"Q\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"payload\": \"D\",\n\t\t\t\"workProved\": \"Q\"\n\t\t},\n\t\t\"SHHMessage\": {\n\t\t\t\"__required\": [],\n\t\t\t\"hash\": \"D\",\n\t\t\t\"from\": \"D\",\n\t\t\t\"to\": \"D\",\n\t\t\t\"expiry\": \"Q\",\n\t\t\t\"ttl\": \"Q\",\n\t\t\t\"sent\": \"Q\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"payload\": \"D\",\n\t\t\t\"workProved\": \"Q\"\n\t\t}\n\t}\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ethjs-schema/src/schema.json\n// module id = 4\n// module chunks = 0","var BN = require('bn.js');\nvar stripHexPrefix = require('strip-hex-prefix');\n\n/**\n * Returns a BN object, converts a number value to a BN\n * @param {String|Number|Object} `arg` input a string number, hex string number, number, BigNumber or BN object\n * @return {Object} `output` BN object of the number\n * @throws if the argument is not an array, object that isn't a bignumber, not a string number or number\n */\nmodule.exports = function numberToBN(arg) {\n if (typeof arg === 'string' || typeof arg === 'number') {\n var multiplier = new BN(1); // eslint-disable-line\n var stringArg = stripHexPrefix(String(arg).toLowerCase().trim()); // eslint-disable-line\n if (stringArg.substr(0, 1) === '-') {\n stringArg = stripHexPrefix(stringArg.slice(1));\n multiplier = new BN(-1);\n }\n\n if (!stringArg.match(/^-?[0-9]+$/) &&\n stringArg.match(/^[0-9A-Fa-f]+$/)\n || stringArg.match(/^[a-fA-F]+$/)) {\n return new BN(stringArg, 16).mul(multiplier);\n }\n\n if (stringArg.match(/^-?[0-9]+$/) || stringArg === '') {\n return new BN(stringArg, 10).mul(multiplier);\n }\n } else if (typeof arg === 'object' && arg.toString && (!arg.pop && !arg.push)) {\n if (arg.toString(10).match(/^-?[0-9]+$/) && (arg.mul || arg.dividedToIntegerBy)) {\n return new BN(arg.toString(10));\n }\n }\n\n throw new Error('[number-to-bn] while converting number ' + JSON.stringify(arg) + ' to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.');\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/number-to-bn/src/index.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar schema = require('ethjs-schema');\nvar util = require('ethjs-util');\nvar numberToBN = require('number-to-bn');\nvar stripHexPrefix = require('strip-hex-prefix');\nvar padToEven = util.padToEven;\nvar arrayContainsArray = util.arrayContainsArray;\nvar getBinarySize = util.getBinarySize;\n\n/**\n * Format quantity values, either encode to hex or decode to BigNumber\n * should intake null, stringNumber, number, BN\n *\n * @method formatQuantity\n * @param {String|BigNumber|Number} value quantity or tag to convert\n * @param {Boolean} encode to hex or decode to BigNumber\n * @returns {Optional} output to BigNumber or string\n * @throws error if value is a float\n */\nfunction formatQuantity(value, encode) {\n if (['string', 'number', 'object'].indexOf(typeof value) === -1 || value === null) {\n return value;\n }\n\n var numberValue = numberToBN(value);\n\n if (numberToBN(value).isNeg()) {\n throw new Error('[ethjs-format] while formatting quantity \\'' + numberValue.toString(10) + '\\', invalid negative number. Number must be positive or zero.');\n }\n\n return encode ? '0x' + padToEven(numberValue.toString(16)) : numberValue;\n}\n\n/**\n * Format quantity or tag, if tag bypass return, else format quantity\n * should intake null, stringNumber, number, BN, string tag\n *\n * @method formatQuantityOrTag\n * @param {String|BigNumber|Number} value quantity or tag to convert\n * @param {Boolean} encode encode the number to hex or decode to BigNumber\n * @returns {Object|String} output to BigNumber or string\n * @throws error if value is a float\n */\nfunction formatQuantityOrTag(value, encode) {\n var output = value; // eslint-disable-line\n\n // if the value is a tag, bypass\n if (schema.tags.indexOf(value) === -1) {\n output = formatQuantity(value, encode);\n }\n\n return output;\n}\n\n/**\n * FormatData under strict conditions hex prefix\n *\n * @method formatData\n * @param {String} value the bytes data to be formatted\n * @param {Number} byteLength the required byte length (usually 20 or 32)\n * @returns {String} output output formatted data\n * @throws error if minimum length isnt met\n */\nfunction formatData(value, byteLength) {\n var output = value; // eslint-disable-line\n var outputByteLength = 0; // eslint-disable-line\n\n // prefix only under strict conditions, else bypass\n if (typeof value === 'string') {\n output = '0x' + padToEven(stripHexPrefix(value));\n outputByteLength = getBinarySize(output);\n }\n\n // throw if bytelength is not correct\n if (typeof byteLength === 'number' && value !== null && output !== '0x' // support empty values\n && (!/^[0-9A-Fa-f]+$/.test(stripHexPrefix(output)) || outputByteLength !== 2 + byteLength * 2)) {\n throw new Error('[ethjs-format] hex string \\'' + output + '\\' must be an alphanumeric ' + (2 + byteLength * 2) + ' utf8 byte hex (chars: a-fA-F) string, is ' + outputByteLength + ' bytes');\n }\n\n return output;\n}\n\n/**\n * Format object, even with random RPC caviets\n *\n * @method formatObject\n * @param {String|Array} formatter the unit to convert to, default ether\n * @param {Object} value the object value\n * @param {Boolean} encode encode to hex or decode to BigNumber\n * @returns {Object} output object\n * @throws error if value is a float\n */\nfunction formatObject(formatter, value, encode) {\n var output = Object.assign({}, value); // eslint-disable-line\n var formatObject = null; // eslint-disable-line\n\n // if the object is a string flag, then retreive the object\n if (typeof formatter === 'string') {\n if (formatter === 'Boolean|EthSyncing') {\n formatObject = Object.assign({}, schema.objects.EthSyncing);\n } else if (formatter === 'DATA|Transaction') {\n formatObject = Object.assign({}, schema.objects.Transaction);\n } else {\n formatObject = Object.assign({}, schema.objects[formatter]);\n }\n }\n\n // check if all required data keys are fulfilled\n if (!arrayContainsArray(Object.keys(value), formatObject.__required)) {\n // eslint-disable-line\n throw new Error('[ethjs-format] object ' + JSON.stringify(value) + ' must contain properties: ' + formatObject.__required.join(', ')); // eslint-disable-line\n }\n\n // assume formatObject is an object, go through keys and format each\n Object.keys(formatObject).forEach(function (valueKey) {\n if (valueKey !== '__required' && typeof value[valueKey] !== 'undefined') {\n output[valueKey] = format(formatObject[valueKey], value[valueKey], encode);\n }\n });\n\n return output;\n}\n\n/**\n * Format array\n *\n * @method formatArray\n * @param {String|Array} formatter the unit to convert to, default ether\n * @param {Object} value the value in question\n * @param {Boolean} encode encode to hex or decode to BigNumber\n * @param {Number} lengthRequirement the required minimum array length\n * @returns {Object} output object\n * @throws error if minimum length isnt met\n */\nfunction formatArray(formatter, value, encode, lengthRequirement) {\n var output = value.slice(); // eslint-disable-line\n var formatObject = formatter; // eslint-disable-line\n\n // if the formatter is an array or data, then make format object an array data\n if (formatter === 'Array|DATA') {\n formatObject = ['D'];\n }\n\n // if formatter is a FilterChange and acts like a BlockFilter\n // or PendingTx change format object to tx hash array\n if (formatter === 'FilterChange' && typeof value[0] === 'string') {\n formatObject = ['D32'];\n }\n\n // enforce minimum value length requirements\n if (encode === true && typeof lengthRequirement === 'number' && value.length < lengthRequirement) {\n throw new Error('array ' + JSON.stringify(value) + ' must contain at least ' + lengthRequirement + ' params, but only contains ' + value.length + '.'); // eslint-disable-line\n }\n\n // make new array, avoid mutation\n formatObject = formatObject.slice();\n\n // assume formatObject is an object, go through keys and format each\n value.forEach(function (valueKey, valueIndex) {\n // use key zero as formatter for all values, unless otherwise specified\n var formatObjectKey = 0; // eslint-disable-line\n\n // if format array is exact, check each argument against formatter argument\n if (formatObject.length > 1) {\n formatObjectKey = valueIndex;\n }\n\n output[valueIndex] = format(formatObject[formatObjectKey], valueKey, encode);\n });\n\n return output;\n}\n\n/**\n * Format various kinds of data to RPC spec or into digestable JS objects\n *\n * @method format\n * @param {String|Array} formatter the data formatter\n * @param {String|Array|Object|Null|Number} value the data value input\n * @param {Boolean} encode encode to hex or decode to BigNumbers, Strings, Booleans, Null\n * @param {Number} lengthRequirement the minimum data length requirement\n * @throws error if minimum length isnt met\n */\nfunction format(formatter, value, encode, lengthRequirement) {\n var output = value; // eslint-disable-line\n\n // if formatter is quantity or quantity or tag\n if (formatter === 'Q') {\n output = formatQuantity(value, encode);\n } else if (formatter === 'Q|T') {\n output = formatQuantityOrTag(value, encode);\n } else if (formatter === 'D') {\n output = formatData(value); // dont format data flagged objects like compiler output\n } else if (formatter === 'D20') {\n output = formatData(value, 20); // dont format data flagged objects like compiler output\n } else if (formatter === 'D32') {\n output = formatData(value, 32); // dont format data flagged objects like compiler output\n } else {\n // if value is an object or array\n if (typeof value === 'object' && value !== null && Array.isArray(value) === false) {\n output = formatObject(formatter, value, encode);\n } else if (Array.isArray(value)) {\n output = formatArray(formatter, value, encode, lengthRequirement);\n }\n }\n\n return output;\n}\n\n/**\n * Format RPC inputs generally to the node or TestRPC\n *\n * @method formatInputs\n * @param {Object} method the data formatter\n * @param {Array} inputs the data inputs\n * @returns {Array} output the formatted inputs array\n * @throws error if minimum length isnt met\n */\nfunction formatInputs(method, inputs) {\n return format(schema.methods[method][0], inputs, true, schema.methods[method][2]);\n}\n\n/**\n * Format RPC outputs generally from the node or TestRPC\n *\n * @method formatOutputs\n * @param {Object} method the data formatter\n * @param {Array|String|Null|Boolean|Object} outputs the data inputs\n * @returns {Array|String|Null|Boolean|Object} output the formatted data\n */\nfunction formatOutputs(method, outputs) {\n return format(schema.methods[method][1], outputs, false);\n}\n\n// export formatters\nmodule.exports = {\n schema: schema,\n formatQuantity: formatQuantity,\n formatQuantityOrTag: formatQuantityOrTag,\n formatObject: formatObject,\n formatArray: formatArray,\n format: format,\n formatInputs: formatInputs,\n formatOutputs: formatOutputs\n};\n\n\n// WEBPACK FOOTER //\n// lib/index.js","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/base64-js/index.js\n// module id = 7\n// module chunks = 0","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n Buffer = require('buf' + 'fer').Buffer;\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n }\n\n if (base === 16) {\n this._parseHex(number, start);\n } else {\n this._parseBase(number, base, start);\n }\n\n if (number[0] === '-') {\n this.negative = 1;\n }\n\n this.strip();\n\n if (endian !== 'le') return;\n\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex (str, start, end) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r <<= 4;\n\n // 'a' - 'f'\n if (c >= 49 && c <= 54) {\n r |= c - 49 + 0xa;\n\n // 'A' - 'F'\n } else if (c >= 17 && c <= 22) {\n r |= c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r |= c & 0xf;\n }\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n // Scan 24-bit chunks and add them to the number\n var off = 0;\n for (i = number.length - 6, j = 0; i >= start; i -= 6) {\n w = parseHex(number, i, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n if (i + 6 !== start) {\n w = parseHex(number, start, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n }\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n r.strip();\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/bn.js/lib/bn.js\n// module id = 8\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ieee754/index.js\n// module id = 9\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/isarray/index.js\n// module id = 10\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() { return this; })();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 11\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: false,\r\n\t\t\tget: function() { return module.l; }\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: false,\r\n\t\t\tget: function() { return module.i; }\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 12\n// module chunks = 0"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC9vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACxlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;;;;;;;AC5OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACp2GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnFA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"ethjs-format.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap b4c4d6a92b0aeab213da","webpack:///./~/strip-hex-prefix/src/index.js","webpack:///./~/buffer/index.js","webpack:///./~/is-hex-prefixed/src/index.js","webpack:///./~/ethjs-util/lib/index.js","webpack:///./~/ethjs-schema/src/schema.json","webpack:///./~/number-to-bn/src/index.js","webpack:///lib/index.js","webpack:///./~/base64-js/index.js","webpack:///./~/bn.js/lib/bn.js","webpack:///./~/ieee754/index.js","webpack:///./~/isarray/index.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"ethFormat\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ethFormat\"] = factory();\n\telse\n\t\troot[\"ethFormat\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmory imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmory exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tObject.defineProperty(exports, name, {\n \t\t\tconfigurable: false,\n \t\t\tenumerable: true,\n \t\t\tget: getter\n \t\t});\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b4c4d6a92b0aeab213da","var isHexPrefixed = require('is-hex-prefixed');\n\n/**\n * Removes '0x' from a given `String` is present\n * @param {String} str the string value\n * @return {String|Optional} a string by pass if necessary\n */\nmodule.exports = function stripHexPrefix(str) {\n if (typeof str !== 'string') {\n return str;\n }\n\n return isHexPrefixed(str) ? str.slice(2) : str;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/strip-hex-prefix/src/index.js\n// module id = 0\n// module chunks = 0","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/buffer/index.js\n// module id = 1\n// module chunks = 0","/**\n * Returns a `Boolean` on whether or not the a `String` starts with '0x'\n * @param {String} str the string input value\n * @return {Boolean} a boolean if it is or is not hex prefixed\n * @throws if the str input is not a string\n */\nmodule.exports = function isHexPrefixed(str) {\n if (typeof str !== 'string') {\n throw new Error(\"[is-hex-prefixed] value must be type 'string', is currently type \" + (typeof str) + \", while checking isHexPrefixed.\");\n }\n\n return str.slice(0, 2) === '0x';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/is-hex-prefixed/src/index.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nvar isHexPrefixed = require('is-hex-prefixed');\nvar stripHexPrefix = require('strip-hex-prefix');\n\n/**\n * Pads a `String` to have an even length\n * @param {String} value\n * @return {String} output\n */\nfunction padToEven(value) {\n var a = value; // eslint-disable-line\n\n if (typeof a !== 'string') {\n throw new Error('[ethjs-util] while padding to even, value must be string, is currently ' + typeof a + ', while padToEven.');\n }\n\n if (a.length % 2) {\n a = '0' + a;\n }\n\n return a;\n}\n\n/**\n * Converts a `Number` into a hex `String`\n * @param {Number} i\n * @return {String}\n */\nfunction intToHex(i) {\n var hex = i.toString(16); // eslint-disable-line\n\n return '0x' + padToEven(hex);\n}\n\n/**\n * Converts an `Number` to a `Buffer`\n * @param {Number} i\n * @return {Buffer}\n */\nfunction intToBuffer(i) {\n var hex = intToHex(i);\n\n return Buffer.from(hex.slice(2), 'hex');\n}\n\n/**\n * Get the binary size of a string\n * @param {String} str\n * @return {Number}\n */\nfunction getBinarySize(str) {\n if (typeof str !== 'string') {\n throw new Error('[ethjs-util] while getting binary size, method getBinarySize requires input \\'str\\' to be type String, got \\'' + typeof str + '\\'.');\n }\n\n return Buffer.byteLength(str, 'utf8');\n}\n\n/**\n * Returns TRUE if the first specified array contains all elements\n * from the second one. FALSE otherwise.\n *\n * @param {array} superset\n * @param {array} subset\n *\n * @returns {boolean}\n */\nfunction arrayContainsArray(superset, subset, some) {\n if (Array.isArray(superset) !== true) {\n throw new Error('[ethjs-util] method arrayContainsArray requires input \\'superset\\' to be an array got type \\'' + typeof superset + '\\'');\n }\n if (Array.isArray(subset) !== true) {\n throw new Error('[ethjs-util] method arrayContainsArray requires input \\'subset\\' to be an array got type \\'' + typeof subset + '\\'');\n }\n\n return subset[Boolean(some) && 'some' || 'every'](function (value) {\n return superset.indexOf(value) >= 0;\n });\n}\n\n/**\n * Should be called to get utf8 from it's hex representation\n *\n * @method toUtf8\n * @param {String} string in hex\n * @returns {String} ascii string representation of hex value\n */\nfunction toUtf8(hex) {\n var bufferValue = new Buffer(padToEven(stripHexPrefix(hex).replace(/^0+|0+$/g, '')), 'hex');\n\n return bufferValue.toString('utf8');\n}\n\n/**\n * Should be called to get ascii from it's hex representation\n *\n * @method toAscii\n * @param {String} string in hex\n * @returns {String} ascii string representation of hex value\n */\nfunction toAscii(hex) {\n var str = ''; // eslint-disable-line\n var i = 0,\n l = hex.length; // eslint-disable-line\n\n if (hex.substring(0, 2) === '0x') {\n i = 2;\n }\n\n for (; i < l; i += 2) {\n var code = parseInt(hex.substr(i, 2), 16);\n str += String.fromCharCode(code);\n }\n\n return str;\n}\n\n/**\n * Should be called to get hex representation (prefixed by 0x) of utf8 string\n *\n * @method fromUtf8\n * @param {String} string\n * @param {Number} optional padding\n * @returns {String} hex representation of input string\n */\nfunction fromUtf8(stringValue) {\n var str = new Buffer(stringValue, 'utf8');\n\n return '0x' + padToEven(str.toString('hex')).replace(/^0+|0+$/g, '');\n}\n\n/**\n * Should be called to get hex representation (prefixed by 0x) of ascii string\n *\n * @method fromAscii\n * @param {String} string\n * @param {Number} optional padding\n * @returns {String} hex representation of input string\n */\nfunction fromAscii(stringValue) {\n var hex = ''; // eslint-disable-line\n for (var i = 0; i < stringValue.length; i++) {\n // eslint-disable-line\n var code = stringValue.charCodeAt(i);\n var n = code.toString(16);\n hex += n.length < 2 ? '0' + n : n;\n }\n\n return '0x' + hex;\n}\n\n/**\n * getKeys([{a: 1, b: 2}, {a: 3, b: 4}], 'a') => [1, 3]\n *\n * @method getKeys get specific key from inner object array of objects\n * @param {String} params\n * @param {String} key\n * @param {Boolean} allowEmpty\n * @returns {Array} output just a simple array of output keys\n */\nfunction getKeys(params, key, allowEmpty) {\n if (!Array.isArray(params)) {\n throw new Error('[ethjs-util] method getKeys expecting type Array as \\'params\\' input, got \\'' + typeof params + '\\'');\n }\n if (typeof key !== 'string') {\n throw new Error('[ethjs-util] method getKeys expecting type String for input \\'key\\' got \\'' + typeof key + '\\'.');\n }\n\n var result = []; // eslint-disable-line\n\n for (var i = 0; i < params.length; i++) {\n // eslint-disable-line\n var value = params[i][key]; // eslint-disable-line\n if (allowEmpty && !value) {\n value = '';\n } else if (typeof value !== 'string') {\n throw new Error('invalid abi');\n }\n result.push(value);\n }\n\n return result;\n}\n\n/**\n * Is the string a hex string.\n *\n * @method check if string is hex string of specific length\n * @param {String} value\n * @param {Number} length\n * @returns {Boolean} output the string is a hex string\n */\nfunction isHexString(value, length) {\n if (typeof value !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = {\n arrayContainsArray: arrayContainsArray,\n intToBuffer: intToBuffer,\n getBinarySize: getBinarySize,\n isHexPrefixed: isHexPrefixed,\n stripHexPrefix: stripHexPrefix,\n padToEven: padToEven,\n intToHex: intToHex,\n fromAscii: fromAscii,\n fromUtf8: fromUtf8,\n toAscii: toAscii,\n toUtf8: toUtf8,\n getKeys: getKeys,\n isHexString: isHexString\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ethjs-util/lib/index.js\n// module id = 3\n// module chunks = 0","module.exports = {\n\t\"methods\": {\n\t\t\"web3_clientVersion\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"web3_sha3\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"net_version\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"net_peerCount\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"net_listening\": [\n\t\t\t[],\n\t\t\t\"B\"\n\t\t],\n\t\t\"eth_protocolVersion\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"eth_syncing\": [\n\t\t\t[],\n\t\t\t\"Boolean|EthSyncing\"\n\t\t],\n\t\t\"eth_coinbase\": [\n\t\t\t[],\n\t\t\t\"D20\"\n\t\t],\n\t\t\"eth_mining\": [\n\t\t\t[],\n\t\t\t\"B\"\n\t\t],\n\t\t\"eth_hashrate\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_gasPrice\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_accounts\": [\n\t\t\t[],\n\t\t\t[\n\t\t\t\t\"D20\"\n\t\t\t]\n\t\t],\n\t\t\"eth_blockNumber\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_getBalance\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_getStorageAt\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t2,\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionCount\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_getBlockTransactionCountByHash\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getBlockTransactionCountByNumber\": [\n\t\t\t[\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleCountByBlockHash\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleCountByBlockNumber\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getCode\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_sign\": [\n\t\t\t[\n\t\t\t\t\"D20\",\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t2\n\t\t],\n\t\t\"eth_sendTransaction\": [\n\t\t\t[\n\t\t\t\t\"SendTransaction\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_sendRawTransaction\": [\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"D32\",\n\t\t\t1\n\t\t],\n\t\t\"eth_call\": [\n\t\t\t[\n\t\t\t\t\"CallTransaction\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1,\n\t\t\t2\n\t\t],\n\t\t\"eth_estimateGas\": [\n\t\t\t[\n\t\t\t\t\"EstimateTransaction\",\n\t\t\t\t\"Q|T\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getBlockByHash\": [\n\t\t\t[\n\t\t\t\t\"D32\",\n\t\t\t\t\"B\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getBlockByNumber\": [\n\t\t\t[\n\t\t\t\t\"Q|T\",\n\t\t\t\t\"B\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionByHash\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Transaction\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getTransactionByBlockHashAndIndex\": [\n\t\t\t[\n\t\t\t\t\"D32\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Transaction\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionByBlockNumberAndIndex\": [\n\t\t\t[\n\t\t\t\t\"Q|T\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Transaction\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getTransactionReceipt\": [\n\t\t\t[\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"Receipt\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleByBlockHashAndIndex\": [\n\t\t\t[\n\t\t\t\t\"D32\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getUncleByBlockNumberAndIndex\": [\n\t\t\t[\n\t\t\t\t\"Q|T\",\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"Block\",\n\t\t\t2\n\t\t],\n\t\t\"eth_getCompilers\": [\n\t\t\t[],\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t]\n\t\t],\n\t\t\"eth_compileLLL\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_compileSolidity\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_compileSerpent\": [\n\t\t\t[\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t1\n\t\t],\n\t\t\"eth_newFilter\": [\n\t\t\t[\n\t\t\t\t\"Filter\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"eth_newBlockFilter\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_newPendingTransactionFilter\": [\n\t\t\t[],\n\t\t\t\"Q\"\n\t\t],\n\t\t\"eth_uninstallFilter\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"eth_getFilterChanges\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"FilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"eth_getFilterLogs\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"FilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"eth_getLogs\": [\n\t\t\t[\n\t\t\t\t\"Filter\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"FilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"eth_getWork\": [\n\t\t\t[],\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t],\n\t\t\"eth_submitWork\": [\n\t\t\t[\n\t\t\t\t\"D\",\n\t\t\t\t\"D32\",\n\t\t\t\t\"D32\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t3\n\t\t],\n\t\t\"eth_submitHashrate\": [\n\t\t\t[\n\t\t\t\t\"D\",\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t2\n\t\t],\n\t\t\"db_putString\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\",\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t2\n\t\t],\n\t\t\"db_getString\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"S\",\n\t\t\t2\n\t\t],\n\t\t\"db_putHex\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\",\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t2\n\t\t],\n\t\t\"db_getHex\": [\n\t\t\t[\n\t\t\t\t\"S\",\n\t\t\t\t\"S\"\n\t\t\t],\n\t\t\t\"D\",\n\t\t\t2\n\t\t],\n\t\t\"shh_post\": [\n\t\t\t[\n\t\t\t\t\"SHHPost\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"shh_version\": [\n\t\t\t[],\n\t\t\t\"S\"\n\t\t],\n\t\t\"shh_newIdentity\": [\n\t\t\t[],\n\t\t\t\"D\"\n\t\t],\n\t\t\"shh_hasIdentity\": [\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\"\n\t\t],\n\t\t\"shh_newGroup\": [\n\t\t\t[],\n\t\t\t\"D\"\n\t\t],\n\t\t\"shh_addToGroup\": [\n\t\t\t[\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"shh_newFilter\": [\n\t\t\t[\n\t\t\t\t\"SHHFilter\"\n\t\t\t],\n\t\t\t\"Q\",\n\t\t\t1\n\t\t],\n\t\t\"shh_uninstallFilter\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t\"B\",\n\t\t\t1\n\t\t],\n\t\t\"shh_getFilterChanges\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"SHHFilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t],\n\t\t\"shh_getMessages\": [\n\t\t\t[\n\t\t\t\t\"Q\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"SHHFilterChange\"\n\t\t\t],\n\t\t\t1\n\t\t]\n\t},\n\t\"tags\": [\n\t\t\"latest\",\n\t\t\"earliest\",\n\t\t\"pending\"\n\t],\n\t\"objects\": {\n\t\t\"EthSyncing\": {\n\t\t\t\"__required\": [],\n\t\t\t\"startingBlock\": \"Q\",\n\t\t\t\"currentBlock\": \"Q\",\n\t\t\t\"highestBlock\": \"Q\"\n\t\t},\n\t\t\"SendTransaction\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"from\",\n\t\t\t\t\"data\"\n\t\t\t],\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"data\": \"D\",\n\t\t\t\"nonce\": \"Q\"\n\t\t},\n\t\t\"EstimateTransaction\": {\n\t\t\t\"__required\": [],\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"data\": \"D\",\n\t\t\t\"nonce\": \"Q\"\n\t\t},\n\t\t\"CallTransaction\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"to\"\n\t\t\t],\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"data\": \"D\",\n\t\t\t\"nonce\": \"Q\"\n\t\t},\n\t\t\"Block\": {\n\t\t\t\"__required\": [],\n\t\t\t\"number\": \"Q\",\n\t\t\t\"hash\": \"D32\",\n\t\t\t\"parentHash\": \"D32\",\n\t\t\t\"nonce\": \"D\",\n\t\t\t\"sha3Uncles\": \"D\",\n\t\t\t\"logsBloom\": \"D\",\n\t\t\t\"transactionsRoot\": \"D\",\n\t\t\t\"stateRoot\": \"D\",\n\t\t\t\"receiptsRoot\": \"D\",\n\t\t\t\"miner\": \"D\",\n\t\t\t\"difficulty\": \"Q\",\n\t\t\t\"totalDifficulty\": \"Q\",\n\t\t\t\"extraData\": \"D\",\n\t\t\t\"size\": \"Q\",\n\t\t\t\"gasLimit\": \"Q\",\n\t\t\t\"gasUsed\": \"Q\",\n\t\t\t\"timestamp\": \"Q\",\n\t\t\t\"transactions\": [\n\t\t\t\t\"DATA|Transaction\"\n\t\t\t],\n\t\t\t\"uncles\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"Transaction\": {\n\t\t\t\"__required\": [],\n\t\t\t\"hash\": \"D32\",\n\t\t\t\"nonce\": \"Q\",\n\t\t\t\"blockHash\": \"D32\",\n\t\t\t\"blockNumber\": \"Q\",\n\t\t\t\"transactionIndex\": \"Q\",\n\t\t\t\"from\": \"D20\",\n\t\t\t\"to\": \"D20\",\n\t\t\t\"value\": \"Q\",\n\t\t\t\"gasPrice\": \"Q\",\n\t\t\t\"gas\": \"Q\",\n\t\t\t\"input\": \"D\"\n\t\t},\n\t\t\"Receipt\": {\n\t\t\t\"__required\": [],\n\t\t\t\"transactionHash\": \"D32\",\n\t\t\t\"transactionIndex\": \"Q\",\n\t\t\t\"blockHash\": \"D32\",\n\t\t\t\"blockNumber\": \"Q\",\n\t\t\t\"cumulativeGasUsed\": \"Q\",\n\t\t\t\"gasUsed\": \"Q\",\n\t\t\t\"contractAddress\": \"D20\",\n\t\t\t\"logs\": [\n\t\t\t\t\"FilterChange\"\n\t\t\t]\n\t\t},\n\t\t\"Filter\": {\n\t\t\t\"__required\": [],\n\t\t\t\"fromBlock\": \"Q|T\",\n\t\t\t\"toBlock\": \"Q|T\",\n\t\t\t\"address\": \"Array|Data\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"FilterChange\": {\n\t\t\t\"__required\": [],\n\t\t\t\"removed\": \"B\",\n\t\t\t\"logIndex\": \"Q\",\n\t\t\t\"transactionIndex\": \"Q\",\n\t\t\t\"transactionHash\": \"D32\",\n\t\t\t\"blockHash\": \"D32\",\n\t\t\t\"blockNumber\": \"Q\",\n\t\t\t\"address\": \"D20\",\n\t\t\t\"data\": \"Array|DATA\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"SHHPost\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"topics\",\n\t\t\t\t\"payload\",\n\t\t\t\t\"priority\",\n\t\t\t\t\"ttl\"\n\t\t\t],\n\t\t\t\"from\": \"D\",\n\t\t\t\"to\": \"D\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"payload\": \"D\",\n\t\t\t\"priority\": \"Q\",\n\t\t\t\"ttl\": \"Q\"\n\t\t},\n\t\t\"SHHFilter\": {\n\t\t\t\"__required\": [\n\t\t\t\t\"topics\"\n\t\t\t],\n\t\t\t\"to\": \"D\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t]\n\t\t},\n\t\t\"SHHFilterChange\": {\n\t\t\t\"__required\": [],\n\t\t\t\"hash\": \"D\",\n\t\t\t\"from\": \"D\",\n\t\t\t\"to\": \"D\",\n\t\t\t\"expiry\": \"Q\",\n\t\t\t\"ttl\": \"Q\",\n\t\t\t\"sent\": \"Q\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"payload\": \"D\",\n\t\t\t\"workProved\": \"Q\"\n\t\t},\n\t\t\"SHHMessage\": {\n\t\t\t\"__required\": [],\n\t\t\t\"hash\": \"D\",\n\t\t\t\"from\": \"D\",\n\t\t\t\"to\": \"D\",\n\t\t\t\"expiry\": \"Q\",\n\t\t\t\"ttl\": \"Q\",\n\t\t\t\"sent\": \"Q\",\n\t\t\t\"topics\": [\n\t\t\t\t\"D\"\n\t\t\t],\n\t\t\t\"payload\": \"D\",\n\t\t\t\"workProved\": \"Q\"\n\t\t}\n\t}\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ethjs-schema/src/schema.json\n// module id = 4\n// module chunks = 0","var BN = require('bn.js');\nvar stripHexPrefix = require('strip-hex-prefix');\n\nconsole.log(new BN('87234987239872349872489724897248972348972389472498728723897234', 16).toString(10));\n\n/**\n * Returns a BN object, converts a number value to a BN\n * @param {String|Number|Object} `arg` input a string number, hex string number, number, BigNumber or BN object\n * @return {Object} `output` BN object of the number\n * @throws if the argument is not an array, object that isn't a bignumber, not a string number or number\n */\nmodule.exports = function numberToBN(arg) {\n if (typeof arg === 'string' || typeof arg === 'number') {\n var multiplier = new BN(1); // eslint-disable-line\n var formattedString = String(arg).toLowerCase().trim();\n var isHexPrefixed = formattedString.substr(0, 2) === '0x' || formattedString.substr(0, 3) === '-0x';\n var stringArg = stripHexPrefix(formattedString); // eslint-disable-line\n if (stringArg.substr(0, 1) === '-') {\n stringArg = stripHexPrefix(stringArg.slice(1));\n multiplier = new BN(-1, 10);\n }\n stringArg = stringArg === '' ? '0' : stringArg;\n\n if ((!stringArg.match(/^-?[0-9]+$/) && stringArg.match(/^[0-9A-Fa-f]+$/))\n || stringArg.match(/^[a-fA-F]+$/)\n || (isHexPrefixed === true && stringArg.match(/^[0-9A-Fa-f]+$/))) {\n return new BN(stringArg, 16).mul(multiplier);\n }\n\n if ((stringArg.match(/^-?[0-9]+$/) || stringArg === '') && isHexPrefixed === false) {\n return new BN(stringArg, 10).mul(multiplier);\n }\n } else if (typeof arg === 'object' && arg.toString && (!arg.pop && !arg.push)) {\n if (arg.toString(10).match(/^-?[0-9]+$/) && (arg.mul || arg.dividedToIntegerBy)) {\n return new BN(arg.toString(10), 10);\n }\n }\n\n throw new Error('[number-to-bn] while converting number ' + JSON.stringify(arg) + ' to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.');\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/number-to-bn/src/index.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar schema = require('ethjs-schema');\nvar util = require('ethjs-util');\nvar numberToBN = require('number-to-bn');\nvar stripHexPrefix = require('strip-hex-prefix');\nvar padToEven = util.padToEven;\nvar arrayContainsArray = util.arrayContainsArray;\nvar getBinarySize = util.getBinarySize;\n\n/**\n * Format quantity values, either encode to hex or decode to BigNumber\n * should intake null, stringNumber, number, BN\n *\n * @method formatQuantity\n * @param {String|BigNumber|Number} value quantity or tag to convert\n * @param {Boolean} encode to hex or decode to BigNumber\n * @returns {Optional} output to BigNumber or string\n * @throws error if value is a float\n */\nfunction formatQuantity(value, encode) {\n if (['string', 'number', 'object'].indexOf(typeof value) === -1 || value === null) {\n return value;\n }\n\n var numberValue = numberToBN(value);\n\n if (numberToBN(value).isNeg()) {\n throw new Error('[ethjs-format] while formatting quantity \\'' + numberValue.toString(10) + '\\', invalid negative number. Number must be positive or zero.');\n }\n\n return encode ? '0x' + padToEven(numberValue.toString(16)) : numberValue;\n}\n\n/**\n * Format quantity or tag, if tag bypass return, else format quantity\n * should intake null, stringNumber, number, BN, string tag\n *\n * @method formatQuantityOrTag\n * @param {String|BigNumber|Number} value quantity or tag to convert\n * @param {Boolean} encode encode the number to hex or decode to BigNumber\n * @returns {Object|String} output to BigNumber or string\n * @throws error if value is a float\n */\nfunction formatQuantityOrTag(value, encode) {\n var output = value; // eslint-disable-line\n\n // if the value is a tag, bypass\n if (schema.tags.indexOf(value) === -1) {\n output = formatQuantity(value, encode);\n }\n\n return output;\n}\n\n/**\n * FormatData under strict conditions hex prefix\n *\n * @method formatData\n * @param {String} value the bytes data to be formatted\n * @param {Number} byteLength the required byte length (usually 20 or 32)\n * @returns {String} output output formatted data\n * @throws error if minimum length isnt met\n */\nfunction formatData(value, byteLength) {\n var output = value; // eslint-disable-line\n var outputByteLength = 0; // eslint-disable-line\n\n // prefix only under strict conditions, else bypass\n if (typeof value === 'string') {\n output = '0x' + padToEven(stripHexPrefix(value));\n outputByteLength = getBinarySize(output);\n }\n\n // throw if bytelength is not correct\n if (typeof byteLength === 'number' && value !== null && output !== '0x' // support empty values\n && (!/^[0-9A-Fa-f]+$/.test(stripHexPrefix(output)) || outputByteLength !== 2 + byteLength * 2)) {\n throw new Error('[ethjs-format] hex string \\'' + output + '\\' must be an alphanumeric ' + (2 + byteLength * 2) + ' utf8 byte hex (chars: a-fA-F) string, is ' + outputByteLength + ' bytes');\n }\n\n return output;\n}\n\n/**\n * Format object, even with random RPC caviets\n *\n * @method formatObject\n * @param {String|Array} formatter the unit to convert to, default ether\n * @param {Object} value the object value\n * @param {Boolean} encode encode to hex or decode to BigNumber\n * @returns {Object} output object\n * @throws error if value is a float\n */\nfunction formatObject(formatter, value, encode) {\n var output = Object.assign({}, value); // eslint-disable-line\n var formatObject = null; // eslint-disable-line\n\n // if the object is a string flag, then retreive the object\n if (typeof formatter === 'string') {\n if (formatter === 'Boolean|EthSyncing') {\n formatObject = Object.assign({}, schema.objects.EthSyncing);\n } else if (formatter === 'DATA|Transaction') {\n formatObject = Object.assign({}, schema.objects.Transaction);\n } else {\n formatObject = Object.assign({}, schema.objects[formatter]);\n }\n }\n\n // check if all required data keys are fulfilled\n if (!arrayContainsArray(Object.keys(value), formatObject.__required)) {\n // eslint-disable-line\n throw new Error('[ethjs-format] object ' + JSON.stringify(value) + ' must contain properties: ' + formatObject.__required.join(', ')); // eslint-disable-line\n }\n\n // assume formatObject is an object, go through keys and format each\n Object.keys(formatObject).forEach(function (valueKey) {\n if (valueKey !== '__required' && typeof value[valueKey] !== 'undefined') {\n output[valueKey] = format(formatObject[valueKey], value[valueKey], encode);\n }\n });\n\n return output;\n}\n\n/**\n * Format array\n *\n * @method formatArray\n * @param {String|Array} formatter the unit to convert to, default ether\n * @param {Object} value the value in question\n * @param {Boolean} encode encode to hex or decode to BigNumber\n * @param {Number} lengthRequirement the required minimum array length\n * @returns {Object} output object\n * @throws error if minimum length isnt met\n */\nfunction formatArray(formatter, value, encode, lengthRequirement) {\n var output = value.slice(); // eslint-disable-line\n var formatObject = formatter; // eslint-disable-line\n\n // if the formatter is an array or data, then make format object an array data\n if (formatter === 'Array|DATA') {\n formatObject = ['D'];\n }\n\n // if formatter is a FilterChange and acts like a BlockFilter\n // or PendingTx change format object to tx hash array\n if (formatter === 'FilterChange' && typeof value[0] === 'string') {\n formatObject = ['D32'];\n }\n\n // enforce minimum value length requirements\n if (encode === true && typeof lengthRequirement === 'number' && value.length < lengthRequirement) {\n throw new Error('array ' + JSON.stringify(value) + ' must contain at least ' + lengthRequirement + ' params, but only contains ' + value.length + '.'); // eslint-disable-line\n }\n\n // make new array, avoid mutation\n formatObject = formatObject.slice();\n\n // assume formatObject is an object, go through keys and format each\n value.forEach(function (valueKey, valueIndex) {\n // use key zero as formatter for all values, unless otherwise specified\n var formatObjectKey = 0; // eslint-disable-line\n\n // if format array is exact, check each argument against formatter argument\n if (formatObject.length > 1) {\n formatObjectKey = valueIndex;\n }\n\n output[valueIndex] = format(formatObject[formatObjectKey], valueKey, encode);\n });\n\n return output;\n}\n\n/**\n * Format various kinds of data to RPC spec or into digestable JS objects\n *\n * @method format\n * @param {String|Array} formatter the data formatter\n * @param {String|Array|Object|Null|Number} value the data value input\n * @param {Boolean} encode encode to hex or decode to BigNumbers, Strings, Booleans, Null\n * @param {Number} lengthRequirement the minimum data length requirement\n * @throws error if minimum length isnt met\n */\nfunction format(formatter, value, encode, lengthRequirement) {\n var output = value; // eslint-disable-line\n\n // if formatter is quantity or quantity or tag\n if (formatter === 'Q') {\n output = formatQuantity(value, encode);\n } else if (formatter === 'Q|T') {\n output = formatQuantityOrTag(value, encode);\n } else if (formatter === 'D') {\n output = formatData(value); // dont format data flagged objects like compiler output\n } else if (formatter === 'D20') {\n output = formatData(value, 20); // dont format data flagged objects like compiler output\n } else if (formatter === 'D32') {\n output = formatData(value, 32); // dont format data flagged objects like compiler output\n } else {\n // if value is an object or array\n if (typeof value === 'object' && value !== null && Array.isArray(value) === false) {\n output = formatObject(formatter, value, encode);\n } else if (Array.isArray(value)) {\n output = formatArray(formatter, value, encode, lengthRequirement);\n }\n }\n\n return output;\n}\n\n/**\n * Format RPC inputs generally to the node or TestRPC\n *\n * @method formatInputs\n * @param {Object} method the data formatter\n * @param {Array} inputs the data inputs\n * @returns {Array} output the formatted inputs array\n * @throws error if minimum length isnt met\n */\nfunction formatInputs(method, inputs) {\n return format(schema.methods[method][0], inputs, true, schema.methods[method][2]);\n}\n\n/**\n * Format RPC outputs generally from the node or TestRPC\n *\n * @method formatOutputs\n * @param {Object} method the data formatter\n * @param {Array|String|Null|Boolean|Object} outputs the data inputs\n * @returns {Array|String|Null|Boolean|Object} output the formatted data\n */\nfunction formatOutputs(method, outputs) {\n return format(schema.methods[method][1], outputs, false);\n}\n\n// export formatters\nmodule.exports = {\n schema: schema,\n formatQuantity: formatQuantity,\n formatQuantityOrTag: formatQuantityOrTag,\n formatObject: formatObject,\n formatArray: formatArray,\n format: format,\n formatInputs: formatInputs,\n formatOutputs: formatOutputs\n};\n\n\n// WEBPACK FOOTER //\n// lib/index.js","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction placeHoldersCount (b64) {\n var len = b64.length\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n}\n\nfunction byteLength (b64) {\n // base64 is 4/3 + up to two characters of the original data\n return b64.length * 3 / 4 - placeHoldersCount(b64)\n}\n\nfunction toByteArray (b64) {\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n placeHolders = placeHoldersCount(b64)\n\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/base64-js/index.js\n// module id = 7\n// module chunks = 0","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n Buffer = require('buf' + 'fer').Buffer;\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n }\n\n if (base === 16) {\n this._parseHex(number, start);\n } else {\n this._parseBase(number, base, start);\n }\n\n if (number[0] === '-') {\n this.negative = 1;\n }\n\n this.strip();\n\n if (endian !== 'le') return;\n\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [ number & 0x3ffffff ];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [ 0 ];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this.strip();\n };\n\n function parseHex (str, start, end) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r <<= 4;\n\n // 'a' - 'f'\n if (c >= 49 && c <= 54) {\n r |= c - 49 + 0xa;\n\n // 'A' - 'F'\n } else if (c >= 17 && c <= 22) {\n r |= c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r |= c & 0xf;\n }\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n // Scan 24-bit chunks and add them to the number\n var off = 0;\n for (i = number.length - 6, j = 0; i >= start; i -= 6) {\n w = parseHex(number, i, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n if (i + 6 !== start) {\n w = parseHex(number, start, i + 6);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;\n }\n this.strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n r += c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n r += c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n r += c;\n }\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [ 0 ];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype.strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n BN.prototype.inspect = function inspect () {\n return (this.red ? '';\n };\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16);\n };\n\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n assert(typeof Buffer !== 'undefined');\n return this.toArrayLike(Buffer, endian, length);\n };\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n this.strip();\n var littleEndian = endian === 'le';\n var res = new ArrayType(reqLength);\n\n var b, i;\n var q = this.clone();\n if (!littleEndian) {\n // Assume big-endian\n for (i = 0; i < reqLength - byteLength; i++) {\n res[i] = 0;\n }\n\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[reqLength - i - 1] = b;\n }\n } else {\n for (i = 0; !q.isZero(); i++) {\n b = q.andln(0xff);\n q.iushrn(8);\n\n res[i] = b;\n }\n\n for (; i < reqLength; i++) {\n res[i] = 0;\n }\n }\n\n return res;\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this.strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this.strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this.strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this.strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this.strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this.strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out.strip();\n }\n\n function jumboMulTo (self, num, out) {\n var fftm = new FFTM();\n return fftm.mulp(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out.strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this.strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this.strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) < num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this.strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this.strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this.strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q.strip();\n }\n a.strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modn = function modn (num) {\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return acc;\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n return this.strip();\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this.strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n r.strip();\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n return a.umod(this.m)._forceRed(this);\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/bn.js/lib/bn.js\n// module id = 8\n// module chunks = 0","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ieee754/index.js\n// module id = 9\n// module chunks = 0","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/isarray/index.js\n// module id = 10\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() { return this; })();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 11\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: false,\r\n\t\t\tget: function() { return module.l; }\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tconfigurable: false,\r\n\t\t\tget: function() { return module.i; }\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 12\n// module chunks = 0"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC9vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACxlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;;;;;;;AC5OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACp2GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnFA;AACA;AACA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;","sourceRoot":""} \ No newline at end of file diff --git a/dist/ethjs-format.min.js b/dist/ethjs-format.min.js index b0078bf..baeac7b 100644 --- a/dist/ethjs-format.min.js +++ b/dist/ethjs-format.min.js @@ -1,3 +1,3 @@ -!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("ethFormat",[],r):"object"==typeof exports?exports.ethFormat=r():t.ethFormat=r()}(this,function(){return function(t){function r(e){if(i[e])return i[e].exports;var n=i[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var i={};return r.m=t,r.c=i,r.i=function(t){return t},r.d=function(t,r,i){Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=6)}([function(t,r,i){var e=i(2);t.exports=function(t){return"string"!=typeof t?t:e(t)?t.slice(2):t}},function(t,r,i){"use strict";(function(t,e){function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(r,i){if(o()t)throw new RangeError('"size" argument must not be negative')}function a(t,r,i,e){return u(r),r>0&&void 0!==i?"string"==typeof e?h(t,r).fill(i,e):h(t,r).fill(i):h(t,r)}function l(r,i){if(u(i),r=h(r,0>i?0:0|d(i)),!t.TYPED_ARRAY_SUPPORT)for(var e=0;i>e;++e)r[e]=0;return r}function f(r,i,e){if("string"==typeof e&&""!==e||(e="utf8"),!t.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(i,e);r=h(r,n);var o=r.write(i,e);return o!==n&&(r=r.slice(0,o)),r}function c(t,r){var i=0>r.length?0:0|d(r.length);t=h(t,i);for(var e=0;i>e;e+=1)t[e]=255&r[e];return t}function m(r,i,e,n){if(0>e||e>i.byteLength)throw new RangeError("'offset' is out of bounds");if(e+(n||0)>i.byteLength)throw new RangeError("'length' is out of bounds");return i=void 0===e&&void 0===n?new Uint8Array(i):void 0===n?new Uint8Array(i,e):new Uint8Array(i,e,n),t.TYPED_ARRAY_SUPPORT?(r=i,r.__proto__=t.prototype):r=c(r,i),r}function p(r,i){if(t.isBuffer(i)){var e=0|d(i.length);return r=h(r,e),0===r.length?r:(i.copy(r,0,0,e),r)}if(i){if("undefined"!=typeof ArrayBuffer&&i.buffer instanceof ArrayBuffer||"length"in i)return"number"!=typeof i.length||V(i.length)?h(r,0):c(r,i);if("Buffer"===i.type&&X(i.data))return c(r,i.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function g(r){return+r!=r&&(r=0),t.alloc(+r)}function v(r,i){if(t.isBuffer(r))return r.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;"string"!=typeof r&&(r=""+r);var e=r.length;if(0===e)return 0;for(var n=!1;;)switch(i){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Z(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(r).length;default:if(n)return Z(r).length;i=(""+i).toLowerCase(),n=!0}}function y(t,r,i){var e=!1;if((void 0===r||0>r)&&(r=0),r>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),0>=i)return"";if(i>>>=0,r>>>=0,r>=i)return"";for(t||(t="utf8");;)switch(t){case"hex":return Q(this,r,i);case"utf8":case"utf-8":return R(this,r,i);case"ascii":return k(this,r,i);case"latin1":case"binary":return P(this,r,i);case"base64":return T(this,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,r,i);default:if(e)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),e=!0}}function w(t,r,i){var e=t[r];t[r]=t[i],t[i]=e}function M(r,i,e,n,o){if(0===r.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:r.length-1),0>e&&(e=r.length+e),r.length>e){if(0>e){if(!o)return-1;e=0}}else{if(o)return-1;e=r.length-1}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:b(r,i,e,n,o);if("number"==typeof i)return i=255&i,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(r,i,e):Uint8Array.prototype.lastIndexOf.call(r,i,e):b(r,[i],e,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,i,e,n){function o(t,r){return 1===h?t[r]:t.readUInt16BE(r*h)}var h=1,s=t.length,u=r.length;if(void 0!==e&&(e=(e+"").toLowerCase(),"ucs2"===e||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(2>t.length||2>r.length)return-1;h=2,s/=2,u/=2,i/=2}var a;if(n){var l=-1;for(a=i;s>a;a++)if(o(t,a)===o(r,l===-1?0:a-l)){if(l===-1&&(l=a),a-l+1===u)return l*h}else l!==-1&&(a-=a-l),l=-1}else for(i+u>s&&(i=s-u),a=i;a>=0;a--){for(var f=!0,c=0;u>c;c++)if(o(t,a+c)!==o(r,c)){f=!1;break}if(f)return a}return-1}function _(t,r,i,e){i=+i||0;var n=t.length-i;e?(e=+e,e>n&&(e=n)):e=n;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");e>o/2&&(e=o/2);for(var h=0;e>h;++h){var s=parseInt(r.substr(2*h,2),16);if(isNaN(s))return h;t[i+h]=s}return h}function A(t,r,i,e){return J(Z(r,t.length-i),t,i,e)}function B(t,r,i,e){return J(z(r),t,i,e)}function E(t,r,i,e){return B(t,r,i,e)}function S(t,r,i,e){return J(K(r),t,i,e)}function D(t,r,i,e){return J($(r,t.length-i),t,i,e)}function T(t,r,i){return G.fromByteArray(0===r&&i===t.length?t:t.slice(r,i))}function R(t,r,i){i=Math.min(t.length,i);for(var e=[],n=r;i>n;){var o=t[n],h=null,s=o>239?4:o>223?3:o>191?2:1;if(i>=n+s){var u,a,l,f;switch(s){case 1:128>o&&(h=o);break;case 2:u=t[n+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(h=f));break;case 3:u=t[n+1],a=t[n+2],128===(192&u)&&128===(192&a)&&(f=(15&o)<<12|(63&u)<<6|63&a,f>2047&&(55296>f||f>57343)&&(h=f));break;case 4:u=t[n+1],a=t[n+2],l=t[n+3],128===(192&u)&&128===(192&a)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&a)<<6|63&l,f>65535&&1114112>f&&(h=f))}}null===h?(h=65533,s=1):h>65535&&(h-=65536,e.push(h>>>10&1023|55296),h=56320|1023&h),e.push(h),n+=s}return x(e)}function x(t){var r=t.length;if(tt>=r)return String.fromCharCode.apply(String,t);for(var i="",e=0;r>e;)i+=String.fromCharCode.apply(String,t.slice(e,e+=tt));return i}function k(t,r,i){var e="";i=Math.min(t.length,i);for(var n=r;i>n;++n)e+=String.fromCharCode(127&t[n]);return e}function P(t,r,i){var e="";i=Math.min(t.length,i);for(var n=r;i>n;++n)e+=String.fromCharCode(t[n]);return e}function Q(t,r,i){var e=t.length;r&&r>=0||(r=0),(!i||0>i||i>e)&&(i=e);for(var n="",o=r;i>o;++o)n+=H(t[o]);return n}function U(t,r,i){for(var e=t.slice(r,i),n="",o=0;e.length>o;o+=2)n+=String.fromCharCode(e[o]+256*e[o+1]);return n}function I(t,r,i){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+r>i)throw new RangeError("Trying to access beyond buffer length")}function C(r,i,e,n,o,h){if(!t.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>o||h>i)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function O(t,r,i,e){0>r&&(r=65535+r+1);for(var n=0,o=Math.min(t.length-i,2);o>n;++n)t[i+n]=(r&255<<8*(e?n:1-n))>>>8*(e?n:1-n)}function L(t,r,i,e){0>r&&(r=4294967295+r+1);for(var n=0,o=Math.min(t.length-i,4);o>n;++n)t[i+n]=r>>>8*(e?n:3-n)&255}function N(t,r,i,e,n,o){if(i+e>t.length)throw new RangeError("Index out of range");if(0>i)throw new RangeError("Index out of range")}function j(t,r,i,e,n){return n||N(t,r,i,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,r,i,e,23,4),i+4}function Y(t,r,i,e,n){return n||N(t,r,i,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,r,i,e,52,8),i+8}function q(t){if(t=F(t).replace(rt,""),2>t.length)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return 16>t?"0"+t.toString(16):t.toString(16)}function Z(t,r){r=r||1/0;for(var i,e=t.length,n=null,o=[],h=0;e>h;++h){if(i=t.charCodeAt(h),i>55295&&57344>i){if(!n){if(i>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(h+1===e){(r-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(56320>i){(r-=3)>-1&&o.push(239,191,189),n=i;continue}i=(n-55296<<10|i-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,128>i){if((r-=1)<0)break;o.push(i)}else if(2048>i){if((r-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(65536>i){if((r-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(i>=1114112)throw Error("Invalid code point");if((r-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function z(t){for(var r=[],i=0;t.length>i;++i)r.push(255&t.charCodeAt(i));return r}function $(t,r){for(var i,e,n,o=[],h=0;t.length>h&&(r-=2)>=0;++h)i=t.charCodeAt(h),e=i>>8,n=i%256,o.push(n),o.push(e);return o}function K(t){return G.toByteArray(q(t))}function J(t,r,i,e){for(var n=0;e>n&&(n+io;++o)if(r[o]!==i[o]){e=r[o],n=i[o];break}return n>e?-1:e>n?1:0},t.isEncoding=function(t){switch((t+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(r,i){if(!X(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return t.alloc(0);var e;if(void 0===i)for(i=0,e=0;r.length>e;++e)i+=r[e].length;var n=t.allocUnsafe(i),o=0;for(e=0;r.length>e;++e){var h=r[e];if(!t.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(n,o),o+=h.length}return n},t.byteLength=v,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;t>r;r+=2)w(this,r,r+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;t>r;r+=4)w(this,r,r+3),w(this,r+1,r+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;t>r;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(r){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===t.compare(this,r)},t.prototype.inspect=function(){var t="",i=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),""},t.prototype.compare=function(r,i,e,n,o){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(void 0===i&&(i=0),void 0===e&&(e=r?r.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),0>i||e>r.length||0>n||o>this.length)throw new RangeError("out of range index");if(n>=o&&i>=e)return 0;if(n>=o)return-1;if(i>=e)return 1;if(i>>>=0,e>>>=0,n>>>=0,o>>>=0,this===r)return 0;for(var h=o-n,s=e-i,u=Math.min(h,s),a=this.slice(n,o),l=r.slice(i,e),f=0;u>f;++f)if(a[f]!==l[f]){h=a[f],s=l[f];break}return s>h?-1:h>s?1:0},t.prototype.includes=function(t,r,i){return this.indexOf(t,r,i)!==-1},t.prototype.indexOf=function(t,r,i){return M(this,t,r,i,!0)},t.prototype.lastIndexOf=function(t,r,i){return M(this,t,r,i,!1)},t.prototype.write=function(t,r,i,e){if(void 0===r)e="utf8",i=this.length,r=0;else if(void 0===i&&"string"==typeof r)e=r,i=this.length,r=0;else{if(!isFinite(r))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r=0|r,isFinite(i)?(i=0|i,void 0===e&&(e="utf8")):(e=i,i=void 0)}var n=this.length-r;if((void 0===i||i>n)&&(i=n),t.length>0&&(0>i||0>r)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var o=!1;;)switch(e){case"hex":return _(this,t,r,i);case"utf8":case"utf-8":return A(this,t,r,i);case"ascii":return B(this,t,r,i);case"latin1":case"binary":return E(this,t,r,i);case"base64":return S(this,t,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r,i);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(r,i){var e=this.length;r=~~r,i=void 0===i?e:~~i,0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),0>i?(i+=e,0>i&&(i=0)):i>e&&(i=e),r>i&&(i=r);var n;if(t.TYPED_ARRAY_SUPPORT)n=this.subarray(r,i),n.__proto__=t.prototype;else{var o=i-r;n=new t(o,(void 0));for(var h=0;o>h;++h)n[h]=this[h+r]}return n},t.prototype.readUIntLE=function(t,r,i){t=0|t,r=0|r,i||I(t,r,this.length);for(var e=this[t],n=1,o=0;++o0&&(n*=256);)e+=this[t+--r]*n;return e},t.prototype.readUInt8=function(t,r){return r||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,r){return r||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,r){return r||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,r){return r||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,r){return r||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,r,i){t=0|t,r=0|r,i||I(t,r,this.length);for(var e=this[t],n=1,o=0;++oe||(e-=Math.pow(2,8*r)),e},t.prototype.readIntBE=function(t,r,i){t=0|t,r=0|r,i||I(t,r,this.length);for(var e=r,n=1,o=this[t+--e];e>0&&(n*=256);)o+=this[t+--e]*n;return n*=128,n>o||(o-=Math.pow(2,8*r)),o},t.prototype.readInt8=function(t,r){return r||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,r){r||I(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt16BE=function(t,r){r||I(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt32LE=function(t,r){return r||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,r){return r||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,r){return r||I(t,4,this.length),W.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,r){return r||I(t,4,this.length),W.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,r){return r||I(t,8,this.length),W.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,r){return r||I(t,8,this.length),W.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,r,i,e){if(t=+t,r=0|r,i=0|i,!e){var n=Math.pow(2,8*i)-1;C(this,t,r,i,n,0)}var o=1,h=0;for(this[r]=255&t;++h=0&&(h*=256);)this[r+o]=t/h&255;return r+i},t.prototype.writeUInt8=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,1,255,0),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[i]=255&r,i+1},t.prototype.writeUInt16LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8):O(this,r,i,!0),i+2},t.prototype.writeUInt16BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=255&r):O(this,r,i,!1),i+2},t.prototype.writeUInt32LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[i+3]=r>>>24,this[i+2]=r>>>16,this[i+1]=r>>>8,this[i]=255&r):L(this,r,i,!0),i+4},t.prototype.writeUInt32BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r):L(this,r,i,!1),i+4},t.prototype.writeIntLE=function(t,r,i,e){if(t=+t,r=0|r,!e){var n=Math.pow(2,8*i-1);C(this,t,r,i,n-1,-n)}var o=0,h=1,s=0;for(this[r]=255&t;++ot&&0===s&&0!==this[r+o-1]&&(s=1),this[r+o]=(t/h>>0)-s&255;return r+i},t.prototype.writeIntBE=function(t,r,i,e){if(t=+t,r=0|r,!e){var n=Math.pow(2,8*i-1);C(this,t,r,i,n-1,-n)}var o=i-1,h=1,s=0;for(this[r+o]=255&t;--o>=0&&(h*=256);)0>t&&0===s&&0!==this[r+o+1]&&(s=1),this[r+o]=(t/h>>0)-s&255;return r+i},t.prototype.writeInt8=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,1,127,-128),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),0>r&&(r=255+r+1),this[i]=255&r,i+1},t.prototype.writeInt16LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8):O(this,r,i,!0),i+2},t.prototype.writeInt16BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=255&r):O(this,r,i,!1),i+2},t.prototype.writeInt32LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8,this[i+2]=r>>>16,this[i+3]=r>>>24):L(this,r,i,!0),i+4},t.prototype.writeInt32BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,2147483647,-2147483648),0>r&&(r=4294967295+r+1),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r):L(this,r,i,!1),i+4},t.prototype.writeFloatLE=function(t,r,i){return j(this,t,r,!0,i)},t.prototype.writeFloatBE=function(t,r,i){return j(this,t,r,!1,i)},t.prototype.writeDoubleLE=function(t,r,i){return Y(this,t,r,!0,i)},t.prototype.writeDoubleBE=function(t,r,i){return Y(this,t,r,!1,i)},t.prototype.copy=function(r,i,e,n){if(e||(e=0),n||0===n||(n=this.length),r.length>i||(i=r.length),i||(i=0),n>0&&e>n&&(n=e),n===e)return 0;if(0===r.length||0===this.length)return 0;if(0>i)throw new RangeError("targetStart out of bounds");if(0>e||e>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),n-e>r.length-i&&(n=r.length-i+e);var o,h=n-e;if(this===r&&i>e&&n>i)for(o=h-1;o>=0;--o)r[o+i]=this[o+e];else if(1e3>h||!t.TYPED_ARRAY_SUPPORT)for(o=0;h>o;++o)r[o+i]=this[o+e];else Uint8Array.prototype.set.call(r,this.subarray(e,e+h),i);return h},t.prototype.fill=function(r,i,e,n){if("string"==typeof r){if("string"==typeof i?(n=i,i=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===r.length){var o=r.charCodeAt(0);256>o&&(r=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof r&&(r=255&r);if(0>i||i>this.length||e>this.length)throw new RangeError("Out of range index");if(i>=e)return this;i>>>=0,e=void 0===e?this.length:e>>>0,r||(r=0);var h;if("number"==typeof r)for(h=i;e>h;++h)this[h]=r;else{var s=t.isBuffer(r)?r:Z(""+new t(r,n)),u=s.length;for(h=0;e-i>h;++h)this[h+i]=s[h%u]}return this};var rt=/[^+\/0-9A-Za-z-_]/g}).call(r,i(1).Buffer,i(11))},function(t,r){t.exports=function(t){if("string"!=typeof t)throw Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},function(t,r,i){"use strict";(function(r){function e(t){var r=t;if("string"!=typeof r)throw Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof r+", while padToEven.");return r.length%2&&(r="0"+r),r}function n(t){var r=t.toString(16);return"0x"+e(r)}function o(t){var i=n(t);return r.from(i.slice(2),"hex")}function h(t){if("string"!=typeof t)throw Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof t+"'.");return r.byteLength(t,"utf8")}function s(t,r,i){if(Array.isArray(t)!==!0)throw Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof t+"'");if(Array.isArray(r)!==!0)throw Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof r+"'");return r[!!i&&"some"||"every"](function(r){return t.indexOf(r)>=0})}function u(t){var i=new r(e(d(t).replace(/^0+|0+$/g,"")),"hex");return i.toString("utf8")}function a(t){var r="",i=0,e=t.length;for("0x"===t.substring(0,2)&&(i=2);e>i;i+=2){var n=parseInt(t.substr(i,2),16);r+=String.fromCharCode(n)}return r}function l(t){var i=new r(t,"utf8");return"0x"+e(i.toString("hex")).replace(/^0+|0+$/g,"")}function f(t){for(var r="",i=0;t.length>i;i++){var e=t.charCodeAt(i),n=e.toString(16);r+=2>n.length?"0"+n:n}return"0x"+r}function c(t,r,i){if(!Array.isArray(t))throw Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof t+"'");if("string"!=typeof r)throw Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof r+"'.");for(var e=[],n=0;t.length>n;n++){var o=t[n][r];if(i&&!o)o="";else if("string"!=typeof o)throw Error("invalid abi");e.push(o)}return e}function m(t,r){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!r||t.length===2+2*r)}var p=i(2),d=i(0);t.exports={arrayContainsArray:s,intToBuffer:o,getBinarySize:h,isHexPrefixed:p,stripHexPrefix:d,padToEven:e,intToHex:n,fromAscii:f,fromUtf8:l,toAscii:a,toUtf8:u,getKeys:c,isHexString:m}}).call(r,i(1).Buffer)},function(t,r){t.exports={methods:{web3_clientVersion:[[],"S"],web3_sha3:[["S"],"D",1],net_version:[[],"S"],net_peerCount:[[],"Q"],net_listening:[[],"B"],eth_protocolVersion:[[],"S"],eth_syncing:[[],"Boolean|EthSyncing"],eth_coinbase:[[],"D20"],eth_mining:[[],"B"],eth_hashrate:[[],"Q"],eth_gasPrice:[[],"Q"],eth_accounts:[[],["D20"]],eth_blockNumber:[[],"Q"],eth_getBalance:[["D20","Q|T"],"Q",1,2],eth_getStorageAt:[["D20","Q","Q|T"],"D",2,2],eth_getTransactionCount:[["D20","Q|T"],"Q",1,2],eth_getBlockTransactionCountByHash:[["D32"],"Q",1],eth_getBlockTransactionCountByNumber:[["Q|T"],"Q",1],eth_getUncleCountByBlockHash:[["D32"],"Q",1],eth_getUncleCountByBlockNumber:[["Q"],"Q",1],eth_getCode:[["D20","Q|T"],"D",1,2],eth_sign:[["D20","D32"],"D",2],eth_sendTransaction:[["SendTransaction"],"D",1],eth_sendRawTransaction:[["D"],"D32",1],eth_call:[["CallTransaction","Q|T"],"D",1,2],eth_estimateGas:[["EstimateTransaction","Q|T"],"Q",1],eth_getBlockByHash:[["D32","B"],"Block",2],eth_getBlockByNumber:[["Q|T","B"],"Block",2],eth_getTransactionByHash:[["D32"],"Transaction",1],eth_getTransactionByBlockHashAndIndex:[["D32","Q"],"Transaction",2],eth_getTransactionByBlockNumberAndIndex:[["Q|T","Q"],"Transaction",2],eth_getTransactionReceipt:[["D32"],"Receipt",1],eth_getUncleByBlockHashAndIndex:[["D32","Q"],"Block",1],eth_getUncleByBlockNumberAndIndex:[["Q|T","Q"],"Block",2],eth_getCompilers:[[],["S"]],eth_compileLLL:[["S"],"D",1],eth_compileSolidity:[["S"],"D",1],eth_compileSerpent:[["S"],"D",1],eth_newFilter:[["Filter"],"Q",1],eth_newBlockFilter:[[],"Q"],eth_newPendingTransactionFilter:[[],"Q"],eth_uninstallFilter:[["Q"],"B",1],eth_getFilterChanges:[["Q"],["FilterChange"],1],eth_getFilterLogs:[["Q"],["FilterChange"],1],eth_getLogs:[["Filter"],["FilterChange"],1],eth_getWork:[[],["D"]],eth_submitWork:[["D","D32","D32"],"B",3],eth_submitHashrate:[["D","D"],"B",2],db_putString:[["S","S","S"],"B",2],db_getString:[["S","S"],"S",2],db_putHex:[["S","S","D"],"B",2],db_getHex:[["S","S"],"D",2],shh_post:[["SHHPost"],"B",1],shh_version:[[],"S"],shh_newIdentity:[[],"D"],shh_hasIdentity:[["D"],"B"],shh_newGroup:[[],"D"],shh_addToGroup:[["D"],"B",1],shh_newFilter:[["SHHFilter"],"Q",1],shh_uninstallFilter:[["Q"],"B",1],shh_getFilterChanges:[["Q"],["SHHFilterChange"],1],shh_getMessages:[["Q"],["SHHFilterChange"],1]},tags:["latest","earliest","pending"],objects:{EthSyncing:{__required:[],startingBlock:"Q",currentBlock:"Q",highestBlock:"Q"},SendTransaction:{__required:["from","data"],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},EstimateTransaction:{__required:[],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},CallTransaction:{__required:["to"],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},Block:{__required:[],number:"Q",hash:"D32",parentHash:"D32",nonce:"D",sha3Uncles:"D",logsBloom:"D",transactionsRoot:"D",stateRoot:"D",receiptsRoot:"D",miner:"D",difficulty:"Q",totalDifficulty:"Q",extraData:"D",size:"Q",gasLimit:"Q",gasUsed:"Q",timestamp:"Q",transactions:["DATA|Transaction"],uncles:["D"]},Transaction:{__required:[],hash:"D32",nonce:"Q",blockHash:"D32",blockNumber:"Q",transactionIndex:"Q",from:"D20",to:"D20",value:"Q",gasPrice:"Q",gas:"Q",input:"D"},Receipt:{__required:[],transactionHash:"D32",transactionIndex:"Q",blockHash:"D32",blockNumber:"Q",cumulativeGasUsed:"Q",gasUsed:"Q",contractAddress:"D20",logs:["FilterChange"]},Filter:{__required:[],fromBlock:"Q|T",toBlock:"Q|T",address:"Array|Data",topics:["D"]},FilterChange:{__required:[],removed:"B",logIndex:"Q",transactionIndex:"Q",transactionHash:"D32",blockHash:"D32",blockNumber:"Q",address:"D20",data:"Array|DATA",topics:["D"]},SHHPost:{__required:["topics","payload","priority","ttl"],from:"D",to:"D",topics:["D"],payload:"D",priority:"Q",ttl:"Q"},SHHFilter:{__required:["topics"],to:"D",topics:["D"]},SHHFilterChange:{__required:[],hash:"D",from:"D",to:"D",expiry:"Q",ttl:"Q",sent:"Q",topics:["D"],payload:"D",workProved:"Q"},SHHMessage:{__required:[],hash:"D",from:"D",to:"D",expiry:"Q",ttl:"Q",sent:"Q",topics:["D"],payload:"D",workProved:"Q"}}}},function(t,r,i){var e=i(8),n=i(0);t.exports=function(t){if("string"==typeof t||"number"==typeof t){var r=new e(1),i=n((t+"").toLowerCase().trim());if("-"===i.substr(0,1)&&(i=n(i.slice(1)),r=new e((-1))),!i.match(/^-?[0-9]+$/)&&i.match(/^[0-9A-Fa-f]+$/)||i.match(/^[a-fA-F]+$/))return new e(i,16).mul(r);if(i.match(/^-?[0-9]+$/)||""===i)return new e(i,10).mul(r)}else if("object"==typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new e(t.toString(10));throw Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(t,r,i){"use strict";function e(t,r){if(["string","number","object"].indexOf(typeof t)===-1||null===t)return t;var i=m(t);if(m(t).isNeg())throw Error("[ethjs-format] while formatting quantity '"+i.toString(10)+"', invalid negative number. Number must be positive or zero.");return r?"0x"+d(i.toString(16)):i}function n(t,r){var i=t;return f.tags.indexOf(t)===-1&&(i=e(t,r)),i}function o(t,r){var i=t,e=0;if("string"==typeof t&&(i="0x"+d(p(t)),e=v(i)),"number"==typeof r&&null!==t&&"0x"!==i&&(!/^[0-9A-Fa-f]+$/.test(p(i))||e!==2+2*r))throw Error("[ethjs-format] hex string '"+i+"' must be an alphanumeric "+(2+2*r)+" utf8 byte hex (chars: a-fA-F) string, is "+e+" bytes");return i}function h(t,r,i){var e=Object.assign({},r),n=null;if("string"==typeof t&&(n="Boolean|EthSyncing"===t?Object.assign({},f.objects.EthSyncing):"DATA|Transaction"===t?Object.assign({},f.objects.Transaction):Object.assign({},f.objects[t])),!g(Object.keys(r),n.__required))throw Error("[ethjs-format] object "+JSON.stringify(r)+" must contain properties: "+n.__required.join(", "));return Object.keys(n).forEach(function(t){"__required"!==t&&void 0!==r[t]&&(e[t]=u(n[t],r[t],i))}),e}function s(t,r,i,e){var n=r.slice(),o=t;if("Array|DATA"===t&&(o=["D"]),"FilterChange"===t&&"string"==typeof r[0]&&(o=["D32"]),i===!0&&"number"==typeof e&&e>r.length)throw Error("array "+JSON.stringify(r)+" must contain at least "+e+" params, but only contains "+r.length+".");return o=o.slice(),r.forEach(function(t,r){var e=0;o.length>1&&(e=r),n[r]=u(o[e],t,i)}),n}function u(t,r,i,u){var a=r;return"Q"===t?a=e(r,i):"Q|T"===t?a=n(r,i):"D"===t?a=o(r):"D20"===t?a=o(r,20):"D32"===t?a=o(r,32):"object"==typeof r&&null!==r&&Array.isArray(r)===!1?a=h(t,r,i):Array.isArray(r)&&(a=s(t,r,i,u)),a}function a(t,r){return u(f.methods[t][0],r,!0,f.methods[t][2])}function l(t,r){return u(f.methods[t][1],r,!1)}var f=i(4),c=i(3),m=i(5),p=i(0),d=c.padToEven,g=c.arrayContainsArray,v=c.getBinarySize;t.exports={schema:f,formatQuantity:e,formatQuantityOrTag:n,formatObject:h,formatArray:s,format:u,formatInputs:a,formatOutputs:l}},function(t,r){"use strict";function i(t){var r=t.length;if(r%4>0)throw Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function e(t){return 3*t.length/4-i(t)}function n(t){var r,e,n,o,h,s,u=t.length;h=i(t),s=new l(3*u/4-h),n=h>0?u-4:u;var f=0;for(r=0,e=0;n>r;r+=4,e+=3)o=a[t.charCodeAt(r)]<<18|a[t.charCodeAt(r+1)]<<12|a[t.charCodeAt(r+2)]<<6|a[t.charCodeAt(r+3)],s[f++]=o>>16&255,s[f++]=o>>8&255,s[f++]=255&o;return 2===h?(o=a[t.charCodeAt(r)]<<2|a[t.charCodeAt(r+1)]>>4,s[f++]=255&o):1===h&&(o=a[t.charCodeAt(r)]<<10|a[t.charCodeAt(r+1)]<<4|a[t.charCodeAt(r+2)]>>2,s[f++]=o>>8&255,s[f++]=255&o),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function h(t,r,i){for(var e,n=[],h=r;i>h;h+=3)e=(t[h]<<16)+(t[h+1]<<8)+t[h+2],n.push(o(e));return n.join("")}function s(t){for(var r,i=t.length,e=i%3,n="",o=[],s=16383,a=0,l=i-e;l>a;a+=s)o.push(h(t,a,a+s>l?l:a+s));return 1===e?(r=t[i-1],n+=u[r>>2],n+=u[r<<4&63],n+="=="):2===e&&(r=(t[i-2]<<8)+t[i-1],n+=u[r>>10],n+=u[r>>4&63],n+=u[r<<2&63],n+="="),o.push(n),o.join("")}r.byteLength=e,r.toByteArray=n,r.fromByteArray=s;for(var u=[],a=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,m=f.length;m>c;++c)u[c]=f[c],a[f.charCodeAt(c)]=c;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(t,r,i){(function(t){!function(t,r){"use strict";function e(t,r){if(!t)throw Error(r||"Assertion failed")}function n(t,r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,r,i){return o.isBN(t)?t:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==t&&("le"!==r&&"be"!==r||(i=r,r=10),this._init(t||0,r||10,i||"be"))))}function h(t,r,i){for(var e=0,n=Math.min(t.length,i),o=r;n>o;o++){var h=t.charCodeAt(o)-48;e<<=4,e|=49>h||h>54?17>h||h>22?15&h:h-17+10:h-49+10}return e}function s(t,r,i,e){for(var n=0,o=Math.min(t.length,i),h=r;o>h;h++){var s=t.charCodeAt(h)-48;n*=e,n+=49>s?17>s?s:s-17+10:s-49+10}return n}function u(t){for(var r=Array(t.bitLength()),i=0;r.length>i;i++){var e=i/26|0,n=i%26;r[i]=(t.words[e]&1<>>n}return r}function a(t,r,i){i.negative=r.negative^t.negative; -var e=t.length+r.length|0;i.length=e,e=e-1|0;var n=0|t.words[0],o=0|r.words[0],h=n*o,s=67108863&h,u=h/67108864|0;i.words[0]=s;for(var a=1;e>a;a++){for(var l=u>>>26,f=67108863&u,c=Math.min(a,r.length-1),m=Math.max(0,a-t.length+1);c>=m;m++){var p=a-m|0;n=0|t.words[p],o=0|r.words[m],h=n*o+f,l+=h/67108864|0,f=67108863&h}i.words[a]=0|f,u=0|l}return 0!==u?i.words[a]=0|u:i.length--,i.strip()}function l(t,r,i){i.negative=r.negative^t.negative,i.length=t.length+r.length;for(var e=0,n=0,o=0;i.length-1>o;o++){var h=n;n=0;for(var s=67108863&e,u=Math.min(o,r.length-1),a=Math.max(0,o-t.length+1);u>=a;a++){var l=o-a,f=0|t.words[l],c=0|r.words[a],m=f*c,p=67108863&m;h=h+(m/67108864|0)|0,p=p+s|0,s=67108863&p,h=h+(p>>>26)|0,n+=h>>>26,h&=67108863}i.words[o]=s,e=h,h=n}return 0!==e?i.words[o]=e:i.length--,i.strip()}function f(t,r,i){var e=new c;return e.mulp(t,r,i)}function c(t,r){this.x=t,this.y=r}function m(t,r){this.name=t,this.p=new o(r,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function d(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var r=o._prime(t);this.m=r.p,this.prime=r}else e(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function w(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var M;try{M=i(1).Buffer}catch(b){}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,r){return t.cmp(r)>0?t:r},o.min=function(t,r){return t.cmp(r)<0?t:r},o.prototype._init=function(t,r,i){if("number"==typeof t)return this._initNumber(t,r,i);if("object"==typeof t)return this._initArray(t,r,i);"hex"===r&&(r=16),e(r===(0|r)&&r>=2&&36>=r),t=(""+t).replace(/\s+/g,"");var n=0;"-"===t[0]&&n++,16===r?this._parseHex(t,n):this._parseBase(t,r,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),r,i)},o.prototype._initNumber=function(t,r,i){0>t&&(this.negative=1,t=-t),67108864>t?(this.words=[67108863&t],this.length=1):4503599627370496>t?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(e(9007199254740992>t),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),r,i)},o.prototype._initArray=function(t,r,i){if(e("number"==typeof t.length),0>=t.length)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var n=0;this.length>n;n++)this.words[n]=0;var o,h,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)h=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=h<>>26-s&67108863,s+=24,26>s||(s-=26,o++);else if("le"===i)for(n=0,o=0;t.length>n;n+=3)h=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=h<>>26-s&67108863,s+=24,26>s||(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,r){this.length=Math.ceil((t.length-r)/6),this.words=Array(this.length);for(var i=0;this.length>i;i++)this.words[i]=0;var e,n,o=0;for(i=t.length-6,e=0;i>=r;i-=6)n=h(t,i,i+6),this.words[e]|=n<>>26-o&4194303,o+=24,26>o||(o-=26,e++);i+6!==r&&(n=h(t,r,i+6),this.words[e]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,r,i){this.words=[0],this.length=1;for(var e=0,n=1;67108863>=n;n*=r)e++;e--,n=n/r|0;for(var o=t.length-i,h=o%e,u=Math.min(o,o-h)+i,a=0,l=i;u>l;l+=e)a=s(t,l,l+e,r),this.imuln(n),67108864>this.words[0]+a?this.words[0]+=a:this._iaddn(a);if(0!==h){var f=1;for(a=s(t,l,t.length,r),l=0;h>l;l++)f*=r;this.imuln(f),67108864>this.words[0]+a?this.words[0]+=a:this._iaddn(a)}},o.prototype.copy=function(t){t.words=Array(this.length);for(var r=0;this.length>r;r++)t.words[r]=this.words[r];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;t>this.length;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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],B=[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];o.prototype.toString=function(t,r){t=t||10,r=0|r||1;var i;if(16===t||"hex"===t){i="";for(var n=0,o=0,h=0;this.length>h;h++){var s=this.words[h],u=(16777215&(s<>>24-n&16777215,i=0!==o||h!==this.length-1?_[6-u.length]+u+i:u+i,n+=2,26>n||(n-=26,h--)}for(0!==o&&(i=o.toString(16)+i);i.length%r!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&36>=t){var a=A[t],l=B[t];i="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(l).toString(t);f=f.idivn(l),i=f.isZero()?c+i:_[a-c.length]+c+i}for(this.isZero()&&(i="0"+i);i.length%r!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}e(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&e(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,r){return e(void 0!==M),this.toArrayLike(M,t,r)},o.prototype.toArray=function(t,r){return this.toArrayLike(Array,t,r)},o.prototype.toArrayLike=function(t,r,i){var n=this.byteLength(),o=i||Math.max(1,n);e(o>=n,"byte array longer than desired length"),e(o>0,"Requested array length <= 0"),this.strip();var h,s,u="le"===r,a=new t(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)h=l.andln(255),l.iushrn(8),a[s]=h;for(;o>s;s++)a[s]=0}else{for(s=0;o-n>s;s++)a[s]=0;for(s=0;!l.isZero();s++)h=l.andln(255),l.iushrn(8),a[o-s-1]=h}return a},o.prototype._countBits=Math.clz32?function(t){return 32-Math.clz32(t)}:function(t){var r=t,i=0;return 4096>r||(i+=13,r>>>=13),64>r||(i+=7,r>>>=7),8>r||(i+=4,r>>>=4),2>r||(i+=2,r>>>=2),i+r},o.prototype._zeroBits=function(t){if(0===t)return 26;var r=t,i=0;return 0===(8191&r)&&(i+=13,r>>>=13),0===(127&r)&&(i+=7,r>>>=7),0===(15&r)&&(i+=4,r>>>=4),0===(3&r)&&(i+=2,r>>>=2),0===(1&r)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],r=this._countBits(t);return 26*(this.length-1)+r},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,r=0;this.length>r;r++){var i=this._zeroBits(this.words[r]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;t.length>this.length;)this.words[this.length++]=0;for(var r=0;t.length>r;r++)this.words[r]=this.words[r]|t.words[r];return this.strip()},o.prototype.ior=function(t){return e(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var r;r=this.length>t.length?t:this;for(var i=0;r.length>i;i++)this.words[i]=this.words[i]&t.words[i];return this.length=r.length,this.strip()},o.prototype.iand=function(t){return e(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var r,i;this.length>t.length?(r=this,i=t):(r=t,i=this);for(var e=0;i.length>e;e++)this.words[e]=r.words[e]^i.words[e];if(this!==r)for(;r.length>e;e++)this.words[e]=r.words[e];return this.length=r.length,this.strip()},o.prototype.ixor=function(t){return e(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){e("number"==typeof t&&t>=0);var r=0|Math.ceil(t/26),i=t%26;this._expand(r),i>0&&r--;for(var n=0;r>n;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,r){e("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=r?this.words[i]|1<t.length?(i=this,e=t):(i=t,e=this);for(var n=0,o=0;e.length>o;o++)r=(0|i.words[o])+(0|e.words[o])+n,this.words[o]=67108863&r,n=r>>>26;for(;0!==n&&i.length>o;o++)r=(0|i.words[o])+n,this.words[o]=67108863&r,n=r>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;i.length>o;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var r;return 0!==t.negative&&0===this.negative?(t.negative=0,r=this.sub(t),t.negative^=1,r):0===t.negative&&0!==this.negative?(this.negative=0,r=t.sub(this),this.negative=1,r):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var r=this.iadd(t);return t.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;var e,n;i>0?(e=this,n=t):(e=t,n=this);for(var o=0,h=0;n.length>h;h++)r=(0|e.words[h])-(0|n.words[h])+o,o=r>>26,this.words[h]=67108863&r;for(;0!==o&&e.length>h;h++)r=(0|e.words[h])+o,o=r>>26,this.words[h]=67108863&r;if(0===o&&e.length>h&&e!==this)for(;e.length>h;h++)this.words[h]=e.words[h];return this.length=Math.max(this.length,h),e!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var E=function(t,r,i){var e,n,o,h=t.words,s=r.words,u=i.words,a=0,l=0|h[0],f=8191&l,c=l>>>13,m=0|h[1],p=8191&m,d=m>>>13,g=0|h[2],v=8191&g,y=g>>>13,w=0|h[3],M=8191&w,b=w>>>13,_=0|h[4],A=8191&_,B=_>>>13,E=0|h[5],S=8191&E,D=E>>>13,T=0|h[6],R=8191&T,x=T>>>13,k=0|h[7],P=8191&k,Q=k>>>13,U=0|h[8],I=8191&U,C=U>>>13,O=0|h[9],L=8191&O,N=O>>>13,j=0|s[0],Y=8191&j,q=j>>>13,F=0|s[1],H=8191&F,Z=F>>>13,z=0|s[2],$=8191&z,K=z>>>13,J=0|s[3],V=8191&J,G=J>>>13,W=0|s[4],X=8191&W,tt=W>>>13,rt=0|s[5],it=8191&rt,et=rt>>>13,nt=0|s[6],ot=8191&nt,ht=nt>>>13,st=0|s[7],ut=8191&st,at=st>>>13,lt=0|s[8],ft=8191<,ct=lt>>>13,mt=0|s[9],pt=8191&mt,dt=mt>>>13;i.negative=t.negative^r.negative,i.length=19,e=Math.imul(f,Y),n=Math.imul(f,q),n=n+Math.imul(c,Y)|0,o=Math.imul(c,q);var gt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,e=Math.imul(p,Y),n=Math.imul(p,q),n=n+Math.imul(d,Y)|0,o=Math.imul(d,q),e=e+Math.imul(f,H)|0,n=n+Math.imul(f,Z)|0,n=n+Math.imul(c,H)|0,o=o+Math.imul(c,Z)|0;var vt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,e=Math.imul(v,Y),n=Math.imul(v,q),n=n+Math.imul(y,Y)|0,o=Math.imul(y,q),e=e+Math.imul(p,H)|0,n=n+Math.imul(p,Z)|0,n=n+Math.imul(d,H)|0,o=o+Math.imul(d,Z)|0,e=e+Math.imul(f,$)|0,n=n+Math.imul(f,K)|0,n=n+Math.imul(c,$)|0,o=o+Math.imul(c,K)|0;var yt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,e=Math.imul(M,Y),n=Math.imul(M,q),n=n+Math.imul(b,Y)|0,o=Math.imul(b,q),e=e+Math.imul(v,H)|0,n=n+Math.imul(v,Z)|0,n=n+Math.imul(y,H)|0,o=o+Math.imul(y,Z)|0,e=e+Math.imul(p,$)|0,n=n+Math.imul(p,K)|0,n=n+Math.imul(d,$)|0,o=o+Math.imul(d,K)|0,e=e+Math.imul(f,V)|0,n=n+Math.imul(f,G)|0,n=n+Math.imul(c,V)|0,o=o+Math.imul(c,G)|0;var wt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,e=Math.imul(A,Y),n=Math.imul(A,q),n=n+Math.imul(B,Y)|0,o=Math.imul(B,q),e=e+Math.imul(M,H)|0,n=n+Math.imul(M,Z)|0,n=n+Math.imul(b,H)|0,o=o+Math.imul(b,Z)|0,e=e+Math.imul(v,$)|0,n=n+Math.imul(v,K)|0,n=n+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,e=e+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0,e=e+Math.imul(f,X)|0,n=n+Math.imul(f,tt)|0,n=n+Math.imul(c,X)|0,o=o+Math.imul(c,tt)|0;var Mt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,e=Math.imul(S,Y),n=Math.imul(S,q),n=n+Math.imul(D,Y)|0,o=Math.imul(D,q),e=e+Math.imul(A,H)|0,n=n+Math.imul(A,Z)|0,n=n+Math.imul(B,H)|0,o=o+Math.imul(B,Z)|0,e=e+Math.imul(M,$)|0,n=n+Math.imul(M,K)|0,n=n+Math.imul(b,$)|0,o=o+Math.imul(b,K)|0,e=e+Math.imul(v,V)|0,n=n+Math.imul(v,G)|0,n=n+Math.imul(y,V)|0,o=o+Math.imul(y,G)|0,e=e+Math.imul(p,X)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(d,X)|0,o=o+Math.imul(d,tt)|0,e=e+Math.imul(f,it)|0,n=n+Math.imul(f,et)|0,n=n+Math.imul(c,it)|0,o=o+Math.imul(c,et)|0;var bt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,e=Math.imul(R,Y),n=Math.imul(R,q),n=n+Math.imul(x,Y)|0,o=Math.imul(x,q),e=e+Math.imul(S,H)|0,n=n+Math.imul(S,Z)|0,n=n+Math.imul(D,H)|0,o=o+Math.imul(D,Z)|0,e=e+Math.imul(A,$)|0,n=n+Math.imul(A,K)|0,n=n+Math.imul(B,$)|0,o=o+Math.imul(B,K)|0,e=e+Math.imul(M,V)|0,n=n+Math.imul(M,G)|0,n=n+Math.imul(b,V)|0,o=o+Math.imul(b,G)|0,e=e+Math.imul(v,X)|0,n=n+Math.imul(v,tt)|0,n=n+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0,e=e+Math.imul(p,it)|0,n=n+Math.imul(p,et)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,et)|0,e=e+Math.imul(f,ot)|0,n=n+Math.imul(f,ht)|0,n=n+Math.imul(c,ot)|0,o=o+Math.imul(c,ht)|0;var _t=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,e=Math.imul(P,Y),n=Math.imul(P,q),n=n+Math.imul(Q,Y)|0,o=Math.imul(Q,q),e=e+Math.imul(R,H)|0,n=n+Math.imul(R,Z)|0,n=n+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,e=e+Math.imul(S,$)|0,n=n+Math.imul(S,K)|0,n=n+Math.imul(D,$)|0,o=o+Math.imul(D,K)|0,e=e+Math.imul(A,V)|0,n=n+Math.imul(A,G)|0,n=n+Math.imul(B,V)|0,o=o+Math.imul(B,G)|0,e=e+Math.imul(M,X)|0,n=n+Math.imul(M,tt)|0,n=n+Math.imul(b,X)|0,o=o+Math.imul(b,tt)|0,e=e+Math.imul(v,it)|0,n=n+Math.imul(v,et)|0,n=n+Math.imul(y,it)|0,o=o+Math.imul(y,et)|0,e=e+Math.imul(p,ot)|0,n=n+Math.imul(p,ht)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,ht)|0,e=e+Math.imul(f,ut)|0,n=n+Math.imul(f,at)|0,n=n+Math.imul(c,ut)|0,o=o+Math.imul(c,at)|0;var At=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,e=Math.imul(I,Y),n=Math.imul(I,q),n=n+Math.imul(C,Y)|0,o=Math.imul(C,q),e=e+Math.imul(P,H)|0,n=n+Math.imul(P,Z)|0,n=n+Math.imul(Q,H)|0,o=o+Math.imul(Q,Z)|0,e=e+Math.imul(R,$)|0,n=n+Math.imul(R,K)|0,n=n+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,e=e+Math.imul(S,V)|0,n=n+Math.imul(S,G)|0,n=n+Math.imul(D,V)|0,o=o+Math.imul(D,G)|0,e=e+Math.imul(A,X)|0,n=n+Math.imul(A,tt)|0,n=n+Math.imul(B,X)|0,o=o+Math.imul(B,tt)|0,e=e+Math.imul(M,it)|0,n=n+Math.imul(M,et)|0,n=n+Math.imul(b,it)|0,o=o+Math.imul(b,et)|0,e=e+Math.imul(v,ot)|0,n=n+Math.imul(v,ht)|0,n=n+Math.imul(y,ot)|0,o=o+Math.imul(y,ht)|0,e=e+Math.imul(p,ut)|0,n=n+Math.imul(p,at)|0,n=n+Math.imul(d,ut)|0,o=o+Math.imul(d,at)|0,e=e+Math.imul(f,ft)|0,n=n+Math.imul(f,ct)|0,n=n+Math.imul(c,ft)|0,o=o+Math.imul(c,ct)|0;var Bt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,e=Math.imul(L,Y),n=Math.imul(L,q),n=n+Math.imul(N,Y)|0,o=Math.imul(N,q),e=e+Math.imul(I,H)|0,n=n+Math.imul(I,Z)|0,n=n+Math.imul(C,H)|0,o=o+Math.imul(C,Z)|0,e=e+Math.imul(P,$)|0,n=n+Math.imul(P,K)|0,n=n+Math.imul(Q,$)|0,o=o+Math.imul(Q,K)|0,e=e+Math.imul(R,V)|0,n=n+Math.imul(R,G)|0,n=n+Math.imul(x,V)|0,o=o+Math.imul(x,G)|0,e=e+Math.imul(S,X)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(D,X)|0,o=o+Math.imul(D,tt)|0,e=e+Math.imul(A,it)|0,n=n+Math.imul(A,et)|0,n=n+Math.imul(B,it)|0,o=o+Math.imul(B,et)|0,e=e+Math.imul(M,ot)|0,n=n+Math.imul(M,ht)|0,n=n+Math.imul(b,ot)|0,o=o+Math.imul(b,ht)|0,e=e+Math.imul(v,ut)|0,n=n+Math.imul(v,at)|0,n=n+Math.imul(y,ut)|0,o=o+Math.imul(y,at)|0,e=e+Math.imul(p,ft)|0,n=n+Math.imul(p,ct)|0,n=n+Math.imul(d,ft)|0,o=o+Math.imul(d,ct)|0,e=e+Math.imul(f,pt)|0,n=n+Math.imul(f,dt)|0,n=n+Math.imul(c,pt)|0,o=o+Math.imul(c,dt)|0;var Et=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,e=Math.imul(L,H),n=Math.imul(L,Z),n=n+Math.imul(N,H)|0,o=Math.imul(N,Z),e=e+Math.imul(I,$)|0,n=n+Math.imul(I,K)|0,n=n+Math.imul(C,$)|0,o=o+Math.imul(C,K)|0,e=e+Math.imul(P,V)|0,n=n+Math.imul(P,G)|0,n=n+Math.imul(Q,V)|0,o=o+Math.imul(Q,G)|0,e=e+Math.imul(R,X)|0,n=n+Math.imul(R,tt)|0,n=n+Math.imul(x,X)|0,o=o+Math.imul(x,tt)|0,e=e+Math.imul(S,it)|0,n=n+Math.imul(S,et)|0,n=n+Math.imul(D,it)|0,o=o+Math.imul(D,et)|0,e=e+Math.imul(A,ot)|0,n=n+Math.imul(A,ht)|0,n=n+Math.imul(B,ot)|0,o=o+Math.imul(B,ht)|0,e=e+Math.imul(M,ut)|0,n=n+Math.imul(M,at)|0,n=n+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,e=e+Math.imul(v,ft)|0,n=n+Math.imul(v,ct)|0,n=n+Math.imul(y,ft)|0,o=o+Math.imul(y,ct)|0,e=e+Math.imul(p,pt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,dt)|0;var St=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,e=Math.imul(L,$),n=Math.imul(L,K),n=n+Math.imul(N,$)|0,o=Math.imul(N,K),e=e+Math.imul(I,V)|0,n=n+Math.imul(I,G)|0,n=n+Math.imul(C,V)|0,o=o+Math.imul(C,G)|0,e=e+Math.imul(P,X)|0,n=n+Math.imul(P,tt)|0,n=n+Math.imul(Q,X)|0,o=o+Math.imul(Q,tt)|0,e=e+Math.imul(R,it)|0,n=n+Math.imul(R,et)|0,n=n+Math.imul(x,it)|0,o=o+Math.imul(x,et)|0,e=e+Math.imul(S,ot)|0,n=n+Math.imul(S,ht)|0,n=n+Math.imul(D,ot)|0,o=o+Math.imul(D,ht)|0,e=e+Math.imul(A,ut)|0,n=n+Math.imul(A,at)|0,n=n+Math.imul(B,ut)|0,o=o+Math.imul(B,at)|0,e=e+Math.imul(M,ft)|0,n=n+Math.imul(M,ct)|0,n=n+Math.imul(b,ft)|0,o=o+Math.imul(b,ct)|0,e=e+Math.imul(v,pt)|0,n=n+Math.imul(v,dt)|0,n=n+Math.imul(y,pt)|0,o=o+Math.imul(y,dt)|0;var Dt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,e=Math.imul(L,V),n=Math.imul(L,G),n=n+Math.imul(N,V)|0,o=Math.imul(N,G),e=e+Math.imul(I,X)|0,n=n+Math.imul(I,tt)|0,n=n+Math.imul(C,X)|0,o=o+Math.imul(C,tt)|0,e=e+Math.imul(P,it)|0,n=n+Math.imul(P,et)|0,n=n+Math.imul(Q,it)|0,o=o+Math.imul(Q,et)|0,e=e+Math.imul(R,ot)|0,n=n+Math.imul(R,ht)|0,n=n+Math.imul(x,ot)|0,o=o+Math.imul(x,ht)|0,e=e+Math.imul(S,ut)|0,n=n+Math.imul(S,at)|0,n=n+Math.imul(D,ut)|0,o=o+Math.imul(D,at)|0,e=e+Math.imul(A,ft)|0,n=n+Math.imul(A,ct)|0,n=n+Math.imul(B,ft)|0,o=o+Math.imul(B,ct)|0,e=e+Math.imul(M,pt)|0,n=n+Math.imul(M,dt)|0,n=n+Math.imul(b,pt)|0,o=o+Math.imul(b,dt)|0;var Tt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,e=Math.imul(L,X),n=Math.imul(L,tt),n=n+Math.imul(N,X)|0,o=Math.imul(N,tt),e=e+Math.imul(I,it)|0,n=n+Math.imul(I,et)|0,n=n+Math.imul(C,it)|0,o=o+Math.imul(C,et)|0,e=e+Math.imul(P,ot)|0,n=n+Math.imul(P,ht)|0,n=n+Math.imul(Q,ot)|0,o=o+Math.imul(Q,ht)|0,e=e+Math.imul(R,ut)|0,n=n+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,o=o+Math.imul(x,at)|0,e=e+Math.imul(S,ft)|0,n=n+Math.imul(S,ct)|0,n=n+Math.imul(D,ft)|0,o=o+Math.imul(D,ct)|0,e=e+Math.imul(A,pt)|0,n=n+Math.imul(A,dt)|0,n=n+Math.imul(B,pt)|0,o=o+Math.imul(B,dt)|0;var Rt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,e=Math.imul(L,it),n=Math.imul(L,et),n=n+Math.imul(N,it)|0,o=Math.imul(N,et),e=e+Math.imul(I,ot)|0,n=n+Math.imul(I,ht)|0,n=n+Math.imul(C,ot)|0,o=o+Math.imul(C,ht)|0,e=e+Math.imul(P,ut)|0,n=n+Math.imul(P,at)|0,n=n+Math.imul(Q,ut)|0,o=o+Math.imul(Q,at)|0,e=e+Math.imul(R,ft)|0,n=n+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,o=o+Math.imul(x,ct)|0,e=e+Math.imul(S,pt)|0,n=n+Math.imul(S,dt)|0,n=n+Math.imul(D,pt)|0,o=o+Math.imul(D,dt)|0;var xt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,e=Math.imul(L,ot),n=Math.imul(L,ht),n=n+Math.imul(N,ot)|0,o=Math.imul(N,ht),e=e+Math.imul(I,ut)|0,n=n+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,o=o+Math.imul(C,at)|0,e=e+Math.imul(P,ft)|0,n=n+Math.imul(P,ct)|0,n=n+Math.imul(Q,ft)|0,o=o+Math.imul(Q,ct)|0,e=e+Math.imul(R,pt)|0,n=n+Math.imul(R,dt)|0,n=n+Math.imul(x,pt)|0,o=o+Math.imul(x,dt)|0;var kt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,e=Math.imul(L,ut),n=Math.imul(L,at),n=n+Math.imul(N,ut)|0,o=Math.imul(N,at),e=e+Math.imul(I,ft)|0,n=n+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,o=o+Math.imul(C,ct)|0,e=e+Math.imul(P,pt)|0,n=n+Math.imul(P,dt)|0,n=n+Math.imul(Q,pt)|0,o=o+Math.imul(Q,dt)|0;var Pt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,e=Math.imul(L,ft),n=Math.imul(L,ct),n=n+Math.imul(N,ft)|0,o=Math.imul(N,ct),e=e+Math.imul(I,pt)|0,n=n+Math.imul(I,dt)|0,n=n+Math.imul(C,pt)|0,o=o+Math.imul(C,dt)|0;var Qt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,e=Math.imul(L,pt),n=Math.imul(L,dt),n=n+Math.imul(N,pt)|0,o=Math.imul(N,dt);var Ut=(a+e|0)+((8191&n)<<13)|0;return a=(o+(n>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=Mt,u[5]=bt,u[6]=_t,u[7]=At,u[8]=Bt,u[9]=Et,u[10]=St,u[11]=Dt,u[12]=Tt,u[13]=Rt,u[14]=xt,u[15]=kt,u[16]=Pt,u[17]=Qt,u[18]=Ut,0!==a&&(u[19]=a,i.length++),i};Math.imul||(E=a),o.prototype.mulTo=function(t,r){var i,e=this.length+t.length;return i=10===this.length&&10===t.length?E(this,t,r):63>e?a(this,t,r):1024>e?l(this,t,r):f(this,t,r)},c.prototype.makeRBT=function(t){for(var r=Array(t),i=o.prototype._countBits(t)-1,e=0;t>e;e++)r[e]=this.revBin(e,i,t);return r},c.prototype.revBin=function(t,r,i){if(0===t||t===i-1)return t;for(var e=0,n=0;r>n;n++)e|=(1&t)<>=1;return e},c.prototype.permute=function(t,r,i,e,n,o){for(var h=0;o>h;h++)e[h]=r[t[h]],n[h]=i[t[h]]},c.prototype.transform=function(t,r,i,e,n,o){this.permute(o,t,r,i,e,n);for(var h=1;n>h;h<<=1)for(var s=h<<1,u=Math.cos(2*Math.PI/s),a=Math.sin(2*Math.PI/s),l=0;n>l;l+=s)for(var f=u,c=a,m=0;h>m;m++){var p=i[l+m],d=e[l+m],g=i[l+m+h],v=e[l+m+h],y=f*g-c*v;v=f*v+c*g,g=y,i[l+m]=p+g,e[l+m]=d+v,i[l+m+h]=p-g,e[l+m+h]=d-v,m!==s&&(y=u*f-a*c,c=u*c+a*f,f=y)}},c.prototype.guessLen13b=function(t,r){var i=1|Math.max(r,t),e=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<1)for(var e=0;i/2>e;e++){var n=t[e];t[e]=t[i-e-1],t[i-e-1]=n,n=r[e],r[e]=-r[i-e-1],r[i-e-1]=-n}},c.prototype.normalize13b=function(t,r){for(var i=0,e=0;r/2>e;e++){var n=8192*Math.round(t[2*e+1]/r)+Math.round(t[2*e]/r)+i;t[e]=67108863&n,i=67108864>n?0:n/67108864|0}return t},c.prototype.convert13b=function(t,r,i,n){for(var o=0,h=0;r>h;h++)o+=0|t[h],i[2*h]=8191&o,o>>>=13,i[2*h+1]=8191&o,o>>>=13;for(h=2*r;n>h;++h)i[h]=0;e(0===o),e(0===(o&-8192))},c.prototype.stub=function(t){for(var r=Array(t),i=0;t>i;i++)r[i]=0;return r},c.prototype.mulp=function(t,r,i){var e=2*this.guessLen13b(t.length,r.length),n=this.makeRBT(e),o=this.stub(e),h=Array(e),s=Array(e),u=Array(e),a=Array(e),l=Array(e),f=Array(e),c=i.words;c.length=e,this.convert13b(t.words,t.length,h,e),this.convert13b(r.words,r.length,a,e),this.transform(h,o,s,u,e,n),this.transform(a,o,l,f,e,n);for(var m=0;e>m;m++){var p=s[m]*l[m]-u[m]*f[m];u[m]=s[m]*f[m]+u[m]*l[m],s[m]=p}return this.conjugate(s,u,e),this.transform(s,u,c,o,e,n),this.conjugate(c,o,e),this.normalize13b(c,e),i.negative=t.negative^r.negative,i.length=t.length+r.length,i.strip()},o.prototype.mul=function(t){var r=new o(null);return r.words=Array(this.length+t.length),this.mulTo(t,r)},o.prototype.mulf=function(t){var r=new o(null);return r.words=Array(this.length+t.length),f(this,t,r)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){e("number"==typeof t),e(67108864>t);for(var r=0,i=0;this.length>i;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&r);r>>=26,r+=n/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var r=u(t);if(0===r.length)return new o(1);for(var i=this,e=0;r.length>e&&0===r[e];e++,i=i.sqr());if(++ee;e++,n=n.sqr())0!==r[e]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){e("number"==typeof t&&t>=0);var r,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var h=0;for(r=0;this.length>r;r++){var s=this.words[r]&o,u=(0|this.words[r])-s<>>26-i}h&&(this.words[r]=h,this.length++)}if(0!==n){for(r=this.length-1;r>=0;r--)this.words[r+n]=this.words[r];for(r=0;n>r;r++)this.words[r]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return e(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,r,i){e("number"==typeof t&&t>=0);var n;n=r?(r-r%26)/26:0;var o=t%26,h=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a;a++)u.words[a]=this.words[a];u.length=h}if(0===h);else if(this.length>h)for(this.length-=h,a=0;this.length>a;a++)this.words[a]=this.words[a+h];else this.words[0]=0,this.length=1;var l=0;for(a=this.length-1;!(0>a||0===l&&n>a);a--){var f=0|this.words[a];this.words[a]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,r,i){return e(0===this.negative),this.iushrn(t,r,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){e("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26,n=1<=this.length)return!1;var o=this.words[i];return!!(o&n)},o.prototype.imaskn=function(t){e("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26;if(e(0===this.negative,"imaskn works only with positive numbers"),i>=this.length)return this;if(0!==r&&i++,this.length=Math.min(i,this.length),0!==r){var n=67108863^67108863>>>r<t),0>t?this.isubn(-t):0!==this.negative?1===this.length&&t>(0|this.words[0])?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var r=0;this.length>r&&this.words[r]>=67108864;r++)this.words[r]-=67108864,r===this.length-1?this.words[r+1]=1:this.words[r+1]++;return this.length=Math.max(this.length,r+1),this},o.prototype.isubn=function(t){if(e("number"==typeof t),e(67108864>t),0>t)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var r=0;this.length>r&&0>this.words[r];r++)this.words[r]+=67108864,this.words[r+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,r,i){var n,o=t.length+i;this._expand(o);var h,s=0;for(n=0;t.length>n;n++){h=(0|this.words[n+i])+s;var u=(0|t.words[n])*r;h-=67108863&u,s=(h>>26)-(u/67108864|0),this.words[n+i]=67108863&h}for(;this.length-i>n;n++)h=(0|this.words[n+i])+s,s=h>>26,this.words[n+i]=67108863&h;if(0===s)return this.strip();for(e(s===-1),s=0,n=0;this.length>n;n++)h=-(0|this.words[n])+s,s=h>>26,this.words[n]=67108863&h;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,r){var i=this.length-t.length,e=this.clone(),n=t,h=0|n.words[n.length-1],s=this._countBits(h);i=26-s,0!==i&&(n=n.ushln(i),e.iushln(i),h=0|n.words[n.length-1]);var u,a=e.length-n.length;if("mod"!==r){u=new o(null),u.length=a+1,u.words=Array(u.length);for(var l=0;u.length>l;l++)u.words[l]=0}var f=e.clone()._ishlnsubmul(n,1,a);0===f.negative&&(e=f,u&&(u.words[a]=1));for(var c=a-1;c>=0;c--){var m=67108864*(0|e.words[n.length+c])+(0|e.words[n.length+c-1]);for(m=Math.min(m/h|0,67108863),e._ishlnsubmul(n,m,c);0!==e.negative;)m--,e.negative=0,e._ishlnsubmul(n,1,c),e.isZero()||(e.negative^=1);u&&(u.words[c]=m)}return u&&u.strip(),e.strip(),"div"!==r&&0!==i&&e.iushrn(i),{div:u||null,mod:e}},o.prototype.divmod=function(t,r,i){if(e(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var n,h,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,r),"mod"!==r&&(n=s.div.neg()),"div"!==r&&(h=s.mod.neg(),i&&0!==h.negative&&h.iadd(t)),{div:n,mod:h}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),r),"mod"!==r&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),r),"div"!==r&&(h=s.mod.neg(),i&&0!==h.negative&&h.isub(t)),{div:s.div,mod:h}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===r?{div:this.divn(t.words[0]),mod:null}:"mod"===r?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,r)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var r=this.divmod(t);if(r.mod.isZero())return r.div;var i=0!==r.div.negative?r.mod.isub(t):r.mod,e=t.ushrn(1),n=t.andln(1),o=i.cmp(e);return 0>o||1===n&&0===o?r.div:0!==r.div.negative?r.div.isubn(1):r.div.iaddn(1)},o.prototype.modn=function(t){e(67108863>=t);for(var r=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(r*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){e(67108863>=t);for(var r=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*r;this.words[i]=n/t|0,r=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){e(0===t.negative),e(!t.isZero());var r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var n=new o(1),h=new o(0),s=new o(0),u=new o(1),a=0;r.isEven()&&i.isEven();)r.iushrn(1),i.iushrn(1),++a;for(var l=i.clone(),f=r.clone();!r.isZero();){for(var c=0,m=1;0===(r.words[0]&m)&&26>c;++c,m<<=1);if(c>0)for(r.iushrn(c);c-- >0;)(n.isOdd()||h.isOdd())&&(n.iadd(l),h.isub(f)),n.iushrn(1),h.iushrn(1);for(var p=0,d=1;0===(i.words[0]&d)&&26>p;++p,d<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l), -u.isub(f)),s.iushrn(1),u.iushrn(1);r.cmp(i)<0?(i.isub(r),s.isub(n),u.isub(h)):(r.isub(i),n.isub(s),h.isub(u))}return{a:s,b:u,gcd:i.iushln(a)}},o.prototype._invmp=function(t){e(0===t.negative),e(!t.isZero());var r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var n=new o(1),h=new o(0),s=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,a=1;0===(r.words[0]&a)&&26>u;++u,a<<=1);if(u>0)for(r.iushrn(u);u-- >0;)n.isOdd()&&n.iadd(s),n.iushrn(1);for(var l=0,f=1;0===(i.words[0]&f)&&26>l;++l,f<<=1);if(l>0)for(i.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(s),h.iushrn(1);r.cmp(i)<0?(i.isub(r),h.isub(n)):(r.isub(i),n.isub(h))}var c;return c=0===r.cmpn(1)?n:h,c.cmpn(0)<0&&c.iadd(t),c},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var r=this.clone(),i=t.clone();r.negative=0,i.negative=0;for(var e=0;r.isEven()&&i.isEven();e++)r.iushrn(1),i.iushrn(1);for(;;){for(;r.isEven();)r.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=r.cmp(i);if(0>n){var o=r;r=i,i=o}else if(0===n||0===i.cmpn(1))break;r.isub(i)}return i.iushln(e)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){e("number"==typeof t);var r=t%26,i=(t-r)/26,n=1<=this.length)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,h=i;0!==o&&this.length>h;h++){var s=0|this.words[h];s+=o,o=s>>>26,s&=67108863,this.words[h]=s}return 0!==o&&(this.words[h]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var r=0>t;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;this.strip();var i;if(this.length>1)i=1;else{r&&(t=-t),e(67108863>=t,"Number is too big");var n=0|this.words[0];i=n===t?0:t>n?-1:1}return 0!==this.negative?0|-i:i},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var r=this.ucmp(t);return 0!==this.negative?0|-r:r},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(t.length>this.length)return-1;for(var r=0,i=this.length-1;i>=0;i--){var e=0|this.words[i],n=0|t.words[i];if(e!==n){n>e?r=-1:e>n&&(r=1);break}}return r},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return this.cmpn(t)===-1},o.prototype.lt=function(t){return this.cmp(t)===-1},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new y(t)},o.prototype.toRed=function(t){return e(!this.red,"Already a number in reduction context"),e(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return e(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return e(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return e(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return e(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return e(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return e(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return e(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return e(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return e(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return e(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return e(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return e(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return e(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var S={k256:null,p224:null,p192:null,p25519:null};m.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var r,i=t;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),r=i.bitLength();while(r>this.n);var e=this.n>r?-1:i.ucmp(this.p);return 0===e?(i.words[0]=0,i.length=1):e>0?i.isub(this.p):i.strip(),i},m.prototype.split=function(t,r){t.iushrn(this.n,0,r)},m.prototype.imulK=function(t){return t.imul(this.k)},n(p,m),p.prototype.split=function(t,r){for(var i=4194303,e=Math.min(t.length,9),n=0;e>n;n++)r.words[n]=t.words[n];if(r.length=e,9>=t.length)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(r.words[r.length++]=o&i,n=10;t.length>n;n++){var h=0|t.words[n];t.words[n-10]=(h&i)<<4|o>>>22,o=h}o>>>=22,t.words[n-10]=o,t.length-=0===o&&t.length>10?10:9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var r=0,i=0;t.length>i;i++){var e=0|t.words[i];r+=977*e,t.words[i]=67108863&r,r=64*e+(r/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(d,m),n(g,m),n(v,m),v.prototype.imulK=function(t){for(var r=0,i=0;t.length>i;i++){var e=19*(0|t.words[i])+r,n=67108863&e;e>>>=26,t.words[i]=n,r=e}return 0!==r&&(t.words[t.length++]=r),t},o._prime=function D(t){if(S[t])return S[t];var D;if("k256"===t)D=new p;else if("p224"===t)D=new d;else if("p192"===t)D=new g;else{if("p25519"!==t)throw Error("Unknown prime "+t);D=new v}return S[t]=D,D},y.prototype._verify1=function(t){e(0===t.negative,"red works only with positives"),e(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,r){e(0===(t.negative|r.negative),"red works only with positives"),e(t.red&&t.red===r.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,r){this._verify2(t,r);var i=t.add(r);return i.cmp(this.m)<0||i.isub(this.m),i._forceRed(this)},y.prototype.iadd=function(t,r){this._verify2(t,r);var i=t.iadd(r);return i.cmp(this.m)<0||i.isub(this.m),i},y.prototype.sub=function(t,r){this._verify2(t,r);var i=t.sub(r);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},y.prototype.isub=function(t,r){this._verify2(t,r);var i=t.isub(r);return i.cmpn(0)<0&&i.iadd(this.m),i},y.prototype.shl=function(t,r){return this._verify1(t),this.imod(t.ushln(r))},y.prototype.imul=function(t,r){return this._verify2(t,r),this.imod(t.imul(r))},y.prototype.mul=function(t,r){return this._verify2(t,r),this.imod(t.mul(r))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var r=this.m.andln(3);if(e(r%2===1),3===r){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),h=0;!n.isZero()&&0===n.andln(1);)h++,n.iushrn(1);e(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,n),c=this.pow(t,n.addn(1).iushrn(1)),m=this.pow(t,n),p=h;0!==m.cmp(s);){for(var d=m,g=0;0!==d.cmp(s);g++)d=d.redSqr();e(p>g);var v=this.pow(f,new o(1).iushln(p-g-1));c=c.redMul(v),f=v.redSqr(),m=m.redMul(f),p=g}return c},y.prototype.invm=function(t){var r=t._invmp(this.m);return 0!==r.negative?(r.negative=0,this.imod(r).redNeg()):this.imod(r)},y.prototype.pow=function(t,r){if(r.isZero())return new o(1);if(0===r.cmpn(1))return t.clone();var i=4,e=Array(1<n;n++)e[n]=this.mul(e[n-1],t);var h=e[0],s=0,u=0,a=r.bitLength()%26;for(0===a&&(a=26),n=r.length-1;n>=0;n--){for(var l=r.words[n],f=a-1;f>=0;f--){var c=l>>f&1;h!==e[0]&&(h=this.sqr(h)),0!==c||0!==s?(s<<=1,s|=c,u++,(u===i||0===n&&0===f)&&(h=this.mul(h,e[s]),u=0,s=0)):u=0}a=26}return h},y.prototype.convertTo=function(t){var r=t.umod(this.m);return r===t?r.clone():r},y.prototype.convertFrom=function(t){var r=t.clone();return r.red=null,r},o.mont=function(t){return new w(t)},n(w,y),w.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},w.prototype.convertFrom=function(t){var r=this.imod(t.mul(this.rinv));return r.red=null,r},w.prototype.imul=function(t,r){if(t.isZero()||r.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(r),e=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(e).iushrn(this.shift),o=n;return n.cmp(this.m)<0?n.cmpn(0)<0&&(o=n.iadd(this.m)):o=n.isub(this.m),o._forceRed(this)},w.prototype.mul=function(t,r){if(t.isZero()||r.isZero())return new o(0)._forceRed(this);var i=t.mul(r),e=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(e).iushrn(this.shift),h=n;return n.cmp(this.m)<0?n.cmpn(0)<0&&(h=n.iadd(this.m)):h=n.isub(this.m),h._forceRed(this)},w.prototype.invm=function(t){var r=this.imod(t._invmp(this.m).mul(this.r2));return r._forceRed(this)}}(void 0===t||t,this)}).call(r,i(12)(t))},function(t,r){r.read=function(t,r,i,e,n){var o,h,s=8*n-e-1,u=(1<>1,l=-7,f=i?n-1:0,c=i?-1:1,m=t[r+f];for(f+=c,o=m&(1<<-l)-1,m>>=-l,l+=s;l>0;o=256*o+t[r+f],f+=c,l-=8);for(h=o&(1<<-l)-1,o>>=-l,l+=e;l>0;h=256*h+t[r+f],f+=c,l-=8);if(0===o)o=1-a;else{if(o===u)return h?NaN:(m?-1:1)*(1/0);h+=Math.pow(2,e),o-=a}return(m?-1:1)*h*Math.pow(2,o-e)},r.write=function(t,r,i,e,n,o){var h,s,u,a=8*o-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,m=e?0:o-1,p=e?1:-1,d=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,h=l):(h=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-h))<1&&(h--,u*=2),r+=1>h+f?c*Math.pow(2,1-f):c/u,2>r*u||(h++,u/=2),l>h+f?1>h+f?(s=r*Math.pow(2,f-1)*Math.pow(2,n),h=0):(s=(r*u-1)*Math.pow(2,n),h+=f):(s=0,h=l));n>=8;t[i+m]=255&s,m+=p,s/=256,n-=8);for(h=h<0;t[i+m]=255&h,m+=p,h/=256,a-=8);t[i+m-p]|=128*d}},function(t,r){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,r){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}t.exports=i},function(t,r){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,configurable:!1,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,configurable:!1,get:function(){return t.i}}),t.webpackPolyfill=1),t}}])}); \ No newline at end of file +!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("ethFormat",[],r):"object"==typeof exports?exports.ethFormat=r():t.ethFormat=r()}(this,function(){return function(t){function r(e){if(i[e])return i[e].exports;var n=i[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var i={};return r.m=t,r.c=i,r.i=function(t){return t},r.d=function(t,r,i){Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},r.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=6)}([function(t,r,i){var e=i(2);t.exports=function(t){return"string"!=typeof t?t:e(t)?t.slice(2):t}},function(t,r,i){"use strict";(function(t,e){function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function h(r,i){if(o()t)throw new RangeError('"size" argument must not be negative')}function a(t,r,i,e){return u(r),r>0&&void 0!==i?"string"==typeof e?h(t,r).fill(i,e):h(t,r).fill(i):h(t,r)}function l(r,i){if(u(i),r=h(r,0>i?0:0|d(i)),!t.TYPED_ARRAY_SUPPORT)for(var e=0;i>e;++e)r[e]=0;return r}function f(r,i,e){if("string"==typeof e&&""!==e||(e="utf8"),!t.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(i,e);r=h(r,n);var o=r.write(i,e);return o!==n&&(r=r.slice(0,o)),r}function c(t,r){var i=0>r.length?0:0|d(r.length);t=h(t,i);for(var e=0;i>e;e+=1)t[e]=255&r[e];return t}function m(r,i,e,n){if(0>e||e>i.byteLength)throw new RangeError("'offset' is out of bounds");if(e+(n||0)>i.byteLength)throw new RangeError("'length' is out of bounds");return i=void 0===e&&void 0===n?new Uint8Array(i):void 0===n?new Uint8Array(i,e):new Uint8Array(i,e,n),t.TYPED_ARRAY_SUPPORT?(r=i,r.__proto__=t.prototype):r=c(r,i),r}function p(r,i){if(t.isBuffer(i)){var e=0|d(i.length);return r=h(r,e),0===r.length?r:(i.copy(r,0,0,e),r)}if(i){if("undefined"!=typeof ArrayBuffer&&i.buffer instanceof ArrayBuffer||"length"in i)return"number"!=typeof i.length||V(i.length)?h(r,0):c(r,i);if("Buffer"===i.type&&X(i.data))return c(r,i.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function g(r){return+r!=r&&(r=0),t.alloc(+r)}function v(r,i){if(t.isBuffer(r))return r.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;"string"!=typeof r&&(r=""+r);var e=r.length;if(0===e)return 0;for(var n=!1;;)switch(i){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Z(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(r).length;default:if(n)return Z(r).length;i=(""+i).toLowerCase(),n=!0}}function y(t,r,i){var e=!1;if((void 0===r||0>r)&&(r=0),r>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),0>=i)return"";if(i>>>=0,r>>>=0,r>=i)return"";for(t||(t="utf8");;)switch(t){case"hex":return Q(this,r,i);case"utf8":case"utf-8":return R(this,r,i);case"ascii":return k(this,r,i);case"latin1":case"binary":return P(this,r,i);case"base64":return T(this,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,r,i);default:if(e)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),e=!0}}function w(t,r,i){var e=t[r];t[r]=t[i],t[i]=e}function M(r,i,e,n,o){if(0===r.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:r.length-1),0>e&&(e=r.length+e),r.length>e){if(0>e){if(!o)return-1;e=0}}else{if(o)return-1;e=r.length-1}if("string"==typeof i&&(i=t.from(i,n)),t.isBuffer(i))return 0===i.length?-1:b(r,i,e,n,o);if("number"==typeof i)return i=255&i,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(r,i,e):Uint8Array.prototype.lastIndexOf.call(r,i,e):b(r,[i],e,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,i,e,n){function o(t,r){return 1===h?t[r]:t.readUInt16BE(r*h)}var h=1,s=t.length,u=r.length;if(void 0!==e&&(e=(e+"").toLowerCase(),"ucs2"===e||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(2>t.length||2>r.length)return-1;h=2,s/=2,u/=2,i/=2}var a;if(n){var l=-1;for(a=i;s>a;a++)if(o(t,a)===o(r,l===-1?0:a-l)){if(l===-1&&(l=a),a-l+1===u)return l*h}else l!==-1&&(a-=a-l),l=-1}else for(i+u>s&&(i=s-u),a=i;a>=0;a--){for(var f=!0,c=0;u>c;c++)if(o(t,a+c)!==o(r,c)){f=!1;break}if(f)return a}return-1}function _(t,r,i,e){i=+i||0;var n=t.length-i;e?(e=+e,e>n&&(e=n)):e=n;var o=r.length;if(o%2!==0)throw new TypeError("Invalid hex string");e>o/2&&(e=o/2);for(var h=0;e>h;++h){var s=parseInt(r.substr(2*h,2),16);if(isNaN(s))return h;t[i+h]=s}return h}function A(t,r,i,e){return J(Z(r,t.length-i),t,i,e)}function B(t,r,i,e){return J(z(r),t,i,e)}function S(t,r,i,e){return B(t,r,i,e)}function E(t,r,i,e){return J(K(r),t,i,e)}function D(t,r,i,e){return J($(r,t.length-i),t,i,e)}function T(t,r,i){return G.fromByteArray(0===r&&i===t.length?t:t.slice(r,i))}function R(t,r,i){i=Math.min(t.length,i);for(var e=[],n=r;i>n;){var o=t[n],h=null,s=o>239?4:o>223?3:o>191?2:1;if(i>=n+s){var u,a,l,f;switch(s){case 1:128>o&&(h=o);break;case 2:u=t[n+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(h=f));break;case 3:u=t[n+1],a=t[n+2],128===(192&u)&&128===(192&a)&&(f=(15&o)<<12|(63&u)<<6|63&a,f>2047&&(55296>f||f>57343)&&(h=f));break;case 4:u=t[n+1],a=t[n+2],l=t[n+3],128===(192&u)&&128===(192&a)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&a)<<6|63&l,f>65535&&1114112>f&&(h=f))}}null===h?(h=65533,s=1):h>65535&&(h-=65536,e.push(h>>>10&1023|55296),h=56320|1023&h),e.push(h),n+=s}return x(e)}function x(t){var r=t.length;if(tt>=r)return String.fromCharCode.apply(String,t);for(var i="",e=0;r>e;)i+=String.fromCharCode.apply(String,t.slice(e,e+=tt));return i}function k(t,r,i){var e="";i=Math.min(t.length,i);for(var n=r;i>n;++n)e+=String.fromCharCode(127&t[n]);return e}function P(t,r,i){var e="";i=Math.min(t.length,i);for(var n=r;i>n;++n)e+=String.fromCharCode(t[n]);return e}function Q(t,r,i){var e=t.length;r&&r>=0||(r=0),(!i||0>i||i>e)&&(i=e);for(var n="",o=r;i>o;++o)n+=H(t[o]);return n}function U(t,r,i){for(var e=t.slice(r,i),n="",o=0;e.length>o;o+=2)n+=String.fromCharCode(e[o]+256*e[o+1]);return n}function I(t,r,i){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+r>i)throw new RangeError("Trying to access beyond buffer length")}function C(r,i,e,n,o,h){if(!t.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>o||h>i)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function O(t,r,i,e){0>r&&(r=65535+r+1);for(var n=0,o=Math.min(t.length-i,2);o>n;++n)t[i+n]=(r&255<<8*(e?n:1-n))>>>8*(e?n:1-n)}function L(t,r,i,e){0>r&&(r=4294967295+r+1);for(var n=0,o=Math.min(t.length-i,4);o>n;++n)t[i+n]=r>>>8*(e?n:3-n)&255}function N(t,r,i,e,n,o){if(i+e>t.length)throw new RangeError("Index out of range");if(0>i)throw new RangeError("Index out of range")}function j(t,r,i,e,n){return n||N(t,r,i,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,r,i,e,23,4),i+4}function Y(t,r,i,e,n){return n||N(t,r,i,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,r,i,e,52,8),i+8}function q(t){if(t=F(t).replace(rt,""),2>t.length)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return 16>t?"0"+t.toString(16):t.toString(16)}function Z(t,r){r=r||1/0;for(var i,e=t.length,n=null,o=[],h=0;e>h;++h){if(i=t.charCodeAt(h),i>55295&&57344>i){if(!n){if(i>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(h+1===e){(r-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(56320>i){(r-=3)>-1&&o.push(239,191,189),n=i;continue}i=(n-55296<<10|i-56320)+65536}else n&&(r-=3)>-1&&o.push(239,191,189);if(n=null,128>i){if((r-=1)<0)break;o.push(i)}else if(2048>i){if((r-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(65536>i){if((r-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(i>=1114112)throw Error("Invalid code point");if((r-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function z(t){for(var r=[],i=0;t.length>i;++i)r.push(255&t.charCodeAt(i));return r}function $(t,r){for(var i,e,n,o=[],h=0;t.length>h&&(r-=2)>=0;++h)i=t.charCodeAt(h),e=i>>8,n=i%256,o.push(n),o.push(e);return o}function K(t){return G.toByteArray(q(t))}function J(t,r,i,e){for(var n=0;e>n&&(n+io;++o)if(r[o]!==i[o]){e=r[o],n=i[o];break}return n>e?-1:e>n?1:0},t.isEncoding=function(t){switch((t+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(r,i){if(!X(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return t.alloc(0);var e;if(void 0===i)for(i=0,e=0;r.length>e;++e)i+=r[e].length;var n=t.allocUnsafe(i),o=0;for(e=0;r.length>e;++e){var h=r[e];if(!t.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(n,o),o+=h.length}return n},t.byteLength=v,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;t>r;r+=2)w(this,r,r+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;t>r;r+=4)w(this,r,r+3),w(this,r+1,r+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;t>r;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):y.apply(this,arguments)},t.prototype.equals=function(r){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===t.compare(this,r)},t.prototype.inspect=function(){var t="",i=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),""},t.prototype.compare=function(r,i,e,n,o){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(void 0===i&&(i=0),void 0===e&&(e=r?r.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),0>i||e>r.length||0>n||o>this.length)throw new RangeError("out of range index");if(n>=o&&i>=e)return 0;if(n>=o)return-1;if(i>=e)return 1;if(i>>>=0,e>>>=0,n>>>=0,o>>>=0,this===r)return 0;for(var h=o-n,s=e-i,u=Math.min(h,s),a=this.slice(n,o),l=r.slice(i,e),f=0;u>f;++f)if(a[f]!==l[f]){h=a[f],s=l[f];break}return s>h?-1:h>s?1:0},t.prototype.includes=function(t,r,i){return this.indexOf(t,r,i)!==-1},t.prototype.indexOf=function(t,r,i){return M(this,t,r,i,!0)},t.prototype.lastIndexOf=function(t,r,i){return M(this,t,r,i,!1)},t.prototype.write=function(t,r,i,e){if(void 0===r)e="utf8",i=this.length,r=0;else if(void 0===i&&"string"==typeof r)e=r,i=this.length,r=0;else{if(!isFinite(r))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r=0|r,isFinite(i)?(i=0|i,void 0===e&&(e="utf8")):(e=i,i=void 0)}var n=this.length-r;if((void 0===i||i>n)&&(i=n),t.length>0&&(0>i||0>r)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var o=!1;;)switch(e){case"hex":return _(this,t,r,i);case"utf8":case"utf-8":return A(this,t,r,i);case"ascii":return B(this,t,r,i);case"latin1":case"binary":return S(this,t,r,i);case"base64":return E(this,t,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r,i);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(r,i){var e=this.length;r=~~r,i=void 0===i?e:~~i,0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),0>i?(i+=e,0>i&&(i=0)):i>e&&(i=e),r>i&&(i=r);var n;if(t.TYPED_ARRAY_SUPPORT)n=this.subarray(r,i),n.__proto__=t.prototype;else{var o=i-r;n=new t(o,(void 0));for(var h=0;o>h;++h)n[h]=this[h+r]}return n},t.prototype.readUIntLE=function(t,r,i){t=0|t,r=0|r,i||I(t,r,this.length);for(var e=this[t],n=1,o=0;++o0&&(n*=256);)e+=this[t+--r]*n;return e},t.prototype.readUInt8=function(t,r){return r||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,r){return r||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,r){return r||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,r){return r||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,r){return r||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,r,i){t=0|t,r=0|r,i||I(t,r,this.length);for(var e=this[t],n=1,o=0;++oe||(e-=Math.pow(2,8*r)),e},t.prototype.readIntBE=function(t,r,i){t=0|t,r=0|r,i||I(t,r,this.length);for(var e=r,n=1,o=this[t+--e];e>0&&(n*=256);)o+=this[t+--e]*n;return n*=128,n>o||(o-=Math.pow(2,8*r)),o},t.prototype.readInt8=function(t,r){return r||I(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,r){r||I(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt16BE=function(t,r){r||I(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt32LE=function(t,r){return r||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,r){return r||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,r){return r||I(t,4,this.length),W.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,r){return r||I(t,4,this.length),W.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,r){return r||I(t,8,this.length),W.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,r){return r||I(t,8,this.length),W.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,r,i,e){if(t=+t,r=0|r,i=0|i,!e){var n=Math.pow(2,8*i)-1;C(this,t,r,i,n,0)}var o=1,h=0;for(this[r]=255&t;++h=0&&(h*=256);)this[r+o]=t/h&255;return r+i},t.prototype.writeUInt8=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,1,255,0),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[i]=255&r,i+1},t.prototype.writeUInt16LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8):O(this,r,i,!0),i+2},t.prototype.writeUInt16BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=255&r):O(this,r,i,!1),i+2},t.prototype.writeUInt32LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[i+3]=r>>>24,this[i+2]=r>>>16,this[i+1]=r>>>8,this[i]=255&r):L(this,r,i,!0),i+4},t.prototype.writeUInt32BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r):L(this,r,i,!1),i+4},t.prototype.writeIntLE=function(t,r,i,e){if(t=+t,r=0|r,!e){var n=Math.pow(2,8*i-1);C(this,t,r,i,n-1,-n)}var o=0,h=1,s=0;for(this[r]=255&t;++ot&&0===s&&0!==this[r+o-1]&&(s=1),this[r+o]=(t/h>>0)-s&255;return r+i},t.prototype.writeIntBE=function(t,r,i,e){if(t=+t,r=0|r,!e){var n=Math.pow(2,8*i-1);C(this,t,r,i,n-1,-n)}var o=i-1,h=1,s=0;for(this[r+o]=255&t;--o>=0&&(h*=256);)0>t&&0===s&&0!==this[r+o+1]&&(s=1),this[r+o]=(t/h>>0)-s&255;return r+i},t.prototype.writeInt8=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,1,127,-128),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),0>r&&(r=255+r+1),this[i]=255&r,i+1},t.prototype.writeInt16LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8):O(this,r,i,!0),i+2},t.prototype.writeInt16BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=255&r):O(this,r,i,!1),i+2},t.prototype.writeInt32LE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8,this[i+2]=r>>>16,this[i+3]=r>>>24):L(this,r,i,!0),i+4},t.prototype.writeInt32BE=function(r,i,e){return r=+r,i=0|i,e||C(this,r,i,4,2147483647,-2147483648),0>r&&(r=4294967295+r+1),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r):L(this,r,i,!1),i+4},t.prototype.writeFloatLE=function(t,r,i){return j(this,t,r,!0,i)},t.prototype.writeFloatBE=function(t,r,i){return j(this,t,r,!1,i)},t.prototype.writeDoubleLE=function(t,r,i){return Y(this,t,r,!0,i)},t.prototype.writeDoubleBE=function(t,r,i){return Y(this,t,r,!1,i)},t.prototype.copy=function(r,i,e,n){if(e||(e=0),n||0===n||(n=this.length),r.length>i||(i=r.length),i||(i=0),n>0&&e>n&&(n=e),n===e)return 0;if(0===r.length||0===this.length)return 0;if(0>i)throw new RangeError("targetStart out of bounds");if(0>e||e>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),n-e>r.length-i&&(n=r.length-i+e);var o,h=n-e;if(this===r&&i>e&&n>i)for(o=h-1;o>=0;--o)r[o+i]=this[o+e];else if(1e3>h||!t.TYPED_ARRAY_SUPPORT)for(o=0;h>o;++o)r[o+i]=this[o+e];else Uint8Array.prototype.set.call(r,this.subarray(e,e+h),i);return h},t.prototype.fill=function(r,i,e,n){if("string"==typeof r){if("string"==typeof i?(n=i,i=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===r.length){var o=r.charCodeAt(0);256>o&&(r=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof r&&(r=255&r);if(0>i||i>this.length||e>this.length)throw new RangeError("Out of range index");if(i>=e)return this;i>>>=0,e=void 0===e?this.length:e>>>0,r||(r=0);var h;if("number"==typeof r)for(h=i;e>h;++h)this[h]=r;else{var s=t.isBuffer(r)?r:Z(""+new t(r,n)),u=s.length;for(h=0;e-i>h;++h)this[h+i]=s[h%u]}return this};var rt=/[^+\/0-9A-Za-z-_]/g}).call(r,i(1).Buffer,i(11))},function(t,r){t.exports=function(t){if("string"!=typeof t)throw Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},function(t,r,i){"use strict";(function(r){function e(t){var r=t;if("string"!=typeof r)throw Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof r+", while padToEven.");return r.length%2&&(r="0"+r),r}function n(t){var r=t.toString(16);return"0x"+e(r)}function o(t){var i=n(t);return r.from(i.slice(2),"hex")}function h(t){if("string"!=typeof t)throw Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof t+"'.");return r.byteLength(t,"utf8")}function s(t,r,i){if(Array.isArray(t)!==!0)throw Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof t+"'");if(Array.isArray(r)!==!0)throw Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof r+"'");return r[!!i&&"some"||"every"](function(r){return t.indexOf(r)>=0})}function u(t){var i=new r(e(d(t).replace(/^0+|0+$/g,"")),"hex");return i.toString("utf8")}function a(t){var r="",i=0,e=t.length;for("0x"===t.substring(0,2)&&(i=2);e>i;i+=2){var n=parseInt(t.substr(i,2),16);r+=String.fromCharCode(n)}return r}function l(t){var i=new r(t,"utf8");return"0x"+e(i.toString("hex")).replace(/^0+|0+$/g,"")}function f(t){for(var r="",i=0;t.length>i;i++){var e=t.charCodeAt(i),n=e.toString(16);r+=2>n.length?"0"+n:n}return"0x"+r}function c(t,r,i){if(!Array.isArray(t))throw Error("[ethjs-util] method getKeys expecting type Array as 'params' input, got '"+typeof t+"'");if("string"!=typeof r)throw Error("[ethjs-util] method getKeys expecting type String for input 'key' got '"+typeof r+"'.");for(var e=[],n=0;t.length>n;n++){var o=t[n][r];if(i&&!o)o="";else if("string"!=typeof o)throw Error("invalid abi");e.push(o)}return e}function m(t,r){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!r||t.length===2+2*r)}var p=i(2),d=i(0);t.exports={arrayContainsArray:s,intToBuffer:o,getBinarySize:h,isHexPrefixed:p,stripHexPrefix:d,padToEven:e,intToHex:n,fromAscii:f,fromUtf8:l,toAscii:a,toUtf8:u,getKeys:c,isHexString:m}}).call(r,i(1).Buffer)},function(t,r){t.exports={methods:{web3_clientVersion:[[],"S"],web3_sha3:[["S"],"D",1],net_version:[[],"S"],net_peerCount:[[],"Q"],net_listening:[[],"B"],eth_protocolVersion:[[],"S"],eth_syncing:[[],"Boolean|EthSyncing"],eth_coinbase:[[],"D20"],eth_mining:[[],"B"],eth_hashrate:[[],"Q"],eth_gasPrice:[[],"Q"],eth_accounts:[[],["D20"]],eth_blockNumber:[[],"Q"],eth_getBalance:[["D20","Q|T"],"Q",1,2],eth_getStorageAt:[["D20","Q","Q|T"],"D",2,2],eth_getTransactionCount:[["D20","Q|T"],"Q",1,2],eth_getBlockTransactionCountByHash:[["D32"],"Q",1],eth_getBlockTransactionCountByNumber:[["Q|T"],"Q",1],eth_getUncleCountByBlockHash:[["D32"],"Q",1],eth_getUncleCountByBlockNumber:[["Q"],"Q",1],eth_getCode:[["D20","Q|T"],"D",1,2],eth_sign:[["D20","D32"],"D",2],eth_sendTransaction:[["SendTransaction"],"D",1],eth_sendRawTransaction:[["D"],"D32",1],eth_call:[["CallTransaction","Q|T"],"D",1,2],eth_estimateGas:[["EstimateTransaction","Q|T"],"Q",1],eth_getBlockByHash:[["D32","B"],"Block",2],eth_getBlockByNumber:[["Q|T","B"],"Block",2],eth_getTransactionByHash:[["D32"],"Transaction",1],eth_getTransactionByBlockHashAndIndex:[["D32","Q"],"Transaction",2],eth_getTransactionByBlockNumberAndIndex:[["Q|T","Q"],"Transaction",2],eth_getTransactionReceipt:[["D32"],"Receipt",1],eth_getUncleByBlockHashAndIndex:[["D32","Q"],"Block",1],eth_getUncleByBlockNumberAndIndex:[["Q|T","Q"],"Block",2],eth_getCompilers:[[],["S"]],eth_compileLLL:[["S"],"D",1],eth_compileSolidity:[["S"],"D",1],eth_compileSerpent:[["S"],"D",1],eth_newFilter:[["Filter"],"Q",1],eth_newBlockFilter:[[],"Q"],eth_newPendingTransactionFilter:[[],"Q"],eth_uninstallFilter:[["Q"],"B",1],eth_getFilterChanges:[["Q"],["FilterChange"],1],eth_getFilterLogs:[["Q"],["FilterChange"],1],eth_getLogs:[["Filter"],["FilterChange"],1],eth_getWork:[[],["D"]],eth_submitWork:[["D","D32","D32"],"B",3],eth_submitHashrate:[["D","D"],"B",2],db_putString:[["S","S","S"],"B",2],db_getString:[["S","S"],"S",2],db_putHex:[["S","S","D"],"B",2],db_getHex:[["S","S"],"D",2],shh_post:[["SHHPost"],"B",1],shh_version:[[],"S"],shh_newIdentity:[[],"D"],shh_hasIdentity:[["D"],"B"],shh_newGroup:[[],"D"],shh_addToGroup:[["D"],"B",1],shh_newFilter:[["SHHFilter"],"Q",1],shh_uninstallFilter:[["Q"],"B",1],shh_getFilterChanges:[["Q"],["SHHFilterChange"],1],shh_getMessages:[["Q"],["SHHFilterChange"],1]},tags:["latest","earliest","pending"],objects:{EthSyncing:{__required:[],startingBlock:"Q",currentBlock:"Q",highestBlock:"Q"},SendTransaction:{__required:["from","data"],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},EstimateTransaction:{__required:[],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},CallTransaction:{__required:["to"],from:"D20",to:"D20",gas:"Q",gasPrice:"Q",value:"Q",data:"D",nonce:"Q"},Block:{__required:[],number:"Q",hash:"D32",parentHash:"D32",nonce:"D",sha3Uncles:"D",logsBloom:"D",transactionsRoot:"D",stateRoot:"D",receiptsRoot:"D",miner:"D",difficulty:"Q",totalDifficulty:"Q",extraData:"D",size:"Q",gasLimit:"Q",gasUsed:"Q",timestamp:"Q",transactions:["DATA|Transaction"],uncles:["D"]},Transaction:{__required:[],hash:"D32",nonce:"Q",blockHash:"D32",blockNumber:"Q",transactionIndex:"Q",from:"D20",to:"D20",value:"Q",gasPrice:"Q",gas:"Q",input:"D"},Receipt:{__required:[],transactionHash:"D32",transactionIndex:"Q",blockHash:"D32",blockNumber:"Q",cumulativeGasUsed:"Q",gasUsed:"Q",contractAddress:"D20",logs:["FilterChange"]},Filter:{__required:[],fromBlock:"Q|T",toBlock:"Q|T",address:"Array|Data",topics:["D"]},FilterChange:{__required:[],removed:"B",logIndex:"Q",transactionIndex:"Q",transactionHash:"D32",blockHash:"D32",blockNumber:"Q",address:"D20",data:"Array|DATA",topics:["D"]},SHHPost:{__required:["topics","payload","priority","ttl"],from:"D",to:"D",topics:["D"],payload:"D",priority:"Q",ttl:"Q"},SHHFilter:{__required:["topics"],to:"D",topics:["D"]},SHHFilterChange:{__required:[],hash:"D",from:"D",to:"D",expiry:"Q",ttl:"Q",sent:"Q",topics:["D"],payload:"D",workProved:"Q"},SHHMessage:{__required:[],hash:"D",from:"D",to:"D",expiry:"Q",ttl:"Q",sent:"Q",topics:["D"],payload:"D",workProved:"Q"}}}},function(t,r,i){var e=i(8),n=i(0);console.log(new e("87234987239872349872489724897248972348972389472498728723897234",16).toString(10)),t.exports=function(t){if("string"==typeof t||"number"==typeof t){var r=new e(1),i=(t+"").toLowerCase().trim(),o="0x"===i.substr(0,2)||"-0x"===i.substr(0,3),h=n(i);if("-"===h.substr(0,1)&&(h=n(h.slice(1)),r=new e((-1),10)),h=""===h?"0":h,!h.match(/^-?[0-9]+$/)&&h.match(/^[0-9A-Fa-f]+$/)||h.match(/^[a-fA-F]+$/)||o===!0&&h.match(/^[0-9A-Fa-f]+$/))return new e(h,16).mul(r);if((h.match(/^-?[0-9]+$/)||""===h)&&o===!1)return new e(h,10).mul(r)}else if("object"==typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new e(t.toString(10),10);throw Error("[number-to-bn] while converting number "+JSON.stringify(t)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(t,r,i){"use strict";function e(t,r){if(["string","number","object"].indexOf(typeof t)===-1||null===t)return t;var i=m(t);if(m(t).isNeg())throw Error("[ethjs-format] while formatting quantity '"+i.toString(10)+"', invalid negative number. Number must be positive or zero.");return r?"0x"+d(i.toString(16)):i}function n(t,r){var i=t;return f.tags.indexOf(t)===-1&&(i=e(t,r)),i}function o(t,r){var i=t,e=0;if("string"==typeof t&&(i="0x"+d(p(t)),e=v(i)),"number"==typeof r&&null!==t&&"0x"!==i&&(!/^[0-9A-Fa-f]+$/.test(p(i))||e!==2+2*r))throw Error("[ethjs-format] hex string '"+i+"' must be an alphanumeric "+(2+2*r)+" utf8 byte hex (chars: a-fA-F) string, is "+e+" bytes");return i}function h(t,r,i){var e=Object.assign({},r),n=null;if("string"==typeof t&&(n="Boolean|EthSyncing"===t?Object.assign({},f.objects.EthSyncing):"DATA|Transaction"===t?Object.assign({},f.objects.Transaction):Object.assign({},f.objects[t])),!g(Object.keys(r),n.__required))throw Error("[ethjs-format] object "+JSON.stringify(r)+" must contain properties: "+n.__required.join(", "));return Object.keys(n).forEach(function(t){"__required"!==t&&void 0!==r[t]&&(e[t]=u(n[t],r[t],i))}),e}function s(t,r,i,e){var n=r.slice(),o=t;if("Array|DATA"===t&&(o=["D"]),"FilterChange"===t&&"string"==typeof r[0]&&(o=["D32"]),i===!0&&"number"==typeof e&&e>r.length)throw Error("array "+JSON.stringify(r)+" must contain at least "+e+" params, but only contains "+r.length+".");return o=o.slice(),r.forEach(function(t,r){var e=0;o.length>1&&(e=r),n[r]=u(o[e],t,i)}),n}function u(t,r,i,u){var a=r;return"Q"===t?a=e(r,i):"Q|T"===t?a=n(r,i):"D"===t?a=o(r):"D20"===t?a=o(r,20):"D32"===t?a=o(r,32):"object"==typeof r&&null!==r&&Array.isArray(r)===!1?a=h(t,r,i):Array.isArray(r)&&(a=s(t,r,i,u)),a}function a(t,r){return u(f.methods[t][0],r,!0,f.methods[t][2])}function l(t,r){return u(f.methods[t][1],r,!1)}var f=i(4),c=i(3),m=i(5),p=i(0),d=c.padToEven,g=c.arrayContainsArray,v=c.getBinarySize;t.exports={schema:f,formatQuantity:e,formatQuantityOrTag:n,formatObject:h,formatArray:s,format:u,formatInputs:a,formatOutputs:l}},function(t,r){"use strict";function i(t){var r=t.length;if(r%4>0)throw Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function e(t){return 3*t.length/4-i(t)}function n(t){var r,e,n,o,h,s,u=t.length;h=i(t),s=new l(3*u/4-h),n=h>0?u-4:u;var f=0;for(r=0,e=0;n>r;r+=4,e+=3)o=a[t.charCodeAt(r)]<<18|a[t.charCodeAt(r+1)]<<12|a[t.charCodeAt(r+2)]<<6|a[t.charCodeAt(r+3)],s[f++]=o>>16&255,s[f++]=o>>8&255,s[f++]=255&o;return 2===h?(o=a[t.charCodeAt(r)]<<2|a[t.charCodeAt(r+1)]>>4,s[f++]=255&o):1===h&&(o=a[t.charCodeAt(r)]<<10|a[t.charCodeAt(r+1)]<<4|a[t.charCodeAt(r+2)]>>2,s[f++]=o>>8&255,s[f++]=255&o),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function h(t,r,i){for(var e,n=[],h=r;i>h;h+=3)e=(t[h]<<16)+(t[h+1]<<8)+t[h+2],n.push(o(e));return n.join("")}function s(t){for(var r,i=t.length,e=i%3,n="",o=[],s=16383,a=0,l=i-e;l>a;a+=s)o.push(h(t,a,a+s>l?l:a+s));return 1===e?(r=t[i-1],n+=u[r>>2],n+=u[r<<4&63],n+="=="):2===e&&(r=(t[i-2]<<8)+t[i-1],n+=u[r>>10],n+=u[r>>4&63],n+=u[r<<2&63],n+="="),o.push(n),o.join("")}r.byteLength=e,r.toByteArray=n,r.fromByteArray=s;for(var u=[],a=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,m=f.length;m>c;++c)u[c]=f[c],a[f.charCodeAt(c)]=c;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(t,r,i){(function(t){!function(t,r){"use strict";function e(t,r){if(!t)throw Error(r||"Assertion failed")}function n(t,r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,r,i){return o.isBN(t)?t:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==t&&("le"!==r&&"be"!==r||(i=r,r=10),this._init(t||0,r||10,i||"be"))))}function h(t,r,i){for(var e=0,n=Math.min(t.length,i),o=r;n>o;o++){var h=t.charCodeAt(o)-48;e<<=4,e|=49>h||h>54?17>h||h>22?15&h:h-17+10:h-49+10}return e}function s(t,r,i,e){for(var n=0,o=Math.min(t.length,i),h=r;o>h;h++){var s=t.charCodeAt(h)-48; +n*=e,n+=49>s?17>s?s:s-17+10:s-49+10}return n}function u(t){for(var r=Array(t.bitLength()),i=0;r.length>i;i++){var e=i/26|0,n=i%26;r[i]=(t.words[e]&1<>>n}return r}function a(t,r,i){i.negative=r.negative^t.negative;var e=t.length+r.length|0;i.length=e,e=e-1|0;var n=0|t.words[0],o=0|r.words[0],h=n*o,s=67108863&h,u=h/67108864|0;i.words[0]=s;for(var a=1;e>a;a++){for(var l=u>>>26,f=67108863&u,c=Math.min(a,r.length-1),m=Math.max(0,a-t.length+1);c>=m;m++){var p=a-m|0;n=0|t.words[p],o=0|r.words[m],h=n*o+f,l+=h/67108864|0,f=67108863&h}i.words[a]=0|f,u=0|l}return 0!==u?i.words[a]=0|u:i.length--,i.strip()}function l(t,r,i){i.negative=r.negative^t.negative,i.length=t.length+r.length;for(var e=0,n=0,o=0;i.length-1>o;o++){var h=n;n=0;for(var s=67108863&e,u=Math.min(o,r.length-1),a=Math.max(0,o-t.length+1);u>=a;a++){var l=o-a,f=0|t.words[l],c=0|r.words[a],m=f*c,p=67108863&m;h=h+(m/67108864|0)|0,p=p+s|0,s=67108863&p,h=h+(p>>>26)|0,n+=h>>>26,h&=67108863}i.words[o]=s,e=h,h=n}return 0!==e?i.words[o]=e:i.length--,i.strip()}function f(t,r,i){var e=new c;return e.mulp(t,r,i)}function c(t,r){this.x=t,this.y=r}function m(t,r){this.name=t,this.p=new o(r,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function d(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(t){if("string"==typeof t){var r=o._prime(t);this.m=r.p,this.prime=r}else e(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function w(t){y.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;var M;try{M=i(1).Buffer}catch(b){}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,r){return t.cmp(r)>0?t:r},o.min=function(t,r){return t.cmp(r)<0?t:r},o.prototype._init=function(t,r,i){if("number"==typeof t)return this._initNumber(t,r,i);if("object"==typeof t)return this._initArray(t,r,i);"hex"===r&&(r=16),e(r===(0|r)&&r>=2&&36>=r),t=(""+t).replace(/\s+/g,"");var n=0;"-"===t[0]&&n++,16===r?this._parseHex(t,n):this._parseBase(t,r,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),r,i)},o.prototype._initNumber=function(t,r,i){0>t&&(this.negative=1,t=-t),67108864>t?(this.words=[67108863&t],this.length=1):4503599627370496>t?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(e(9007199254740992>t),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),r,i)},o.prototype._initArray=function(t,r,i){if(e("number"==typeof t.length),0>=t.length)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=Array(this.length);for(var n=0;this.length>n;n++)this.words[n]=0;var o,h,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)h=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=h<>>26-s&67108863,s+=24,26>s||(s-=26,o++);else if("le"===i)for(n=0,o=0;t.length>n;n+=3)h=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=h<>>26-s&67108863,s+=24,26>s||(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,r){this.length=Math.ceil((t.length-r)/6),this.words=Array(this.length);for(var i=0;this.length>i;i++)this.words[i]=0;var e,n,o=0;for(i=t.length-6,e=0;i>=r;i-=6)n=h(t,i,i+6),this.words[e]|=n<>>26-o&4194303,o+=24,26>o||(o-=26,e++);i+6!==r&&(n=h(t,r,i+6),this.words[e]|=n<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,r,i){this.words=[0],this.length=1;for(var e=0,n=1;67108863>=n;n*=r)e++;e--,n=n/r|0;for(var o=t.length-i,h=o%e,u=Math.min(o,o-h)+i,a=0,l=i;u>l;l+=e)a=s(t,l,l+e,r),this.imuln(n),67108864>this.words[0]+a?this.words[0]+=a:this._iaddn(a);if(0!==h){var f=1;for(a=s(t,l,t.length,r),l=0;h>l;l++)f*=r;this.imuln(f),67108864>this.words[0]+a?this.words[0]+=a:this._iaddn(a)}},o.prototype.copy=function(t){t.words=Array(this.length);for(var r=0;this.length>r;r++)t.words[r]=this.words[r];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;t>this.length;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var _=["","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"],A=[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],B=[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];o.prototype.toString=function(t,r){t=t||10,r=0|r||1;var i;if(16===t||"hex"===t){i="";for(var n=0,o=0,h=0;this.length>h;h++){var s=this.words[h],u=(16777215&(s<>>24-n&16777215,i=0!==o||h!==this.length-1?_[6-u.length]+u+i:u+i,n+=2,26>n||(n-=26,h--)}for(0!==o&&(i=o.toString(16)+i);i.length%r!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&36>=t){var a=A[t],l=B[t];i="";var f=this.clone();for(f.negative=0;!f.isZero();){var c=f.modn(l).toString(t);f=f.idivn(l),i=f.isZero()?c+i:_[a-c.length]+c+i}for(this.isZero()&&(i="0"+i);i.length%r!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}e(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&e(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,r){return e(void 0!==M),this.toArrayLike(M,t,r)},o.prototype.toArray=function(t,r){return this.toArrayLike(Array,t,r)},o.prototype.toArrayLike=function(t,r,i){var n=this.byteLength(),o=i||Math.max(1,n);e(o>=n,"byte array longer than desired length"),e(o>0,"Requested array length <= 0"),this.strip();var h,s,u="le"===r,a=new t(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)h=l.andln(255),l.iushrn(8),a[s]=h;for(;o>s;s++)a[s]=0}else{for(s=0;o-n>s;s++)a[s]=0;for(s=0;!l.isZero();s++)h=l.andln(255),l.iushrn(8),a[o-s-1]=h}return a},o.prototype._countBits=Math.clz32?function(t){return 32-Math.clz32(t)}:function(t){var r=t,i=0;return 4096>r||(i+=13,r>>>=13),64>r||(i+=7,r>>>=7),8>r||(i+=4,r>>>=4),2>r||(i+=2,r>>>=2),i+r},o.prototype._zeroBits=function(t){if(0===t)return 26;var r=t,i=0;return 0===(8191&r)&&(i+=13,r>>>=13),0===(127&r)&&(i+=7,r>>>=7),0===(15&r)&&(i+=4,r>>>=4),0===(3&r)&&(i+=2,r>>>=2),0===(1&r)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],r=this._countBits(t);return 26*(this.length-1)+r},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,r=0;this.length>r;r++){var i=this._zeroBits(this.words[r]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;t.length>this.length;)this.words[this.length++]=0;for(var r=0;t.length>r;r++)this.words[r]=this.words[r]|t.words[r];return this.strip()},o.prototype.ior=function(t){return e(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var r;r=this.length>t.length?t:this;for(var i=0;r.length>i;i++)this.words[i]=this.words[i]&t.words[i];return this.length=r.length,this.strip()},o.prototype.iand=function(t){return e(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var r,i;this.length>t.length?(r=this,i=t):(r=t,i=this);for(var e=0;i.length>e;e++)this.words[e]=r.words[e]^i.words[e];if(this!==r)for(;r.length>e;e++)this.words[e]=r.words[e];return this.length=r.length,this.strip()},o.prototype.ixor=function(t){return e(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){e("number"==typeof t&&t>=0);var r=0|Math.ceil(t/26),i=t%26;this._expand(r),i>0&&r--;for(var n=0;r>n;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,r){e("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=r?this.words[i]|1<t.length?(i=this,e=t):(i=t,e=this);for(var n=0,o=0;e.length>o;o++)r=(0|i.words[o])+(0|e.words[o])+n,this.words[o]=67108863&r,n=r>>>26;for(;0!==n&&i.length>o;o++)r=(0|i.words[o])+n,this.words[o]=67108863&r,n=r>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;i.length>o;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var r;return 0!==t.negative&&0===this.negative?(t.negative=0,r=this.sub(t),t.negative^=1,r):0===t.negative&&0!==this.negative?(this.negative=0,r=t.sub(this),this.negative=1,r):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var r=this.iadd(t);return t.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;var e,n;i>0?(e=this,n=t):(e=t,n=this);for(var o=0,h=0;n.length>h;h++)r=(0|e.words[h])-(0|n.words[h])+o,o=r>>26,this.words[h]=67108863&r;for(;0!==o&&e.length>h;h++)r=(0|e.words[h])+o,o=r>>26,this.words[h]=67108863&r;if(0===o&&e.length>h&&e!==this)for(;e.length>h;h++)this.words[h]=e.words[h];return this.length=Math.max(this.length,h),e!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var S=function(t,r,i){var e,n,o,h=t.words,s=r.words,u=i.words,a=0,l=0|h[0],f=8191&l,c=l>>>13,m=0|h[1],p=8191&m,d=m>>>13,g=0|h[2],v=8191&g,y=g>>>13,w=0|h[3],M=8191&w,b=w>>>13,_=0|h[4],A=8191&_,B=_>>>13,S=0|h[5],E=8191&S,D=S>>>13,T=0|h[6],R=8191&T,x=T>>>13,k=0|h[7],P=8191&k,Q=k>>>13,U=0|h[8],I=8191&U,C=U>>>13,O=0|h[9],L=8191&O,N=O>>>13,j=0|s[0],Y=8191&j,q=j>>>13,F=0|s[1],H=8191&F,Z=F>>>13,z=0|s[2],$=8191&z,K=z>>>13,J=0|s[3],V=8191&J,G=J>>>13,W=0|s[4],X=8191&W,tt=W>>>13,rt=0|s[5],it=8191&rt,et=rt>>>13,nt=0|s[6],ot=8191&nt,ht=nt>>>13,st=0|s[7],ut=8191&st,at=st>>>13,lt=0|s[8],ft=8191<,ct=lt>>>13,mt=0|s[9],pt=8191&mt,dt=mt>>>13;i.negative=t.negative^r.negative,i.length=19,e=Math.imul(f,Y),n=Math.imul(f,q),n=n+Math.imul(c,Y)|0,o=Math.imul(c,q);var gt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,e=Math.imul(p,Y),n=Math.imul(p,q),n=n+Math.imul(d,Y)|0,o=Math.imul(d,q),e=e+Math.imul(f,H)|0,n=n+Math.imul(f,Z)|0,n=n+Math.imul(c,H)|0,o=o+Math.imul(c,Z)|0;var vt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,e=Math.imul(v,Y),n=Math.imul(v,q),n=n+Math.imul(y,Y)|0,o=Math.imul(y,q),e=e+Math.imul(p,H)|0,n=n+Math.imul(p,Z)|0,n=n+Math.imul(d,H)|0,o=o+Math.imul(d,Z)|0,e=e+Math.imul(f,$)|0,n=n+Math.imul(f,K)|0,n=n+Math.imul(c,$)|0,o=o+Math.imul(c,K)|0;var yt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,e=Math.imul(M,Y),n=Math.imul(M,q),n=n+Math.imul(b,Y)|0,o=Math.imul(b,q),e=e+Math.imul(v,H)|0,n=n+Math.imul(v,Z)|0,n=n+Math.imul(y,H)|0,o=o+Math.imul(y,Z)|0,e=e+Math.imul(p,$)|0,n=n+Math.imul(p,K)|0,n=n+Math.imul(d,$)|0,o=o+Math.imul(d,K)|0,e=e+Math.imul(f,V)|0,n=n+Math.imul(f,G)|0,n=n+Math.imul(c,V)|0,o=o+Math.imul(c,G)|0;var wt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,e=Math.imul(A,Y),n=Math.imul(A,q),n=n+Math.imul(B,Y)|0,o=Math.imul(B,q),e=e+Math.imul(M,H)|0,n=n+Math.imul(M,Z)|0,n=n+Math.imul(b,H)|0,o=o+Math.imul(b,Z)|0,e=e+Math.imul(v,$)|0,n=n+Math.imul(v,K)|0,n=n+Math.imul(y,$)|0,o=o+Math.imul(y,K)|0,e=e+Math.imul(p,V)|0,n=n+Math.imul(p,G)|0,n=n+Math.imul(d,V)|0,o=o+Math.imul(d,G)|0,e=e+Math.imul(f,X)|0,n=n+Math.imul(f,tt)|0,n=n+Math.imul(c,X)|0,o=o+Math.imul(c,tt)|0;var Mt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,e=Math.imul(E,Y),n=Math.imul(E,q),n=n+Math.imul(D,Y)|0,o=Math.imul(D,q),e=e+Math.imul(A,H)|0,n=n+Math.imul(A,Z)|0,n=n+Math.imul(B,H)|0,o=o+Math.imul(B,Z)|0,e=e+Math.imul(M,$)|0,n=n+Math.imul(M,K)|0,n=n+Math.imul(b,$)|0,o=o+Math.imul(b,K)|0,e=e+Math.imul(v,V)|0,n=n+Math.imul(v,G)|0,n=n+Math.imul(y,V)|0,o=o+Math.imul(y,G)|0,e=e+Math.imul(p,X)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(d,X)|0,o=o+Math.imul(d,tt)|0,e=e+Math.imul(f,it)|0,n=n+Math.imul(f,et)|0,n=n+Math.imul(c,it)|0,o=o+Math.imul(c,et)|0;var bt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,e=Math.imul(R,Y),n=Math.imul(R,q),n=n+Math.imul(x,Y)|0,o=Math.imul(x,q),e=e+Math.imul(E,H)|0,n=n+Math.imul(E,Z)|0,n=n+Math.imul(D,H)|0,o=o+Math.imul(D,Z)|0,e=e+Math.imul(A,$)|0,n=n+Math.imul(A,K)|0,n=n+Math.imul(B,$)|0,o=o+Math.imul(B,K)|0,e=e+Math.imul(M,V)|0,n=n+Math.imul(M,G)|0,n=n+Math.imul(b,V)|0,o=o+Math.imul(b,G)|0,e=e+Math.imul(v,X)|0,n=n+Math.imul(v,tt)|0,n=n+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0,e=e+Math.imul(p,it)|0,n=n+Math.imul(p,et)|0,n=n+Math.imul(d,it)|0,o=o+Math.imul(d,et)|0,e=e+Math.imul(f,ot)|0,n=n+Math.imul(f,ht)|0,n=n+Math.imul(c,ot)|0,o=o+Math.imul(c,ht)|0;var _t=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,e=Math.imul(P,Y),n=Math.imul(P,q),n=n+Math.imul(Q,Y)|0,o=Math.imul(Q,q),e=e+Math.imul(R,H)|0,n=n+Math.imul(R,Z)|0,n=n+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,e=e+Math.imul(E,$)|0,n=n+Math.imul(E,K)|0,n=n+Math.imul(D,$)|0,o=o+Math.imul(D,K)|0,e=e+Math.imul(A,V)|0,n=n+Math.imul(A,G)|0,n=n+Math.imul(B,V)|0,o=o+Math.imul(B,G)|0,e=e+Math.imul(M,X)|0,n=n+Math.imul(M,tt)|0,n=n+Math.imul(b,X)|0,o=o+Math.imul(b,tt)|0,e=e+Math.imul(v,it)|0,n=n+Math.imul(v,et)|0,n=n+Math.imul(y,it)|0,o=o+Math.imul(y,et)|0,e=e+Math.imul(p,ot)|0,n=n+Math.imul(p,ht)|0,n=n+Math.imul(d,ot)|0,o=o+Math.imul(d,ht)|0,e=e+Math.imul(f,ut)|0,n=n+Math.imul(f,at)|0,n=n+Math.imul(c,ut)|0,o=o+Math.imul(c,at)|0;var At=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,e=Math.imul(I,Y),n=Math.imul(I,q),n=n+Math.imul(C,Y)|0,o=Math.imul(C,q),e=e+Math.imul(P,H)|0,n=n+Math.imul(P,Z)|0,n=n+Math.imul(Q,H)|0,o=o+Math.imul(Q,Z)|0,e=e+Math.imul(R,$)|0,n=n+Math.imul(R,K)|0,n=n+Math.imul(x,$)|0,o=o+Math.imul(x,K)|0,e=e+Math.imul(E,V)|0,n=n+Math.imul(E,G)|0,n=n+Math.imul(D,V)|0,o=o+Math.imul(D,G)|0,e=e+Math.imul(A,X)|0,n=n+Math.imul(A,tt)|0,n=n+Math.imul(B,X)|0,o=o+Math.imul(B,tt)|0,e=e+Math.imul(M,it)|0,n=n+Math.imul(M,et)|0,n=n+Math.imul(b,it)|0,o=o+Math.imul(b,et)|0,e=e+Math.imul(v,ot)|0,n=n+Math.imul(v,ht)|0,n=n+Math.imul(y,ot)|0,o=o+Math.imul(y,ht)|0,e=e+Math.imul(p,ut)|0,n=n+Math.imul(p,at)|0,n=n+Math.imul(d,ut)|0,o=o+Math.imul(d,at)|0,e=e+Math.imul(f,ft)|0,n=n+Math.imul(f,ct)|0,n=n+Math.imul(c,ft)|0,o=o+Math.imul(c,ct)|0;var Bt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,e=Math.imul(L,Y),n=Math.imul(L,q),n=n+Math.imul(N,Y)|0,o=Math.imul(N,q),e=e+Math.imul(I,H)|0,n=n+Math.imul(I,Z)|0,n=n+Math.imul(C,H)|0,o=o+Math.imul(C,Z)|0,e=e+Math.imul(P,$)|0,n=n+Math.imul(P,K)|0,n=n+Math.imul(Q,$)|0,o=o+Math.imul(Q,K)|0,e=e+Math.imul(R,V)|0,n=n+Math.imul(R,G)|0,n=n+Math.imul(x,V)|0,o=o+Math.imul(x,G)|0,e=e+Math.imul(E,X)|0,n=n+Math.imul(E,tt)|0,n=n+Math.imul(D,X)|0,o=o+Math.imul(D,tt)|0,e=e+Math.imul(A,it)|0,n=n+Math.imul(A,et)|0,n=n+Math.imul(B,it)|0,o=o+Math.imul(B,et)|0,e=e+Math.imul(M,ot)|0,n=n+Math.imul(M,ht)|0,n=n+Math.imul(b,ot)|0,o=o+Math.imul(b,ht)|0,e=e+Math.imul(v,ut)|0,n=n+Math.imul(v,at)|0,n=n+Math.imul(y,ut)|0,o=o+Math.imul(y,at)|0,e=e+Math.imul(p,ft)|0,n=n+Math.imul(p,ct)|0,n=n+Math.imul(d,ft)|0,o=o+Math.imul(d,ct)|0,e=e+Math.imul(f,pt)|0,n=n+Math.imul(f,dt)|0,n=n+Math.imul(c,pt)|0,o=o+Math.imul(c,dt)|0;var St=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,e=Math.imul(L,H),n=Math.imul(L,Z),n=n+Math.imul(N,H)|0,o=Math.imul(N,Z),e=e+Math.imul(I,$)|0,n=n+Math.imul(I,K)|0,n=n+Math.imul(C,$)|0,o=o+Math.imul(C,K)|0,e=e+Math.imul(P,V)|0,n=n+Math.imul(P,G)|0,n=n+Math.imul(Q,V)|0,o=o+Math.imul(Q,G)|0,e=e+Math.imul(R,X)|0,n=n+Math.imul(R,tt)|0,n=n+Math.imul(x,X)|0,o=o+Math.imul(x,tt)|0,e=e+Math.imul(E,it)|0,n=n+Math.imul(E,et)|0,n=n+Math.imul(D,it)|0,o=o+Math.imul(D,et)|0,e=e+Math.imul(A,ot)|0,n=n+Math.imul(A,ht)|0,n=n+Math.imul(B,ot)|0,o=o+Math.imul(B,ht)|0,e=e+Math.imul(M,ut)|0,n=n+Math.imul(M,at)|0,n=n+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,e=e+Math.imul(v,ft)|0,n=n+Math.imul(v,ct)|0,n=n+Math.imul(y,ft)|0,o=o+Math.imul(y,ct)|0,e=e+Math.imul(p,pt)|0,n=n+Math.imul(p,dt)|0,n=n+Math.imul(d,pt)|0,o=o+Math.imul(d,dt)|0;var Et=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,e=Math.imul(L,$),n=Math.imul(L,K),n=n+Math.imul(N,$)|0,o=Math.imul(N,K),e=e+Math.imul(I,V)|0,n=n+Math.imul(I,G)|0,n=n+Math.imul(C,V)|0,o=o+Math.imul(C,G)|0,e=e+Math.imul(P,X)|0,n=n+Math.imul(P,tt)|0,n=n+Math.imul(Q,X)|0,o=o+Math.imul(Q,tt)|0,e=e+Math.imul(R,it)|0,n=n+Math.imul(R,et)|0,n=n+Math.imul(x,it)|0,o=o+Math.imul(x,et)|0,e=e+Math.imul(E,ot)|0,n=n+Math.imul(E,ht)|0,n=n+Math.imul(D,ot)|0,o=o+Math.imul(D,ht)|0,e=e+Math.imul(A,ut)|0,n=n+Math.imul(A,at)|0,n=n+Math.imul(B,ut)|0,o=o+Math.imul(B,at)|0,e=e+Math.imul(M,ft)|0,n=n+Math.imul(M,ct)|0,n=n+Math.imul(b,ft)|0,o=o+Math.imul(b,ct)|0,e=e+Math.imul(v,pt)|0,n=n+Math.imul(v,dt)|0,n=n+Math.imul(y,pt)|0,o=o+Math.imul(y,dt)|0;var Dt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,e=Math.imul(L,V),n=Math.imul(L,G),n=n+Math.imul(N,V)|0,o=Math.imul(N,G),e=e+Math.imul(I,X)|0,n=n+Math.imul(I,tt)|0,n=n+Math.imul(C,X)|0,o=o+Math.imul(C,tt)|0,e=e+Math.imul(P,it)|0,n=n+Math.imul(P,et)|0,n=n+Math.imul(Q,it)|0,o=o+Math.imul(Q,et)|0,e=e+Math.imul(R,ot)|0,n=n+Math.imul(R,ht)|0,n=n+Math.imul(x,ot)|0,o=o+Math.imul(x,ht)|0,e=e+Math.imul(E,ut)|0,n=n+Math.imul(E,at)|0,n=n+Math.imul(D,ut)|0,o=o+Math.imul(D,at)|0,e=e+Math.imul(A,ft)|0,n=n+Math.imul(A,ct)|0,n=n+Math.imul(B,ft)|0,o=o+Math.imul(B,ct)|0,e=e+Math.imul(M,pt)|0,n=n+Math.imul(M,dt)|0,n=n+Math.imul(b,pt)|0,o=o+Math.imul(b,dt)|0;var Tt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,e=Math.imul(L,X),n=Math.imul(L,tt),n=n+Math.imul(N,X)|0,o=Math.imul(N,tt),e=e+Math.imul(I,it)|0,n=n+Math.imul(I,et)|0,n=n+Math.imul(C,it)|0,o=o+Math.imul(C,et)|0,e=e+Math.imul(P,ot)|0,n=n+Math.imul(P,ht)|0,n=n+Math.imul(Q,ot)|0,o=o+Math.imul(Q,ht)|0,e=e+Math.imul(R,ut)|0,n=n+Math.imul(R,at)|0,n=n+Math.imul(x,ut)|0,o=o+Math.imul(x,at)|0,e=e+Math.imul(E,ft)|0,n=n+Math.imul(E,ct)|0,n=n+Math.imul(D,ft)|0,o=o+Math.imul(D,ct)|0,e=e+Math.imul(A,pt)|0,n=n+Math.imul(A,dt)|0,n=n+Math.imul(B,pt)|0,o=o+Math.imul(B,dt)|0;var Rt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,e=Math.imul(L,it),n=Math.imul(L,et),n=n+Math.imul(N,it)|0,o=Math.imul(N,et),e=e+Math.imul(I,ot)|0,n=n+Math.imul(I,ht)|0,n=n+Math.imul(C,ot)|0,o=o+Math.imul(C,ht)|0,e=e+Math.imul(P,ut)|0,n=n+Math.imul(P,at)|0,n=n+Math.imul(Q,ut)|0,o=o+Math.imul(Q,at)|0,e=e+Math.imul(R,ft)|0,n=n+Math.imul(R,ct)|0,n=n+Math.imul(x,ft)|0,o=o+Math.imul(x,ct)|0,e=e+Math.imul(E,pt)|0,n=n+Math.imul(E,dt)|0,n=n+Math.imul(D,pt)|0,o=o+Math.imul(D,dt)|0;var xt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,e=Math.imul(L,ot),n=Math.imul(L,ht),n=n+Math.imul(N,ot)|0,o=Math.imul(N,ht),e=e+Math.imul(I,ut)|0,n=n+Math.imul(I,at)|0,n=n+Math.imul(C,ut)|0,o=o+Math.imul(C,at)|0,e=e+Math.imul(P,ft)|0,n=n+Math.imul(P,ct)|0,n=n+Math.imul(Q,ft)|0,o=o+Math.imul(Q,ct)|0,e=e+Math.imul(R,pt)|0,n=n+Math.imul(R,dt)|0,n=n+Math.imul(x,pt)|0,o=o+Math.imul(x,dt)|0;var kt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,e=Math.imul(L,ut),n=Math.imul(L,at),n=n+Math.imul(N,ut)|0,o=Math.imul(N,at),e=e+Math.imul(I,ft)|0,n=n+Math.imul(I,ct)|0,n=n+Math.imul(C,ft)|0,o=o+Math.imul(C,ct)|0,e=e+Math.imul(P,pt)|0,n=n+Math.imul(P,dt)|0,n=n+Math.imul(Q,pt)|0,o=o+Math.imul(Q,dt)|0;var Pt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,e=Math.imul(L,ft),n=Math.imul(L,ct),n=n+Math.imul(N,ft)|0,o=Math.imul(N,ct),e=e+Math.imul(I,pt)|0,n=n+Math.imul(I,dt)|0,n=n+Math.imul(C,pt)|0,o=o+Math.imul(C,dt)|0;var Qt=(a+e|0)+((8191&n)<<13)|0;a=(o+(n>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,e=Math.imul(L,pt),n=Math.imul(L,dt),n=n+Math.imul(N,pt)|0,o=Math.imul(N,dt);var Ut=(a+e|0)+((8191&n)<<13)|0;return a=(o+(n>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=wt,u[4]=Mt,u[5]=bt,u[6]=_t,u[7]=At,u[8]=Bt,u[9]=St,u[10]=Et,u[11]=Dt,u[12]=Tt,u[13]=Rt,u[14]=xt,u[15]=kt,u[16]=Pt,u[17]=Qt,u[18]=Ut,0!==a&&(u[19]=a,i.length++),i};Math.imul||(S=a),o.prototype.mulTo=function(t,r){var i,e=this.length+t.length;return i=10===this.length&&10===t.length?S(this,t,r):63>e?a(this,t,r):1024>e?l(this,t,r):f(this,t,r)},c.prototype.makeRBT=function(t){for(var r=Array(t),i=o.prototype._countBits(t)-1,e=0;t>e;e++)r[e]=this.revBin(e,i,t);return r},c.prototype.revBin=function(t,r,i){if(0===t||t===i-1)return t;for(var e=0,n=0;r>n;n++)e|=(1&t)<>=1;return e},c.prototype.permute=function(t,r,i,e,n,o){for(var h=0;o>h;h++)e[h]=r[t[h]],n[h]=i[t[h]]},c.prototype.transform=function(t,r,i,e,n,o){this.permute(o,t,r,i,e,n);for(var h=1;n>h;h<<=1)for(var s=h<<1,u=Math.cos(2*Math.PI/s),a=Math.sin(2*Math.PI/s),l=0;n>l;l+=s)for(var f=u,c=a,m=0;h>m;m++){var p=i[l+m],d=e[l+m],g=i[l+m+h],v=e[l+m+h],y=f*g-c*v;v=f*v+c*g,g=y,i[l+m]=p+g,e[l+m]=d+v,i[l+m+h]=p-g,e[l+m+h]=d-v,m!==s&&(y=u*f-a*c,c=u*c+a*f,f=y)}},c.prototype.guessLen13b=function(t,r){var i=1|Math.max(r,t),e=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<1)for(var e=0;i/2>e;e++){var n=t[e];t[e]=t[i-e-1],t[i-e-1]=n,n=r[e],r[e]=-r[i-e-1],r[i-e-1]=-n}},c.prototype.normalize13b=function(t,r){for(var i=0,e=0;r/2>e;e++){var n=8192*Math.round(t[2*e+1]/r)+Math.round(t[2*e]/r)+i;t[e]=67108863&n,i=67108864>n?0:n/67108864|0}return t},c.prototype.convert13b=function(t,r,i,n){for(var o=0,h=0;r>h;h++)o+=0|t[h],i[2*h]=8191&o,o>>>=13,i[2*h+1]=8191&o,o>>>=13;for(h=2*r;n>h;++h)i[h]=0;e(0===o),e(0===(o&-8192))},c.prototype.stub=function(t){for(var r=Array(t),i=0;t>i;i++)r[i]=0;return r},c.prototype.mulp=function(t,r,i){var e=2*this.guessLen13b(t.length,r.length),n=this.makeRBT(e),o=this.stub(e),h=Array(e),s=Array(e),u=Array(e),a=Array(e),l=Array(e),f=Array(e),c=i.words;c.length=e,this.convert13b(t.words,t.length,h,e),this.convert13b(r.words,r.length,a,e),this.transform(h,o,s,u,e,n),this.transform(a,o,l,f,e,n);for(var m=0;e>m;m++){var p=s[m]*l[m]-u[m]*f[m];u[m]=s[m]*f[m]+u[m]*l[m],s[m]=p}return this.conjugate(s,u,e),this.transform(s,u,c,o,e,n),this.conjugate(c,o,e),this.normalize13b(c,e),i.negative=t.negative^r.negative,i.length=t.length+r.length,i.strip()},o.prototype.mul=function(t){var r=new o(null);return r.words=Array(this.length+t.length),this.mulTo(t,r)},o.prototype.mulf=function(t){var r=new o(null);return r.words=Array(this.length+t.length),f(this,t,r)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){e("number"==typeof t),e(67108864>t);for(var r=0,i=0;this.length>i;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&r);r>>=26,r+=n/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var r=u(t);if(0===r.length)return new o(1);for(var i=this,e=0;r.length>e&&0===r[e];e++,i=i.sqr());if(++ee;e++,n=n.sqr())0!==r[e]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){e("number"==typeof t&&t>=0);var r,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var h=0;for(r=0;this.length>r;r++){var s=this.words[r]&o,u=(0|this.words[r])-s<>>26-i}h&&(this.words[r]=h,this.length++)}if(0!==n){for(r=this.length-1;r>=0;r--)this.words[r+n]=this.words[r];for(r=0;n>r;r++)this.words[r]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return e(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,r,i){e("number"==typeof t&&t>=0);var n;n=r?(r-r%26)/26:0;var o=t%26,h=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a;a++)u.words[a]=this.words[a];u.length=h}if(0===h);else if(this.length>h)for(this.length-=h,a=0;this.length>a;a++)this.words[a]=this.words[a+h];else this.words[0]=0,this.length=1;var l=0;for(a=this.length-1;!(0>a||0===l&&n>a);a--){var f=0|this.words[a];this.words[a]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,r,i){return e(0===this.negative),this.iushrn(t,r,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){e("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26,n=1<=this.length)return!1;var o=this.words[i];return!!(o&n)},o.prototype.imaskn=function(t){e("number"==typeof t&&t>=0);var r=t%26,i=(t-r)/26;if(e(0===this.negative,"imaskn works only with positive numbers"),i>=this.length)return this;if(0!==r&&i++,this.length=Math.min(i,this.length),0!==r){var n=67108863^67108863>>>r<t),0>t?this.isubn(-t):0!==this.negative?1===this.length&&t>(0|this.words[0])?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var r=0;this.length>r&&this.words[r]>=67108864;r++)this.words[r]-=67108864,r===this.length-1?this.words[r+1]=1:this.words[r+1]++;return this.length=Math.max(this.length,r+1),this},o.prototype.isubn=function(t){if(e("number"==typeof t),e(67108864>t),0>t)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var r=0;this.length>r&&0>this.words[r];r++)this.words[r]+=67108864,this.words[r+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,r,i){var n,o=t.length+i;this._expand(o);var h,s=0;for(n=0;t.length>n;n++){h=(0|this.words[n+i])+s;var u=(0|t.words[n])*r;h-=67108863&u,s=(h>>26)-(u/67108864|0),this.words[n+i]=67108863&h}for(;this.length-i>n;n++)h=(0|this.words[n+i])+s,s=h>>26,this.words[n+i]=67108863&h;if(0===s)return this.strip();for(e(s===-1),s=0,n=0;this.length>n;n++)h=-(0|this.words[n])+s,s=h>>26,this.words[n]=67108863&h;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,r){var i=this.length-t.length,e=this.clone(),n=t,h=0|n.words[n.length-1],s=this._countBits(h);i=26-s,0!==i&&(n=n.ushln(i),e.iushln(i),h=0|n.words[n.length-1]);var u,a=e.length-n.length;if("mod"!==r){u=new o(null),u.length=a+1,u.words=Array(u.length);for(var l=0;u.length>l;l++)u.words[l]=0}var f=e.clone()._ishlnsubmul(n,1,a);0===f.negative&&(e=f,u&&(u.words[a]=1));for(var c=a-1;c>=0;c--){var m=67108864*(0|e.words[n.length+c])+(0|e.words[n.length+c-1]);for(m=Math.min(m/h|0,67108863),e._ishlnsubmul(n,m,c);0!==e.negative;)m--,e.negative=0,e._ishlnsubmul(n,1,c),e.isZero()||(e.negative^=1);u&&(u.words[c]=m)}return u&&u.strip(),e.strip(),"div"!==r&&0!==i&&e.iushrn(i),{div:u||null,mod:e}},o.prototype.divmod=function(t,r,i){if(e(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var n,h,s;return 0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,r),"mod"!==r&&(n=s.div.neg()),"div"!==r&&(h=s.mod.neg(),i&&0!==h.negative&&h.iadd(t)),{div:n,mod:h}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),r),"mod"!==r&&(n=s.div.neg()),{div:n,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),r),"div"!==r&&(h=s.mod.neg(),i&&0!==h.negative&&h.isub(t)),{div:s.div,mod:h}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===r?{div:this.divn(t.words[0]),mod:null}:"mod"===r?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,r)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var r=this.divmod(t);if(r.mod.isZero())return r.div;var i=0!==r.div.negative?r.mod.isub(t):r.mod,e=t.ushrn(1),n=t.andln(1),o=i.cmp(e);return 0>o||1===n&&0===o?r.div:0!==r.div.negative?r.div.isubn(1):r.div.iaddn(1)},o.prototype.modn=function(t){e(67108863>=t);for(var r=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(r*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){e(67108863>=t);for(var r=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*r;this.words[i]=n/t|0,r=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){e(0===t.negative),e(!t.isZero());var r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var n=new o(1),h=new o(0),s=new o(0),u=new o(1),a=0;r.isEven()&&i.isEven();)r.iushrn(1),i.iushrn(1),++a;for(var l=i.clone(),f=r.clone();!r.isZero();){for(var c=0,m=1;0===(r.words[0]&m)&&26>c;++c, +m<<=1);if(c>0)for(r.iushrn(c);c-- >0;)(n.isOdd()||h.isOdd())&&(n.iadd(l),h.isub(f)),n.iushrn(1),h.iushrn(1);for(var p=0,d=1;0===(i.words[0]&d)&&26>p;++p,d<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);r.cmp(i)<0?(i.isub(r),s.isub(n),u.isub(h)):(r.isub(i),n.isub(s),h.isub(u))}return{a:s,b:u,gcd:i.iushln(a)}},o.prototype._invmp=function(t){e(0===t.negative),e(!t.isZero());var r=this,i=t.clone();r=0!==r.negative?r.umod(t):r.clone();for(var n=new o(1),h=new o(0),s=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,a=1;0===(r.words[0]&a)&&26>u;++u,a<<=1);if(u>0)for(r.iushrn(u);u-- >0;)n.isOdd()&&n.iadd(s),n.iushrn(1);for(var l=0,f=1;0===(i.words[0]&f)&&26>l;++l,f<<=1);if(l>0)for(i.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(s),h.iushrn(1);r.cmp(i)<0?(i.isub(r),h.isub(n)):(r.isub(i),n.isub(h))}var c;return c=0===r.cmpn(1)?n:h,c.cmpn(0)<0&&c.iadd(t),c},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var r=this.clone(),i=t.clone();r.negative=0,i.negative=0;for(var e=0;r.isEven()&&i.isEven();e++)r.iushrn(1),i.iushrn(1);for(;;){for(;r.isEven();)r.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=r.cmp(i);if(0>n){var o=r;r=i,i=o}else if(0===n||0===i.cmpn(1))break;r.isub(i)}return i.iushln(e)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){e("number"==typeof t);var r=t%26,i=(t-r)/26,n=1<=this.length)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,h=i;0!==o&&this.length>h;h++){var s=0|this.words[h];s+=o,o=s>>>26,s&=67108863,this.words[h]=s}return 0!==o&&(this.words[h]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var r=0>t;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;this.strip();var i;if(this.length>1)i=1;else{r&&(t=-t),e(67108863>=t,"Number is too big");var n=0|this.words[0];i=n===t?0:t>n?-1:1}return 0!==this.negative?0|-i:i},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var r=this.ucmp(t);return 0!==this.negative?0|-r:r},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(t.length>this.length)return-1;for(var r=0,i=this.length-1;i>=0;i--){var e=0|this.words[i],n=0|t.words[i];if(e!==n){n>e?r=-1:e>n&&(r=1);break}}return r},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return this.cmpn(t)===-1},o.prototype.lt=function(t){return this.cmp(t)===-1},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new y(t)},o.prototype.toRed=function(t){return e(!this.red,"Already a number in reduction context"),e(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return e(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return e(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return e(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return e(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return e(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return e(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return e(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return e(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return e(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return e(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return e(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return e(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return e(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return e(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var E={k256:null,p224:null,p192:null,p25519:null};m.prototype._tmp=function(){var t=new o(null);return t.words=Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var r,i=t;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),r=i.bitLength();while(r>this.n);var e=this.n>r?-1:i.ucmp(this.p);return 0===e?(i.words[0]=0,i.length=1):e>0?i.isub(this.p):i.strip(),i},m.prototype.split=function(t,r){t.iushrn(this.n,0,r)},m.prototype.imulK=function(t){return t.imul(this.k)},n(p,m),p.prototype.split=function(t,r){for(var i=4194303,e=Math.min(t.length,9),n=0;e>n;n++)r.words[n]=t.words[n];if(r.length=e,9>=t.length)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(r.words[r.length++]=o&i,n=10;t.length>n;n++){var h=0|t.words[n];t.words[n-10]=(h&i)<<4|o>>>22,o=h}o>>>=22,t.words[n-10]=o,t.length-=0===o&&t.length>10?10:9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var r=0,i=0;t.length>i;i++){var e=0|t.words[i];r+=977*e,t.words[i]=67108863&r,r=64*e+(r/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(d,m),n(g,m),n(v,m),v.prototype.imulK=function(t){for(var r=0,i=0;t.length>i;i++){var e=19*(0|t.words[i])+r,n=67108863&e;e>>>=26,t.words[i]=n,r=e}return 0!==r&&(t.words[t.length++]=r),t},o._prime=function D(t){if(E[t])return E[t];var D;if("k256"===t)D=new p;else if("p224"===t)D=new d;else if("p192"===t)D=new g;else{if("p25519"!==t)throw Error("Unknown prime "+t);D=new v}return E[t]=D,D},y.prototype._verify1=function(t){e(0===t.negative,"red works only with positives"),e(t.red,"red works only with red numbers")},y.prototype._verify2=function(t,r){e(0===(t.negative|r.negative),"red works only with positives"),e(t.red&&t.red===r.red,"red works only with red numbers")},y.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},y.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},y.prototype.add=function(t,r){this._verify2(t,r);var i=t.add(r);return i.cmp(this.m)<0||i.isub(this.m),i._forceRed(this)},y.prototype.iadd=function(t,r){this._verify2(t,r);var i=t.iadd(r);return i.cmp(this.m)<0||i.isub(this.m),i},y.prototype.sub=function(t,r){this._verify2(t,r);var i=t.sub(r);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},y.prototype.isub=function(t,r){this._verify2(t,r);var i=t.isub(r);return i.cmpn(0)<0&&i.iadd(this.m),i},y.prototype.shl=function(t,r){return this._verify1(t),this.imod(t.ushln(r))},y.prototype.imul=function(t,r){return this._verify2(t,r),this.imod(t.imul(r))},y.prototype.mul=function(t,r){return this._verify2(t,r),this.imod(t.mul(r))},y.prototype.isqr=function(t){return this.imul(t,t.clone())},y.prototype.sqr=function(t){return this.mul(t,t)},y.prototype.sqrt=function(t){if(t.isZero())return t.clone();var r=this.m.andln(3);if(e(r%2===1),3===r){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),h=0;!n.isZero()&&0===n.andln(1);)h++,n.iushrn(1);e(!n.isZero());var s=new o(1).toRed(this),u=s.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,n),c=this.pow(t,n.addn(1).iushrn(1)),m=this.pow(t,n),p=h;0!==m.cmp(s);){for(var d=m,g=0;0!==d.cmp(s);g++)d=d.redSqr();e(p>g);var v=this.pow(f,new o(1).iushln(p-g-1));c=c.redMul(v),f=v.redSqr(),m=m.redMul(f),p=g}return c},y.prototype.invm=function(t){var r=t._invmp(this.m);return 0!==r.negative?(r.negative=0,this.imod(r).redNeg()):this.imod(r)},y.prototype.pow=function(t,r){if(r.isZero())return new o(1);if(0===r.cmpn(1))return t.clone();var i=4,e=Array(1<n;n++)e[n]=this.mul(e[n-1],t);var h=e[0],s=0,u=0,a=r.bitLength()%26;for(0===a&&(a=26),n=r.length-1;n>=0;n--){for(var l=r.words[n],f=a-1;f>=0;f--){var c=l>>f&1;h!==e[0]&&(h=this.sqr(h)),0!==c||0!==s?(s<<=1,s|=c,u++,(u===i||0===n&&0===f)&&(h=this.mul(h,e[s]),u=0,s=0)):u=0}a=26}return h},y.prototype.convertTo=function(t){var r=t.umod(this.m);return r===t?r.clone():r},y.prototype.convertFrom=function(t){var r=t.clone();return r.red=null,r},o.mont=function(t){return new w(t)},n(w,y),w.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},w.prototype.convertFrom=function(t){var r=this.imod(t.mul(this.rinv));return r.red=null,r},w.prototype.imul=function(t,r){if(t.isZero()||r.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(r),e=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(e).iushrn(this.shift),o=n;return n.cmp(this.m)<0?n.cmpn(0)<0&&(o=n.iadd(this.m)):o=n.isub(this.m),o._forceRed(this)},w.prototype.mul=function(t,r){if(t.isZero()||r.isZero())return new o(0)._forceRed(this);var i=t.mul(r),e=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(e).iushrn(this.shift),h=n;return n.cmp(this.m)<0?n.cmpn(0)<0&&(h=n.iadd(this.m)):h=n.isub(this.m),h._forceRed(this)},w.prototype.invm=function(t){var r=this.imod(t._invmp(this.m).mul(this.r2));return r._forceRed(this)}}(void 0===t||t,this)}).call(r,i(12)(t))},function(t,r){r.read=function(t,r,i,e,n){var o,h,s=8*n-e-1,u=(1<>1,l=-7,f=i?n-1:0,c=i?-1:1,m=t[r+f];for(f+=c,o=m&(1<<-l)-1,m>>=-l,l+=s;l>0;o=256*o+t[r+f],f+=c,l-=8);for(h=o&(1<<-l)-1,o>>=-l,l+=e;l>0;h=256*h+t[r+f],f+=c,l-=8);if(0===o)o=1-a;else{if(o===u)return h?NaN:(m?-1:1)*(1/0);h+=Math.pow(2,e),o-=a}return(m?-1:1)*h*Math.pow(2,o-e)},r.write=function(t,r,i,e,n,o){var h,s,u,a=8*o-n-1,l=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,m=e?0:o-1,p=e?1:-1,d=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,h=l):(h=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-h))<1&&(h--,u*=2),r+=1>h+f?c*Math.pow(2,1-f):c/u,2>r*u||(h++,u/=2),l>h+f?1>h+f?(s=r*Math.pow(2,f-1)*Math.pow(2,n),h=0):(s=(r*u-1)*Math.pow(2,n),h+=f):(s=0,h=l));n>=8;t[i+m]=255&s,m+=p,s/=256,n-=8);for(h=h<0;t[i+m]=255&h,m+=p,h/=256,a-=8);t[i+m-p]|=128*d}},function(t,r){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,r){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}t.exports=i},function(t,r){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,configurable:!1,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,configurable:!1,get:function(){return t.i}}),t.webpackPolyfill=1),t}}])}); \ No newline at end of file diff --git a/package.json b/package.json index f6db69c..8cc205d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ethjs-format", - "version": "0.1.6", + "version": "0.1.7", "description": "A payload formatter for the Ethereum RPC layer.", "main": "lib/index.js", "files": [ @@ -121,10 +121,10 @@ "dependencies": { "bn.js": "4.11.6", "ethjs-schema": "0.1.4", - "strip-hex-prefix": "1.0.0", + "ethjs-util": "0.1.3", "is-hex-prefixed": "1.0.0", - "number-to-bn": "1.5.0", - "ethjs-util": "0.1.3" + "number-to-bn": "1.6.0", + "strip-hex-prefix": "1.0.0" }, "devDependencies": { "babel-cli": "6.18.0", diff --git a/src/tests/test.index.js b/src/tests/test.index.js index e9b3e72..f4d3549 100644 --- a/src/tests/test.index.js +++ b/src/tests/test.index.js @@ -17,7 +17,7 @@ describe('test ethjs-format object', () => { const undefinedNumber = undefined; const emptyString = ''; const zeroNumber = 0; - const justPrefix = '0x'; + const justPrefix = '0'; const floatNumber = '238428.237842'; assert.equal(format.formatQuantity(emptyString, true), '0x00'); @@ -30,6 +30,7 @@ describe('test ethjs-format object', () => { assert.equal(format.formatQuantity(noPrefixHexNumber, true), '0x021d21a2'.toLowerCase()); assert.equal(format.formatQuantity(prefixHexNumber, true), '0x021d21a2'.toLowerCase()); assert.equal(format.formatQuantity(justPrefix, true), '0x00'); + assert.equal(format.formatQuantity('0x10', true), '0x10'); try { format.formatQuantity(floatNumber, true); @@ -82,7 +83,7 @@ describe('test ethjs-format object', () => { const undefinedNumber = undefined; const emptyString = ''; const zeroNumber = 0; - const justPrefix = '0x'; + const justPrefix = '0'; const floatNumber = '238428.237842'; const r1 = format.formatQuantity(prefixHexNumber, false).toString(10);