From fb7ca368aa559f5f360915211e6384ee2911bd23 Mon Sep 17 00:00:00 2001 From: nervehammer Date: Fri, 26 Apr 2019 17:19:19 +0530 Subject: [PATCH 1/6] cleanup --- .DS_Store | Bin 6148 -> 0 bytes app/.DS_Store | Bin 6148 -> 0 bytes app/node_modules/base-x/LICENSE.md | 21 - app/node_modules/base-x/README.md | 79 - app/node_modules/base-x/index.js | 92 - app/node_modules/base-x/package.json | 113 - app/node_modules/bs58/CHANGELOG.md | 61 - app/node_modules/bs58/README.md | 71 - app/node_modules/bs58/index.js | 4 - app/node_modules/bs58/package.json | 120 - app/node_modules/safe-buffer/.travis.yml | 7 - app/node_modules/safe-buffer/LICENSE | 21 - app/node_modules/safe-buffer/README.md | 584 - app/node_modules/safe-buffer/index.js | 62 - app/node_modules/safe-buffer/package.json | 102 - app/node_modules/safe-buffer/test.js | 101 - app/package.json | 14 - dist/android-icon-192x192.png | Bin 5382 -> 0 bytes dist/apple-icon-180x180.png | Bin 7111 -> 0 bytes dist/contracts/Notary.json | 124 - dist/css/app.css | 12 - dist/favicon-16x16.png | Bin 1265 -> 0 bytes dist/favicon-32x32.png | Bin 1734 -> 0 bytes dist/favicon-96x96.png | Bin 3877 -> 0 bytes dist/favicon.ico | Bin 258264 -> 0 bytes dist/favicon.png | Bin 3877 -> 0 bytes dist/index.html | 227 - dist/js/app.js | 62855 -------------------- dist/sign.html | 236 - test/contract_spec.js | 28 - 30 files changed, 64934 deletions(-) delete mode 100644 .DS_Store delete mode 100644 app/.DS_Store delete mode 100644 app/node_modules/base-x/LICENSE.md delete mode 100644 app/node_modules/base-x/README.md delete mode 100644 app/node_modules/base-x/index.js delete mode 100644 app/node_modules/base-x/package.json delete mode 100644 app/node_modules/bs58/CHANGELOG.md delete mode 100644 app/node_modules/bs58/README.md delete mode 100644 app/node_modules/bs58/index.js delete mode 100644 app/node_modules/bs58/package.json delete mode 100644 app/node_modules/safe-buffer/.travis.yml delete mode 100644 app/node_modules/safe-buffer/LICENSE delete mode 100644 app/node_modules/safe-buffer/README.md delete mode 100644 app/node_modules/safe-buffer/index.js delete mode 100644 app/node_modules/safe-buffer/package.json delete mode 100644 app/node_modules/safe-buffer/test.js delete mode 100644 app/package.json delete mode 100644 dist/android-icon-192x192.png delete mode 100644 dist/apple-icon-180x180.png delete mode 100644 dist/contracts/Notary.json delete mode 100644 dist/css/app.css delete mode 100644 dist/favicon-16x16.png delete mode 100644 dist/favicon-32x32.png delete mode 100644 dist/favicon-96x96.png delete mode 100644 dist/favicon.ico delete mode 100644 dist/favicon.png delete mode 100644 dist/index.html delete mode 100644 dist/js/app.js delete mode 100644 dist/sign.html delete mode 100644 test/contract_spec.js diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index da07aa6853bb7b7687f6e861317c0d52c61a4ec7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~J!%6%427R!7lt%jx}3%b$PET#pTHN0A&|z{CXm!~^gR7ES*H$5cmnB-G%I%Z zD|S`@Z2$T80!#olbXV*=%*>dtaK;_?uhYl%a=X5>;#J@&VrHyNnC;iLL0pQvfVyTmjO&;ssLc!1UOG})p;=82 zR;?Ceh}WZ?+UmMqI#RP8R>OzYoz15hnq@nzF`-!xQ4j$Um=RcIKKc27r2jVm&svm< zfC&6E0=7P!4tu^-ovjbA=k?dB`g+i*aXG_}p8zI)6mRKa+;6_1_R^8c3Qa!(fk8n8 H{*=Hspa&6( diff --git a/app/.DS_Store b/app/.DS_Store deleted file mode 100644 index dee0e3ef6901846f5ae79a82155c4009b8f6a42b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~u?oUK42Bc!P;lw!c#99<8yrQSpfBJc2qF~}o$t~8lgnatmLh*3`7XJJw*Sy; zL`3_?aVye^NDDX0#=^uD`9jWee-5|tave{|t!B2U@Eo;HCi}5XPys4H1*iZOpaL^e zAkOi2HKS+Zqfh}VFb@Un`;g$q94wXo=|J!i0Blfp!`f#FFj)c2!BU9|Ok;Y`XjLCW ztnTe#itBQ)RMvLU7(O)atTx5Kw6=>TBrwem1}Z=WCJHQT-r4!Thku*@CoN2=02TN% z1+>`>yB;qUXY0r7S^W@ITNgO!mm|FW1R$}acnx>MezFCagQXG`7=Hv@1_mndQw3g) C!VpCO diff --git a/app/node_modules/base-x/LICENSE.md b/app/node_modules/base-x/LICENSE.md deleted file mode 100644 index 9210242..0000000 --- a/app/node_modules/base-x/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright base-x contributors (c) 2016 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/app/node_modules/base-x/README.md b/app/node_modules/base-x/README.md deleted file mode 100644 index df44950..0000000 --- a/app/node_modules/base-x/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# base-x - -[![NPM Package](https://img.shields.io/npm/v/base-x.svg?style=flat-square)](https://www.npmjs.org/package/base-x) -[![Build Status](https://img.shields.io/travis/cryptocoinjs/base-x.svg?branch=master&style=flat-square)](https://travis-ci.org/cryptocoinjs/base-x) - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -Fast base encoding / decoding of any given alphabet using bitcoin style leading -zero compression. - -## Example - -Base58 - -``` javascript -var BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' -var bs58 = require('base-x')(BASE58) - -var decoded = bs58.decode('5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr') - -console.log(decoded) -// => - -console.log(bs58.encode(decoded)) -// => 5Kd3NBUAdUnhyzenEwVLy9pBKxSwXvE9FMPyR4UKZvpe6E3AgLr -``` - -### Alphabets - -See below for a list of commonly recognized alphabets, and their respective base. - -Base | Alphabet -------------- | ------------- -2 | `01` -8 | `01234567` -11 | `0123456789a` -16 | `0123456789abcdef` -32 | `0123456789ABCDEFGHJKMNPQRSTVWXYZ` -36 | `0123456789abcdefghijklmnopqrstuvwxyz` -58 | `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz` -62 | `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` -64 | `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/` -66 | `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.!~` - - -## How it works - -It encodes octet arrays by doing long divisions on all significant digits in the -array, creating a representation of that number in the new base. Then for every -leading zero in the input (not significant as a number) it will encode as a -single leader character. This is the first in the alphabet and will decode as 8 -bits. The other characters depend upon the base. For example, a base58 alphabet -packs roughly 5.858 bits per character. - -This means the encoded string 000f (using a base16, 0-f alphabet) will actually decode -to 4 bytes unlike a canonical hex encoding which uniformly packs 4 bits into each -character. - -While unusual, this does mean that no padding is required and it works for bases -like 43. **If you need standard hex encoding, or base64 encoding, this module is NOT -appropriate.** - -The algorithm used to convert the base of the number is roughly this: - -```python -significant = 12345 -base = 16 -digits = [] -while significant > base: - significant, remainder = divmod(significant, base) - digits.append(remainder) -digits.append(significant) -assert list(reversed(digits)) == [3,0,3,9] -assert hex(12345) == '0x3039' -``` - -Of course the input is actually an array of digits already :) - -## LICENSE [MIT](LICENSE) diff --git a/app/node_modules/base-x/index.js b/app/node_modules/base-x/index.js deleted file mode 100644 index 7dfe21d..0000000 --- a/app/node_modules/base-x/index.js +++ /dev/null @@ -1,92 +0,0 @@ -// base-x encoding -// Forked from https://github.com/cryptocoinjs/bs58 -// Originally written by Mike Hearn for BitcoinJ -// Copyright (c) 2011 Google Inc -// Ported to JavaScript by Stefan Thomas -// Merged Buffer refactorings from base58-native by Stephen Pair -// Copyright (c) 2013 BitPay Inc - -var Buffer = require('safe-buffer').Buffer - -module.exports = function base (ALPHABET) { - var ALPHABET_MAP = {} - var BASE = ALPHABET.length - var LEADER = ALPHABET.charAt(0) - - // pre-compute lookup table - for (var z = 0; z < ALPHABET.length; z++) { - var x = ALPHABET.charAt(z) - - if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous') - ALPHABET_MAP[x] = z - } - - function encode (source) { - if (source.length === 0) return '' - - var digits = [0] - for (var i = 0; i < source.length; ++i) { - for (var j = 0, carry = source[i]; j < digits.length; ++j) { - carry += digits[j] << 8 - digits[j] = carry % BASE - carry = (carry / BASE) | 0 - } - - while (carry > 0) { - digits.push(carry % BASE) - carry = (carry / BASE) | 0 - } - } - - var string = '' - - // deal with leading zeros - for (var k = 0; source[k] === 0 && k < source.length - 1; ++k) string += LEADER - // convert digits to a string - for (var q = digits.length - 1; q >= 0; --q) string += ALPHABET[digits[q]] - - return string - } - - function decodeUnsafe (string) { - if (typeof string !== 'string') throw new TypeError('Expected String') - if (string.length === 0) return Buffer.allocUnsafe(0) - - var bytes = [0] - for (var i = 0; i < string.length; i++) { - var value = ALPHABET_MAP[string[i]] - if (value === undefined) return - - for (var j = 0, carry = value; j < bytes.length; ++j) { - carry += bytes[j] * BASE - bytes[j] = carry & 0xff - carry >>= 8 - } - - while (carry > 0) { - bytes.push(carry & 0xff) - carry >>= 8 - } - } - - // deal with leading zeros - for (var k = 0; string[k] === LEADER && k < string.length - 1; ++k) { - bytes.push(0) - } - - return Buffer.from(bytes.reverse()) - } - - function decode (string) { - var buffer = decodeUnsafe(string) - if (buffer) return buffer - - throw new Error('Non-base' + BASE + ' character') - } - - return { - encode: encode, - decodeUnsafe: decodeUnsafe, - decode: decode - } -} diff --git a/app/node_modules/base-x/package.json b/app/node_modules/base-x/package.json deleted file mode 100644 index a6899cd..0000000 --- a/app/node_modules/base-x/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_args": [ - [ - { - "name": "base-x", - "raw": "base-x@^3.0.2", - "rawSpec": "^3.0.2", - "scope": null, - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "/Users/john/dev/sign_it/app/node_modules/bs58" - ] - ], - "_from": "base-x@>=3.0.2 <4.0.0", - "_id": "base-x@3.0.4", - "_inCache": true, - "_installable": true, - "_location": "/base-x", - "_nodeVersion": "9.3.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/base-x-3.0.4.tgz_1514468338078_0.9765367864165455" - }, - "_npmUser": { - "email": "fanatid@ya.ru", - "name": "fanatid" - }, - "_npmVersion": "5.5.1", - "_phantomChildren": {}, - "_requested": { - "name": "base-x", - "raw": "base-x@^3.0.2", - "rawSpec": "^3.0.2", - "scope": null, - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "/bs58" - ], - "_resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.4.tgz", - "_shasum": "94c1788736da065edb1d68808869e357c977fa77", - "_shrinkwrap": null, - "_spec": "base-x@^3.0.2", - "_where": "/Users/john/dev/sign_it/app/node_modules/bs58", - "author": { - "name": "Daniel Cousens" - }, - "bugs": { - "url": "https://github.com/cryptocoinjs/base-x/issues" - }, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "description": "Fast base encoding / decoding of any given alphabet", - "devDependencies": { - "standard": "^10.0.3", - "tape": "^4.5.1" - }, - "directories": {}, - "dist": { - "integrity": "sha512-UYOadoSIkEI/VrRGSG6qp93rp2WdokiAiNYDfGW5qURAY8GiAQkvMbwNNSDYiVJopqv4gCna7xqf4rrNGp+5AA==", - "shasum": "94c1788736da065edb1d68808869e357c977fa77", - "tarball": "https://registry.npmjs.org/base-x/-/base-x-3.0.4.tgz" - }, - "files": [ - "index.js" - ], - "gitHead": "346f0d55b05a1ea5643c2d9656e58f0804894a56", - "homepage": "https://github.com/cryptocoinjs/base-x", - "keywords": [ - "base-x", - "base58", - "base62", - "base64", - "crypto", - "crytography", - "decode", - "decoding", - "encode", - "encoding" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "jprichardson@gmail.com", - "name": "jprichardson" - }, - { - "email": "npm@dcousens.com", - "name": "dcousens" - }, - { - "email": "fanatid@ya.ru", - "name": "fanatid" - } - ], - "name": "base-x", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/cryptocoinjs/base-x.git" - }, - "scripts": { - "standard": "standard", - "test": "npm run unit && npm run standard", - "unit": "tape test/*.js" - }, - "version": "3.0.4" -} diff --git a/app/node_modules/bs58/CHANGELOG.md b/app/node_modules/bs58/CHANGELOG.md deleted file mode 100644 index f6f1ffb..0000000 --- a/app/node_modules/bs58/CHANGELOG.md +++ /dev/null @@ -1,61 +0,0 @@ -4.0.0 / 2016-12-3 ------------------- -- `decode` now returns a `Buffer` again, to avoid potential cryptographic errors. [Daniel Cousens / #21](https://github.com/cryptocoinjs/bs58/pull/21) - -3.0.0 / 2015-08-18 ------------------- -- refactored module into generic [`base-x`](https://github.com/cryptocoinjs/base-x). - -2.0.1 / 2014-12-23 ------------------- -- performance boost in `encode()` [#10](https://github.com/cryptocoinjs/bs58/pull/10) - -2.0.0 / 2014-10-03 ------------------- -- `decode` now returns an `Array` instead of `Buffer` to keep things simple. [Daniel Cousens / #9](https://github.com/cryptocoinjs/bs58/pull/9) - -1.2.1 / 2014-07-24 ------------------- -* speed optimizations [Daniel Cousens / #8](https://github.com/cryptocoinjs/bs58/pull/8) - -1.2.0 / 2014-06-29 ------------------- -* removed `bigi` dep, implemented direct byte conversion [Jared Deckard / #6](https://github.com/cryptocoinjs/bs58/pull/6) - -1.1.0 / 2014-06-26 ------------------- -* user `Buffer` internally for calculations, providing cleaner code and a performance increase. [Daniel Cousens](https://github.com/cryptocoinjs/bs58/commit/129c71de8bc1e36f113bce06da0616066f41c5ca) - -1.0.0 / 2014-05-27 ------------------- -* removed `binstring` dep, `Buffer` now only input to `encode()` and output of `decode()` -* update `bigi` from `~0.3.0` to `^1.1.0` -* added travis-ci support -* added coveralls support -* modified tests and library to handle fixture style testing (thanks to bitcoinjs-lib devs and [Daniel Cousens](https://github.com/dcousens)) - - -0.3.0 / 2014-02-24 ------------------- -* duck type input to `encode` and change output of `decode` to `Buffer`. - - -0.2.1 / 2014-02-24 ------------------- -* removed bower and component support. Closes #1 -* convert from 4 spaces to 2 - - -0.2.0 / 2013-12-07 ------------------- -* renamed from `cryptocoin-base58` to `bs58` - - -0.1.0 / 2013-11-20 ------------------- -* removed AMD support - - -0.0.1 / 2013-11-04 ------------------- -* initial release diff --git a/app/node_modules/bs58/README.md b/app/node_modules/bs58/README.md deleted file mode 100644 index 2d5e624..0000000 --- a/app/node_modules/bs58/README.md +++ /dev/null @@ -1,71 +0,0 @@ -bs58 -==== - -[![build status](https://travis-ci.org/cryptocoinjs/bs58.svg)](https://travis-ci.org/cryptocoinjs/bs58) - -JavaScript component to compute base 58 encoding. This encoding is typically used for crypto currencies such as Bitcoin. - -**Note:** If you're looking for **base 58 check** encoding, see: [https://github.com/bitcoinjs/bs58check](https://github.com/bitcoinjs/bs58check), which depends upon this library. - - -Install -------- - - npm i --save bs58 - - -API ---- - -### encode(input) - -`input` must be a [Buffer](https://nodejs.org/api/buffer.html) or an `Array`. It returns a `string`. - -**example**: - -```js -const bs58 = require('bs58') - -const bytes = Buffer.from('003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187', 'hex') -const address = bs58.encode(bytes) -console.log(address) -// => 16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS -``` - - -### decode(input) - -`input` must be a base 58 encoded string. Returns a [Buffer](https://nodejs.org/api/buffer.html). - -**example**: - -```js -const bs58 = require('bs58') - -const address = '16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS' -const bytes = bs58.decode(address) -console.log(out.toString('hex')) -// => 003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187 -``` - -Hack / Test ------------ - -Uses JavaScript standard style. Read more: - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - - -Credits -------- -- [Mike Hearn](https://github.com/mikehearn) for original Java implementation -- [Stefan Thomas](https://github.com/justmoon) for porting to JavaScript -- [Stephan Pair](https://github.com/gasteve) for buffer improvements -- [Daniel Cousens](https://github.com/dcousens) for cleanup and merging improvements from bitcoinjs-lib -- [Jared Deckard](https://github.com/deckar01) for killing `bigi` as a dependency - - -License -------- - -MIT diff --git a/app/node_modules/bs58/index.js b/app/node_modules/bs58/index.js deleted file mode 100644 index c6ae375..0000000 --- a/app/node_modules/bs58/index.js +++ /dev/null @@ -1,4 +0,0 @@ -var basex = require('base-x') -var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' - -module.exports = basex(ALPHABET) diff --git a/app/node_modules/bs58/package.json b/app/node_modules/bs58/package.json deleted file mode 100644 index deff951..0000000 --- a/app/node_modules/bs58/package.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "_args": [ - [ - { - "name": "bs58", - "raw": "bs58", - "rawSpec": "", - "scope": null, - "spec": "latest", - "type": "tag" - }, - "/Users/john/dev/sign_it/app" - ] - ], - "_from": "bs58@latest", - "_id": "bs58@4.0.1", - "_inCache": true, - "_installable": true, - "_location": "/bs58", - "_nodeVersion": "7.10.0", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/bs58-4.0.1.tgz_1496296714153_0.23994185007177293" - }, - "_npmUser": { - "email": "email@dcousens.com", - "name": "dcousens" - }, - "_npmVersion": "4.6.1", - "_phantomChildren": {}, - "_requested": { - "name": "bs58", - "raw": "bs58", - "rawSpec": "", - "scope": null, - "spec": "latest", - "type": "tag" - }, - "_requiredBy": [ - "/" - ], - "_resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "_shasum": "be161e76c354f6f788ae4071f63f34e8c4f0a42a", - "_shrinkwrap": null, - "_spec": "bs58", - "_where": "/Users/john/dev/sign_it/app", - "bugs": { - "url": "https://github.com/cryptocoinjs/bs58/issues" - }, - "dependencies": { - "base-x": "^3.0.2" - }, - "description": "Base 58 encoding / decoding", - "devDependencies": { - "standard": "*", - "tape": "^4.6.3" - }, - "directories": {}, - "dist": { - "shasum": "be161e76c354f6f788ae4071f63f34e8c4f0a42a", - "tarball": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" - }, - "files": [ - "./index.js" - ], - "gitHead": "ba80a23f74efc055577d7040ef32e1ae765d6702", - "homepage": "https://github.com/cryptocoinjs/bs58#readme", - "keywords": [ - "base58", - "bitcoin", - "crypto", - "crytography", - "decode", - "decoding", - "encode", - "encoding", - "litecoin" - ], - "license": "MIT", - "main": "./index.js", - "maintainers": [ - { - "email": "fanatid@ya.ru", - "name": "fanatid" - }, - { - "email": "email@dcousens.com", - "name": "dcousens" - }, - { - "email": "boydb@midnightdesign.ws", - "name": "midnightlightning" - }, - { - "email": "sidazhang89@gmail.com", - "name": "sidazhang" - }, - { - "email": "npm@shesek.info", - "name": "nadav" - }, - { - "email": "jprichardson@gmail.com", - "name": "jprichardson" - } - ], - "name": "bs58", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/cryptocoinjs/bs58.git" - }, - "scripts": { - "standard": "standard", - "test": "npm run standard && npm run unit", - "unit": "tape test/index.js" - }, - "version": "4.0.1" -} diff --git a/app/node_modules/safe-buffer/.travis.yml b/app/node_modules/safe-buffer/.travis.yml deleted file mode 100644 index 7b20f28..0000000 --- a/app/node_modules/safe-buffer/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - 'node' - - '5' - - '4' - - '0.12' - - '0.10' diff --git a/app/node_modules/safe-buffer/LICENSE b/app/node_modules/safe-buffer/LICENSE deleted file mode 100644 index 0c068ce..0000000 --- a/app/node_modules/safe-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/app/node_modules/safe-buffer/README.md b/app/node_modules/safe-buffer/README.md deleted file mode 100644 index e9a81af..0000000 --- a/app/node_modules/safe-buffer/README.md +++ /dev/null @@ -1,584 +0,0 @@ -# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg -[travis-url]: https://travis-ci.org/feross/safe-buffer -[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg -[npm-url]: https://npmjs.org/package/safe-buffer -[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg -[downloads-url]: https://npmjs.org/package/safe-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -#### Safer Node.js Buffer API - -**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, -`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** - -**Uses the built-in implementation when available.** - -## install - -``` -npm install safe-buffer -``` - -## usage - -The goal of this package is to provide a safe replacement for the node.js `Buffer`. - -It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to -the top of your node.js modules: - -```js -var Buffer = require('safe-buffer').Buffer - -// Existing buffer code will continue to work without issues: - -new Buffer('hey', 'utf8') -new Buffer([1, 2, 3], 'utf8') -new Buffer(obj) -new Buffer(16) // create an uninitialized buffer (potentially unsafe) - -// But you can use these new explicit APIs to make clear what you want: - -Buffer.from('hey', 'utf8') // convert from many types to a Buffer -Buffer.alloc(16) // create a zero-filled buffer (safe) -Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) -``` - -## api - -### Class Method: Buffer.from(array) - - -* `array` {Array} - -Allocates a new `Buffer` using an `array` of octets. - -```js -const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); - // creates a new Buffer containing ASCII bytes - // ['b','u','f','f','e','r'] -``` - -A `TypeError` will be thrown if `array` is not an `Array`. - -### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) - - -* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or - a `new ArrayBuffer()` -* `byteOffset` {Number} Default: `0` -* `length` {Number} Default: `arrayBuffer.length - byteOffset` - -When passed a reference to the `.buffer` property of a `TypedArray` instance, -the newly created `Buffer` will share the same allocated memory as the -TypedArray. - -```js -const arr = new Uint16Array(2); -arr[0] = 5000; -arr[1] = 4000; - -const buf = Buffer.from(arr.buffer); // shares the memory with arr; - -console.log(buf); - // Prints: - -// changing the TypedArray changes the Buffer also -arr[1] = 6000; - -console.log(buf); - // Prints: -``` - -The optional `byteOffset` and `length` arguments specify a memory range within -the `arrayBuffer` that will be shared by the `Buffer`. - -```js -const ab = new ArrayBuffer(10); -const buf = Buffer.from(ab, 0, 2); -console.log(buf.length); - // Prints: 2 -``` - -A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. - -### Class Method: Buffer.from(buffer) - - -* `buffer` {Buffer} - -Copies the passed `buffer` data onto a new `Buffer` instance. - -```js -const buf1 = Buffer.from('buffer'); -const buf2 = Buffer.from(buf1); - -buf1[0] = 0x61; -console.log(buf1.toString()); - // 'auffer' -console.log(buf2.toString()); - // 'buffer' (copy is not changed) -``` - -A `TypeError` will be thrown if `buffer` is not a `Buffer`. - -### Class Method: Buffer.from(str[, encoding]) - - -* `str` {String} String to encode. -* `encoding` {String} Encoding to use, Default: `'utf8'` - -Creates a new `Buffer` containing the given JavaScript string `str`. If -provided, the `encoding` parameter identifies the character encoding. -If not provided, `encoding` defaults to `'utf8'`. - -```js -const buf1 = Buffer.from('this is a tést'); -console.log(buf1.toString()); - // prints: this is a tést -console.log(buf1.toString('ascii')); - // prints: this is a tC)st - -const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); -console.log(buf2.toString()); - // prints: this is a tést -``` - -A `TypeError` will be thrown if `str` is not a string. - -### Class Method: Buffer.alloc(size[, fill[, encoding]]) - - -* `size` {Number} -* `fill` {Value} Default: `undefined` -* `encoding` {String} Default: `utf8` - -Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the -`Buffer` will be *zero-filled*. - -```js -const buf = Buffer.alloc(5); -console.log(buf); - // -``` - -The `size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -If `fill` is specified, the allocated `Buffer` will be initialized by calling -`buf.fill(fill)`. See [`buf.fill()`][] for more information. - -```js -const buf = Buffer.alloc(5, 'a'); -console.log(buf); - // -``` - -If both `fill` and `encoding` are specified, the allocated `Buffer` will be -initialized by calling `buf.fill(fill, encoding)`. For example: - -```js -const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); -console.log(buf); - // -``` - -Calling `Buffer.alloc(size)` can be significantly slower than the alternative -`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance -contents will *never contain sensitive data*. - -A `TypeError` will be thrown if `size` is not a number. - -### Class Method: Buffer.allocUnsafe(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must -be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit -architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is -thrown. A zero-length Buffer will be created if a `size` less than or equal to -0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -```js -const buf = Buffer.allocUnsafe(5); -console.log(buf); - // - // (octets will be different, every time) -buf.fill(0); -console.log(buf); - // -``` - -A `TypeError` will be thrown if `size` is not a number. - -Note that the `Buffer` module pre-allocates an internal `Buffer` instance of -size `Buffer.poolSize` that is used as a pool for the fast allocation of new -`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated -`new Buffer(size)` constructor) only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default -value of `Buffer.poolSize` is `8192` but can be modified. - -Use of this pre-allocated internal memory pool is a key difference between -calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. -Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer -pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal -Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The -difference is subtle but can be important when an application requires the -additional performance that `Buffer.allocUnsafe(size)` provides. - -### Class Method: Buffer.allocUnsafeSlow(size) - - -* `size` {Number} - -Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The -`size` must be less than or equal to the value of -`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is -`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will -be created if a `size` less than or equal to 0 is specified. - -The underlying memory for `Buffer` instances created in this way is *not -initialized*. The contents of the newly created `Buffer` are unknown and -*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such -`Buffer` instances to zeroes. - -When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, -allocations under 4KB are, by default, sliced from a single pre-allocated -`Buffer`. This allows applications to avoid the garbage collection overhead of -creating many individually allocated Buffers. This approach improves both -performance and memory usage by eliminating the need to track and cleanup as -many `Persistent` objects. - -However, in the case where a developer may need to retain a small chunk of -memory from a pool for an indeterminate amount of time, it may be appropriate -to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then -copy out the relevant bits. - -```js -// need to keep around a few small chunks of memory -const store = []; - -socket.on('readable', () => { - const data = socket.read(); - // allocate for retained data - const sb = Buffer.allocUnsafeSlow(10); - // copy the data into the new allocation - data.copy(sb, 0, 0, 10); - store.push(sb); -}); -``` - -Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* -a developer has observed undue memory retention in their applications. - -A `TypeError` will be thrown if `size` is not a number. - -### All the Rest - -The rest of the `Buffer` API is exactly the same as in node.js. -[See the docs](https://nodejs.org/api/buffer.html). - - -## Related links - -- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) -- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) - -## Why is `Buffer` unsafe? - -Today, the node.js `Buffer` constructor is overloaded to handle many different argument -types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), -`ArrayBuffer`, and also `Number`. - -The API is optimized for convenience: you can throw any type at it, and it will try to do -what you want. - -Because the Buffer constructor is so powerful, you often see code like this: - -```js -// Convert UTF-8 strings to hex -function toHex (str) { - return new Buffer(str).toString('hex') -} -``` - -***But what happens if `toHex` is called with a `Number` argument?*** - -### Remote Memory Disclosure - -If an attacker can make your program call the `Buffer` constructor with a `Number` -argument, then they can make it allocate uninitialized memory from the node.js process. -This could potentially disclose TLS private keys, user data, or database passwords. - -When the `Buffer` constructor is passed a `Number` argument, it returns an -**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like -this, you **MUST** overwrite the contents before returning it to the user. - -From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): - -> `new Buffer(size)` -> -> - `size` Number -> -> The underlying memory for `Buffer` instances created in this way is not initialized. -> **The contents of a newly created `Buffer` are unknown and could contain sensitive -> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. - -(Emphasis our own.) - -Whenever the programmer intended to create an uninitialized `Buffer` you often see code -like this: - -```js -var buf = new Buffer(16) - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### Would this ever be a problem in real code? - -Yes. It's surprisingly common to forget to check the type of your variables in a -dynamically-typed language like JavaScript. - -Usually the consequences of assuming the wrong type is that your program crashes with an -uncaught exception. But the failure mode for forgetting to check the type of arguments to -the `Buffer` constructor is more catastrophic. - -Here's an example of a vulnerable service that takes a JSON payload and converts it to -hex: - -```js -// Take a JSON payload {str: "some string"} and convert it to hex -var server = http.createServer(function (req, res) { - var data = '' - req.setEncoding('utf8') - req.on('data', function (chunk) { - data += chunk - }) - req.on('end', function () { - var body = JSON.parse(data) - res.end(new Buffer(body.str).toString('hex')) - }) -}) - -server.listen(8080) -``` - -In this example, an http client just has to send: - -```json -{ - "str": 1000 -} -``` - -and it will get back 1,000 bytes of uninitialized memory from the server. - -This is a very serious bug. It's similar in severity to the -[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process -memory by remote attackers. - - -### Which real-world packages were vulnerable? - -#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) - -[Mathias Buus](https://github.com/mafintosh) and I -([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, -[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow -anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get -them to reveal 20 bytes at a time of uninitialized memory from the node.js process. - -Here's -[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) -that fixed it. We released a new fixed version, created a -[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all -vulnerable versions on npm so users will get a warning to upgrade to a newer version. - -#### [`ws`](https://www.npmjs.com/package/ws) - -That got us wondering if there were other vulnerable packages. Sure enough, within a short -period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the -most popular WebSocket implementation in node.js. - -If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as -expected, then uninitialized server memory would be disclosed to the remote peer. - -These were the vulnerable methods: - -```js -socket.send(number) -socket.ping(number) -socket.pong(number) -``` - -Here's a vulnerable socket server with some echo functionality: - -```js -server.on('connection', function (socket) { - socket.on('message', function (message) { - message = JSON.parse(message) - if (message.type === 'echo') { - socket.send(message.data) // send back the user's message - } - }) -}) -``` - -`socket.send(number)` called on the server, will disclose server memory. - -Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue -was fixed, with a more detailed explanation. Props to -[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the -[Node Security Project disclosure](https://nodesecurity.io/advisories/67). - - -### What's the solution? - -It's important that node.js offers a fast way to get memory otherwise performance-critical -applications would needlessly get a lot slower. - -But we need a better way to *signal our intent* as programmers. **When we want -uninitialized memory, we should request it explicitly.** - -Sensitive functionality should not be packed into a developer-friendly API that loosely -accepts many different types. This type of API encourages the lazy practice of passing -variables in without checking the type very carefully. - -#### A new API: `Buffer.allocUnsafe(number)` - -The functionality of creating buffers with uninitialized memory should be part of another -API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that -frequently gets user input of all sorts of different types passed into it. - -```js -var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! - -// Immediately overwrite the uninitialized buffer with data from another buffer -for (var i = 0; i < buf.length; i++) { - buf[i] = otherBuf[i] -} -``` - - -### How do we fix node.js core? - -We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as -`semver-major`) which defends against one case: - -```js -var str = 16 -new Buffer(str, 'utf8') -``` - -In this situation, it's implied that the programmer intended the first argument to be a -string, since they passed an encoding as a second argument. Today, node.js will allocate -uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not -what the programmer intended. - -But this is only a partial solution, since if the programmer does `new Buffer(variable)` -(without an `encoding` parameter) there's no way to know what they intended. If `variable` -is sometimes a number, then uninitialized memory will sometimes be returned. - -### What's the real long-term fix? - -We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when -we need uninitialized memory. But that would break 1000s of packages. - -~~We believe the best solution is to:~~ - -~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ - -~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ - -#### Update - -We now support adding three new APIs: - -- `Buffer.from(value)` - convert from any type to a buffer -- `Buffer.alloc(size)` - create a zero-filled buffer -- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size - -This solves the core problem that affected `ws` and `bittorrent-dht` which is -`Buffer(variable)` getting tricked into taking a number argument. - -This way, existing code continues working and the impact on the npm ecosystem will be -minimal. Over time, npm maintainers can migrate performance-critical code to use -`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. - - -### Conclusion - -We think there's a serious design issue with the `Buffer` API as it exists today. It -promotes insecure software by putting high-risk functionality into a convenient API -with friendly "developer ergonomics". - -This wasn't merely a theoretical exercise because we found the issue in some of the -most popular npm packages. - -Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of -`buffer`. - -```js -var Buffer = require('safe-buffer').Buffer -``` - -Eventually, we hope that node.js core can switch to this new, safer behavior. We believe -the impact on the ecosystem would be minimal since it's not a breaking change. -Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while -older, insecure packages would magically become safe from this attack vector. - - -## links - -- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) -- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) -- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) - - -## credit - -The original issues in `bittorrent-dht` -([disclosure](https://nodesecurity.io/advisories/68)) and -`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by -[Mathias Buus](https://github.com/mafintosh) and -[Feross Aboukhadijeh](http://feross.org/). - -Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues -and for his work running the [Node Security Project](https://nodesecurity.io/). - -Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and -auditing the code. - - -## license - -MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/app/node_modules/safe-buffer/index.js b/app/node_modules/safe-buffer/index.js deleted file mode 100644 index 22438da..0000000 --- a/app/node_modules/safe-buffer/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ -var buffer = require('buffer') -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} diff --git a/app/node_modules/safe-buffer/package.json b/app/node_modules/safe-buffer/package.json deleted file mode 100644 index 812352f..0000000 --- a/app/node_modules/safe-buffer/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_args": [ - [ - { - "name": "safe-buffer", - "raw": "safe-buffer@^5.0.1", - "rawSpec": "^5.0.1", - "scope": null, - "spec": ">=5.0.1 <6.0.0", - "type": "range" - }, - "/Users/john/dev/sign_it/app/node_modules/base-x" - ] - ], - "_from": "safe-buffer@>=5.0.1 <6.0.0", - "_id": "safe-buffer@5.1.1", - "_inCache": true, - "_installable": true, - "_location": "/safe-buffer", - "_nodeVersion": "8.1.2", - "_npmOperationalInternal": { - "host": "s3://npm-registry-packages", - "tmp": "tmp/safe-buffer-5.1.1.tgz_1498076368476_0.22441886644810438" - }, - "_npmUser": { - "email": "feross@feross.org", - "name": "feross" - }, - "_npmVersion": "5.0.3", - "_phantomChildren": {}, - "_requested": { - "name": "safe-buffer", - "raw": "safe-buffer@^5.0.1", - "rawSpec": "^5.0.1", - "scope": null, - "spec": ">=5.0.1 <6.0.0", - "type": "range" - }, - "_requiredBy": [ - "/base-x" - ], - "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "_shasum": "893312af69b2123def71f57889001671eeb2c853", - "_shrinkwrap": null, - "_spec": "safe-buffer@^5.0.1", - "_where": "/Users/john/dev/sign_it/app/node_modules/base-x", - "author": { - "email": "feross@feross.org", - "name": "Feross Aboukhadijeh", - "url": "http://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/safe-buffer/issues" - }, - "dependencies": {}, - "description": "Safer Node.js Buffer API", - "devDependencies": { - "standard": "*", - "tape": "^4.0.0", - "zuul": "^3.0.0" - }, - "directories": {}, - "dist": { - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "shasum": "893312af69b2123def71f57889001671eeb2c853", - "tarball": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" - }, - "gitHead": "5261e0c19dd820c31dd21cb4116902b0ed0f9e57", - "homepage": "https://github.com/feross/safe-buffer", - "keywords": [ - "buffer", - "buffer allocate", - "node security", - "safe", - "safe-buffer", - "security", - "uninitialized" - ], - "license": "MIT", - "main": "index.js", - "maintainers": [ - { - "email": "feross@feross.org", - "name": "feross" - }, - { - "email": "mathiasbuus@gmail.com", - "name": "mafintosh" - } - ], - "name": "safe-buffer", - "optionalDependencies": {}, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git://github.com/feross/safe-buffer.git" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "version": "5.1.1" -} diff --git a/app/node_modules/safe-buffer/test.js b/app/node_modules/safe-buffer/test.js deleted file mode 100644 index 4925059..0000000 --- a/app/node_modules/safe-buffer/test.js +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -var test = require('tape') -var SafeBuffer = require('./').Buffer - -test('new SafeBuffer(value) works just like Buffer', function (t) { - t.deepEqual(new SafeBuffer('hey'), new Buffer('hey')) - t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8')) - t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex')) - t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3])) - t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) - - t.equal(typeof SafeBuffer.isBuffer, 'function') - t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true) - t.equal(Buffer.isBuffer(new SafeBuffer('hey')), true) - t.notOk(SafeBuffer.isBuffer({})) - - t.end() -}) - -test('SafeBuffer.from(value) converts to a Buffer', function (t) { - t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey')) - t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8')) - t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex')) - t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3])) - t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) - - t.end() -}) - -test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) { - for (var i = 0; i < 10; i++) { - var expected1 = new Buffer(1000) - expected1.fill(0) - t.deepEqual(SafeBuffer.alloc(1000), expected1) - - var expected2 = new Buffer(1000 * 1000) - expected2.fill(0) - t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2) - } - t.end() -}) - -test('SafeBuffer.allocUnsafe(number)', function (t) { - var buf = SafeBuffer.allocUnsafe(100) // unitialized memory - t.equal(buf.length, 100) - t.equal(SafeBuffer.isBuffer(buf), true) - t.equal(Buffer.isBuffer(buf), true) - t.end() -}) - -test('SafeBuffer.from() throws with number types', function (t) { - t.plan(5) - t.throws(function () { - SafeBuffer.from(0) - }) - t.throws(function () { - SafeBuffer.from(-1) - }) - t.throws(function () { - SafeBuffer.from(NaN) - }) - t.throws(function () { - SafeBuffer.from(Infinity) - }) - t.throws(function () { - SafeBuffer.from(99) - }) -}) - -test('SafeBuffer.allocUnsafe() throws with non-number types', function (t) { - t.plan(4) - t.throws(function () { - SafeBuffer.allocUnsafe('hey') - }) - t.throws(function () { - SafeBuffer.allocUnsafe('hey', 'utf8') - }) - t.throws(function () { - SafeBuffer.allocUnsafe([1, 2, 3]) - }) - t.throws(function () { - SafeBuffer.allocUnsafe({}) - }) -}) - -test('SafeBuffer.alloc() throws with non-number types', function (t) { - t.plan(4) - t.throws(function () { - SafeBuffer.alloc('hey') - }) - t.throws(function () { - SafeBuffer.alloc('hey', 'utf8') - }) - t.throws(function () { - SafeBuffer.alloc([1, 2, 3]) - }) - t.throws(function () { - SafeBuffer.alloc({}) - }) -}) diff --git a/app/package.json b/app/package.json deleted file mode 100644 index 47addbf..0000000 --- a/app/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "signit", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "bs58": "^4.0.1" - } -} diff --git a/dist/android-icon-192x192.png b/dist/android-icon-192x192.png deleted file mode 100644 index 859deb7b831a7729b50b8a2309d8f0fa38c7cd46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5382 zcmeHL*-zZp6`o-+i;V#@cvw7)4Q97J!)9Z)9|i^(jE4aRu)%;a4BLRg4y)~9Qd_Om zEN-Rbt(Dv~m0C4!QmLxaq_TNQ6Js^4o!GIWq>cL0s(EOn_8;i?`CRS*QTkpf)_1#KWN7MGw9k30(up><2|dfYvV1{>}i{IszJo0O_fq9E&)@2cU8x?OTI++L`lt z#XbjBI19>d13mp|)CH#l#)Rt-xC~MbnSoS7&NdeR@psUIQm9jqRJnE z*9i&Ci>e>;!#Lvs)k!4gB=kUBFW8Vs(|OUCV?!`j<3WQG0Vlhc_Ck%1E>BDB$qT{1 z{#wkVqQKF{wqAD-?%HBLRG9v8$GENrA8kx?Xx(MUQpMMFS;B%Zka6Y#d zTx!aj&zMrRfbY!&jRir#m$&b*i3P1?&#^xRD*Rk4%Us^)kK%S{Wi2w<^4B3s9rdQx z!{okZg!^f~*xcnSTqdvzF^3l#EzupU?nRVYIJ5+EPgJs4?XIZwrrI%B08_kYP3+?C zRo1&N3B(5Ct^qg;0c&v#GQ`(>9m{R5EJWEDz%>YyIbRDJhM0{U@WyXIf?lRTz@hdG zg)XQI`|C^7)ua+_`X(4$b*VKv!-0RrkfK*MZi zp1j|L#;PF4RQr>uQq3n1aG)>W{*gFfKZNrXeE7UJFHi1<&GGNwWR?ZdS6QN1?ZX(J zTmYXLo9Xw)(}gsb7;N07p{%pZ+wMgW`0Ujhg9YYh1DLDxzRtM!--2PNBkCXD;f`k# z4u(J)OwA5Nz*mW*>4i*kcwlf|v^u}acwJEQ@b{rAnCBfj#GTl%>O2viG3Ub90X<7x zB~ZZv0JWDyvoQplONwY$&m1^`3+G(_S-*LAgneRor}a8_uu(85g%EJ8RzjZk>pfk++Y zEv|pvx^3rxD>|%=P@rWR4(p|!e|p0X$KW!7Ebh3Xk8X%pkfsXDUkm_$NdO(9gh!cl z*3vjFfitRtd?SxGgI{3o@^F(FQ*h%eK|%HA7*#5S+>lQ=fol*TO_>ICkA%L7*`|Om z>*MFSC_rs!4y~T;Q+th}@_(-1QfbQ% z0o7z+1t8%E;#g>&OMp(ExGP?$D>|y-IeD&^L3mR7 zAV6Y^wSn*CoH&(72>QH{HpvGKAvkCrCT63fNgt0 zRZTMzxUyh_QOtNukA%RXf}$*_w9nt+x`0?N$598Ghwzaq2zLbQ;$v1+so6aF5P;cr za2dd7zXk1z2>;rE%VGxnYSa)jGgR3C2GmoqY7T5K zoTqtb)0+4RDnZYF;Cpy10xnU1`l0A9C{8$BP^Q!1rpRxzgUcX$xYp^_Km25w%|6>W z05%}(84WvkEMUv^|K$Z8)dugMJ2c|afp8bFUneErmBA4J?kEj*Hy>Pcam1DuxxnPs zJ^2NATmspmz>Q)xC!Gs+^}=R3R1VpsTT!EO%K3ft+H%#lgUW`WI#HPOt})Q&5AJD| z(4t50#ujphyg}3swySU!;{A}t{_9U(oZ~>H|Gx3&-H%^8Ucx^k4DQh@9V_5o3y+z6 z=Kt$x*bxe_Vn8Qk8lvWvk)zt{{dWUv6F?u_aV$&d^OvA|9NcgYmHk%O zCn1L*0$Pz`etPRT3|{8Bpkan}sb!5j2?*$T6D$*CAzb&4ypgn$dX`aRb$Nh8aAtrS z>CyLK_wnQae50nlVhJz3_qui;-sH=|M_oFz9hq6Tz=6lv2z?N)H&z|eTmrB;xtJ?( USSFxe6#wta?eg%Bh6|wo0`-p;lmGw# diff --git a/dist/apple-icon-180x180.png b/dist/apple-icon-180x180.png deleted file mode 100644 index 52ad568bb7a23447e5ae29ff212a8e9c9154f56e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7111 zcmeHL`EQih75$721}}I4yn^=?<5_Lbc<>4~*m&PDco{D<jM{b+1dT9l?~vCT~l-OyjX^``LlaOkLA($*q8^=LWB#aZt<(QROG0qdlPgkd1^yad-1V3c_lj&y|8wbYGKA%sAfU z{5EMEzy8Z@VvUPxg_<>kPDE8sdi!D24uRZ|1CW7huYzanXTU)HKG4FnG{Ad&a|Wnt zah!sh=nA+Nr}!`lmPh7Kw`Zj4Z5Zj0f>6h?Mrjp8S#vGmgAk^pYzcJvu{CfglJl~% z_4bNxiShnJomC}8x)T`<8*e$<@YQQCi4Tq){-(is=%!6M0{?Uko>S=NhWg%R=o`;~ zPVVv~K^=w&`VN!?^IR^zwC;QuPPT^jo}N`bF0=#Gch(`m&A<1s*j1v^)#~$TTCA4$eq3sk4i>2jEG%Oa zi1l^t>9GbVAmCJm62#d+nP zOZRv3Qglk2Ct#2}8@cs_j$v>`Q@a%k*wq30)A_6SNprG*(d7D{zs9_`MvEUj@W-ds zvPt4I@KZi4K<^BRUv$qUwLrx{fI3l*hIFpyA87^eKT~@Ys%Mg+=ucI#;*(-e$mO>J zWqAQH!MTnxR7ybv~o=CFfRaCz5g@|@hl|k#JGKqr37#tpibQhn2o#A?JLkz zr668qKx6l37eS4-a{jG$il-HvfQn9W)4?2?)uyGB(G{oyjJfpUXwLDYD#)ARLVp#c zhHuU;84R9*Y<1~P&bj~z&aRRsBO1Fn{$M$1a9i6(E%a zj4Tjt<#G2)gHMY3!jvhlN-kw{M=qpac|cuJIQXy%G~M!z!c08LdIr|M{LK$W!uXN^ zrL17JUEMH(FOmvJW?`JPrKBAxQwVVWX9_a+{R!0>_ zjd_3(793jW%52nb-=m&jI9V?F5LKy6=Xx?oaP3~*gux21LO4I~J`khU@*Jme^YtmP zO1^(JFHHu4`2qsGsN=4Jo!rs&S3nJrP!zAAb?XTbQ_NpAb@p3N!CqR=;C|T!Fp^iF z1FcJ&mj#IE7Y+XKcYLEOAk5uAANU10cK-4sP{8;s=xkg@Rk*($)|J<}$ze~h^b_5e z9%@~JliRI{904y()Tp=HWKA}zz45aC{nlyd z@MddfRW$UPN_6_IM}nzSu`Dj)pNex39&I%*-hKNILmHo=Hi)1~x5QYRDeQMMc{<8r z@fWj)`C_pGA3nUW4#neDLl)CGX)(lemP1>YK`Ps@jO$h~&=*|?*5*o+6L=PY8w4_A zwdF2oRodbd=KTTGWe)8bnm$&0WD=f?b&$Htj2_^CL={>YnIp4h~mO1T1cd?8=4rX?bQx$Eh%shp3h3l|d%RznXf zW39iaw;B5K-5@^ye6edFz}26Dwle}w{BTX!XikZew1Qz)wPE=GPaXr^dSuRmTY(Ds4ZuKX9cE2aaO?* zQLRwfyiD&tb@0HYmpQo#xb%ZZbc>f`c>u(MRWsU|>y$RN3~WI*RGyDN@O-uamcM{Q z=a$6|h8*oUS-UzjavI23ub1!t; zmly9U;KPx&Hv`PyAAq%R`*nwU0?_DV-A%hd_Uup2Low8bj&x=nc>h7stOS7LIH!dr zz{)%_7`&)x@?-vvu}757eP3LxQ}zGBtKv<9>Vnt~=%ZkSrH8gWDjrv#^t$?bIIs=! z$pz5ysK}!-v;~T1AAa|Z@gi}7jW?bb`_f&aXH3wiG7E}TT=~p1Th#oF)zb$Nlq6n# zbZJoRRNXtRTk0A7MpDsPLpf*DhpnqfGKqkS{1QxCdBIx8Hb$~eZOC=(Y@eBLn;>k1 zHNgeqIzE3?eA!?BRVz)M)o*tokF_gcpo&?(f@Fq!jd#2-qnigZ_{i0eP%xJK0T_-0 zRZ36yXOB7S`-@i5+7IbrLFq6=yv=;ZO!G@;hxq?>@6W|xjdGT~kc_F1gP*N!gJ*y* zO8p#2l?E(8TfTW-EMYTLQ%^iqJL3hc^95Vvtb7f626uq-)pe`$b)yB0K{$Ech_u03 zH-Edr9K?kC8x%pfW`OZ%FE*FJXSZ78UtJHi6d3&&xNlg#d7U5846aH?)|59j~Kj4cVOOg zGF<&apogimSU}wN%7Kwo&O65+V8L3exPnhd@HS#ZTt8?6!h{L%KZ*H)#^Zs>v4G1l zamEFuSxjbosmWSuGWS|c4r`giVk|EO6O^5LT+TxovJ z9atJW7gM<)i)Z~iBPtZu~Wp(8ifb~vV7Ue8oO zGgn&TG`+!C-G}EC&(pdwA0sSEZ`nsDnw|B;cuo!23ftfjv z(LJ{4otX2@8-s~6PMEE(a+lRwQ8{5Vm6<2TOs2Al@d`^>Wu?nJUTHSq3j=l=CkySy PDq3@6djpz>SWo{3yzHC6 diff --git a/dist/contracts/Notary.json b/dist/contracts/Notary.json deleted file mode 100644 index 6831bd0..0000000 --- a/dist/contracts/Notary.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "contract_name": "Notary", - "address": "0x302a96c2933f1e6dce68342e8def7e1e5e6ed059", - "code": "6060604052341561000f57600080fd5b6109428061001e6000396000f300606060405263ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663228bc0a981146100685780632b2805db146100bb57806354a02f9e146101605780636b45b4e3146101f9578063c63c5bd11461029d57600080fd5b341561007357600080fd5b6100b960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506102ee95505050505050565b005b34156100c657600080fd5b6100d1600435610450565b604051828152604060208201818152835460026000196101006001841615020190911604918301829052906060830190849080156101505780601f1061012557610100808354040283529160200191610150565b820191906000526020600020905b81548152906001019060200180831161013357829003601f168201915b5050935050505060405180910390f35b341561016b57600080fd5b610182600160a060020a0360043516602435610468565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101be5780820151838201526020016101a6565b50505050905090810190601f1680156101eb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561020457600080fd5b61024a60046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061053195505050505050565b60405160208082528190810183818151815260200191508051906020019060200280838360005b83811015610289578082015183820152602001610271565b505050509050019250505060405180910390f35b34156102a857600080fd5b6100b960046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061061295505050505050565b6102f6610711565b600160a060020a033316600090815260208190526040902080546001810161031e8382610723565b600092835260209092200183805161033a92916020019061074c565b5050600160405180591061034b5750595b90808252806020026020018201604052509050338160008151811061036c57fe5b600160a060020a039092166020928302909101909101526060604051908101604052804281526020018381526020018281525060016000846040518082805190602001908083835b602083106103d35780518252601f1990920191602091820191016103b4565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208101919091526040016000208151815560208201518160010190805161042e92916020019061074c565b506040820151816002019080516104499291602001906107ca565b5050505050565b60016020819052600091825260409091208054910182565b60006020528160005260406000208181548110151561048357fe5b9060005260206000209001600091509150508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105295780601f106104fe57610100808354040283529160200191610529565b820191906000526020600020905b81548152906001019060200180831161050c57829003601f168201915b505050505081565b610539610711565b60016000836040518082805190602001908083835b6020831061056d5780518252601f19909201916020918201910161054e565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390206000191660001916815260200190815260200160002060020180548060200260200160405190810160405280929190818152602001828054801561060657602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116105e8575b50505050509050919050565b600160a060020a033316600090815260208190526040902080546001810161063a8382610723565b600092835260209092200182805161065692916020019061074c565b505060016000826040518082805190602001908083835b6020831061068c5780518252601f19909201916020918201910161066d565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208101919091526040016000206002018054600181016106dc838261083a565b506000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a031617905550565b60206040519081016040526000815290565b8154818355818115116107475760008381526020902061074791810190830161085e565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061078d57805160ff19168380011785556107ba565b828001600101855582156107ba579182015b828111156107ba57825182559160200191906001019061079f565b506107c6929150610884565b5090565b82805482825590600052602060002090810192821561082e579160200282015b8281111561082e578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0391909116178255602092909201916001909101906107ea565b506107c692915061089e565b81548183558181151161074757600083815260209020610747918101908301610884565b61088191905b808211156107c657600061087882826108cf565b50600101610864565b90565b61088191905b808211156107c6576000815560010161088a565b61088191905b808211156107c657805473ffffffffffffffffffffffffffffffffffffffff191681556001016108a4565b50805460018160011615610100020316600290046000825580601f106108f55750610913565b601f0160209004906000526020600020908101906109139190610884565b505600a165627a7a7230582015819f528afbf668399af236c83d97acaa5c4cff9319d54cd25510267fc8a9b40029", - "runtime_bytecode": "606060405263ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663228bc0a981146100685780632b2805db146100bb57806354a02f9e146101605780636b45b4e3146101f9578063c63c5bd11461029d57600080fd5b341561007357600080fd5b6100b960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506102ee95505050505050565b005b34156100c657600080fd5b6100d1600435610450565b604051828152604060208201818152835460026000196101006001841615020190911604918301829052906060830190849080156101505780601f1061012557610100808354040283529160200191610150565b820191906000526020600020905b81548152906001019060200180831161013357829003601f168201915b5050935050505060405180910390f35b341561016b57600080fd5b610182600160a060020a0360043516602435610468565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101be5780820151838201526020016101a6565b50505050905090810190601f1680156101eb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561020457600080fd5b61024a60046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061053195505050505050565b60405160208082528190810183818151815260200191508051906020019060200280838360005b83811015610289578082015183820152602001610271565b505050509050019250505060405180910390f35b34156102a857600080fd5b6100b960046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061061295505050505050565b6102f6610711565b600160a060020a033316600090815260208190526040902080546001810161031e8382610723565b600092835260209092200183805161033a92916020019061074c565b5050600160405180591061034b5750595b90808252806020026020018201604052509050338160008151811061036c57fe5b600160a060020a039092166020928302909101909101526060604051908101604052804281526020018381526020018281525060016000846040518082805190602001908083835b602083106103d35780518252601f1990920191602091820191016103b4565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208101919091526040016000208151815560208201518160010190805161042e92916020019061074c565b506040820151816002019080516104499291602001906107ca565b5050505050565b60016020819052600091825260409091208054910182565b60006020528160005260406000208181548110151561048357fe5b9060005260206000209001600091509150508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105295780601f106104fe57610100808354040283529160200191610529565b820191906000526020600020905b81548152906001019060200180831161050c57829003601f168201915b505050505081565b610539610711565b60016000836040518082805190602001908083835b6020831061056d5780518252601f19909201916020918201910161054e565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390206000191660001916815260200190815260200160002060020180548060200260200160405190810160405280929190818152602001828054801561060657602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116105e8575b50505050509050919050565b600160a060020a033316600090815260208190526040902080546001810161063a8382610723565b600092835260209092200182805161065692916020019061074c565b505060016000826040518082805190602001908083835b6020831061068c5780518252601f19909201916020918201910161066d565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208101919091526040016000206002018054600181016106dc838261083a565b506000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a031617905550565b60206040519081016040526000815290565b8154818355818115116107475760008381526020902061074791810190830161085e565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061078d57805160ff19168380011785556107ba565b828001600101855582156107ba579182015b828111156107ba57825182559160200191906001019061079f565b506107c6929150610884565b5090565b82805482825590600052602060002090810192821561082e579160200282015b8281111561082e578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0391909116178255602092909201916001909101906107ea565b506107c692915061089e565b81548183558181151161074757600083815260209020610747918101908301610884565b61088191905b808211156107c657600061087882826108cf565b50600101610864565b90565b61088191905b808211156107c6576000815560010161088a565b61088191905b808211156107c657805473ffffffffffffffffffffffffffffffffffffffff191681556001016108a4565b50805460018160011615610100020316600290046000825580601f106108f55750610913565b601f0160209004906000526020600020908101906109139190610884565b505600a165627a7a7230582015819f528afbf668399af236c83d97acaa5c4cff9319d54cd25510267fc8a9b40029", - "real_runtime_bytecode": "606060405263ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663228bc0a981146100685780632b2805db146100bb57806354a02f9e146101605780636b45b4e3146101f9578063c63c5bd11461029d57600080fd5b341561007357600080fd5b6100b960046024813581810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506102ee95505050505050565b005b34156100c657600080fd5b6100d1600435610450565b604051828152604060208201818152835460026000196101006001841615020190911604918301829052906060830190849080156101505780601f1061012557610100808354040283529160200191610150565b820191906000526020600020905b81548152906001019060200180831161013357829003601f168201915b5050935050505060405180910390f35b341561016b57600080fd5b610182600160a060020a0360043516602435610468565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101be5780820151838201526020016101a6565b50505050905090810190601f1680156101eb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561020457600080fd5b61024a60046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061053195505050505050565b60405160208082528190810183818151815260200191508051906020019060200280838360005b83811015610289578082015183820152602001610271565b505050509050019250505060405180910390f35b34156102a857600080fd5b6100b960046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061061295505050505050565b6102f6610711565b600160a060020a033316600090815260208190526040902080546001810161031e8382610723565b600092835260209092200183805161033a92916020019061074c565b5050600160405180591061034b5750595b90808252806020026020018201604052509050338160008151811061036c57fe5b600160a060020a039092166020928302909101909101526060604051908101604052804281526020018381526020018281525060016000846040518082805190602001908083835b602083106103d35780518252601f1990920191602091820191016103b4565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208101919091526040016000208151815560208201518160010190805161042e92916020019061074c565b506040820151816002019080516104499291602001906107ca565b5050505050565b60016020819052600091825260409091208054910182565b60006020528160005260406000208181548110151561048357fe5b9060005260206000209001600091509150508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105295780601f106104fe57610100808354040283529160200191610529565b820191906000526020600020905b81548152906001019060200180831161050c57829003601f168201915b505050505081565b610539610711565b60016000836040518082805190602001908083835b6020831061056d5780518252601f19909201916020918201910161054e565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390206000191660001916815260200190815260200160002060020180548060200260200160405190810160405280929190818152602001828054801561060657602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116105e8575b50505050509050919050565b600160a060020a033316600090815260208190526040902080546001810161063a8382610723565b600092835260209092200182805161065692916020019061074c565b505060016000826040518082805190602001908083835b6020831061068c5780518252601f19909201916020918201910161066d565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051908190039020815260208101919091526040016000206002018054600181016106dc838261083a565b506000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a031617905550565b60206040519081016040526000815290565b8154818355818115116107475760008381526020902061074791810190830161085e565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061078d57805160ff19168380011785556107ba565b828001600101855582156107ba579182015b828111156107ba57825182559160200191906001019061079f565b506107c6929150610884565b5090565b82805482825590600052602060002090810192821561082e579160200282015b8281111561082e578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0391909116178255602092909201916001909101906107ea565b506107c692915061089e565b81548183558181151161074757600083815260209020610747918101908301610884565b61088191905b808211156107c657600061087882826108cf565b50600101610864565b90565b61088191905b808211156107c6576000815560010161088a565b61088191905b808211156107c657805473ffffffffffffffffffffffffffffffffffffffff191681556001016108a4565b50805460018160011615610100020316600290046000825580601f106108f55750610913565b601f0160209004906000526020600020908101906109139190610884565b505600a165627a7a7230582015819f528afbf668399af236c83d97acaa5c4cff9319d54cd25510267fc8a9b40029", - "swarm_hash": "15819f528afbf668399af236c83d97acaa5c4cff9319d54cd25510267fc8a9b4", - "gas_estimates": { - "creation": [ - 506, - 474000 - ], - "external": { - "addDocument(bytes)": null, - "documents(bytes32)": null, - "getSignatures(bytes)": null, - "signDocument(bytes)": null, - "users(address,uint256)": null - }, - "internal": {} - }, - "function_hashes": { - "addDocument(bytes)": "228bc0a9", - "documents(bytes32)": "2b2805db", - "getSignatures(bytes)": "6b45b4e3", - "signDocument(bytes)": "c63c5bd1", - "users(address,uint256)": "54a02f9e" - }, - "abi": [ - { - "constant": false, - "inputs": [ - { - "name": "ipfs", - "type": "bytes" - } - ], - "name": "addDocument", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "documents", - "outputs": [ - { - "name": "timestamp", - "type": "uint256" - }, - { - "name": "ipfs_hash", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "address" - }, - { - "name": "", - "type": "uint256" - } - ], - "name": "users", - "outputs": [ - { - "name": "", - "type": "bytes" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "ipfs", - "type": "bytes" - } - ], - "name": "getSignatures", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "ipfs", - "type": "bytes" - } - ], - "name": "signDocument", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ] -} diff --git a/dist/css/app.css b/dist/css/app.css deleted file mode 100644 index 2379a2a..0000000 --- a/dist/css/app.css +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * Bootswatch v4.0.0 - * Homepage: https://bootswatch.com - * Copyright 2012-2018 Thomas Park - * Licensed under MIT - * Based on Bootstrap -*//*! - * Bootstrap v4.0.0 (https://getbootstrap.com) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */@import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic");:root{--blue:#2C3E50;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#E74C3C;--orange:#fd7e14;--yellow:#F39C12;--green:#18BC9C;--teal:#20c997;--cyan:#3498DB;--white:#fff;--gray:#95a5a6;--gray-dark:#343a40;--primary:#2C3E50;--secondary:#95a5a6;--success:#18BC9C;--info:#3498DB;--warning:#F39C12;--danger:#E74C3C;--light:#ecf0f1;--dark:#7b8a8b;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:"Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--font-family-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:"Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.9375rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0 !important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:0.5rem}p{margin-top:0;margin-bottom:1rem}abbr[title],abbr[data-original-title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul,dl{margin-top:0;margin-bottom:1rem}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#18BC9C;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0f7864;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):hover,a:not([href]):not([tabindex]):focus{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}pre,code,kbd,samp{font-family:monospace, monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:0.75rem;padding-bottom:0.75rem;color:#95a5a6;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}input,button,select,optgroup,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{padding:0;border-style:none}input[type="radio"],input[type="checkbox"]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="date"],input[type="time"],input[type="datetime-local"],input[type="month"]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{outline-offset:-2px;-webkit-appearance:none}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none !important}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{margin-bottom:0.5rem;font-family:inherit;font-weight:500;line-height:1.2;color:inherit}h1,.h1{font-size:3rem}h2,.h2{font-size:2.5rem}h3,.h3{font-size:2rem}h4,.h4{font-size:1.40625rem}h5,.h5{font-size:1.171875rem}h6,.h6{font-size:0.9375rem}.lead{font-size:1.171875rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,0.1)}small,.small{font-size:80%;font-weight:400}mark,.mark{padding:0.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:0.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.171875rem}.blockquote-footer{display:block;font-size:80%;color:#95a5a6}.blockquote-footer::before{content:"\2014 \00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:0.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:0.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:0.5rem;line-height:1}.figure-caption{font-size:90%;color:#95a5a6}code,kbd,pre,samp{font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}code{font-size:87.5%;color:#e83e8c;word-break:break-word}a>code{color:inherit}kbd{padding:0.2rem 0.4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:0.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width: 576px){.container{max-width:540px}}@media (min-width: 768px){.container{max-width:720px}}@media (min-width: 992px){.container{max-width:960px}}@media (min-width: 1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*="col-"]{padding-right:0;padding-left:0}.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col,.col-auto,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm,.col-sm-auto,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md,.col-md-auto,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg,.col-lg-auto,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl,.col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-1{-webkit-box-flex:0;-ms-flex:0 0 8.3333333333%;flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2{-webkit-box-flex:0;-ms-flex:0 0 16.6666666667%;flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-webkit-box-flex:0;-ms-flex:0 0 33.3333333333%;flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-5{-webkit-box-flex:0;-ms-flex:0 0 41.6666666667%;flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-webkit-box-flex:0;-ms-flex:0 0 58.3333333333%;flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-8{-webkit-box-flex:0;-ms-flex:0 0 66.6666666667%;flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-webkit-box-flex:0;-ms-flex:0 0 83.3333333333%;flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-11{-webkit-box-flex:0;-ms-flex:0 0 91.6666666667%;flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}@media (min-width: 576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-sm-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-sm-1{-webkit-box-flex:0;-ms-flex:0 0 8.3333333333%;flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-sm-2{-webkit-box-flex:0;-ms-flex:0 0 16.6666666667%;flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-webkit-box-flex:0;-ms-flex:0 0 33.3333333333%;flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-sm-5{-webkit-box-flex:0;-ms-flex:0 0 41.6666666667%;flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-sm-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-webkit-box-flex:0;-ms-flex:0 0 58.3333333333%;flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-sm-8{-webkit-box-flex:0;-ms-flex:0 0 66.6666666667%;flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-sm-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-webkit-box-flex:0;-ms-flex:0 0 83.3333333333%;flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-sm-11{-webkit-box-flex:0;-ms-flex:0 0 91.6666666667%;flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-sm-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-sm-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-sm-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-sm-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-sm-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-sm-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-sm-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-sm-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-sm-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-sm-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-sm-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-sm-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-sm-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-sm-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-sm-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}}@media (min-width: 768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-md-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-md-1{-webkit-box-flex:0;-ms-flex:0 0 8.3333333333%;flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-md-2{-webkit-box-flex:0;-ms-flex:0 0 16.6666666667%;flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-webkit-box-flex:0;-ms-flex:0 0 33.3333333333%;flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-md-5{-webkit-box-flex:0;-ms-flex:0 0 41.6666666667%;flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-md-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-webkit-box-flex:0;-ms-flex:0 0 58.3333333333%;flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-md-8{-webkit-box-flex:0;-ms-flex:0 0 66.6666666667%;flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-md-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-webkit-box-flex:0;-ms-flex:0 0 83.3333333333%;flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-md-11{-webkit-box-flex:0;-ms-flex:0 0 91.6666666667%;flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-md-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-md-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-md-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-md-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-md-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-md-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-md-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-md-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-md-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-md-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-md-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-md-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-md-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-md-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-md-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}}@media (min-width: 992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-lg-1{-webkit-box-flex:0;-ms-flex:0 0 8.3333333333%;flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-lg-2{-webkit-box-flex:0;-ms-flex:0 0 16.6666666667%;flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-lg-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-webkit-box-flex:0;-ms-flex:0 0 33.3333333333%;flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-lg-5{-webkit-box-flex:0;-ms-flex:0 0 41.6666666667%;flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-lg-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-webkit-box-flex:0;-ms-flex:0 0 58.3333333333%;flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-lg-8{-webkit-box-flex:0;-ms-flex:0 0 66.6666666667%;flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-lg-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-webkit-box-flex:0;-ms-flex:0 0 83.3333333333%;flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-lg-11{-webkit-box-flex:0;-ms-flex:0 0 91.6666666667%;flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-lg-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-lg-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-lg-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-lg-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-lg-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-lg-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-lg-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-lg-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-lg-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-lg-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-lg-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-lg-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-lg-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-lg-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-lg-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}}@media (min-width: 1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xl-auto{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-xl-1{-webkit-box-flex:0;-ms-flex:0 0 8.3333333333%;flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-xl-2{-webkit-box-flex:0;-ms-flex:0 0 16.6666666667%;flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-3{-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-webkit-box-flex:0;-ms-flex:0 0 33.3333333333%;flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-xl-5{-webkit-box-flex:0;-ms-flex:0 0 41.6666666667%;flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-xl-6{-webkit-box-flex:0;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-webkit-box-flex:0;-ms-flex:0 0 58.3333333333%;flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-xl-8{-webkit-box-flex:0;-ms-flex:0 0 66.6666666667%;flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-xl-9{-webkit-box-flex:0;-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-webkit-box-flex:0;-ms-flex:0 0 83.3333333333%;flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-xl-11{-webkit-box-flex:0;-ms-flex:0 0 91.6666666667%;flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-xl-12{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.order-xl-last{-webkit-box-ordinal-group:14;-ms-flex-order:13;order:13}.order-xl-0{-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0}.order-xl-1{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.order-xl-2{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.order-xl-3{-webkit-box-ordinal-group:4;-ms-flex-order:3;order:3}.order-xl-4{-webkit-box-ordinal-group:5;-ms-flex-order:4;order:4}.order-xl-5{-webkit-box-ordinal-group:6;-ms-flex-order:5;order:5}.order-xl-6{-webkit-box-ordinal-group:7;-ms-flex-order:6;order:6}.order-xl-7{-webkit-box-ordinal-group:8;-ms-flex-order:7;order:7}.order-xl-8{-webkit-box-ordinal-group:9;-ms-flex-order:8;order:8}.order-xl-9{-webkit-box-ordinal-group:10;-ms-flex-order:9;order:9}.order-xl-10{-webkit-box-ordinal-group:11;-ms-flex-order:10;order:10}.order-xl-11{-webkit-box-ordinal-group:12;-ms-flex-order:11;order:11}.order-xl-12{-webkit-box-ordinal-group:13;-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}}.table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent}.table th,.table td{padding:0.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table .table{background-color:#fff}.table-sm th,.table-sm td{padding:0.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered th,.table-bordered td{border:1px solid #dee2e6}.table-bordered thead th,.table-bordered thead td{border-bottom-width:2px}.table-striped tbody tr:nth-of-type(odd){background-color:#ecf0f1}.table-hover tbody tr:hover{background-color:rgba(0,0,0,0.075)}.table-primary,.table-primary>th,.table-primary>td{background-color:#c4c9ce}.table-hover .table-primary:hover{background-color:#b6bcc2}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#b6bcc2}.table-secondary,.table-secondary>th,.table-secondary>td{background-color:#e1e6e6}.table-hover .table-secondary:hover{background-color:#d3dada}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#d3dada}.table-success,.table-success>th,.table-success>td{background-color:#beece3}.table-hover .table-success:hover{background-color:#aae6db}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#aae6db}.table-info,.table-info>th,.table-info>td{background-color:#c6e2f5}.table-hover .table-info:hover{background-color:#b0d7f1}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#b0d7f1}.table-warning,.table-warning>th,.table-warning>td{background-color:#fce3bd}.table-hover .table-warning:hover{background-color:#fbd9a5}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#fbd9a5}.table-danger,.table-danger>th,.table-danger>td{background-color:#f8cdc8}.table-hover .table-danger:hover{background-color:#f5b8b1}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f5b8b1}.table-light,.table-light>th,.table-light>td{background-color:#fafbfb}.table-hover .table-light:hover{background-color:#ecf0f0}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ecf0f0}.table-dark,.table-dark>th,.table-dark>td{background-color:#dadedf}.table-hover .table-dark:hover{background-color:#ccd2d3}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#ccd2d3}.table-active,.table-active>th,.table-active>td{background-color:rgba(0,0,0,0.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,0.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,0.075)}.table .thead-dark th{color:#fff;background-color:#212529;border-color:#32383e}.table .thead-light th{color:#7b8a8b;background-color:#ecf0f1;border-color:#dee2e6}.table-dark{color:#fff;background-color:#212529}.table-dark th,.table-dark td,.table-dark thead th{border-color:#32383e}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,0.05)}.table-dark.table-hover tbody tr:hover{background-color:rgba(255,255,255,0.075)}@media (max-width: 575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-sm>.table-bordered{border:0}}@media (max-width: 767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-md>.table-bordered{border:0}}@media (max-width: 991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-lg>.table-bordered{border:0}}@media (max-width: 1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;padding:0.375rem 0.75rem;font-size:0.9375rem;line-height:1.5;color:#7b8a8b;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:0.25rem;-webkit-transition:border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#7b8a8b;background-color:#fff;border-color:#597ea2;outline:0;-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25)}.form-control::-webkit-input-placeholder{color:#95a5a6;opacity:1}.form-control:-ms-input-placeholder{color:#95a5a6;opacity:1}.form-control::-ms-input-placeholder{color:#95a5a6;opacity:1}.form-control::placeholder{color:#95a5a6;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#ecf0f1;opacity:1}select.form-control:not([size]):not([multiple]){height:calc(2.15625rem + 2px)}select.form-control:focus::-ms-value{color:#7b8a8b;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(0.375rem + 1px);padding-bottom:calc(0.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(0.5rem + 1px);padding-bottom:calc(0.5rem + 1px);font-size:1.171875rem;line-height:1.5}.col-form-label-sm{padding-top:calc(0.25rem + 1px);padding-bottom:calc(0.25rem + 1px);font-size:0.8203125rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding-top:0.375rem;padding-bottom:0.375rem;margin-bottom:0;line-height:1.5;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-sm,.input-group-sm>.form-control-plaintext.form-control,.input-group-sm>.input-group-prepend>.form-control-plaintext.input-group-text,.input-group-sm>.input-group-append>.form-control-plaintext.input-group-text,.input-group-sm>.input-group-prepend>.form-control-plaintext.btn,.input-group-sm>.input-group-append>.form-control-plaintext.btn,.form-control-plaintext.form-control-lg,.input-group-lg>.form-control-plaintext.form-control,.input-group-lg>.input-group-prepend>.form-control-plaintext.input-group-text,.input-group-lg>.input-group-append>.form-control-plaintext.input-group-text,.input-group-lg>.input-group-prepend>.form-control-plaintext.btn,.input-group-lg>.input-group-append>.form-control-plaintext.btn{padding-right:0;padding-left:0}.form-control-sm,.input-group-sm>.form-control,.input-group-sm>.input-group-prepend>.input-group-text,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-append>.btn{padding:0.25rem 0.5rem;font-size:0.8203125rem;line-height:1.5;border-radius:0.2rem}select.form-control-sm:not([size]):not([multiple]),.input-group-sm>select.form-control:not([size]):not([multiple]),.input-group-sm>.input-group-prepend>select.input-group-text:not([size]):not([multiple]),.input-group-sm>.input-group-append>select.input-group-text:not([size]):not([multiple]),.input-group-sm>.input-group-prepend>select.btn:not([size]):not([multiple]),.input-group-sm>.input-group-append>select.btn:not([size]):not([multiple]){height:calc(1.73046875rem + 2px)}.form-control-lg,.input-group-lg>.form-control,.input-group-lg>.input-group-prepend>.input-group-text,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-append>.btn{padding:0.5rem 1rem;font-size:1.171875rem;line-height:1.5;border-radius:0.3rem}select.form-control-lg:not([size]):not([multiple]),.input-group-lg>select.form-control:not([size]):not([multiple]),.input-group-lg>.input-group-prepend>select.input-group-text:not([size]):not([multiple]),.input-group-lg>.input-group-append>select.input-group-text:not([size]):not([multiple]),.input-group-lg>.input-group-prepend>select.btn:not([size]):not([multiple]),.input-group-lg>.input-group-append>select.btn:not([size]):not([multiple]){height:calc(2.7578125rem + 2px)}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:0.25rem}.form-row{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*="col-"]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:0.3rem;margin-left:-1.25rem}.form-check-input:disabled ~ .form-check-label{color:#95a5a6}.form-check-label{margin-bottom:0}.form-check-inline{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:0.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:0.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:80%;color:#18BC9C}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.5rem;margin-top:.1rem;font-size:.875rem;line-height:1;color:#fff;background-color:rgba(24,188,156,0.8);border-radius:.2rem}.was-validated .form-control:valid,.form-control.is-valid,.was-validated .custom-select:valid,.custom-select.is-valid{border-color:#18BC9C}.was-validated .form-control:valid:focus,.form-control.is-valid:focus,.was-validated .custom-select:valid:focus,.custom-select.is-valid:focus{border-color:#18BC9C;-webkit-box-shadow:0 0 0 0.2rem rgba(24,188,156,0.25);box-shadow:0 0 0 0.2rem rgba(24,188,156,0.25)}.was-validated .form-control:valid ~ .valid-feedback,.was-validated .form-control:valid ~ .valid-tooltip,.form-control.is-valid ~ .valid-feedback,.form-control.is-valid ~ .valid-tooltip,.was-validated .custom-select:valid ~ .valid-feedback,.was-validated .custom-select:valid ~ .valid-tooltip,.custom-select.is-valid ~ .valid-feedback,.custom-select.is-valid ~ .valid-tooltip{display:block}.was-validated .form-check-input:valid ~ .form-check-label,.form-check-input.is-valid ~ .form-check-label{color:#18BC9C}.was-validated .form-check-input:valid ~ .valid-feedback,.was-validated .form-check-input:valid ~ .valid-tooltip,.form-check-input.is-valid ~ .valid-feedback,.form-check-input.is-valid ~ .valid-tooltip{display:block}.was-validated .custom-control-input:valid ~ .custom-control-label,.custom-control-input.is-valid ~ .custom-control-label{color:#18BC9C}.was-validated .custom-control-input:valid ~ .custom-control-label::before,.custom-control-input.is-valid ~ .custom-control-label::before{background-color:#68ecd2}.was-validated .custom-control-input:valid ~ .valid-feedback,.was-validated .custom-control-input:valid ~ .valid-tooltip,.custom-control-input.is-valid ~ .valid-feedback,.custom-control-input.is-valid ~ .valid-tooltip{display:block}.was-validated .custom-control-input:valid:checked ~ .custom-control-label::before,.custom-control-input.is-valid:checked ~ .custom-control-label::before{background-color:#24e3be}.was-validated .custom-control-input:valid:focus ~ .custom-control-label::before,.custom-control-input.is-valid:focus ~ .custom-control-label::before{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 0.2rem rgba(24,188,156,0.25);box-shadow:0 0 0 1px #fff,0 0 0 0.2rem rgba(24,188,156,0.25)}.was-validated .custom-file-input:valid ~ .custom-file-label,.custom-file-input.is-valid ~ .custom-file-label{border-color:#18BC9C}.was-validated .custom-file-input:valid ~ .custom-file-label::before,.custom-file-input.is-valid ~ .custom-file-label::before{border-color:inherit}.was-validated .custom-file-input:valid ~ .valid-feedback,.was-validated .custom-file-input:valid ~ .valid-tooltip,.custom-file-input.is-valid ~ .valid-feedback,.custom-file-input.is-valid ~ .valid-tooltip{display:block}.was-validated .custom-file-input:valid:focus ~ .custom-file-label,.custom-file-input.is-valid:focus ~ .custom-file-label{-webkit-box-shadow:0 0 0 0.2rem rgba(24,188,156,0.25);box-shadow:0 0 0 0.2rem rgba(24,188,156,0.25)}.invalid-feedback{display:none;width:100%;margin-top:0.25rem;font-size:80%;color:#E74C3C}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.5rem;margin-top:.1rem;font-size:.875rem;line-height:1;color:#fff;background-color:rgba(231,76,60,0.8);border-radius:.2rem}.was-validated .form-control:invalid,.form-control.is-invalid,.was-validated .custom-select:invalid,.custom-select.is-invalid{border-color:#E74C3C}.was-validated .form-control:invalid:focus,.form-control.is-invalid:focus,.was-validated .custom-select:invalid:focus,.custom-select.is-invalid:focus{border-color:#E74C3C;-webkit-box-shadow:0 0 0 0.2rem rgba(231,76,60,0.25);box-shadow:0 0 0 0.2rem rgba(231,76,60,0.25)}.was-validated .form-control:invalid ~ .invalid-feedback,.was-validated .form-control:invalid ~ .invalid-tooltip,.form-control.is-invalid ~ .invalid-feedback,.form-control.is-invalid ~ .invalid-tooltip,.was-validated .custom-select:invalid ~ .invalid-feedback,.was-validated .custom-select:invalid ~ .invalid-tooltip,.custom-select.is-invalid ~ .invalid-feedback,.custom-select.is-invalid ~ .invalid-tooltip{display:block}.was-validated .form-check-input:invalid ~ .form-check-label,.form-check-input.is-invalid ~ .form-check-label{color:#E74C3C}.was-validated .form-check-input:invalid ~ .invalid-feedback,.was-validated .form-check-input:invalid ~ .invalid-tooltip,.form-check-input.is-invalid ~ .invalid-feedback,.form-check-input.is-invalid ~ .invalid-tooltip{display:block}.was-validated .custom-control-input:invalid ~ .custom-control-label,.custom-control-input.is-invalid ~ .custom-control-label{color:#E74C3C}.was-validated .custom-control-input:invalid ~ .custom-control-label::before,.custom-control-input.is-invalid ~ .custom-control-label::before{background-color:#f5b4ae}.was-validated .custom-control-input:invalid ~ .invalid-feedback,.was-validated .custom-control-input:invalid ~ .invalid-tooltip,.custom-control-input.is-invalid ~ .invalid-feedback,.custom-control-input.is-invalid ~ .invalid-tooltip{display:block}.was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before,.custom-control-input.is-invalid:checked ~ .custom-control-label::before{background-color:#ed7669}.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before,.custom-control-input.is-invalid:focus ~ .custom-control-label::before{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 0.2rem rgba(231,76,60,0.25);box-shadow:0 0 0 1px #fff,0 0 0 0.2rem rgba(231,76,60,0.25)}.was-validated .custom-file-input:invalid ~ .custom-file-label,.custom-file-input.is-invalid ~ .custom-file-label{border-color:#E74C3C}.was-validated .custom-file-input:invalid ~ .custom-file-label::before,.custom-file-input.is-invalid ~ .custom-file-label::before{border-color:inherit}.was-validated .custom-file-input:invalid ~ .invalid-feedback,.was-validated .custom-file-input:invalid ~ .invalid-tooltip,.custom-file-input.is-invalid ~ .invalid-feedback,.custom-file-input.is-invalid ~ .invalid-tooltip{display:block}.was-validated .custom-file-input:invalid:focus ~ .custom-file-label,.custom-file-input.is-invalid:focus ~ .custom-file-label{-webkit-box-shadow:0 0 0 0.2rem rgba(231,76,60,0.25);box-shadow:0 0 0 0.2rem rgba(231,76,60,0.25)}.form-inline{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width: 576px){.form-inline label{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .input-group{width:auto}.form-inline .form-check{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;margin-top:0;margin-right:0.25rem;margin-left:0}.form-inline .custom-control{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:0.9375rem;line-height:1.5;border-radius:0.25rem;-webkit-transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out}.btn:hover,.btn:focus{text-decoration:none}.btn:focus,.btn.focus{outline:0;-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25)}.btn.disabled,.btn:disabled{opacity:0.65}.btn:not(:disabled):not(.disabled){cursor:pointer}.btn:not(:disabled):not(.disabled):active,.btn:not(:disabled):not(.disabled).active{background-image:none}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#2C3E50;border-color:#2C3E50}.btn-primary:hover{color:#fff;background-color:#1e2b37;border-color:#1a252f}.btn-primary:focus,.btn-primary.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#2C3E50;border-color:#2C3E50}.btn-primary:not(:disabled):not(.disabled):active,.btn-primary:not(:disabled):not(.disabled).active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#1a252f;border-color:#151e27}.btn-primary:not(:disabled):not(.disabled):active:focus,.btn-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-primary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5)}.btn-secondary{color:#212529;background-color:#95a5a6;border-color:#95a5a6}.btn-secondary:hover{color:#fff;background-color:#809395;border-color:#798d8f}.btn-secondary:focus,.btn-secondary.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5);box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#212529;background-color:#95a5a6;border-color:#95a5a6}.btn-secondary:not(:disabled):not(.disabled):active,.btn-secondary:not(:disabled):not(.disabled).active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#798d8f;border-color:#738789}.btn-secondary:not(:disabled):not(.disabled):active:focus,.btn-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-secondary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5);box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5)}.btn-success{color:#fff;background-color:#18BC9C;border-color:#18BC9C}.btn-success:hover{color:#fff;background-color:#149a80;border-color:#128f76}.btn-success:focus,.btn-success.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5);box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#18BC9C;border-color:#18BC9C}.btn-success:not(:disabled):not(.disabled):active,.btn-success:not(:disabled):not(.disabled).active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#128f76;border-color:#11836d}.btn-success:not(:disabled):not(.disabled):active:focus,.btn-success:not(:disabled):not(.disabled).active:focus,.show>.btn-success.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5);box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5)}.btn-info{color:#fff;background-color:#3498DB;border-color:#3498DB}.btn-info:hover{color:#fff;background-color:#2384c6;border-color:#217dbb}.btn-info:focus,.btn-info.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5);box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#3498DB;border-color:#3498DB}.btn-info:not(:disabled):not(.disabled):active,.btn-info:not(:disabled):not(.disabled).active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#217dbb;border-color:#1f76b0}.btn-info:not(:disabled):not(.disabled):active:focus,.btn-info:not(:disabled):not(.disabled).active:focus,.show>.btn-info.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5);box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5)}.btn-warning{color:#212529;background-color:#F39C12;border-color:#F39C12}.btn-warning:hover{color:#fff;background-color:#d4860b;border-color:#c87f0a}.btn-warning:focus,.btn-warning.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5);box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#F39C12;border-color:#F39C12}.btn-warning:not(:disabled):not(.disabled):active,.btn-warning:not(:disabled):not(.disabled).active,.show>.btn-warning.dropdown-toggle{color:#fff;background-color:#c87f0a;border-color:#bc770a}.btn-warning:not(:disabled):not(.disabled):active:focus,.btn-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-warning.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5);box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5)}.btn-danger{color:#fff;background-color:#E74C3C;border-color:#E74C3C}.btn-danger:hover{color:#fff;background-color:#e12e1c;border-color:#d62c1a}.btn-danger:focus,.btn-danger.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5);box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#E74C3C;border-color:#E74C3C}.btn-danger:not(:disabled):not(.disabled):active,.btn-danger:not(:disabled):not(.disabled).active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#d62c1a;border-color:#ca2a19}.btn-danger:not(:disabled):not(.disabled):active:focus,.btn-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-danger.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5);box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5)}.btn-light{color:#212529;background-color:#ecf0f1;border-color:#ecf0f1}.btn-light:hover{color:#212529;background-color:#d6dfe1;border-color:#cfd9db}.btn-light:focus,.btn-light.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5);box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#ecf0f1;border-color:#ecf0f1}.btn-light:not(:disabled):not(.disabled):active,.btn-light:not(:disabled):not(.disabled).active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#cfd9db;border-color:#c7d3d6}.btn-light:not(:disabled):not(.disabled):active:focus,.btn-light:not(:disabled):not(.disabled).active:focus,.show>.btn-light.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5);box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5)}.btn-dark{color:#fff;background-color:#7b8a8b;border-color:#7b8a8b}.btn-dark:hover{color:#fff;background-color:#697677;border-color:#636f70}.btn-dark:focus,.btn-dark.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5);box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#7b8a8b;border-color:#7b8a8b}.btn-dark:not(:disabled):not(.disabled):active,.btn-dark:not(:disabled):not(.disabled).active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#636f70;border-color:#5d696a}.btn-dark:not(:disabled):not(.disabled):active:focus,.btn-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-dark.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5);box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5)}.btn-outline-primary{color:#2C3E50;background-color:transparent;background-image:none;border-color:#2C3E50}.btn-outline-primary:hover{color:#fff;background-color:#2C3E50;border-color:#2C3E50}.btn-outline-primary:focus,.btn-outline-primary.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#2C3E50;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled):active,.btn-outline-primary:not(:disabled):not(.disabled).active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#2C3E50;border-color:#2C3E50}.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.5)}.btn-outline-secondary{color:#95a5a6;background-color:transparent;background-image:none;border-color:#95a5a6}.btn-outline-secondary:hover{color:#212529;background-color:#95a5a6;border-color:#95a5a6}.btn-outline-secondary:focus,.btn-outline-secondary.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5);box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#95a5a6;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled):active,.btn-outline-secondary:not(:disabled):not(.disabled).active,.show>.btn-outline-secondary.dropdown-toggle{color:#212529;background-color:#95a5a6;border-color:#95a5a6}.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5);box-shadow:0 0 0 0.2rem rgba(149,165,166,0.5)}.btn-outline-success{color:#18BC9C;background-color:transparent;background-image:none;border-color:#18BC9C}.btn-outline-success:hover{color:#fff;background-color:#18BC9C;border-color:#18BC9C}.btn-outline-success:focus,.btn-outline-success.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5);box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#18BC9C;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled):active,.btn-outline-success:not(:disabled):not(.disabled).active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#18BC9C;border-color:#18BC9C}.btn-outline-success:not(:disabled):not(.disabled):active:focus,.btn-outline-success:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-success.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5);box-shadow:0 0 0 0.2rem rgba(24,188,156,0.5)}.btn-outline-info{color:#3498DB;background-color:transparent;background-image:none;border-color:#3498DB}.btn-outline-info:hover{color:#fff;background-color:#3498DB;border-color:#3498DB}.btn-outline-info:focus,.btn-outline-info.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5);box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#3498DB;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled):active,.btn-outline-info:not(:disabled):not(.disabled).active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#3498DB;border-color:#3498DB}.btn-outline-info:not(:disabled):not(.disabled):active:focus,.btn-outline-info:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-info.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5);box-shadow:0 0 0 0.2rem rgba(52,152,219,0.5)}.btn-outline-warning{color:#F39C12;background-color:transparent;background-image:none;border-color:#F39C12}.btn-outline-warning:hover{color:#212529;background-color:#F39C12;border-color:#F39C12}.btn-outline-warning:focus,.btn-outline-warning.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5);box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#F39C12;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled):active,.btn-outline-warning:not(:disabled):not(.disabled).active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#F39C12;border-color:#F39C12}.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5);box-shadow:0 0 0 0.2rem rgba(243,156,18,0.5)}.btn-outline-danger{color:#E74C3C;background-color:transparent;background-image:none;border-color:#E74C3C}.btn-outline-danger:hover{color:#fff;background-color:#E74C3C;border-color:#E74C3C}.btn-outline-danger:focus,.btn-outline-danger.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5);box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#E74C3C;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled):active,.btn-outline-danger:not(:disabled):not(.disabled).active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#E74C3C;border-color:#E74C3C}.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5);box-shadow:0 0 0 0.2rem rgba(231,76,60,0.5)}.btn-outline-light{color:#ecf0f1;background-color:transparent;background-image:none;border-color:#ecf0f1}.btn-outline-light:hover{color:#212529;background-color:#ecf0f1;border-color:#ecf0f1}.btn-outline-light:focus,.btn-outline-light.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5);box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#ecf0f1;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled):active,.btn-outline-light:not(:disabled):not(.disabled).active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#ecf0f1;border-color:#ecf0f1}.btn-outline-light:not(:disabled):not(.disabled):active:focus,.btn-outline-light:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-light.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5);box-shadow:0 0 0 0.2rem rgba(236,240,241,0.5)}.btn-outline-dark{color:#7b8a8b;background-color:transparent;background-image:none;border-color:#7b8a8b}.btn-outline-dark:hover{color:#fff;background-color:#7b8a8b;border-color:#7b8a8b}.btn-outline-dark:focus,.btn-outline-dark.focus{-webkit-box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5);box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#7b8a8b;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled):active,.btn-outline-dark:not(:disabled):not(.disabled).active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#7b8a8b;border-color:#7b8a8b}.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{-webkit-box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5);box-shadow:0 0 0 0.2rem rgba(123,138,139,0.5)}.btn-link{font-weight:400;color:#18BC9C;background-color:transparent}.btn-link:hover{color:#0f7864;text-decoration:underline;background-color:transparent;border-color:transparent}.btn-link:focus,.btn-link.focus{text-decoration:underline;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link:disabled,.btn-link.disabled{color:#95a5a6}.btn-lg,.btn-group-lg>.btn{padding:0.5rem 1rem;font-size:1.171875rem;line-height:1.5;border-radius:0.3rem}.btn-sm,.btn-group-sm>.btn{padding:0.25rem 0.5rem;font-size:0.8203125rem;line-height:1.5;border-radius:0.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:0.5rem}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.show{opacity:1}.collapse{display:none}.collapse.show{display:block}tr.collapse.show{display:table-row}tbody.collapse.show{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;transition:height 0.35s ease}.dropup,.dropdown{position:relative}.dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:0.255em;vertical-align:0.255em;content:"";border-top:0.3em solid;border-right:0.3em solid transparent;border-bottom:0;border-left:0.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:0.5rem 0;margin:0.125rem 0 0;font-size:0.9375rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.15);border-radius:0.25rem}.dropup .dropdown-menu{margin-top:0;margin-bottom:0.125rem}.dropup .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:0.255em;vertical-align:0.255em;content:"";border-top:0;border-right:0.3em solid transparent;border-bottom:0.3em solid;border-left:0.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{margin-top:0;margin-left:0.125rem}.dropright .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:0.255em;vertical-align:0.255em;content:"";border-top:0.3em solid transparent;border-bottom:0.3em solid transparent;border-left:0.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{margin-top:0;margin-right:0.125rem}.dropleft .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:0.255em;vertical-align:0.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;width:0;height:0;margin-right:0.255em;vertical-align:0.255em;content:"";border-top:0.3em solid transparent;border-right:0.3em solid;border-bottom:0.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-divider{height:0;margin:0.5rem 0;overflow:hidden;border-top:1px solid #ecf0f1}.dropdown-item{display:block;width:100%;padding:0.25rem 1.5rem;clear:both;font-weight:400;color:#7b8a8b;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:#fff;text-decoration:none;background-color:#2C3E50}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#2C3E50}.dropdown-item.disabled,.dropdown-item:disabled{color:#95a5a6;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:0.5rem 1.5rem;margin-bottom:0;font-size:0.8203125rem;color:#95a5a6;white-space:nowrap}.btn-group,.btn-group-vertical{position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover{z-index:1}.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn.active{z-index:1}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group,.btn-group-vertical .btn+.btn,.btn-group-vertical .btn+.btn-group,.btn-group-vertical .btn-group+.btn,.btn-group-vertical .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:not(:last-child):not(.dropdown-toggle),.btn-group>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:not(:first-child),.btn-group>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:0.5625rem;padding-left:0.5625rem}.dropdown-toggle-split::after{margin-left:0}.btn-sm+.dropdown-toggle-split,.btn-group-sm>.btn+.dropdown-toggle-split{padding-right:0.375rem;padding-left:0.375rem}.btn-lg+.dropdown-toggle-split,.btn-group-lg>.btn+.dropdown-toggle-split{padding-right:0.75rem;padding-left:0.75rem}.btn-group-vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.btn-group-vertical .btn,.btn-group-vertical .btn-group{width:100%}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle),.btn-group-vertical>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:not(:first-child),.btn-group-vertical>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type="radio"],.btn-group-toggle>.btn input[type="checkbox"],.btn-group-toggle>.btn-group>.btn input[type="radio"],.btn-group-toggle>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.custom-select,.input-group>.custom-file{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.input-group>.form-control:focus,.input-group>.custom-select:focus,.input-group>.custom-file:focus{z-index:3}.input-group>.form-control+.form-control,.input-group>.form-control+.custom-select,.input-group>.form-control+.custom-file,.input-group>.custom-select+.form-control,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.custom-file,.input-group>.custom-file+.form-control,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.custom-file{margin-left:-1px}.input-group>.form-control:not(:last-child),.input-group>.custom-select:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.form-control:not(:first-child),.input-group>.custom-select:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::before{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label,.input-group>.custom-file:not(:first-child) .custom-file-label::before{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-prepend,.input-group-append{display:-webkit-box;display:-ms-flexbox;display:flex}.input-group-prepend .btn,.input-group-append .btn{position:relative;z-index:2}.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.input-group-text,.input-group-append .input-group-text+.btn{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0.375rem 0.75rem;margin-bottom:0;font-size:0.9375rem;font-weight:400;line-height:1.5;color:#7b8a8b;text-align:center;white-space:nowrap;background-color:#ecf0f1;border:1px solid #ced4da;border-radius:0.25rem}.input-group-text input[type="radio"],.input-group-text input[type="checkbox"]{margin-top:0}.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text,.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked ~ .custom-control-label::before{color:#fff;background-color:#2C3E50}.custom-control-input:focus ~ .custom-control-label::before{-webkit-box-shadow:0 0 0 1px #fff,0 0 0 0.2rem rgba(44,62,80,0.25);box-shadow:0 0 0 1px #fff,0 0 0 0.2rem rgba(44,62,80,0.25)}.custom-control-input:active ~ .custom-control-label::before{color:#fff;background-color:#7997b5}.custom-control-input:disabled ~ .custom-control-label{color:#95a5a6}.custom-control-input:disabled ~ .custom-control-label::before{background-color:#ecf0f1}.custom-control-label{margin-bottom:0}.custom-control-label::before{position:absolute;top:0.25rem;left:0;display:block;width:1rem;height:1rem;pointer-events:none;content:"";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#dee2e6}.custom-control-label::after{position:absolute;top:0.25rem;left:0;display:block;width:1rem;height:1rem;content:"";background-repeat:no-repeat;background-position:center center;background-size:50% 50%}.custom-checkbox .custom-control-label::before{border-radius:0.25rem}.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before{background-color:#2C3E50}.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before{background-color:#2C3E50}.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before{background-color:rgba(44,62,80,0.5)}.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before{background-color:rgba(44,62,80,0.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked ~ .custom-control-label::before{background-color:#2C3E50}.custom-radio .custom-control-input:checked ~ .custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E")}.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before{background-color:rgba(44,62,80,0.5)}.custom-select{display:inline-block;width:100%;height:calc(2.15625rem + 2px);padding:0.375rem 1.75rem 0.375rem 0.75rem;line-height:1.5;color:#7b8a8b;vertical-align:middle;background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;background-size:8px 10px;border:1px solid #ced4da;border-radius:0.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#597ea2;outline:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.075),0 0 5px rgba(89,126,162,0.5);box-shadow:inset 0 1px 2px rgba(0,0,0,0.075),0 0 5px rgba(89,126,162,0.5)}.custom-select:focus::-ms-value{color:#7b8a8b;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:0.75rem;background-image:none}.custom-select:disabled{color:#95a5a6;background-color:#ecf0f1}.custom-select::-ms-expand{opacity:0}.custom-select-sm{height:calc(1.73046875rem + 2px);padding-top:0.375rem;padding-bottom:0.375rem;font-size:75%}.custom-select-lg{height:calc(2.7578125rem + 2px);padding-top:0.375rem;padding-bottom:0.375rem;font-size:125%}.custom-file{position:relative;display:inline-block;width:100%;height:calc(2.15625rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(2.15625rem + 2px);margin:0;opacity:0}.custom-file-input:focus ~ .custom-file-control{border-color:#597ea2;-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25)}.custom-file-input:focus ~ .custom-file-control::before{border-color:#597ea2}.custom-file-input:lang(en) ~ .custom-file-label::after{content:"Browse"}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(2.15625rem + 2px);padding:0.375rem 0.75rem;line-height:1.5;color:#7b8a8b;background-color:#fff;border:1px solid #ced4da;border-radius:0.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(calc(2.15625rem + 2px) - 1px * 2);padding:0.375rem 0.75rem;line-height:1.5;color:#7b8a8b;content:"Browse";background-color:#ecf0f1;border-left:1px solid #ced4da;border-radius:0 0.25rem 0.25rem 0}.nav{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:0.5rem 2rem}.nav-link:hover,.nav-link:focus{text-decoration:none}.nav-link.disabled{color:#95a5a6}.nav-tabs{border-bottom:1px solid #ecf0f1}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.nav-tabs .nav-link:hover,.nav-tabs .nav-link:focus{border-color:#ecf0f1 #ecf0f1 #ecf0f1}.nav-tabs .nav-link.disabled{color:#95a5a6;background-color:transparent;border-color:transparent}.nav-tabs .nav-link.active,.nav-tabs .nav-item.show .nav-link{color:#7b8a8b;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:0.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#2C3E50}.nav-fill .nav-item{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-ms-flex-preferred-size:0;flex-basis:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem}.navbar>.container,.navbar>.container-fluid{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:0.32421875rem;padding-bottom:0.32421875rem;margin-right:1rem;font-size:1.171875rem;line-height:inherit;white-space:nowrap}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-nav{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:0.5rem;padding-bottom:0.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:0.25rem 0.75rem;font-size:1.171875rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:0.25rem}.navbar-toggler:hover,.navbar-toggler:focus{text-decoration:none}.navbar-toggler:not(:disabled):not(.disabled){cursor:pointer}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media (max-width: 575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{padding-right:0;padding-left:0}}@media (min-width: 576px){.navbar-expand-sm{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-sm .navbar-nav .nav-link{padding-right:0.5rem;padding-left:0.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}.navbar-expand-sm .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width: 767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{padding-right:0;padding-left:0}}@media (min-width: 768px){.navbar-expand-md{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-md .navbar-nav .nav-link{padding-right:0.5rem;padding-left:0.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}.navbar-expand-md .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width: 991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{padding-right:0;padding-left:0}}@media (min-width: 992px){.navbar-expand-lg{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-lg .navbar-nav .nav-link{padding-right:0.5rem;padding-left:0.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}.navbar-expand-lg .dropup .dropdown-menu{top:auto;bottom:100%}}@media (max-width: 1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{padding-right:0;padding-left:0}}@media (min-width: 1200px){.navbar-expand-xl{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand-xl .navbar-nav .nav-link{padding-right:0.5rem;padding-left:0.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}.navbar-expand-xl .dropup .dropdown-menu{top:auto;bottom:100%}}.navbar-expand{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .dropdown-menu-right{right:0;left:auto}.navbar-expand .navbar-nav .nav-link{padding-right:0.5rem;padding-left:0.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-expand .dropup .dropdown-menu{top:auto;bottom:100%}.navbar-light .navbar-brand{color:rgba(0,0,0,0.9)}.navbar-light .navbar-brand:hover,.navbar-light .navbar-brand:focus{color:rgba(0,0,0,0.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,0.5)}.navbar-light .navbar-nav .nav-link:hover,.navbar-light .navbar-nav .nav-link:focus{color:rgba(0,0,0,0.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,0.3)}.navbar-light .navbar-nav .show>.nav-link,.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .nav-link.active{color:rgba(0,0,0,0.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,0.5);border-color:rgba(0,0,0,0.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-light .navbar-text{color:rgba(0,0,0,0.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,0.9)}.navbar-light .navbar-text a:hover,.navbar-light .navbar-text a:focus{color:rgba(0,0,0,0.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:hover,.navbar-dark .navbar-brand:focus{color:#fff}.navbar-dark .navbar-nav .nav-link{color:#fff}.navbar-dark .navbar-nav .nav-link:hover,.navbar-dark .navbar-nav .nav-link:focus{color:#18BC9C}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,0.25)}.navbar-dark .navbar-nav .show>.nav-link,.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .nav-link.active{color:#fff}.navbar-dark .navbar-toggler{color:#fff;border-color:rgba(255,255,255,0.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-dark .navbar-text{color:#fff}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:hover,.navbar-dark .navbar-text a:focus{color:#fff}.card{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,0.125);border-radius:0.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:0.25rem;border-bottom-left-radius:0.25rem}.card-body{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:0.75rem}.card-subtitle{margin-top:-0.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:0.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,0.03);border-bottom:1px solid rgba(0,0,0,0.125)}.card-header:first-child{border-radius:calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:0.75rem 1.25rem;background-color:rgba(0,0,0,0.03);border-top:1px solid rgba(0,0,0,0.125)}.card-footer:last-child{border-radius:0 0 calc(0.25rem - 1px) calc(0.25rem - 1px)}.card-header-tabs{margin-right:-0.625rem;margin-bottom:-0.75rem;margin-left:-0.625rem;border-bottom:0}.card-header-pills{margin-right:-0.625rem;margin-left:-0.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img{width:100%;border-radius:calc(0.25rem - 1px)}.card-img-top{width:100%;border-top-left-radius:calc(0.25rem - 1px);border-top-right-radius:calc(0.25rem - 1px)}.card-img-bottom{width:100%;border-bottom-right-radius:calc(0.25rem - 1px);border-bottom-left-radius:calc(0.25rem - 1px)}.card-deck{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.card-deck .card{margin-bottom:15px}@media (min-width: 576px){.card-deck{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.card-group>.card{margin-bottom:15px}@media (min-width: 576px){.card-group{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-webkit-box-flex:1;-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:first-child .card-img-top,.card-group>.card:first-child .card-header{border-top-right-radius:0}.card-group>.card:first-child .card-img-bottom,.card-group>.card:first-child .card-footer{border-bottom-right-radius:0}.card-group>.card:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:last-child .card-img-top,.card-group>.card:last-child .card-header{border-top-left-radius:0}.card-group>.card:last-child .card-img-bottom,.card-group>.card:last-child .card-footer{border-bottom-left-radius:0}.card-group>.card:only-child{border-radius:0.25rem}.card-group>.card:only-child .card-img-top,.card-group>.card:only-child .card-header{border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.card-group>.card:only-child .card-img-bottom,.card-group>.card:only-child .card-footer{border-bottom-right-radius:0.25rem;border-bottom-left-radius:0.25rem}.card-group>.card:not(:first-child):not(:last-child):not(:only-child){border-radius:0}.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-top,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-header,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-footer{border-radius:0}}.card-columns .card{margin-bottom:0.75rem}@media (min-width: 576px){.card-columns{-webkit-column-count:3;column-count:3;-webkit-column-gap:1.25rem;column-gap:1.25rem}.card-columns .card{display:inline-block;width:100%}}.breadcrumb{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#ecf0f1;border-radius:0.25rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:0.5rem;padding-left:0.5rem;color:#95a5a6;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#95a5a6}.pagination{display:-webkit-box;display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:0.25rem}.page-link{position:relative;display:block;padding:0.5rem 0.75rem;margin-left:0;line-height:1.25;color:#fff;background-color:#18BC9C;border:0 solid transparent}.page-link:hover{color:#fff;text-decoration:none;background-color:#0f7864;border-color:transparent}.page-link:focus{z-index:2;outline:0;-webkit-box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25);box-shadow:0 0 0 0.2rem rgba(44,62,80,0.25)}.page-link:not(:disabled):not(.disabled){cursor:pointer}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:0.25rem;border-bottom-left-radius:0.25rem}.page-item:last-child .page-link{border-top-right-radius:0.25rem;border-bottom-right-radius:0.25rem}.page-item.active .page-link{z-index:1;color:#fff;background-color:#0f7864;border-color:transparent}.page-item.disabled .page-link{color:#ecf0f1;pointer-events:none;cursor:auto;background-color:#3be6c4;border-color:transparent}.pagination-lg .page-link{padding:0.75rem 1.5rem;font-size:1.171875rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:0.3rem;border-bottom-left-radius:0.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:0.3rem;border-bottom-right-radius:0.3rem}.pagination-sm .page-link{padding:0.25rem 0.5rem;font-size:0.8203125rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:0.2rem;border-bottom-left-radius:0.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:0.2rem;border-bottom-right-radius:0.2rem}.badge{display:inline-block;padding:0.25em 0.4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:0.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:0.6em;padding-left:0.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#2C3E50}.badge-primary[href]:hover,.badge-primary[href]:focus{color:#fff;text-decoration:none;background-color:#1a252f}.badge-secondary{color:#212529;background-color:#95a5a6}.badge-secondary[href]:hover,.badge-secondary[href]:focus{color:#212529;text-decoration:none;background-color:#798d8f}.badge-success{color:#fff;background-color:#18BC9C}.badge-success[href]:hover,.badge-success[href]:focus{color:#fff;text-decoration:none;background-color:#128f76}.badge-info{color:#fff;background-color:#3498DB}.badge-info[href]:hover,.badge-info[href]:focus{color:#fff;text-decoration:none;background-color:#217dbb}.badge-warning{color:#212529;background-color:#F39C12}.badge-warning[href]:hover,.badge-warning[href]:focus{color:#212529;text-decoration:none;background-color:#c87f0a}.badge-danger{color:#fff;background-color:#E74C3C}.badge-danger[href]:hover,.badge-danger[href]:focus{color:#fff;text-decoration:none;background-color:#d62c1a}.badge-light{color:#212529;background-color:#ecf0f1}.badge-light[href]:hover,.badge-light[href]:focus{color:#212529;text-decoration:none;background-color:#cfd9db}.badge-dark{color:#fff;background-color:#7b8a8b}.badge-dark[href]:hover,.badge-dark[href]:focus{color:#fff;text-decoration:none;background-color:#636f70}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#ecf0f1;border-radius:0.3rem}@media (min-width: 576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:0.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:0.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:3.90625rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:0.75rem 1.25rem;color:inherit}.alert-primary{color:#17202a;background-color:#d5d8dc;border-color:#c4c9ce}.alert-primary hr{border-top-color:#b6bcc2}.alert-primary .alert-link{color:#050709}.alert-secondary{color:#4d5656;background-color:#eaeded;border-color:#e1e6e6}.alert-secondary hr{border-top-color:#d3dada}.alert-secondary .alert-link{color:#353b3b}.alert-success{color:#0c6251;background-color:#d1f2eb;border-color:#beece3}.alert-success hr{border-top-color:#aae6db}.alert-success .alert-link{color:#06352b}.alert-info{color:#1b4f72;background-color:#d6eaf8;border-color:#c6e2f5}.alert-info hr{border-top-color:#b0d7f1}.alert-info .alert-link{color:#113249}.alert-warning{color:#7e5109;background-color:#fdebd0;border-color:#fce3bd}.alert-warning hr{border-top-color:#fbd9a5}.alert-warning .alert-link{color:#4e3206}.alert-danger{color:#78281f;background-color:#fadbd8;border-color:#f8cdc8}.alert-danger hr{border-top-color:#f5b8b1}.alert-danger .alert-link{color:#4f1a15}.alert-light{color:#7b7d7d;background-color:#fbfcfc;border-color:#fafbfb}.alert-light hr{border-top-color:#ecf0f0}.alert-light .alert-link{color:#626363}.alert-dark{color:#404848;background-color:#e5e8e8;border-color:#dadedf}.alert-dark hr{border-top-color:#ccd2d3}.alert-dark .alert-link{color:#282d2d}@-webkit-keyframes progress-bar-stripes{from{background-position:10px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:10px 0}to{background-position:0 0}}.progress{display:-webkit-box;display:-ms-flexbox;display:flex;height:10px;overflow:hidden;font-size:10px;background-color:#ecf0f1;border-radius:0.25rem}.progress-bar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;background-color:#2C3E50;-webkit-transition:width 0.6s ease;transition:width 0.6s ease}.progress-bar-striped{background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-size:10px 10px}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}.media{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.media-body{-webkit-box-flex:1;-ms-flex:1;flex:1}.list-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#7b8a8b;text-align:inherit}.list-group-item-action:hover,.list-group-item-action:focus{color:#7b8a8b;text-decoration:none;background-color:#ecf0f1}.list-group-item-action:active{color:#212529;background-color:#ecf0f1}.list-group-item{position:relative;display:block;padding:0.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,0.125)}.list-group-item:first-child{border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:0.25rem;border-bottom-left-radius:0.25rem}.list-group-item:hover,.list-group-item:focus{z-index:1;text-decoration:none}.list-group-item.disabled,.list-group-item:disabled{color:#95a5a6;background-color:#ecf0f1}.list-group-item.active{z-index:2;color:#fff;background-color:#2C3E50;border-color:#2C3E50}.list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{border-bottom:0}.list-group-item-primary{color:#17202a;background-color:#c4c9ce}.list-group-item-primary.list-group-item-action:hover,.list-group-item-primary.list-group-item-action:focus{color:#17202a;background-color:#b6bcc2}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#17202a;border-color:#17202a}.list-group-item-secondary{color:#4d5656;background-color:#e1e6e6}.list-group-item-secondary.list-group-item-action:hover,.list-group-item-secondary.list-group-item-action:focus{color:#4d5656;background-color:#d3dada}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#4d5656;border-color:#4d5656}.list-group-item-success{color:#0c6251;background-color:#beece3}.list-group-item-success.list-group-item-action:hover,.list-group-item-success.list-group-item-action:focus{color:#0c6251;background-color:#aae6db}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#0c6251;border-color:#0c6251}.list-group-item-info{color:#1b4f72;background-color:#c6e2f5}.list-group-item-info.list-group-item-action:hover,.list-group-item-info.list-group-item-action:focus{color:#1b4f72;background-color:#b0d7f1}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#1b4f72;border-color:#1b4f72}.list-group-item-warning{color:#7e5109;background-color:#fce3bd}.list-group-item-warning.list-group-item-action:hover,.list-group-item-warning.list-group-item-action:focus{color:#7e5109;background-color:#fbd9a5}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#7e5109;border-color:#7e5109}.list-group-item-danger{color:#78281f;background-color:#f8cdc8}.list-group-item-danger.list-group-item-action:hover,.list-group-item-danger.list-group-item-action:focus{color:#78281f;background-color:#f5b8b1}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#78281f;border-color:#78281f}.list-group-item-light{color:#7b7d7d;background-color:#fafbfb}.list-group-item-light.list-group-item-action:hover,.list-group-item-light.list-group-item-action:focus{color:#7b7d7d;background-color:#ecf0f0}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#7b7d7d;border-color:#7b7d7d}.list-group-item-dark{color:#404848;background-color:#dadedf}.list-group-item-dark.list-group-item-action:hover,.list-group-item-dark.list-group-item-action:focus{color:#404848;background-color:#ccd2d3}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#404848;border-color:#404848}.close{float:right;font-size:1.40625rem;font-weight:700;line-height:1;color:#fff;text-shadow:none;opacity:.5}.close:hover,.close:focus{color:#fff;text-decoration:none;opacity:.75}.close:not(:disabled):not(.disabled){cursor:pointer}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;outline:0}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:0.5rem;pointer-events:none}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform 0.3s ease-out;transition:-webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out;transition:transform 0.3s ease-out, -webkit-transform 0.3s ease-out;-webkit-transform:translate(0, -25%);transform:translate(0, -25%)}.modal.show .modal-dialog{-webkit-transform:translate(0, 0);transform:translate(0, 0)}.modal-dialog-centered{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:calc(100% - (0.5rem * 2))}.modal-content{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.2);border-radius:0.3rem;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:0.5}.modal-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:1rem;border-bottom:1px solid #ecf0f1;border-top-left-radius:0.3rem;border-top-right-radius:0.3rem}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #ecf0f1}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width: 576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-centered{min-height:calc(100% - (1.75rem * 2))}.modal-sm{max-width:300px}}@media (min-width: 992px){.modal-lg{max-width:800px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:"Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:0.8203125rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:0.9}.tooltip .arrow{position:absolute;display:block;width:0.8rem;height:0.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-top,.bs-tooltip-auto[x-placement^="top"]{padding:0.4rem 0}.bs-tooltip-top .arrow,.bs-tooltip-auto[x-placement^="top"] .arrow{bottom:0}.bs-tooltip-top .arrow::before,.bs-tooltip-auto[x-placement^="top"] .arrow::before{top:0;border-width:0.4rem 0.4rem 0;border-top-color:#000}.bs-tooltip-right,.bs-tooltip-auto[x-placement^="right"]{padding:0 0.4rem}.bs-tooltip-right .arrow,.bs-tooltip-auto[x-placement^="right"] .arrow{left:0;width:0.4rem;height:0.8rem}.bs-tooltip-right .arrow::before,.bs-tooltip-auto[x-placement^="right"] .arrow::before{right:0;border-width:0.4rem 0.4rem 0.4rem 0;border-right-color:#000}.bs-tooltip-bottom,.bs-tooltip-auto[x-placement^="bottom"]{padding:0.4rem 0}.bs-tooltip-bottom .arrow,.bs-tooltip-auto[x-placement^="bottom"] .arrow{top:0}.bs-tooltip-bottom .arrow::before,.bs-tooltip-auto[x-placement^="bottom"] .arrow::before{bottom:0;border-width:0 0.4rem 0.4rem;border-bottom-color:#000}.bs-tooltip-left,.bs-tooltip-auto[x-placement^="left"]{padding:0 0.4rem}.bs-tooltip-left .arrow,.bs-tooltip-auto[x-placement^="left"] .arrow{right:0;width:0.4rem;height:0.8rem}.bs-tooltip-left .arrow::before,.bs-tooltip-auto[x-placement^="left"] .arrow::before{left:0;border-width:0.4rem 0 0.4rem 0.4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:0.25rem 0.5rem;color:#fff;text-align:center;background-color:#000;border-radius:0.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:"Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:0.8203125rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.2);border-radius:0.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:0.5rem;margin:0 0.3rem}.popover .arrow::before,.popover .arrow::after{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-top,.bs-popover-auto[x-placement^="top"]{margin-bottom:0.5rem}.bs-popover-top .arrow,.bs-popover-auto[x-placement^="top"] .arrow{bottom:calc((0.5rem + 1px) * -1)}.bs-popover-top .arrow::before,.bs-popover-auto[x-placement^="top"] .arrow::before,.bs-popover-top .arrow::after,.bs-popover-auto[x-placement^="top"] .arrow::after{border-width:0.5rem 0.5rem 0}.bs-popover-top .arrow::before,.bs-popover-auto[x-placement^="top"] .arrow::before{bottom:0;border-top-color:rgba(0,0,0,0.25)}.bs-popover-top .arrow::after,.bs-popover-auto[x-placement^="top"] .arrow::after{bottom:1px;border-top-color:#fff}.bs-popover-right,.bs-popover-auto[x-placement^="right"]{margin-left:0.5rem}.bs-popover-right .arrow,.bs-popover-auto[x-placement^="right"] .arrow{left:calc((0.5rem + 1px) * -1);width:0.5rem;height:1rem;margin:0.3rem 0}.bs-popover-right .arrow::before,.bs-popover-auto[x-placement^="right"] .arrow::before,.bs-popover-right .arrow::after,.bs-popover-auto[x-placement^="right"] .arrow::after{border-width:0.5rem 0.5rem 0.5rem 0}.bs-popover-right .arrow::before,.bs-popover-auto[x-placement^="right"] .arrow::before{left:0;border-right-color:rgba(0,0,0,0.25)}.bs-popover-right .arrow::after,.bs-popover-auto[x-placement^="right"] .arrow::after{left:1px;border-right-color:#fff}.bs-popover-bottom,.bs-popover-auto[x-placement^="bottom"]{margin-top:0.5rem}.bs-popover-bottom .arrow,.bs-popover-auto[x-placement^="bottom"] .arrow{top:calc((0.5rem + 1px) * -1)}.bs-popover-bottom .arrow::before,.bs-popover-auto[x-placement^="bottom"] .arrow::before,.bs-popover-bottom .arrow::after,.bs-popover-auto[x-placement^="bottom"] .arrow::after{border-width:0 0.5rem 0.5rem 0.5rem}.bs-popover-bottom .arrow::before,.bs-popover-auto[x-placement^="bottom"] .arrow::before{top:0;border-bottom-color:rgba(0,0,0,0.25)}.bs-popover-bottom .arrow::after,.bs-popover-auto[x-placement^="bottom"] .arrow::after{top:1px;border-bottom-color:#fff}.bs-popover-bottom .popover-header::before,.bs-popover-auto[x-placement^="bottom"] .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-0.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-left,.bs-popover-auto[x-placement^="left"]{margin-right:0.5rem}.bs-popover-left .arrow,.bs-popover-auto[x-placement^="left"] .arrow{right:calc((0.5rem + 1px) * -1);width:0.5rem;height:1rem;margin:0.3rem 0}.bs-popover-left .arrow::before,.bs-popover-auto[x-placement^="left"] .arrow::before,.bs-popover-left .arrow::after,.bs-popover-auto[x-placement^="left"] .arrow::after{border-width:0.5rem 0 0.5rem 0.5rem}.bs-popover-left .arrow::before,.bs-popover-auto[x-placement^="left"] .arrow::before{right:0;border-left-color:rgba(0,0,0,0.25)}.bs-popover-left .arrow::after,.bs-popover-auto[x-placement^="left"] .arrow::after{right:1px;border-left-color:#fff}.popover-header{padding:0.5rem 0.75rem;margin-bottom:0;font-size:0.9375rem;color:inherit;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(0.3rem - 1px);border-top-right-radius:calc(0.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:0.5rem 0.75rem;color:#212529}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-item{position:relative;display:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;-webkit-transition:-webkit-transform 0.6s ease;transition:-webkit-transform 0.6s ease;transition:transform 0.6s ease;transition:transform 0.6s ease, -webkit-transform 0.6s ease;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-item.active,.carousel-item-next,.carousel-item-prev{display:block}.carousel-item-next,.carousel-item-prev{position:absolute;top:0}.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translateX(0);transform:translateX(0)}@supports (-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d){.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.carousel-item-next,.active.carousel-item-right{-webkit-transform:translateX(100%);transform:translateX(100%)}@supports (-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d){.carousel-item-next,.active.carousel-item-right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}}.carousel-item-prev,.active.carousel-item-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}@supports (-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d){.carousel-item-prev,.active.carousel-item-left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0)}}.carousel-control-prev,.carousel-control-next{position:absolute;top:0;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:0.5}.carousel-control-prev:hover,.carousel-control-prev:focus,.carousel-control-next:hover,.carousel-control-next:focus{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-prev-icon,.carousel-control-next-icon{display:inline-block;width:20px;height:20px;background:transparent no-repeat center center;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E")}.carousel-control-next-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E")}.carousel-indicators{position:absolute;right:0;bottom:10px;left:0;z-index:15;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{position:relative;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;background-color:rgba(255,255,255,0.5)}.carousel-indicators li::before{position:absolute;top:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators li::after{position:absolute;bottom:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}.align-baseline{vertical-align:baseline !important}.align-top{vertical-align:top !important}.align-middle{vertical-align:middle !important}.align-bottom{vertical-align:bottom !important}.align-text-bottom{vertical-align:text-bottom !important}.align-text-top{vertical-align:text-top !important}.bg-primary{background-color:#2C3E50 !important}a.bg-primary:hover,a.bg-primary:focus,button.bg-primary:hover,button.bg-primary:focus{background-color:#1a252f !important}.bg-secondary{background-color:#95a5a6 !important}a.bg-secondary:hover,a.bg-secondary:focus,button.bg-secondary:hover,button.bg-secondary:focus{background-color:#798d8f !important}.bg-success{background-color:#18BC9C !important}a.bg-success:hover,a.bg-success:focus,button.bg-success:hover,button.bg-success:focus{background-color:#128f76 !important}.bg-info{background-color:#3498DB !important}a.bg-info:hover,a.bg-info:focus,button.bg-info:hover,button.bg-info:focus{background-color:#217dbb !important}.bg-warning{background-color:#F39C12 !important}a.bg-warning:hover,a.bg-warning:focus,button.bg-warning:hover,button.bg-warning:focus{background-color:#c87f0a !important}.bg-danger{background-color:#E74C3C !important}a.bg-danger:hover,a.bg-danger:focus,button.bg-danger:hover,button.bg-danger:focus{background-color:#d62c1a !important}.bg-light{background-color:#ecf0f1 !important}a.bg-light:hover,a.bg-light:focus,button.bg-light:hover,button.bg-light:focus{background-color:#cfd9db !important}.bg-dark{background-color:#7b8a8b !important}a.bg-dark:hover,a.bg-dark:focus,button.bg-dark:hover,button.bg-dark:focus{background-color:#636f70 !important}.bg-white{background-color:#fff !important}.bg-transparent{background-color:transparent !important}.border{border:1px solid #dee2e6 !important}.border-top{border-top:1px solid #dee2e6 !important}.border-right{border-right:1px solid #dee2e6 !important}.border-bottom{border-bottom:1px solid #dee2e6 !important}.border-left{border-left:1px solid #dee2e6 !important}.border-0{border:0 !important}.border-top-0{border-top:0 !important}.border-right-0{border-right:0 !important}.border-bottom-0{border-bottom:0 !important}.border-left-0{border-left:0 !important}.border-primary{border-color:#2C3E50 !important}.border-secondary{border-color:#95a5a6 !important}.border-success{border-color:#18BC9C !important}.border-info{border-color:#3498DB !important}.border-warning{border-color:#F39C12 !important}.border-danger{border-color:#E74C3C !important}.border-light{border-color:#ecf0f1 !important}.border-dark{border-color:#7b8a8b !important}.border-white{border-color:#fff !important}.rounded{border-radius:0.25rem !important}.rounded-top{border-top-left-radius:0.25rem !important;border-top-right-radius:0.25rem !important}.rounded-right{border-top-right-radius:0.25rem !important;border-bottom-right-radius:0.25rem !important}.rounded-bottom{border-bottom-right-radius:0.25rem !important;border-bottom-left-radius:0.25rem !important}.rounded-left{border-top-left-radius:0.25rem !important;border-bottom-left-radius:0.25rem !important}.rounded-circle{border-radius:50% !important}.rounded-0{border-radius:0 !important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none !important}.d-inline{display:inline !important}.d-inline-block{display:inline-block !important}.d-block{display:block !important}.d-table{display:table !important}.d-table-row{display:table-row !important}.d-table-cell{display:table-cell !important}.d-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}.d-inline-flex{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important}@media (min-width: 576px){.d-sm-none{display:none !important}.d-sm-inline{display:inline !important}.d-sm-inline-block{display:inline-block !important}.d-sm-block{display:block !important}.d-sm-table{display:table !important}.d-sm-table-row{display:table-row !important}.d-sm-table-cell{display:table-cell !important}.d-sm-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}.d-sm-inline-flex{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important}}@media (min-width: 768px){.d-md-none{display:none !important}.d-md-inline{display:inline !important}.d-md-inline-block{display:inline-block !important}.d-md-block{display:block !important}.d-md-table{display:table !important}.d-md-table-row{display:table-row !important}.d-md-table-cell{display:table-cell !important}.d-md-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}.d-md-inline-flex{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important}}@media (min-width: 992px){.d-lg-none{display:none !important}.d-lg-inline{display:inline !important}.d-lg-inline-block{display:inline-block !important}.d-lg-block{display:block !important}.d-lg-table{display:table !important}.d-lg-table-row{display:table-row !important}.d-lg-table-cell{display:table-cell !important}.d-lg-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}.d-lg-inline-flex{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important}}@media (min-width: 1200px){.d-xl-none{display:none !important}.d-xl-inline{display:inline !important}.d-xl-inline-block{display:inline-block !important}.d-xl-block{display:block !important}.d-xl-table{display:table !important}.d-xl-table-row{display:table-row !important}.d-xl-table-cell{display:table-cell !important}.d-xl-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}.d-xl-inline-flex{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important}}@media print{.d-print-none{display:none !important}.d-print-inline{display:inline !important}.d-print-inline-block{display:inline-block !important}.d-print-block{display:block !important}.d-print-table{display:table !important}.d-print-table-row{display:table-row !important}.d-print-table-cell{display:table-cell !important}.d-print-flex{display:-webkit-box !important;display:-ms-flexbox !important;display:flex !important}.d-print-inline-flex{display:-webkit-inline-box !important;display:-ms-inline-flexbox !important;display:inline-flex !important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.8571428571%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-webkit-box-orient:horizontal !important;-webkit-box-direction:normal !important;-ms-flex-direction:row !important;flex-direction:row !important}.flex-column{-webkit-box-orient:vertical !important;-webkit-box-direction:normal !important;-ms-flex-direction:column !important;flex-direction:column !important}.flex-row-reverse{-webkit-box-orient:horizontal !important;-webkit-box-direction:reverse !important;-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-column-reverse{-webkit-box-orient:vertical !important;-webkit-box-direction:reverse !important;-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.justify-content-start{-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-end{-webkit-box-pack:end !important;-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-center{-webkit-box-pack:center !important;-ms-flex-pack:center !important;justify-content:center !important}.justify-content-between{-webkit-box-pack:justify !important;-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-start{-webkit-box-align:start !important;-ms-flex-align:start !important;align-items:flex-start !important}.align-items-end{-webkit-box-align:end !important;-ms-flex-align:end !important;align-items:flex-end !important}.align-items-center{-webkit-box-align:center !important;-ms-flex-align:center !important;align-items:center !important}.align-items-baseline{-webkit-box-align:baseline !important;-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-stretch{-webkit-box-align:stretch !important;-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}@media (min-width: 576px){.flex-sm-row{-webkit-box-orient:horizontal !important;-webkit-box-direction:normal !important;-ms-flex-direction:row !important;flex-direction:row !important}.flex-sm-column{-webkit-box-orient:vertical !important;-webkit-box-direction:normal !important;-ms-flex-direction:column !important;flex-direction:column !important}.flex-sm-row-reverse{-webkit-box-orient:horizontal !important;-webkit-box-direction:reverse !important;-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-sm-column-reverse{-webkit-box-orient:vertical !important;-webkit-box-direction:reverse !important;-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-sm-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-sm-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.justify-content-sm-start{-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-sm-end{-webkit-box-pack:end !important;-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-sm-center{-webkit-box-pack:center !important;-ms-flex-pack:center !important;justify-content:center !important}.justify-content-sm-between{-webkit-box-pack:justify !important;-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-sm-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-sm-start{-webkit-box-align:start !important;-ms-flex-align:start !important;align-items:flex-start !important}.align-items-sm-end{-webkit-box-align:end !important;-ms-flex-align:end !important;align-items:flex-end !important}.align-items-sm-center{-webkit-box-align:center !important;-ms-flex-align:center !important;align-items:center !important}.align-items-sm-baseline{-webkit-box-align:baseline !important;-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-sm-stretch{-webkit-box-align:stretch !important;-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-sm-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-sm-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-sm-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-sm-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-sm-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-sm-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-sm-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-sm-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-sm-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-sm-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-sm-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-sm-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}@media (min-width: 768px){.flex-md-row{-webkit-box-orient:horizontal !important;-webkit-box-direction:normal !important;-ms-flex-direction:row !important;flex-direction:row !important}.flex-md-column{-webkit-box-orient:vertical !important;-webkit-box-direction:normal !important;-ms-flex-direction:column !important;flex-direction:column !important}.flex-md-row-reverse{-webkit-box-orient:horizontal !important;-webkit-box-direction:reverse !important;-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-md-column-reverse{-webkit-box-orient:vertical !important;-webkit-box-direction:reverse !important;-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-md-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-md-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.justify-content-md-start{-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-md-end{-webkit-box-pack:end !important;-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-md-center{-webkit-box-pack:center !important;-ms-flex-pack:center !important;justify-content:center !important}.justify-content-md-between{-webkit-box-pack:justify !important;-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-md-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-md-start{-webkit-box-align:start !important;-ms-flex-align:start !important;align-items:flex-start !important}.align-items-md-end{-webkit-box-align:end !important;-ms-flex-align:end !important;align-items:flex-end !important}.align-items-md-center{-webkit-box-align:center !important;-ms-flex-align:center !important;align-items:center !important}.align-items-md-baseline{-webkit-box-align:baseline !important;-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-md-stretch{-webkit-box-align:stretch !important;-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-md-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-md-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-md-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-md-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-md-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-md-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-md-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-md-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-md-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-md-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-md-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-md-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}@media (min-width: 992px){.flex-lg-row{-webkit-box-orient:horizontal !important;-webkit-box-direction:normal !important;-ms-flex-direction:row !important;flex-direction:row !important}.flex-lg-column{-webkit-box-orient:vertical !important;-webkit-box-direction:normal !important;-ms-flex-direction:column !important;flex-direction:column !important}.flex-lg-row-reverse{-webkit-box-orient:horizontal !important;-webkit-box-direction:reverse !important;-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-lg-column-reverse{-webkit-box-orient:vertical !important;-webkit-box-direction:reverse !important;-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-lg-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-lg-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.justify-content-lg-start{-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-lg-end{-webkit-box-pack:end !important;-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-lg-center{-webkit-box-pack:center !important;-ms-flex-pack:center !important;justify-content:center !important}.justify-content-lg-between{-webkit-box-pack:justify !important;-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-lg-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-lg-start{-webkit-box-align:start !important;-ms-flex-align:start !important;align-items:flex-start !important}.align-items-lg-end{-webkit-box-align:end !important;-ms-flex-align:end !important;align-items:flex-end !important}.align-items-lg-center{-webkit-box-align:center !important;-ms-flex-align:center !important;align-items:center !important}.align-items-lg-baseline{-webkit-box-align:baseline !important;-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-lg-stretch{-webkit-box-align:stretch !important;-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-lg-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-lg-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-lg-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-lg-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-lg-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-lg-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-lg-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-lg-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-lg-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-lg-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-lg-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-lg-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}@media (min-width: 1200px){.flex-xl-row{-webkit-box-orient:horizontal !important;-webkit-box-direction:normal !important;-ms-flex-direction:row !important;flex-direction:row !important}.flex-xl-column{-webkit-box-orient:vertical !important;-webkit-box-direction:normal !important;-ms-flex-direction:column !important;flex-direction:column !important}.flex-xl-row-reverse{-webkit-box-orient:horizontal !important;-webkit-box-direction:reverse !important;-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-xl-column-reverse{-webkit-box-orient:vertical !important;-webkit-box-direction:reverse !important;-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-xl-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-xl-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.justify-content-xl-start{-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-xl-end{-webkit-box-pack:end !important;-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-xl-center{-webkit-box-pack:center !important;-ms-flex-pack:center !important;justify-content:center !important}.justify-content-xl-between{-webkit-box-pack:justify !important;-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-xl-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-xl-start{-webkit-box-align:start !important;-ms-flex-align:start !important;align-items:flex-start !important}.align-items-xl-end{-webkit-box-align:end !important;-ms-flex-align:end !important;align-items:flex-end !important}.align-items-xl-center{-webkit-box-align:center !important;-ms-flex-align:center !important;align-items:center !important}.align-items-xl-baseline{-webkit-box-align:baseline !important;-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-xl-stretch{-webkit-box-align:stretch !important;-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-xl-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-xl-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-xl-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-xl-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-xl-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-xl-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-xl-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-xl-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-xl-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-xl-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-xl-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-xl-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}.float-left{float:left !important}.float-right{float:right !important}.float-none{float:none !important}@media (min-width: 576px){.float-sm-left{float:left !important}.float-sm-right{float:right !important}.float-sm-none{float:none !important}}@media (min-width: 768px){.float-md-left{float:left !important}.float-md-right{float:right !important}.float-md-none{float:none !important}}@media (min-width: 992px){.float-lg-left{float:left !important}.float-lg-right{float:right !important}.float-lg-none{float:none !important}}@media (min-width: 1200px){.float-xl-left{float:left !important}.float-xl-right{float:right !important}.float-xl-none{float:none !important}}.position-static{position:static !important}.position-relative{position:relative !important}.position-absolute{position:absolute !important}.position-fixed{position:fixed !important}.position-sticky{position:-webkit-sticky !important;position:sticky !important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports (position: -webkit-sticky) or (position: sticky){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;-webkit-clip-path:inset(50%);clip-path:inset(50%);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal;-webkit-clip-path:none;clip-path:none}.w-25{width:25% !important}.w-50{width:50% !important}.w-75{width:75% !important}.w-100{width:100% !important}.h-25{height:25% !important}.h-50{height:50% !important}.h-75{height:75% !important}.h-100{height:100% !important}.mw-100{max-width:100% !important}.mh-100{max-height:100% !important}.m-0{margin:0 !important}.mt-0,.my-0{margin-top:0 !important}.mr-0,.mx-0{margin-right:0 !important}.mb-0,.my-0{margin-bottom:0 !important}.ml-0,.mx-0{margin-left:0 !important}.m-1{margin:0.25rem !important}.mt-1,.my-1{margin-top:0.25rem !important}.mr-1,.mx-1{margin-right:0.25rem !important}.mb-1,.my-1{margin-bottom:0.25rem !important}.ml-1,.mx-1{margin-left:0.25rem !important}.m-2{margin:0.5rem !important}.mt-2,.my-2{margin-top:0.5rem !important}.mr-2,.mx-2{margin-right:0.5rem !important}.mb-2,.my-2{margin-bottom:0.5rem !important}.ml-2,.mx-2{margin-left:0.5rem !important}.m-3{margin:1rem !important}.mt-3,.my-3{margin-top:1rem !important}.mr-3,.mx-3{margin-right:1rem !important}.mb-3,.my-3{margin-bottom:1rem !important}.ml-3,.mx-3{margin-left:1rem !important}.m-4{margin:1.5rem !important}.mt-4,.my-4{margin-top:1.5rem !important}.mr-4,.mx-4{margin-right:1.5rem !important}.mb-4,.my-4{margin-bottom:1.5rem !important}.ml-4,.mx-4{margin-left:1.5rem !important}.m-5{margin:3rem !important}.mt-5,.my-5{margin-top:3rem !important}.mr-5,.mx-5{margin-right:3rem !important}.mb-5,.my-5{margin-bottom:3rem !important}.ml-5,.mx-5{margin-left:3rem !important}.p-0{padding:0 !important}.pt-0,.py-0{padding-top:0 !important}.pr-0,.px-0{padding-right:0 !important}.pb-0,.py-0{padding-bottom:0 !important}.pl-0,.px-0{padding-left:0 !important}.p-1{padding:0.25rem !important}.pt-1,.py-1{padding-top:0.25rem !important}.pr-1,.px-1{padding-right:0.25rem !important}.pb-1,.py-1{padding-bottom:0.25rem !important}.pl-1,.px-1{padding-left:0.25rem !important}.p-2{padding:0.5rem !important}.pt-2,.py-2{padding-top:0.5rem !important}.pr-2,.px-2{padding-right:0.5rem !important}.pb-2,.py-2{padding-bottom:0.5rem !important}.pl-2,.px-2{padding-left:0.5rem !important}.p-3{padding:1rem !important}.pt-3,.py-3{padding-top:1rem !important}.pr-3,.px-3{padding-right:1rem !important}.pb-3,.py-3{padding-bottom:1rem !important}.pl-3,.px-3{padding-left:1rem !important}.p-4{padding:1.5rem !important}.pt-4,.py-4{padding-top:1.5rem !important}.pr-4,.px-4{padding-right:1.5rem !important}.pb-4,.py-4{padding-bottom:1.5rem !important}.pl-4,.px-4{padding-left:1.5rem !important}.p-5{padding:3rem !important}.pt-5,.py-5{padding-top:3rem !important}.pr-5,.px-5{padding-right:3rem !important}.pb-5,.py-5{padding-bottom:3rem !important}.pl-5,.px-5{padding-left:3rem !important}.m-auto{margin:auto !important}.mt-auto,.my-auto{margin-top:auto !important}.mr-auto,.mx-auto{margin-right:auto !important}.mb-auto,.my-auto{margin-bottom:auto !important}.ml-auto,.mx-auto{margin-left:auto !important}@media (min-width: 576px){.m-sm-0{margin:0 !important}.mt-sm-0,.my-sm-0{margin-top:0 !important}.mr-sm-0,.mx-sm-0{margin-right:0 !important}.mb-sm-0,.my-sm-0{margin-bottom:0 !important}.ml-sm-0,.mx-sm-0{margin-left:0 !important}.m-sm-1{margin:0.25rem !important}.mt-sm-1,.my-sm-1{margin-top:0.25rem !important}.mr-sm-1,.mx-sm-1{margin-right:0.25rem !important}.mb-sm-1,.my-sm-1{margin-bottom:0.25rem !important}.ml-sm-1,.mx-sm-1{margin-left:0.25rem !important}.m-sm-2{margin:0.5rem !important}.mt-sm-2,.my-sm-2{margin-top:0.5rem !important}.mr-sm-2,.mx-sm-2{margin-right:0.5rem !important}.mb-sm-2,.my-sm-2{margin-bottom:0.5rem !important}.ml-sm-2,.mx-sm-2{margin-left:0.5rem !important}.m-sm-3{margin:1rem !important}.mt-sm-3,.my-sm-3{margin-top:1rem !important}.mr-sm-3,.mx-sm-3{margin-right:1rem !important}.mb-sm-3,.my-sm-3{margin-bottom:1rem !important}.ml-sm-3,.mx-sm-3{margin-left:1rem !important}.m-sm-4{margin:1.5rem !important}.mt-sm-4,.my-sm-4{margin-top:1.5rem !important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem !important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem !important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem !important}.m-sm-5{margin:3rem !important}.mt-sm-5,.my-sm-5{margin-top:3rem !important}.mr-sm-5,.mx-sm-5{margin-right:3rem !important}.mb-sm-5,.my-sm-5{margin-bottom:3rem !important}.ml-sm-5,.mx-sm-5{margin-left:3rem !important}.p-sm-0{padding:0 !important}.pt-sm-0,.py-sm-0{padding-top:0 !important}.pr-sm-0,.px-sm-0{padding-right:0 !important}.pb-sm-0,.py-sm-0{padding-bottom:0 !important}.pl-sm-0,.px-sm-0{padding-left:0 !important}.p-sm-1{padding:0.25rem !important}.pt-sm-1,.py-sm-1{padding-top:0.25rem !important}.pr-sm-1,.px-sm-1{padding-right:0.25rem !important}.pb-sm-1,.py-sm-1{padding-bottom:0.25rem !important}.pl-sm-1,.px-sm-1{padding-left:0.25rem !important}.p-sm-2{padding:0.5rem !important}.pt-sm-2,.py-sm-2{padding-top:0.5rem !important}.pr-sm-2,.px-sm-2{padding-right:0.5rem !important}.pb-sm-2,.py-sm-2{padding-bottom:0.5rem !important}.pl-sm-2,.px-sm-2{padding-left:0.5rem !important}.p-sm-3{padding:1rem !important}.pt-sm-3,.py-sm-3{padding-top:1rem !important}.pr-sm-3,.px-sm-3{padding-right:1rem !important}.pb-sm-3,.py-sm-3{padding-bottom:1rem !important}.pl-sm-3,.px-sm-3{padding-left:1rem !important}.p-sm-4{padding:1.5rem !important}.pt-sm-4,.py-sm-4{padding-top:1.5rem !important}.pr-sm-4,.px-sm-4{padding-right:1.5rem !important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem !important}.pl-sm-4,.px-sm-4{padding-left:1.5rem !important}.p-sm-5{padding:3rem !important}.pt-sm-5,.py-sm-5{padding-top:3rem !important}.pr-sm-5,.px-sm-5{padding-right:3rem !important}.pb-sm-5,.py-sm-5{padding-bottom:3rem !important}.pl-sm-5,.px-sm-5{padding-left:3rem !important}.m-sm-auto{margin:auto !important}.mt-sm-auto,.my-sm-auto{margin-top:auto !important}.mr-sm-auto,.mx-sm-auto{margin-right:auto !important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto !important}.ml-sm-auto,.mx-sm-auto{margin-left:auto !important}}@media (min-width: 768px){.m-md-0{margin:0 !important}.mt-md-0,.my-md-0{margin-top:0 !important}.mr-md-0,.mx-md-0{margin-right:0 !important}.mb-md-0,.my-md-0{margin-bottom:0 !important}.ml-md-0,.mx-md-0{margin-left:0 !important}.m-md-1{margin:0.25rem !important}.mt-md-1,.my-md-1{margin-top:0.25rem !important}.mr-md-1,.mx-md-1{margin-right:0.25rem !important}.mb-md-1,.my-md-1{margin-bottom:0.25rem !important}.ml-md-1,.mx-md-1{margin-left:0.25rem !important}.m-md-2{margin:0.5rem !important}.mt-md-2,.my-md-2{margin-top:0.5rem !important}.mr-md-2,.mx-md-2{margin-right:0.5rem !important}.mb-md-2,.my-md-2{margin-bottom:0.5rem !important}.ml-md-2,.mx-md-2{margin-left:0.5rem !important}.m-md-3{margin:1rem !important}.mt-md-3,.my-md-3{margin-top:1rem !important}.mr-md-3,.mx-md-3{margin-right:1rem !important}.mb-md-3,.my-md-3{margin-bottom:1rem !important}.ml-md-3,.mx-md-3{margin-left:1rem !important}.m-md-4{margin:1.5rem !important}.mt-md-4,.my-md-4{margin-top:1.5rem !important}.mr-md-4,.mx-md-4{margin-right:1.5rem !important}.mb-md-4,.my-md-4{margin-bottom:1.5rem !important}.ml-md-4,.mx-md-4{margin-left:1.5rem !important}.m-md-5{margin:3rem !important}.mt-md-5,.my-md-5{margin-top:3rem !important}.mr-md-5,.mx-md-5{margin-right:3rem !important}.mb-md-5,.my-md-5{margin-bottom:3rem !important}.ml-md-5,.mx-md-5{margin-left:3rem !important}.p-md-0{padding:0 !important}.pt-md-0,.py-md-0{padding-top:0 !important}.pr-md-0,.px-md-0{padding-right:0 !important}.pb-md-0,.py-md-0{padding-bottom:0 !important}.pl-md-0,.px-md-0{padding-left:0 !important}.p-md-1{padding:0.25rem !important}.pt-md-1,.py-md-1{padding-top:0.25rem !important}.pr-md-1,.px-md-1{padding-right:0.25rem !important}.pb-md-1,.py-md-1{padding-bottom:0.25rem !important}.pl-md-1,.px-md-1{padding-left:0.25rem !important}.p-md-2{padding:0.5rem !important}.pt-md-2,.py-md-2{padding-top:0.5rem !important}.pr-md-2,.px-md-2{padding-right:0.5rem !important}.pb-md-2,.py-md-2{padding-bottom:0.5rem !important}.pl-md-2,.px-md-2{padding-left:0.5rem !important}.p-md-3{padding:1rem !important}.pt-md-3,.py-md-3{padding-top:1rem !important}.pr-md-3,.px-md-3{padding-right:1rem !important}.pb-md-3,.py-md-3{padding-bottom:1rem !important}.pl-md-3,.px-md-3{padding-left:1rem !important}.p-md-4{padding:1.5rem !important}.pt-md-4,.py-md-4{padding-top:1.5rem !important}.pr-md-4,.px-md-4{padding-right:1.5rem !important}.pb-md-4,.py-md-4{padding-bottom:1.5rem !important}.pl-md-4,.px-md-4{padding-left:1.5rem !important}.p-md-5{padding:3rem !important}.pt-md-5,.py-md-5{padding-top:3rem !important}.pr-md-5,.px-md-5{padding-right:3rem !important}.pb-md-5,.py-md-5{padding-bottom:3rem !important}.pl-md-5,.px-md-5{padding-left:3rem !important}.m-md-auto{margin:auto !important}.mt-md-auto,.my-md-auto{margin-top:auto !important}.mr-md-auto,.mx-md-auto{margin-right:auto !important}.mb-md-auto,.my-md-auto{margin-bottom:auto !important}.ml-md-auto,.mx-md-auto{margin-left:auto !important}}@media (min-width: 992px){.m-lg-0{margin:0 !important}.mt-lg-0,.my-lg-0{margin-top:0 !important}.mr-lg-0,.mx-lg-0{margin-right:0 !important}.mb-lg-0,.my-lg-0{margin-bottom:0 !important}.ml-lg-0,.mx-lg-0{margin-left:0 !important}.m-lg-1{margin:0.25rem !important}.mt-lg-1,.my-lg-1{margin-top:0.25rem !important}.mr-lg-1,.mx-lg-1{margin-right:0.25rem !important}.mb-lg-1,.my-lg-1{margin-bottom:0.25rem !important}.ml-lg-1,.mx-lg-1{margin-left:0.25rem !important}.m-lg-2{margin:0.5rem !important}.mt-lg-2,.my-lg-2{margin-top:0.5rem !important}.mr-lg-2,.mx-lg-2{margin-right:0.5rem !important}.mb-lg-2,.my-lg-2{margin-bottom:0.5rem !important}.ml-lg-2,.mx-lg-2{margin-left:0.5rem !important}.m-lg-3{margin:1rem !important}.mt-lg-3,.my-lg-3{margin-top:1rem !important}.mr-lg-3,.mx-lg-3{margin-right:1rem !important}.mb-lg-3,.my-lg-3{margin-bottom:1rem !important}.ml-lg-3,.mx-lg-3{margin-left:1rem !important}.m-lg-4{margin:1.5rem !important}.mt-lg-4,.my-lg-4{margin-top:1.5rem !important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem !important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem !important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem !important}.m-lg-5{margin:3rem !important}.mt-lg-5,.my-lg-5{margin-top:3rem !important}.mr-lg-5,.mx-lg-5{margin-right:3rem !important}.mb-lg-5,.my-lg-5{margin-bottom:3rem !important}.ml-lg-5,.mx-lg-5{margin-left:3rem !important}.p-lg-0{padding:0 !important}.pt-lg-0,.py-lg-0{padding-top:0 !important}.pr-lg-0,.px-lg-0{padding-right:0 !important}.pb-lg-0,.py-lg-0{padding-bottom:0 !important}.pl-lg-0,.px-lg-0{padding-left:0 !important}.p-lg-1{padding:0.25rem !important}.pt-lg-1,.py-lg-1{padding-top:0.25rem !important}.pr-lg-1,.px-lg-1{padding-right:0.25rem !important}.pb-lg-1,.py-lg-1{padding-bottom:0.25rem !important}.pl-lg-1,.px-lg-1{padding-left:0.25rem !important}.p-lg-2{padding:0.5rem !important}.pt-lg-2,.py-lg-2{padding-top:0.5rem !important}.pr-lg-2,.px-lg-2{padding-right:0.5rem !important}.pb-lg-2,.py-lg-2{padding-bottom:0.5rem !important}.pl-lg-2,.px-lg-2{padding-left:0.5rem !important}.p-lg-3{padding:1rem !important}.pt-lg-3,.py-lg-3{padding-top:1rem !important}.pr-lg-3,.px-lg-3{padding-right:1rem !important}.pb-lg-3,.py-lg-3{padding-bottom:1rem !important}.pl-lg-3,.px-lg-3{padding-left:1rem !important}.p-lg-4{padding:1.5rem !important}.pt-lg-4,.py-lg-4{padding-top:1.5rem !important}.pr-lg-4,.px-lg-4{padding-right:1.5rem !important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem !important}.pl-lg-4,.px-lg-4{padding-left:1.5rem !important}.p-lg-5{padding:3rem !important}.pt-lg-5,.py-lg-5{padding-top:3rem !important}.pr-lg-5,.px-lg-5{padding-right:3rem !important}.pb-lg-5,.py-lg-5{padding-bottom:3rem !important}.pl-lg-5,.px-lg-5{padding-left:3rem !important}.m-lg-auto{margin:auto !important}.mt-lg-auto,.my-lg-auto{margin-top:auto !important}.mr-lg-auto,.mx-lg-auto{margin-right:auto !important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto !important}.ml-lg-auto,.mx-lg-auto{margin-left:auto !important}}@media (min-width: 1200px){.m-xl-0{margin:0 !important}.mt-xl-0,.my-xl-0{margin-top:0 !important}.mr-xl-0,.mx-xl-0{margin-right:0 !important}.mb-xl-0,.my-xl-0{margin-bottom:0 !important}.ml-xl-0,.mx-xl-0{margin-left:0 !important}.m-xl-1{margin:0.25rem !important}.mt-xl-1,.my-xl-1{margin-top:0.25rem !important}.mr-xl-1,.mx-xl-1{margin-right:0.25rem !important}.mb-xl-1,.my-xl-1{margin-bottom:0.25rem !important}.ml-xl-1,.mx-xl-1{margin-left:0.25rem !important}.m-xl-2{margin:0.5rem !important}.mt-xl-2,.my-xl-2{margin-top:0.5rem !important}.mr-xl-2,.mx-xl-2{margin-right:0.5rem !important}.mb-xl-2,.my-xl-2{margin-bottom:0.5rem !important}.ml-xl-2,.mx-xl-2{margin-left:0.5rem !important}.m-xl-3{margin:1rem !important}.mt-xl-3,.my-xl-3{margin-top:1rem !important}.mr-xl-3,.mx-xl-3{margin-right:1rem !important}.mb-xl-3,.my-xl-3{margin-bottom:1rem !important}.ml-xl-3,.mx-xl-3{margin-left:1rem !important}.m-xl-4{margin:1.5rem !important}.mt-xl-4,.my-xl-4{margin-top:1.5rem !important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem !important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem !important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem !important}.m-xl-5{margin:3rem !important}.mt-xl-5,.my-xl-5{margin-top:3rem !important}.mr-xl-5,.mx-xl-5{margin-right:3rem !important}.mb-xl-5,.my-xl-5{margin-bottom:3rem !important}.ml-xl-5,.mx-xl-5{margin-left:3rem !important}.p-xl-0{padding:0 !important}.pt-xl-0,.py-xl-0{padding-top:0 !important}.pr-xl-0,.px-xl-0{padding-right:0 !important}.pb-xl-0,.py-xl-0{padding-bottom:0 !important}.pl-xl-0,.px-xl-0{padding-left:0 !important}.p-xl-1{padding:0.25rem !important}.pt-xl-1,.py-xl-1{padding-top:0.25rem !important}.pr-xl-1,.px-xl-1{padding-right:0.25rem !important}.pb-xl-1,.py-xl-1{padding-bottom:0.25rem !important}.pl-xl-1,.px-xl-1{padding-left:0.25rem !important}.p-xl-2{padding:0.5rem !important}.pt-xl-2,.py-xl-2{padding-top:0.5rem !important}.pr-xl-2,.px-xl-2{padding-right:0.5rem !important}.pb-xl-2,.py-xl-2{padding-bottom:0.5rem !important}.pl-xl-2,.px-xl-2{padding-left:0.5rem !important}.p-xl-3{padding:1rem !important}.pt-xl-3,.py-xl-3{padding-top:1rem !important}.pr-xl-3,.px-xl-3{padding-right:1rem !important}.pb-xl-3,.py-xl-3{padding-bottom:1rem !important}.pl-xl-3,.px-xl-3{padding-left:1rem !important}.p-xl-4{padding:1.5rem !important}.pt-xl-4,.py-xl-4{padding-top:1.5rem !important}.pr-xl-4,.px-xl-4{padding-right:1.5rem !important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem !important}.pl-xl-4,.px-xl-4{padding-left:1.5rem !important}.p-xl-5{padding:3rem !important}.pt-xl-5,.py-xl-5{padding-top:3rem !important}.pr-xl-5,.px-xl-5{padding-right:3rem !important}.pb-xl-5,.py-xl-5{padding-bottom:3rem !important}.pl-xl-5,.px-xl-5{padding-left:3rem !important}.m-xl-auto{margin:auto !important}.mt-xl-auto,.my-xl-auto{margin-top:auto !important}.mr-xl-auto,.mx-xl-auto{margin-right:auto !important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto !important}.ml-xl-auto,.mx-xl-auto{margin-left:auto !important}}.text-justify{text-align:justify !important}.text-nowrap{white-space:nowrap !important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}@media (min-width: 576px){.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}.text-sm-center{text-align:center !important}}@media (min-width: 768px){.text-md-left{text-align:left !important}.text-md-right{text-align:right !important}.text-md-center{text-align:center !important}}@media (min-width: 992px){.text-lg-left{text-align:left !important}.text-lg-right{text-align:right !important}.text-lg-center{text-align:center !important}}@media (min-width: 1200px){.text-xl-left{text-align:left !important}.text-xl-right{text-align:right !important}.text-xl-center{text-align:center !important}}.text-lowercase{text-transform:lowercase !important}.text-uppercase{text-transform:uppercase !important}.text-capitalize{text-transform:capitalize !important}.font-weight-light{font-weight:300 !important}.font-weight-normal{font-weight:400 !important}.font-weight-bold{font-weight:700 !important}.font-italic{font-style:italic !important}.text-white{color:#fff !important}.text-primary{color:#2C3E50 !important}a.text-primary:hover,a.text-primary:focus{color:#1a252f !important}.text-secondary{color:#95a5a6 !important}a.text-secondary:hover,a.text-secondary:focus{color:#798d8f !important}.text-success{color:#18BC9C !important}a.text-success:hover,a.text-success:focus{color:#128f76 !important}.text-info{color:#3498DB !important}a.text-info:hover,a.text-info:focus{color:#217dbb !important}.text-warning{color:#F39C12 !important}a.text-warning:hover,a.text-warning:focus{color:#c87f0a !important}.text-danger{color:#E74C3C !important}a.text-danger:hover,a.text-danger:focus{color:#d62c1a !important}.text-light{color:#ecf0f1 !important}a.text-light:hover,a.text-light:focus{color:#cfd9db !important}.text-dark{color:#7b8a8b !important}a.text-dark:hover,a.text-dark:focus{color:#636f70 !important}.text-muted{color:#95a5a6 !important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.visible{visibility:visible !important}.invisible{visibility:hidden !important}@media print{*,*::before,*::after{text-shadow:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap !important}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px !important}.container{min-width:992px !important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}.bg-primary .navbar-nav .active>.nav-link{color:#18BC9C !important}.bg-dark{background-color:#18BC9C !important}.bg-dark.navbar-dark .navbar-nav .nav-link:focus,.bg-dark.navbar-dark .navbar-nav .nav-link:hover,.bg-dark.navbar-dark .navbar-nav .active>.nav-link{color:#2C3E50 !important}.btn-secondary,.btn-secondary:hover,.btn-warning,.btn-warning:hover{color:#fff}.table .thead-dark th{background-color:#2C3E50}.table-success,.table-info,.table-warning,.table-danger{color:#fff}.table-success,.table-success>th,.table-success>td{background-color:#18BC9C}.table-info,.table-info>th,.table-info>td{background-color:#3498DB}.table-danger,.table-danger>th,.table-danger>td{background-color:#E74C3C}.table-warning,.table-warning>th,.table-warning>td{background-color:#F39C12}.table-hover .table-success:hover,.table-hover .table-success:hover>th,.table-hover .table-success:hover>td{background-color:#15a589}.table-hover .table-info:hover,.table-hover .table-info:hover>th,.table-hover .table-info:hover>td{background-color:#258cd1}.table-hover .table-danger:hover,.table-hover .table-danger:hover>th,.table-hover .table-danger:hover>td{background-color:#e43725}.table-hover .table-warning:hover,.table-hover .table-warning:hover>th,.table-hover .table-warning:hover>td{background-color:#e08e0b}.nav-tabs .nav-link.active,.nav-tabs .nav-link.active:focus,.nav-tabs .nav-link.active:hover,.nav-tabs .nav-item.open .nav-link,.nav-tabs .nav-item.open .nav-link:focus,.nav-tabs .nav-item.open .nav-link:hover{color:#2C3E50}.pagination a:hover{text-decoration:none}.close{text-decoration:none;opacity:0.4}.close:hover,.close:focus{opacity:1}.badge-secondary,.badge-warning{color:#fff}.alert{border:none;color:#fff}.alert a,.alert .alert-link{color:#fff;text-decoration:underline}.alert-primary{background-color:#2C3E50}.alert-secondary{background-color:#95a5a6}.alert-success{background-color:#18BC9C}.alert-info{background-color:#3498DB}.alert-warning{background-color:#F39C12}.alert-danger{background-color:#E74C3C}.alert-light{background-color:#ecf0f1}.alert-dark{background-color:#7b8a8b}.alert-light,.alert-light a,.alert-light .alert-link{color:#212529}.modal .close{color:#000} diff --git a/dist/favicon-16x16.png b/dist/favicon-16x16.png deleted file mode 100644 index 9fe8e41a5b1e13f04cd1ff0ed144e7a116441a48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1265 zcmd5)+fEZv6g?mqC}2q>a)~A-#zw);oatrSnJC!WtJWc7@z$GLSo_ri4P{c`VahqYv!O%FuvQIz1P01eVNm9c6?MW<;Hw7K0?S?A)l@Q z#~m5E1bsW?Uj_^q$zqa_v*RP25r{U3XkWLIOPvR=BZyEy&sU0s><535T||PH60$>G zdz}!~t(a`{%+fthDnF@aVEz9;zBcq-t>u0Rk?l%pncV-K2=}I}x zJlGz0?896?K)l0K7j%;QC!c`RYZsEEJ_H^?>T}MNzmJU2$bs`v_IdI$AY10P2JlTd zl$ZqNKCA52v9`0T>yuk{X3gHvY^LfR1|VT7B|UK}-Fj8o01}kcYsc!~kAuc3BN&usyAsP!w;lPq42O75B zRzj|dAhJY~W$IR| zEB^W8L|uxo7>h(?MUT^{q-&H$^_m=xDhiWoiX@;yz_!lg#hJhqQpl9juv6<$KLJ-? B{qX}gB>QvYv2n(Deh5KpL$#%voSN7!o<@=8>XBrOv5mnUaWi6IXQ`Uh zk9s)uclEa1 z`StAGAkDGug3UPTLD&~K+Q+l*HN<|P2rK|gKpU_=1~&?bK&t@9tuSO$n`oPy#t^a3eifjx1FXBTd{yd1VZu_GoB4J@V--@}(5q zjU)Tv>E?r%;kZR@268kwn?N907@&i5>q^mWoVJXlF-onIfFNzUd!L@UF60>iHa@4( z;YoHr8Rs?lt>>~(^MZtn=dL0o>-JFRDbUK$x0m^uOTks}tv7IV@Z&;1O`#gBF`9>` zAK0P(A*z3VpPHeotpHoE8t_iLW+%Ea2i~B&FWSWeXFw}=1MuCnfYS!%?aTtB&)W(- z1S-H{P#secVbitApHE(MehY!5f!#(Tqt3y;Kcy2N=Lz@JhRt=jb|A}Z3A!Te`q(i} zxZnL8`34hK=wUbw58;9pUbL1q%TV=-fxtYHJmQwTZb?piB-QIvJ%KBdq)O5VW>P=? znp7w)o7wffCvCr*A|~CWovNj*Ro5y8ix#w;5z}&}zT)x=0b#_gxUjX)Ee*S6k1HYj zU3tqYtD;!1*9DW*0MtUMlKc9IpM#yCHPiW8A)~6Hl3ptqMN3s@A+9pnzNv`aoyz9k zs+u>&(ah zSt*u=j>*HaqIms2KRumEemDqw9P6db4TDJ&6MT@K0|fI9!CW%RvgWFRwuptIwOY!F zS#8bKOU0_V`{6`g_8P;6*XvjGfaH^PO_F?i#_#bdiXmqdS-=bdr=@>QuwLxKqTzT5 IeBuGzAE~C&Q~&?~ diff --git a/dist/favicon-96x96.png b/dist/favicon-96x96.png deleted file mode 100644 index 8ac65e1444f6793721260147dfb44574dad0b609..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3877 zcmeHJ+fS2c82^xiiXbQ`0!l#y1%)0dv=fvH0+zGoWDqE&lv+v=iU_S%<=xvyK^#m8G=In($ zc>ruMcON*PHE>qMHW9)rAu4o76|^noi{SgkS0rMWh~feRl$~Q@B|!|kz}DA_qXc47 z)ShmUSt5?7h}<(^JO|BFng$*QwSiheouCO&ItYl0SUwCH%6R+*#M3M8XYXy;Jr4B{ ztKA0zQVYSJT(EbYfi!K5)IltP>hGU7=LMhuNO{t@yQN927w5&bakh169z(5hVpj<@ zpsS3wH8pysBvkl7PGh!c9_Cr4J!R9FtH<2Wkya)FXwGiRE){iGqo=8{Ih9v1W)xSR z2=K^=du~tRAT+z~6Qzttw<>~o{z0=0fHPG9Gs*NY*~h>Aqz57qOKTJI)mU2T{cE`g zmnLm}=h_jf&OekmD>ifB|l7*_11F;Ru{;k^bv* zK-_JG*_-FO0H>(WX=Z-a50xs`da{gFC^h4rLj zIlZok-2MG6@Ey`Nk4oJe(!=lFb1utOuanl%xuc=k@hkk`OovW z4nqj4Mur^|>=7Zh1)x%m(Twc^i|m#G@I!nmK+P7B``1HeiOzSTRB;rpZO>9XB;I`x zNuW`dwtyoMUUGx(5+%UT(2=zi;~RYqY_)Imk;OnfI?tdxptpbo$+`xm{o(uIjpDM; zusjSPMsF17f=a~CU#iS7xO8eIc}T{=(@)uW8LHE$e#gEs3gTx8{3Vb)S8PuWIFqPK z^axad-^mjIIcj&6;n7ra3$LR$lITg)A6)L%%{pC!vNzEXJtN+}JH+UN`01+XrCUXs zAsnKzY|<3R8OvOz`4zPQ_k620(4BK{cr8a_gB283gZI0#n)B zqkEwQK=tltHzBq@xvq~K`{Topb%Ut{=5>dzutBIIITky@yI9MjJp_|?akg#UNeJL{ zNY&pfm9~tL6QzdC3`m}h{XxKY!OT7Q6s(`i3m)HqWcoTATs`%WXp29?>_Z9(0Ko6d}BY_akVnTxsLCsL8sYyYUy56{LF9<|5i^>eH)v z3y;2mBNqfLRH~+jtWFSu$3swl$nxHK1=fsRmqnEiK4Lkzrxi5PWwW%Th^kmZc#!w__d;4hGl)$tbS z><0Wj(NPVJMVmHg6`yL+N#~Mbs~R*I7PsR+ld@>@V06M8^*eoYehAHCGS^j^tW_qn z$6|6?ZB9$=ev`>*GO@&%-d84tBNM^NrT?D9>jq{p=_q%ak4#1vy>ou8E$j{WJG_CQ zFH~%=uC1=Cauj20Ta~G%%4{j_G24r$qS0BW(YUy{SRG_E2+`G%xxkBeI=c}(ud$*9M(my#8Quu8}gVTPb#TcH6PDcX9N$;7UFETT4T)Q}<&usPA_^npE s!&hsvnSEZ9$>tlkTWk)8-#qRxS7SysPRqUkFG5y+(G}JY_ zioih)jZ)uzBpyO_?m1}+Uw|s}7+4lc?FaWq?1?)sM?$4q&>=N=K1xra)m#Uu-DmtrsprE|&H( ztGg*i#8s%``Z5+QDT_Qk%VdBsA3z(G_Xg0?d=lyvsgnnln# zrwI&HAk`UEDU_2?XkMWdvtMa(!EEbTL@Gp@Md&iBQ&nL9{^b4JQ2ooVo&~?UC7*qZ zxI@r6D)0s+F4)`y#v?}km!E+QS}WD3my2BNvRVR)O<@85_5>&g7h&D}7ru_$3sfT2$QbdK78`;;ihl$f$)j!F>NQu;c6d z&bRU01eZb(=$AsDI+t5Ka$>erP&xSU55VY-p4-r?Yu>WrL|=y=C}ik-v0$e z;@yT)L-kj!zsh*w=`{;B)U}}IRzGOfNGBc7cNi zqynFpx~e_y)9#GkvnYhi*b>r^Hw`dgX~>)lU=}g*nrU&f!~Oz;>Twy8(VyJ`DU*KP zKrp(J!FFcQlP<-AU90)GN4|$z$h82(w;nFoDm_g`_j)wD>zEiz|Lxlk$T5N)y88m{ z#aTNyULoj0_0ueoXo9F^PK?N|buL3LMPbemijUuVfL@(X_uyP9(k~pKiLkNm`a(!m zC{*a(FKoCRg*p)hluV>5QJ~sgS`>5!Wf8sq_m98(1?ieYl$WCzPk_|wipefWxy-JK zCkMbQ2*7Omp3t4Iq8`dSo5Rq23>3AWme|%H5VA$FA`NqI;=_Ib5jh*yY!L0P)29B}J%qSO*g5c-_*Z z{e9aKm0Okp;K|(73j(UM;VOHL)<3)%zGAPv_qt+K*?5b5B(t; zr3u9qlhaOG2e0z7mufXdXuHfbc5?6A&(srKq5gt*?t?`45b7c5X0-#2A?3qou?C8; zsu%UgPtku5#NPS(-NztMt3DbGREct`x=|X}XU(6nuI}Jlk4iH)<;?MuH$Nv0@Pt)K z;CFuxW?YScg7%?QR*MYo+HFbY4&pM@D~C-Orfe!4ib6R;NQBHKJ;&;>1f=ObGtm0a zUw>EnuAe)wY8CDC#=WOcpd#oXUOhm@J(ff4L^)G(Ex&~R5xN`fTyLmVVdz8)ps7>yNmJBhNGgt#BqWlEYos6Kg=aD$ljnA3$``TGqJDmZo5OMi8M z4SGH;Mu(yw3mr$*1}~j`;+9c&2*2Wf8FR)O4PgmNVa)YTX7#?e9*BDVTM%eRI#NU` z6T%jhcb}zE7ojj05E)QjQl!Cn&hMY-{L|N6fy-mPSE!Yc$!l+Zu6*&r#8ULV{x`-> zP0b8dPz1__Dv=rKJ@knrX}``a@d}j!ao?E-=1Aj{?{K!5t;N!`c!fwq*Pl-7(3Z>l zR!HOKvzLo=b9YPlj3^|{?Ke|&yfEu=js&JweE zD1sRT&Mn0K?&6%+P!7^nuQi=v4AT<%>|B%pR=_TccoL_MG?z7q^Ihh!MsOlfW&i$0 zk+?i)|6-%NG{JY&b%Wph@tza&yZ1w?=$Z51|L{XjoLYYE;5NL<% zf)~quQTJg)|13Z$JKD8+DfNt}5}8NAKrTbky@gtrb5+nLly`qX#4ns~%lzQGLpdp_ z=V%|gucCn1e?-Jmx>%CP!mmfBLfC6{U1q-MV2FWC?s)MhT|AE(zWIP0*~bRG7!)fN z_g08fg~FSx!aOi{GFo!QbWYH+2F%QqCBw_4iZIKgRo??vbC9Znc!BJ!6Ipl?^2eGP zo$cMnFZRc~oOpGj9BFR3^EF5Vybcpt(6+q`MW9zOj1Qsgcipc@e|mRg_gbTU-OcBv zGh@RQhEqBUm(Du<$>-(3YE-nyzy+}Ap+1ooZ#+?L_0xj*6+5les z;*+=kdiBiKvsp*WO63T6MsqctP3KQA?yjMO(42j|Av)K@ zZB0ihdhcOyQ2Y62TH@}{FE5X8pHWqqCf(oz8OhUjb9^HQT)PNXjsiL_75F@JDd@C% zAkZ!DK{3hj3`Cb(9)^&YJamA$?B(x)xi0DbHIVjhHKzaMk*hu2Q|mmi9cEpK$D8Tc zLc5mG-}*Q|sDOCZwhbA8VF{vVo~Ali*ECAcPN_~yC46Q0(23~Te)sEC^a{%K+rO3} z!Z)KjiBg|wg5i^gxX>&V?)!i4`}xmM5tc&Z&Jd0FG(ZHE*36E&@x*~Xs?#0=R)w++ zWeYJrx3Cc0brXSl6G|?MMFedhTfcpVLD@uGG@&H151BzK;dj2=2Z3%WbX}^|oFf~B zPPYrCjS~nZ{q9%Ho*}szw!o!sS6rr4l}bM-n<>;ydP|8W=jZ z>CU&M0p1V?#!VhWS)ax{3964K5-Is$VVQMtT)pR@x$c)8&O6$4<8$Z|;u?{(A1I}F z5BR6HORK(juhII|uh28wXvkQUn}m(Q!l`R-{Sf@aFM$cUuFMb_Ub%Ei${A9#3VGu} zaDs4s+J5O4UjN4PG@nowDuQKEZ1Kn6lSarJ_d?jmTUv{fT$cjog~lwJ4pe0w%$Na@ z?wQkM^+70z8(^@#^c#C8a!7brTwfqJgI|8VlZdOooCN z#tp1kb^68s1##2b>|-aEGLjFVxE2_?!$gnJA{TZQt4!*>a2nnDZD6xemea{{c-1NE zsJijoDhQz6uRKgA3#D81&RMuudhx8CH)NnoTfts^gp)K4R1R&tUk(eWZxl1861kgG zy|hyQ>yP9P%w4;RaIbC$v#0?QcOX>Rh${!vFGr0rO!2&SQHC}@VNp4|Wb{HX}$w60{(m`2q zL!p&`b_%@%bb*-%`q9tmazZ(lR1E3-#uINoikf?#&+J88^ImKfy$jTr+9$%%*ufV+ zdj~FDqDd0>E_;c|1)-b3rG%2CN|!3`0%|J2Wz9?(t%NXMXSAYd)2{Z5K2)vc}!Gj2`UhMw{8nqSmCr)B_=y3^fM@guCJp}g?Pc3 zZne129GYzK8rLL;+ELy90$2+D$Dkil^1JWXq1m6%&K;ITbA@Tl$3oXoz4Xg;X|y$> zPAr;zqJKseVZ6js22+R(dHY_}ePJ}9&~ciD8n}|!OW)ri-2_93>Y7BgcHL&PDWuu@ z+yUCAxvpNuxlAG=_%@VFn-=w;D&q{Gd8vbsCD1r<lTl}TX6 zSs-mk5&F}^k3*nl4bpLzS2~ah4A;rq(4L>Vhxme;GmRj?p@*(ox@@3ajti%AaX~5~ zGz74;nGr#o%t|Igq_e){Ou_Vf4od@^4lXo!ojTgQJS{7oE(5BRDxqlTjQ75XzUn1| zuE)4+JII8QU@{5B`WL^%tz1C?HFq@AhYK$s1>ZX(`Q*?*UfE-KFt4&dH!12oB(^}i zUw`VOZy!7j~J~9DDez65R=g=1iue#jM zDwOK9R)z$FHG_%TB6Gtd?YTP*4ASImjR*T9q6Z=%tsu_rA*Yyas2jIL)r4H`*RnK? zS=6E`k%;wmvO?$Wf}#L6__R^?Lc2*G??*dhX1wjb?pX~ z6f}v$#*=UUEV-j=#o$fEg)nr2R!epEVu6Y9#puZCSR~!)tz8guKl(9v(zF{-aWQ%h zNPvdG6W;upap#OyZZY?xpIEwYK^tT_ZSLM!Gz-_p4Q!Po1{#yLGH0OI$^($YQLf(o zmF;y!{TpATGcf`|sVE6^=L|Y1?GB>JKnGBIqME@YkI>CQoDW3!iH(qb!IQ};d(pe^ z5LhxwIXBo5cH+a&G3!^N%xhin`=^i8ZH5Rk-q^~_l6!&MzY@|ehw3V%wl0$4`_^|8 z_%nOt05~Hr2jwbC<)XKrT^BcyN5?;f0@^Rt^}#1h(qz5>F-r1LDz^=80FCQ3_nP$P zG#=aqMqd=_3)w)JKl$#B`{iO%CH=I-2VVs{!@ZVL!>a_RAH`0tSibeOv(op;w_pAZ zr204RqyEMma)>B^7*?OYoJv3V<pM4A?_ zf8&QD&!cS#a>||Oz|Tl8c%LQJA2-US&{2}6t+`78uT;(l$4eD!9E6U}h#bF3ltcL3R~bYAdJ9Ek6bxMoiXR8LlO*aOw8LORv8E_w!Ah#-eKj%?7HK z%D5%bIiD+C!g-}&76sLZq$G({S3^wF-~I<_&PbDb6TA_U>kS+lxVrAGr%=(Ot{lDm z-ru1HnK|O;58^A`p}p;M(|SY}PQ->TR4c4Q%_1$L0Zm%lJpDQwcfYa;6>TllWl8J@ z?e9xq3L{3Zx~@8lE@v_Ex*P@dQJ%qE1^QIlrq9l=*?YVibrKC+7QK+3$lPrFzIFj* zq3a2SgtsSx@gqcgf*7C|8L$kZY?L8o&FNPY(aW?3nv0T-vIQmk+&$E^5XGVu34OEH zp|vU{F=i{1L^~rAw3HM4{;S-pS>Or{Qh)+VXjzhzcXoP2`1;09=>d0zIJe35L0ss3 zIT*c#P+LUxd(yJ3HcztX_A^l;CvCk40+kYqmWrK1yYf+=VDg;a3symwBBUT%ek}@@ zpN%3^)qDClq&I()Anj99F>7vN2w&RYAU)v6X~dnqhw3=C)uafX{ohYK4Q_vF#7-AQ zn4Mc4Im;lHP2;ukwI}J>Lc1dh>6S}6dXLdZa%drg`-b>U1yltz@Ts8QR`u$`o6~tH z6U7B{(ZGs=x4w+l&Y56Bt+ZI9LA!OmbY|9Gr17rMlH8VDAI?P7t?OW9@)QuAiSve* z(p!Y)pyD1t-6+IjewVc4mux+7ZDnsaT=vvn*lAA zYC$(G*L)T1-0AH}(kZ-Ns_0&qIv+fT=I#cQ(_)q!q-4T#MgB(S2%%e#FM9vJvKXrk zA!Pf|VSE3(&(1}Y3e z%--wh4WKfV4;}~Gy>vS5*^EN#bIaSdfwiK%_6x90D8^s7xw>4iH}3}n?L9bjEoAeY zTpYLt75;xedGtG|EPDGfGrW(J(wx+ab#neuiWg8Uir;>*T^eh-WlowJQB%7R^}rk7 z02V{`B^($EigL8(n-I3nSZ|^%f&RhBUomIxJxrxTiL`{?0=g^}c*&W@f4=Xb zcm6RV3XKYegwUKk<`AxE06PM4cfr}koR|>>`sW`H`TY634D`J6{E$+KXh+4cSIDJr zWdryBKVSXT3*o3uuw8`Mp9VJ5gd-vCUj+tQLOB$SU~$fmpL_qyXHp>SbG^u?n(Q{G z?))Q9O4|hn$|(lRL&-WV9pGF|=wI*q(HW}&fo1_U(-!+h7H*uoY6Y5~e4_`v1tl6~ zCCb|mfi-OD{lf#O^HF$1A@uTB>0&M1L;H$-;BUA-gwf88Z@u*-UAz!Qhh^-w(1uYcjs2)#iguy#cE0}9AHK?&K<%4o zb5L0f_ZQt9Ld%}N@g?aMzS#_Z^HHA82K|9J%%}a9=YtVjLIEnc{mt5L5nUHz)fxK(9Y2HND27I!oeq78}R@-IK39yZ56X>~=k5Mt?=i$%fh^XXqL;={G_q9;9K+ zj|O$ye?oex1O03J0aUD-Gc(H}8jVsr%T<{-*Uq z8JLa6Z((8LZR!Y`hr;tBlfZZ;ove8l7^sKWG5T#g%2gB)6=WFFRkxsYWr2Yh z6hcjn0}M$}tZ~iPUO10d`;l$S8SQpj-~7%KLz|}$z3~mO6#B1Fk5qGSKMa9a%M3cw zx_q#sD6BzyQJO>)-nnQs9pe0(Pk`S;r>4?E>Bg~335*c6fAu$D066W35IGE16MLXz)%-8z&9iPixXqP+5q$R=uyGpxIO=D(i({60B!=PyvVG9~oR+REq`;3R;Phio#qDdi4dV!5dNX+HRV>!3giSj)}0% zYS(bN_r4Ftvn=}LafsY{%pNe7$WXAW|N99l4O%M|_`f~$9@at~qhR z8X*F&jBCQc3hOd^Zae{j-e62~uzV>RLM4?a8GAx4odZPnpmCH=28^*|2oHQFF)%9k z9qPD@`r3(-RmLu8HME0upqxShZ9tj7^~8~CX}VsZKsjwsy-a!oc zExV`{XnQOeZQpmaU^c3AC?F=ova*A>enSBi8MlYJwz=+jc##ENmkOLS9z$7ZjA|X2 z$4-=u(!D|&bRDUsZ7sUCUc_`x4;qllTt?r#zrK{4 z&7RBPy7B0ckN1XcTXE}$Ce-&g(W?zU=k9^bSTo?vgm|s7AvBUx?_#b7&Fz$WNh#{r zo}Au(P}<;!7So&y=|LrtmtOr*UF&I+Fg6leLd=XQ)Decdi~V#_V*28PUTE7?5d<^4yq4-w0fJgUVq^%1QQ?3AxFx=m_xU_9C{xlV=YL9yn$7f;h+7i}GiS~Nk4UEzypE}vhkuuVhMg|j8ycQ0G-@0GA&+crewa%b4(9u5p zru4U*=xb;yqT6-E?s0vBiJ08@;iW%3Y@7+r)AN?pw{5O6IWh)4pM1x7@RF@3V(D(@ zT=z^SHqbU+1PR3LFap{RM`jeD{;!7~Y41brGAe4&#xSYNQ2pT>w1!0&*!qvpeMdSL zR8@|KN=<<5`5ldfEoP67;KXeOcTIKzE_=!2jLb1@nG zm{I~=s!)!d+(1hTF<8PDpQ}eTsD3}>&{#%LE((b0aylj!&VF|$)XM$60Z&&L|dqhfwQLkh}F@+RY6_#gxVPFDJ3aPa&FwmbjH8Kr0h-M5tvx1!Zz9VGS{!4si`*7Q~ZV zHXNXn32pA0X~{2t>(;kZm~cLRXfb$(G4$X+z!Y&KMJNWRFcbL30dYWR6Mf5~auX3V z(35qb6`bR*FhD>Yy2tp{wFA4F8)8kun;9VkXe^;DqcQlQJNlSpa4nygZ#QLI_DaTY}Ua0w&a&v_^zx;|10c zOEA$#gMoIv_7HgHLM{N>&;^z=bnY26`Lb{u3NywPv)wAj!G=7#YbMG&k1s1g_1d%f zeW*Z5DDOYOvxQ7{I)qkjM^qBG4jS@yBE=~|*BgyBFZC=zGfR3Im>~KoPtKO6@$e03 zRZ0&yTQtOmYU#Qjy~#w$wB6EL&H$X_UJ5$XEE4)DRhhK2@oD=7j_LjWEMm6Qhx0(Soi z4dtu2gal^v-d=O{wGU8P5%4Jjff6;UryyW=h7~LL>e7zPym`D?uBkEiU-rQ&D*|3Y z!0vA zJVC${kJ2&DL0}}Cwzu=i_E`0diHX5k*RFlW1NM;?(*7xoz*zl9$4@Q-p19)d*?i+@ ze0s{cm6bzp40*DmjtO)G#^)`1)?^{ziN75?b_~NNu3=ah-?iW7`Y$9;*3~hAg+O$4 zG!#}ICZ>8;>;Gj2ZlB|KY=jM^{FVDgugtA`r9)q^71~?;~YVU-ZjU z&`q1nf8hiz^15+FKoL*`>q@)Na0*XMOBQR^$ENsE^d?@$8 zadG@YB+t(p-^gjxreT$J>-YsvN{WCYpa=vC0*4OqyW~92dl3=livvG%gDY3^yBdA* z>0);c6B9r6m4TnBk9H~oihv?8xd@CkAC6Vq9Xod56#2#&_dMy{9?Ac;wY6haQpYO- zihv^EMFci(+=$sc&u`eBJSll&83R_wMx~Vmg%~pa>`eo**#R ztmVm^V;$4e(}PpuZ#)u0YyL&@B{(53-vrZ`Tu>T>}>ul$XK6R zc)lb1$VH3zb0yu~-JU?FV-x{JKoJ-P0efy4U6yz4N14iRhxYB`@6d&Z^XJ4y*LmVc z=gysrRjR70{I)w?ND)v30v!SQO%u=aPibkX1GjwP!UbqG*1dSXYx_ufep^yf;y@f! zB}G6Hm|O%T7uhq$=(2O}SI3Im;>G-l(9w4{@uT`Z3}dy6j#mVN0fDi;vaYYMp8~LC zW%1{iC!SYFnql+ipP=24w^BsA2pdHHJ^-Q37?+g>)+q;93Ope%cq9c$rS+y zB9M@f0IdQgOHA(F=13^%yHpNzY*k4S@Hzs$y}g)oq&(o>FQ3o!x*DTQ=>Mmh?z{j2uv9S#`=A#6%`de+Pm|!qCID7hV+pe=(LK!q$42T?_`hn(PjB$skhX2 z<}2vY5s;($D%)E=pz|mKPD4OmDSMI!WQ_bO%2;>dpU+ZyzKijV)OTveYIhy42sjym zUAuNcJKI5%AWh%?k?)v9u>SBoN2wQ^B$Nm5x^g zoQA-vRjZ(q=lN&ZvSk?WoKFdQuKD;zYL;`F$ErSxz*rF&U+f3ZS^8eaSUpO|D*{eH zK)y>ncrw-acB=1CIKfv{2SvaW1UfrAF>HL19&BgnyAPgtl#WpZoPfYsKY<)<+04FQ zee&i6k5wHMfsqiXtgOT#d(5glIs$sPHj*!CzaroS1V)cvJ?f5tK3j8w->MFZfE|J0 z`GkghMw&>Ez7uNqB9#>ZCm=A^PvlM{15BlJ^%AkvEa3WA#T{t#Kef`=iNP61x@&(TP*PH&S<8zE=#zPWdate(oCuVbmU=N}{drg8%(e6r5y2Tp zx@&(Tpjpei*-xKq`O|xKt>8pp|Ni~hxOXErm}k>_t>BC!-L*dv(5La<&9VAi%b(t> zYXv6)datEfD>yx0cOAG0=yNUaW-Wb%7`U;Zng8pJpT>JPYw34B1ZN!SuKkICe&>UCvsPYSoK8^Qo*3$2M2ne@VB?B4(z1PyL70?c>$_F6= z`drJqSxa9b24N8Cmi>%?W-ZNHes(!sP7#3fJl7(}{dKO<09R)!V58@a(en?8;AvjgjLL5P6fYk4=vYSs$E zAkr=S83Fz8Y42vOq^a{VD+4*Hgodgyg%JqEyyu+Pup_-UG1gpXAFp|D3Wu9+%^?T`%In;~dT+v> z$Hppa-g8K3s2Wok0Vlt&;hg)rW5dm*B#{>s*EBqwGlXY@E|rgzG(HHJB$TMfo^n-nM2}M8= z@EieO=R@bb^7ZGt8}8Z9y~lGK=}1LD5%4DhzIeSH%IwvLvzMFhZGdtmP;O-f6^d9Ft^&Jz`I#>}<1f~oEf$}`lJ(qTOcTX8B=tdL)MIcZR z2;7`Gd-m)=0a^7_1QdZOgFs+C+jPI%tgfz}GPcl-C<2OrlMx8?Y&mb4=ia;PDFp+N*@qdohr<#H2W2&9KoD?FzTLcevl>MaPy`f#AVFZVo+m^`Mg|GOx=lqu5l{p? zLBK!RSl;craN&X{D(M(SKoL*`f*b+K%+sb#0}c~^-aCEzbj-7I<;oyORkyDQC<2Or zKM|1sDa*;p!J_h>n*7eY7OE?2q*%IfFhs> z1Q`OE*l!UEZact3LsG%yAE?Kg~-l_7R zMIab_L%t*3zSB8#<^Y+C7cc%t5>fA zoCOOOfV+<$sV5^NBRC<|UHb@uyu7^6^uWuPFMGJ6{KEA}9_!v89UYCCJ3Bi)oL`42 z0(J!4J!<0L0#sB~geBxY!F_)Bp78K+jF<0(x9g^|B49^AK9A(?KlU-+lB=q!FqM2J z%6&!m9`W{5r%riG0i9>cAmHvT$;run*qyxR=)U?$J;#q9_k&itg!2)QdjNMo@rC9m zPoBiI?rV9{BcEdRg;qMJ^AV8WXLt9LO`A4NQ2B}Yq+K7)s1r0qK%egZe^PRnIMz+c zU8UWxCN68{9IF)qef<9Y`>_Rg&pC4B$S7O$Rwi^`S9&x$yEEvubt?IoeJ|ei6K~C?`OR*lK$qpy{@(Hp@6Mx{EzrG7zR|+FUg6!@G@Avw zkGVeq_O6Fad^Yv5K=iS?x;m&maqIhf2KBB$^saN~&Z&0=qTvEUXXoE{NmkU{6%g(; zOi9gM!vN8y7ZK3hQuuJQ12QBh&H{5fO?k~!PKdS zA)wwh3=nO45drlsFM_F44MRY^YZxHf^dbW4U0wuJry7QUde<;OwCP0z)VsV0rcN~s z0rjq7fN0Z;2%JBE9<%xS(^(UrUq2(^MWg#|D(B}e`Q*Rf0MUiKj({^WnEI914egK# zos-kl#~k7kep6#|bDekn?b4-7e#1={@)iRA_dxG@o&8%l^fiUIyuzRJ_{Rgi>vi($ zLhi4Ej~zSaPv~?luOQ$%5A=`M+5J#+pjTYN&y#r91O4xHb`R|8>hd#sy4=JOn79W{ zuGfhN%6GL*91WdevJe=bA3DMJ!~^A5m?sN8UDvw^cru8y^)?#+wTv@ zCkMp#RY}Jp;5*M;ym+x=cdd#!83EtJ zZf^FqJ34TF>>gSFL_G|Zwk!1bcZ7?{7-0j$XK(d6~soVSQaza8v zFn|+;dz4T0iLJ#G>>ymZas|z(s3>r|KiFk?b$9mcS^J492Lu9#4<8<8*^3u1dZ_ub zWy^-0YxfGtCwunn@o+XBHn|9dhK5?!oHuXY1eMvmd9yW}-77?vwN|fQJ;7D%GrP;`2@{0cE2qoTHoJAk zI<4mxx33Z#8#~s8biCIQuv=vP`t_sCKRzql=ht{21zw*Xk~=-SE#&#_#BFMyQ|;?h zBMzIqzP=tkcKm%OYpxy!zE7LpjmpuzLSxparo`m($+OX|;N7EYQ(xQE{uIT#wi{_S z&A`5}soe37gt_nfH9~!1O<(_C&`AEE*7Sun?cWwU67s(2*G%gRYsSaNV_IL>YxFtg z^QperQ83S`nRY5!f3h;IUN?Q=MQTl7pgLJ|sx>DId0(tMS=Q8hT3=XmvhHd1y6FpR zPF8HHHK&p_HPiaSnv<1j_342xtf`sS7pP9woc_0FYisLdZ8k{O^>x0L_fOl}+JXd6 zr)|@BF*`n+>i0YQ!b7}koEa7iG!CfUyjx7(K=RH?hhw%3%c|K5g6&te{@d}yZ7|;OmKBQ z-8l%jzakjP2lR6V&as+*G}*CZ2Nsg2sq&3&@*R)cw{Q2N0`NEen?wZo4c4hBMJU!c zSkE8)?rIns-(x-a=lpN5hNe*2KinP!vZ8Z-H(|z%8BotZ+>S$PYU(ij=gysro`!}7 z`!JQgf`E9P+?NTL9?90FrKMh3B{(OM*Tn9xbuL`E06^rsNbPwhJ3Bi#fg01U?cWOQ z`8T=Bw*uSImRB%iS~^Gu%lDzmx66-p%W{?-XOT5~mzS3VOhIE{U|sSjp58Dq`-KjNYS&jgF7|QANxhlhJz= zvC;8yKdOkiV=_`tPEHQ)?t+0Pevc76SdHWlw#;-){SaGw*`1n3QK9b#? z)<3!*dXAgC4{OIwWOS1y65bC`eB2U%mF01wDV> zF26cSzxP~KseZ;bH#6LGM}r2g@9 ze)w3Q>$85==lrIB_UHWMS^P*?jJ01rjWkwnUj=HT8Cch+l#~?v79dwwSA$DNYiw*B zcGL;YQ>RW1QzJh=A3cJ_S%<=xvyK^#m8G=In($ zc>ruMcON*PHE>qMHW9)rAu4o76|^noi{SgkS0rMWh~feRl$~Q@B|!|kz}DA_qXc47 z)ShmUSt5?7h}<(^JO|BFng$*QwSiheouCO&ItYl0SUwCH%6R+*#M3M8XYXy;Jr4B{ ztKA0zQVYSJT(EbYfi!K5)IltP>hGU7=LMhuNO{t@yQN927w5&bakh169z(5hVpj<@ zpsS3wH8pysBvkl7PGh!c9_Cr4J!R9FtH<2Wkya)FXwGiRE){iGqo=8{Ih9v1W)xSR z2=K^=du~tRAT+z~6Qzttw<>~o{z0=0fHPG9Gs*NY*~h>Aqz57qOKTJI)mU2T{cE`g zmnLm}=h_jf&OekmD>ifB|l7*_11F;Ru{;k^bv* zK-_JG*_-FO0H>(WX=Z-a50xs`da{gFC^h4rLj zIlZok-2MG6@Ey`Nk4oJe(!=lFb1utOuanl%xuc=k@hkk`OovW z4nqj4Mur^|>=7Zh1)x%m(Twc^i|m#G@I!nmK+P7B``1HeiOzSTRB;rpZO>9XB;I`x zNuW`dwtyoMUUGx(5+%UT(2=zi;~RYqY_)Imk;OnfI?tdxptpbo$+`xm{o(uIjpDM; zusjSPMsF17f=a~CU#iS7xO8eIc}T{=(@)uW8LHE$e#gEs3gTx8{3Vb)S8PuWIFqPK z^axad-^mjIIcj&6;n7ra3$LR$lITg)A6)L%%{pC!vNzEXJtN+}JH+UN`01+XrCUXs zAsnKzY|<3R8OvOz`4zPQ_k620(4BK{cr8a_gB283gZI0#n)B zqkEwQK=tltHzBq@xvq~K`{Topb%Ut{=5>dzutBIIITky@yI9MjJp_|?akg#UNeJL{ zNY&pfm9~tL6QzdC3`m}h{XxKY!OT7Q6s(`i3m)HqWcoTATs`%WXp29?>_Z9(0Ko6d}BY_akVnTxsLCsL8sYyYUy56{LF9<|5i^>eH)v z3y;2mBNqfLRH~+jtWFSu$3swl$nxHK1=fsRmqnEiK4Lkzrxi5PWwW%Th^kmZc#!w__d;4hGl)$tbS z><0Wj(NPVJMVmHg6`yL+N#~Mbs~R*I7PsR+ld@>@V06M8^*eoYehAHCGS^j^tW_qn z$6|6?ZB9$=ev`>*GO@&%-d84tBNM^NrT?D9>jq{p=_q%ak4#1vy>ou8E$j{WJG_CQ zFH~%=uC1=Cauj20Ta~G%%4{j_G24r$qS0BW(YUy{SRG_E2+`G%xxkBeI=c}(ud$*9M(my#8Quu8}gVTPb#TcH6PDcX9N$;7UFETT4T)Q}<&usPA_^npE s!&hsvnSEZ9$>tlkTWk)8-#qRxS7SysPRqUk - - OpenSign - Decentralized document signing on the blockchain - - - - - - - - - - - - - - - - - - - - - - - -
-

OpenSign

-

Peer to peer agreements on the Ethereum blockchain.

-
-

OpenSign is a fully decentralized alternative to products like DocuSign and EchoSign.

-

Documents are stored on IPFS and the signatures are stored on the Ethereum blockchain.

- - -

- Learn more -

- -
- -

Ropsten Only

-

We are currently in testing on the Ropsten test net. To use OpenSign today please use the menu at the top left corner of Metamask to switch to the Ropsten test net. You can then collect some free ether from the faucet here.

- -

Create an Agreement in 3 Steps

-
Step 1: Upload a document
-

Upload the document or contract that you wish to be signed. It will be stored on IPFS, a public decentralized filesystem.

- -
Step 2: Sign the document
-

Clicking "I agree" should open MetaMask and request you to submit a transaction for zero ether. There will be a gas cost for this transaction, likely between $0.3 and $0.30. Your ethereum address will be publically associated with the document.

- -
Step 3: Invite others to sign the document
-

You will be given a URL that you can share with other people. This URL will allow them to add their signature to the document too. You can use this URL yourself to see which ethereum addresses have added their signature.

- -

Further Details

-

This project is open source, the source code is available on Github

-

You can find the smart contract code here.

-

The site itself is available hosted on IPFS

-

We use the Infura public IPFS node for file uploads.

-
-
- - - -
-
-
-

You need to install Metamask

-

It looks like you're not using an ethereum enabled browser. The simplest way to solve this is to

-

Download Metamask

-

You will need to install Metamask and then refresh this page. If you are using the live ethereum network then you will also need to pay for some ether in your account.

-
-
-
- - - -
-
-
-

You are not logged in to Metamask

-

It looks like you have Metamask installed but you are not logged in. Please log in and refresh the page

-
-
-
- - - -
-
-
-

Please use Ropsten Network

-

This dapp is only available on the Ropsten network at the moment, please switch network in the top left hand corner of MetaMask.

-

You can then collect some free ether from the faucet here.

-
-
-
- - - -
-
-
-

Create an Agreement

-
-
- -
-
Step 1: Upload the document you want to sign
-
-
- - -
-

Please note that this document will be stored unencrypted on IPFS - a public filesystem.

-
-
- -
-
Step 2: Sign the document
-
-
- - -
-

You will need MetaMask or a similar ethereum enabled browser in order to complete this step. Clicking "I agree" should open MetaMask and request you to submit a transaction for zero ether. There will be a gas cost for this transaction, likely between $0.03 and $0.30.

-

Signing will associate your ethereum address with this document publically on the blockchain.

-
-
- -
-
Step 3: Invite others to sign the document
-
-

Your transaction may take a few minutes to process on the Ethereum network.

-
-
- -
- - - - - - -
- - -
- - -
- - -
-

OpenSign

-
- - -
- - -
- - -
- - -
-

- OpenSign is a decentralized alternative to products like DocuSign and EchoSign. Documents are stored on IPFS, a decentralized filesystem, and the signatures are stored on the Ethereum blockchain. The only thing that's left is the code that's running in your browser right now, and that's hosted on IPFS too! -

- -
- - -
- - -
- - -
- - - - - - -
- - - - - - - - - - - diff --git a/dist/js/app.js b/dist/js/app.js deleted file mode 100644 index de30569..0000000 --- a/dist/js/app.js +++ /dev/null @@ -1,62855 +0,0 @@ -"use strict";var _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof="function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)};!function(e){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Web3=e()}}(function(){var define,module,exports;return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n||e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a>6],r=0==(32&n);if(31==(31&n)){var o=n;for(n=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:i,primitive:r,tag:n,tagStr:f.tag[n]}}function a(e,t,n){var i=e.readUInt8(n);if(e.isError(i))return i;if(!t&&128===i)return null;if(0==(128&i))return i;var r=127&i;if(r>4)return e.error("length octect is too long");i=0;for(var o=0;o=31?i.error("Multi-octet tag encoding unsupported"):(t||(r|=32),r|=f.tagClassByName[n||"universal"]<<6)}var s=e("inherits"),c=e("buffer").Buffer,u=e("../../asn1"),l=u.base,f=u.constants.der;t.exports=i,i.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(r,l.Node),r.prototype._encodeComposite=function(e,t,n,i){var r=a(e,t,n,this.reporter);if(i.length<128)return(u=new c(2))[0]=r,u[1]=i.length,this._createEncoderBuffer([u,i]);for(var o=1,s=i.length;s>=256;s>>=8)o++;var u=new c(2+o);u[0]=r,u[1]=128|o;for(var s=1+o,l=i.length;l>0;s--,l>>=8)u[s]=255&l;return this._createEncoderBuffer([u,i])},r.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new c(2*e.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,r=0;r=128;s>>=7)i++}for(var o=new c(i),a=o.length-1,r=e.length-1;r>=0;r--){var s=e[r];for(o[a--]=127&s;(s>>=7)>0;)o[a--]=128|127&s}return this._createEncoderBuffer(o)},r.prototype._encodeTime=function(e,t){var n,i=new Date(e);return"gentime"===t?n=[o(i.getFullYear()),o(i.getUTCMonth()+1),o(i.getUTCDate()),o(i.getUTCHours()),o(i.getUTCMinutes()),o(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[o(i.getFullYear()%100),o(i.getUTCMonth()+1),o(i.getUTCDate()),o(i.getUTCHours()),o(i.getUTCMinutes()),o(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},r.prototype._encodeNull=function(){return this._createEncoderBuffer("")},r.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!c.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new c(n)}if(c.isBuffer(e)){r=e.length;0===e.length&&r++;var i=new c(r);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var r=1,o=e;o>=256;o>>=8)r++;for(o=(i=new Array(r)).length-1;o>=0;o--)i[o]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new c(i))},r.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},r.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},r.prototype._skipDefault=function(e,t,n){var i,r=this._baseState;if(null===r.default)return!1;var o=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),o.length!==r.defaultBuffer.length)return!1;for(i=0;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function o(e,t,n){for(var i,o=[],a=t;a0?u-4:u;var l=0;for(t=0;t>16&255,a[l++]=r>>8&255,a[l++]=255&r;return 2===o?(r=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,a[l++]=255&r):1===o&&(r=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,a[l++]=r>>8&255,a[l++]=255&r),a},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,r="",s=[],c=0,u=n-i;cu?u:c+16383));return 1===i?(t=e[n-1],r+=a[t>>2],r+=a[t<<4&63],r+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],r+=a[t>>10],r+=a[t>>4&63],r+=a[t<<2&63],r+="="),s.push(r),s.join("")};for(var a=[],s=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,f=u.length;l>>24]^l[h>>>16&255]^f[m>>>8&255]^p[255&v]^t[b++],a=u[h>>>24]^l[m>>>16&255]^f[v>>>8&255]^p[255&d]^t[b++],s=u[m>>>24]^l[v>>>16&255]^f[d>>>8&255]^p[255&h]^t[b++],c=u[v>>>24]^l[d>>>16&255]^f[h>>>8&255]^p[255&m]^t[b++],d=o,h=a,m=s,v=c;return o=(i[d>>>24]<<24|i[h>>>16&255]<<16|i[m>>>8&255]<<8|i[255&v])^t[b++],a=(i[h>>>24]<<24|i[m>>>16&255]<<16|i[v>>>8&255]<<8|i[255&d])^t[b++],s=(i[m>>>24]<<24|i[v>>>16&255]<<16|i[d>>>8&255]<<8|i[255&h])^t[b++],c=(i[v>>>24]<<24|i[d>>>16&255]<<16|i[h>>>8&255]<<8|i[255&m])^t[b++],o>>>=0,a>>>=0,s>>>=0,c>>>=0,[o,a,s,c]}function a(e){this._key=i(e),this._reset()}var s=e("safe-buffer").Buffer,c=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],i=[],r=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,n[a]=u,i[u]=a;var l=e[a],f=e[l],p=e[f],d=257*e[u]^16843008*u;r[0][a]=d<<24|d>>>8,r[1][a]=d<<16|d>>>16,r[2][a]=d<<8|d>>>24,r[3][a]=d,d=16843009*p^65537*f^257*l^16843008*a,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===a?a=s=1:(a=l^e[e[e[p^l]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:i,SUB_MIX:r,INV_SUB_MIX:o}}();a.blockSize=16,a.keySize=32,a.prototype.blockSize=a.blockSize,a.prototype.keySize=a.keySize,a.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,i=4*(n+1),r=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=c[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),r[o]=r[o-t]^a}for(var s=[],l=0;l>>24]]^u.INV_SUB_MIX[1][u.SBOX[p>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[p>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&p]]}this._nRounds=n,this._keySchedule=r,this._invKeySchedule=s},a.prototype.encryptBlockRaw=function(e){return e=i(e),o(e,this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},a.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=s.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},a.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=o(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),r=s.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},a.prototype.scrub=function(){r(this._keySchedule),r(this._invKeySchedule),r(this._key)},t.exports.AES=a},{"safe-buffer":144}],19:[function(e,t,n){function i(e,t){var n=0;e.length!==t.length&&n++;for(var i=Math.min(e.length,t.length),r=0;r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},r.prototype.flush=function(){if(this.cache.length)return this.cache},n.createDecipher=function(e,t){var n=u[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=d(t,!1,n.key,n.iv);return a(e,i.key,i.iv)},n.createDecipheriv=a},{"./aes":18,"./authCipher":19,"./modes":30,"./streamCipher":33,"cipher-base":48,evp_bytestokey:84,inherits:101,"safe-buffer":144}],22:[function(e,t,n){function i(e,t,n){l.call(this),this._cache=new r,this._cipher=new f.AES(t),this._prev=c.from(n),this._mode=e,this._autopadding=!0}function r(){this.cache=c.allocUnsafe(0)}function o(e,t,n){var r=a[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=c.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=c.from(n)),n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===r.type?new u(r.module,t,n):"auth"===r.type?new s(r.module,t,n):new i(r.module,t,n)}var a=e("./modes"),s=e("./authCipher"),c=e("safe-buffer").Buffer,u=e("./streamCipher"),l=e("cipher-base"),f=e("./aes"),p=e("evp_bytestokey");e("inherits")(i,l),i.prototype._update=function(e){this._cache.add(e);for(var t,n,i=[];t=this._cache.get();)n=this._mode.encrypt(this,t),i.push(n);return c.concat(i)};var d=c.alloc(16,16);i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},r.prototype.add=function(e){this.cache=c.concat([this.cache,e])},r.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},r.prototype.flush=function(){for(var e=16-this.cache.length,t=c.allocUnsafe(e),n=-1;++n>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=a.alloc(16,0),this.cache=a.allocUnsafe(0)}var a=e("safe-buffer").Buffer,s=a.alloc(16,0);o.prototype.ghash=function(e){for(var t=-1;++t0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,t&&(n[0]=n[0]^225<<24)}this.state=r(o)},o.prototype.update=function(e){this.cache=a.concat([this.cache,e]);for(var t;this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype.final=function(e,t){return this.cache.length&&this.ghash(a.concat([this.cache,s],16)),this.ghash(r([0,e,0,t])),this.state},t.exports=o},{"safe-buffer":144}],24:[function(e,t,n){var i=e("buffer-xor");n.encrypt=function(e,t){var n=i(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},n.decrypt=function(e,t){var n=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return i(r,n)}},{"buffer-xor":46}],25:[function(e,t,n){function i(e,t,n){var i=t.length,a=o(t,e._cache);return e._cache=e._cache.slice(i),e._prev=r.concat([e._prev,n?t:a]),a}var r=e("safe-buffer").Buffer,o=e("buffer-xor");n.encrypt=function(e,t,n){for(var o,a=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){a=r.concat([a,i(e,t,n)]);break}o=e._cache.length,a=r.concat([a,i(e,t.slice(0,o),n)]),t=t.slice(o)}return a}},{"buffer-xor":46,"safe-buffer":144}],26:[function(e,t,n){function i(e,t,n){for(var i,o,a,s=-1,c=0;++s<8;)i=e._cipher.encryptBlock(e._prev),o=t&1<<7-s?128:0,c+=(128&(a=i[0]^o))>>s%8,e._prev=r(e._prev,n?o:a);return c}function r(e,t){var n=e.length,i=-1,r=o.allocUnsafe(e.length);for(e=o.concat([e,o.from([t])]);++i>7;return r}var o=e("safe-buffer").Buffer;n.encrypt=function(e,t,n){for(var r=t.length,a=o.allocUnsafe(r),s=-1;++s=0||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new a(s(t));return n}var a=e("bn.js"),s=e("randombytes");t.exports=r,r.getr=o}).call(this,e("buffer").Buffer)},{"bn.js":"BN",buffer:47,randombytes:127}],38:[function(e,t,n){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":39}],39:[function(e,t,n){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],40:[function(e,t,n){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],41:[function(e,t,n){(function(n){function i(e){c.Writable.call(this);var t=p[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function r(e){c.Writable.call(this);var t=p[e];if(!t)throw new Error("Unknown message digest");this._hash=s(t.hash),this._tag=t.id,this._signType=t.sign}function o(e){return new i(e)}function a(e){return new r(e)}var s=e("create-hash"),c=e("stream"),u=e("inherits"),l=e("./sign"),f=e("./verify"),p=e("./algorithms.json");Object.keys(p).forEach(function(e){p[e].id=new n(p[e].id,"hex"),p[e.toLowerCase()]=p[e]}),u(i,c.Writable),i.prototype._write=function(e,t,n){this._hash.update(e),n()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new n(e,t)),this._hash.update(e),this},i.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),i=l(n,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},u(r,c.Writable),r.prototype._write=function(e,t,n){this._hash.update(e),n()},r.prototype.update=function(e,t){return"string"==typeof e&&(e=new n(e,t)),this._hash.update(e),this},r.prototype.verify=function(e,t,i){"string"==typeof t&&(t=new n(t,i)),this.end();var r=this._hash.digest();return f(t,r,e,this._signType,this._tag)},t.exports={Sign:o,Verify:a,createSign:o,createVerify:a}}).call(this,e("buffer").Buffer)},{"./algorithms.json":39,"./sign":42,"./verify":43,buffer:47,"create-hash":51,inherits:101,stream:155}],42:[function(e,t,n){(function(n){function i(e,t){var i=v[t.curve.join(".")];if(!i)throw new Error("unknown curve "+t.curve.join("."));var r=new d(i).keyFromPrivate(t.privateKey).sign(e);return new n(r.toDER())}function r(e,t,n){for(var i,r=t.params.priv_key,c=t.params.p,f=t.params.q,p=t.params.g,d=new h(0),m=s(e,f).mod(f),v=!1,b=a(r,f,e,n);!1===v;)d=l(p,i=u(f,b,n),c,f),0===(v=i.invm(f).imul(m.add(r.mul(d))).mod(f)).cmpn(0)&&(v=!1,d=new h(0));return o(d,v)}function o(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var i=[48,e.length+t.length+4,2,e.length];return i=i.concat(e,[2,t.length],t),new n(i)}function a(e,t,i,r){if((e=new n(e.toArray())).length0&&n.ishrn(i),n}function c(e,t){e=(e=s(e,t)).mod(t);var i=new n(e.toArray());if(i.length=t)throw new Error("invalid sig")}var a=e("bn.js"),s=e("elliptic").ec,c=e("parse-asn1"),u=e("./curves.json");t.exports=function(e,t,o,s,u){var l=c(o);if("ec"===l.type){if("ecdsa"!==s&&"ecdsa/rsa"!==s)throw new Error("wrong public key type");return i(e,t,l)}if("dsa"===l.type){if("dsa"!==s)throw new Error("wrong public key type");return r(e,t,l)}if("rsa"!==s&&"ecdsa/rsa"!==s)throw new Error("wrong public key type");t=n.concat([u,t]);for(var f=l.modulus.byteLength(),p=[1],d=0;t.length+p.length+2>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e,t,n){var i=t.length-1;if(i=0?(r>0&&(e.lastNeed=r-1),r):--i=0?(r>0&&(e.lastNeed=r-2),r):--i=0?(r>0&&(2===r?r=0:e.lastNeed=r-3),r):0}function c(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function u(e){var t=this.lastTotal-this.lastNeed,n=c(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function p(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function m(e){return e&&e.length?this.write(e):""}var v=e("safe-buffer").Buffer,b=v.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};n.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n$)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=r.prototype,t}function r(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(e)}return o(e,t,n)}function o(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return V(e)?f(e,t,n):"string"==typeof e?u(e,t):p(e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function s(e,t,n){return a(e),e<=0?i(e):void 0!==t?"string"==typeof n?i(e).fill(t,n):i(e).fill(t):i(e)}function c(e){return a(e),i(e<0?0:0|d(e))}function u(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!r.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|h(e,t),o=i(n),a=o.write(e,t);return a!==n&&(o=o.slice(0,a)),o}function l(e){for(var t=e.length<0?0:0|d(e.length),n=i(t),r=0;r=$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$.toString(16)+" bytes");return 0|e}function h(e,t){if(r.isBuffer(e))return e.length;if(K(e)||V(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(i)return L(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function v(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function b(e,t,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,W(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=r.from(t,i)),r.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,c=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}var u;if(r){var l=-1;for(u=n;us&&(n=s-c),u=n;u>=0;u--){for(var f=!0,p=0;pr&&(i=r):i=r;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(r+s<=n){var c,u,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(c=e[r+1]))&&(f=(31&o)<<6|63&c)>127&&(a=f);break;case 3:c=e[r+1],u=e[r+2],128==(192&c)&&128==(192&u)&&(f=(15&o)<<12|(63&c)<<6|63&u)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:c=e[r+1],u=e[r+2],l=e[r+3],128==(192&c)&&128==(192&u)&&128==(192&l)&&(f=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),r+=s}return A(i)}function A(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);for(var n="",i=0;ii)&&(n=i);for(var r="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,i,o,a){if(!r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function B(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,i,r){return t=+t,n>>>=0,r||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,n,i,23,4),n+4}function O(e,t,n,i,r){return t=+t,n>>>=0,r||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,n,i,52,8),n+8}function N(e){if((e=e.trim().replace(Q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function L(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],a=0;a55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){for(var t=[],n=0;n>8,r=n%256,o.push(r),o.push(i);return o}function U(e){return X.toByteArray(N(e))}function H(e,t,n,i){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function V(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function K(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function W(e){return e!==e}var X=e("base64-js"),G=e("ieee754");n.Buffer=r,n.SlowBuffer=function(e){return+e!=e&&(e=0),r.alloc(+e)},n.INSPECT_MAX_BYTES=50;var $=2147483647;n.kMaxLength=$,r.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),r.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192,r.from=function(e,t,n){return o(e,t,n)},r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,r.alloc=function(e,t,n){return s(e,t,n)},r.allocUnsafe=function(e){return c(e)},r.allocUnsafeSlow=function(e){return c(e)},r.isBuffer=function(e){return null!=e&&!0===e._isBuffer},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},r.prototype.compare=function(e,t,n,i,o){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,s=n-t,c=Math.min(a,s),u=this.slice(i,o),l=e.slice(t,n),f=0;f>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return g(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;r.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||F(e,t,this.length);for(var i=this[e],r=1,o=0;++o>>=0,t>>>=0,n||F(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},r.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var i=this[e],r=1,o=0;++o=r&&(i-=Math.pow(2,8*t)),i},r.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*t)),o},r.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),G.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),G.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),G.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),G.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,i){e=+e,t>>>=0,n>>>=0,i||I(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,i||I(this,e,t,n,Math.pow(2,8*n)-1,0);var r=n-1,o=1;for(this[t+r]=255&e;--r>=0&&(o*=256);)this[t+r]=e/o&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},r.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){var r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},r.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return O(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return O(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(o<1e3)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a>>2),a=0,s=0;a>5]|=128<>>9<<4)]=t;for(var n=1732584193,i=-271733879,r=-1732584194,l=271733878,f=0;f>16)+(t>>16)+(n>>16)<<16|65535&n}function l(e,t){return e<>>32-t}var f=e("./make-hash");t.exports=function(e){return f(e,i)}},{"./make-hash":52}],54:[function(e,t,n){function i(e,t){a.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=("rmd160"===e?new u:l(e)).update(t).digest():t.lengthc?t=e(t):t.length0;i--)t+=this._buffer(e,t),n+=this._flushBuffer(r,n);return t+=this._buffer(e,t),r},i.prototype.final=function(e){var t;e&&(t=this.update(e));var n;return n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];n=c.r28shl(n,a),i=c.r28shl(i,a),c.pc2(n,i,e.keys,r)}},r.prototype._update=function(e,t,n,i){var r=this._desState,o=c.readUInt32BE(e,t),a=c.readUInt32BE(e,t+4);c.ip(o,a,r.tmp,0),o=r.tmp[0],a=r.tmp[1],"encrypt"===this.type?this._encrypt(r,o,a,r.tmp,0):this._decrypt(r,o,a,r.tmp,0),o=r.tmp[0],a=r.tmp[1],c.writeUInt32BE(n,o,i),c.writeUInt32BE(n,a,i+4)},r.prototype._pad=function(e,t){for(var n=e.length-t,i=t;i>>0,o=p}c.rip(a,o,i,r)},r.prototype._decrypt=function(e,t,n,i,r){for(var o=n,a=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],l=e.keys[s+1];c.expand(o,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var f=c.substitute(u,l),p=o;o=(a^c.permute(f))>>>0,a=p}c.rip(o,a,i,r)}},{"../des":57,inherits:101,"minimalistic-assert":106}],61:[function(e,t,n){function i(e,t){o.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),r=t.slice(16,24);this.ciphers="encrypt"===e?[u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:i}),u.create({type:"encrypt",key:r})]:[u.create({type:"decrypt",key:r}),u.create({type:"encrypt",key:i}),u.create({type:"decrypt",key:n})]}function r(e){c.call(this,e);var t=new i(this.type,this.options.key);this._edeState=t}var o=e("minimalistic-assert"),a=e("inherits"),s=e("../des"),c=s.Cipher,u=s.DES;a(r,c),t.exports=r,r.create=function(e){return new r(e)},r.prototype._update=function(e,t,n,i){var r=this._edeState;r.ciphers[0]._update(e,t,n,i),r.ciphers[1]._update(n,i,n,i),r.ciphers[2]._update(n,i,n,i)},r.prototype._pad=u.prototype._pad,r.prototype._unpad=u.prototype._unpad},{"../des":57,inherits:101,"minimalistic-assert":106}],62:[function(e,t,n){n.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},n.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},n.ip=function(e,t,n,i){for(var r=0,o=0,a=6;a>=0;a-=2){for(s=0;s<=24;s+=8)r<<=1,r|=t>>>s+a&1;for(s=0;s<=24;s+=8)r<<=1,r|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(var s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}n[i+0]=r>>>0,n[i+1]=o>>>0},n.rip=function(e,t,n,i){for(var r=0,o=0,a=0;a<4;a++)for(s=24;s>=0;s-=8)r<<=1,r|=t>>>s+a&1,r<<=1,r|=e>>>s+a&1;for(a=4;a<8;a++)for(var s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;n[i+0]=r>>>0,n[i+1]=o>>>0},n.pc1=function(e,t,n,i){for(var r=0,o=0,a=7;a>=5;a--){for(s=0;s<=24;s+=8)r<<=1,r|=t>>s+a&1;for(s=0;s<=24;s+=8)r<<=1,r|=e>>s+a&1}for(s=0;s<=24;s+=8)r<<=1,r|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(var s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;n[i+0]=r>>>0,n[i+1]=o>>>0},n.r28shl=function(e,t){return e<>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];n.pc2=function(e,t,n,r){for(var o=0,a=0,s=i.length>>>1,c=0;c>>i[c]&1;for(c=s;c>>i[c]&1;n[r+0]=o>>>0,n[r+1]=a>>>0},n.expand=function(e,t,n){var i=0,r=0;i=(1&e)<<5|e>>>27;for(o=23;o>=15;o-=4)i<<=6,i|=e>>>o&63;for(var o=11;o>=3;o-=4)r|=e>>>o&63,r<<=6;r|=(31&e)<<1|e>>>31,t[n+0]=i>>>0,t[n+1]=r>>>0};var r=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];n.substitute=function(e,t){for(var n=0,i=0;i<4;i++)n<<=4,n|=a=r[64*i+(o=e>>>18-6*i&63)];for(i=0;i<4;i++){var o=t>>>18-6*i&63,a=r[256+64*i+o];n<<=4,n|=a}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];n.permute=function(e){for(var t=0,n=0;n>>o[n]&1;return t>>>0},n.padSplit=function(e,t,n){for(var i=e.toString(2);i.lengthe;)n.ishrn(1);if(n.isEven()&&n.iadd(f),n.testn(1)||n.iadd(p),t.cmp(p)){if(!t.cmp(d))for(;n.mod(h).cmp(m);)n.iadd(b)}else for(;n.mod(u).cmp(v);)n.iadd(b);if(i=n.shrn(1),r(i)&&r(n)&&o(i)&&o(n)&&l.test(i)&&l.test(n))return n}}var s=e("randombytes");t.exports=a,a.simpleSieve=r,a.fermatTest=o;var c=e("bn.js"),u=new c(24),l=new(e("miller-rabin")),f=new c(1),p=new c(2),d=new c(5),h=(new c(16),new c(8),new c(10)),m=new c(3),v=(new c(7),new c(11)),b=new c(4),y=(new c(12),null)},{"bn.js":"BN","miller-rabin":105,randombytes:127}],66:[function(e,t,n){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],67:[function(e,t,n){var i=n;i.version=e("../package.json").version,i.utils=e("./elliptic/utils"),i.rand=e("brorand"),i.curve=e("./elliptic/curve"),i.curves=e("./elliptic/curves"),i.ec=e("./elliptic/ec"),i.eddsa=e("./elliptic/eddsa")},{"../package.json":82,"./elliptic/curve":70,"./elliptic/curves":73,"./elliptic/ec":74,"./elliptic/eddsa":77,"./elliptic/utils":81,brorand:16}],68:[function(e,t,n){function i(e,t){this.type=e,this.p=new o(t.p,16),this.red=t.prime?o.red(t.prime):o.mont(this.p),this.zero=new o(0).toRed(this.red),this.one=new o(1).toRed(this.red),this.two=new o(2).toRed(this.red),this.n=t.n&&new o(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function r(e,t){this.curve=e,this.type=t,this.precomputed=null}var o=e("bn.js"),a=e("../../elliptic").utils,s=a.getNAF,c=a.getJSF,u=a.assert;t.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,t){u(e.precomputed);var n=e._getDoubles(),i=s(t,1),r=(1<=a;t--)c=(c<<1)+i[t];o.push(c)}for(var l=this.jpoint(null,null,null),f=this.jpoint(null,null,null),p=r;p>0;p--){for(a=0;a=0;c--){for(var t=0;c>=0&&0===o[c];c--)t++;if(c>=0&&t++,a=a.dblp(t),c<0)break;var l=o[c];u(0!==l),a="affine"===e.type?l>0?a.mixedAdd(r[l-1>>1]):a.mixedAdd(r[-l-1>>1].neg()):l>0?a.add(r[l-1>>1]):a.add(r[-l-1>>1].neg())}return"affine"===e.type?a.toP():a},i.prototype._wnafMulAdd=function(e,t,n,i,r){for(var o=this._wnafT1,a=this._wnafT2,u=this._wnafT3,l=0,f=0;f=1;f-=2){var d=f-1,h=f;if(1===o[d]&&1===o[h]){var m=[t[d],null,null,t[h]];0===t[d].y.cmp(t[h].y)?(m[1]=t[d].add(t[h]),m[2]=t[d].toJ().mixedAdd(t[h].neg())):0===t[d].y.cmp(t[h].y.redNeg())?(m[1]=t[d].toJ().mixedAdd(t[h]),m[2]=t[d].add(t[h].neg())):(m[1]=t[d].toJ().mixedAdd(t[h]),m[2]=t[d].toJ().mixedAdd(t[h].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=c(n[d],n[h]);l=Math.max(b[0].length,l),u[d]=new Array(l),u[h]=new Array(l);for(j=0;j=0;f--){for(var w=0;f>=0;){for(var k=!0,j=0;j=0&&w++,_=_.dblp(w),f<0)break;for(j=0;j0?S=a[j][E-1>>1]:E<0&&(S=a[j][-E-1>>1].neg()),_="affine"===S.type?_.mixedAdd(S):_.add(S))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step)},r.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r":""},r.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},r.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),r=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=i.redAdd(t),a=o.redSub(n),s=i.redSub(t),c=r.redMul(a),u=o.redMul(s),l=r.redMul(s),f=a.redMul(o);return this.curve.point(c,u,f,l)},r.prototype._projDbl=function(){var e,t,n,i=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(u=this.curve._mulA(r)).redAdd(o);if(this.zOne)e=i.redSub(r).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(u.redSub(o)),n=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),c=a.redSub(s).redISub(s);e=i.redSub(r).redISub(o).redMul(c),t=a.redMul(u.redSub(o)),n=a.redMul(c)}}else{var u=r.redAdd(o),s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),c=u.redSub(s).redSub(s);e=this.curve._mulC(i.redISub(u)).redMul(c),t=this.curve._mulC(u).redMul(r.redISub(o)),n=u.redMul(c)}return this.curve.point(e,t,n)},r.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},r.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),r=this.z.redMul(e.z.redAdd(e.z)),o=n.redSub(t),a=r.redSub(i),s=r.redAdd(i),c=n.redAdd(t),u=o.redMul(a),l=s.redMul(c),f=o.redMul(c),p=a.redMul(s);return this.curve.point(u,l,p,f)},r.prototype._projAdd=function(e){var t,n,i=this.z.redMul(e.z),r=i.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=r.redSub(s),u=r.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),f=i.redMul(c).redMul(l);return this.curve.twisted?(t=i.redMul(u).redMul(a.redSub(this.curve._mulA(o))),n=c.redMul(u)):(t=i.redMul(u).redMul(a.redSub(o)),n=this.curve._mulC(c).redMul(u)),this.curve.point(f,t,n)},r.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},r.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},r.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},r.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},r.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},r.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},r.prototype.getX=function(){return this.normalize(),this.x.fromRed()},r.prototype.getY=function(){return this.normalize(),this.y.fromRed()},r.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},r.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}return!1},r.prototype.toP=r.prototype.normalize,r.prototype.mixedAdd=r.prototype.add},{"../../elliptic":67,"../curve":70,"bn.js":"BN",inherits:101}],70:[function(e,t,n){var i=n;i.base=e("./base"),i.short=e("./short"),i.mont=e("./mont"),i.edwards=e("./edwards")},{"./base":68,"./edwards":69,"./mont":71,"./short":72}],71:[function(e,t,n){function i(e){c.call(this,"mont",e),this.a=new a(e.a,16).toRed(this.red),this.b=new a(e.b,16).toRed(this.red),this.i4=new a(4).toRed(this.red).redInvm(),this.two=new a(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function r(e,t,n){c.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new a(t,16),this.z=new a(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var o=e("../curve"),a=e("bn.js"),s=e("inherits"),c=o.base,u=e("../../elliptic").utils;s(i,c),t.exports=i,i.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),i=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===i.redSqrt().redSqr().cmp(i)},s(r,c.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(u.toArray(e,t),1)},i.prototype.point=function(e,t){return new r(this,e,t)},i.prototype.pointFromJSON=function(e){return r.fromJSON(this,e)},r.prototype.precompute=function(){},r.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},r.fromJSON=function(e,t){return new r(e,t[0],t[1]||e.one)},r.prototype.inspect=function(){return this.isInfinity()?"":""},r.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},r.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),i=e.redMul(t),r=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(i,r)},r.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),r=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(n),a=r.redMul(i),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},r.prototype.mul=function(e){for(var t=e.clone(),n=this,i=this.curve.point(null,null),r=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var a=o.length-1;a>=0;a--)0===o[a]?(n=n.diffAdd(i,r),i=i.dbl()):(i=n.diffAdd(i,r),n=n.dbl());return i},r.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},r.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},r.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":67,"../curve":70,"bn.js":"BN",inherits:101}],72:[function(e,t,n){function i(e){l.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function r(e,t,n,i){l.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(n,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(e,t,n,i){l.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(n,16),this.z=new c(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var a=e("../curve"),s=e("../../elliptic"),c=e("bn.js"),u=e("inherits"),l=a.base,f=s.utils.assert;u(i,l),t.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=(t=i[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red)}if(e.lambda)n=new c(e.lambda,16);else{var r=this._getEndoRoots(this.n);0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(t))?n=r[0]:(n=r[1],f(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}var o;return o=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(n),{beta:t,lambda:n,basis:o}}},i.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),n=new c(2).toRed(t).redInvm(),i=n.redNeg(),r=new c(3).toRed(t).redNeg().redSqrt().redMul(n);return[i.redAdd(r).fromRed(),i.redSub(r).fromRed()]},i.prototype._getEndoBasis=function(e){for(var t,n,i,r,o,a,s,u,l,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),p=e,d=this.n.clone(),h=new c(1),m=new c(0),v=new c(0),b=new c(1),y=0;0!==p.cmpn(0);){var g=d.div(p);u=d.sub(g.mul(p)),l=v.sub(g.mul(h));var _=b.sub(g.mul(m));if(!i&&u.cmp(f)<0)t=s.neg(),n=h,i=u.neg(),r=l;else if(i&&2==++y)break;s=u,d=p,p=u,v=h,h=l,b=m,m=_}o=u.neg(),a=l;var x=i.sqr().add(r.sqr());return o.sqr().add(a.sqr()).cmp(x)>=0&&(o=t,a=n),i.negative&&(i=i.neg(),r=r.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:i,b:r},{a:o,b:a}]},i.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=r.mul(n.a),s=o.mul(i.a),c=r.mul(n.b),u=o.mul(i.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},i.prototype.pointFromX=function(e,t){(e=new c(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(0!==i.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)},i.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===n.redSqr().redISub(r).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,o=0;o":""},r.prototype.isInfinity=function(){return this.inf},r.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},r.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),o=r.redSqr().redISub(this.x.redAdd(this.x)),a=r.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},r.prototype.getX=function(){return this.x.fromRed()},r.prototype.getY=function(){return this.y.fromRed()},r.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},r.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)},r.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)},r.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},r.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t},r.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},u(o,l.BasePoint),i.prototype.jpoint=function(e,t,n){return new o(this,e,t,n)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=i.redSub(r),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),f=i.redMul(u),p=c.redSqr().redIAdd(l).redISub(f).redISub(f),d=c.redMul(f.redISub(p)).redISub(o.redMul(l)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(p,d,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,o=e.y.redMul(t).redMul(this.z),a=n.redSub(i),s=r.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=n.redMul(c),f=s.redSqr().redIAdd(u).redISub(l).redISub(l),p=s.redMul(l.redISub(f)).redISub(r.redMul(u)),d=this.z.redMul(a);return this.curve.jpoint(f,p,d)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n=0)return!1;if(n.redIAdd(r),0===this.x.cmp(n))return!0}return!1},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":67,"../curve":70,"bn.js":"BN",inherits:101}],73:[function(e,t,n){function i(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function r(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var n=new i(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:n}),n}})}var o=n,a=e("hash.js"),s=e("../elliptic"),c=s.utils.assert;o.PresetCurve=i,r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=e("./precomputed/secp256k1")}catch(e){u=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})},{"../elliptic":67,"./precomputed/secp256k1":80,"hash.js":86}],74:[function(e,t,n){function i(e){if(!(this instanceof i))return new i(e);"string"==typeof e&&(s(a.curves.hasOwnProperty(e),"Unknown curve "+e),e=a.curves[e]),e instanceof a.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var r=e("bn.js"),o=e("hmac-drbg"),a=e("../../elliptic"),s=a.utils.assert,c=e("./key"),u=e("./signature");t.exports=i,i.prototype.keyPair=function(e){return new c(this,e)},i.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},i.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},i.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new r(2));;){var s=new r(t.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}},i.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},i.prototype.sign=function(e,t,n,i){"object"===(void 0===n?"undefined":_typeof(n))&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),l=new o({hash:this.hash,entropy:s,nonce:c,pers:i.pers,persEnc:i.persEnc||"utf8"}),f=this.n.sub(new r(1)),p=0;!0;p++){var d=i.k?i.k(p):new r(l.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(f)>=0)){var h=this.g.mul(d);if(!h.isInfinity()){var m=h.getX(),v=m.umod(this.n);if(0!==v.cmpn(0)){var b=d.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(0!==(b=b.umod(this.n)).cmpn(0)){var y=(h.getY().isOdd()?1:0)|(0!==m.cmp(v)?2:0);return i.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),y^=1),new u({r:v,s:b,recoveryParam:y})}}}}}},i.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),c=s.mul(e).umod(this.n),l=s.mul(o).umod(this.n);if(!this.curve._maxwellTrick)return!(f=this.g.mulAdd(c,n.getPublic(),l)).isInfinity()&&0===f.getX().umod(this.n).cmp(o);var f=this.g.jmulAdd(c,n.getPublic(),l);return!f.isInfinity()&&f.eqXToP(o)},i.prototype.recoverPubKey=function(e,t,n,i){s((3&n)===n,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new r(e),c=t.r,l=t.s,f=1&n,p=n>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&p)throw new Error("Unable to find sencond key candinate");c=p?this.curve.pointFromX(c.add(this.curve.n),f):this.curve.pointFromX(c,f);var d=t.r.invm(o),h=o.sub(a).mul(d).umod(o),m=l.mul(d).umod(o);return this.g.mulAdd(h,c,m)},i.prototype.getKeyRecoveryParam=function(e,t,n,i){if(null!==(t=new u(t,i)).recoveryParam)return t.recoveryParam;for(var r=0;r<4;r++){var o;try{o=this.recoverPubKey(e,t,r)}catch(e){continue}if(o.eq(n))return r}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":67,"./key":75,"./signature":76,"bn.js":"BN","hmac-drbg":98}],75:[function(e,t,n){function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var r=e("bn.js"),o=e("../../elliptic").utils.assert;t.exports=i,i.fromPublic=function(e,t,n){return t instanceof i?t:new i(e,{pub:t,pubEnc:n})},i.fromPrivate=function(e,t,n){return t instanceof i?t:new i(e,{priv:t,privEnc:n})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?o(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.mul(this.priv).getX()},i.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return""}},{"../../elliptic":67,"bn.js":"BN"}],76:[function(e,t,n){function i(e,t){if(e instanceof i)return e;this._importDER(e,t)||(l(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function r(){this.place=0}function o(e,t){var n=e[t.place++];if(!(128&n))return n;for(var i=15&n,r=0,o=0,a=t.place;o>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}var c=e("bn.js"),u=e("../../elliptic").utils,l=u.assert;t.exports=i,i.prototype._importDER=function(e,t){e=u.toArray(e,t);var n=new r;if(48!==e[n.place++])return!1;if(o(e,n)+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var i=o(e,n),a=e.slice(n.place,i+n.place);if(n.place+=i,2!==e[n.place++])return!1;var s=o(e,n);if(e.length!==s+n.place)return!1;var l=e.slice(n.place,s+n.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===l[0]&&128&l[1]&&(l=l.slice(1)),this.r=new c(a),this.s=new c(l),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=a(t),n=a(n);!(n[0]||128&n[1]);)n=n.slice(1);var i=[2];s(i,t.length),(i=i.concat(t)).push(2),s(i,n.length);var r=i.concat(n),o=[48];return s(o,r.length),o=o.concat(r),u.encode(o,e)}},{"../../elliptic":67,"bn.js":"BN"}],77:[function(e,t,n){function i(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof i))return new i(e);var e=o.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}var r=e("hash.js"),o=e("../../elliptic"),a=o.utils,s=a.assert,c=a.parseBytes,u=e("./key"),l=e("./signature");t.exports=i,i.prototype.sign=function(e,t){e=c(e);var n=this.keyFromSecret(t),i=this.hashInt(n.messagePrefix(),e),r=this.g.mul(i),o=this.encodePoint(r),a=this.hashInt(o,n.pubBytes(),e).mul(n.priv()),s=i.add(a).umod(this.curve.n);return this.makeSignature({R:r,S:s,Rencoded:o})},i.prototype.verify=function(e,t,n){e=c(e),t=this.makeSignature(t);var i=this.keyFromPublic(n),r=this.hashInt(t.Rencoded(),i.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(i.pub().mul(r)).eq(o)},i.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var o;if(r.isOdd()){var a=r.andln(i-1);o=a>(i>>1)-1?(i>>1)-a:a,r.isubn(o)}else o=0;n.push(o);for(var s=0!==r.cmpn(0)&&0===r.andln(i-1)?t+1:1,c=1;c0||t.cmpn(-r)>0;){var o=e.andln(3)+i&3,a=t.andln(3)+r&3;3===o&&(o=-1),3===a&&(a=-1);var s;s=0==(1&o)?0:3!=(u=e.andln(7)+i&7)&&5!==u||2!==a?o:-o,n[0].push(s);var c;if(0==(1&a))c=0;else{var u=t.andln(7)+r&7;c=3!==u&&5!==u||2!==o?a:-a}n[1].push(c),2*i===s+1&&(i=1-i),2*r===c+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n},i.cachedProperty=function(e,t,n){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=n.call(this)}},i.parseBytes=function(e){return"string"==typeof e?i.toArray(e,"hex"):e},i.intFromLE=function(e){return new r(e,"hex","le")}},{"bn.js":"BN","minimalistic-assert":106,"minimalistic-crypto-utils":107}],82:[function(e,t,n){t.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},{}],83:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"number"==typeof e}function a(e){return"object"===(void 0===e?"undefined":_typeof(e))&&null!==e}function s(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!o(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,o,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),i=(u=n.slice()).length,c=0;c0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},i.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],84:[function(e,t,n){var i=e("safe-buffer").Buffer,r=e("md5.js");t.exports=function(e,t,n,o){if(i.isBuffer(e)||(e=i.from(e,"binary")),t&&(i.isBuffer(t)||(t=i.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=i.alloc(a),c=i.alloc(o||0),u=i.alloc(0);a>0||o>0;){var l=new r;l.update(u),l.update(e),t&&l.update(t),u=l.digest();var f=0;if(a>0){var p=s.length-a;f=Math.min(a,u.length),u.copy(s,p,0,f),a-=f}if(f0){var d=c.length-o,h=Math.min(o,u.length-f);u.copy(c,d,f,f+h),o-=h}}return u.fill(0),{key:s,iv:c}}},{"md5.js":103,"safe-buffer":144}],85:[function(e,t,n){(function(n){function i(e){r.call(this),this._block=new n(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var r=e("stream").Transform;e("inherits")(i,r),i.prototype._transform=function(e,t,i){var r=null;try{"buffer"!==t&&(e=new n(e,t)),this.update(e)}catch(e){r=e}i(r)},i.prototype._flush=function(e){var t=null;try{this.push(this._digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=new n(e,t||"binary"));for(var i=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:47,inherits:101,stream:155}],86:[function(e,t,n){var i=n;i.utils=e("./hash/utils"),i.common=e("./hash/common"),i.sha=e("./hash/sha"),i.ripemd=e("./hash/ripemd"),i.hmac=e("./hash/hmac"),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},{"./hash/common":87,"./hash/hmac":88,"./hash/ripemd":89,"./hash/sha":90,"./hash/utils":97}],87:[function(e,t,n){function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var r=e("./utils"),o=e("minimalistic-assert");n.BlockHash=i,i.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=255&e}else for(i[r++]=255&e,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t>>3},n.g1_256=function(e){return a(e,17)^a(e,19)^e>>>10}},{"../utils":97}],97:[function(e,t,n){function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function r(e){return 1===e.length?"0"+e:e}function o(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var a=e("minimalistic-assert"),s=e("inherits");n.inherits=s,n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>8,a=255&r;o?n.push(o,a):n.push(a)}else for(i=0;i>>0}return o},n.split32=function(e,t){for(var n=new Array(4*e.length),i=0,r=0;i>>24,n[r+1]=o>>>16&255,n[r+2]=o>>>8&255,n[r+3]=255&o):(n[r+3]=o>>>24,n[r+2]=o>>>16&255,n[r+1]=o>>>8&255,n[r]=255&o)}return n},n.rotr32=function(e,t){return e>>>t|e<<32-t},n.rotl32=function(e,t){return e<>>32-t},n.sum32=function(e,t){return e+t>>>0},n.sum32_3=function(e,t,n){return e+t+n>>>0},n.sum32_4=function(e,t,n,i){return e+t+n+i>>>0},n.sum32_5=function(e,t,n,i,r){return e+t+n+i+r>>>0},n.sum64=function(e,t,n,i){var r=e[t],o=i+e[t+1]>>>0,a=(o>>0,e[t+1]=o},n.sum64_hi=function(e,t,n,i){return(t+i>>>0>>0},n.sum64_lo=function(e,t,n,i){return t+i>>>0},n.sum64_4_hi=function(e,t,n,i,r,o,a,s){var c=0,u=t;return c+=(u=u+i>>>0)>>0)>>0)>>0},n.sum64_4_lo=function(e,t,n,i,r,o,a,s){return t+i+o+s>>>0},n.sum64_5_hi=function(e,t,n,i,r,o,a,s,c,u){var l=0,f=t;return l+=(f=f+i>>>0)>>0)>>0)>>0)>>0},n.sum64_5_lo=function(e,t,n,i,r,o,a,s,c,u){return t+i+o+s+u>>>0},n.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},n.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},n.shr64_hi=function(e,t,n){return e>>>n},n.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},{inherits:101,"minimalistic-assert":106}],98:[function(e,t,n){function i(e){if(!(this instanceof i))return new i(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),n=o.toArray(e.nonce,e.nonceEnc||"hex"),r=o.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var r=e("hash.js"),o=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");t.exports=i,i.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},i.prototype.generate=function(e,t,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=n,n=t,t=null),n&&(n=o.toArray(n,i||"hex"),this._update(n));for(var r=[];r.length>1,l=-7,f=n?r-1:0,p=n?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=i;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),o-=u}return(d?-1:1)*a*Math.pow(2,o-i)},n.write=function(e,t,n,i,r,o){var a,s,c,u=8*o-r-1,l=(1<>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,h=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?p/c:p*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,r),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,r),a=0));r>=8;e[n+d]=255&s,d+=h,s/=256,r-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,u-=8);e[n+d-h]|=128*m}},{}],100:[function(e,t,n){var i=[].indexOf;t.exports=function(e,t){if(i)return e.indexOf(t);for(var n=0;n>>32-t}function o(e,t,n,i,o,a,s){return r(e+(t&n|~t&i)+o+a|0,s)+t|0}function a(e,t,n,i,o,a,s){return r(e+(t&i|n&~i)+o+a|0,s)+t|0}function s(e,t,n,i,o,a,s){return r(e+(t^n^i)+o+a|0,s)+t|0}function c(e,t,n,i,o,a,s){return r(e+(n^(t|~i))+o+a|0,s)+t|0}var u=e("inherits"),l=e("hash-base"),f=new Array(16);u(i,l),i.prototype._update=function(){for(var e=f,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,i=this._b,r=this._c,u=this._d;i=c(i=c(i=c(i=c(i=s(i=s(i=s(i=s(i=a(i=a(i=a(i=a(i=o(i=o(i=o(i=o(i,r=o(r,u=o(u,n=o(n,i,r,u,e[0],3614090360,7),i,r,e[1],3905402710,12),n,i,e[2],606105819,17),u,n,e[3],3250441966,22),r=o(r,u=o(u,n=o(n,i,r,u,e[4],4118548399,7),i,r,e[5],1200080426,12),n,i,e[6],2821735955,17),u,n,e[7],4249261313,22),r=o(r,u=o(u,n=o(n,i,r,u,e[8],1770035416,7),i,r,e[9],2336552879,12),n,i,e[10],4294925233,17),u,n,e[11],2304563134,22),r=o(r,u=o(u,n=o(n,i,r,u,e[12],1804603682,7),i,r,e[13],4254626195,12),n,i,e[14],2792965006,17),u,n,e[15],1236535329,22),r=a(r,u=a(u,n=a(n,i,r,u,e[1],4129170786,5),i,r,e[6],3225465664,9),n,i,e[11],643717713,14),u,n,e[0],3921069994,20),r=a(r,u=a(u,n=a(n,i,r,u,e[5],3593408605,5),i,r,e[10],38016083,9),n,i,e[15],3634488961,14),u,n,e[4],3889429448,20),r=a(r,u=a(u,n=a(n,i,r,u,e[9],568446438,5),i,r,e[14],3275163606,9),n,i,e[3],4107603335,14),u,n,e[8],1163531501,20),r=a(r,u=a(u,n=a(n,i,r,u,e[13],2850285829,5),i,r,e[2],4243563512,9),n,i,e[7],1735328473,14),u,n,e[12],2368359562,20),r=s(r,u=s(u,n=s(n,i,r,u,e[5],4294588738,4),i,r,e[8],2272392833,11),n,i,e[11],1839030562,16),u,n,e[14],4259657740,23),r=s(r,u=s(u,n=s(n,i,r,u,e[1],2763975236,4),i,r,e[4],1272893353,11),n,i,e[7],4139469664,16),u,n,e[10],3200236656,23),r=s(r,u=s(u,n=s(n,i,r,u,e[13],681279174,4),i,r,e[0],3936430074,11),n,i,e[3],3572445317,16),u,n,e[6],76029189,23),r=s(r,u=s(u,n=s(n,i,r,u,e[9],3654602809,4),i,r,e[12],3873151461,11),n,i,e[15],530742520,16),u,n,e[2],3299628645,23),r=c(r,u=c(u,n=c(n,i,r,u,e[0],4096336452,6),i,r,e[7],1126891415,10),n,i,e[14],2878612391,15),u,n,e[5],4237533241,21),r=c(r,u=c(u,n=c(n,i,r,u,e[12],1700485571,6),i,r,e[3],2399980690,10),n,i,e[10],4293915773,15),u,n,e[1],2240044497,21),r=c(r,u=c(u,n=c(n,i,r,u,e[8],1873313359,6),i,r,e[15],4264355552,10),n,i,e[6],2734768916,15),u,n,e[13],1309151649,21),r=c(r,u=c(u,n=c(n,i,r,u,e[4],4149444226,6),i,r,e[11],3174756917,10),n,i,e[2],718787259,15),u,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+i|0,this._c=this._c+r|0,this._d=this._d+u|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new n(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:47,"hash-base":104,inherits:101}],104:[function(e,t,n){function i(e,t){if(!o.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}function r(e){a.call(this),this._block=o.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var o=e("safe-buffer").Buffer,a=e("stream").Transform;e("inherits")(r,a),r.prototype._transform=function(e,t,n){var i=null;try{this.update(e,t)}catch(e){i=e}n(i)},r.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},r.prototype.update=function(e,t){if(i(e,"Data"),this._finalized)throw new Error("Digest already called");o.isBuffer(e)||(e=o.from(e,t));for(var n=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var a=this._blockOffset;a0;++s)this._length[s]+=c,(c=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*c);return this},r.prototype._update=function(){throw new Error("_update is not implemented")},r.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},r.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=r},{inherits:101,"safe-buffer":144,stream:155}],105:[function(e,t,n){function i(e){this.rand=e||new o.Rand}var r=e("bn.js"),o=e("brorand");t.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},i.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},i.prototype.test=function(e,t,n){var i=e.bitLength(),o=r.mont(e),a=new r(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=0;!s.testn(c);c++);for(var u=e.shrn(c),l=s.toRed(o);t>0;t--){var f=this._randrange(new r(2),s);n&&n(f);var p=f.toRed(o).redPow(u);if(0!==p.cmp(a)&&0!==p.cmp(l)){for(var d=1;d0;t--){var l=this._randrange(new r(2),a),f=e.gcd(l);if(0!==f.cmpn(1))return f;var p=l.toRed(i).redPow(c);if(0!==p.cmp(o)&&0!==p.cmp(u)){for(var d=1;d>8,a=255&r;o?n.push(o,a):n.push(a)}return n},o.zero2=i,o.toHex=r,o.encode=function(e,t){return"hex"===t?r(e):e}},{}],108:[function(e,t,n){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],109:[function(e,t,n){var i=e("asn1.js");n.certificate=e("./certificate");var r=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});n.RSAPrivateKey=r;var o=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});n.RSAPublicKey=o;var a=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});n.PublicKey=a;var s=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});n.PrivateKey=c;var u=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});n.EncryptedPrivateKey=u;var l=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});n.DSAPrivateKey=l,n.DSAparam=i.define("DSAparam",function(){this.int()});var f=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())});n.ECPrivateKey=f;var p=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});n.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":110,"asn1.js":1}],110:[function(e,t,n){var i=e("asn1.js"),r=i.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),o=i.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional())}),s=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),c=i.define("RelativeDistinguishedName",function(){this.setof(o)}),u=i.define("RDNSequence",function(){this.seqof(c)}),l=i.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),f=i.define("Validity",function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))}),p=i.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=i.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(l),this.key("validity").use(f),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())}),h=i.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())});t.exports=h},{"asn1.js":1}],111:[function(e,t,n){(function(n){var i=/Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m,r=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m,o=/^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m,a=e("evp_bytestokey"),s=e("browserify-aes");t.exports=function(e,t){var c,u=e.toString(),l=u.match(i);if(l){var f="aes"+l[1],p=new n(l[2],"hex"),d=new n(l[3].replace(/\r?\n/g,""),"base64"),h=a(t,p.slice(0,8),parseInt(l[1],10)).key,m=[],v=s.createDecipheriv(f,h,p);m.push(v.update(d)),m.push(v.final()),c=n.concat(m)}else{var b=u.match(o);c=new n(b[2].replace(/\r?\n/g,""),"base64")}return{tag:u.match(r)[1],data:c}}}).call(this,e("buffer").Buffer)},{"browserify-aes":20,buffer:47,evp_bytestokey:84}],112:[function(e,t,n){(function(n){function i(e){var t;"object"!==(void 0===e?"undefined":_typeof(e))||n.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new n(e));var i,a,c=s(e,t),u=c.tag,l=c.data;switch(u){case"CERTIFICATE":a=o.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(a||(a=o.PublicKey.decode(l,"der")),i=a.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(a.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return a.subjectPrivateKey=a.subjectPublicKey,{type:"ec",data:a};case"1.2.840.10040.4.1":return a.algorithm.params.pub_key=o.DSAparam.decode(a.subjectPublicKey.data,"der"),{type:"dsa",data:a.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+u);case"ENCRYPTED PRIVATE KEY":l=r(l=o.EncryptedPrivateKey.decode(l,"der"),t);case"PRIVATE KEY":switch(a=o.PrivateKey.decode(l,"der"),i=a.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(a.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:a.algorithm.curve,privateKey:o.ECPrivateKey.decode(a.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return a.algorithm.params.priv_key=o.DSAparam.decode(a.subjectPrivateKey,"der"),{type:"dsa",params:a.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+u);case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return l=o.ECPrivateKey.decode(l,"der"),{curve:l.parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+u)}}function r(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=a[e.algorithm.decrypt.cipher.algo.join(".")],s=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,f=parseInt(o.split("-")[1],10)/8,p=u.pbkdf2Sync(t,i,r,f),d=c.createDecipheriv(o,p,s),h=[];return h.push(d.update(l)),h.push(d.final()),n.concat(h)}var o=e("./asn1"),a=e("./aesid.json"),s=e("./fixProc"),c=e("browserify-aes"),u=e("pbkdf2");t.exports=i,i.signature=o.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":108,"./asn1":109,"./fixProc":111,"browserify-aes":20,buffer:47,pbkdf2:114}],113:[function(e,t,n){(function(e){function t(e,t){for(var n=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i=-1&&!r;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,r="/"===a.charAt(0))}return n=t(i(n.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+n||"."},n.normalize=function(e){var r=n.isAbsolute(e),o="/"===a(e,-1);return(e=t(i(e.split("/"),function(e){return!!e}),!r).join("/"))||r||(e="."),e&&o&&(e+="/"),(r?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function i(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var r=i(e.split("/")),o=i(t.split("/")),a=Math.min(r.length,o.length),s=a,c=0;c=6?"utf-8":"binary",t.exports=n}).call(this,e("_process"))},{_process:120}],117:[function(e,t,n){var i=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>i||t!==t)throw new TypeError("Bad key length")}},{}],118:[function(e,t,n){function i(e,t,n){var i=r(e),o="sha512"===e||"sha384"===e?128:64;t.length>o?t=i(t):t.length1)for(var n=1;n=t.length){o++;break}var a=t.slice(2,r-1);t.slice(r-1,r);if(("0002"!==i.toString("hex")&&!n||"0001"!==i.toString("hex")&&n)&&o++,a.length<8&&o++,o)throw new Error("decryption error");return t.slice(r)}function o(e,t){e=new n(e),t=new n(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));for(var o=-1;++of||new u(t).cmp(c.modulus)>=0)throw new Error("decryption error");var d;d=o?p(new u(t),c):l(t,c);var h=new n(f-d.length);if(h.fill(0),d=n.concat([h,d],f),4===s)return i(c,d);if(1===s)return r(0,d,o);if(3===s)return d;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":122,"./withPublic":125,"./xor":126,"bn.js":"BN","browserify-rsa":37,buffer:47,"create-hash":51,"parse-asn1":112}],124:[function(e,t,n){(function(n){function i(e,t){var i=e.modulus.byteLength(),r=t.length,o=c("sha1").update(new n("")).digest(),a=o.length,p=2*a;if(r>i-p-2)throw new Error("message too long");var d=new n(i-r-p-2);d.fill(0);var h=i-a-1,m=s(a),v=l(n.concat([o,d,new n([1]),t],h),u(m,h)),b=l(m,u(v,a));return new f(n.concat([new n([0]),b,v],i))}function r(e,t,i){var r=t.length,a=e.modulus.byteLength();if(r>a-11)throw new Error("message too long");var s;return i?(s=new n(a-r-3)).fill(255):s=o(a-r-3),new f(n.concat([new n([0,i?1:2]),s,new n([0]),t],a))}function o(e,t){for(var i,r=new n(e),o=0,a=s(2*e),c=0;o=0)throw new Error("data too long for modulus")}return n?d(s,c):p(s,c)}}).call(this,e("buffer").Buffer)},{"./mgf":122,"./withPublic":125,"./xor":126,"bn.js":"BN","browserify-rsa":37,buffer:47,"create-hash":51,"parse-asn1":112,randombytes:127}],125:[function(e,t,n){(function(n){var i=e("bn.js");t.exports=function(e,t){return new n(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}}).call(this,e("buffer").Buffer)},{"bn.js":"BN",buffer:47}],126:[function(e,t,n){t.exports=function(e,t){for(var n=e.length,i=-1;++i65536)throw new Error("requested too many random bytes");var a=new i.Uint8Array(e);e>0&&o.getRandomValues(a);var s=r.from(a.buffer);return"function"==typeof t?n.nextTick(function(){t(null,s)}):s}:t.exports=function(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:120,"safe-buffer":144}],128:[function(e,t,n){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":129}],129:[function(e,t,n){function i(e){if(!(this instanceof i))return new i(e);u.call(this,e),l.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",r)}function r(){this.allowHalfOpen||this._writableState.ended||a(o,this)}function o(e){e.end()}var a=e("process-nextick-args"),s=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=i;var c=e("core-util-is");c.inherits=e("inherits");var u=e("./_stream_readable"),l=e("./_stream_writable");c.inherits(i,u);for(var f=s(l.prototype),p=0;p0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===N.prototype||(t=r(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):l(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?l(e,a,t,!1):y(e,a)):l(e,a,t,!1))):i||(a.reading=!1)}return p(a)}function l(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&v(e)),y(e,t)}function f(e,t){var n;return o(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e){return!e.ended&&(e.needReadable||e.length=W?e=W:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function h(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=d(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function m(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,v(e)}}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(z("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?F(b,e):b(e))}function b(e){z("emit readable"),e.emit("readable"),j(e)}function y(e,t){t.readingMore||(t.readingMore=!0,F(g,e,t))}function g(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=E(e,t.buffer,t.decoder),n}function E(e,t,n){var i;return eo.length?o.length:e;if(a===o.length?r+=o:r+=o.slice(0,e),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}function C(e,t){var n=N.allocUnsafe(e),i=t.head,r=1;for(i.data.copy(n),e-=i.data.length;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=o.slice(a));break}++r}return t.length-=r,n}function M(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,F(T,t,e))}function T(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var n=0,i=e.length;n=t.highWaterMark||t.ended))return z("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):v(this),null;if(0===(e=h(e,t))&&t.ended)return 0===t.length&&M(this),null;var i=t.needReadable;z("need readable",i),(0===t.length||t.length-e0?S(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&M(this)),null!==r&&this.emit("data",r),r},c.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},c.prototype.pipe=function(e,t){function i(e,t){z("onunpipe"),e===p&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,o())}function r(){z("onend"),e.end()}function o(){z("cleanup"),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("drain",m),e.removeListener("error",c),e.removeListener("unpipe",i),p.removeListener("end",r),p.removeListener("end",f),p.removeListener("data",s),v=!0,!d.awaitDrain||e._writableState&&!e._writableState.needDrain||m()}function s(t){z("ondata"),b=!1,!1!==e.write(t)||b||((1===d.pipesCount&&d.pipes===e||d.pipesCount>1&&-1!==P(d.pipes,e))&&!v&&(z("false write response, pause",p._readableState.awaitDrain),p._readableState.awaitDrain++,b=!0),p.pause())}function c(t){z("onerror",t),f(),e.removeListener("error",c),0===R(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",l),f()}function l(){z("onfinish"),e.removeListener("close",u),f()}function f(){z("unpipe"),p.unpipe(e)}var p=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,z("pipe count=%d opts=%j",d.pipesCount,t);var h=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?r:f;d.endEmitted?F(h):p.once("end",h),e.on("unpipe",i);var m=_(p);e.on("drain",m);var v=!1,b=!1;return p.on("data",s),a(e,"error",c),e.once("close",u),e.once("finish",l),e.emit("pipe",p),d.flowing||(z("pipe resume"),p.resume()),e},c.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o-1?setImmediate:A;u.WritableState=c;var T=e("core-util-is");T.inherits=e("inherits");var P={deprecate:e("util-deprecate")},F=e("./internal/streams/stream"),I=e("safe-buffer").Buffer,B=i.Uint8Array||function(){},R=e("./internal/streams/destroy");T.inherits(u,F),c.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(c.prototype,"buffer",{get:P.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}();var O;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(u,Symbol.hasInstance,{value:function(e){return!!O.call(this,e)||e&&e._writableState instanceof c}})):O=function(e){return e instanceof this},u.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},u.prototype.write=function(e,t,n){var i=this._writableState,r=!1,c=a(e)&&!i.objectMode;return c&&!I.isBuffer(e)&&(e=o(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=s),i.ended?l(this,n):(c||f(this,i,e,n))&&(i.pendingcb++,r=d(this,i,c,e,t,n)),r},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},u.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},u.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},u.prototype._writev=null,u.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||S(this,i,n)},Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),u.prototype.destroy=R.destroy,u.prototype._undestroy=R.undestroy,u.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":129,"./internal/streams/destroy":135,"./internal/streams/stream":136,_process:120,"core-util-is":49,inherits:101,"process-nextick-args":119,"safe-buffer":144,"util-deprecate":156}],134:[function(e,t,n){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){e.copy(t,n)}var o=e("safe-buffer").Buffer;t.exports=function(){function e(){i(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var t=o.allocUnsafe(e>>>0),n=this.head,i=0;n;)r(n.data,t,i),i+=n.data.length,n=n.next;return t},e}()},{"safe-buffer":144}],135:[function(e,t,n){function i(e,t){e.emit("error",t)}var r=e("process-nextick-args");t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;o||a?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r(i,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}))},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":119}],136:[function(e,t,n){t.exports=e("events").EventEmitter},{events:83}],137:[function(e,t,n){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],138:[function(e,t,n){arguments[4][45][0].apply(n,arguments)},{dup:45,"safe-buffer":144}],139:[function(e,t,n){t.exports=e("./readable").PassThrough},{"./readable":140}],140:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":129,"./lib/_stream_passthrough.js":130,"./lib/_stream_readable.js":131,"./lib/_stream_transform.js":132,"./lib/_stream_writable.js":133}],141:[function(e,t,n){t.exports=e("./readable").Transform},{"./readable":140}],142:[function(e,t,n){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":133}],143:[function(e,t,n){(function(n){function i(){f.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function r(e,t){return e<>>32-t}function o(e,t,n,i,o,a,s,c){return r(e+(t^n^i)+a+s|0,c)+o|0}function a(e,t,n,i,o,a,s,c){return r(e+(t&n|~t&i)+a+s|0,c)+o|0}function s(e,t,n,i,o,a,s,c){return r(e+((t|~n)^i)+a+s|0,c)+o|0}function c(e,t,n,i,o,a,s,c){return r(e+(t&i|n&~i)+a+s|0,c)+o|0}function u(e,t,n,i,o,a,s,c){return r(e+(t^(n|~i))+a+s|0,c)+o|0}var l=e("inherits"),f=e("hash-base");l(i,f),i.prototype._update=function(){for(var e=new Array(16),t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,i=this._b,l=this._c,f=this._d,p=this._e;p=o(p,n=o(n,i,l,f,p,e[0],0,11),i,l=r(l,10),f,e[1],0,14),i=o(i=r(i,10),l=o(l,f=o(f,p,n,i,l,e[2],0,15),p,n=r(n,10),i,e[3],0,12),f,p=r(p,10),n,e[4],0,5),f=o(f=r(f,10),p=o(p,n=o(n,i,l,f,p,e[5],0,8),i,l=r(l,10),f,e[6],0,7),n,i=r(i,10),l,e[7],0,9),n=o(n=r(n,10),i=o(i,l=o(l,f,p,n,i,e[8],0,11),f,p=r(p,10),n,e[9],0,13),l,f=r(f,10),p,e[10],0,14),l=o(l=r(l,10),f=o(f,p=o(p,n,i,l,f,e[11],0,15),n,i=r(i,10),l,e[12],0,6),p,n=r(n,10),i,e[13],0,7),p=a(p=r(p,10),n=o(n,i=o(i,l,f,p,n,e[14],0,9),l,f=r(f,10),p,e[15],0,8),i,l=r(l,10),f,e[7],1518500249,7),i=a(i=r(i,10),l=a(l,f=a(f,p,n,i,l,e[4],1518500249,6),p,n=r(n,10),i,e[13],1518500249,8),f,p=r(p,10),n,e[1],1518500249,13),f=a(f=r(f,10),p=a(p,n=a(n,i,l,f,p,e[10],1518500249,11),i,l=r(l,10),f,e[6],1518500249,9),n,i=r(i,10),l,e[15],1518500249,7),n=a(n=r(n,10),i=a(i,l=a(l,f,p,n,i,e[3],1518500249,15),f,p=r(p,10),n,e[12],1518500249,7),l,f=r(f,10),p,e[0],1518500249,12),l=a(l=r(l,10),f=a(f,p=a(p,n,i,l,f,e[9],1518500249,15),n,i=r(i,10),l,e[5],1518500249,9),p,n=r(n,10),i,e[2],1518500249,11),p=a(p=r(p,10),n=a(n,i=a(i,l,f,p,n,e[14],1518500249,7),l,f=r(f,10),p,e[11],1518500249,13),i,l=r(l,10),f,e[8],1518500249,12),i=s(i=r(i,10),l=s(l,f=s(f,p,n,i,l,e[3],1859775393,11),p,n=r(n,10),i,e[10],1859775393,13),f,p=r(p,10),n,e[14],1859775393,6),f=s(f=r(f,10),p=s(p,n=s(n,i,l,f,p,e[4],1859775393,7),i,l=r(l,10),f,e[9],1859775393,14),n,i=r(i,10),l,e[15],1859775393,9),n=s(n=r(n,10),i=s(i,l=s(l,f,p,n,i,e[8],1859775393,13),f,p=r(p,10),n,e[1],1859775393,15),l,f=r(f,10),p,e[2],1859775393,14),l=s(l=r(l,10),f=s(f,p=s(p,n,i,l,f,e[7],1859775393,8),n,i=r(i,10),l,e[0],1859775393,13),p,n=r(n,10),i,e[6],1859775393,6),p=s(p=r(p,10),n=s(n,i=s(i,l,f,p,n,e[13],1859775393,5),l,f=r(f,10),p,e[11],1859775393,12),i,l=r(l,10),f,e[5],1859775393,7),i=c(i=r(i,10),l=c(l,f=s(f,p,n,i,l,e[12],1859775393,5),p,n=r(n,10),i,e[1],2400959708,11),f,p=r(p,10),n,e[9],2400959708,12),f=c(f=r(f,10),p=c(p,n=c(n,i,l,f,p,e[11],2400959708,14),i,l=r(l,10),f,e[10],2400959708,15),n,i=r(i,10),l,e[0],2400959708,14),n=c(n=r(n,10),i=c(i,l=c(l,f,p,n,i,e[8],2400959708,15),f,p=r(p,10),n,e[12],2400959708,9),l,f=r(f,10),p,e[4],2400959708,8),l=c(l=r(l,10),f=c(f,p=c(p,n,i,l,f,e[13],2400959708,9),n,i=r(i,10),l,e[3],2400959708,14),p,n=r(n,10),i,e[7],2400959708,5),p=c(p=r(p,10),n=c(n,i=c(i,l,f,p,n,e[15],2400959708,6),l,f=r(f,10),p,e[14],2400959708,8),i,l=r(l,10),f,e[5],2400959708,6),i=u(i=r(i,10),l=c(l,f=c(f,p,n,i,l,e[6],2400959708,5),p,n=r(n,10),i,e[2],2400959708,12),f,p=r(p,10),n,e[4],2840853838,9),f=u(f=r(f,10),p=u(p,n=u(n,i,l,f,p,e[0],2840853838,15),i,l=r(l,10),f,e[5],2840853838,5),n,i=r(i,10),l,e[9],2840853838,11),n=u(n=r(n,10),i=u(i,l=u(l,f,p,n,i,e[7],2840853838,6),f,p=r(p,10),n,e[12],2840853838,8),l,f=r(f,10),p,e[2],2840853838,13),l=u(l=r(l,10),f=u(f,p=u(p,n,i,l,f,e[10],2840853838,12),n,i=r(i,10),l,e[14],2840853838,5),p,n=r(n,10),i,e[1],2840853838,12),p=u(p=r(p,10),n=u(n,i=u(i,l,f,p,n,e[3],2840853838,13),l,f=r(f,10),p,e[8],2840853838,14),i,l=r(l,10),f,e[11],2840853838,11),i=u(i=r(i,10),l=u(l,f=u(f,p,n,i,l,e[6],2840853838,8),p,n=r(n,10),i,e[15],2840853838,5),f,p=r(p,10),n,e[13],2840853838,6),f=r(f,10);var d=this._a,h=this._b,m=this._c,v=this._d,b=this._e;b=u(b,d=u(d,h,m,v,b,e[5],1352829926,8),h,m=r(m,10),v,e[14],1352829926,9),h=u(h=r(h,10),m=u(m,v=u(v,b,d,h,m,e[7],1352829926,9),b,d=r(d,10),h,e[0],1352829926,11),v,b=r(b,10),d,e[9],1352829926,13),v=u(v=r(v,10),b=u(b,d=u(d,h,m,v,b,e[2],1352829926,15),h,m=r(m,10),v,e[11],1352829926,15),d,h=r(h,10),m,e[4],1352829926,5),d=u(d=r(d,10),h=u(h,m=u(m,v,b,d,h,e[13],1352829926,7),v,b=r(b,10),d,e[6],1352829926,7),m,v=r(v,10),b,e[15],1352829926,8),m=u(m=r(m,10),v=u(v,b=u(b,d,h,m,v,e[8],1352829926,11),d,h=r(h,10),m,e[1],1352829926,14),b,d=r(d,10),h,e[10],1352829926,14),b=c(b=r(b,10),d=u(d,h=u(h,m,v,b,d,e[3],1352829926,12),m,v=r(v,10),b,e[12],1352829926,6),h,m=r(m,10),v,e[6],1548603684,9),h=c(h=r(h,10),m=c(m,v=c(v,b,d,h,m,e[11],1548603684,13),b,d=r(d,10),h,e[3],1548603684,15),v,b=r(b,10),d,e[7],1548603684,7),v=c(v=r(v,10),b=c(b,d=c(d,h,m,v,b,e[0],1548603684,12),h,m=r(m,10),v,e[13],1548603684,8),d,h=r(h,10),m,e[5],1548603684,9),d=c(d=r(d,10),h=c(h,m=c(m,v,b,d,h,e[10],1548603684,11),v,b=r(b,10),d,e[14],1548603684,7),m,v=r(v,10),b,e[15],1548603684,7),m=c(m=r(m,10),v=c(v,b=c(b,d,h,m,v,e[8],1548603684,12),d,h=r(h,10),m,e[12],1548603684,7),b,d=r(d,10),h,e[4],1548603684,6),b=c(b=r(b,10),d=c(d,h=c(h,m,v,b,d,e[9],1548603684,15),m,v=r(v,10),b,e[1],1548603684,13),h,m=r(m,10),v,e[2],1548603684,11),h=s(h=r(h,10),m=s(m,v=s(v,b,d,h,m,e[15],1836072691,9),b,d=r(d,10),h,e[5],1836072691,7),v,b=r(b,10),d,e[1],1836072691,15),v=s(v=r(v,10),b=s(b,d=s(d,h,m,v,b,e[3],1836072691,11),h,m=r(m,10),v,e[7],1836072691,8),d,h=r(h,10),m,e[14],1836072691,6),d=s(d=r(d,10),h=s(h,m=s(m,v,b,d,h,e[6],1836072691,6),v,b=r(b,10),d,e[9],1836072691,14),m,v=r(v,10),b,e[11],1836072691,12),m=s(m=r(m,10),v=s(v,b=s(b,d,h,m,v,e[8],1836072691,13),d,h=r(h,10),m,e[12],1836072691,5),b,d=r(d,10),h,e[2],1836072691,14),b=s(b=r(b,10),d=s(d,h=s(h,m,v,b,d,e[10],1836072691,13),m,v=r(v,10),b,e[0],1836072691,13),h,m=r(m,10),v,e[4],1836072691,7),h=a(h=r(h,10),m=a(m,v=s(v,b,d,h,m,e[13],1836072691,5),b,d=r(d,10),h,e[8],2053994217,15),v,b=r(b,10),d,e[6],2053994217,5),v=a(v=r(v,10),b=a(b,d=a(d,h,m,v,b,e[4],2053994217,8),h,m=r(m,10),v,e[1],2053994217,11),d,h=r(h,10),m,e[3],2053994217,14),d=a(d=r(d,10),h=a(h,m=a(m,v,b,d,h,e[11],2053994217,14),v,b=r(b,10),d,e[15],2053994217,6),m,v=r(v,10),b,e[0],2053994217,14),m=a(m=r(m,10),v=a(v,b=a(b,d,h,m,v,e[5],2053994217,6),d,h=r(h,10),m,e[12],2053994217,9),b,d=r(d,10),h,e[2],2053994217,12),b=a(b=r(b,10),d=a(d,h=a(h,m,v,b,d,e[13],2053994217,9),m,v=r(v,10),b,e[9],2053994217,12),h,m=r(m,10),v,e[7],2053994217,5),h=o(h=r(h,10),m=a(m,v=a(v,b,d,h,m,e[10],2053994217,15),b,d=r(d,10),h,e[14],2053994217,8),v,b=r(b,10),d,e[12],0,8),v=o(v=r(v,10),b=o(b,d=o(d,h,m,v,b,e[15],0,5),h,m=r(m,10),v,e[10],0,12),d,h=r(h,10),m,e[4],0,9),d=o(d=r(d,10),h=o(h,m=o(m,v,b,d,h,e[1],0,12),v,b=r(b,10),d,e[5],0,5),m,v=r(v,10),b,e[8],0,14),m=o(m=r(m,10),v=o(v,b=o(b,d,h,m,v,e[7],0,6),d,h=r(h,10),m,e[6],0,8),b,d=r(d,10),h,e[2],0,13),b=o(b=r(b,10),d=o(d,h=o(h,m,v,b,d,e[13],0,6),m,v=r(v,10),b,e[14],0,5),h,m=r(m,10),v,e[0],0,15),h=o(h=r(h,10),m=o(m,v=o(v,b,d,h,m,e[3],0,13),b,d=r(d,10),h,e[9],0,11),v,b=r(b,10),d,e[11],0,11),v=r(v,10);var y=this._b+l+v|0;this._b=this._c+f+b|0,this._c=this._d+p+d|0,this._d=this._e+n+h|0,this._e=this._a+i+m|0,this._a=y},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:47,"hash-base":85,inherits:101}],144:[function(e,t,n){function i(e,t){for(var n in e)t[n]=e[n]}function r(e,t,n){return a(e,t,n)}var o=e("buffer"),a=o.Buffer;a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?t.exports=o:(i(o,n),n.Buffer=r),i(a,r),r.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},r.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=a(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}},{buffer:47}],145:[function(e,t,n){t.exports=e("scryptsy")},{scryptsy:146}],146:[function(e,t,n){(function(n){function i(e,t,i,r,o){if(n.isBuffer(e)&&n.isBuffer(i))e.copy(i,r,t,t+o);else for(;o--;)i[r++]=e[t++]}var r=e("pbkdf2").pbkdf2Sync,o=2147483647;t.exports=function(e,t,a,s,c,u,l){function f(e,t,n,r){var o;for(i(e,t+64*(2*r-1),_,0,64),o=0;o<2*r;o++)h(e,64*o,_,0,64),d(_),i(_,0,e,n+64*o,64);for(o=0;o>>32-t}function d(e){var t;for(t=0;t<16;t++)y[t]=(255&e[4*t+0])<<0,y[t]|=(255&e[4*t+1])<<8,y[t]|=(255&e[4*t+2])<<16,y[t]|=(255&e[4*t+3])<<24;for(i(y,0,g,0,16),t=8;t>0;t-=2)g[4]^=p(g[0]+g[12],7),g[8]^=p(g[4]+g[0],9),g[12]^=p(g[8]+g[4],13),g[0]^=p(g[12]+g[8],18),g[9]^=p(g[5]+g[1],7),g[13]^=p(g[9]+g[5],9),g[1]^=p(g[13]+g[9],13),g[5]^=p(g[1]+g[13],18),g[14]^=p(g[10]+g[6],7),g[2]^=p(g[14]+g[10],9),g[6]^=p(g[2]+g[14],13),g[10]^=p(g[6]+g[2],18),g[3]^=p(g[15]+g[11],7),g[7]^=p(g[3]+g[15],9),g[11]^=p(g[7]+g[3],13),g[15]^=p(g[11]+g[7],18),g[1]^=p(g[0]+g[3],7),g[2]^=p(g[1]+g[0],9),g[3]^=p(g[2]+g[1],13),g[0]^=p(g[3]+g[2],18),g[6]^=p(g[5]+g[4],7),g[7]^=p(g[6]+g[5],9),g[4]^=p(g[7]+g[6],13),g[5]^=p(g[4]+g[7],18),g[11]^=p(g[10]+g[9],7),g[8]^=p(g[11]+g[10],9),g[9]^=p(g[8]+g[11],13),g[10]^=p(g[9]+g[8],18),g[12]^=p(g[15]+g[14],7),g[13]^=p(g[12]+g[15],9),g[14]^=p(g[13]+g[12],13),g[15]^=p(g[14]+g[13],18);for(t=0;t<16;++t)y[t]=g[t]+y[t];for(t=0;t<16;t++){var n=4*t;e[n+0]=y[t]>>0&255,e[n+1]=y[t]>>8&255,e[n+2]=y[t]>>16&255,e[n+3]=y[t]>>24&255}}function h(e,t,n,i,r){for(var o=0;o 0 and a power of 2");if(a>o/128/s)throw Error("Parameter N is too large");if(s>o/128/c)throw Error("Parameter r is too large");var m,v=new n(256*s),b=new n(128*s*a),y=new Int32Array(16),g=new Int32Array(16),_=new n(64),x=r(e,t,1,128*c*s,"sha256");if(l){var w=c*a*2,k=0;m=function(){++k%1e3==0&&l({current:k,total:w,percent:k/w*100})}}for(var j=0;j=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var i=4294967295&n,r=(n-i)/4294967296;this._block.writeUInt32BE(r,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":144}],148:[function(e,t,n){(n=t.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),n.sha1=e("./sha1"),n.sha224=e("./sha224"),n.sha256=e("./sha256"),n.sha384=e("./sha384"),n.sha512=e("./sha512")},{"./sha":149,"./sha1":150,"./sha224":151,"./sha256":152,"./sha384":153,"./sha512":154}],149:[function(e,t,n){function i(){this.init(),this._w=f,c.call(this,64,56)}function r(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function a(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}var s=e("inherits"),c=e("./hash"),u=e("safe-buffer").Buffer,l=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);s(i,c),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,s=0|this._c,c=0|this._d,u=0|this._e,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<80;++f)t[f]=t[f-3]^t[f-8]^t[f-14]^t[f-16];for(var p=0;p<80;++p){var d=~~(p/20),h=r(n)+a(d,i,s,c)+u+t[p]+l[d]|0;u=c,c=s,s=o(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=c+this._d|0,this._e=u+this._e|0},i.prototype._hash=function(){var e=u.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i},{"./hash":147,inherits:101,"safe-buffer":144}],150:[function(e,t,n){function i(){this.init(),this._w=p,u.call(this,64,56)}function r(e){return e<<1|e>>>31}function o(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function s(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}var c=e("inherits"),u=e("./hash"),l=e("safe-buffer").Buffer,f=[1518500249,1859775393,-1894007588,-899497514],p=new Array(80);c(i,u),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,c=0|this._c,u=0|this._d,l=0|this._e,p=0;p<16;++p)t[p]=e.readInt32BE(4*p);for(;p<80;++p)t[p]=r(t[p-3]^t[p-8]^t[p-14]^t[p-16]);for(var d=0;d<80;++d){var h=~~(d/20),m=o(n)+s(h,i,c,u)+l+t[d]+f[h]|0;l=u,u=c,c=a(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=l+this._e|0},i.prototype._hash=function(){var e=l.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i},{"./hash":147,inherits:101,"safe-buffer":144}],151:[function(e,t,n){function i(){this.init(),this._w=c,a.call(this,64,56)}var r=e("inherits"),o=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,c=new Array(64);r(i,o),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=i},{"./hash":147,"./sha256":152,inherits:101,"safe-buffer":144}],152:[function(e,t,n){function i(){this.init(),this._w=h,f.call(this,64,56)}function r(e,t,n){return n^e&(t^n)}function o(e,t,n){return e&t|n&(e|t)}function a(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var l=e("inherits"),f=e("./hash"),p=e("safe-buffer").Buffer,d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=new Array(64);l(i,f),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,l=0|this._c,f=0|this._d,p=0|this._e,h=0|this._f,m=0|this._g,v=0|this._h,b=0;b<16;++b)t[b]=e.readInt32BE(4*b);for(;b<64;++b)t[b]=u(t[b-2])+t[b-7]+c(t[b-15])+t[b-16]|0;for(var y=0;y<64;++y){var g=v+s(p)+r(p,h,m)+d[y]+t[y]|0,_=a(n)+o(n,i,l)|0;v=m,m=h,h=p,p=f+g|0,f=l,l=i,i=n,n=g+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=l+this._c|0,this._d=f+this._d|0,this._e=p+this._e|0,this._f=h+this._f|0,this._g=m+this._g|0,this._h=v+this._h|0},i.prototype._hash=function(){var e=p.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=i},{"./hash":147,inherits:101,"safe-buffer":144}],153:[function(e,t,n){function i(){this.init(),this._w=c,a.call(this,128,112)}var r=e("inherits"),o=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,c=new Array(160);r(i,o),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){function e(e,n,i){t.writeInt32BE(e,i),t.writeInt32BE(n,i+4)}var t=s.allocUnsafe(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=i},{"./hash":147,"./sha512":154,inherits:101,"safe-buffer":144}],154:[function(e,t,n){function i(){this.init(),this._w=b,h.call(this,128,112)}function r(e,t,n){return n^e&(t^n)}function o(e,t,n){return e&t|n&(e|t)}function a(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function p(e,t){return e>>>0>>0?1:0}var d=e("inherits"),h=e("./hash"),m=e("safe-buffer").Buffer,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],b=new Array(160);d(i,h),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._ah,i=0|this._bh,d=0|this._ch,h=0|this._dh,m=0|this._eh,b=0|this._fh,y=0|this._gh,g=0|this._hh,_=0|this._al,x=0|this._bl,w=0|this._cl,k=0|this._dl,j=0|this._el,S=0|this._fl,E=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var M=t[C-30],T=t[C-30+1],P=c(M,T),F=u(T,M),I=l(M=t[C-4],T=t[C-4+1]),B=f(T,M),R=t[C-14],O=t[C-14+1],N=t[C-32],D=t[C-32+1],L=F+O|0,q=P+R+p(L,F)|0;q=(q=q+I+p(L=L+B|0,B)|0)+N+p(L=L+D|0,D)|0,t[C]=q,t[C+1]=L}for(var z=0;z<160;z+=2){q=t[z],L=t[z+1];var U=o(n,i,d),H=o(_,x,w),V=a(n,_),K=a(_,n),W=s(m,j),X=s(j,m),G=v[z],$=v[z+1],J=r(m,b,y),Q=r(j,S,E),Y=A+X|0,Z=g+W+p(Y,A)|0;Z=(Z=(Z=Z+J+p(Y=Y+Q|0,Q)|0)+G+p(Y=Y+$|0,$)|0)+q+p(Y=Y+L|0,L)|0;var ee=K+H|0,te=V+U+p(ee,K)|0;g=y,A=E,y=b,E=S,b=m,S=j,m=h+Z+p(j=k+Y|0,k)|0,h=d,k=w,d=i,w=x,i=n,x=_,n=Z+te+p(_=Y+ee|0,Y)|0}this._al=this._al+_|0,this._bl=this._bl+x|0,this._cl=this._cl+w|0,this._dl=this._dl+k|0,this._el=this._el+j|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+n+p(this._al,_)|0,this._bh=this._bh+i+p(this._bl,x)|0,this._ch=this._ch+d+p(this._cl,w)|0,this._dh=this._dh+h+p(this._dl,k)|0,this._eh=this._eh+m+p(this._el,j)|0,this._fh=this._fh+b+p(this._fl,S)|0,this._gh=this._gh+y+p(this._gl,E)|0,this._hh=this._hh+g+p(this._hl,A)|0},i.prototype._hash=function(){function e(e,n,i){t.writeInt32BE(e,i),t.writeInt32BE(n,i+4)}var t=m.allocUnsafe(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=i},{"./hash":147,inherits:101,"safe-buffer":144}],155:[function(e,t,n){function i(){r.call(this)}t.exports=i;var r=e("events").EventEmitter;e("inherits")(i,r),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function i(){u.readable&&u.resume&&u.resume()}function o(){l||(l=!0,e.end())}function a(){l||(l=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){u.removeListener("data",n),e.removeListener("drain",i),u.removeListener("end",o),u.removeListener("close",a),u.removeListener("error",s),e.removeListener("error",s),u.removeListener("end",c),u.removeListener("close",c),e.removeListener("close",c)}var u=this;u.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(u.on("end",o),u.on("close",a));var l=!1;return u.on("error",s),e.on("error",s),u.on("end",c),u.on("close",c),e.on("close",c),e.emit("pipe",u),e}},{events:83,inherits:101,"readable-stream/duplex.js":128,"readable-stream/passthrough.js":139,"readable-stream/readable.js":140,"readable-stream/transform.js":141,"readable-stream/writable.js":142}],156:[function(e,t,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var i=!1;return function(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],157:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;nl||u===l&&"application/"===t[c].substr(0,12)))continue}t[c]=i}}})}(n.extensions,n.types)},{"mime-db":162,path:113}],164:[function(e,t,n){var i=e("trim"),r=e("for-each"),o=function(e){return"[object Array]"===Object.prototype.toString.call(e)};t.exports=function(e){if(!e)return{};var t={};return r(i(e).split("\n"),function(e){var n=e.indexOf(":"),r=i(e.slice(0,n)).toLowerCase(),a=i(e.slice(n+1));void 0===t[r]?t[r]=a:o(t[r])?t[r].push(a):t[r]=[t[r],a]}),t}},{"for-each":158,trim:171}],165:[function(e,t,n){var i=e("strict-uri-encode");n.extract=function(e){return e.split("?")[1]||""},n.parse=function(e){return"string"!=typeof e?{}:(e=e.trim().replace(/^(\?|#|&)/,""))?e.split("&").reduce(function(e,t){var n=t.replace(/\+/g," ").split("="),i=n.shift(),r=n.length>0?n.join("="):void 0;return i=decodeURIComponent(i),r=void 0===r?null:decodeURIComponent(r),e.hasOwnProperty(i)?Array.isArray(e[i])?e[i].push(r):e[i]=[e[i],r]:e[i]=r,e},{}):{}},n.stringify=function(e){return e?Object.keys(e).sort().map(function(t){var n=e[t];return Array.isArray(n)?n.sort().map(function(e){return i(t)+"="+i(e)}).join("&"):i(t)+"="+i(n)}).filter(function(e){return e.length>0}).join("&"):""}},{"strict-uri-encode":166}],166:[function(e,t,n){t.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},{}],167:[function(e,t,n){t.exports={"windows-amd64":{archive:"swarm-windows-amd64-1.6.7.exe",binaryMD5:"c2d827dc4553d9b91a7d6c1d5a6140fd",archiveMD5:"059196d21548060a18a12e17cc0ee59a"},"linux-amd64":{archive:"swarm-linux-amd64-1.6.7",binaryMD5:"85002d79b8ebc2d2f2f10fb198636a81",archiveMD5:"3e8874299ab8c0e3043d70ebb6673879"},"linux-386":{archive:"swarm-linux-386-1.6.7",binaryMD5:"35bc2ab976f60f96a2cede117e0df19d",archiveMD5:"7868a86c9cbdf8ac7ac2e5682b4ce40f"},"darwin-amd64":{archive:"swarm-darwin-amd64-1.6.7",binaryMD5:"c499b186645229260dd6ab685dd58f07",archiveMD5:"0794d111e5018eac3b657bcb29851121"},"linux-arm5":{archive:"swarm-linux-arm5-1.6.7",binaryMD5:"516fcd85246c905529442cd9b689c12f",archiveMD5:"47312708d417cb196b07ba0af1d3abb4"},"linux-arm6":{archive:"swarm-linux-arm6-1.6.7",binaryMD5:"82ff7bdbe388b4a190f4101c5150d3b4",archiveMD5:"350276de7bb175a15c314cfc4cb7f8fd"},"linux-mips":{archive:"swarm-linux-mips-1.6.7",binaryMD5:"e1e95280441c0ca35633927792ef5317",archiveMD5:"8fb4b64e94cd73aa718db787b9d4c53e"},"linux-arm7":{archive:"swarm-linux-arm7-1.6.7",binaryMD5:"bfc0b4d1c86d8a975af052fc7854bdd3",archiveMD5:"4378641d8e1e1fbb947f941c8fca8613"},"linux-arm64":{archive:"swarm-linux-arm64-1.6.7",binaryMD5:"bbac21a6c6fa8208f67ca4123d3f948a",archiveMD5:"4e503160327c5fbcca0414f17c54e5ee"},"linux-mipsle":{archive:"swarm-linux-mipsle-1.6.7",binaryMD5:"a82f191b2f9d2c470d0273219c820657",archiveMD5:"3016bdb6d237ae654c0cdf36fe85dc7c"},"windows-386":{archive:"swarm-windows-386-1.6.7.exe",binaryMD5:"ce0b34640642e58068ae5a359faef102",archiveMD5:"640aede4da08a3a9d8a6ac0434ba7c0f"},"linux-mips64":{archive:"swarm-linux-mips64-1.6.7",binaryMD5:"9da967664f384817adb5083fd1ffe8f1",archiveMD5:"357a33be470f8f89ba2619957a08deff"},"linux-mips64le":{archive:"swarm-linux-mips64le-1.6.7",binaryMD5:"ec1abcf7b216e87645ec83954d8344cd",archiveMD5:"a81fd0158190d99813c738ffa4f87627"}}},{}],168:[function(e,t,n){var i=function(){throw"This swarm.js function isn't available on the browser."},r={readFile:i},o={download:i,safeDownloadArchived:i,directoryTree:i},a={platform:i,arch:i},s={join:i,slice:i},c={spawn:i},u=e("./swarm");t.exports=u({fsp:r,files:o,os:a,path:s,child_process:c})},{"./swarm":170}],169:[function(e,t,n){(function(e){var n=function(t){return function(){return new Promise(function(n,i){var r=function(i){var r={},o=i.target.files.length,a=0;[].map.call(i.target.files,function(i){var s=new FileReader;s.onload=function(s){var c=new e(s.target.result);if("directory"===t){var u=i.webkitRelativePath;r[u.slice(u.indexOf("/")+1)]={type:"text/plain",data:c},++a===o&&n(r)}else if("file"===t){var l=i.webkitRelativePath;n({type:mimetype.lookup(l),data:c})}else n(c)},s.readAsArrayBuffer(i)})},o=void 0;"directory"===t?((o=document.createElement("input")).addEventListener("change",r),o.type="file",o.webkitdirectory=!0,o.mozdirectory=!0,o.msdirectory=!0,o.odirectory=!0,o.directory=!0):((o=document.createElement("input")).addEventListener("change",r),o.type="file");var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!1),o.dispatchEvent(a)})}};t.exports={data:n("data"),file:n("file"),directory:n("directory")}}).call(this,e("buffer").Buffer)},{buffer:47}],170:[function(e,t,n){var i=e("mime-types"),r=e("./pick.js"),o=e("xhr-request-promise"),a=e("./../archives/archives.json"),s=e("buffer").Buffer;t.exports=function(e){var t=e.fsp,n=e.files,c=e.os,u=e.path,l=e.child_process,f=function(e){return function(t){return function(n){return n[e]=t,n}}},p=function(e){return function(t){for(var n={},i=0,r=e.length;i0){var o=u.join(n,r);i.push(g(e)(t[r])(o))}return Promise.all(i).then(function(){return n})})}}},x=function(e){return function(t){return o(e+"/bzzr:/",{body:"string"==typeof t?new s(t):t,method:"POST"})}},w=function(e){return function(t){return function(n){return function(i){return function r(a){var s="/"===n[0]?n:"/"+n,c=e+"/bzz:/"+t+s,u={method:"PUT",headers:{"Content-Type":i.type},body:i.data};return o(c,u).catch(function(e){return a>0&&r(a-1)})}(3)}}}},k=function(e){return function(t){return S(e)({"":t})}},j=function(e){return function(n){return t.readFile(n).then(function(t){return k(e)({type:i.lookup(n),data:t})})}},S=function(e){return function(t){return x(e)("{}").then(function(n){var i=function(n){return function(i){return w(e)(i)(n)(t[n])}};return Object.keys(t).reduce(function(e,t){return e.then(i(t))},Promise.resolve(n))})}},E=function(e){return function(n){return t.readFile(n).then(x(e))}},A=function(e){return function(r){return function(o){return n.directoryTree(o).then(function(e){return Promise.all(e.map(function(e){return t.readFile(e)})).then(function(t){var n=e.map(function(e){return e.slice(o.length)}),r=e.map(function(e){return i.lookup(e)||"text/plain"});return p(n)(t.map(function(e,t){return{type:r[t],data:e}}))})}).then(function(e){return d(r?{"":e[r]}:{})(e)}).then(S(e))}}},C=function(e){return function(t){if("data"===t.pick)return r.data().then(x(e));if("file"===t.pick)return r.file().then(k(e));if("directory"===t.pick)return r.directory().then(S(e));if(t.path)switch(t.kind){case"data":return E(e)(t.path);case"file":return j(e)(t.path);case"directory":return A(e)(t.defaultFile)(t.path)}else{if("string"==typeof t)return x(e)(new s(t));if(t.length)return x(e)(t);if(t instanceof Object)return S(e)(t)}return Promise.reject(new Error("Bad arguments"))}},M=function(e){return function(t){return function(n){return B(e)(t).then(function(i){return i?n?_(e)(t)(n):y(e)(t):n?g(e)(t)(n):m(e)(t)})}}},T=function(e,t){var i=c.platform().replace("win32","windows")+"-"+("x64"===c.arch()?"amd64":"386"),r=(t||a)[i],o="http://ethereum-mist.s3.amazonaws.com/swarm/"+r.archive+".tar.gz",s=r.archiveMD5,u=r.binaryMD5;return n.safeDownloadArchived(o)(s)(u)(e)},P=function(e){return new Promise(function(t,n){var i=l.spawn,r=function(e){return function(t){return-1!==(""+t).indexOf(e)}},o=e.account,a=e.password,s=e.dataDir,c=e.ensApi,u=e.privateKey,f=0,p=i(e.binPath,["--bzzaccount",o||u,"--datadir",s,"--ens-api",c]),d=function(e){0===f&&r("Passphrase")(e)?setTimeout(function(){f=1,p.stdin.write(a+"\n")},500):r("Swarm http proxy started")(e)&&(f=2,clearTimeout(h),t(p))};p.stdout.on("data",d),p.stderr.on("data",d);var h=setTimeout(function(){return n(new Error("Couldn't start swarm process."))},2e4)})},F=function(e){return new Promise(function(t,n){e.stderr.removeAllListeners("data"),e.stdout.removeAllListeners("data"),e.stdin.removeAllListeners("error"),e.removeAllListeners("error"),e.removeAllListeners("exit"),e.kill("SIGINT");var i=setTimeout(function(){return e.kill("SIGKILL")},8e3);e.once("close",function(){clearTimeout(i),t()})})},I=function(e){return x(e)("test").then(function(e){return"c9a99c7d326dcc6316f32fe2625b311f6dc49a175e6877681ded93137d3569e7"===e}).catch(function(){return!1})},B=function(e){return function(t){return m(e)(t).then(function(e){return!!JSON.parse(e.toString()).entries}).catch(function(){return!1})}},R=function(e){return function(t,n,i,r,o){return void 0!==t&&(e=e(t)),void 0!==n&&(e=e(n)),void 0!==i&&(e=e(i)),void 0!==r&&(e=e(r)),void 0!==o&&(e=e(o)),e}},O=function(e){return{download:function(t,n){return M(e)(t)(n)},downloadData:R(m(e)),downloadDataToDisk:R(g(e)),downloadDirectory:R(y(e)),downloadDirectoryToDisk:R(_(e)),downloadEntries:R(v(e)),downloadRoutes:R(b(e)),isAvailable:function(){return I(e)},upload:function(t){return C(e)(t)},uploadData:R(x(e)),uploadFile:R(k(e)),uploadFileFromDisk:R(k(e)),uploadDataFromDisk:R(E(e)),uploadDirectory:R(S(e)),uploadDirectoryFromDisk:R(A(e)),uploadToManifest:R(w(e)),pick:r}};return{at:O,local:function(e){return function(t){return I("http://localhost:8500").then(function(n){return n?t(O("http://localhost:8500")).then(function(){}):T(e.binPath,e.archives).onData(function(t){return(e.onProgress||function(){})(t.length)}).then(function(){return P(e)}).then(function(e){return t(O("http://localhost:8500")).then(function(){return e})}).then(F)})}},download:M,downloadBinary:T,downloadData:m,downloadDataToDisk:g,downloadDirectory:y,downloadDirectoryToDisk:_,downloadEntries:v,downloadRoutes:b,isAvailable:I,startProcess:P,stopProcess:F,upload:C,uploadData:x,uploadDataFromDisk:E,uploadFile:k,uploadFileFromDisk:j,uploadDirectory:S,uploadDirectoryFromDisk:A,uploadToManifest:w,pick:r}}},{"./../archives/archives.json":167,"./pick.js":169,buffer:47,"mime-types":163,"xhr-request-promise":174}],171:[function(e,t,n){(n=t.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},n.right=function(e){return e.replace(/\s*$/,"")}},{}],172:[function(e,t,n){(function(){function e(e){function t(t,n,i,r,o,a){for(;o>=0&&o0?0:s-1;return arguments.length<3&&(r=n[a?a[c]:c],c+=e),t(n,i,r,a,c,s)}}function i(e){return function(t,n,i){n=w(n,i);for(var r=A(t),o=e>0?0:r-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return o=n(i,r),i[o]===r?o:-1;if(r!==r)return(o=t(p.call(i,a,s),_.isNaN))>=0?o+a:-1;for(o=e>0?a:s-1;o>=0&&o=0&&t<=E};_.each=_.forEach=function(e,t,n){t=x(t,n);var i,r;if(C(e))for(i=0,r=e.length;i=0},_.invoke=function(e,t){var n=p.call(arguments,2),i=_.isFunction(t);return _.map(e,function(e){var r=i?t:e[t];return null==r?r:r.apply(e,n)})},_.pluck=function(e,t){return _.map(e,_.property(t))},_.where=function(e,t){return _.filter(e,_.matcher(t))},_.findWhere=function(e,t){return _.find(e,_.matcher(t))},_.max=function(e,t,n){var i,r,o=-1/0,a=-1/0;if(null==t&&null!=e)for(var s=0,c=(e=C(e)?e:_.values(e)).length;so&&(o=i);else t=w(t,n),_.each(e,function(e,n,i){((r=t(e,n,i))>a||r===-1/0&&o===-1/0)&&(o=e,a=r)});return o},_.min=function(e,t,n){var i,r,o=1/0,a=1/0;if(null==t&&null!=e)for(var s=0,c=(e=C(e)?e:_.values(e)).length;si||void 0===n)return 1;if(nt?(a&&(clearTimeout(a),a=null),s=u,o=e.apply(i,r),a||(i=r=null)):a||!1===n.trailing||(a=setTimeout(c,l)),o}},_.debounce=function(e,t,n){var i,r,o,a,s,c=function c(){var u=_.now()-a;u=0?i=setTimeout(c,t-u):(i=null,n||(s=e.apply(o,r),i||(o=r=null)))};return function(){o=this,r=arguments,a=_.now();var u=n&&!i;return i||(i=setTimeout(c,t)),u&&(s=e.apply(o,r),o=r=null),s}},_.wrap=function(e,t){return _.partial(t,e)},_.negate=function(e){return function(){return!e.apply(this,arguments)}},_.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,i=e[t].apply(this,arguments);n--;)i=e[n].call(this,i);return i}},_.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},_.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},_.once=_.partial(_.before,2);var F=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];_.keys=function(e){if(!_.isObject(e))return[];if(v)return v(e);var t=[];for(var n in e)_.has(e,n)&&t.push(n);return F&&o(e,t),t},_.allKeys=function(e){if(!_.isObject(e))return[];var t=[];for(var n in e)t.push(n);return F&&o(e,t),t},_.values=function(e){for(var t=_.keys(e),n=t.length,i=Array(n),r=0;r":">",'"':""","'":"'","`":"`"},O=_.invert(R),N=function(e){var t=function(t){return e[t]},n="(?:"+_.keys(e).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(r,t):e}};_.escape=N(R),_.unescape=N(O),_.result=function(e,t,n){var i=null==e?void 0:e[t];return void 0===i&&(i=n),_.isFunction(i)?i.call(e):i};var D=0;_.uniqueId=function(e){var t=++D+"";return e?e+t:t},_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var L=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\u2028|\u2029/g,U=function(e){return"\\"+q[e]};_.template=function(e,t,n){!t&&n&&(t=n),t=_.defaults({},t,_.templateSettings);var i=RegExp([(t.escape||L).source,(t.interpolate||L).source,(t.evaluate||L).source].join("|")+"|$","g"),r=0,o="__p+='";e.replace(i,function(t,n,i,a,s){return o+=e.slice(r,s).replace(z,U),r=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t}),o+="';\n",t.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(t.variable||"obj","_",o)}catch(e){throw e.source=o,e}var s=function(e){return a.call(this,e,_)},c=t.variable||"obj";return s.source="function("+c+"){\n"+o+"}",s},_.chain=function(e){var t=_(e);return t._chain=!0,t};var H=function(e,t){return e._chain?_(t).chain():t};_.mixin=function(e){_.each(_.functions(e),function(t){var n=_[t]=e[t];_.prototype[t]=function(){var e=[this._wrapped];return f.apply(e,arguments),H(this,n.apply(_,e))}})},_.mixin(_),_.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=c[e];_.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0],H(this,n)}}),_.each(["concat","join","slice"],function(e){var t=c[e];_.prototype[e]=function(){return H(this,t.apply(this._wrapped,arguments))}}),_.prototype.value=function(){return this._wrapped},_.prototype.valueOf=_.prototype.toJSON=_.prototype.value,_.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return _})}).call(this)},{}],173:[function(e,t,n){t.exports=function(e,t){if(t){t=(t=t.trim().replace(/^(\?|#|&)/,""))?"?"+t:t;var n=e.split(/[\?\#]/)[0];t&&/\:\/\/[^\/]*$/.test(n)&&(n+="/");var i=e.match(/(\#.*)$/);e=n+t,i&&(e+=i[0])}return e}},{}],174:[function(e,t,n){var i=e("xhr-request");t.exports=function(e,t){return new Promise(function(n,r){i(e,t,function(e,t){e?r(e):n(t)})})}},{"xhr-request":175}],175:[function(e,t,n){var i=e("query-string"),r=e("url-set-query"),o=e("object-assign"),a=e("./lib/ensure-header.js"),s=e("./lib/request.js"),c="application/json",u=function(){};t.exports=function(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("must specify a URL");if("function"==typeof t&&(n=t,t={}),n&&"function"!=typeof n)throw new TypeError("expected cb to be undefined or a function");n=n||u;var l=(t=t||{}).json?"json":"text",f=(t=o({responseType:l},t)).headers||{},p=(t.method||"GET").toUpperCase(),d=t.query;return d&&("string"!=typeof d&&(d=i.stringify(d)),e=r(e,d)),"json"===t.responseType&&a(f,"Accept",c),t.json&&"GET"!==p&&"HEAD"!==p&&(a(f,"Content-Type",c),t.body=JSON.stringify(t.body)),t.method=p,t.url=e,t.headers=f,delete t.query,delete t.json,s(t,n)}},{"./lib/ensure-header.js":176,"./lib/request.js":178,"object-assign":179,"query-string":165,"url-set-query":173}],176:[function(e,t,n){t.exports=function(e,t,n){var i=t.toLowerCase();e[t]||e[i]||(e[t]=n)}},{}],177:[function(e,t,n){t.exports=function(e,t){return t?{statusCode:t.statusCode,headers:t.headers,method:e.method,url:e.url,rawRequest:t.rawRequest?t.rawRequest:t}:null}},{}],178:[function(e,t,n){var i=e("xhr"),r=e("./normalize-response");t.exports=function(e,t){delete e.uri;var n=!1;return"json"===e.responseType&&(e.responseType="text",n=!0),i(e,function(i,o,a){if(n&&!i)try{var s=o.rawRequest.responseText;a=JSON.parse(s)}catch(e){i=e}o=r(e,o),i?t(i,null,o):t(i,a,o)})}},{"./normalize-response":177,xhr:180}],179:[function(e,t,n){function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter(function(t){return o.call(e,t)})}var o=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(e,t){for(var n,o,a=i(e),s=1;s0&&(d=setTimeout(function(){if(!p){p=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}},e.timeout)),u.setRequestHeader)for(f in b)b.hasOwnProperty(f)&&u.setRequestHeader(f,b[f]);else if(e.headers&&!i(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(v||null),u}function s(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}var c=e("global/window"),u=e("is-function"),l=e("parse-headers"),f=e("xtend");t.exports=o,o.XMLHttpRequest=c.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:c.XDomainRequest,function(e,t){for(var n=0;n1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},u.prototype.getCall=function(e){return i.isFunction(this.call)?this.call(e):this.call},u.prototype.extractCallback=function(e){if(i.isFunction(e[e.length-1]))return e.pop()},u.prototype.validateArgs=function(e){if(e.length!==this.params)throw r.InvalidNumberOfParams(e.length,this.params,this.name)},u.prototype.formatInput=function(e){var t=this;return this.inputFormatter?this.inputFormatter.map(function(n,i){return n?n.call(t,e[i]):e[i]}):e},u.prototype.formatOutput=function(e){var t=this;return i.isArray(e)?e.map(function(e){return t.outputFormatter&&e?t.outputFormatter(e):e}):this.outputFormatter&&e?this.outputFormatter(e):e},u.prototype.toPayload=function(e){var t=this.getCall(e),n=this.extractCallback(e),i=this.formatInput(e);this.validateArgs(i);var r={method:t,params:i,callback:n};return this.transformPayload&&(r=this.transformPayload(r)),r},u.prototype._confirmTransaction=function(e,t,n){var r=this,l=!1,f=!0,p=0,d=0,h=null,m=i.isObject(n.params[0])&&n.params[0].gas?n.params[0].gas:null,v=i.isObject(n.params[0])&&n.params[0].data&&n.params[0].from&&!n.params[0].to,b=[new u({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:o.outputTransactionReceiptFormatter}),new u({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),new c({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:o.outputBlockFormatter}}})],y={};i.each(b,function(e){e.attachToObject(y),e.requestManager=r.requestManager});var g=function(n,i,o,c){return n?(o.unsubscribe(),l=!0,a._fireError({message:"Failed to subscribe to new newBlockHeaders to confirm the transaction receipts.",data:n},e.eventEmitter,e.reject)):(o||(o={unsubscribe:function(){clearInterval(h)}}),(c?s.resolve(c):y.getTransactionReceipt(t)).catch(function(t){o.unsubscribe(),l=!0,a._fireError({message:"Failed to check for transaction receipt:",data:t},e.eventEmitter,e.reject)}).then(function(t){if(!t||!t.blockHash)throw new Error("Receipt missing or blockHash null");return r.extraFormatters&&r.extraFormatters.receiptFormatter&&(t=r.extraFormatters.receiptFormatter(t)),e.eventEmitter.listeners("confirmation").length>0&&(e.eventEmitter.emit("confirmation",d,t),f=!1,25===++d&&(o.unsubscribe(),e.eventEmitter.removeAllListeners())),t}).then(function(t){if(v&&!l){if(!t.contractAddress)return f&&(o.unsubscribe(),l=!0),a._fireError(new Error("The transaction receipt didn't contain a contract address."),e.eventEmitter,e.reject);y.getCode(t.contractAddress,function(n,i){i&&(i.length>2?(e.eventEmitter.emit("receipt",t),r.extraFormatters&&r.extraFormatters.contractDeployFormatter?e.resolve(r.extraFormatters.contractDeployFormatter(t)):e.resolve(t),f&&e.eventEmitter.removeAllListeners()):a._fireError(new Error("The contract code couldn't be stored, please check your gas limit."),e.eventEmitter,e.reject),f&&o.unsubscribe(),l=!0)})}return t}).then(function(t){v||l||(t.outOfGas||m&&m===t.gasUsed?(t&&(t=JSON.stringify(t,null,2)),a._fireError(new Error("Transaction ran out of gas. Please provide more gas:\n"+t),e.eventEmitter,e.reject)):(e.eventEmitter.emit("receipt",t),e.resolve(t),f&&e.eventEmitter.removeAllListeners()),f&&o.unsubscribe(),l=!0)}).catch(function(){if(++p-1>=50)return o.unsubscribe(),l=!0,a._fireError(new Error("Transaction was not mined within 50 blocks, please make sure your transaction was properly send. Be aware that it might still be mined!"),e.eventEmitter,e.reject)}))},_=function(){i.isFunction(this.requestManager.provider.on)?y.subscribe("newBlockHeaders",g):h=setInterval(g,1e3)}.bind(this);y.getTransactionReceipt(t).then(function(t){if(t&&t.blockHash)return e.eventEmitter.listeners("confirmation").length>0&&setTimeout(function(){l||_()},1e3),g(null,0,null,t);l||_()}).catch(function(){l||_()})};var l=function(e,t){return i.isNumber(e)?t.wallet[e]:i.isObject(e)&&e.address&&e.privateKey?e:t.wallet[e.toLowerCase()]};u.prototype.buildCall=function(){var e=this,t="eth_sendTransaction"===e.call||"eth_sendRawTransaction"===e.call,n=function(){var n=s(!t),r=e.toPayload(Array.prototype.slice.call(arguments)),o=function(i,o){try{o=e.formatOutput(o)}catch(e){i=e}if(o instanceof Error&&(i=o),i)return i.error&&(i=i.error),a._fireError(i,n.eventEmitter,n.reject,r.callback);r.callback&&r.callback(null,o),t?(n.eventEmitter.emit("transactionHash",o),e._confirmTransaction(n,o,r)):i||n.resolve(o)},c=function(t){r.method="eth_sendRawTransaction",r.params=[t.rawTransaction],e.requestManager.send(r,o)},f=function(e,t){if(t&&t.accounts&&t.accounts.wallet&&t.accounts.wallet.length){var r;if("eth_sendTransaction"===e.method){var a=e.params[0];if((r=l(i.isObject(a)?a.from:null,t.accounts))&&r.privateKey){delete a.from;var s=t.accounts.signTransaction(a,r.privateKey);return i.isFunction(s.then)?s.then(c):c(s)}}else if("eth_sign"===e.method){var u=e.params[1];if((r=l(e.params[0],t.accounts))&&r.privateKey){var f=t.accounts.sign(u,r.privateKey);return e.callback&&e.callback(null,f.signature),void n.resolve(f.signature)}}}return t.requestManager.send(e,o)};return t&&i.isObject(r.params[0])&&!r.params[0].gasPrice?new u({name:"getGasPrice",call:"eth_gasPrice",params:0}).createFunction(e.requestManager)(function(t,n){n&&(r.params[0].gasPrice=n),f(r,e)}):f(r,e),n.eventEmitter};return n.method=e,n.request=this.request.bind(this),n},u.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},t.exports=u},{underscore:187,"web3-core-helpers":186,"web3-core-promievent":191,"web3-core-subscriptions":199,"web3-utils":273}],189:[function(e,t,n){(function(e,i){!function(e){if("object"==(void 0===n?"undefined":_typeof(n))&&void 0!==t)t.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r;"undefined"!=typeof window?r=window:void 0!==i?r=i:"undefined"!=typeof self&&(r=self),r.Promise=e()}}(function(){var t,n,r;return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof _dereq_&&_dereq_;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n||e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),i=e.shift();t.call(n,i)}else t._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},n.exports=r,n.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,n){t.exports=function(e,t,n,i){var r=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){r||(r=!0,e.prototype._propagateFrom=i.propagateFromFunction(),e.prototype._boundValue=i.boundValueFunction());var u=n(o),l=new e(t);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(u),u instanceof e){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:u};f._then(t,a,void 0,l,p),u._then(s,c,void 0,l,p),l._setOnCancel(u)}else l._resolveCallback(f);return l},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){var i;"undefined"!=typeof Promise&&(i=Promise);var r=e("./promise")();r.noConflict=function(){try{Promise===r&&(Promise=i)}catch(e){}return r},t.exports=r},{"./promise":22}],5:[function(e,t,n){var i=Object.create;if(i){var r=i(null),o=i(null);r[" size"]=o[" size"]=0}t.exports=function(t){function n(e,n){var i;if(null!=e&&(i=e[n]),"function"!=typeof i){var r="Object "+s.classString(e)+" has no method '"+s.toString(n)+"'";throw new t.TypeError(r)}return i}function i(e){return n(e,this.pop()).apply(e,this)}function r(e){return e[this]}function o(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var a,s=e("./util"),c=s.canEvaluate;s.isIdentifier;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(i,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=o;else if(c){var n=a(e);t=null!==n?n:r}else t=r;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){t.exports=function(t,n,i,r){var o=e("./util"),a=o.tryCatch,s=o.errorObj,c=t._async;t.prototype.break=t.prototype.cancel=function(){if(!r.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e.isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n.isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this.isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n=0)return r[e]}var i=!1,r=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=function(){if(i)return new t},t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var r=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=c,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=n,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(t,n,i){n.exports=function(n,i){function r(e,t){return{promise:t}}function o(){return!1}function a(e,t,n){var i=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+R.toString(e));i._attachCancellationCallback(e)})}catch(e){return e}}function s(e){if(!this.isCancellable())return this;var t=this._onCancel();void 0!==t?R.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function c(){return this._onCancelField}function u(e){this._onCancelField=e}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function p(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function d(){this._trace=new C(this._peekContext())}function h(e,t){if(O(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var i=x(e);R.notEnumerableProp(e,"stack",i.message+"\n"+i.stack.join("\n")),R.notEnumerableProp(e,"__stackCleaned__",!0)}}}function m(e,t,i){if(ee.warnings){var r,o=new B(e);if(t)i._attachExtraTrace(o);else if(ee.longStackTraces&&(r=n._peekContext()))r.attachExtraTrace(o);else{var a=x(o);o.stack=a.message+"\n"+a.stack.join("\n")}$("warning",o)||w(o,"",!0)}}function v(e,t){for(var n=0;n=0;--s)if(i[s]===o){a=s;break}for(s=a;s>=0;--s){var c=i[s];if(t[r]!==c)break;t.pop(),r--}t=i}}function g(e){for(var t=[],n=0;n0&&(t=t.slice(n)),t}function x(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?_(e):[" (No stack trace)"],{message:n,stack:g(t)}}function w(e,t,n){if("undefined"!=typeof console){var i;if(R.isObject(e)){var r=e.stack;i=t+L(r,e)}else i=t+String(e);"function"==typeof P?P(i,n):"function"!=typeof console.log&&"object"!==_typeof(console.log)||console.log(i)}}function k(e,t,n,i){var r=!1;try{"function"==typeof t&&(r=!0,"rejectionHandled"===e?t(i):t(n,i))}catch(e){I.throwLater(e)}"unhandledRejection"===e?$(e,n,i)||r||w(n,"Unhandled rejection "):$(e,i)}function j(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():R.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+S(t)+">, no stack trace)"}function S(e){return e.length<41?e:e.substr(0,38)+"..."}function E(){return"function"==typeof Z}function A(e){var t=e.match(Y);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function C(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);Z(this,C),t>32&&this.uncycle()}var M,T,P,F=n._getDomain,I=n._async,B=t("./errors").Warning,R=t("./util"),O=R.canAttachTrace,N=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,D=null,L=null,q=!1,z=!(0==R.env("BLUEBIRD_DEBUG")),U=!(0==R.env("BLUEBIRD_WARNINGS")||!z&&!R.env("BLUEBIRD_WARNINGS")),H=!(0==R.env("BLUEBIRD_LONG_STACK_TRACES")||!z&&!R.env("BLUEBIRD_LONG_STACK_TRACES")),V=0!=R.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(U||!!R.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},n.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",M,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",T,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return m(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=F();T="function"==typeof e?null===t?e:t.bind(e):void 0},n.onUnhandledRejectionHandled=function(e){var t=F();M="function"==typeof e?null===t?e:t.bind(e):void 0};var K=function(){};n.longStackTraces=function(){if(I.haveItemsQueued()&&!ee.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ee.longStackTraces&&E()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace;ee.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ee.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,i.deactivateLongStackTraces(),I.enableTrampoline(),ee.longStackTraces=!1},n.prototype._captureStackTrace=d,n.prototype._attachExtraTrace=h,i.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return ee.longStackTraces&&E()};var W=function(){try{var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),R.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!R.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),X=R.isNode?function(){return e.emit.apply(e,arguments)}:R.global?function(e){var t="on"+e.toLowerCase(),n=R.global[t];return!!n&&(n.apply(R.global,[].slice.call(arguments,1)),!0)}:function(){return!1},G={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:r},$=function(e){var t=!1;try{t=X.apply(null,arguments)}catch(e){I.throwLater(e),t=!0}var n=!1;try{n=W(e,G[e].apply(null,arguments))}catch(e){I.throwLater(e),n=!0}return n||t};n.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&K()),"warnings"in e){var t=e.warnings;ee.warnings=!!t,V=ee.warnings,R.isObject(t)&&"wForgottenReturn"in t&&(V=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ee.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=l,n.prototype._propagateFrom=f,n.prototype._onCancel=c,n.prototype._setOnCancel=u,n.prototype._attachCancellationCallback=s,n.prototype._execute=a,J=f,ee.cancellation=!0}"monitoring"in e&&(e.monitoring&&!ee.monitoring?(ee.monitoring=!0,n.prototype._fireEvent=$):!e.monitoring&&ee.monitoring&&(ee.monitoring=!1,n.prototype._fireEvent=o))},n.prototype._fireEvent=o,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var J=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)},Q=function(){return!1},Y=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;R.inherits(C,Error),i.CapturedTrace=C,C.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},i=0,r=this;void 0!==r;++i)t.push(r),r=r._parent;for(i=(e=this._length=i)-1;i>=0;--i){var o=t[i].stack;void 0===n[o]&&(n[o]=i)}for(i=0;i0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[i]._parent=void 0,t[i]._length=1;var s=i>0?t[i-1]:this;a=0;--u)t[u]._length=c,c++;return}}}},C.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=x(e),n=t.message,i=[t.stack],r=this;void 0!==r;)i.push(g(r.stack.split("\n"))),r=r._parent;y(i),b(i),R.notEnumerableProp(e,"stack",v(n,i)),R.notEnumerableProp(e,"__stackCleaned__",!0)}};var Z=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():j(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,D=e,L=t;var n=Error.captureStackTrace;return Q=function(e){return N.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return D=/@/,L=t,q=!0,function(e){e.stack=(new Error).stack};var r;try{throw new Error}catch(e){r="stack"in e}return"stack"in i||!r||"number"!=typeof Error.stackTraceLimit?(L=function(e,t){return"string"==typeof e?e:"object"!==(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t||void 0===t.name||void 0===t.message?j(t):t.toString()},null):(D=e,L=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(P=function(e){console.warn(e)},R.isNode&&e.stderr.isTTY?P=function(e,t){var n=t?"":"";console.warn(n+e+"\n")}:R.isNode||"string"!=typeof(new Error).stack||(P=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ee={warnings:U,longStackTraces:!1,cancellation:!1,monitoring:!1};return H&&n.longStackTraces(),{longStackTraces:function(){return ee.longStackTraces},warnings:function(){return ee.warnings},cancellation:function(){return ee.cancellation},monitoring:function(){return ee.monitoring},propagateFromFunction:function(){return J},boundValueFunction:function(){return p},checkForgottenReturns:function(e,t,n,i,r){if(void 0===e&&null!==t&&V){if(void 0!==r&&r._returnedNonUndefined())return;n&&(n+=" ");var o="a promise was created in a "+n+"handler but was not returned from it";i._warn(o,!0,t)}},setBounds:function(e,t){if(E()){for(var n,i,r=e.stack.split("\n"),o=t.stack.split("\n"),a=-1,s=-1,c=0;c=s||(Q=function(e){if(N.test(e))return!0;var t=A(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}},warn:m,deprecated:function(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),m(n)},CapturedTrace:C,fireDomEvent:W,fireGlobalEvent:X}}},{"./errors":12,"./util":36}],10:[function(e,t,n){t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var i=arguments[1];i instanceof e&&i.suppressUnhandledRejections();return this.caught(n,function(){return i})}}},{}],11:[function(e,t,n){t.exports=function(e,t){function n(){return o(this)}function i(e,n){return r(e,n,t,t)}var r=e.reduce,o=e.all;e.prototype.each=function(e){return this.mapSeries(e)._then(n,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,t){return i(e,t)._then(n,void 0,void 0,e,void 0)},e.mapSeries=i}},{}],12:[function(e,t,n){function i(e,t){function n(i){if(!(this instanceof n))return new n(i);f(this,"message","string"==typeof i?i:t),f(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(n,Error),n}function r(e){if(!(this instanceof r))return new r(e);f(this,"name","OperationalError"),f(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(f(this,"message",e.message),f(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,a,s=e("./es5"),c=s.freeze,u=e("./util"),l=u.inherits,f=u.notEnumerableProp,p=i("Warning","warning"),d=i("CancellationError","cancellation error"),h=i("TimeoutError","timeout error"),m=i("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(e){o=i("TypeError","type error"),a=i("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),b=0;b1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function a(){return c.call(this,this.promise._target()._settledValue())}function s(e){if(!o(this,e))return f.e=e,f}function c(e){var i=this.promise,c=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?c.call(i._boundValue()):c.call(i._boundValue(),e);if(void 0!==u){i._setReturnedNonUndefined();var p=n(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p.isCancelled()){var d=new l("late cancellation observer");return i._attachExtraTrace(d),f.e=d,f}p.isPending()&&p._attachCancellationCallback(new r(this))}return p._then(a,s,void 0,this,void 0)}}}return i.isRejected()?(o(this),f.e=e,f):(o(this),e)}var u=e("./util"),l=t.CancellationError,f=u.errorObj;return i.prototype.isFinallyHandler=function(){return 0===this.type},r.prototype._resultCancelled=function(){o(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,r){return"function"!=typeof e?this.then():this._then(n,r,void 0,new i(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,c,c)},t.prototype.tap=function(e){return this._passThrough(e,1,c)},i}},{"./util":36}],16:[function(e,t,n){t.exports=function(t,n,i,r,o,a){function s(e,n,i){for(var o=0;o0&&"function"==typeof arguments[t]){e=arguments[t]}var i=[].slice.call(arguments);e&&i.pop();var r=new n(i).promise();return void 0!==e?r.spread(e):r}}},{"./util":36}],18:[function(e,t,n){t.exports=function(t,n,i,r,o,a){function s(e,t,n,i){this.constructor$(e),this._promise._captureStackTrace();var r=u();this._callback=null===r?t:r.bind(t),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=n>=1?[]:d,this._init$(void 0,-2)}function c(e,t,n,r){if("function"!=typeof t)return i("expecting a function but got "+l.classString(t));var o="object"===(void 0===n?"undefined":_typeof(n))&&null!==n?n.concurrency:0;return o="number"==typeof o&&isFinite(o)&&o>=1?o:0,new s(e,t,o,r).promise()}var u=t._getDomain,l=e("./util"),f=l.tryCatch,p=l.errorObj,d=[];l.inherits(s,n),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var i=this._values,o=this.length(),s=this._preservedValues,c=this._limit;if(n<0){if(n=-1*n-1,i[n]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return i[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var u=this._promise,l=this._callback,d=u._boundValue();u._pushContext();var h=f(l).call(d,e,n,o),m=u._popContext();if(a.checkForgottenReturns(h,m,null!==s?"Promise.filter":"Promise.map",u),h===p)return this._reject(h.e),!0;var v=r(h,this._promise);if(v instanceof t){var b=(v=v._target())._bitField;if(0==(50397184&b))return c>=1&&this._inFlight++,i[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&b))return 0!=(16777216&b)?(this._reject(v._reason()),!0):(this._cancel(),!0);h=v._value()}i[n]=h}return++this._totalResolved>=o&&(null!==s?this._filter(i,s):this._resolve(i),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],l=arguments[2];c=a.isArray(u)?s(e).apply(l,u):s(e).call(l,u)}else c=s(e)();var f=i._popContext();return o.checkForgottenReturns(c,f,"Promise.try",i),i._resolveFromSyncValue(c),i},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){function i(e){return e instanceof Error&&c.getPrototypeOf(e)===Error.prototype}function r(e){var t;if(i(e)){(t=new s(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var n=c.keys(e),r=0;r1){var n,i=new Array(t-1),r=0;for(n=0;n0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+d.classString(e);arguments.length>1&&(n+=", "+d.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},r.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},r.prototype.spread=function(e){return"function"!=typeof e?f("expecting a function but got "+d.classString(e)):this.all()._then(e,void 0,void 0,x,void 0)},r.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},r.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new j(this).promise()},r.prototype.error=function(e){return this.caught(d.originatesFromRejection,e)},r.is=function(e){return e instanceof r},r.fromNode=r.fromCallback=function(e){var t=new r(_);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,i=F(e)(T(t,n));return i===P&&t._rejectCallback(i.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},r.all=function(e){return new j(e).promise()},r.cast=function(e){var t=k(e);return t instanceof r||((t=new r(_))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},r.resolve=r.fulfilled=r.cast,r.reject=r.rejected=function(e){var t=new r(_);return t._captureStackTrace(),t._rejectCallback(e,!0),t},r.setScheduler=function(e){if("function"!=typeof e)throw new y("expecting a function but got "+d.classString(e));var t=v._schedule;return v._schedule=e,t},r.prototype._then=function(e,t,n,i,o){var a=void 0!==o,s=a?o:new r(_),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===i&&0!=(2097152&this._bitField)&&(i=0!=(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!=(50397184&l)){var p,d,h=u._settlePromiseCtx;0!=(33554432&l)?(d=u._rejectionHandler0,p=e):0!=(16777216&l)?(d=u._fulfillmentHandler0,p=t,u._unsetRejectionIsUnhandled()):(h=u._settlePromiseLateCancellationObserver,d=new g("late cancellation observer"),u._attachExtraTrace(d),p=t),v.invoke(h,u,{handler:null===f?p:"function"==typeof p&&f.bind(p),promise:s,receiver:i,value:d})}else u._addCallbacks(e,t,s,i,f);return s},r.prototype._length=function(){return 65535&this._bitField},r.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},r.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},r.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},r.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},r.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},r.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},r.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},r.prototype._isFinal=function(){return(4194304&this._bitField)>0},r.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},r.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},r.prototype._setAsyncGuaranteed=function(){this._bitField=134217728|this._bitField},r.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==p)return void 0===t&&this._isBound()?this._boundValue():t},r.prototype._promiseAt=function(e){return this[4*e-4+2]},r.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},r.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},r.prototype._boundValue=function(){},r.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,n=e._rejectionHandler0,i=e._promise0,r=e._receiverAt(0);void 0===r&&(r=p),this._addCallbacks(t,n,i,r,null)},r.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),i=e._rejectionHandlerAt(t),r=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=p),this._addCallbacks(n,i,r,o,null)},r.prototype._addCallbacks=function(e,t,n,i,r){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=i,"function"==typeof e&&(this._fulfillmentHandler0=null===r?e:r.bind(e)),"function"==typeof t&&(this._rejectionHandler0=null===r?t:r.bind(t));else{var a=4*o-4;this[a+2]=n,this[a+3]=i,"function"==typeof e&&(this[a+0]=null===r?e:r.bind(e)),"function"==typeof t&&(this[a+1]=null===r?t:r.bind(t))}return this._setLength(o+1),o},r.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},r.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(u(),!1);var n=k(e,this);if(!(n instanceof r))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target(),o=i._bitField;if(0==(50397184&o)){var a=this._length();a>0&&i._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var n=u();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():v.settlePromises(this))}},r.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return v.fatalError(e,d.isNode);(65535&t)>0?0!=(134217728&t)?this._settlePromises():v.settlePromises(this):this._ensurePossibleRejectionHandled()}},r.prototype._fulfillPromises=function(e,t){for(var n=1;n0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var i=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,i,e),this._fulfillPromises(t,i)}this._setLength(0)}this._clearCancellationData()},r.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},r.defer=r.pending=function(){return A.deprecated("Promise.defer","new Promise"),{promise:new r(_),resolve:o,reject:a}},d.notEnumerableProp(r,"_makeSelfResolutionError",u),t("./method")(r,_,k,f,A),t("./bind")(r,_,k,A),t("./cancel")(r,j,f,A),t("./direct_resolve")(r),t("./synchronous_inspection")(r),t("./join")(r,j,k,_,A),r.Promise=r,t("./map.js")(r,j,f,k,_,A),t("./using.js")(r,f,k,E,_,A),t("./timers.js")(r,_,A),t("./generators.js")(r,f,_,k,n,A),t("./nodeify.js")(r),t("./call_get.js")(r),t("./props.js")(r,j,k,f),t("./race.js")(r,_,k,f),t("./reduce.js")(r,j,f,k,_,A),t("./settle.js")(r,j,A),t("./some.js")(r,j,f),t("./promisify.js")(r,_),t("./any.js")(r),t("./each.js")(r,_),t("./filter.js")(r,_),d.toFastProperties(r),d.toFastProperties(r.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new r(_)),A.setBounds(m.firstLineError,d.lastLineError),r}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,n){t.exports=function(t,n,i,r,o){function a(e){switch(e){case-2:return[];case-3:return{}}}function s(e){var i=this._promise=new t(n);e instanceof t&&i._propagateFrom(e,3),i._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=e("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,o){var s=i(this._values,this._promise);if(s instanceof t){var u=(s=s._target())._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=c.asArray(s)))0!==s.length?this._iterate(s):-5===o?this._resolveEmptyArray():this._resolve(a(o));else{var l=r("expecting an array or an iterable object but got "+c.classString(s)).reason();this._promise._rejectCallback(l,!1)}},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var r=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=p(this._values);else{n={};for(var i=this.length(),r=0,o=this.length();r>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){function i(e,t,n,i,r){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},r.prototype._promiseFulfilled=function(e,t){var n=new o;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},r.prototype._promiseRejected=function(e,t){var n=new o;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return i.deprecated(".settle()",".reflect()"),new r(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){t.exports=function(t,n,i){function r(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(e,t){if((0|t)!==t||t<0)return i("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new r(e),o=n.promise();return n.setHowMany(t),n.init(),o}var a=e("./util"),s=e("./errors").RangeError,c=e("./errors").AggregateError,u=a.isArray,l={};a.inherits(r,n),r.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},r.prototype.init=function(){this._initialized=!0,this._init()},r.prototype.setUnwrap=function(){this._unwrap=!0},r.prototype.howMany=function(){return this._howMany},r.prototype.setHowMany=function(e){this._howMany=e},r.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},r.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},r.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},r.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new c,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},r.prototype._fulfilled=function(){return this._totalResolved},r.prototype._rejected=function(){return this._values.length-this.length()},r.prototype._addRejected=function(e){this._values.push(e)},r.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},r.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},r.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},r.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return o(e,t)},t.prototype.some=function(e){return o(this,e)},t._SomePromiseArray=r}},{"./errors":12,"./util":36}],32:[function(e,t,n){t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=e.prototype._isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype.isCancelled=function(){return this._target()._isCancelled()},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return r.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),i.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){t.exports=function(t,n){function i(e){return e.then}function r(e){try{return i(e)}catch(e){return c.e=e,c}}function o(e){return l.call(e,"_promise0")}function a(e,i,r){var o=new t(n),a=o;r&&r._pushContext(),o._captureStackTrace(),r&&r._popContext();var u=!0,l=s.tryCatch(i).call(e,function(e){o&&(o._resolveCallback(e),o=null)},function(e){o&&(o._rejectCallback(e,u,!0),o=null)});return u=!1,o&&l===c&&(o._rejectCallback(l.e,!0,!0),o=null),a}var s=e("./util"),c=s.errorObj,u=s.isObject,l={}.hasOwnProperty;return function(e,i){if(u(e)){if(e instanceof t)return e;var s=r(e);if(s===c)return i&&i._pushContext(),l=t.reject(s.e),i&&i._popContext(),l;if("function"==typeof s){if(o(e)){var l=new t(n);return e._then(l._fulfill,l._reject,void 0,l,null),l}return a(e,s,i)}}return e}}},{"./util":36}],34:[function(e,t,n){t.exports=function(t,n,i){function r(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),c=t.TimeoutError;r.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(u,null,null,e,void 0),i.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(n),s=setTimeout(function(){a._fulfill()},+e),i.cancellation()&&a._setOnCancel(new r(s))),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return l(e,this)};var f=function(e,t,n){var i;i="string"!=typeof t?t instanceof Error?t:new c("operation timed out"):new c(t),s.markAsOriginatingFromRejection(i),e._attachExtraTrace(i),e._reject(i),null!=n&&n.cancel()};t.prototype.timeout=function(e,t){e=+e;var n,s,c=new r(setTimeout(function(){n.isPending()&&f(n,t,s)},e));return i.cancellation()?(s=this.then(),(n=s._then(o,a,void 0,c,void 0))._setOnCancel(c)):n=this._then(o,a,void 0,c,void 0),n}}},{"./util":36}],35:[function(e,t,n){t.exports=function(t,n,i,r,o,a){function s(e){setTimeout(function(){throw e},0)}function c(e){var t=i(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function u(e,n){function r(){if(a>=u)return l._fulfill();var o=c(e[a++]);if(o instanceof t&&o._isDisposable()){try{o=i(o._getDisposer().tryDispose(n),e.promise)}catch(e){return s(e)}if(o instanceof t)return o._then(r,s,null,null,null)}r()}var a=0,u=e.length,l=new t(o);return r(),l}function l(e,t,n){this._data=e,this._promise=t,this._context=n}function f(e,t,n){this.constructor$(e,t,n)}function p(e){return l.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function d(e){this.length=e,this.promise=null,this[e-1]=null}var h=e("./util"),m=e("./errors").TypeError,v=e("./util").inherits,b=h.errorObj,y=h.tryCatch;l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},l.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var i=null!==t?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,i},l.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},v(f,l),f.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},d.prototype._resultCancelled=function(){for(var e=this.length,n=0;n0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new f(e,this,r());throw new m}}},{"./errors":12,"./util":36}],36:[function(t,n,r){function o(){try{var e=M;return M=null,e.apply(this,arguments)}catch(e){return C.e=e,C}}function a(e){return M=e,o}function s(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function c(e){return"function"==typeof e||"object"===(void 0===e?"undefined":_typeof(e))&&null!==e}function u(e){return s(e)?new Error(y(e)):e}function l(e,t){var n,i=e.length,r=new Array(i+1);for(n=0;n1,i=t.length>0&&!(1===t.length&&"constructor"===t[0]),r=I.test(e+"")&&E.names(e).length>0;if(n||i||r)return!0}return!1}catch(e){return!1}}function m(e){function t(){}t.prototype=e;for(var n=8;n--;)new t;return e}function v(e){return B.test(e)}function b(e,t,n){for(var i=new Array(e),r=0;r10||t[0]>0}(),L.isNode&&L.toFastProperties(e);try{throw new Error}catch(e){L.lastLineError=e}n.exports=L},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:120}],190:[function(e,t,n){function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function r(){}var o="function"!=typeof Object.create&&"~";r.prototype._events=void 0,r.prototype.listeners=function(e,t){var n=o?o+e:e,i=this._events&&this._events[n];if(t)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var r=0,a=i.length,s=new Array(a);r1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},r.prototype.buildCall=function(){var e=this;return function(){e.subscriptions[arguments[0]]||console.warn("Subscription "+JSON.stringify(arguments[0])+" doesn't exist. Subscribing anyway.");var t=new i({subscription:e.subscriptions[arguments[0]],requestManager:e.requestManager,type:e.type});return t.subscribe.apply(t,arguments)}},t.exports={subscriptions:r,subscription:i}},{"./subscription.js":200}],200:[function(e,t,n){function i(e){a.call(this),this.id=null,this.callback=null,this.arguments=null,this._reconnectIntervalId=null,this.options={subscription:e.subscription,type:e.type,requestManager:e.requestManager}}var r=e("underscore"),o=e("web3-core-helpers").errors,a=e("eventemitter3");(i.prototype=Object.create(a.prototype)).constructor=i,i.prototype._extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},i.prototype._validateArgs=function(e){var t=this.options.subscription;if(t||(t={}),t.params||(t.params=0),e.length!==t.params)throw o.InvalidNumberOfParams(e.length,t.params+1,e[0])},i.prototype._formatInput=function(e){var t=this.options.subscription;return t&&t.inputFormatter?t.inputFormatter.map(function(t,n){return t?t(e[n]):e[n]}):e},i.prototype._formatOutput=function(e){var t=this.options.subscription;return t&&t.outputFormatter&&e?t.outputFormatter(e):e},i.prototype._toPayload=function(e){var t=[];if(this.callback=this._extractCallback(e),this.subscriptionMethod||(this.subscriptionMethod=e.shift(),this.options.subscription.subscriptionName&&(this.subscriptionMethod=this.options.subscription.subscriptionName)),this.arguments||(this.arguments=this._formatInput(e),this._validateArgs(this.arguments),e=[]),t.push(this.subscriptionMethod),t=t.concat(this.arguments),e.length)throw new Error("Only a callback is allowed as parameter on an already instantiated subscription.");return{method:this.options.type+"_subscribe",params:t}},i.prototype.unsubscribe=function(e){this.options.requestManager.removeSubscription(this.id,e),this.id=null,this.removeAllListeners(),clearInterval(this._reconnectIntervalId)},i.prototype.subscribe=function(){var e=this,t=Array.prototype.slice.call(arguments),n=this._toPayload(t);if(!n)return this;if(!this.options.requestManager.provider){var i=new Error("No provider set.");return this.callback(i,null,this),this.emit("error",i),this}if(!this.options.requestManager.provider.on){var o=new Error("The current provider doesn't support subscriptions: "+this.options.requestManager.provider.constructor.name);return this.callback(o,null,this),this.emit("error",o),this}return this.id&&this.unsubscribe(),this.options.params=n.params[1],"logs"===n.params[0]&&r.isObject(n.params[1])&&n.params[1].hasOwnProperty("fromBlock")&&isFinite(n.params[1].fromBlock)&&this.options.requestManager.send({method:"eth_getLogs",params:[n.params[1]]},function(t,n){t?(e.callback(t,null,e),e.emit("error",t)):n.forEach(function(t){var n=e._formatOutput(t);e.callback(null,n,e),e.emit("data",n)})}),"object"===_typeof(n.params[1])&&delete n.params[1].fromBlock,this.options.requestManager.send(n,function(t,i){!t&&i?(e.id=i,e.options.requestManager.addSubscription(e.id,n.params[0],e.options.type,function(t,n){r.isArray(n)&&(n=n[0]);var i=e._formatOutput(n);if(t)e.options.requestManager.removeSubscription(e.id),e.options.requestManager.provider.once&&(e._reconnectIntervalId=setInterval(function(){e.options.requestManager.provider.reconnect()},500),e.options.requestManager.provider.once("connect",function(){clearInterval(e._reconnectIntervalId),e.subscribe(e.callback)})),e.emit("error",t);else{if(r.isFunction(e.options.subscription.subscriptionHandler))return e.options.subscription.subscriptionHandler.call(e,i);e.emit("data",i)}r.isFunction(e.callback)&&e.callback(t,i,e)})):r.isFunction(e.callback)&&(e.callback(t,null,e),e.emit("error",t))}),this},t.exports=i},{eventemitter3:197,underscore:198,"web3-core-helpers":186}],201:[function(e,t,n){var i=e("web3-core-helpers").formatters,r=e("web3-core-method"),o=e("web3-utils");t.exports=function(e){var t=function(t){var n;return t.property?(e[t.property]||(e[t.property]={}),n=e[t.property]):n=e,t.methods&&t.methods.forEach(function(t){t instanceof r||(t=new r(t)),t.attachToObject(n),t.setRequestManager(e._requestManager)}),e};return t.formatters=i,t.utils=o,t.Method=r,t}},{"web3-core-helpers":186,"web3-core-method":188,"web3-utils":273}],202:[function(e,t,n){var i=e("web3-core-requestmanager"),r=e("./extend.js");t.exports={packageInit:function(e,t){if(t=Array.prototype.slice.call(t),!e)throw new Error('You need to instantiate using the "new" keyword.');Object.defineProperty(e,"currentProvider",{get:function(){return e._provider},set:function(t){return e.setProvider(t)},enumerable:!0,configurable:!0}),t[0]&&t[0]._requestManager?e._requestManager=new i.Manager(t[0].currentProvider):(e._requestManager=new i.Manager,e._requestManager.setProvider(t[0],t[1])),e.givenProvider=i.Manager.givenProvider,e.providers=i.Manager.providers,e._provider=e._requestManager.provider,e.setProvider||(e.setProvider=function(t,n){return e._requestManager.setProvider(t,n),e._provider=e._requestManager.provider,!0}),e.BatchRequest=i.BatchManager.bind(null,e._requestManager),e.extend=r(e)},addProviders:function(e){e.givenProvider=i.Manager.givenProvider,e.providers=i.Manager.providers}}},{"./extend.js":201,"web3-core-requestmanager":195}],203:[function(e,t,n){arguments[4][172][0].apply(n,arguments)},{dup:172}],204:[function(e,t,n){var i=e("underscore"),r=e("web3-utils"),o=e("bn.js"),a=e("./param"),s=function(e){return i.isNumber(e)&&(e=Math.trunc(e)),new a(r.toTwosComplement(e).replace("0x",""))},c=function(e){return"1"===new o(e.substr(0,1),16).toString(2).substr(0,1)};t.exports={formatInputInt:s,formatInputBytes:function(e){if(!r.isHex(e))throw new Error('Given parameter is not bytes: "'+e+'"');var t=e.replace(/^0x/i,"");if(t.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+e+'"');var n=Math.floor((t.length+63)/64);return t=r.padRight(t,64*n),new a(t)},formatInputDynamicBytes:function(e){if(!r.isHex(e))throw new Error('Given parameter is not bytes: "'+e+'"');var t=e.replace(/^0x/i,"");if(t.length%2!=0)throw new Error('Given parameter bytes has an invalid length: "'+e+'"');var n=t.length/2,i=Math.floor((t.length+63)/64);return t=r.padRight(t,64*i),new a(s(n).value+t)},formatInputString:function(e){var t=r.utf8ToHex(e).replace(/^0x/i,""),n=t.length/2,i=Math.floor((t.length+63)/64);return t=r.padRight(t,64*i),new a(s(n).value+t)},formatInputBool:function(e){return new a("000000000000000000000000000000000000000000000000000000000000000"+(e?"1":"0"))},formatOutputInt:function(e){var t=e.staticPart()||"0";return c(t)?new o(t,16).fromTwos(256).toString(10):new o(t,16).toString(10)},formatOutputUInt:function(e,t){var n=e.staticPart();if(!n)throw new Error("Couldn't decode "+t+" from ABI: 0x"+e.rawValue);return new o(n,16).toString(10)},formatOutputBool:function(e,t){var n=e.staticPart();if(!n)throw new Error("Couldn't decode "+t+" from ABI: 0x"+e.rawValue);return"0000000000000000000000000000000000000000000000000000000000000001"===n},formatOutputBytes:function(e,t){var n=t.match(/^bytes([0-9]*)/),i=parseInt(n[1]);if(e.staticPart().slice(0,2*i).length!==2*i)throw new Error("Couldn't decode "+t+" from ABI: 0x"+e.rawValue+" The size doesn't match.");return"0x"+e.staticPart().slice(0,2*i)},formatOutputDynamicBytes:function(e){var t=2*new o(e.dynamicPart().slice(0,64),16).toNumber();return"0x"+e.dynamicPart().substr(64,t)},formatOutputString:function(e){var t=e.dynamicPart().slice(0,64);if(t){var n=2*new o(t,16).toNumber();return n?r.hexToUtf8("0x"+e.dynamicPart().substr(64,n).replace(/^0x/i,"")):""}throw new Error("ERROR: The returned value is not a convertible string:"+t)},formatOutputAddress:function(e){var t=e.staticPart();return r.toChecksumAddress("0x"+t.slice(t.length-40,t.length))},toTwosComplement:r.toTwosComplement}},{"./param":206,"bn.js":"BN",underscore:203,"web3-utils":273}],205:[function(e,t,n){function i(){}var r=e("underscore"),o=e("web3-utils"),a=e("./formatters"),s=e("./types/address"),c=e("./types/bool"),u=e("./types/int"),l=e("./types/uint"),f=e("./types/dynamicbytes"),p=e("./types/string"),d=e("./types/bytes"),h=function(e,t){return e.isDynamicType(t)||e.isDynamicArray(t)},m=function(e){this._types=e};m.prototype._requireType=function(e){var t=this._types.filter(function(t){return t.isType(e)})[0];if(!t)throw Error("Invalid solidity type: "+e);return t},m.prototype._getOffsets=function(e,t){for(var n=t.map(function(t,n){return t.staticPartLength(e[n])}),i=1;i0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),i=e.shift();t.call(n,i)}else t._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},n.exports=r,n.exports.firstLineError=c},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,n){t.exports=function(e,t,n,i){var r=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},c=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){r||(r=!0,e.prototype._propagateFrom=i.propagateFromFunction(),e.prototype._boundValue=i.boundValueFunction());var u=n(o),l=new e(t);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(u),u instanceof e){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:u};f._then(t,a,void 0,l,p),u._then(s,c,void 0,l,p),l._setOnCancel(u)}else l._resolveCallback(f);return l},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){var i;"undefined"!=typeof Promise&&(i=Promise);var r=e("./promise")();r.noConflict=function(){try{Promise===r&&(Promise=i)}catch(e){}return r},t.exports=r},{"./promise":22}],5:[function(e,t,n){var i=Object.create;if(i){var r=i(null),o=i(null);r[" size"]=o[" size"]=0}t.exports=function(t){function n(e,n){var i;if(null!=e&&(i=e[n]),"function"!=typeof i){var r="Object "+s.classString(e)+" has no method '"+s.toString(n)+"'";throw new t.TypeError(r)}return i}function i(e){return n(e,this.pop()).apply(e,this)}function r(e){return e[this]}function o(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var a,s=e("./util"),c=s.canEvaluate;s.isIdentifier;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(i,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=o;else if(c){var n=a(e);t=null!==n?n:r}else t=r;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){t.exports=function(t,n,i,r){var o=e("./util"),a=o.tryCatch,s=o.errorObj,c=t._async;t.prototype.break=t.prototype.cancel=function(){if(!r.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e.isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n.isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this.isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n=0)return r[e]}var i=!1,r=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=function(){if(i)return new t},t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var r=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,c=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=c,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=n,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(t,n,i){n.exports=function(n,i){function r(e,t){return{promise:t}}function o(){return!1}function a(e,t,n){var i=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+R.toString(e));i._attachCancellationCallback(e)})}catch(e){return e}}function s(e){if(!this.isCancellable())return this;var t=this._onCancel();void 0!==t?R.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function c(){return this._onCancelField}function u(e){this._onCancelField=e}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function p(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function d(){this._trace=new C(this._peekContext())}function h(e,t){if(O(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var i=x(e);R.notEnumerableProp(e,"stack",i.message+"\n"+i.stack.join("\n")),R.notEnumerableProp(e,"__stackCleaned__",!0)}}}function m(e,t,i){if(ee.warnings){var r,o=new B(e);if(t)i._attachExtraTrace(o);else if(ee.longStackTraces&&(r=n._peekContext()))r.attachExtraTrace(o);else{var a=x(o);o.stack=a.message+"\n"+a.stack.join("\n")}$("warning",o)||w(o,"",!0)}}function v(e,t){for(var n=0;n=0;--s)if(i[s]===o){a=s;break}for(s=a;s>=0;--s){var c=i[s];if(t[r]!==c)break;t.pop(),r--}t=i}}function g(e){for(var t=[],n=0;n0&&(t=t.slice(n)),t}function x(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?_(e):[" (No stack trace)"],{message:n,stack:g(t)}}function w(e,t,n){if("undefined"!=typeof console){var i;if(R.isObject(e)){var r=e.stack;i=t+L(r,e)}else i=t+String(e);"function"==typeof P?P(i,n):"function"!=typeof console.log&&"object"!==_typeof(console.log)||console.log(i)}}function k(e,t,n,i){var r=!1;try{"function"==typeof t&&(r=!0,"rejectionHandled"===e?t(i):t(n,i))}catch(e){I.throwLater(e)}"unhandledRejection"===e?$(e,n,i)||r||w(n,"Unhandled rejection "):$(e,i)}function j(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():R.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+S(t)+">, no stack trace)"}function S(e){return e.length<41?e:e.substr(0,38)+"..."}function E(){return"function"==typeof Z}function A(e){var t=e.match(Y);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function C(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);Z(this,C),t>32&&this.uncycle()}var M,T,P,F=n._getDomain,I=n._async,B=t("./errors").Warning,R=t("./util"),O=R.canAttachTrace,N=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,D=null,L=null,q=!1,z=!(0==R.env("BLUEBIRD_DEBUG")),U=!(0==R.env("BLUEBIRD_WARNINGS")||!z&&!R.env("BLUEBIRD_WARNINGS")),H=!(0==R.env("BLUEBIRD_LONG_STACK_TRACES")||!z&&!R.env("BLUEBIRD_LONG_STACK_TRACES")),V=0!=R.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(U||!!R.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},n.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",M,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",T,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return m(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=F();T="function"==typeof e?null===t?e:t.bind(e):void 0},n.onUnhandledRejectionHandled=function(e){var t=F();M="function"==typeof e?null===t?e:t.bind(e):void 0};var K=function(){};n.longStackTraces=function(){if(I.haveItemsQueued()&&!ee.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ee.longStackTraces&&E()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace;ee.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ee.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,i.deactivateLongStackTraces(),I.enableTrampoline(),ee.longStackTraces=!1},n.prototype._captureStackTrace=d,n.prototype._attachExtraTrace=h,i.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return ee.longStackTraces&&E()};var W=function(){try{var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),R.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!R.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),X=R.isNode?function(){return e.emit.apply(e,arguments)}:R.global?function(e){var t="on"+e.toLowerCase(),n=R.global[t];return!!n&&(n.apply(R.global,[].slice.call(arguments,1)),!0)}:function(){return!1},G={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:r},$=function(e){var t=!1;try{t=X.apply(null,arguments)}catch(e){I.throwLater(e),t=!0}var n=!1;try{n=W(e,G[e].apply(null,arguments))}catch(e){I.throwLater(e),n=!0}return n||t};n.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&K()),"warnings"in e){var t=e.warnings;ee.warnings=!!t,V=ee.warnings,R.isObject(t)&&"wForgottenReturn"in t&&(V=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ee.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=l,n.prototype._propagateFrom=f,n.prototype._onCancel=c,n.prototype._setOnCancel=u,n.prototype._attachCancellationCallback=s,n.prototype._execute=a,J=f,ee.cancellation=!0}"monitoring"in e&&(e.monitoring&&!ee.monitoring?(ee.monitoring=!0,n.prototype._fireEvent=$):!e.monitoring&&ee.monitoring&&(ee.monitoring=!1,n.prototype._fireEvent=o))},n.prototype._fireEvent=o,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var J=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)},Q=function(){return!1},Y=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;R.inherits(C,Error),i.CapturedTrace=C,C.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},i=0,r=this;void 0!==r;++i)t.push(r),r=r._parent;for(i=(e=this._length=i)-1;i>=0;--i){var o=t[i].stack;void 0===n[o]&&(n[o]=i)}for(i=0;i0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[i]._parent=void 0,t[i]._length=1;var s=i>0?t[i-1]:this;a=0;--u)t[u]._length=c,c++;return}}}},C.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=x(e),n=t.message,i=[t.stack],r=this;void 0!==r;)i.push(g(r.stack.split("\n"))),r=r._parent;y(i),b(i),R.notEnumerableProp(e,"stack",v(n,i)),R.notEnumerableProp(e,"__stackCleaned__",!0)}};var Z=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():j(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,D=e,L=t;var n=Error.captureStackTrace;return Q=function(e){return N.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return D=/@/,L=t,q=!0,function(e){e.stack=(new Error).stack};var r;try{throw new Error}catch(e){r="stack"in e}return"stack"in i||!r||"number"!=typeof Error.stackTraceLimit?(L=function(e,t){return"string"==typeof e?e:"object"!==(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t||void 0===t.name||void 0===t.message?j(t):t.toString()},null):(D=e,L=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(P=function(e){console.warn(e)},R.isNode&&e.stderr.isTTY?P=function(e,t){var n=t?"":"";console.warn(n+e+"\n")}:R.isNode||"string"!=typeof(new Error).stack||(P=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ee={warnings:U,longStackTraces:!1,cancellation:!1,monitoring:!1};return H&&n.longStackTraces(),{longStackTraces:function(){return ee.longStackTraces},warnings:function(){return ee.warnings},cancellation:function(){return ee.cancellation},monitoring:function(){return ee.monitoring},propagateFromFunction:function(){return J},boundValueFunction:function(){return p},checkForgottenReturns:function(e,t,n,i,r){if(void 0===e&&null!==t&&V){if(void 0!==r&&r._returnedNonUndefined())return;n&&(n+=" ");var o="a promise was created in a "+n+"handler but was not returned from it";i._warn(o,!0,t)}},setBounds:function(e,t){if(E()){for(var n,i,r=e.stack.split("\n"),o=t.stack.split("\n"),a=-1,s=-1,c=0;c=s||(Q=function(e){if(N.test(e))return!0;var t=A(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}},warn:m,deprecated:function(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),m(n)},CapturedTrace:C,fireDomEvent:W,fireGlobalEvent:X}}},{"./errors":12,"./util":36}],10:[function(e,t,n){t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var i=arguments[1];i instanceof e&&i.suppressUnhandledRejections();return this.caught(n,function(){return i})}}},{}],11:[function(e,t,n){t.exports=function(e,t){function n(){return o(this)}function i(e,n){return r(e,n,t,t)}var r=e.reduce,o=e.all;e.prototype.each=function(e){return this.mapSeries(e)._then(n,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,t){return i(e,t)._then(n,void 0,void 0,e,void 0)},e.mapSeries=i}},{}],12:[function(e,t,n){function i(e,t){function n(i){if(!(this instanceof n))return new n(i);f(this,"message","string"==typeof i?i:t),f(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(n,Error),n}function r(e){if(!(this instanceof r))return new r(e);f(this,"name","OperationalError"),f(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(f(this,"message",e.message),f(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var o,a,s=e("./es5"),c=s.freeze,u=e("./util"),l=u.inherits,f=u.notEnumerableProp,p=i("Warning","warning"),d=i("CancellationError","cancellation error"),h=i("TimeoutError","timeout error"),m=i("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(e){o=i("TypeError","type error"),a=i("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),b=0;b1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function a(){return c.call(this,this.promise._target()._settledValue())}function s(e){if(!o(this,e))return f.e=e,f}function c(e){var i=this.promise,c=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?c.call(i._boundValue()):c.call(i._boundValue(),e);if(void 0!==u){i._setReturnedNonUndefined();var p=n(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p.isCancelled()){var d=new l("late cancellation observer");return i._attachExtraTrace(d),f.e=d,f}p.isPending()&&p._attachCancellationCallback(new r(this))}return p._then(a,s,void 0,this,void 0)}}}return i.isRejected()?(o(this),f.e=e,f):(o(this),e)}var u=e("./util"),l=t.CancellationError,f=u.errorObj;return i.prototype.isFinallyHandler=function(){return 0===this.type},r.prototype._resultCancelled=function(){o(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,r){return"function"!=typeof e?this.then():this._then(n,r,void 0,new i(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,c,c)},t.prototype.tap=function(e){return this._passThrough(e,1,c)},i}},{"./util":36}],16:[function(e,t,n){t.exports=function(t,n,i,r,o,a){function s(e,n,i){for(var o=0;o0&&"function"==typeof arguments[t]){e=arguments[t]}var i=[].slice.call(arguments);e&&i.pop();var r=new n(i).promise();return void 0!==e?r.spread(e):r}}},{"./util":36}],18:[function(e,t,n){t.exports=function(t,n,i,r,o,a){function s(e,t,n,i){this.constructor$(e),this._promise._captureStackTrace();var r=u();this._callback=null===r?t:r.bind(t),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=n>=1?[]:d,this._init$(void 0,-2)}function c(e,t,n,r){if("function"!=typeof t)return i("expecting a function but got "+l.classString(t));var o="object"===(void 0===n?"undefined":_typeof(n))&&null!==n?n.concurrency:0;return o="number"==typeof o&&isFinite(o)&&o>=1?o:0,new s(e,t,o,r).promise()}var u=t._getDomain,l=e("./util"),f=l.tryCatch,p=l.errorObj,d=[];l.inherits(s,n),s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var i=this._values,o=this.length(),s=this._preservedValues,c=this._limit;if(n<0){if(n=-1*n-1,i[n]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return i[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var u=this._promise,l=this._callback,d=u._boundValue();u._pushContext();var h=f(l).call(d,e,n,o),m=u._popContext();if(a.checkForgottenReturns(h,m,null!==s?"Promise.filter":"Promise.map",u),h===p)return this._reject(h.e),!0;var v=r(h,this._promise);if(v instanceof t){var b=(v=v._target())._bitField;if(0==(50397184&b))return c>=1&&this._inFlight++,i[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&b))return 0!=(16777216&b)?(this._reject(v._reason()),!0):(this._cancel(),!0);h=v._value()}i[n]=h}return++this._totalResolved>=o&&(null!==s?this._filter(i,s):this._resolve(i),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],l=arguments[2];c=a.isArray(u)?s(e).apply(l,u):s(e).call(l,u)}else c=s(e)();var f=i._popContext();return o.checkForgottenReturns(c,f,"Promise.try",i),i._resolveFromSyncValue(c),i},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){function i(e){return e instanceof Error&&c.getPrototypeOf(e)===Error.prototype}function r(e){var t;if(i(e)){(t=new s(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var n=c.keys(e),r=0;r1){var n,i=new Array(t-1),r=0;for(n=0;n0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+d.classString(e);arguments.length>1&&(n+=", "+d.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},r.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},r.prototype.spread=function(e){return"function"!=typeof e?f("expecting a function but got "+d.classString(e)):this.all()._then(e,void 0,void 0,x,void 0)},r.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},r.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new j(this).promise()},r.prototype.error=function(e){return this.caught(d.originatesFromRejection,e)},r.is=function(e){return e instanceof r},r.fromNode=r.fromCallback=function(e){var t=new r(_);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,i=F(e)(T(t,n));return i===P&&t._rejectCallback(i.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},r.all=function(e){return new j(e).promise()},r.cast=function(e){var t=k(e);return t instanceof r||((t=new r(_))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},r.resolve=r.fulfilled=r.cast,r.reject=r.rejected=function(e){var t=new r(_);return t._captureStackTrace(),t._rejectCallback(e,!0),t},r.setScheduler=function(e){if("function"!=typeof e)throw new y("expecting a function but got "+d.classString(e));var t=v._schedule;return v._schedule=e,t},r.prototype._then=function(e,t,n,i,o){var a=void 0!==o,s=a?o:new r(_),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===i&&0!=(2097152&this._bitField)&&(i=0!=(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!=(50397184&l)){var p,d,h=u._settlePromiseCtx;0!=(33554432&l)?(d=u._rejectionHandler0,p=e):0!=(16777216&l)?(d=u._fulfillmentHandler0,p=t,u._unsetRejectionIsUnhandled()):(h=u._settlePromiseLateCancellationObserver,d=new g("late cancellation observer"),u._attachExtraTrace(d),p=t),v.invoke(h,u,{handler:null===f?p:"function"==typeof p&&f.bind(p),promise:s,receiver:i,value:d})}else u._addCallbacks(e,t,s,i,f);return s},r.prototype._length=function(){return 65535&this._bitField},r.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},r.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},r.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},r.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},r.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},r.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},r.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},r.prototype._isFinal=function(){return(4194304&this._bitField)>0},r.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},r.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},r.prototype._setAsyncGuaranteed=function(){this._bitField=134217728|this._bitField},r.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==p)return void 0===t&&this._isBound()?this._boundValue():t},r.prototype._promiseAt=function(e){return this[4*e-4+2]},r.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},r.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},r.prototype._boundValue=function(){},r.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,n=e._rejectionHandler0,i=e._promise0,r=e._receiverAt(0);void 0===r&&(r=p),this._addCallbacks(t,n,i,r,null)},r.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),i=e._rejectionHandlerAt(t),r=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=p),this._addCallbacks(n,i,r,o,null)},r.prototype._addCallbacks=function(e,t,n,i,r){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=i,"function"==typeof e&&(this._fulfillmentHandler0=null===r?e:r.bind(e)),"function"==typeof t&&(this._rejectionHandler0=null===r?t:r.bind(t));else{var a=4*o-4;this[a+2]=n,this[a+3]=i,"function"==typeof e&&(this[a+0]=null===r?e:r.bind(e)),"function"==typeof t&&(this[a+1]=null===r?t:r.bind(t))}return this._setLength(o+1),o},r.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},r.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(u(),!1);var n=k(e,this);if(!(n instanceof r))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target(),o=i._bitField;if(0==(50397184&o)){var a=this._length();a>0&&i._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var n=u();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():v.settlePromises(this))}},r.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return v.fatalError(e,d.isNode);(65535&t)>0?0!=(134217728&t)?this._settlePromises():v.settlePromises(this):this._ensurePossibleRejectionHandled()}},r.prototype._fulfillPromises=function(e,t){for(var n=1;n0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var i=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,i,e),this._fulfillPromises(t,i)}this._setLength(0)}this._clearCancellationData()},r.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},r.defer=r.pending=function(){return A.deprecated("Promise.defer","new Promise"),{promise:new r(_),resolve:o,reject:a}},d.notEnumerableProp(r,"_makeSelfResolutionError",u),t("./method")(r,_,k,f,A),t("./bind")(r,_,k,A),t("./cancel")(r,j,f,A),t("./direct_resolve")(r),t("./synchronous_inspection")(r),t("./join")(r,j,k,_,A),r.Promise=r,t("./map.js")(r,j,f,k,_,A),t("./using.js")(r,f,k,E,_,A),t("./timers.js")(r,_,A),t("./generators.js")(r,f,_,k,n,A),t("./nodeify.js")(r),t("./call_get.js")(r),t("./props.js")(r,j,k,f),t("./race.js")(r,_,k,f),t("./reduce.js")(r,j,f,k,_,A),t("./settle.js")(r,j,A),t("./some.js")(r,j,f),t("./promisify.js")(r,_),t("./any.js")(r),t("./each.js")(r,_),t("./filter.js")(r,_),d.toFastProperties(r),d.toFastProperties(r.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new r(_)),A.setBounds(m.firstLineError,d.lastLineError),r}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,n){t.exports=function(t,n,i,r,o){function a(e){switch(e){case-2:return[];case-3:return{}}}function s(e){var i=this._promise=new t(n);e instanceof t&&i._propagateFrom(e,3),i._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=e("./util");c.isArray;return c.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,o){var s=i(this._values,this._promise);if(s instanceof t){var u=(s=s._target())._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=c.asArray(s)))0!==s.length?this._iterate(s):-5===o?this._resolveEmptyArray():this._resolve(a(o));else{var l=r("expecting an array or an iterable object but got "+c.classString(s)).reason();this._promise._rejectCallback(l,!1)}},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var r=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=p(this._values);else{n={};for(var i=this.length(),r=0,o=this.length();r>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){function i(e,t,n,i,r){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},r.prototype._promiseFulfilled=function(e,t){var n=new o;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},r.prototype._promiseRejected=function(e,t){var n=new o;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return i.deprecated(".settle()",".reflect()"),new r(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){t.exports=function(t,n,i){function r(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(e,t){if((0|t)!==t||t<0)return i("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new r(e),o=n.promise();return n.setHowMany(t),n.init(),o}var a=e("./util"),s=e("./errors").RangeError,c=e("./errors").AggregateError,u=a.isArray,l={};a.inherits(r,n),r.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},r.prototype.init=function(){this._initialized=!0,this._init()},r.prototype.setUnwrap=function(){this._unwrap=!0},r.prototype.howMany=function(){return this._howMany},r.prototype.setHowMany=function(e){this._howMany=e},r.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},r.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},r.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},r.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new c,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},r.prototype._fulfilled=function(){return this._totalResolved},r.prototype._rejected=function(){return this._values.length-this.length()},r.prototype._addRejected=function(e){this._values.push(e)},r.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},r.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},r.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},r.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return o(e,t)},t.prototype.some=function(e){return o(this,e)},t._SomePromiseArray=r}},{"./errors":12,"./util":36}],32:[function(e,t,n){t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=e.prototype._isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype.isCancelled=function(){return this._target()._isCancelled()},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return r.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),i.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){t.exports=function(t,n){function i(e){return e.then}function r(e){try{return i(e)}catch(e){return c.e=e,c}}function o(e){return l.call(e,"_promise0")}function a(e,i,r){var o=new t(n),a=o;r&&r._pushContext(),o._captureStackTrace(),r&&r._popContext();var u=!0,l=s.tryCatch(i).call(e,function(e){o&&(o._resolveCallback(e),o=null)},function(e){o&&(o._rejectCallback(e,u,!0),o=null)});return u=!1,o&&l===c&&(o._rejectCallback(l.e,!0,!0),o=null),a}var s=e("./util"),c=s.errorObj,u=s.isObject,l={}.hasOwnProperty;return function(e,i){if(u(e)){if(e instanceof t)return e;var s=r(e);if(s===c)return i&&i._pushContext(),l=t.reject(s.e),i&&i._popContext(),l;if("function"==typeof s){if(o(e)){var l=new t(n);return e._then(l._fulfill,l._reject,void 0,l,null),l}return a(e,s,i)}}return e}}},{"./util":36}],34:[function(e,t,n){t.exports=function(t,n,i){function r(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),c=t.TimeoutError;r.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(u,null,null,e,void 0),i.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(n),s=setTimeout(function(){a._fulfill()},+e),i.cancellation()&&a._setOnCancel(new r(s))),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return l(e,this)};var f=function(e,t,n){var i;i="string"!=typeof t?t instanceof Error?t:new c("operation timed out"):new c(t),s.markAsOriginatingFromRejection(i),e._attachExtraTrace(i),e._reject(i),null!=n&&n.cancel()};t.prototype.timeout=function(e,t){e=+e;var n,s,c=new r(setTimeout(function(){n.isPending()&&f(n,t,s)},e));return i.cancellation()?(s=this.then(),(n=s._then(o,a,void 0,c,void 0))._setOnCancel(c)):n=this._then(o,a,void 0,c,void 0),n}}},{"./util":36}],35:[function(e,t,n){t.exports=function(t,n,i,r,o,a){function s(e){setTimeout(function(){throw e},0)}function c(e){var t=i(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function u(e,n){function r(){if(a>=u)return l._fulfill();var o=c(e[a++]);if(o instanceof t&&o._isDisposable()){try{o=i(o._getDisposer().tryDispose(n),e.promise)}catch(e){return s(e)}if(o instanceof t)return o._then(r,s,null,null,null)}r()}var a=0,u=e.length,l=new t(o);return r(),l}function l(e,t,n){this._data=e,this._promise=t,this._context=n}function f(e,t,n){this.constructor$(e,t,n)}function p(e){return l.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function d(e){this.length=e,this.promise=null,this[e-1]=null}var h=e("./util"),m=e("./errors").TypeError,v=e("./util").inherits,b=h.errorObj,y=h.tryCatch;l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},l.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var i=null!==t?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,i},l.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},v(f,l),f.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},d.prototype._resultCancelled=function(){for(var e=this.length,n=0;n0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new f(e,this,r());throw new m}}},{"./errors":12,"./util":36}],36:[function(t,n,r){function o(){try{var e=M;return M=null,e.apply(this,arguments)}catch(e){return C.e=e,C}}function a(e){return M=e,o}function s(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function c(e){return"function"==typeof e||"object"===(void 0===e?"undefined":_typeof(e))&&null!==e}function u(e){return s(e)?new Error(y(e)):e}function l(e,t){var n,i=e.length,r=new Array(i+1);for(n=0;n1,i=t.length>0&&!(1===t.length&&"constructor"===t[0]),r=I.test(e+"")&&E.names(e).length>0;if(n||i||r)return!0}return!1}catch(e){return!1}}function m(e){function t(){}t.prototype=e;for(var n=8;n--;)new t;return e}function v(e){return B.test(e)}function b(e,t,n){for(var i=new Array(e),r=0;r10||t[0]>0}(),L.isNode&&L.toFastProperties(e);try{throw new Error}catch(e){L.lastLineError=e}n.exports=L},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:120}],216:[function(e,t,n){arguments[4][16][0].apply(n,arguments)},{crypto:17,dup:16}],217:[function(e,t,n){arguments[4][67][0].apply(n,arguments)},{"../package.json":232,"./elliptic/curve":220,"./elliptic/curves":223,"./elliptic/ec":224,"./elliptic/eddsa":227,"./elliptic/utils":231,brorand:216,dup:67}],218:[function(e,t,n){arguments[4][68][0].apply(n,arguments)},{"../../elliptic":217,"bn.js":"BN",dup:68}],219:[function(e,t,n){arguments[4][69][0].apply(n,arguments)},{"../../elliptic":217,"../curve":220,"bn.js":"BN",dup:69,inherits:240}],220:[function(e,t,n){arguments[4][70][0].apply(n,arguments)},{"./base":218,"./edwards":219,"./mont":221,"./short":222,dup:70}],221:[function(e,t,n){arguments[4][71][0].apply(n,arguments)},{"../../elliptic":217,"../curve":220,"bn.js":"BN",dup:71,inherits:240}],222:[function(e,t,n){arguments[4][72][0].apply(n,arguments)},{"../../elliptic":217,"../curve":220,"bn.js":"BN",dup:72,inherits:240}],223:[function(e,t,n){arguments[4][73][0].apply(n,arguments)},{"../elliptic":217,"./precomputed/secp256k1":230,dup:73,"hash.js":86}],224:[function(e,t,n){arguments[4][74][0].apply(n,arguments)},{"../../elliptic":217,"./key":225,"./signature":226,"bn.js":"BN",dup:74,"hmac-drbg":239}],225:[function(e,t,n){arguments[4][75][0].apply(n,arguments)},{"../../elliptic":217,"bn.js":"BN",dup:75}],226:[function(e,t,n){arguments[4][76][0].apply(n,arguments)},{"../../elliptic":217,"bn.js":"BN",dup:76}],227:[function(e,t,n){arguments[4][77][0].apply(n,arguments)},{"../../elliptic":217,"./key":228,"./signature":229,dup:77,"hash.js":86}],228:[function(e,t,n){arguments[4][78][0].apply(n,arguments)},{"../../elliptic":217,dup:78}],229:[function(e,t,n){arguments[4][79][0].apply(n,arguments)},{"../../elliptic":217,"bn.js":"BN",dup:79}],230:[function(e,t,n){arguments[4][80][0].apply(n,arguments)},{dup:80}],231:[function(e,t,n){arguments[4][81][0].apply(n,arguments)},{"bn.js":"BN",dup:81,"minimalistic-assert":241,"minimalistic-crypto-utils":242}],232:[function(e,t,n){t.exports={_args:[[{raw:"elliptic@^6.4.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.4.0",spec:">=6.4.0 <7.0.0",type:"range"},"/Users/iurimatias/Projects/opensource/web3.js/packages/web3-eth-accounts/node_modules/eth-lib"]],_from:"elliptic@>=6.4.0 <7.0.0",_id:"elliptic@6.4.0",_inCache:!0,_location:"/elliptic",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},_npmUser:{name:"indutny",email:"fedor@indutny.com"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"elliptic@^6.4.0",scope:null,escapedName:"elliptic",name:"elliptic",rawSpec:"^6.4.0",spec:">=6.4.0 <7.0.0",type:"range"},_requiredBy:["/eth-lib"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_shrinkwrap:null,_spec:"elliptic@^6.4.0",_where:"/Users/iurimatias/Projects/opensource/web3.js/packages/web3-eth-accounts/node_modules/eth-lib",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},files:["lib"],gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],233:[function(e,t,n){(function(n){var i=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=e("./bytes"),o=e("./nat"),a=e("elliptic"),s=e("./rlp"),c=new a.ec("secp256k1"),u=e("./hash"),l=u.keccak256,f=u.keccak256s,p=function(e){for(var t=f(e.slice(2)),n="0x",i=0;i<40;i++)n+=parseInt(t[i+2],16)>7?e[i+2].toUpperCase():e[i+2];return n},d=function(e){var t=new n(e.slice(2),"hex"),i="0x"+c.keyFromPrivate(t).getPublic(!1,"hex").slice(2),r=l(i);return{address:p("0x"+r.slice(-40)),privateKey:e}},h=function(e){var t=i(e,3),n=t[0],o=t[1],a=t[2];return r.flatten([o,a,n])},m=function(e){return[r.slice(64,65,e),r.slice(0,32,e),r.slice(32,64,e)]},v=function(e){return function(t,i){var o=c.keyFromPrivate(new n(i.slice(2),"hex")).sign(new n(t.slice(2),"hex"),{canonical:!0});return h([r.pad(1,r.fromNumber(e+o.recoveryParam)),r.pad(32,r.fromNat("0x"+o.r.toString(16))),r.pad(32,r.fromNat("0x"+o.s.toString(16)))])}},b=v(27),y=function(e,t){var i=m(t),o={v:r.toNumber(i[0]),r:i[1].slice(2),s:i[2].slice(2)},a="0x"+c.recoverPubKey(new n(e.slice(2),"hex"),o,o.v<2?o.v:1-o.v%2).encode("hex",!1).slice(2),s=l(a);return p("0x"+s.slice(-40))},g=function(e){return s.encode([r.fromNat(e.nonce),r.fromNat(e.gasPrice),r.fromNat(e.gas),e.to.toLowerCase(),r.fromNat(e.value),e.data,r.fromNat(e.chainId||"0x1"),"0x","0x"])};t.exports={create:function(e){var t=l(r.concat(r.random(32),e||r.random(32))),n=r.concat(r.concat(r.random(32),t),r.random(32)),i=l(n);return d(i)},toChecksum:p,fromPrivate:d,sign:b,recover:y,signTransaction:function(e,t){var n=g(e),i=v(2*o.toNumber(e.chainId||"0x1")+35)(l(n),t),r=s.decode(n).slice(0,6).concat(m(i));return s.encode(r)},recoverTransaction:function(e){var t=s.decode(e),n=h(t.slice(6,9)),i=r.toNumber(t[6]),o=i<35?[]:[r.fromNumber(i-35>>1),"0x","0x"],a=t.slice(0,6).concat(o),c=s.encode(a);return y(l(c),n)},transactionSigningData:g,encodeSignature:h,decodeSignature:m}}).call(this,e("buffer").Buffer)},{"./bytes":235,"./hash":236,"./nat":237,"./rlp":238,buffer:47,elliptic:217}],234:[function(e,t,n){var i=function(e,t){for(var n=[],i=0;i>6|192);else{if(r>55295&&r<56320){if(++i==e.length)return null;var o=e.charCodeAt(i);if(o<56320||o>57343)return null;n+=t((r=65536+((1023&r)<<10)+(1023&o))>>18|240),n+=t(r>>12&63|128)}else n+=t(r>>12|224);n+=t(r>>6&63|128)}n+=t(63&r|128)}}return n},toString:function(e){for(var t="",n=0,o=r(e);n127){if(a>191&&a<224){if(n>=o)return null;a=(31&a)<<6|63&i(e,n)}else if(a>223&&a<240){if(n+1>=o)return null;a=(15&a)<<12|(63&i(e,n))<<6|63&i(e,++n)}else{if(!(a>239&&a<248))return null;if(n+2>=o)return null;a=(7&a)<<18|(63&i(e,n))<<12|(63&i(e,++n))<<6|63&i(e,++n)}++n}if(a<=65535)t+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,t+=String.fromCharCode(a>>10|55296),t+=String.fromCharCode(1023&a|56320)}}return t},fromNumber:function(e){var t=e.toString(16);return t.length%2==0?"0x"+t:"0x0"+t},toNumber:function(e){return parseInt(e.slice(2),16)},fromNat:function(e){return"0x0"===e?"0x":e.length%2==0?e:"0x0"+e.slice(2)},toNat:function(e){return"0"===e[2]?"0x"+e.slice(3):e},fromArray:a,toArray:o,fromUint8Array:function(e){return a([].slice.call(e,0))},toUint8Array:function(e){return new Uint8Array(o(e))}}},{"./array.js":234}],236:[function(e,t,n){var i="0123456789abcdef".split(""),r=[1,256,65536,16777216],o=[0,8,16,24],a=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],s=function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:function(e){return[].concat(e,e,e,e,e)}([0,0,0,0,0,0,0,0,0,0])}},c=function(e,t){for(var n,a=t.length,s=e.blocks,c=e.blockCount<<2,l=e.blockCount,f=e.outputBlocks,p=e.s,d=0;d>2]|=t[d]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(s[v>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=c){for(e.start=v-c,e.block=s[l],v=0;v>2]|=r[3&v],e.lastByteIndex===c)for(s[0]=s[l],v=1;v>4&15]+i[15&h]+i[h>>12&15]+i[h>>8&15]+i[h>>20&15]+i[h>>16&15]+i[h>>28&15]+i[h>>24&15];b%l==0&&(u(p),v=0)}return"0x"+m},u=function(e){var t,n,i,r,o,s,c,u,l,f,p,d,h,m,v,b,y,g,_,x,w,k,j,S,E,A,C,M,T,P,F,I,B,R,O,N,D,L,q,z,U,H,V,K,W,X,G,$,J,Q,Y,Z,ee,te,ne,ie,re,oe,ae,se,ce,ue,le;for(i=0;i<48;i+=2)r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],c=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|c>>>31),n=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(c<<1|s>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=r^(u<<1|l>>>31),n=o^(l<<1|u>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=s^(f<<1|p>>>31),n=c^(p<<1|f>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=u^(d<<1|h>>>31),n=l^(h<<1|d>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=f^(r<<1|o>>>31),n=p^(o<<1|r>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,m=e[0],v=e[1],X=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,M=e[20]<<3|e[21]>>>29,T=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,O=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,$=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,F=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,N=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,Y=e[35]<<15|e[34]>>>17,I=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,ie=e[17]<<23|e[16]>>>9,re=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,q=e[27]<<25|e[26]>>>7,x=e[36]<<21|e[37]>>>11,w=e[37]<<21|e[36]>>>11,Z=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,U=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,j=e[49]<<14|e[48]>>>18,e[0]=m^~b&g,e[1]=v^~y&_,e[10]=S^~A&M,e[11]=E^~C&T,e[20]=R^~N&L,e[21]=O^~D&q,e[30]=K^~X&$,e[31]=W^~G&J,e[40]=te^~ie&oe,e[41]=ne^~re&ae,e[2]=b^~g&x,e[3]=y^~_&w,e[12]=A^~M&P,e[13]=C^~T&F,e[22]=N^~L&z,e[23]=D^~q&U,e[32]=X^~$&Q,e[33]=G^~J&Y,e[42]=ie^~oe&se,e[43]=re^~ae&ce,e[4]=g^~x&k,e[5]=_^~w&j,e[14]=M^~P&I,e[15]=T^~F&B,e[24]=L^~z&H,e[25]=q^~U&V,e[34]=$^~Q&Z,e[35]=J^~Y&ee,e[44]=oe^~se&ue,e[45]=ae^~ce&le,e[6]=x^~k&m,e[7]=w^~j&v,e[16]=P^~I&S,e[17]=F^~B&E,e[26]=z^~H&R,e[27]=U^~V&O,e[36]=Q^~Z&K,e[37]=Y^~ee&W,e[46]=se^~ue&te,e[47]=ce^~le&ne,e[8]=k^~m&b,e[9]=j^~v&y,e[18]=I^~S&A,e[19]=B^~E&C,e[28]=H^~R&N,e[29]=V^~O&D,e[38]=Z^~K&X,e[39]=ee^~W&G,e[48]=ue^~te&ie,e[49]=le^~ne&re,e[0]^=a[i],e[1]^=a[i+1]},l=function(e){return function(t){var n;if("0x"===t.slice(0,2)){n=[];for(var i=2,r=t.length;i="80"?i(n.length/2,128):"")+n}var r=t.map(e).join("");return i(r.length/2,192)+r}(e)},decode:function(e){var t=2,n=function(){if(t>=e.length)throw"";var n=e.slice(t,t+2);return n<"80"?(t+=2,"0x"+n):n<"c0"?r():o()},i=function(){var n=parseInt(e.slice(t,t+=2),16)%64;return n<56?n:parseInt(e.slice(t,t+=2*(n-55)),16)},r=function(){var n=i();return"0x"+e.slice(t,t+=2*n)},o=function(){for(var e=2*i()+t,r=[];t>>((3&t)<<3)&255;return r}}t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],245:[function(e,t,n){function i(e,t){var n=t||0,i=a;return i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+"-"+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]+i[e[n++]]}function r(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||o)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;s++)t[r+s]=a[s];return t||i(a)}for(var o=e("./rng"),a=[],s={},c=0;c<256;c++)a[c]=(c+256).toString(16).substr(1),s[a[c]]=c;var u=o(),l=[1|u[0],u[1],u[2],u[3],u[4],u[5]],f=16383&(u[6]<<8|u[7]),p=0,d=0,h=r;h.v1=function(e,t,n){var r=t&&n||0,o=t||[],a=void 0!==(e=e||{}).clockseq?e.clockseq:f,s=void 0!==e.msecs?e.msecs:(new Date).getTime(),c=void 0!==e.nsecs?e.nsecs:d+1,u=s-p+(c-d)/1e4;if(u<0&&void 0===e.clockseq&&(a=a+1&16383),(u<0||s>p)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=s,d=c,f=a;var h=(1e4*(268435455&(s+=122192928e5))+c)%4294967296;o[r++]=h>>>24&255,o[r++]=h>>>16&255,o[r++]=h>>>8&255,o[r++]=255&h;var m=s/4294967296*1e4&268435455;o[r++]=m>>>8&255,o[r++]=255&m,o[r++]=m>>>24&15|16,o[r++]=m>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var v=e.node||l,b=0;b<6;b++)o[r+b]=v[b];return t||i(o)},h.v4=r,h.parse=function(e,t,n){var i=t&&n||0,r=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){r<16&&(t[i+r++]=s[e])});r<16;)t[i+r++]=0;return t},h.unparse=i,t.exports=h},{"./rng":244}],246:[function(e,t,n){(function(n){function i(e){this.length=0,this._accounts=e,this.defaultKeyName="web3js_wallet"}var r=e("underscore"),o=e("web3-core"),a=e("web3-core-method"),s=e("bluebird"),c=e("eth-lib/lib/account"),u=e("eth-lib/lib/hash"),l=e("eth-lib/lib/rlp"),f=e("crypto"),p=e("scrypt.js"),d=e("uuid"),h=e("web3-utils"),m=e("web3-core-helpers"),v=function(e){return r.isUndefined(e)||r.isNull(e)},b=function(){var e=this;o.packageInit(this,arguments),delete this.BatchRequest,delete this.extend;var t=[new a({name:"getId",call:"net_version",params:0,outputFormatter:h.hexToNumber}),new a({name:"getGasPrice",call:"eth_gasPrice",params:0}),new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[function(e){if(h.isAddress(e))return e;throw new Error("Address "+e+' is not a valid address to get the "transactionCount".')},function(){return"latest"}]})];this._ethereumCall={},r.each(t,function(t){t.attachToObject(e._ethereumCall),t.setRequestManager(e._requestManager)}),this.wallet=new i(this)};b.prototype._addAccountFunctions=function(e){var t=this;return e.signTransaction=function(n,i){return t.signTransaction(n,e.privateKey,i)},e.sign=function(n){return t.sign(n,e.privateKey)},e.encrypt=function(n,i){return t.encrypt(e.privateKey,n,i)},e},b.prototype.create=function(e){return this._addAccountFunctions(c.create(e||h.randomHex(32)))},b.prototype.privateKeyToAccount=function(e){return this._addAccountFunctions(c.fromPrivate(e))},b.prototype.signTransaction=function(e,t,n){function i(e){if(!e.gas&&!e.gasLimit)throw new Error('"gas" is missing');var i={nonce:h.numberToHex(e.nonce),to:e.to?m.formatters.inputAddressFormatter(e.to):"0x",data:e.data||"0x",value:e.value?h.numberToHex(e.value):"0x",gas:h.numberToHex(e.gasLimit||e.gas),gasPrice:h.numberToHex(e.gasPrice),chainId:h.numberToHex(e.chainId)},o=u.keccak256(c.transactionSigningData(i)),a=c.signTransaction(i,t),s=l.decode(a),f={messageHash:o,v:s[6],r:s[7],s:s[8],rawTransaction:a};return r.isFunction(n)&&n(null,f),f}var o=this;return void 0!==e.nonce&&void 0!==e.chainId&&void 0!==e.gasPrice?i(e):s.all([v(e.chainId)?o._ethereumCall.getId():e.chainId,v(e.gasPrice)?o._ethereumCall.getGasPrice():e.gasPrice,v(e.nonce)?o._ethereumCall.getTransactionCount(o.privateKeyToAccount(t).address):e.nonce]).then(function(t){if(v(t[0])||v(t[1])||v(t[2]))throw new Error('One of the values "chainId", "gasPrice", or "nonce" couldn\'t be fetched: '+JSON.stringify(t));return i(r.extend(e,{chainId:t[0],gasPrice:t[1],nonce:t[2]}))})},b.prototype.recoverTransaction=function(e){return c.recoverTransaction(e)},b.prototype.hashMessage=function(e){var t=h.isHex(e)?h.hexToUtf8(e):e,n="Ethereum Signed Message:\n"+t.length+t;return u.keccak256s(n)},b.prototype.sign=function(e,t){var n=this.hashMessage(e),i=c.sign(n,t),r=c.decodeSignature(i);return{message:e,messageHash:n,v:r[0],r:r[1],s:r[2],signature:i}},b.prototype.recover=function(e,t){return r.isObject(e)?this.recover(e.messageHash,c.encodeSignature([e.v,e.r,e.s])):(h.isHex(e)||(e=this.hashMessage(e)),4===arguments.length?this.recover(e,c.encodeSignature([].slice.call(arguments,1,4))):c.recover(e,t))},b.prototype.decrypt=function(e,t,i){if(!r.isString(t))throw new Error("No password given.");var o=r.isObject(e)?e:JSON.parse(i?e.toLowerCase():e);if(3!==o.version)throw new Error("Not a valid V3 wallet");var a,s;if("scrypt"===o.crypto.kdf)s=o.crypto.kdfparams,a=p(new n(t),new n(s.salt,"hex"),s.n,s.r,s.p,s.dklen);else{if("pbkdf2"!==o.crypto.kdf)throw new Error("Unsupported key derivation scheme");if("hmac-sha256"!==(s=o.crypto.kdfparams).prf)throw new Error("Unsupported parameters to PBKDF2");a=f.pbkdf2Sync(new n(t),new n(s.salt,"hex"),s.c,s.dklen,"sha256")}var c=new n(o.crypto.ciphertext,"hex");if(h.sha3(n.concat([a.slice(16,32),c])).replace("0x","")!==o.crypto.mac)throw new Error("Key derivation failed - possibly wrong password");var u=f.createDecipheriv(o.crypto.cipher,a.slice(0,16),new n(o.crypto.cipherparams.iv,"hex")),l="0x"+n.concat([u.update(c),u.final()]).toString("hex");return this.privateKeyToAccount(l)},b.prototype.encrypt=function(e,t,i){var r,o=this.privateKeyToAccount(e),a=(i=i||{}).salt||f.randomBytes(32),s=i.iv||f.randomBytes(16),c=i.kdf||"scrypt",u={dklen:i.dklen||32,salt:a.toString("hex")};if("pbkdf2"===c)u.c=i.c||262144,u.prf="hmac-sha256",r=f.pbkdf2Sync(new n(t),a,u.c,u.dklen,"sha256");else{if("scrypt"!==c)throw new Error("Unsupported kdf");u.n=i.n||8192,u.r=i.r||8,u.p=i.p||1,r=p(new n(t),a,u.n,u.r,u.p,u.dklen)}var l=f.createCipheriv(i.cipher||"aes-128-ctr",r.slice(0,16),s);if(!l)throw new Error("Unsupported cipher");var m=n.concat([l.update(new n(o.privateKey.replace("0x",""),"hex")),l.final()]),v=h.sha3(n.concat([r.slice(16,32),new n(m,"hex")])).replace("0x","");return{version:3,id:d.v4({random:i.uuid||f.randomBytes(16)}),address:o.address.toLowerCase().replace("0x",""),crypto:{ciphertext:m.toString("hex"),cipherparams:{iv:s.toString("hex")},cipher:i.cipher||"aes-128-ctr",kdf:c,kdfparams:u,mac:v.toString("hex")}}},i.prototype._findSafeIndex=function(e){return e=e||0,r.has(this,e)?this._findSafeIndex(e+1):e},i.prototype._currentIndexes=function(){return Object.keys(this).map(function(e){return parseInt(e)}).filter(function(e){return e<9e20})},i.prototype.create=function(e,t){for(var n=0;n=2?t.slice(2):t;var n=f.decodeParameters(e,t);return 1===n.__length__?n[0]:(delete n.__length__,n)},p.prototype.deploy=function(e,t){if(e=e||{},e.arguments=e.arguments||[],!(e=this._getOrSetDefaultOptions(e)).data)return a._fireError(new Error('No "data" specified in neither the given options, nor the default options.'),null,null,t);var n=i.find(this.options.jsonInterface,function(e){return"constructor"===e.type})||{};return n.signature="constructor",this._createTxObject.apply({method:n,parent:this,deployData:e.data},e.arguments)},p.prototype._generateEventOptions=function(){var e=Array.prototype.slice.call(arguments),t=this._getCallback(e),n=i.isObject(e[e.length-1])?e.pop():{},r=i.isString(e[0])?e[0]:"allevents";if(!(r="allevents"===r.toLowerCase()?{name:"ALLEVENTS",jsonInterface:this.options.jsonInterface}:this.options.jsonInterface.find(function(e){return"event"===e.type&&(e.name===r||e.signature==="0x"+r.replace("0x",""))})))throw new Error('Event "'+r.name+"\" doesn't exist in this contract.");if(!a.isAddress(this.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return{params:this._encodeEventABI(r,n),event:r,callback:t}},p.prototype.clone=function(){return new p(this.options.jsonInterface,this.options.address,this.options)},p.prototype.once=function(e,t,n){var r=Array.prototype.slice.call(arguments);if(!(n=this._getCallback(r)))throw new Error("Once requires a callback as the second parameter.");t&&delete t.fromBlock,this._on(e,t,function(e,t,r){r.unsubscribe(),i.isFunction(n)&&n(e,t,r)})},p.prototype._on=function(){var e=this._generateEventOptions.apply(this,arguments);this._checkListener("newListener",e.event.name,e.callback),this._checkListener("removeListener",e.event.name,e.callback);var t=new s({subscription:{params:1,inputFormatter:[c.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event),subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),i.isFunction(this.callback)&&this.callback(null,e,this)}},type:"eth",requestManager:this._requestManager});return t.subscribe("logs",e.params,e.callback||function(){}),t},p.prototype.getPastEvents=function(){var e=this._generateEventOptions.apply(this,arguments),t=new o({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[c.inputLogFormatter],outputFormatter:this._decodeEventABI.bind(e.event)});t.setRequestManager(this._requestManager);var n=t.buildCall();return t=null,n(e.params,e.callback)},p.prototype._createTxObject=function(){var e=Array.prototype.slice.call(arguments),t={};if("function"===this.method.type&&(t.call=this.parent._executeMethod.bind(t,"call"),t.call.request=this.parent._executeMethod.bind(t,"call",!0)),t.send=this.parent._executeMethod.bind(t,"send"),t.send.request=this.parent._executeMethod.bind(t,"send",!0),t.encodeABI=this.parent._encodeMethodABI.bind(t),t.estimateGas=this.parent._executeMethod.bind(t,"estimate"),e&&this.method.inputs&&e.length!==this.method.inputs.length)throw u.InvalidNumberOfParams(e.length,this.method.inputs.length,this.method.name);return t.arguments=e||[],t._method=this.method,t._parent=this.parent,this.deployData&&(t._deployData=this.deployData),t},p.prototype._processExecuteArguments=function(e,t){var n={};if(n.type=e.shift(),n.callback=this._parent._getCallback(e),"call"===n.type&&!0!==e[e.length-1]&&(i.isString(e[e.length-1])||isFinite(e[e.length-1]))&&(n.defaultBlock=e.pop()),n.options=i.isObject(e[e.length-1])?e.pop():{},n.generateRequest=!0===e[e.length-1]&&e.pop(),n.options=this._parent._getOrSetDefaultOptions(n.options),n.options.data=this.encodeABI(),!this._deployData&&!a.isAddress(this._parent.options.address))throw new Error("This contract object doesn't have address set yet, please set an address first.");return this._deployData||(n.options.to=this._parent.options.address),n.options.data?n:a._fireError(new Error("Couldn't find a matching contract method, or the number of parameters is wrong."),t.eventEmitter,t.reject,n.callback)},p.prototype._executeMethod=function(){var e=this,t=this._parent._processExecuteArguments.call(this,Array.prototype.slice.call(arguments),n),n=l("send"!==t.type);if(t.generateRequest){var r={params:[c.inputCallFormatter.call(this._parent,t.options),c.inputDefaultBlockNumberFormatter.call(this._parent,t.defaultBlock)],callback:t.callback};return"call"===t.type?(r.method="eth_call",r.format=this._parent._decodeMethodReturn.bind(null,this._method.outputs)):r.method="eth_sendTransaction",r}switch(t.type){case"estimate":return new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[c.inputCallFormatter],outputFormatter:a.hexToNumber,requestManager:e._parent._requestManager,accounts:p._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.callback);case"call":return new o({name:"call",call:"eth_call",params:2,inputFormatter:[c.inputCallFormatter,c.inputDefaultBlockNumberFormatter],outputFormatter:function(t){return e._parent._decodeMethodReturn(e._method.outputs,t)},requestManager:e._parent._requestManager,accounts:p._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock}).createFunction()(t.options,t.defaultBlock,t.callback);case"send":if(!a.isAddress(t.options.from))return a._fireError(new Error('No "from" address specified in neither the given options, nor the default options.'),n.eventEmitter,n.reject,t.callback);if(i.isBoolean(this._method.payable)&&!this._method.payable&&t.options.value&&t.options.value>0)return a._fireError(new Error("Can not send value to non-payable contract method or constructor"),n.eventEmitter,n.reject,t.callback);var s={receiptFormatter:function(t){if(i.isArray(t.logs)){var n=i.map(t.logs,function(t){return e._parent._decodeEventABI.call({name:"ALLEVENTS",jsonInterface:e._parent.options.jsonInterface},t)});t.events={};var r=0;n.forEach(function(e){e.event?t.events[e.event]?Array.isArray(t.events[e.event])?t.events[e.event].push(e):t.events[e.event]=[t.events[e.event],e]:t.events[e.event]=e:(t.events[r]=e,r++)}),delete t.logs}return t},contractDeployFormatter:function(t){var n=e._parent.clone();return n.options.address=t.contractAddress,n}};return new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[c.inputTransactionFormatter],requestManager:e._parent._requestManager,accounts:p._ethAccounts,defaultAccount:e._parent.defaultAccount,defaultBlock:e._parent.defaultBlock,extraFormatters:s}).createFunction()(t.options,t.callback)}},t.exports=p},{underscore:247,"web3-core":202,"web3-core-helpers":186,"web3-core-method":188,"web3-core-promievent":191,"web3-core-subscriptions":199,"web3-eth-abi":205,"web3-utils":273}],249:[function(e,t,n){var i=e("web3-utils"),r=e("bn.js"),o=function(e,t){for(var n=e;n.length<2*t;)n="0"+n;return n},a=function(e){var t="A".charCodeAt(0),n="Z".charCodeAt(0);return e=e.toUpperCase(),(e=e.substr(4)+e.substr(0,4)).split("").map(function(e){var i=e.charCodeAt(0);return i>=t&&i<=n?i-t+10:e}).join("")},s=function(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97},c=function(e){this._iban=e};c.toAddress=function(e){if(!(e=new c(e)).isDirect())throw new Error("IBAN is indirect and can't be converted");return e.toAddress()},c.toIban=function(e){return c.fromAddress(e).toString()},c.fromAddress=function(e){if(!i.isAddress(e))throw new Error("Provided address is not a valid address: "+e);e=e.replace("0x","").replace("0X","");var t=new r(e,16).toString(36),n=o(t,15);return c.fromBban(n.toUpperCase())},c.fromBban=function(e){var t=("0"+(98-s(a("XE00"+e)))).slice(-2);return new c("XE"+t+e)},c.createIndirect=function(e){return c.fromBban("ETH"+e.institution+e.identifier)},c.isValid=function(e){return new c(e).isValid()},c.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===s(a(this._iban))},c.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},c.prototype.isIndirect=function(){return 20===this._iban.length},c.prototype.checksum=function(){return this._iban.substr(2,2)},c.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},c.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},c.prototype.toAddress=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new r(e,36);return i.toChecksumAddress(t.toString(16,20))}return""},c.prototype.toString=function(){return this._iban},t.exports=c},{"bn.js":"BN","web3-utils":273}],250:[function(e,t,n){var i=e("web3-core"),r=e("web3-core-method"),o=e("web3-utils"),a=e("web3-net"),s=e("web3-core-helpers").formatters,c=function(){var e=this;i.packageInit(this,arguments),this.net=new a(this.currentProvider);var t=null,n="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return t},set:function(e){return e&&(t=o.toChecksumAddress(s.inputAddressFormatter(e))),c.forEach(function(e){e.defaultAccount=t}),e},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return n},set:function(e){return n=e,c.forEach(function(e){e.defaultBlock=n}),e},enumerable:!0});var c=[new r({name:"getAccounts",call:"personal_listAccounts",params:0,outputFormatter:o.toChecksumAddress}),new r({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:o.toChecksumAddress}),new r({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[s.inputAddressFormatter,null,null]}),new r({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[s.inputAddressFormatter]}),new r({name:"importRawKey",call:"personal_importRawKey",params:2}),new r({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[s.inputTransactionFormatter,null]}),new r({name:"sign",call:"personal_sign",params:3,inputFormatter:[s.inputSignFormatter,s.inputAddressFormatter,null]}),new r({name:"ecRecover",call:"personal_ecRecover",params:2,inputFormatter:[s.inputSignFormatter,null]})];c.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};i.addProviders(c),t.exports=c},{"web3-core":202,"web3-core-helpers":186,"web3-core-method":188,"web3-net":254,"web3-utils":273}],251:[function(e,t,n){arguments[4][172][0].apply(n,arguments)},{dup:172}],252:[function(e,t,n){var i=e("underscore");t.exports=function(e){var t,n=this;return this.net.getId().then(function(e){return t=e,n.getBlock(0)}).then(function(n){var r="private";return"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"===n.hash&&1===t&&(r="main"),"0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303"===n.hash&&2===t&&(r="morden"),"0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"===n.hash&&3===t&&(r="ropsten"),"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"===n.hash&&4===t&&(r="rinkeby"),"0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9"===n.hash&&42===t&&(r="kovan"),i.isFunction(e)&&e(null,r),r}).catch(function(t){if(!i.isFunction(e))throw t;e(t)})}},{underscore:251}],253:[function(e,t,n){var i=e("underscore"),r=e("web3-core"),o=e("web3-core-helpers"),a=e("web3-core-subscriptions").subscriptions,s=e("web3-core-method"),c=e("web3-utils"),u=e("web3-net"),l=e("web3-eth-personal"),f=e("web3-eth-contract"),p=e("web3-eth-iban"),d=e("web3-eth-accounts"),h=e("web3-eth-abi"),m=e("./getNetworkType.js"),v=o.formatters,b=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},y=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},_=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},x=function(e){return i.isString(e[0])&&0===e[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},w=function(){var e=this;r.packageInit(this,arguments);var t=this.setProvider;this.setProvider=function(){t.apply(e,arguments),e.net.setProvider.apply(e,arguments),e.personal.setProvider.apply(e,arguments),e.accounts.setProvider.apply(e,arguments),e.Contract.setProvider(e.currentProvider,e.accounts)};var n=null,o="latest";Object.defineProperty(this,"defaultAccount",{get:function(){return n},set:function(t){return t&&(n=c.toChecksumAddress(v.inputAddressFormatter(t))),e.Contract.defaultAccount=n,e.personal.defaultAccount=n,w.forEach(function(e){e.defaultAccount=n}),t},enumerable:!0}),Object.defineProperty(this,"defaultBlock",{get:function(){return o},set:function(t){return o=t,e.Contract.defaultBlock=o,e.personal.defaultBlock=o,w.forEach(function(e){e.defaultBlock=o}),t},enumerable:!0}),this.clearSubscriptions=e._requestManager.clearSubscriptions,this.net=new u(this.currentProvider),this.net.getNetworkType=m.bind(this),this.accounts=new d(this.currentProvider),this.personal=new l(this.currentProvider),this.personal.defaultAccount=this.defaultAccount,this.Contract=f,this.Contract.defaultAccount=this.defaultAccount,this.Contract.defaultBlock=this.defaultBlock,this.Contract.setProvider(this.currentProvider,this.accounts),this.Iban=p,this.abi=h;var w=[new s({name:"getProtocolVersion",call:"eth_protocolVersion",params:0}),new s({name:"getCoinbase",call:"eth_coinbase",params:0}),new s({name:"isMining",call:"eth_mining",params:0}),new s({name:"getHashrate",call:"eth_hashrate",params:0,outputFormatter:c.hexToNumber}),new s({name:"isSyncing",call:"eth_syncing",params:0,outputFormatter:v.outputSyncingFormatter}),new s({name:"getGasPrice",call:"eth_gasPrice",params:0,outputFormatter:v.outputBigNumberFormatter}),new s({name:"getAccounts",call:"eth_accounts",params:0,outputFormatter:c.toChecksumAddress}),new s({name:"getBlockNumber",call:"eth_blockNumber",params:0,outputFormatter:c.hexToNumber}),new s({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter],outputFormatter:v.outputBigNumberFormatter}),new s({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[v.inputAddressFormatter,c.numberToHex,v.inputDefaultBlockNumberFormatter]}),new s({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter]}),new s({name:"getBlock",call:b,params:2,inputFormatter:[v.inputBlockNumberFormatter,function(e){return!!e}],outputFormatter:v.outputBlockFormatter}),new s({name:"getUncle",call:g,params:2,inputFormatter:[v.inputBlockNumberFormatter,c.numberToHex],outputFormatter:v.outputBlockFormatter}),new s({name:"getBlockTransactionCount",call:_,params:1,inputFormatter:[v.inputBlockNumberFormatter],outputFormatter:c.hexToNumber}),new s({name:"getBlockUncleCount",call:x,params:1,inputFormatter:[v.inputBlockNumberFormatter],outputFormatter:c.hexToNumber}),new s({name:"getTransaction",call:"eth_getTransactionByHash",params:1,inputFormatter:[null],outputFormatter:v.outputTransactionFormatter}),new s({name:"getTransactionFromBlock",call:y,params:2,inputFormatter:[v.inputBlockNumberFormatter,c.numberToHex],outputFormatter:v.outputTransactionFormatter}),new s({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,inputFormatter:[null],outputFormatter:v.outputTransactionReceiptFormatter}),new s({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[v.inputAddressFormatter,v.inputDefaultBlockNumberFormatter],outputFormatter:c.hexToNumber}),new s({name:"sendSignedTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),new s({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[v.inputTransactionFormatter]}),new s({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[v.inputTransactionFormatter]}),new s({name:"sign",call:"eth_sign",params:2,inputFormatter:[v.inputSignFormatter,v.inputAddressFormatter],transformPayload:function(e){return e.params.reverse(),e}}),new s({name:"call",call:"eth_call",params:2,inputFormatter:[v.inputCallFormatter,v.inputDefaultBlockNumberFormatter]}),new s({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[v.inputCallFormatter],outputFormatter:c.hexToNumber}),new s({name:"getCompilers",call:"eth_getCompilers",params:0}),new s({name:"compile.solidity",call:"eth_compileSolidity",params:1}),new s({name:"compile.lll",call:"eth_compileLLL",params:1}),new s({name:"compile.serpent",call:"eth_compileSerpent",params:1}),new s({name:"submitWork",call:"eth_submitWork",params:3}),new s({name:"getWork",call:"eth_getWork",params:0}),new s({name:"getPastLogs",call:"eth_getLogs",params:1,inputFormatter:[v.inputLogFormatter],outputFormatter:v.outputLogFormatter}),new a({name:"subscribe",type:"eth",subscriptions:{newBlockHeaders:{subscriptionName:"newHeads",params:0,outputFormatter:v.outputBlockFormatter},pendingTransactions:{subscriptionName:"newPendingTransactions",params:0},logs:{params:1,inputFormatter:[v.inputLogFormatter],outputFormatter:v.outputLogFormatter,subscriptionHandler:function(e){e.removed?this.emit("changed",e):this.emit("data",e),i.isFunction(this.callback)&&this.callback(null,e,this)}},syncing:{params:0,outputFormatter:v.outputSyncingFormatter,subscriptionHandler:function(e){var t=this;!0!==this._isSyncing?(this._isSyncing=!0,this.emit("changed",t._isSyncing),i.isFunction(this.callback)&&this.callback(null,t._isSyncing,this),setTimeout(function(){t.emit("data",e),i.isFunction(t.callback)&&t.callback(null,e,t)},0)):(this.emit("data",e),i.isFunction(t.callback)&&this.callback(null,e,this),clearTimeout(this._isSyncingTimeout),this._isSyncingTimeout=setTimeout(function(){e.currentBlock>e.highestBlock-200&&(t._isSyncing=!1,t.emit("changed",t._isSyncing),i.isFunction(t.callback)&&t.callback(null,t._isSyncing,t))},500))}}}})];w.forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager,e.accounts),t.defaultBlock=e.defaultBlock,t.defaultAccount=e.defaultAccount})};r.addProviders(w),t.exports=w},{"./getNetworkType.js":252,underscore:251,"web3-core":202,"web3-core-helpers":186,"web3-core-method":188,"web3-core-subscriptions":199,"web3-eth-abi":205,"web3-eth-accounts":246,"web3-eth-contract":248,"web3-eth-iban":249,"web3-eth-personal":250,"web3-net":254,"web3-utils":273}],254:[function(e,t,n){var i=e("web3-core"),r=e("web3-core-method"),o=e("web3-utils"),a=function(){var e=this;i.packageInit(this,arguments),[new r({name:"getId",call:"net_version",params:0,outputFormatter:o.hexToNumber}),new r({name:"isListening",call:"net_listening",params:0}),new r({name:"getPeerCount",call:"net_peerCount",params:0,outputFormatter:o.hexToNumber})].forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};i.addProviders(a),t.exports=a},{"web3-core":202,"web3-core-method":188,"web3-utils":273}],255:[function(e,t,n){t.exports=XMLHttpRequest},{}],256:[function(e,t,n){var i=e("web3-core-helpers").errors,r=e("xhr2"),o=function(e,t){this.host=e||"http://localhost:8545",this.timeout=t||0,this.connected=!1};o.prototype.send=function(e,t){var n=this,o=new r;o.open("POST",this.host,!0),o.setRequestHeader("Content-Type","application/json"),o.onreadystatechange=function(){if(4===o.readyState&&1!==o.timeout){var e=o.responseText,r=null;try{e=JSON.parse(e)}catch(e){r=i.InvalidResponse(o.responseText)}n.connected=!0,t(r,e)}},o.ontimeout=function(){n.connected=!1,t(i.ConnectionTimeout(this.timeout))};try{o.send(JSON.stringify(e))}catch(e){this.connected=!1,t(i.InvalidConnection(this.host))}},t.exports=o},{"web3-core-helpers":186,xhr2:255}],257:[function(e,t,n){!function(e,i,r,o,a,s){function c(e,t){return function(){return e.call(this,t.apply(this,arguments))}}function u(e){return function(t){return t[e]}}function l(e,t){return t.apply(s,e)}function f(e){var t=e.length-1,n=r.prototype.slice;if(0==t)return function(){return e.call(this,n.call(arguments))};if(1==t)return function(){return e.call(this,arguments[0],n.call(arguments,1))};var i=r(e.length);return function(){for(var r=0;rd&&(n("Max buffer length exceeded: textNode"),e=Math.max(e,D.length)),L.length>d&&(n("Max buffer length exceeded: numberNode"),e=Math.max(e,L.length)),N=d-e+G}function n(e){D!==s&&(l(D),f(),D=s),r=o(e+"\nLn: "+J+"\nCol: "+$+"\nChr: "+a),p(z(s,s,r))}function i(e){return"\r"==e||"\n"==e||" "==e||"\t"==e}var r,a,c,u=e(ye).emit,l=e(ge).emit,f=e(_e).emit,p=e(fe).emit,d=65536,h=/[\\"\n]/g,m=0,v=m++,b=m++,y=m++,g=m++,_=m++,x=m++,w=m++,k=m++,j=m++,S=m++,E=m++,A=m++,C=m++,M=m++,T=m++,P=m++,F=m++,I=m++,B=m++,R=m++,O=m,N=d,D=s,L="",q=!1,U=!1,H=v,V=[],K=null,W=0,X=0,G=0,$=0,J=1;e(me).on(function(e){if(!r){if(U)return n("Cannot write after close");var o=0;for(a=e[0];a&&(c=a,a=e[o++]);)switch(G++,"\n"==a?(J++,$=0):$++,H){case v:if("{"===a)H=y;else if("["===a)H=_;else if(!i(a))return n("Non-whitespace before {[.");continue;case k:case y:if(i(a))continue;if(H===k)V.push(j);else{if("}"===a){l({}),f(),H=V.pop()||b;continue}V.push(g)}if('"'!==a)return n('Malformed object key should start with " ');H=w;continue;case j:case g:if(i(a))continue;if(":"===a)H===g?(V.push(g),D!==s&&(l({}),u(D),D=s),X++):D!==s&&(u(D),D=s),H=b;else if("}"===a)D!==s&&(l(D),f(),D=s),f(),X--,H=V.pop()||b;else{if(","!==a)return n("Bad object");H===g&&V.push(g),D!==s&&(l(D),f(),D=s),H=k}continue;case _:case b:if(i(a))continue;if(H===_){if(l([]),X++,H=b,"]"===a){f(),X--,H=V.pop()||b;continue}V.push(x)}if('"'===a)H=w;else if("{"===a)H=y;else if("["===a)H=_;else if("t"===a)H=S;else if("f"===a)H=C;else if("n"===a)H=F;else if("-"===a)L+=a;else if("0"===a)L+=a,H=O;else{if(-1==="123456789".indexOf(a))return n("Bad value");L+=a,H=O}continue;case x:if(","===a)V.push(x),D!==s&&(l(D),f(),D=s),H=b;else{if("]"!==a){if(i(a))continue;return n("Bad array")}D!==s&&(l(D),f(),D=s),f(),X--,H=V.pop()||b}continue;case w:D===s&&(D="");var p=o-1;e:for(;;){for(;W>0;)if(K+=a,a=e.charAt(o++),4===W?(D+=String.fromCharCode(parseInt(K,16)),W=0,p=o-1):W++,!a)break e;if('"'===a&&!q){H=V.pop()||b,D+=e.substring(p,o-1);break}if(!("\\"!==a||q||(q=!0,D+=e.substring(p,o-1),a=e.charAt(o++))))break;if(q){if(q=!1,"n"===a?D+="\n":"r"===a?D+="\r":"t"===a?D+="\t":"f"===a?D+="\f":"b"===a?D+="\b":"u"===a?(W=1,K=""):D+=a,a=e.charAt(o++),p=o-1,a)continue;break}h.lastIndex=o;var d=h.exec(e);if(!d){o=e.length+1,D+=e.substring(p,o-1);break}if(o=d.index+1,!(a=e.charAt(d.index))){D+=e.substring(p,o-1);break}}continue;case S:if(!a)continue;if("r"!==a)return n("Invalid true started with t"+a);H=E;continue;case E:if(!a)continue;if("u"!==a)return n("Invalid true started with tr"+a);H=A;continue;case A:if(!a)continue;if("e"!==a)return n("Invalid true started with tru"+a);l(!0),f(),H=V.pop()||b;continue;case C:if(!a)continue;if("a"!==a)return n("Invalid false started with f"+a);H=M;continue;case M:if(!a)continue;if("l"!==a)return n("Invalid false started with fa"+a);H=T;continue;case T:if(!a)continue;if("s"!==a)return n("Invalid false started with fal"+a);H=P;continue;case P:if(!a)continue;if("e"!==a)return n("Invalid false started with fals"+a);l(!1),f(),H=V.pop()||b;continue;case F:if(!a)continue;if("u"!==a)return n("Invalid null started with n"+a);H=I;continue;case I:if(!a)continue;if("l"!==a)return n("Invalid null started with nu"+a);H=B;continue;case B:if(!a)continue;if("l"!==a)return n("Invalid null started with nul"+a);l(null),f(),H=V.pop()||b;continue;case R:if("."!==a)return n("Leading zero not followed by .");L+=a,H=O;continue;case O:if(-1!=="0123456789".indexOf(a))L+=a;else if("."===a){if(-1!==L.indexOf("."))return n("Invalid number has two dots");L+=a}else if("e"===a||"E"===a){if(-1!==L.indexOf("e")||-1!==L.indexOf("E"))return n("Invalid number has two exponential");L+=a}else if("+"===a||"-"===a){if("e"!==c&&"E"!==c)return n("Invalid symbol in number");L+=a}else L&&(l(parseFloat(L)),f(),L=""),o--,H=V.pop()||b;continue;default:return n("Unknown state: "+H)}G>=N&&t()}}),e(ve).on(function(){if(H==v)return l({}),f(),void(U=!0);H===b&&0===X||n("Unexpected end"),D!==s&&(l(D),f(),D=s),U=!0})}function P(e,t){var n,i={};for(var r in t)e(r).on(function(e){return function(t){n=e(n,t)}}(t[r]),i);e(ue).on(function(e){var t=Y(n),i=ne(t),r=Z(n);r&&(ie(Y(r))[i]=e)}),e(le).on(function(){var e=Y(n),t=ne(e),i=Z(n);i&&delete ie(Y(i))[t]}),e(be).on(function(){for(var n in t)e(n).un(i)})}function F(e){var t={};return e&&e.split("\r\n").forEach(function(e){var n=e.indexOf(": ");t[e.substring(0,n)]=e.substring(n+2)}),t}function I(e,t){function n(e){return{"http:":80,"https:":443}[e]}function i(t){return t.port||n(t.protocol||e.protocol)}return!!(t.protocol&&t.protocol!=e.protocol||t.host&&t.host!=e.host||t.host&&i(t)!=i(e))}function B(e){var t=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e)||[];return{protocol:t[1]||"",host:t[2]||"",port:t[3]||""}}function R(){return new XMLHttpRequest}function O(t,n,i,r,o,a,c){function u(){var e=n.responseText,t=e.substr(p);t&&l(t),p=$(e)}var l=t(me).emit,f=t(fe).emit,p=0,d=!0;t(be).on(function(){n.onreadystatechange=null,n.abort()}),"onprogress"in n&&(n.onprogress=u),n.onreadystatechange=function(){function e(){try{d&&t(he).emit(n.status,F(n.getAllResponseHeaders())),d=!1}catch(e){}}switch(n.readyState){case 2:case 3:return e();case 4:e(),2==String(n.status)[0]?(u(),t(ve).emit()):f(z(n.status,n.responseText))}};try{n.open(i,r,!0);for(var h in a)n.setRequestHeader(h,a[h]);I(e.location,B(r))||n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.withCredentials=c,n.send(o)}catch(t){e.setTimeout(X(f,z(s,s,t)),0)}}function N(e,t){return{key:e,node:t}}function D(e){function t(e,t){var n=ie(Y(e));return b(r,n)?i(e,$(n),t):e}function n(e,t,n){ie(Y(e))[t]=n}function i(e,t,i){e&&n(e,t,i);var r=_(N(t,i),e);return o(r),r}var o=e(se).emit,a=e(ce).emit,s=e(de).emit,c=e(pe).emit,u={};return u[ge]=function(e,r){if(!e)return s(r),i(e,re,r);var o=t(e,r),a=Z(o),c=ne(Y(o));return n(a,c,r),_(N(c,r),a)},u[_e]=function(e){return a(e),Z(e)||c(ie(Y(e)))},u[ye]=i,u}function L(e,t,n){function i(e){return function(t){return t.id==e}}var r,o;return{on:function(n,i){var a={listener:n,id:i||n};return t&&t.emit(e,n,a.id),r=_(a,r),o=_(n,o),this},emit:function(){A(o,arguments)},un:function(t){var a;r=S(r,i(t),function(e){a=e}),a&&(o=S(o,function(e){return e==a.listener}),n&&n.emit(e,a.listener,a.id))},listeners:function(){return o},hasListener:function(e){return y(M(e?i(e):m,r))}}}function q(){function e(e){return n[e]=L(e,i,r)}function t(t){return n[t]||e(t)}var n={},i=e("newListener"),r=e("removeListener");return["emit","on","un"].forEach(function(e){t[e]=f(function(n,i){l(i,t(n)[e])})}),t}function z(e,t,n){try{var i=a.parse(t)}catch(e){}return{statusCode:e,body:t,jsonBody:i,thrown:n}}function U(e,t){function n(e,t,n){var i=C(n);e(t,w(Z(k(ne,i))),w(k(ie,i)))}function i(t,i,r){var o=e(t).emit;i.on(function(e){var t=r(e);!1!==t&&n(o,ie(t),e)},t),e("removeListener").on(function(n){n==t&&(e(n).listeners()||i.un(t))})}var r={node:e(ce),path:e(se)};e("newListener").on(function(e){var n=/(node|path):(.*)/.exec(e);if(n){var o=r[n[1]];o.hasListener(e)||i(e,o,t(n[2]))}})}function H(e,t){function n(e,t,n){n=n||t;var r=i(t);return e.on(function(){var t=!1;u.forget=function(){t=!0},l(arguments,r),delete u.forget,t&&e.un(n)},n),u}function i(e){return function(){try{return e.apply(u,arguments)}catch(e){setTimeout(function(){throw e})}}}function r(t,n){return e(t+":"+n)}function o(e){return function(){var t=e.apply(this,arguments);y(t)&&(t==W.drop?m():b(t))}}function a(e,t,i){var a;a="node"==e?o(i):i,n(r(e,t),a,i)}function s(e,t){for(var n in t)a(e,n,t[n])}function c(e,t,n){return J(t)?a(e,t,n):s(e,t),u}var u,p=/^(node|path):./,d=e(pe),m=e(le).emit,b=e(ue).emit,g=f(function(t,i){if(u[t])l(i,u[t]);else{var r=e(t),o=i[0];p.test(t)?n(r,o):r.on(o)}return u});return e(de).on(function(e){u.root=v(e)}),e(he).on(function(e,t){u.header=function(e){return e?t[e]:t}}),u={on:g,addListener:g,removeListener:function(t,n,i){if("done"==t)d.un(n);else if("node"==t||"path"==t)e.un(t+":"+n,i);else{var r=n;e(t).un(r)}return u},emit:e.emit,node:X(c,"node"),path:X(c,"path"),done:X(n,d),start:X(function(t,n){return e(t).on(i(n),n),u},he),fail:e(fe).on,abort:e(be).emit,header:h,root:h,source:t}}function V(e,t,n,i,r){var o=q();return t&&O(o,R(),e,t,n,i,r),T(o),P(o,D(o)),U(o,oe),H(o,t)}function K(e,t,n,i,r,o,s){return r=r?a.parse(a.stringify(r)):{},i?J(i)||(i=a.stringify(i),r["Content-Type"]=r["Content-Type"]||"application/json"):i=null,e(n||"GET",function(e,t){return!1===t&&(-1==e.indexOf("?")?e+="?":e+="&",e+="_="+(new Date).getTime()),e}(t,s),i,r,o||!1)}function W(e){var t=ee("resume","pause","pipe"),n=X(g,t);return e?n(e)||J(e)?K(V,e):K(V,e.url,e.method,e.body,e.headers,e.withCredentials,e.cached):V()}var X=f(function(e,t){var n=t.length;return f(function(i){for(var r=0;r2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var p=f[0],d=f[1];if(p||(p="0"),d||(d="0"),d.length>s)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;d.length65536){if(!r)throw new Error("Requested too many random bytes.");n(new Error("Requested too many random bytes."))}if(void 0!==i&&i.randomBytes){if(!r)return"0x"+i.randomBytes(t).toString("hex");i.randomBytes(t,function(e,t){e?n(c):n(null,"0x"+t.toString("hex"))})}else{var o;if(void 0!==i?o=i:"undefined"!=typeof msCrypto&&(o=msCrypto),o&&o.getRandomValues){var a=o.getRandomValues(new Uint8Array(t)),s="0x"+Array.from(a).map(function(e){return e.toString(16)}).join("");if(!r)return s;n(null,s)}else{var c=new Error('No "crypto" object available. This Browser doesn\'t support generating secure random bytes.');if(!r)throw c;n(c)}}}},{"./crypto.js":268}],270:[function(e,t,n){var i=e("is-hex-prefixed");t.exports=function(e){return"string"!=typeof e?e:i(e)?e.slice(2):e}},{"is-hex-prefixed":265}],271:[function(e,t,n){arguments[4][172][0].apply(n,arguments)},{dup:172}],272:[function(e,t,n){(function(e){!function(i){function r(e){for(var t,n,i=[],r=0,o=e.length;r=55296&&t<=56319&&r65535&&(r+=b((t-=65536)>>>10&1023|55296),t=56320|1023&t),r+=b(t);return r}function a(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return b(e>>t&63|128)}function c(e){if(0==(4294967168&e))return b(e);var t="";return 0==(4294965248&e)?t=b(e>>6&31|192):0==(4294901760&e)?(a(e),t=b(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=b(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+=b(63&e|128)}function u(){if(v>=m)throw Error("Invalid byte index");var e=255&h[v];if(v++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function l(){var e,t,n,i,r;if(v>m)throw Error("Invalid byte index");if(v==m)return!1;if(e=255&h[v],v++,0==(128&e))return e;if(192==(224&e)){if((r=(31&e)<<6|(t=u()))>=128)return r;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=u(),n=u(),(r=(15&e)<<12|t<<6|n)>=2048)return a(r),r;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=u(),n=u(),i=u(),(r=(15&e)<<18|t<<12|n<<6|i)>=65536&&r<=1114111))return r;throw Error("Invalid UTF-8 detected")}var f="object"==(void 0===n?"undefined":_typeof(n))&&n,p="object"==(void 0===t?"undefined":_typeof(t))&&t&&t.exports==f&&t,d="object"==(void 0===e?"undefined":_typeof(e))&&e;d.global!==d&&d.window!==d||(i=d);var h,m,v,b=String.fromCharCode,y={version:"2.0.0",encode:function(e){for(var t=r(e),n=t.length,i=-1,o="";++i7?n+=e[i].toUpperCase():n+=e[i];return n},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:c,toAscii:c,asciiToHex:u,fromAscii:u,unitMap:r.unitMap,toWei:function(e,t){return t=l(t),o.isBN(e)?r.toWei(e,t):r.toWei(e,t).toString(10)},fromWei:function(e,t){return t=l(t),o.isBN(e)?r.fromWei(e,t):r.fromWei(e,t).toString(10)},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement}},{"./soliditySha3.js":274,"./utils.js":275,"ethjs-unit":264,randomhex:269,underscore:271}],274:[function(e,t,n){var i=e("underscore"),r=e("bn.js"),o=e("./utils.js"),a=function(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e},s=function(e){var t=/^\D+(\d+).*$/.exec(e);return t?parseInt(t[1],10):null},c=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null},u=function(e){var t=void 0===e?"undefined":_typeof(e);if("string"===t)return o.isHex(e)?new r(e.replace(/0x/i,""),16):new r(e,10);if("number"===t)return new r(e);if(o.isBigNumber(e))return new r(e.toString(10));if(o.isBN(e))return e;throw new Error(e+" is not a number")},l=function(e,t,n){var i,c;if("bytes"===(e=a(e))){if(t.replace(/^0x/i,"").length%2!=0)throw new Error("Invalid bytes characters "+t.length);return t}if("string"===e)return o.utf8ToHex(t);if("bool"===e)return t?"01":"00";if(e.startsWith("address")){if(i=n?64:40,!o.isAddress(t))throw new Error(t+" is not a valid address, or the checksum is invalid.");return o.leftPad(t.toLowerCase(),i)}if(i=s(e),e.startsWith("bytes")){if(!i)throw new Error("bytes[] not yet supported in solidity");if(n&&(i=32),i<1||i>32||i256)throw new Error("Invalid uint"+i+" size");if((c=u(t)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+c.bitLength());if(c.lt(new r(0)))throw new Error("Supplied uint "+c.toString()+" is negative");return i?o.leftPad(c.toString("hex"),i/8*2):c}if(e.startsWith("int")){if(i%8||i<8||i>256)throw new Error("Invalid int"+i+" size");if((c=u(t)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+c.bitLength());return c.lt(new r(0))?c.toTwos(i).toString("hex"):i?o.leftPad(c.toString("hex"),i/8*2):c}throw new Error("Unsupported or invalid type: "+e)},f=function(e){if(i.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,n,a="";if(i.isObject(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.t||e.type,a=e.v||e.value):(t=o.toHex(e,!0),a=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof a||/^(-)?0x/i.test(a)||(a=new r(a)),i.isArray(a)){if((n=c(t))&&a.length!==n)throw new Error(t+" is not matching the given array "+JSON.stringify(a));n=a.length}return i.isArray(a)?a.map(function(e){return l(t,e,n).toString("hex").replace("0x","")}).join(""):l(t,a,n).toString("hex").replace("0x","")};t.exports=function(){var e=Array.prototype.slice.call(arguments),t=i.map(e,f);return o.sha3("0x"+t.join(""))}},{"./utils.js":275,"bn.js":"BN",underscore:271}],275:[function(e,t,n){var i=e("underscore"),r=e("bn.js"),o=e("number-to-bn"),a=e("utf8"),s=e("eth-lib/lib/hash"),c=function(e){return e instanceof r||e&&e.constructor&&"BN"===e.constructor.name},u=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},l=function(e){try{return o.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},f=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||p(e))},p=function(e){e=e.replace(/^0x/i,"");for(var t=b(e.toLowerCase()).replace(/^0x/i,""),n=0;n<40;n++)if(parseInt(t[n],16)>7&&e[n].toUpperCase()!==e[n]||parseInt(t[n],16)<=7&&e[n].toLowerCase()!==e[n])return!1;return!0},d=function(e){var t="";e=(e=(e=(e=(e=a.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return"0x"+t.join("")},isHex:v,leftPad:function(e,t,n){var i=/^0x/i.test(e)||"number"==typeof e,r=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(i?"0x":"")+new Array(r).join(n||"0")+e},rightPad:function(e,t,n){var i=/^0x/i.test(e)||"number"==typeof e,r=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(i?"0x":"")+e+new Array(r).join(n||"0")},toTwosComplement:function(e){return"0x"+l(e).toTwos(256).toString(16,64)},sha3:b}},{"bn.js":"BN","eth-lib/lib/hash":263,"number-to-bn":266,underscore:271,utf8:272}],276:[function(e,t,n){t.exports={name:"web3",namespace:"ethereum",version:"1.0.0-beta.22",description:"Ethereum JavaScript API",repository:"https://github.com/ethereum/web3.js/tree/master/packages/web3",license:"LGPL-3.0",main:"src/index.js",bugs:{url:"https://github.com/ethereum/web3.js/issues"},keywords:["Ethereum","JavaScript","API"],author:"ethereum.org",authors:[{name:"Fabian Vogelsteller",email:"fabian@ethereum.org",homepage:"http://frozeman.de"},{name:"Marek Kotewicz",email:"marek@parity.io",url:"https://github.com/debris"},{name:"Marian Oancea",url:"https://github.com/cubedro"},{name:"Gav Wood",email:"g@parity.io",homepage:"http://gavwood.com"},{name:"Jeffery Wilcke",email:"jeffrey.wilcke@ethereum.org",url:"https://github.com/obscuren"}],dependencies:{"web3-bzz":"^1.0.0-beta.22","web3-core":"^1.0.0-beta.22","web3-eth":"^1.0.0-beta.22","web3-eth-personal":"^1.0.0-beta.22","web3-net":"^1.0.0-beta.22","web3-shh":"^1.0.0-beta.22","web3-utils":"^1.0.0-beta.22"}}},{}],BN:[function(e,t,n){!function(t,n){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}function a(e,t,n){for(var i=0,r=Math.min(e.length,n),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return i}function s(e,t,n,i){for(var r=0,o=Math.min(e.length,n),a=t;a=49?s-49+10:s>=17?s-17+10:s}return r}function c(e){for(var t=new Array(e.bitLength()),n=0;n>>r}return t}function u(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var r=0|e.words[0],o=0|t.words[0],a=r*o,s=67108863&a,c=a/67108864|0;n.words[0]=s;for(var u=1;u>>26,f=67108863&c,p=Math.min(u,t.length-1),d=Math.max(0,u-e.length+1);d<=p;d++){var h=u-d|0;l+=(a=(r=0|e.words[h])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}n.words[u]=0|f,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}function l(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,r=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,i=a,a=r}return 0!==i?n.words[o]=i:n.length--,n.strip()}function f(e,t,n){return(new p).mulp(e,t,n)}function p(e,t){this.x=e,this.y=t}function d(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function h(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function g(e){y.call(this,e),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"===(void 0===t?"undefined":_typeof(t))?t.exports=o:n.BN=o,o.BN=o,o.wordSize=26;var _;try{_=e("buffer").Buffer}catch(e){}o.isBN=function(e){return e instanceof o||null!==e&&"object"===(void 0===e?"undefined":_typeof(e))&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"===(void 0===e?"undefined":_typeof(e)))return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&r++,16===t?this._parseHex(e,r):this._parseBase(e,t,r),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r=0;r-=3)a=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(r=0,o=0;r>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)r=a(e,n,n+6),this.words[i]|=r<>>26-o&4194303,(o+=24)>=26&&(o-=26,i++);n+6!==t&&(r=a(e,t,n+6),this.words[i]|=r<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=t)i++;i--,r=r/t|0;for(var o=e.length-n,a=o%i,c=Math.min(o,o-a)+n,u=0,l=n;l1&&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 x=["","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"],w=[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],k=[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(e,t){e=e||10,t=0|t||1;var n;if(16===e||"hex"===e){n="";for(var r=0,o=0,a=0;a>>24-r&16777215)||a!==this.length-1?x[6-c.length]+c+n:c+n,(r+=2)>=26&&(r-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=w[e],l=k[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var p=f.modn(l).toString(e);n=(f=f.idivn(l)).isZero()?p+n:x[u-p.length]+p+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return i(void 0!==_),this.toArrayLike(_,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var r=this.byteLength(),o=n||Math.max(1,r);i(r<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,u=new e(o),l=this.clone();if(c){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,r=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;var i,r;n>0?(i=this,r=e):(i=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],h=8191&d,m=d>>>13,v=0|a[2],b=8191&v,y=v>>>13,g=0|a[3],_=8191&g,x=g>>>13,w=0|a[4],k=8191&w,j=w>>>13,S=0|a[5],E=8191&S,A=S>>>13,C=0|a[6],M=8191&C,T=C>>>13,P=0|a[7],F=8191&P,I=P>>>13,B=0|a[8],R=8191&B,O=B>>>13,N=0|a[9],D=8191&N,L=N>>>13,q=0|s[0],z=8191&q,U=q>>>13,H=0|s[1],V=8191&H,K=H>>>13,W=0|s[2],X=8191&W,G=W>>>13,$=0|s[3],J=8191&$,Q=$>>>13,Y=0|s[4],Z=8191&Y,ee=Y>>>13,te=0|s[5],ne=8191&te,ie=te>>>13,re=0|s[6],oe=8191&re,ae=re>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],fe=8191&le,pe=le>>>13,de=0|s[9],he=8191&de,me=de>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(u+(i=Math.imul(f,z))|0)+((8191&(r=(r=Math.imul(f,U))+Math.imul(p,z)|0))<<13)|0;u=((o=Math.imul(p,U))+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(h,z),r=(r=Math.imul(h,U))+Math.imul(m,z)|0,o=Math.imul(m,U);var be=(u+(i=i+Math.imul(f,V)|0)|0)+((8191&(r=(r=r+Math.imul(f,K)|0)+Math.imul(p,V)|0))<<13)|0;u=((o=o+Math.imul(p,K)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,z),r=(r=Math.imul(b,U))+Math.imul(y,z)|0,o=Math.imul(y,U),i=i+Math.imul(h,V)|0,r=(r=r+Math.imul(h,K)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,K)|0;var ye=(u+(i=i+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,G)|0)+Math.imul(p,X)|0))<<13)|0;u=((o=o+Math.imul(p,G)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,z),r=(r=Math.imul(_,U))+Math.imul(x,z)|0,o=Math.imul(x,U),i=i+Math.imul(b,V)|0,r=(r=r+Math.imul(b,K)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,K)|0,i=i+Math.imul(h,X)|0,r=(r=r+Math.imul(h,G)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,G)|0;var ge=(u+(i=i+Math.imul(f,J)|0)|0)+((8191&(r=(r=r+Math.imul(f,Q)|0)+Math.imul(p,J)|0))<<13)|0;u=((o=o+Math.imul(p,Q)|0)+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(k,z),r=(r=Math.imul(k,U))+Math.imul(j,z)|0,o=Math.imul(j,U),i=i+Math.imul(_,V)|0,r=(r=r+Math.imul(_,K)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,K)|0,i=i+Math.imul(b,X)|0,r=(r=r+Math.imul(b,G)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,G)|0,i=i+Math.imul(h,J)|0,r=(r=r+Math.imul(h,Q)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,Q)|0;var _e=(u+(i=i+Math.imul(f,Z)|0)|0)+((8191&(r=(r=r+Math.imul(f,ee)|0)+Math.imul(p,Z)|0))<<13)|0;u=((o=o+Math.imul(p,ee)|0)+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(E,z),r=(r=Math.imul(E,U))+Math.imul(A,z)|0,o=Math.imul(A,U),i=i+Math.imul(k,V)|0,r=(r=r+Math.imul(k,K)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,K)|0,i=i+Math.imul(_,X)|0,r=(r=r+Math.imul(_,G)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,G)|0,i=i+Math.imul(b,J)|0,r=(r=r+Math.imul(b,Q)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,Q)|0,i=i+Math.imul(h,Z)|0,r=(r=r+Math.imul(h,ee)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,ee)|0;var xe=(u+(i=i+Math.imul(f,ne)|0)|0)+((8191&(r=(r=r+Math.imul(f,ie)|0)+Math.imul(p,ne)|0))<<13)|0;u=((o=o+Math.imul(p,ie)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(M,z),r=(r=Math.imul(M,U))+Math.imul(T,z)|0,o=Math.imul(T,U),i=i+Math.imul(E,V)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,K)|0,i=i+Math.imul(k,X)|0,r=(r=r+Math.imul(k,G)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,G)|0,i=i+Math.imul(_,J)|0,r=(r=r+Math.imul(_,Q)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(b,Z)|0,r=(r=r+Math.imul(b,ee)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,ee)|0,i=i+Math.imul(h,ne)|0,r=(r=r+Math.imul(h,ie)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,ie)|0;var we=(u+(i=i+Math.imul(f,oe)|0)|0)+((8191&(r=(r=r+Math.imul(f,ae)|0)+Math.imul(p,oe)|0))<<13)|0;u=((o=o+Math.imul(p,ae)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(F,z),r=(r=Math.imul(F,U))+Math.imul(I,z)|0,o=Math.imul(I,U),i=i+Math.imul(M,V)|0,r=(r=r+Math.imul(M,K)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,K)|0,i=i+Math.imul(E,X)|0,r=(r=r+Math.imul(E,G)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(k,J)|0,r=(r=r+Math.imul(k,Q)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,Q)|0,i=i+Math.imul(_,Z)|0,r=(r=r+Math.imul(_,ee)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,ee)|0,i=i+Math.imul(b,ne)|0,r=(r=r+Math.imul(b,ie)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,ie)|0,i=i+Math.imul(h,oe)|0,r=(r=r+Math.imul(h,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var ke=(u+(i=i+Math.imul(f,ce)|0)|0)+((8191&(r=(r=r+Math.imul(f,ue)|0)+Math.imul(p,ce)|0))<<13)|0;u=((o=o+Math.imul(p,ue)|0)+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(R,z),r=(r=Math.imul(R,U))+Math.imul(O,z)|0,o=Math.imul(O,U),i=i+Math.imul(F,V)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,K)|0,i=i+Math.imul(M,X)|0,r=(r=r+Math.imul(M,G)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,G)|0,i=i+Math.imul(E,J)|0,r=(r=r+Math.imul(E,Q)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,Q)|0,i=i+Math.imul(k,Z)|0,r=(r=r+Math.imul(k,ee)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,ee)|0,i=i+Math.imul(_,ne)|0,r=(r=r+Math.imul(_,ie)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,ie)|0,i=i+Math.imul(b,oe)|0,r=(r=r+Math.imul(b,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,i=i+Math.imul(h,ce)|0,r=(r=r+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,ue)|0;var je=(u+(i=i+Math.imul(f,fe)|0)|0)+((8191&(r=(r=r+Math.imul(f,pe)|0)+Math.imul(p,fe)|0))<<13)|0;u=((o=o+Math.imul(p,pe)|0)+(r>>>13)|0)+(je>>>26)|0,je&=67108863,i=Math.imul(D,z),r=(r=Math.imul(D,U))+Math.imul(L,z)|0,o=Math.imul(L,U),i=i+Math.imul(R,V)|0,r=(r=r+Math.imul(R,K)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,K)|0,i=i+Math.imul(F,X)|0,r=(r=r+Math.imul(F,G)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,G)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,Q)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,Q)|0,i=i+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,ee)|0,i=i+Math.imul(k,ne)|0,r=(r=r+Math.imul(k,ie)|0)+Math.imul(j,ne)|0,o=o+Math.imul(j,ie)|0,i=i+Math.imul(_,oe)|0,r=(r=r+Math.imul(_,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,i=i+Math.imul(b,ce)|0,r=(r=r+Math.imul(b,ue)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,ue)|0,i=i+Math.imul(h,fe)|0,r=(r=r+Math.imul(h,pe)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,pe)|0;var Se=(u+(i=i+Math.imul(f,he)|0)|0)+((8191&(r=(r=r+Math.imul(f,me)|0)+Math.imul(p,he)|0))<<13)|0;u=((o=o+Math.imul(p,me)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(D,V),r=(r=Math.imul(D,K))+Math.imul(L,V)|0,o=Math.imul(L,K),i=i+Math.imul(R,X)|0,r=(r=r+Math.imul(R,G)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(F,J)|0,r=(r=r+Math.imul(F,Q)|0)+Math.imul(I,J)|0,o=o+Math.imul(I,Q)|0,i=i+Math.imul(M,Z)|0,r=(r=r+Math.imul(M,ee)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,ee)|0,i=i+Math.imul(E,ne)|0,r=(r=r+Math.imul(E,ie)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,ie)|0,i=i+Math.imul(k,oe)|0,r=(r=r+Math.imul(k,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,i=i+Math.imul(_,ce)|0,r=(r=r+Math.imul(_,ue)|0)+Math.imul(x,ce)|0,o=o+Math.imul(x,ue)|0,i=i+Math.imul(b,fe)|0,r=(r=r+Math.imul(b,pe)|0)+Math.imul(y,fe)|0,o=o+Math.imul(y,pe)|0;var Ee=(u+(i=i+Math.imul(h,he)|0)|0)+((8191&(r=(r=r+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(D,X),r=(r=Math.imul(D,G))+Math.imul(L,X)|0,o=Math.imul(L,G),i=i+Math.imul(R,J)|0,r=(r=r+Math.imul(R,Q)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,ee)|0,i=i+Math.imul(M,ne)|0,r=(r=r+Math.imul(M,ie)|0)+Math.imul(T,ne)|0,o=o+Math.imul(T,ie)|0,i=i+Math.imul(E,oe)|0,r=(r=r+Math.imul(E,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,i=i+Math.imul(k,ce)|0,r=(r=r+Math.imul(k,ue)|0)+Math.imul(j,ce)|0,o=o+Math.imul(j,ue)|0,i=i+Math.imul(_,fe)|0,r=(r=r+Math.imul(_,pe)|0)+Math.imul(x,fe)|0,o=o+Math.imul(x,pe)|0;var Ae=(u+(i=i+Math.imul(b,he)|0)|0)+((8191&(r=(r=r+Math.imul(b,me)|0)+Math.imul(y,he)|0))<<13)|0;u=((o=o+Math.imul(y,me)|0)+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(D,J),r=(r=Math.imul(D,Q))+Math.imul(L,J)|0,o=Math.imul(L,Q),i=i+Math.imul(R,Z)|0,r=(r=r+Math.imul(R,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,i=i+Math.imul(F,ne)|0,r=(r=r+Math.imul(F,ie)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,ie)|0,i=i+Math.imul(M,oe)|0,r=(r=r+Math.imul(M,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,i=i+Math.imul(E,ce)|0,r=(r=r+Math.imul(E,ue)|0)+Math.imul(A,ce)|0,o=o+Math.imul(A,ue)|0,i=i+Math.imul(k,fe)|0,r=(r=r+Math.imul(k,pe)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,pe)|0;var Ce=(u+(i=i+Math.imul(_,he)|0)|0)+((8191&(r=(r=r+Math.imul(_,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((o=o+Math.imul(x,me)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(D,Z),r=(r=Math.imul(D,ee))+Math.imul(L,Z)|0,o=Math.imul(L,ee),i=i+Math.imul(R,ne)|0,r=(r=r+Math.imul(R,ie)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,ie)|0,i=i+Math.imul(F,oe)|0,r=(r=r+Math.imul(F,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,i=i+Math.imul(M,ce)|0,r=(r=r+Math.imul(M,ue)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,ue)|0,i=i+Math.imul(E,fe)|0,r=(r=r+Math.imul(E,pe)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,pe)|0;var Me=(u+(i=i+Math.imul(k,he)|0)|0)+((8191&(r=(r=r+Math.imul(k,me)|0)+Math.imul(j,he)|0))<<13)|0;u=((o=o+Math.imul(j,me)|0)+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(D,ne),r=(r=Math.imul(D,ie))+Math.imul(L,ne)|0,o=Math.imul(L,ie),i=i+Math.imul(R,oe)|0,r=(r=r+Math.imul(R,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,i=i+Math.imul(F,ce)|0,r=(r=r+Math.imul(F,ue)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,ue)|0,i=i+Math.imul(M,fe)|0,r=(r=r+Math.imul(M,pe)|0)+Math.imul(T,fe)|0,o=o+Math.imul(T,pe)|0;var Te=(u+(i=i+Math.imul(E,he)|0)|0)+((8191&(r=(r=r+Math.imul(E,me)|0)+Math.imul(A,he)|0))<<13)|0;u=((o=o+Math.imul(A,me)|0)+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(D,oe),r=(r=Math.imul(D,ae))+Math.imul(L,oe)|0,o=Math.imul(L,ae),i=i+Math.imul(R,ce)|0,r=(r=r+Math.imul(R,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,i=i+Math.imul(F,fe)|0,r=(r=r+Math.imul(F,pe)|0)+Math.imul(I,fe)|0,o=o+Math.imul(I,pe)|0;var Pe=(u+(i=i+Math.imul(M,he)|0)|0)+((8191&(r=(r=r+Math.imul(M,me)|0)+Math.imul(T,he)|0))<<13)|0;u=((o=o+Math.imul(T,me)|0)+(r>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,i=Math.imul(D,ce),r=(r=Math.imul(D,ue))+Math.imul(L,ce)|0,o=Math.imul(L,ue),i=i+Math.imul(R,fe)|0,r=(r=r+Math.imul(R,pe)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,pe)|0;var Fe=(u+(i=i+Math.imul(F,he)|0)|0)+((8191&(r=(r=r+Math.imul(F,me)|0)+Math.imul(I,he)|0))<<13)|0;u=((o=o+Math.imul(I,me)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,i=Math.imul(D,fe),r=(r=Math.imul(D,pe))+Math.imul(L,fe)|0,o=Math.imul(L,pe);var Ie=(u+(i=i+Math.imul(R,he)|0)|0)+((8191&(r=(r=r+Math.imul(R,me)|0)+Math.imul(O,he)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Be=(u+(i=Math.imul(D,he))|0)+((8191&(r=(r=Math.imul(D,me))+Math.imul(L,he)|0))<<13)|0;return u=((o=Math.imul(L,me))+(r>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=ve,c[1]=be,c[2]=ye,c[3]=ge,c[4]=_e,c[5]=xe,c[6]=we,c[7]=ke,c[8]=je,c[9]=Se,c[10]=Ee,c[11]=Ae,c[12]=Ce,c[13]=Me,c[14]=Te,c[15]=Pe,c[16]=Fe,c[17]=Ie,c[18]=Be,0!==u&&(c[19]=u,n.length++),n};Math.imul||(j=u),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?j(this,e,t):n<63?u(this,e,t):n<1024?l(this,e,t):f(this,e,t)},p.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,i=0;i>=1;return i},p.prototype.permute=function(e,t,n,i,r,o){for(var a=0;a>>=1)r++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=r/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=c(e);if(0===t.length)return new o(1);for(var n=this,i=0;i=0);var t,n=e%26,r=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0);var r;r=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==l||u>=r);u--){var f=0|this.words[u];this.words[u]=l<<26-o|f>>>o,l=f&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,r=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[r+n]=67108863&a}for(;r>26,this.words[r+n]=67108863&a;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=this.length-e.length,i=this.clone(),r=e,a=0|r.words[r.length-1];0!==(n=26-this._countBits(a))&&(r=r.ushln(n),i.iushln(n),a=0|r.words[r.length-1]);var s,c=i.length-r.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u=0;f--){var p=67108864*(0|i.words[r.length+f])+(0|i.words[r.length+f-1]);for(p=Math.min(p/a|0,67108863),i._ishlnsubmul(r,p,f);0!==i.negative;)p--,i.negative=0,i._ishlnsubmul(r,1,f),i.isZero()||(i.negative^=1);s&&(s.words[f]=p)}return s&&s.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},o.prototype.divmod=function(e,t,n){if(i(!e.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var r,a,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(r=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:r,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(r=s.div.neg()),{div:r,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t)},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),r=e.andln(1),o=n.cmp(i);return o<0||1===r&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,r=this.length-1;r>=0;r--)n=(t*n+(0|this.words[r]))%e;return n},o.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*t;this.words[n]=r/e|0,t=r%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new o(1),a=new o(0),s=new o(0),c=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var p=0,d=1;0==(t.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(t.iushrn(p);p-- >0;)(r.isOdd()||a.isOdd())&&(r.iadd(l),a.isub(f)),r.iushrn(1),a.iushrn(1);for(var h=0,m=1;0==(n.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(n.iushrn(h);h-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(f)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),r.isub(s),a.isub(c)):(n.isub(t),s.isub(r),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},o.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new o(1),a=new o(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)r.isOdd()&&r.iadd(s),r.iushrn(1);for(var l=0,f=1;0==(n.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),r.isub(a)):(n.isub(t),a.isub(r))}var p;return(p=0===t.cmpn(1)?r:a).cmpn(0)<0&&p.iadd(e),p},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=t.cmp(n);if(r<0){var o=t;t=n,n=o}else if(0===r||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,r=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),i(e<=67108863,"Number is too big");var r=0|this.words[0];n=r===e?0:re.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|e.words[n];if(i!==r){ir&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new y(e)},o.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};d.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},d.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var i=t0?n.isub(this.p):n.strip(),n},d.prototype.split=function(e,t){e.iushrn(this.n,0,t)},d.prototype.imulK=function(e){return e.imul(this.k)},r(h,d),h.prototype.split=function(e,t){for(var n=Math.min(e.length,9),i=0;i>>22,r=o}r>>>=22,e.words[i-10]=r,0===r&&e.length>10?e.length-=10:e.length-=9},h.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=r,t=i}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(S[e])return S[e];var t;if("k256"===e)t=new h;else if("p224"===e)t=new m;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new b}return S[e]=t,t},y.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},y.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var r=this.m.subn(1),a=0;!r.isZero()&&0===r.andln(1);)a++,r.iushrn(1);i(!r.isZero());var s=new o(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var f=this.pow(l,r),p=this.pow(e,r.addn(1).iushrn(1)),d=this.pow(e,r),h=a;0!==d.cmp(s);){for(var m=d,v=0;0!==m.cmp(s);v++)m=m.redSqr();i(v=0;i--){for(var u=t.words[i],l=c-1;l>=0;l--){var f=u>>l&1;r!==n[0]&&(r=this.sqr(r)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===i&&0===l)&&(r=this.mul(r,n[a]),s=0,a=0)):s=0}c=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new g(e)},r(g,y),g.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},g.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},g.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},g.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},g.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:17}],Web3:[function(e,t,n){var i=e("../package.json").version,r=e("web3-core"),o=e("web3-eth"),a=e("web3-net"),s=e("web3-eth-personal"),c=e("web3-shh"),u=e("web3-bzz"),l=e("web3-utils"),f=function(){var e=this;r.packageInit(this,arguments),this.version=i,this.utils=l,this.eth=new o(this),this.shh=new c(this),this.bzz=new u(this);var t=this.setProvider;this.setProvider=function(n,i){return t.apply(e,arguments),this.eth.setProvider(n,i),this.shh.setProvider(n,i),this.bzz.setProvider(n),!0}};f.version=i,f.utils=l,f.modules={Eth:o,Net:a,Personal:s,Shh:c,Bzz:u},r.addProviders(f),t.exports=f},{"../package.json":276,"web3-bzz":182,"web3-core":202,"web3-eth":253,"web3-eth-personal":250,"web3-net":254,"web3-shh":262,"web3-utils":273}]},{},["Web3"])("Web3")}); -var IpfsApi = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmory imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmory exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/_karma_webpack_//"; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 588); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - -var global = __webpack_require__(5) - , core = __webpack_require__(32) - , hide = __webpack_require__(19) - , redefine = __webpack_require__(22) - , ctx = __webpack_require__(35) - , PROTOTYPE = 'prototype'; - -var $export = function(type, name, source){ - var IS_FORCED = type & $export.F - , IS_GLOBAL = type & $export.G - , IS_STATIC = type & $export.S - , IS_PROTO = type & $export.P - , IS_BIND = type & $export.B - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] - , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) - , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) - , key, own, out, exp; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if(target)redefine(target, key, out, type & $export.U); - // export - if(exports[key] != out)hide(exports, key, exp); - if(IS_PROTO && expProto[key] != out)expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(Buffer, global) {/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -var base64 = __webpack_require__(282) -var ieee754 = __webpack_require__(511) -var isArray = __webpack_require__(133) - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -/* - * Export kMaxLength after typed array support is determined. - */ -exports.kMaxLength = kMaxLength() - -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } - - return that -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr -} - -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } -} - -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} - -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0 - } - } - return that -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) - - that.write(string, encoding) - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} - -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len) - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - case 'raw': - case 'raws': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -function arrayIndexOf (arr, val, byteOffset, encoding) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var foundIndex = -1 - for (var i = byteOffset; i < arrLength; ++i) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - - return -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - if (Buffer.isBuffer(val)) { - // special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(this, val, byteOffset, encoding) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset, encoding) - } - - throw new TypeError('val must be string, number or Buffer') -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start] - } - } - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1).Buffer, __webpack_require__(13))) - -/***/ }, -/* 2 */ -/***/ function(module, exports) { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(7); -module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); - return it; -}; - -/***/ }, -/* 4 */ -/***/ function(module, exports) { - -// shim for using process in browser - -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -(function () { - try { - cachedSetTimeout = setTimeout; - } catch (e) { - cachedSetTimeout = function () { - throw new Error('setTimeout is not defined'); - } - } - try { - cachedClearTimeout = clearTimeout; - } catch (e) { - cachedClearTimeout = function () { - throw new Error('clearTimeout is not defined'); - } - } -} ()) -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = cachedSetTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - cachedClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - cachedSetTimeout(drainQueue, 0); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }, -/* 5 */ -/***/ function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); -if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }, -/* 6 */ -/***/ function(module, exports) { - -module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } -}; - -/***/ }, -/* 7 */ -/***/ function(module, exports) { - -module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { - -var store = __webpack_require__(92)('wks') - , uid = __webpack_require__(53) - , Symbol = __webpack_require__(5).Symbol - , USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function(name){ - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Stream; - -var EE = __webpack_require__(30).EventEmitter; -var inherits = __webpack_require__(2); - -inherits(Stream, EE); -Stream.Readable = __webpack_require__(550); -Stream.Writable = __webpack_require__(552); -Stream.Duplex = __webpack_require__(214); -Stream.Transform = __webpack_require__(551); -Stream.PassThrough = __webpack_require__(549); - -// Backwards-compat with node 0.4.x -Stream.Stream = Stream; - - - -// old-style streams. Note that the pipe method (the only relevant -// part of this class) is overridden in the Readable class. - -function Stream() { - EE.call(this); -} - -Stream.prototype.pipe = function(dest, options) { - var source = this; - - function ondata(chunk) { - if (dest.writable) { - if (false === dest.write(chunk) && source.pause) { - source.pause(); - } - } - } - - source.on('data', ondata); - - function ondrain() { - if (source.readable && source.resume) { - source.resume(); - } - } - - dest.on('drain', ondrain); - - // If the 'end' option is not supplied, dest.end() will be called when - // source gets the 'end' or 'close' events. Only dest.end() once. - if (!dest._isStdio && (!options || options.end !== false)) { - source.on('end', onend); - source.on('close', onclose); - } - - var didOnEnd = false; - function onend() { - if (didOnEnd) return; - didOnEnd = true; - - dest.end(); - } - - - function onclose() { - if (didOnEnd) return; - didOnEnd = true; - - if (typeof dest.destroy === 'function') dest.destroy(); - } - - // don't leave dangling pipes when there are errors. - function onerror(er) { - cleanup(); - if (EE.listenerCount(this, 'error') === 0) { - throw er; // Unhandled stream error in pipe. - } - } - - source.on('error', onerror); - dest.on('error', onerror); - - // remove all the event listeners that were added. - function cleanup() { - source.removeListener('data', ondata); - dest.removeListener('drain', ondrain); - - source.removeListener('end', onend); - source.removeListener('close', onclose); - - source.removeListener('error', onerror); - dest.removeListener('error', onerror); - - source.removeListener('end', cleanup); - source.removeListener('close', cleanup); - - dest.removeListener('close', cleanup); - } - - source.on('end', cleanup); - source.on('close', cleanup); - - dest.on('close', cleanup); - - dest.emit('pipe', source); - - // Allow for unix-like usage: A.pipe(B).pipe(C) - return dest; -}; - - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(6)(function(){ - return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; -}); - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(3) - , IE8_DOM_DEFINE = __webpack_require__(176) - , toPrimitive = __webpack_require__(34) - , dP = Object.defineProperty; - -exports.f = __webpack_require__(10) ? Object.defineProperty : function defineProperty(O, P, Attributes){ - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if(IE8_DOM_DEFINE)try { - return dP(O, P, Attributes); - } catch(e){ /* empty */ } - if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); - if('value' in Attributes)O[P] = Attributes.value; - return O; -}; - -/***/ }, -/* 12 */ -/***/ function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) { - 'use strict'; - - // Utils - function assert (val, msg) { - if (!val) throw new Error(msg || 'Assertion failed'); - } - - // Could use `inherits` module, but don't want to move from single file - // architecture yet. - function inherits (ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - } - - // BN - - function BN (number, base, endian) { - if (BN.isBN(number)) { - return number; - } - - this.negative = 0; - this.words = null; - this.length = 0; - - // Reduction context - this.red = null; - - if (number !== null) { - if (base === 'le' || base === 'be') { - endian = base; - base = 10; - } - - this._init(number || 0, base || 10, endian || 'be'); - } - } - if (typeof module === 'object') { - module.exports = BN; - } else { - exports.BN = BN; - } - - BN.BN = BN; - BN.wordSize = 26; - - var Buffer; - try { - Buffer = __webpack_require__(1).Buffer; - } catch (e) { - } - - BN.isBN = function isBN (num) { - return num !== null && typeof num === 'object' && - num.constructor.name === 'BN' && Array.isArray(num.words); - }; - - BN.max = function max (left, right) { - if (left.cmp(right) > 0) return left; - return right; - }; - - BN.min = function min (left, right) { - if (left.cmp(right) < 0) return left; - return right; - }; - - BN.prototype._init = function init (number, base, endian) { - if (typeof number === 'number') { - return this._initNumber(number, base, endian); - } - - if (typeof number === 'object') { - return this._initArray(number, base, endian); - } - - if (base === 'hex') { - base = 16; - } - assert(base === (base | 0) && base >= 2 && base <= 36); - - number = number.toString().replace(/\s+/g, ''); - var start = 0; - if (number[0] === '-') { - start++; - } - - if (base === 16) { - this._parseHex(number, start); - } else { - this._parseBase(number, base, start); - } - - if (number[0] === '-') { - this.negative = 1; - } - - this.strip(); - - if (endian !== 'le') return; - - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initNumber = function _initNumber (number, base, endian) { - if (number < 0) { - this.negative = 1; - number = -number; - } - if (number < 0x4000000) { - this.words = [ number & 0x3ffffff ]; - this.length = 1; - } else if (number < 0x10000000000000) { - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff - ]; - this.length = 2; - } else { - assert(number < 0x20000000000000); // 2 ^ 53 (unsafe) - this.words = [ - number & 0x3ffffff, - (number / 0x4000000) & 0x3ffffff, - 1 - ]; - this.length = 3; - } - - if (endian !== 'le') return; - - // Reverse the bytes - this._initArray(this.toArray(), base, endian); - }; - - BN.prototype._initArray = function _initArray (number, base, endian) { - // Perhaps a Uint8Array - assert(typeof number.length === 'number'); - if (number.length <= 0) { - this.words = [ 0 ]; - this.length = 1; - return this; - } - - this.length = Math.ceil(number.length / 3); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - var off = 0; - if (endian === 'be') { - for (i = number.length - 1, j = 0; i >= 0; i -= 3) { - w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } else if (endian === 'le') { - for (i = 0, j = 0; i < number.length; i += 3) { - w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - } - return this.strip(); - }; - - function parseHex (str, start, end) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r <<= 4; - - // 'a' - 'f' - if (c >= 49 && c <= 54) { - r |= c - 49 + 0xa; - - // 'A' - 'F' - } else if (c >= 17 && c <= 22) { - r |= c - 17 + 0xa; - - // '0' - '9' - } else { - r |= c & 0xf; - } - } - return r; - } - - BN.prototype._parseHex = function _parseHex (number, start) { - // Create possibly bigger array to ensure that it fits the number - this.length = Math.ceil((number.length - start) / 6); - this.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - this.words[i] = 0; - } - - var j, w; - // Scan 24-bit chunks and add them to the number - var off = 0; - for (i = number.length - 6, j = 0; i >= start; i -= 6) { - w = parseHex(number, i, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - off += 24; - if (off >= 26) { - off -= 26; - j++; - } - } - if (i + 6 !== start) { - w = parseHex(number, start, i + 6); - this.words[j] |= (w << off) & 0x3ffffff; - this.words[j + 1] |= w >>> (26 - off) & 0x3fffff; - } - this.strip(); - }; - - function parseBase (str, start, end, mul) { - var r = 0; - var len = Math.min(str.length, end); - for (var i = start; i < len; i++) { - var c = str.charCodeAt(i) - 48; - - r *= mul; - - // 'a' - if (c >= 49) { - r += c - 49 + 0xa; - - // 'A' - } else if (c >= 17) { - r += c - 17 + 0xa; - - // '0' - '9' - } else { - r += c; - } - } - return r; - } - - BN.prototype._parseBase = function _parseBase (number, base, start) { - // Initialize as zero - this.words = [ 0 ]; - this.length = 1; - - // Find length of limb in base - for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) { - limbLen++; - } - limbLen--; - limbPow = (limbPow / base) | 0; - - var total = number.length - start; - var mod = total % limbLen; - var end = Math.min(total, total - mod) + start; - - var word = 0; - for (var i = start; i < end; i += limbLen) { - word = parseBase(number, i, i + limbLen, base); - - this.imuln(limbPow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - - if (mod !== 0) { - var pow = 1; - word = parseBase(number, i, number.length, base); - - for (i = 0; i < mod; i++) { - pow *= base; - } - - this.imuln(pow); - if (this.words[0] + word < 0x4000000) { - this.words[0] += word; - } else { - this._iaddn(word); - } - } - }; - - BN.prototype.copy = function copy (dest) { - dest.words = new Array(this.length); - for (var i = 0; i < this.length; i++) { - dest.words[i] = this.words[i]; - } - dest.length = this.length; - dest.negative = this.negative; - dest.red = this.red; - }; - - BN.prototype.clone = function clone () { - var r = new BN(null); - this.copy(r); - return r; - }; - - BN.prototype._expand = function _expand (size) { - while (this.length < size) { - this.words[this.length++] = 0; - } - return this; - }; - - // Remove leading `0` from `this` - BN.prototype.strip = function strip () { - while (this.length > 1 && this.words[this.length - 1] === 0) { - this.length--; - } - return this._normSign(); - }; - - BN.prototype._normSign = function _normSign () { - // -0 = 0 - if (this.length === 1 && this.words[0] === 0) { - this.negative = 0; - } - return this; - }; - - BN.prototype.inspect = function inspect () { - return (this.red ? ''; - }; - - /* - - var zeros = []; - var groupSizes = []; - var groupBases = []; - - var s = ''; - var i = -1; - while (++i < BN.wordSize) { - zeros[i] = s; - s += '0'; - } - groupSizes[0] = 0; - groupSizes[1] = 0; - groupBases[0] = 0; - groupBases[1] = 0; - var base = 2 - 1; - while (++base < 36 + 1) { - var groupSize = 0; - var groupBase = 1; - while (groupBase < (1 << BN.wordSize) / base) { - groupBase *= base; - groupSize += 1; - } - groupSizes[base] = groupSize; - groupBases[base] = groupBase; - } - - */ - - var zeros = [ - '', - '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' - ]; - - var groupSizes = [ - 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 - ]; - - var groupBases = [ - 0, 0, - 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, - 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625, - 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632, - 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, - 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176 - ]; - - BN.prototype.toString = function toString (base, padding) { - base = base || 10; - padding = padding | 0 || 1; - - var out; - if (base === 16 || base === 'hex') { - out = ''; - var off = 0; - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = this.words[i]; - var word = (((w << off) | carry) & 0xffffff).toString(16); - carry = (w >>> (24 - off)) & 0xffffff; - if (carry !== 0 || i !== this.length - 1) { - out = zeros[6 - word.length] + word + out; - } else { - out = word + out; - } - off += 2; - if (off >= 26) { - off -= 26; - i--; - } - } - if (carry !== 0) { - out = carry.toString(16) + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - if (base === (base | 0) && base >= 2 && base <= 36) { - // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base)); - var groupSize = groupSizes[base]; - // var groupBase = Math.pow(base, groupSize); - var groupBase = groupBases[base]; - out = ''; - var c = this.clone(); - c.negative = 0; - while (!c.isZero()) { - var r = c.modn(groupBase).toString(base); - c = c.idivn(groupBase); - - if (!c.isZero()) { - out = zeros[groupSize - r.length] + r + out; - } else { - out = r + out; - } - } - if (this.isZero()) { - out = '0' + out; - } - while (out.length % padding !== 0) { - out = '0' + out; - } - if (this.negative !== 0) { - out = '-' + out; - } - return out; - } - - assert(false, 'Base should be between 2 and 36'); - }; - - BN.prototype.toNumber = function toNumber () { - var ret = this.words[0]; - if (this.length === 2) { - ret += this.words[1] * 0x4000000; - } else if (this.length === 3 && this.words[2] === 0x01) { - // NOTE: at this stage it is known that the top bit is set - ret += 0x10000000000000 + (this.words[1] * 0x4000000); - } else if (this.length > 2) { - assert(false, 'Number can only safely store up to 53 bits'); - } - return (this.negative !== 0) ? -ret : ret; - }; - - BN.prototype.toJSON = function toJSON () { - return this.toString(16); - }; - - BN.prototype.toBuffer = function toBuffer (endian, length) { - assert(typeof Buffer !== 'undefined'); - return this.toArrayLike(Buffer, endian, length); - }; - - BN.prototype.toArray = function toArray (endian, length) { - return this.toArrayLike(Array, endian, length); - }; - - BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) { - var byteLength = this.byteLength(); - var reqLength = length || Math.max(1, byteLength); - assert(byteLength <= reqLength, 'byte array longer than desired length'); - assert(reqLength > 0, 'Requested array length <= 0'); - - this.strip(); - var littleEndian = endian === 'le'; - var res = new ArrayType(reqLength); - - var b, i; - var q = this.clone(); - if (!littleEndian) { - // Assume big-endian - for (i = 0; i < reqLength - byteLength; i++) { - res[i] = 0; - } - - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[reqLength - i - 1] = b; - } - } else { - for (i = 0; !q.isZero(); i++) { - b = q.andln(0xff); - q.iushrn(8); - - res[i] = b; - } - - for (; i < reqLength; i++) { - res[i] = 0; - } - } - - return res; - }; - - if (Math.clz32) { - BN.prototype._countBits = function _countBits (w) { - return 32 - Math.clz32(w); - }; - } else { - BN.prototype._countBits = function _countBits (w) { - var t = w; - var r = 0; - if (t >= 0x1000) { - r += 13; - t >>>= 13; - } - if (t >= 0x40) { - r += 7; - t >>>= 7; - } - if (t >= 0x8) { - r += 4; - t >>>= 4; - } - if (t >= 0x02) { - r += 2; - t >>>= 2; - } - return r + t; - }; - } - - BN.prototype._zeroBits = function _zeroBits (w) { - // Short-cut - if (w === 0) return 26; - - var t = w; - var r = 0; - if ((t & 0x1fff) === 0) { - r += 13; - t >>>= 13; - } - if ((t & 0x7f) === 0) { - r += 7; - t >>>= 7; - } - if ((t & 0xf) === 0) { - r += 4; - t >>>= 4; - } - if ((t & 0x3) === 0) { - r += 2; - t >>>= 2; - } - if ((t & 0x1) === 0) { - r++; - } - return r; - }; - - // Return number of used bits in a BN - BN.prototype.bitLength = function bitLength () { - var w = this.words[this.length - 1]; - var hi = this._countBits(w); - return (this.length - 1) * 26 + hi; - }; - - function toBitArray (num) { - var w = new Array(num.bitLength()); - - for (var bit = 0; bit < w.length; bit++) { - var off = (bit / 26) | 0; - var wbit = bit % 26; - - w[bit] = (num.words[off] & (1 << wbit)) >>> wbit; - } - - return w; - } - - // Number of trailing zero bits - BN.prototype.zeroBits = function zeroBits () { - if (this.isZero()) return 0; - - var r = 0; - for (var i = 0; i < this.length; i++) { - var b = this._zeroBits(this.words[i]); - r += b; - if (b !== 26) break; - } - return r; - }; - - BN.prototype.byteLength = function byteLength () { - return Math.ceil(this.bitLength() / 8); - }; - - BN.prototype.toTwos = function toTwos (width) { - if (this.negative !== 0) { - return this.abs().inotn(width).iaddn(1); - } - return this.clone(); - }; - - BN.prototype.fromTwos = function fromTwos (width) { - if (this.testn(width - 1)) { - return this.notn(width).iaddn(1).ineg(); - } - return this.clone(); - }; - - BN.prototype.isNeg = function isNeg () { - return this.negative !== 0; - }; - - // Return negative clone of `this` - BN.prototype.neg = function neg () { - return this.clone().ineg(); - }; - - BN.prototype.ineg = function ineg () { - if (!this.isZero()) { - this.negative ^= 1; - } - - return this; - }; - - // Or `num` with `this` in-place - BN.prototype.iuor = function iuor (num) { - while (this.length < num.length) { - this.words[this.length++] = 0; - } - - for (var i = 0; i < num.length; i++) { - this.words[i] = this.words[i] | num.words[i]; - } - - return this.strip(); - }; - - BN.prototype.ior = function ior (num) { - assert((this.negative | num.negative) === 0); - return this.iuor(num); - }; - - // Or `num` with `this` - BN.prototype.or = function or (num) { - if (this.length > num.length) return this.clone().ior(num); - return num.clone().ior(this); - }; - - BN.prototype.uor = function uor (num) { - if (this.length > num.length) return this.clone().iuor(num); - return num.clone().iuor(this); - }; - - // And `num` with `this` in-place - BN.prototype.iuand = function iuand (num) { - // b = min-length(num, this) - var b; - if (this.length > num.length) { - b = num; - } else { - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = this.words[i] & num.words[i]; - } - - this.length = b.length; - - return this.strip(); - }; - - BN.prototype.iand = function iand (num) { - assert((this.negative | num.negative) === 0); - return this.iuand(num); - }; - - // And `num` with `this` - BN.prototype.and = function and (num) { - if (this.length > num.length) return this.clone().iand(num); - return num.clone().iand(this); - }; - - BN.prototype.uand = function uand (num) { - if (this.length > num.length) return this.clone().iuand(num); - return num.clone().iuand(this); - }; - - // Xor `num` with `this` in-place - BN.prototype.iuxor = function iuxor (num) { - // a.length > b.length - var a; - var b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - for (var i = 0; i < b.length; i++) { - this.words[i] = a.words[i] ^ b.words[i]; - } - - if (this !== a) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = a.length; - - return this.strip(); - }; - - BN.prototype.ixor = function ixor (num) { - assert((this.negative | num.negative) === 0); - return this.iuxor(num); - }; - - // Xor `num` with `this` - BN.prototype.xor = function xor (num) { - if (this.length > num.length) return this.clone().ixor(num); - return num.clone().ixor(this); - }; - - BN.prototype.uxor = function uxor (num) { - if (this.length > num.length) return this.clone().iuxor(num); - return num.clone().iuxor(this); - }; - - // Not ``this`` with ``width`` bitwidth - BN.prototype.inotn = function inotn (width) { - assert(typeof width === 'number' && width >= 0); - - var bytesNeeded = Math.ceil(width / 26) | 0; - var bitsLeft = width % 26; - - // Extend the buffer with leading zeroes - this._expand(bytesNeeded); - - if (bitsLeft > 0) { - bytesNeeded--; - } - - // Handle complete words - for (var i = 0; i < bytesNeeded; i++) { - this.words[i] = ~this.words[i] & 0x3ffffff; - } - - // Handle the residue - if (bitsLeft > 0) { - this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft)); - } - - // And remove leading zeroes - return this.strip(); - }; - - BN.prototype.notn = function notn (width) { - return this.clone().inotn(width); - }; - - // Set `bit` of `this` - BN.prototype.setn = function setn (bit, val) { - assert(typeof bit === 'number' && bit >= 0); - - var off = (bit / 26) | 0; - var wbit = bit % 26; - - this._expand(off + 1); - - if (val) { - this.words[off] = this.words[off] | (1 << wbit); - } else { - this.words[off] = this.words[off] & ~(1 << wbit); - } - - return this.strip(); - }; - - // Add `num` to `this` in-place - BN.prototype.iadd = function iadd (num) { - var r; - - // negative + positive - if (this.negative !== 0 && num.negative === 0) { - this.negative = 0; - r = this.isub(num); - this.negative ^= 1; - return this._normSign(); - - // positive + negative - } else if (this.negative === 0 && num.negative !== 0) { - num.negative = 0; - r = this.isub(num); - num.negative = 1; - return r._normSign(); - } - - // a.length > b.length - var a, b; - if (this.length > num.length) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) + (b.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - this.words[i] = r & 0x3ffffff; - carry = r >>> 26; - } - - this.length = a.length; - if (carry !== 0) { - this.words[this.length] = carry; - this.length++; - // Copy the rest of the words - } else if (a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - return this; - }; - - // Add `num` to `this` - BN.prototype.add = function add (num) { - var res; - if (num.negative !== 0 && this.negative === 0) { - num.negative = 0; - res = this.sub(num); - num.negative ^= 1; - return res; - } else if (num.negative === 0 && this.negative !== 0) { - this.negative = 0; - res = num.sub(this); - this.negative = 1; - return res; - } - - if (this.length > num.length) return this.clone().iadd(num); - - return num.clone().iadd(this); - }; - - // Subtract `num` from `this` in-place - BN.prototype.isub = function isub (num) { - // this - (-num) = this + num - if (num.negative !== 0) { - num.negative = 0; - var r = this.iadd(num); - num.negative = 1; - return r._normSign(); - - // -this - num = -(this + num) - } else if (this.negative !== 0) { - this.negative = 0; - this.iadd(num); - this.negative = 1; - return this._normSign(); - } - - // At this point both numbers are positive - var cmp = this.cmp(num); - - // Optimization - zeroify - if (cmp === 0) { - this.negative = 0; - this.length = 1; - this.words[0] = 0; - return this; - } - - // a > b - var a, b; - if (cmp > 0) { - a = this; - b = num; - } else { - a = num; - b = this; - } - - var carry = 0; - for (var i = 0; i < b.length; i++) { - r = (a.words[i] | 0) - (b.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - for (; carry !== 0 && i < a.length; i++) { - r = (a.words[i] | 0) + carry; - carry = r >> 26; - this.words[i] = r & 0x3ffffff; - } - - // Copy rest of the words - if (carry === 0 && i < a.length && a !== this) { - for (; i < a.length; i++) { - this.words[i] = a.words[i]; - } - } - - this.length = Math.max(this.length, i); - - if (a !== this) { - this.negative = 1; - } - - return this.strip(); - }; - - // Subtract `num` from `this` - BN.prototype.sub = function sub (num) { - return this.clone().isub(num); - }; - - function smallMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - var len = (self.length + num.length) | 0; - out.length = len; - len = (len - 1) | 0; - - // Peel one iteration (compiler can't do it, because of code complexity) - var a = self.words[0] | 0; - var b = num.words[0] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - var carry = (r / 0x4000000) | 0; - out.words[0] = lo; - - for (var k = 1; k < len; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = carry >>> 26; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = (k - j) | 0; - a = self.words[i] | 0; - b = num.words[j] | 0; - r = a * b + rword; - ncarry += (r / 0x4000000) | 0; - rword = r & 0x3ffffff; - } - out.words[k] = rword | 0; - carry = ncarry | 0; - } - if (carry !== 0) { - out.words[k] = carry | 0; - } else { - out.length--; - } - - return out.strip(); - } - - // TODO(indutny): it may be reasonable to omit it for users who don't need - // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit - // multiplication (like elliptic secp256k1). - var comb10MulTo = function comb10MulTo (self, num, out) { - var a = self.words; - var b = num.words; - var o = out.words; - var c = 0; - var lo; - var mid; - var hi; - var a0 = a[0] | 0; - var al0 = a0 & 0x1fff; - var ah0 = a0 >>> 13; - var a1 = a[1] | 0; - var al1 = a1 & 0x1fff; - var ah1 = a1 >>> 13; - var a2 = a[2] | 0; - var al2 = a2 & 0x1fff; - var ah2 = a2 >>> 13; - var a3 = a[3] | 0; - var al3 = a3 & 0x1fff; - var ah3 = a3 >>> 13; - var a4 = a[4] | 0; - var al4 = a4 & 0x1fff; - var ah4 = a4 >>> 13; - var a5 = a[5] | 0; - var al5 = a5 & 0x1fff; - var ah5 = a5 >>> 13; - var a6 = a[6] | 0; - var al6 = a6 & 0x1fff; - var ah6 = a6 >>> 13; - var a7 = a[7] | 0; - var al7 = a7 & 0x1fff; - var ah7 = a7 >>> 13; - var a8 = a[8] | 0; - var al8 = a8 & 0x1fff; - var ah8 = a8 >>> 13; - var a9 = a[9] | 0; - var al9 = a9 & 0x1fff; - var ah9 = a9 >>> 13; - var b0 = b[0] | 0; - var bl0 = b0 & 0x1fff; - var bh0 = b0 >>> 13; - var b1 = b[1] | 0; - var bl1 = b1 & 0x1fff; - var bh1 = b1 >>> 13; - var b2 = b[2] | 0; - var bl2 = b2 & 0x1fff; - var bh2 = b2 >>> 13; - var b3 = b[3] | 0; - var bl3 = b3 & 0x1fff; - var bh3 = b3 >>> 13; - var b4 = b[4] | 0; - var bl4 = b4 & 0x1fff; - var bh4 = b4 >>> 13; - var b5 = b[5] | 0; - var bl5 = b5 & 0x1fff; - var bh5 = b5 >>> 13; - var b6 = b[6] | 0; - var bl6 = b6 & 0x1fff; - var bh6 = b6 >>> 13; - var b7 = b[7] | 0; - var bl7 = b7 & 0x1fff; - var bh7 = b7 >>> 13; - var b8 = b[8] | 0; - var bl8 = b8 & 0x1fff; - var bh8 = b8 >>> 13; - var b9 = b[9] | 0; - var bl9 = b9 & 0x1fff; - var bh9 = b9 >>> 13; - - out.negative = self.negative ^ num.negative; - out.length = 19; - /* k = 0 */ - lo = Math.imul(al0, bl0); - mid = Math.imul(al0, bh0); - mid = (mid + Math.imul(ah0, bl0)) | 0; - hi = Math.imul(ah0, bh0); - var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0; - w0 &= 0x3ffffff; - /* k = 1 */ - lo = Math.imul(al1, bl0); - mid = Math.imul(al1, bh0); - mid = (mid + Math.imul(ah1, bl0)) | 0; - hi = Math.imul(ah1, bh0); - lo = (lo + Math.imul(al0, bl1)) | 0; - mid = (mid + Math.imul(al0, bh1)) | 0; - mid = (mid + Math.imul(ah0, bl1)) | 0; - hi = (hi + Math.imul(ah0, bh1)) | 0; - var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0; - w1 &= 0x3ffffff; - /* k = 2 */ - lo = Math.imul(al2, bl0); - mid = Math.imul(al2, bh0); - mid = (mid + Math.imul(ah2, bl0)) | 0; - hi = Math.imul(ah2, bh0); - lo = (lo + Math.imul(al1, bl1)) | 0; - mid = (mid + Math.imul(al1, bh1)) | 0; - mid = (mid + Math.imul(ah1, bl1)) | 0; - hi = (hi + Math.imul(ah1, bh1)) | 0; - lo = (lo + Math.imul(al0, bl2)) | 0; - mid = (mid + Math.imul(al0, bh2)) | 0; - mid = (mid + Math.imul(ah0, bl2)) | 0; - hi = (hi + Math.imul(ah0, bh2)) | 0; - var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0; - w2 &= 0x3ffffff; - /* k = 3 */ - lo = Math.imul(al3, bl0); - mid = Math.imul(al3, bh0); - mid = (mid + Math.imul(ah3, bl0)) | 0; - hi = Math.imul(ah3, bh0); - lo = (lo + Math.imul(al2, bl1)) | 0; - mid = (mid + Math.imul(al2, bh1)) | 0; - mid = (mid + Math.imul(ah2, bl1)) | 0; - hi = (hi + Math.imul(ah2, bh1)) | 0; - lo = (lo + Math.imul(al1, bl2)) | 0; - mid = (mid + Math.imul(al1, bh2)) | 0; - mid = (mid + Math.imul(ah1, bl2)) | 0; - hi = (hi + Math.imul(ah1, bh2)) | 0; - lo = (lo + Math.imul(al0, bl3)) | 0; - mid = (mid + Math.imul(al0, bh3)) | 0; - mid = (mid + Math.imul(ah0, bl3)) | 0; - hi = (hi + Math.imul(ah0, bh3)) | 0; - var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0; - w3 &= 0x3ffffff; - /* k = 4 */ - lo = Math.imul(al4, bl0); - mid = Math.imul(al4, bh0); - mid = (mid + Math.imul(ah4, bl0)) | 0; - hi = Math.imul(ah4, bh0); - lo = (lo + Math.imul(al3, bl1)) | 0; - mid = (mid + Math.imul(al3, bh1)) | 0; - mid = (mid + Math.imul(ah3, bl1)) | 0; - hi = (hi + Math.imul(ah3, bh1)) | 0; - lo = (lo + Math.imul(al2, bl2)) | 0; - mid = (mid + Math.imul(al2, bh2)) | 0; - mid = (mid + Math.imul(ah2, bl2)) | 0; - hi = (hi + Math.imul(ah2, bh2)) | 0; - lo = (lo + Math.imul(al1, bl3)) | 0; - mid = (mid + Math.imul(al1, bh3)) | 0; - mid = (mid + Math.imul(ah1, bl3)) | 0; - hi = (hi + Math.imul(ah1, bh3)) | 0; - lo = (lo + Math.imul(al0, bl4)) | 0; - mid = (mid + Math.imul(al0, bh4)) | 0; - mid = (mid + Math.imul(ah0, bl4)) | 0; - hi = (hi + Math.imul(ah0, bh4)) | 0; - var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0; - w4 &= 0x3ffffff; - /* k = 5 */ - lo = Math.imul(al5, bl0); - mid = Math.imul(al5, bh0); - mid = (mid + Math.imul(ah5, bl0)) | 0; - hi = Math.imul(ah5, bh0); - lo = (lo + Math.imul(al4, bl1)) | 0; - mid = (mid + Math.imul(al4, bh1)) | 0; - mid = (mid + Math.imul(ah4, bl1)) | 0; - hi = (hi + Math.imul(ah4, bh1)) | 0; - lo = (lo + Math.imul(al3, bl2)) | 0; - mid = (mid + Math.imul(al3, bh2)) | 0; - mid = (mid + Math.imul(ah3, bl2)) | 0; - hi = (hi + Math.imul(ah3, bh2)) | 0; - lo = (lo + Math.imul(al2, bl3)) | 0; - mid = (mid + Math.imul(al2, bh3)) | 0; - mid = (mid + Math.imul(ah2, bl3)) | 0; - hi = (hi + Math.imul(ah2, bh3)) | 0; - lo = (lo + Math.imul(al1, bl4)) | 0; - mid = (mid + Math.imul(al1, bh4)) | 0; - mid = (mid + Math.imul(ah1, bl4)) | 0; - hi = (hi + Math.imul(ah1, bh4)) | 0; - lo = (lo + Math.imul(al0, bl5)) | 0; - mid = (mid + Math.imul(al0, bh5)) | 0; - mid = (mid + Math.imul(ah0, bl5)) | 0; - hi = (hi + Math.imul(ah0, bh5)) | 0; - var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0; - w5 &= 0x3ffffff; - /* k = 6 */ - lo = Math.imul(al6, bl0); - mid = Math.imul(al6, bh0); - mid = (mid + Math.imul(ah6, bl0)) | 0; - hi = Math.imul(ah6, bh0); - lo = (lo + Math.imul(al5, bl1)) | 0; - mid = (mid + Math.imul(al5, bh1)) | 0; - mid = (mid + Math.imul(ah5, bl1)) | 0; - hi = (hi + Math.imul(ah5, bh1)) | 0; - lo = (lo + Math.imul(al4, bl2)) | 0; - mid = (mid + Math.imul(al4, bh2)) | 0; - mid = (mid + Math.imul(ah4, bl2)) | 0; - hi = (hi + Math.imul(ah4, bh2)) | 0; - lo = (lo + Math.imul(al3, bl3)) | 0; - mid = (mid + Math.imul(al3, bh3)) | 0; - mid = (mid + Math.imul(ah3, bl3)) | 0; - hi = (hi + Math.imul(ah3, bh3)) | 0; - lo = (lo + Math.imul(al2, bl4)) | 0; - mid = (mid + Math.imul(al2, bh4)) | 0; - mid = (mid + Math.imul(ah2, bl4)) | 0; - hi = (hi + Math.imul(ah2, bh4)) | 0; - lo = (lo + Math.imul(al1, bl5)) | 0; - mid = (mid + Math.imul(al1, bh5)) | 0; - mid = (mid + Math.imul(ah1, bl5)) | 0; - hi = (hi + Math.imul(ah1, bh5)) | 0; - lo = (lo + Math.imul(al0, bl6)) | 0; - mid = (mid + Math.imul(al0, bh6)) | 0; - mid = (mid + Math.imul(ah0, bl6)) | 0; - hi = (hi + Math.imul(ah0, bh6)) | 0; - var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0; - w6 &= 0x3ffffff; - /* k = 7 */ - lo = Math.imul(al7, bl0); - mid = Math.imul(al7, bh0); - mid = (mid + Math.imul(ah7, bl0)) | 0; - hi = Math.imul(ah7, bh0); - lo = (lo + Math.imul(al6, bl1)) | 0; - mid = (mid + Math.imul(al6, bh1)) | 0; - mid = (mid + Math.imul(ah6, bl1)) | 0; - hi = (hi + Math.imul(ah6, bh1)) | 0; - lo = (lo + Math.imul(al5, bl2)) | 0; - mid = (mid + Math.imul(al5, bh2)) | 0; - mid = (mid + Math.imul(ah5, bl2)) | 0; - hi = (hi + Math.imul(ah5, bh2)) | 0; - lo = (lo + Math.imul(al4, bl3)) | 0; - mid = (mid + Math.imul(al4, bh3)) | 0; - mid = (mid + Math.imul(ah4, bl3)) | 0; - hi = (hi + Math.imul(ah4, bh3)) | 0; - lo = (lo + Math.imul(al3, bl4)) | 0; - mid = (mid + Math.imul(al3, bh4)) | 0; - mid = (mid + Math.imul(ah3, bl4)) | 0; - hi = (hi + Math.imul(ah3, bh4)) | 0; - lo = (lo + Math.imul(al2, bl5)) | 0; - mid = (mid + Math.imul(al2, bh5)) | 0; - mid = (mid + Math.imul(ah2, bl5)) | 0; - hi = (hi + Math.imul(ah2, bh5)) | 0; - lo = (lo + Math.imul(al1, bl6)) | 0; - mid = (mid + Math.imul(al1, bh6)) | 0; - mid = (mid + Math.imul(ah1, bl6)) | 0; - hi = (hi + Math.imul(ah1, bh6)) | 0; - lo = (lo + Math.imul(al0, bl7)) | 0; - mid = (mid + Math.imul(al0, bh7)) | 0; - mid = (mid + Math.imul(ah0, bl7)) | 0; - hi = (hi + Math.imul(ah0, bh7)) | 0; - var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0; - w7 &= 0x3ffffff; - /* k = 8 */ - lo = Math.imul(al8, bl0); - mid = Math.imul(al8, bh0); - mid = (mid + Math.imul(ah8, bl0)) | 0; - hi = Math.imul(ah8, bh0); - lo = (lo + Math.imul(al7, bl1)) | 0; - mid = (mid + Math.imul(al7, bh1)) | 0; - mid = (mid + Math.imul(ah7, bl1)) | 0; - hi = (hi + Math.imul(ah7, bh1)) | 0; - lo = (lo + Math.imul(al6, bl2)) | 0; - mid = (mid + Math.imul(al6, bh2)) | 0; - mid = (mid + Math.imul(ah6, bl2)) | 0; - hi = (hi + Math.imul(ah6, bh2)) | 0; - lo = (lo + Math.imul(al5, bl3)) | 0; - mid = (mid + Math.imul(al5, bh3)) | 0; - mid = (mid + Math.imul(ah5, bl3)) | 0; - hi = (hi + Math.imul(ah5, bh3)) | 0; - lo = (lo + Math.imul(al4, bl4)) | 0; - mid = (mid + Math.imul(al4, bh4)) | 0; - mid = (mid + Math.imul(ah4, bl4)) | 0; - hi = (hi + Math.imul(ah4, bh4)) | 0; - lo = (lo + Math.imul(al3, bl5)) | 0; - mid = (mid + Math.imul(al3, bh5)) | 0; - mid = (mid + Math.imul(ah3, bl5)) | 0; - hi = (hi + Math.imul(ah3, bh5)) | 0; - lo = (lo + Math.imul(al2, bl6)) | 0; - mid = (mid + Math.imul(al2, bh6)) | 0; - mid = (mid + Math.imul(ah2, bl6)) | 0; - hi = (hi + Math.imul(ah2, bh6)) | 0; - lo = (lo + Math.imul(al1, bl7)) | 0; - mid = (mid + Math.imul(al1, bh7)) | 0; - mid = (mid + Math.imul(ah1, bl7)) | 0; - hi = (hi + Math.imul(ah1, bh7)) | 0; - lo = (lo + Math.imul(al0, bl8)) | 0; - mid = (mid + Math.imul(al0, bh8)) | 0; - mid = (mid + Math.imul(ah0, bl8)) | 0; - hi = (hi + Math.imul(ah0, bh8)) | 0; - var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0; - w8 &= 0x3ffffff; - /* k = 9 */ - lo = Math.imul(al9, bl0); - mid = Math.imul(al9, bh0); - mid = (mid + Math.imul(ah9, bl0)) | 0; - hi = Math.imul(ah9, bh0); - lo = (lo + Math.imul(al8, bl1)) | 0; - mid = (mid + Math.imul(al8, bh1)) | 0; - mid = (mid + Math.imul(ah8, bl1)) | 0; - hi = (hi + Math.imul(ah8, bh1)) | 0; - lo = (lo + Math.imul(al7, bl2)) | 0; - mid = (mid + Math.imul(al7, bh2)) | 0; - mid = (mid + Math.imul(ah7, bl2)) | 0; - hi = (hi + Math.imul(ah7, bh2)) | 0; - lo = (lo + Math.imul(al6, bl3)) | 0; - mid = (mid + Math.imul(al6, bh3)) | 0; - mid = (mid + Math.imul(ah6, bl3)) | 0; - hi = (hi + Math.imul(ah6, bh3)) | 0; - lo = (lo + Math.imul(al5, bl4)) | 0; - mid = (mid + Math.imul(al5, bh4)) | 0; - mid = (mid + Math.imul(ah5, bl4)) | 0; - hi = (hi + Math.imul(ah5, bh4)) | 0; - lo = (lo + Math.imul(al4, bl5)) | 0; - mid = (mid + Math.imul(al4, bh5)) | 0; - mid = (mid + Math.imul(ah4, bl5)) | 0; - hi = (hi + Math.imul(ah4, bh5)) | 0; - lo = (lo + Math.imul(al3, bl6)) | 0; - mid = (mid + Math.imul(al3, bh6)) | 0; - mid = (mid + Math.imul(ah3, bl6)) | 0; - hi = (hi + Math.imul(ah3, bh6)) | 0; - lo = (lo + Math.imul(al2, bl7)) | 0; - mid = (mid + Math.imul(al2, bh7)) | 0; - mid = (mid + Math.imul(ah2, bl7)) | 0; - hi = (hi + Math.imul(ah2, bh7)) | 0; - lo = (lo + Math.imul(al1, bl8)) | 0; - mid = (mid + Math.imul(al1, bh8)) | 0; - mid = (mid + Math.imul(ah1, bl8)) | 0; - hi = (hi + Math.imul(ah1, bh8)) | 0; - lo = (lo + Math.imul(al0, bl9)) | 0; - mid = (mid + Math.imul(al0, bh9)) | 0; - mid = (mid + Math.imul(ah0, bl9)) | 0; - hi = (hi + Math.imul(ah0, bh9)) | 0; - var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0; - w9 &= 0x3ffffff; - /* k = 10 */ - lo = Math.imul(al9, bl1); - mid = Math.imul(al9, bh1); - mid = (mid + Math.imul(ah9, bl1)) | 0; - hi = Math.imul(ah9, bh1); - lo = (lo + Math.imul(al8, bl2)) | 0; - mid = (mid + Math.imul(al8, bh2)) | 0; - mid = (mid + Math.imul(ah8, bl2)) | 0; - hi = (hi + Math.imul(ah8, bh2)) | 0; - lo = (lo + Math.imul(al7, bl3)) | 0; - mid = (mid + Math.imul(al7, bh3)) | 0; - mid = (mid + Math.imul(ah7, bl3)) | 0; - hi = (hi + Math.imul(ah7, bh3)) | 0; - lo = (lo + Math.imul(al6, bl4)) | 0; - mid = (mid + Math.imul(al6, bh4)) | 0; - mid = (mid + Math.imul(ah6, bl4)) | 0; - hi = (hi + Math.imul(ah6, bh4)) | 0; - lo = (lo + Math.imul(al5, bl5)) | 0; - mid = (mid + Math.imul(al5, bh5)) | 0; - mid = (mid + Math.imul(ah5, bl5)) | 0; - hi = (hi + Math.imul(ah5, bh5)) | 0; - lo = (lo + Math.imul(al4, bl6)) | 0; - mid = (mid + Math.imul(al4, bh6)) | 0; - mid = (mid + Math.imul(ah4, bl6)) | 0; - hi = (hi + Math.imul(ah4, bh6)) | 0; - lo = (lo + Math.imul(al3, bl7)) | 0; - mid = (mid + Math.imul(al3, bh7)) | 0; - mid = (mid + Math.imul(ah3, bl7)) | 0; - hi = (hi + Math.imul(ah3, bh7)) | 0; - lo = (lo + Math.imul(al2, bl8)) | 0; - mid = (mid + Math.imul(al2, bh8)) | 0; - mid = (mid + Math.imul(ah2, bl8)) | 0; - hi = (hi + Math.imul(ah2, bh8)) | 0; - lo = (lo + Math.imul(al1, bl9)) | 0; - mid = (mid + Math.imul(al1, bh9)) | 0; - mid = (mid + Math.imul(ah1, bl9)) | 0; - hi = (hi + Math.imul(ah1, bh9)) | 0; - var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0; - w10 &= 0x3ffffff; - /* k = 11 */ - lo = Math.imul(al9, bl2); - mid = Math.imul(al9, bh2); - mid = (mid + Math.imul(ah9, bl2)) | 0; - hi = Math.imul(ah9, bh2); - lo = (lo + Math.imul(al8, bl3)) | 0; - mid = (mid + Math.imul(al8, bh3)) | 0; - mid = (mid + Math.imul(ah8, bl3)) | 0; - hi = (hi + Math.imul(ah8, bh3)) | 0; - lo = (lo + Math.imul(al7, bl4)) | 0; - mid = (mid + Math.imul(al7, bh4)) | 0; - mid = (mid + Math.imul(ah7, bl4)) | 0; - hi = (hi + Math.imul(ah7, bh4)) | 0; - lo = (lo + Math.imul(al6, bl5)) | 0; - mid = (mid + Math.imul(al6, bh5)) | 0; - mid = (mid + Math.imul(ah6, bl5)) | 0; - hi = (hi + Math.imul(ah6, bh5)) | 0; - lo = (lo + Math.imul(al5, bl6)) | 0; - mid = (mid + Math.imul(al5, bh6)) | 0; - mid = (mid + Math.imul(ah5, bl6)) | 0; - hi = (hi + Math.imul(ah5, bh6)) | 0; - lo = (lo + Math.imul(al4, bl7)) | 0; - mid = (mid + Math.imul(al4, bh7)) | 0; - mid = (mid + Math.imul(ah4, bl7)) | 0; - hi = (hi + Math.imul(ah4, bh7)) | 0; - lo = (lo + Math.imul(al3, bl8)) | 0; - mid = (mid + Math.imul(al3, bh8)) | 0; - mid = (mid + Math.imul(ah3, bl8)) | 0; - hi = (hi + Math.imul(ah3, bh8)) | 0; - lo = (lo + Math.imul(al2, bl9)) | 0; - mid = (mid + Math.imul(al2, bh9)) | 0; - mid = (mid + Math.imul(ah2, bl9)) | 0; - hi = (hi + Math.imul(ah2, bh9)) | 0; - var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0; - w11 &= 0x3ffffff; - /* k = 12 */ - lo = Math.imul(al9, bl3); - mid = Math.imul(al9, bh3); - mid = (mid + Math.imul(ah9, bl3)) | 0; - hi = Math.imul(ah9, bh3); - lo = (lo + Math.imul(al8, bl4)) | 0; - mid = (mid + Math.imul(al8, bh4)) | 0; - mid = (mid + Math.imul(ah8, bl4)) | 0; - hi = (hi + Math.imul(ah8, bh4)) | 0; - lo = (lo + Math.imul(al7, bl5)) | 0; - mid = (mid + Math.imul(al7, bh5)) | 0; - mid = (mid + Math.imul(ah7, bl5)) | 0; - hi = (hi + Math.imul(ah7, bh5)) | 0; - lo = (lo + Math.imul(al6, bl6)) | 0; - mid = (mid + Math.imul(al6, bh6)) | 0; - mid = (mid + Math.imul(ah6, bl6)) | 0; - hi = (hi + Math.imul(ah6, bh6)) | 0; - lo = (lo + Math.imul(al5, bl7)) | 0; - mid = (mid + Math.imul(al5, bh7)) | 0; - mid = (mid + Math.imul(ah5, bl7)) | 0; - hi = (hi + Math.imul(ah5, bh7)) | 0; - lo = (lo + Math.imul(al4, bl8)) | 0; - mid = (mid + Math.imul(al4, bh8)) | 0; - mid = (mid + Math.imul(ah4, bl8)) | 0; - hi = (hi + Math.imul(ah4, bh8)) | 0; - lo = (lo + Math.imul(al3, bl9)) | 0; - mid = (mid + Math.imul(al3, bh9)) | 0; - mid = (mid + Math.imul(ah3, bl9)) | 0; - hi = (hi + Math.imul(ah3, bh9)) | 0; - var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0; - w12 &= 0x3ffffff; - /* k = 13 */ - lo = Math.imul(al9, bl4); - mid = Math.imul(al9, bh4); - mid = (mid + Math.imul(ah9, bl4)) | 0; - hi = Math.imul(ah9, bh4); - lo = (lo + Math.imul(al8, bl5)) | 0; - mid = (mid + Math.imul(al8, bh5)) | 0; - mid = (mid + Math.imul(ah8, bl5)) | 0; - hi = (hi + Math.imul(ah8, bh5)) | 0; - lo = (lo + Math.imul(al7, bl6)) | 0; - mid = (mid + Math.imul(al7, bh6)) | 0; - mid = (mid + Math.imul(ah7, bl6)) | 0; - hi = (hi + Math.imul(ah7, bh6)) | 0; - lo = (lo + Math.imul(al6, bl7)) | 0; - mid = (mid + Math.imul(al6, bh7)) | 0; - mid = (mid + Math.imul(ah6, bl7)) | 0; - hi = (hi + Math.imul(ah6, bh7)) | 0; - lo = (lo + Math.imul(al5, bl8)) | 0; - mid = (mid + Math.imul(al5, bh8)) | 0; - mid = (mid + Math.imul(ah5, bl8)) | 0; - hi = (hi + Math.imul(ah5, bh8)) | 0; - lo = (lo + Math.imul(al4, bl9)) | 0; - mid = (mid + Math.imul(al4, bh9)) | 0; - mid = (mid + Math.imul(ah4, bl9)) | 0; - hi = (hi + Math.imul(ah4, bh9)) | 0; - var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0; - w13 &= 0x3ffffff; - /* k = 14 */ - lo = Math.imul(al9, bl5); - mid = Math.imul(al9, bh5); - mid = (mid + Math.imul(ah9, bl5)) | 0; - hi = Math.imul(ah9, bh5); - lo = (lo + Math.imul(al8, bl6)) | 0; - mid = (mid + Math.imul(al8, bh6)) | 0; - mid = (mid + Math.imul(ah8, bl6)) | 0; - hi = (hi + Math.imul(ah8, bh6)) | 0; - lo = (lo + Math.imul(al7, bl7)) | 0; - mid = (mid + Math.imul(al7, bh7)) | 0; - mid = (mid + Math.imul(ah7, bl7)) | 0; - hi = (hi + Math.imul(ah7, bh7)) | 0; - lo = (lo + Math.imul(al6, bl8)) | 0; - mid = (mid + Math.imul(al6, bh8)) | 0; - mid = (mid + Math.imul(ah6, bl8)) | 0; - hi = (hi + Math.imul(ah6, bh8)) | 0; - lo = (lo + Math.imul(al5, bl9)) | 0; - mid = (mid + Math.imul(al5, bh9)) | 0; - mid = (mid + Math.imul(ah5, bl9)) | 0; - hi = (hi + Math.imul(ah5, bh9)) | 0; - var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0; - w14 &= 0x3ffffff; - /* k = 15 */ - lo = Math.imul(al9, bl6); - mid = Math.imul(al9, bh6); - mid = (mid + Math.imul(ah9, bl6)) | 0; - hi = Math.imul(ah9, bh6); - lo = (lo + Math.imul(al8, bl7)) | 0; - mid = (mid + Math.imul(al8, bh7)) | 0; - mid = (mid + Math.imul(ah8, bl7)) | 0; - hi = (hi + Math.imul(ah8, bh7)) | 0; - lo = (lo + Math.imul(al7, bl8)) | 0; - mid = (mid + Math.imul(al7, bh8)) | 0; - mid = (mid + Math.imul(ah7, bl8)) | 0; - hi = (hi + Math.imul(ah7, bh8)) | 0; - lo = (lo + Math.imul(al6, bl9)) | 0; - mid = (mid + Math.imul(al6, bh9)) | 0; - mid = (mid + Math.imul(ah6, bl9)) | 0; - hi = (hi + Math.imul(ah6, bh9)) | 0; - var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0; - w15 &= 0x3ffffff; - /* k = 16 */ - lo = Math.imul(al9, bl7); - mid = Math.imul(al9, bh7); - mid = (mid + Math.imul(ah9, bl7)) | 0; - hi = Math.imul(ah9, bh7); - lo = (lo + Math.imul(al8, bl8)) | 0; - mid = (mid + Math.imul(al8, bh8)) | 0; - mid = (mid + Math.imul(ah8, bl8)) | 0; - hi = (hi + Math.imul(ah8, bh8)) | 0; - lo = (lo + Math.imul(al7, bl9)) | 0; - mid = (mid + Math.imul(al7, bh9)) | 0; - mid = (mid + Math.imul(ah7, bl9)) | 0; - hi = (hi + Math.imul(ah7, bh9)) | 0; - var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0; - w16 &= 0x3ffffff; - /* k = 17 */ - lo = Math.imul(al9, bl8); - mid = Math.imul(al9, bh8); - mid = (mid + Math.imul(ah9, bl8)) | 0; - hi = Math.imul(ah9, bh8); - lo = (lo + Math.imul(al8, bl9)) | 0; - mid = (mid + Math.imul(al8, bh9)) | 0; - mid = (mid + Math.imul(ah8, bl9)) | 0; - hi = (hi + Math.imul(ah8, bh9)) | 0; - var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0; - w17 &= 0x3ffffff; - /* k = 18 */ - lo = Math.imul(al9, bl9); - mid = Math.imul(al9, bh9); - mid = (mid + Math.imul(ah9, bl9)) | 0; - hi = Math.imul(ah9, bh9); - var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0; - c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0; - w18 &= 0x3ffffff; - o[0] = w0; - o[1] = w1; - o[2] = w2; - o[3] = w3; - o[4] = w4; - o[5] = w5; - o[6] = w6; - o[7] = w7; - o[8] = w8; - o[9] = w9; - o[10] = w10; - o[11] = w11; - o[12] = w12; - o[13] = w13; - o[14] = w14; - o[15] = w15; - o[16] = w16; - o[17] = w17; - o[18] = w18; - if (c !== 0) { - o[19] = c; - out.length++; - } - return out; - }; - - // Polyfill comb - if (!Math.imul) { - comb10MulTo = smallMulTo; - } - - function bigMulTo (self, num, out) { - out.negative = num.negative ^ self.negative; - out.length = self.length + num.length; - - var carry = 0; - var hncarry = 0; - for (var k = 0; k < out.length - 1; k++) { - // Sum all words with the same `i + j = k` and accumulate `ncarry`, - // note that ncarry could be >= 0x3ffffff - var ncarry = hncarry; - hncarry = 0; - var rword = carry & 0x3ffffff; - var maxJ = Math.min(k, num.length - 1); - for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) { - var i = k - j; - var a = self.words[i] | 0; - var b = num.words[j] | 0; - var r = a * b; - - var lo = r & 0x3ffffff; - ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0; - lo = (lo + rword) | 0; - rword = lo & 0x3ffffff; - ncarry = (ncarry + (lo >>> 26)) | 0; - - hncarry += ncarry >>> 26; - ncarry &= 0x3ffffff; - } - out.words[k] = rword; - carry = ncarry; - ncarry = hncarry; - } - if (carry !== 0) { - out.words[k] = carry; - } else { - out.length--; - } - - return out.strip(); - } - - function jumboMulTo (self, num, out) { - var fftm = new FFTM(); - return fftm.mulp(self, num, out); - } - - BN.prototype.mulTo = function mulTo (num, out) { - var res; - var len = this.length + num.length; - if (this.length === 10 && num.length === 10) { - res = comb10MulTo(this, num, out); - } else if (len < 63) { - res = smallMulTo(this, num, out); - } else if (len < 1024) { - res = bigMulTo(this, num, out); - } else { - res = jumboMulTo(this, num, out); - } - - return res; - }; - - // Cooley-Tukey algorithm for FFT - // slightly revisited to rely on looping instead of recursion - - function FFTM (x, y) { - this.x = x; - this.y = y; - } - - FFTM.prototype.makeRBT = function makeRBT (N) { - var t = new Array(N); - var l = BN.prototype._countBits(N) - 1; - for (var i = 0; i < N; i++) { - t[i] = this.revBin(i, l, N); - } - - return t; - }; - - // Returns binary-reversed representation of `x` - FFTM.prototype.revBin = function revBin (x, l, N) { - if (x === 0 || x === N - 1) return x; - - var rb = 0; - for (var i = 0; i < l; i++) { - rb |= (x & 1) << (l - i - 1); - x >>= 1; - } - - return rb; - }; - - // Performs "tweedling" phase, therefore 'emulating' - // behaviour of the recursive algorithm - FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) { - for (var i = 0; i < N; i++) { - rtws[i] = rws[rbt[i]]; - itws[i] = iws[rbt[i]]; - } - }; - - FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) { - this.permute(rbt, rws, iws, rtws, itws, N); - - for (var s = 1; s < N; s <<= 1) { - var l = s << 1; - - var rtwdf = Math.cos(2 * Math.PI / l); - var itwdf = Math.sin(2 * Math.PI / l); - - for (var p = 0; p < N; p += l) { - var rtwdf_ = rtwdf; - var itwdf_ = itwdf; - - for (var j = 0; j < s; j++) { - var re = rtws[p + j]; - var ie = itws[p + j]; - - var ro = rtws[p + j + s]; - var io = itws[p + j + s]; - - var rx = rtwdf_ * ro - itwdf_ * io; - - io = rtwdf_ * io + itwdf_ * ro; - ro = rx; - - rtws[p + j] = re + ro; - itws[p + j] = ie + io; - - rtws[p + j + s] = re - ro; - itws[p + j + s] = ie - io; - - /* jshint maxdepth : false */ - if (j !== l) { - rx = rtwdf * rtwdf_ - itwdf * itwdf_; - - itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_; - rtwdf_ = rx; - } - } - } - } - }; - - FFTM.prototype.guessLen13b = function guessLen13b (n, m) { - var N = Math.max(m, n) | 1; - var odd = N & 1; - var i = 0; - for (N = N / 2 | 0; N; N = N >>> 1) { - i++; - } - - return 1 << i + 1 + odd; - }; - - FFTM.prototype.conjugate = function conjugate (rws, iws, N) { - if (N <= 1) return; - - for (var i = 0; i < N / 2; i++) { - var t = rws[i]; - - rws[i] = rws[N - i - 1]; - rws[N - i - 1] = t; - - t = iws[i]; - - iws[i] = -iws[N - i - 1]; - iws[N - i - 1] = -t; - } - }; - - FFTM.prototype.normalize13b = function normalize13b (ws, N) { - var carry = 0; - for (var i = 0; i < N / 2; i++) { - var w = Math.round(ws[2 * i + 1] / N) * 0x2000 + - Math.round(ws[2 * i] / N) + - carry; - - ws[i] = w & 0x3ffffff; - - if (w < 0x4000000) { - carry = 0; - } else { - carry = w / 0x4000000 | 0; - } - } - - return ws; - }; - - FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) { - var carry = 0; - for (var i = 0; i < len; i++) { - carry = carry + (ws[i] | 0); - - rws[2 * i] = carry & 0x1fff; carry = carry >>> 13; - rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13; - } - - // Pad with zeroes - for (i = 2 * len; i < N; ++i) { - rws[i] = 0; - } - - assert(carry === 0); - assert((carry & ~0x1fff) === 0); - }; - - FFTM.prototype.stub = function stub (N) { - var ph = new Array(N); - for (var i = 0; i < N; i++) { - ph[i] = 0; - } - - return ph; - }; - - FFTM.prototype.mulp = function mulp (x, y, out) { - var N = 2 * this.guessLen13b(x.length, y.length); - - var rbt = this.makeRBT(N); - - var _ = this.stub(N); - - var rws = new Array(N); - var rwst = new Array(N); - var iwst = new Array(N); - - var nrws = new Array(N); - var nrwst = new Array(N); - var niwst = new Array(N); - - var rmws = out.words; - rmws.length = N; - - this.convert13b(x.words, x.length, rws, N); - this.convert13b(y.words, y.length, nrws, N); - - this.transform(rws, _, rwst, iwst, N, rbt); - this.transform(nrws, _, nrwst, niwst, N, rbt); - - for (var i = 0; i < N; i++) { - var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i]; - iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i]; - rwst[i] = rx; - } - - this.conjugate(rwst, iwst, N); - this.transform(rwst, iwst, rmws, _, N, rbt); - this.conjugate(rmws, _, N); - this.normalize13b(rmws, N); - - out.negative = x.negative ^ y.negative; - out.length = x.length + y.length; - return out.strip(); - }; - - // Multiply `this` by `num` - BN.prototype.mul = function mul (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return this.mulTo(num, out); - }; - - // Multiply employing FFT - BN.prototype.mulf = function mulf (num) { - var out = new BN(null); - out.words = new Array(this.length + num.length); - return jumboMulTo(this, num, out); - }; - - // In-place Multiplication - BN.prototype.imul = function imul (num) { - return this.clone().mulTo(num, this); - }; - - BN.prototype.imuln = function imuln (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - - // Carry - var carry = 0; - for (var i = 0; i < this.length; i++) { - var w = (this.words[i] | 0) * num; - var lo = (w & 0x3ffffff) + (carry & 0x3ffffff); - carry >>= 26; - carry += (w / 0x4000000) | 0; - // NOTE: lo is 27bit maximum - carry += lo >>> 26; - this.words[i] = lo & 0x3ffffff; - } - - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - - return this; - }; - - BN.prototype.muln = function muln (num) { - return this.clone().imuln(num); - }; - - // `this` * `this` - BN.prototype.sqr = function sqr () { - return this.mul(this); - }; - - // `this` * `this` in-place - BN.prototype.isqr = function isqr () { - return this.imul(this.clone()); - }; - - // Math.pow(`this`, `num`) - BN.prototype.pow = function pow (num) { - var w = toBitArray(num); - if (w.length === 0) return new BN(1); - - // Skip leading zeroes - var res = this; - for (var i = 0; i < w.length; i++, res = res.sqr()) { - if (w[i] !== 0) break; - } - - if (++i < w.length) { - for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) { - if (w[i] === 0) continue; - - res = res.mul(q); - } - } - - return res; - }; - - // Shift-left in-place - BN.prototype.iushln = function iushln (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r); - var i; - - if (r !== 0) { - var carry = 0; - - for (i = 0; i < this.length; i++) { - var newCarry = this.words[i] & carryMask; - var c = ((this.words[i] | 0) - newCarry) << r; - this.words[i] = c | carry; - carry = newCarry >>> (26 - r); - } - - if (carry) { - this.words[i] = carry; - this.length++; - } - } - - if (s !== 0) { - for (i = this.length - 1; i >= 0; i--) { - this.words[i + s] = this.words[i]; - } - - for (i = 0; i < s; i++) { - this.words[i] = 0; - } - - this.length += s; - } - - return this.strip(); - }; - - BN.prototype.ishln = function ishln (bits) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushln(bits); - }; - - // Shift-right in-place - // NOTE: `hint` is a lowest bit before trailing zeroes - // NOTE: if `extended` is present - it will be filled with destroyed bits - BN.prototype.iushrn = function iushrn (bits, hint, extended) { - assert(typeof bits === 'number' && bits >= 0); - var h; - if (hint) { - h = (hint - (hint % 26)) / 26; - } else { - h = 0; - } - - var r = bits % 26; - var s = Math.min((bits - r) / 26, this.length); - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - var maskedWords = extended; - - h -= s; - h = Math.max(0, h); - - // Extended mode, copy masked part - if (maskedWords) { - for (var i = 0; i < s; i++) { - maskedWords.words[i] = this.words[i]; - } - maskedWords.length = s; - } - - if (s === 0) { - // No-op, we should not move anything at all - } else if (this.length > s) { - this.length -= s; - for (i = 0; i < this.length; i++) { - this.words[i] = this.words[i + s]; - } - } else { - this.words[0] = 0; - this.length = 1; - } - - var carry = 0; - for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) { - var word = this.words[i] | 0; - this.words[i] = (carry << (26 - r)) | (word >>> r); - carry = word & mask; - } - - // Push carried bits as a mask - if (maskedWords && carry !== 0) { - maskedWords.words[maskedWords.length++] = carry; - } - - if (this.length === 0) { - this.words[0] = 0; - this.length = 1; - } - - return this.strip(); - }; - - BN.prototype.ishrn = function ishrn (bits, hint, extended) { - // TODO(indutny): implement me - assert(this.negative === 0); - return this.iushrn(bits, hint, extended); - }; - - // Shift-left - BN.prototype.shln = function shln (bits) { - return this.clone().ishln(bits); - }; - - BN.prototype.ushln = function ushln (bits) { - return this.clone().iushln(bits); - }; - - // Shift-right - BN.prototype.shrn = function shrn (bits) { - return this.clone().ishrn(bits); - }; - - BN.prototype.ushrn = function ushrn (bits) { - return this.clone().iushrn(bits); - }; - - // Test if n bit is set - BN.prototype.testn = function testn (bit) { - assert(typeof bit === 'number' && bit >= 0); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) return false; - - // Check bit and return - var w = this.words[s]; - - return !!(w & q); - }; - - // Return only lowers bits of number (in-place) - BN.prototype.imaskn = function imaskn (bits) { - assert(typeof bits === 'number' && bits >= 0); - var r = bits % 26; - var s = (bits - r) / 26; - - assert(this.negative === 0, 'imaskn works only with positive numbers'); - - if (r !== 0) { - s++; - } - this.length = Math.min(s, this.length); - - if (r !== 0) { - var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r); - this.words[this.length - 1] &= mask; - } - - return this.strip(); - }; - - // Return only lowers bits of number - BN.prototype.maskn = function maskn (bits) { - return this.clone().imaskn(bits); - }; - - // Add plain number `num` to `this` - BN.prototype.iaddn = function iaddn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.isubn(-num); - - // Possible sign change - if (this.negative !== 0) { - if (this.length === 1 && (this.words[0] | 0) < num) { - this.words[0] = num - (this.words[0] | 0); - this.negative = 0; - return this; - } - - this.negative = 0; - this.isubn(num); - this.negative = 1; - return this; - } - - // Add without checks - return this._iaddn(num); - }; - - BN.prototype._iaddn = function _iaddn (num) { - this.words[0] += num; - - // Carry - for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) { - this.words[i] -= 0x4000000; - if (i === this.length - 1) { - this.words[i + 1] = 1; - } else { - this.words[i + 1]++; - } - } - this.length = Math.max(this.length, i + 1); - - return this; - }; - - // Subtract plain number `num` from `this` - BN.prototype.isubn = function isubn (num) { - assert(typeof num === 'number'); - assert(num < 0x4000000); - if (num < 0) return this.iaddn(-num); - - if (this.negative !== 0) { - this.negative = 0; - this.iaddn(num); - this.negative = 1; - return this; - } - - this.words[0] -= num; - - if (this.length === 1 && this.words[0] < 0) { - this.words[0] = -this.words[0]; - this.negative = 1; - } else { - // Carry - for (var i = 0; i < this.length && this.words[i] < 0; i++) { - this.words[i] += 0x4000000; - this.words[i + 1] -= 1; - } - } - - return this.strip(); - }; - - BN.prototype.addn = function addn (num) { - return this.clone().iaddn(num); - }; - - BN.prototype.subn = function subn (num) { - return this.clone().isubn(num); - }; - - BN.prototype.iabs = function iabs () { - this.negative = 0; - - return this; - }; - - BN.prototype.abs = function abs () { - return this.clone().iabs(); - }; - - BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) { - var len = num.length + shift; - var i; - - this._expand(len); - - var w; - var carry = 0; - for (i = 0; i < num.length; i++) { - w = (this.words[i + shift] | 0) + carry; - var right = (num.words[i] | 0) * mul; - w -= right & 0x3ffffff; - carry = (w >> 26) - ((right / 0x4000000) | 0); - this.words[i + shift] = w & 0x3ffffff; - } - for (; i < this.length - shift; i++) { - w = (this.words[i + shift] | 0) + carry; - carry = w >> 26; - this.words[i + shift] = w & 0x3ffffff; - } - - if (carry === 0) return this.strip(); - - // Subtraction overflow - assert(carry === -1); - carry = 0; - for (i = 0; i < this.length; i++) { - w = -(this.words[i] | 0) + carry; - carry = w >> 26; - this.words[i] = w & 0x3ffffff; - } - this.negative = 1; - - return this.strip(); - }; - - BN.prototype._wordDiv = function _wordDiv (num, mode) { - var shift = this.length - num.length; - - var a = this.clone(); - var b = num; - - // Normalize - var bhi = b.words[b.length - 1] | 0; - var bhiBits = this._countBits(bhi); - shift = 26 - bhiBits; - if (shift !== 0) { - b = b.ushln(shift); - a.iushln(shift); - bhi = b.words[b.length - 1] | 0; - } - - // Initialize quotient - var m = a.length - b.length; - var q; - - if (mode !== 'mod') { - q = new BN(null); - q.length = m + 1; - q.words = new Array(q.length); - for (var i = 0; i < q.length; i++) { - q.words[i] = 0; - } - } - - var diff = a.clone()._ishlnsubmul(b, 1, m); - if (diff.negative === 0) { - a = diff; - if (q) { - q.words[m] = 1; - } - } - - for (var j = m - 1; j >= 0; j--) { - var qj = (a.words[b.length + j] | 0) * 0x4000000 + - (a.words[b.length + j - 1] | 0); - - // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max - // (0x7ffffff) - qj = Math.min((qj / bhi) | 0, 0x3ffffff); - - a._ishlnsubmul(b, qj, j); - while (a.negative !== 0) { - qj--; - a.negative = 0; - a._ishlnsubmul(b, 1, j); - if (!a.isZero()) { - a.negative ^= 1; - } - } - if (q) { - q.words[j] = qj; - } - } - if (q) { - q.strip(); - } - a.strip(); - - // Denormalize - if (mode !== 'div' && shift !== 0) { - a.iushrn(shift); - } - - return { - div: q || null, - mod: a - }; - }; - - // NOTE: 1) `mode` can be set to `mod` to request mod only, - // to `div` to request div only, or be absent to - // request both div & mod - // 2) `positive` is true if unsigned mod is requested - BN.prototype.divmod = function divmod (num, mode, positive) { - assert(!num.isZero()); - - if (this.isZero()) { - return { - div: new BN(0), - mod: new BN(0) - }; - } - - var div, mod, res; - if (this.negative !== 0 && num.negative === 0) { - res = this.neg().divmod(num, mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.iadd(num); - } - } - - return { - div: div, - mod: mod - }; - } - - if (this.negative === 0 && num.negative !== 0) { - res = this.divmod(num.neg(), mode); - - if (mode !== 'mod') { - div = res.div.neg(); - } - - return { - div: div, - mod: res.mod - }; - } - - if ((this.negative & num.negative) !== 0) { - res = this.neg().divmod(num.neg(), mode); - - if (mode !== 'div') { - mod = res.mod.neg(); - if (positive && mod.negative !== 0) { - mod.isub(num); - } - } - - return { - div: res.div, - mod: mod - }; - } - - // Both numbers are positive at this point - - // Strip both numbers to approximate shift value - if (num.length > this.length || this.cmp(num) < 0) { - return { - div: new BN(0), - mod: this - }; - } - - // Very short reduction - if (num.length === 1) { - if (mode === 'div') { - return { - div: this.divn(num.words[0]), - mod: null - }; - } - - if (mode === 'mod') { - return { - div: null, - mod: new BN(this.modn(num.words[0])) - }; - } - - return { - div: this.divn(num.words[0]), - mod: new BN(this.modn(num.words[0])) - }; - } - - return this._wordDiv(num, mode); - }; - - // Find `this` / `num` - BN.prototype.div = function div (num) { - return this.divmod(num, 'div', false).div; - }; - - // Find `this` % `num` - BN.prototype.mod = function mod (num) { - return this.divmod(num, 'mod', false).mod; - }; - - BN.prototype.umod = function umod (num) { - return this.divmod(num, 'mod', true).mod; - }; - - // Find Round(`this` / `num`) - BN.prototype.divRound = function divRound (num) { - var dm = this.divmod(num); - - // Fast case - exact division - if (dm.mod.isZero()) return dm.div; - - var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod; - - var half = num.ushrn(1); - var r2 = num.andln(1); - var cmp = mod.cmp(half); - - // Round down - if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div; - - // Round up - return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); - }; - - BN.prototype.modn = function modn (num) { - assert(num <= 0x3ffffff); - var p = (1 << 26) % num; - - var acc = 0; - for (var i = this.length - 1; i >= 0; i--) { - acc = (p * acc + (this.words[i] | 0)) % num; - } - - return acc; - }; - - // In-place division by number - BN.prototype.idivn = function idivn (num) { - assert(num <= 0x3ffffff); - - var carry = 0; - for (var i = this.length - 1; i >= 0; i--) { - var w = (this.words[i] | 0) + carry * 0x4000000; - this.words[i] = (w / num) | 0; - carry = w % num; - } - - return this.strip(); - }; - - BN.prototype.divn = function divn (num) { - return this.clone().idivn(num); - }; - - BN.prototype.egcd = function egcd (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var x = this; - var y = p.clone(); - - if (x.negative !== 0) { - x = x.umod(p); - } else { - x = x.clone(); - } - - // A * x + B * y = x - var A = new BN(1); - var B = new BN(0); - - // C * x + D * y = y - var C = new BN(0); - var D = new BN(1); - - var g = 0; - - while (x.isEven() && y.isEven()) { - x.iushrn(1); - y.iushrn(1); - ++g; - } - - var yp = y.clone(); - var xp = x.clone(); - - while (!x.isZero()) { - for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - x.iushrn(i); - while (i-- > 0) { - if (A.isOdd() || B.isOdd()) { - A.iadd(yp); - B.isub(xp); - } - - A.iushrn(1); - B.iushrn(1); - } - } - - for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - y.iushrn(j); - while (j-- > 0) { - if (C.isOdd() || D.isOdd()) { - C.iadd(yp); - D.isub(xp); - } - - C.iushrn(1); - D.iushrn(1); - } - } - - if (x.cmp(y) >= 0) { - x.isub(y); - A.isub(C); - B.isub(D); - } else { - y.isub(x); - C.isub(A); - D.isub(B); - } - } - - return { - a: C, - b: D, - gcd: y.iushln(g) - }; - }; - - // This is reduced incarnation of the binary EEA - // above, designated to invert members of the - // _prime_ fields F(p) at a maximal speed - BN.prototype._invmp = function _invmp (p) { - assert(p.negative === 0); - assert(!p.isZero()); - - var a = this; - var b = p.clone(); - - if (a.negative !== 0) { - a = a.umod(p); - } else { - a = a.clone(); - } - - var x1 = new BN(1); - var x2 = new BN(0); - - var delta = b.clone(); - - while (a.cmpn(1) > 0 && b.cmpn(1) > 0) { - for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1); - if (i > 0) { - a.iushrn(i); - while (i-- > 0) { - if (x1.isOdd()) { - x1.iadd(delta); - } - - x1.iushrn(1); - } - } - - for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1); - if (j > 0) { - b.iushrn(j); - while (j-- > 0) { - if (x2.isOdd()) { - x2.iadd(delta); - } - - x2.iushrn(1); - } - } - - if (a.cmp(b) >= 0) { - a.isub(b); - x1.isub(x2); - } else { - b.isub(a); - x2.isub(x1); - } - } - - var res; - if (a.cmpn(1) === 0) { - res = x1; - } else { - res = x2; - } - - if (res.cmpn(0) < 0) { - res.iadd(p); - } - - return res; - }; - - BN.prototype.gcd = function gcd (num) { - if (this.isZero()) return num.abs(); - if (num.isZero()) return this.abs(); - - var a = this.clone(); - var b = num.clone(); - a.negative = 0; - b.negative = 0; - - // Remove common factor of two - for (var shift = 0; a.isEven() && b.isEven(); shift++) { - a.iushrn(1); - b.iushrn(1); - } - - do { - while (a.isEven()) { - a.iushrn(1); - } - while (b.isEven()) { - b.iushrn(1); - } - - var r = a.cmp(b); - if (r < 0) { - // Swap `a` and `b` to make `a` always bigger than `b` - var t = a; - a = b; - b = t; - } else if (r === 0 || b.cmpn(1) === 0) { - break; - } - - a.isub(b); - } while (true); - - return b.iushln(shift); - }; - - // Invert number in the field F(num) - BN.prototype.invm = function invm (num) { - return this.egcd(num).a.umod(num); - }; - - BN.prototype.isEven = function isEven () { - return (this.words[0] & 1) === 0; - }; - - BN.prototype.isOdd = function isOdd () { - return (this.words[0] & 1) === 1; - }; - - // And first word and num - BN.prototype.andln = function andln (num) { - return this.words[0] & num; - }; - - // Increment at the bit position in-line - BN.prototype.bincn = function bincn (bit) { - assert(typeof bit === 'number'); - var r = bit % 26; - var s = (bit - r) / 26; - var q = 1 << r; - - // Fast case: bit is much higher than all existing words - if (this.length <= s) { - this._expand(s + 1); - this.words[s] |= q; - return this; - } - - // Add bit and propagate, if needed - var carry = q; - for (var i = s; carry !== 0 && i < this.length; i++) { - var w = this.words[i] | 0; - w += carry; - carry = w >>> 26; - w &= 0x3ffffff; - this.words[i] = w; - } - if (carry !== 0) { - this.words[i] = carry; - this.length++; - } - return this; - }; - - BN.prototype.isZero = function isZero () { - return this.length === 1 && this.words[0] === 0; - }; - - BN.prototype.cmpn = function cmpn (num) { - var negative = num < 0; - - if (this.negative !== 0 && !negative) return -1; - if (this.negative === 0 && negative) return 1; - - this.strip(); - - var res; - if (this.length > 1) { - res = 1; - } else { - if (negative) { - num = -num; - } - - assert(num <= 0x3ffffff, 'Number is too big'); - - var w = this.words[0] | 0; - res = w === num ? 0 : w < num ? -1 : 1; - } - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Compare two numbers and return: - // 1 - if `this` > `num` - // 0 - if `this` == `num` - // -1 - if `this` < `num` - BN.prototype.cmp = function cmp (num) { - if (this.negative !== 0 && num.negative === 0) return -1; - if (this.negative === 0 && num.negative !== 0) return 1; - - var res = this.ucmp(num); - if (this.negative !== 0) return -res | 0; - return res; - }; - - // Unsigned comparison - BN.prototype.ucmp = function ucmp (num) { - // At this point both numbers have the same sign - if (this.length > num.length) return 1; - if (this.length < num.length) return -1; - - var res = 0; - for (var i = this.length - 1; i >= 0; i--) { - var a = this.words[i] | 0; - var b = num.words[i] | 0; - - if (a === b) continue; - if (a < b) { - res = -1; - } else if (a > b) { - res = 1; - } - break; - } - return res; - }; - - BN.prototype.gtn = function gtn (num) { - return this.cmpn(num) === 1; - }; - - BN.prototype.gt = function gt (num) { - return this.cmp(num) === 1; - }; - - BN.prototype.gten = function gten (num) { - return this.cmpn(num) >= 0; - }; - - BN.prototype.gte = function gte (num) { - return this.cmp(num) >= 0; - }; - - BN.prototype.ltn = function ltn (num) { - return this.cmpn(num) === -1; - }; - - BN.prototype.lt = function lt (num) { - return this.cmp(num) === -1; - }; - - BN.prototype.lten = function lten (num) { - return this.cmpn(num) <= 0; - }; - - BN.prototype.lte = function lte (num) { - return this.cmp(num) <= 0; - }; - - BN.prototype.eqn = function eqn (num) { - return this.cmpn(num) === 0; - }; - - BN.prototype.eq = function eq (num) { - return this.cmp(num) === 0; - }; - - // - // A reduce context, could be using montgomery or something better, depending - // on the `m` itself. - // - BN.red = function red (num) { - return new Red(num); - }; - - BN.prototype.toRed = function toRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - assert(this.negative === 0, 'red works only with positives'); - return ctx.convertTo(this)._forceRed(ctx); - }; - - BN.prototype.fromRed = function fromRed () { - assert(this.red, 'fromRed works only with numbers in reduction context'); - return this.red.convertFrom(this); - }; - - BN.prototype._forceRed = function _forceRed (ctx) { - this.red = ctx; - return this; - }; - - BN.prototype.forceRed = function forceRed (ctx) { - assert(!this.red, 'Already a number in reduction context'); - return this._forceRed(ctx); - }; - - BN.prototype.redAdd = function redAdd (num) { - assert(this.red, 'redAdd works only with red numbers'); - return this.red.add(this, num); - }; - - BN.prototype.redIAdd = function redIAdd (num) { - assert(this.red, 'redIAdd works only with red numbers'); - return this.red.iadd(this, num); - }; - - BN.prototype.redSub = function redSub (num) { - assert(this.red, 'redSub works only with red numbers'); - return this.red.sub(this, num); - }; - - BN.prototype.redISub = function redISub (num) { - assert(this.red, 'redISub works only with red numbers'); - return this.red.isub(this, num); - }; - - BN.prototype.redShl = function redShl (num) { - assert(this.red, 'redShl works only with red numbers'); - return this.red.shl(this, num); - }; - - BN.prototype.redMul = function redMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.mul(this, num); - }; - - BN.prototype.redIMul = function redIMul (num) { - assert(this.red, 'redMul works only with red numbers'); - this.red._verify2(this, num); - return this.red.imul(this, num); - }; - - BN.prototype.redSqr = function redSqr () { - assert(this.red, 'redSqr works only with red numbers'); - this.red._verify1(this); - return this.red.sqr(this); - }; - - BN.prototype.redISqr = function redISqr () { - assert(this.red, 'redISqr works only with red numbers'); - this.red._verify1(this); - return this.red.isqr(this); - }; - - // Square root over p - BN.prototype.redSqrt = function redSqrt () { - assert(this.red, 'redSqrt works only with red numbers'); - this.red._verify1(this); - return this.red.sqrt(this); - }; - - BN.prototype.redInvm = function redInvm () { - assert(this.red, 'redInvm works only with red numbers'); - this.red._verify1(this); - return this.red.invm(this); - }; - - // Return negative clone of `this` % `red modulo` - BN.prototype.redNeg = function redNeg () { - assert(this.red, 'redNeg works only with red numbers'); - this.red._verify1(this); - return this.red.neg(this); - }; - - BN.prototype.redPow = function redPow (num) { - assert(this.red && !num.red, 'redPow(normalNum)'); - this.red._verify1(this); - return this.red.pow(this, num); - }; - - // Prime numbers with efficient reduction - var primes = { - k256: null, - p224: null, - p192: null, - p25519: null - }; - - // Pseudo-Mersenne prime - function MPrime (name, p) { - // P = 2 ^ N - K - this.name = name; - this.p = new BN(p, 16); - this.n = this.p.bitLength(); - this.k = new BN(1).iushln(this.n).isub(this.p); - - this.tmp = this._tmp(); - } - - MPrime.prototype._tmp = function _tmp () { - var tmp = new BN(null); - tmp.words = new Array(Math.ceil(this.n / 13)); - return tmp; - }; - - MPrime.prototype.ireduce = function ireduce (num) { - // Assumes that `num` is less than `P^2` - // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P) - var r = num; - var rlen; - - do { - this.split(r, this.tmp); - r = this.imulK(r); - r = r.iadd(this.tmp); - rlen = r.bitLength(); - } while (rlen > this.n); - - var cmp = rlen < this.n ? -1 : r.ucmp(this.p); - if (cmp === 0) { - r.words[0] = 0; - r.length = 1; - } else if (cmp > 0) { - r.isub(this.p); - } else { - r.strip(); - } - - return r; - }; - - MPrime.prototype.split = function split (input, out) { - input.iushrn(this.n, 0, out); - }; - - MPrime.prototype.imulK = function imulK (num) { - return num.imul(this.k); - }; - - function K256 () { - MPrime.call( - this, - 'k256', - 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - inherits(K256, MPrime); - - K256.prototype.split = function split (input, output) { - // 256 = 9 * 26 + 22 - var mask = 0x3fffff; - - var outLen = Math.min(input.length, 9); - for (var i = 0; i < outLen; i++) { - output.words[i] = input.words[i]; - } - output.length = outLen; - - if (input.length <= 9) { - input.words[0] = 0; - input.length = 1; - return; - } - - // Shift by 9 limbs - var prev = input.words[9]; - output.words[output.length++] = prev & mask; - - for (i = 10; i < input.length; i++) { - var next = input.words[i] | 0; - input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22); - prev = next; - } - prev >>>= 22; - input.words[i - 10] = prev; - if (prev === 0 && input.length > 10) { - input.length -= 10; - } else { - input.length -= 9; - } - }; - - K256.prototype.imulK = function imulK (num) { - // K = 0x1000003d1 = [ 0x40, 0x3d1 ] - num.words[num.length] = 0; - num.words[num.length + 1] = 0; - num.length += 2; - - // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390 - var lo = 0; - for (var i = 0; i < num.length; i++) { - var w = num.words[i] | 0; - lo += w * 0x3d1; - num.words[i] = lo & 0x3ffffff; - lo = w * 0x40 + ((lo / 0x4000000) | 0); - } - - // Fast length reduction - if (num.words[num.length - 1] === 0) { - num.length--; - if (num.words[num.length - 1] === 0) { - num.length--; - } - } - return num; - }; - - function P224 () { - MPrime.call( - this, - 'p224', - 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - inherits(P224, MPrime); - - function P192 () { - MPrime.call( - this, - 'p192', - 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - inherits(P192, MPrime); - - function P25519 () { - // 2 ^ 255 - 19 - MPrime.call( - this, - '25519', - '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - inherits(P25519, MPrime); - - P25519.prototype.imulK = function imulK (num) { - // K = 0x13 - var carry = 0; - for (var i = 0; i < num.length; i++) { - var hi = (num.words[i] | 0) * 0x13 + carry; - var lo = hi & 0x3ffffff; - hi >>>= 26; - - num.words[i] = lo; - carry = hi; - } - if (carry !== 0) { - num.words[num.length++] = carry; - } - return num; - }; - - // Exported mostly for testing purposes, use plain name instead - BN._prime = function prime (name) { - // Cached version of prime - if (primes[name]) return primes[name]; - - var prime; - if (name === 'k256') { - prime = new K256(); - } else if (name === 'p224') { - prime = new P224(); - } else if (name === 'p192') { - prime = new P192(); - } else if (name === 'p25519') { - prime = new P25519(); - } else { - throw new Error('Unknown prime ' + name); - } - primes[name] = prime; - - return prime; - }; - - // - // Base reduction engine - // - function Red (m) { - if (typeof m === 'string') { - var prime = BN._prime(m); - this.m = prime.p; - this.prime = prime; - } else { - assert(m.gtn(1), 'modulus must be greater than 1'); - this.m = m; - this.prime = null; - } - } - - Red.prototype._verify1 = function _verify1 (a) { - assert(a.negative === 0, 'red works only with positives'); - assert(a.red, 'red works only with red numbers'); - }; - - Red.prototype._verify2 = function _verify2 (a, b) { - assert((a.negative | b.negative) === 0, 'red works only with positives'); - assert(a.red && a.red === b.red, - 'red works only with red numbers'); - }; - - Red.prototype.imod = function imod (a) { - if (this.prime) return this.prime.ireduce(a)._forceRed(this); - return a.umod(this.m)._forceRed(this); - }; - - Red.prototype.neg = function neg (a) { - if (a.isZero()) { - return a.clone(); - } - - return this.m.sub(a)._forceRed(this); - }; - - Red.prototype.add = function add (a, b) { - this._verify2(a, b); - - var res = a.add(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.iadd = function iadd (a, b) { - this._verify2(a, b); - - var res = a.iadd(b); - if (res.cmp(this.m) >= 0) { - res.isub(this.m); - } - return res; - }; - - Red.prototype.sub = function sub (a, b) { - this._verify2(a, b); - - var res = a.sub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res._forceRed(this); - }; - - Red.prototype.isub = function isub (a, b) { - this._verify2(a, b); - - var res = a.isub(b); - if (res.cmpn(0) < 0) { - res.iadd(this.m); - } - return res; - }; - - Red.prototype.shl = function shl (a, num) { - this._verify1(a); - return this.imod(a.ushln(num)); - }; - - Red.prototype.imul = function imul (a, b) { - this._verify2(a, b); - return this.imod(a.imul(b)); - }; - - Red.prototype.mul = function mul (a, b) { - this._verify2(a, b); - return this.imod(a.mul(b)); - }; - - Red.prototype.isqr = function isqr (a) { - return this.imul(a, a.clone()); - }; - - Red.prototype.sqr = function sqr (a) { - return this.mul(a, a); - }; - - Red.prototype.sqrt = function sqrt (a) { - if (a.isZero()) return a.clone(); - - var mod3 = this.m.andln(3); - assert(mod3 % 2 === 1); - - // Fast case - if (mod3 === 3) { - var pow = this.m.add(new BN(1)).iushrn(2); - return this.pow(a, pow); - } - - // Tonelli-Shanks algorithm (Totally unoptimized and slow) - // - // Find Q and S, that Q * 2 ^ S = (P - 1) - var q = this.m.subn(1); - var s = 0; - while (!q.isZero() && q.andln(1) === 0) { - s++; - q.iushrn(1); - } - assert(!q.isZero()); - - var one = new BN(1).toRed(this); - var nOne = one.redNeg(); - - // Find quadratic non-residue - // NOTE: Max is such because of generalized Riemann hypothesis. - var lpow = this.m.subn(1).iushrn(1); - var z = this.m.bitLength(); - z = new BN(2 * z * z).toRed(this); - - while (this.pow(z, lpow).cmp(nOne) !== 0) { - z.redIAdd(nOne); - } - - var c = this.pow(z, q); - var r = this.pow(a, q.addn(1).iushrn(1)); - var t = this.pow(a, q); - var m = s; - while (t.cmp(one) !== 0) { - var tmp = t; - for (var i = 0; tmp.cmp(one) !== 0; i++) { - tmp = tmp.redSqr(); - } - assert(i < m); - var b = this.pow(c, new BN(1).iushln(m - i - 1)); - - r = r.redMul(b); - c = b.redSqr(); - t = t.redMul(c); - m = i; - } - - return r; - }; - - Red.prototype.invm = function invm (a) { - var inv = a._invmp(this.m); - if (inv.negative !== 0) { - inv.negative = 0; - return this.imod(inv).redNeg(); - } else { - return this.imod(inv); - } - }; - - Red.prototype.pow = function pow (a, num) { - if (num.isZero()) return new BN(1); - if (num.cmpn(1) === 0) return a.clone(); - - var windowSize = 4; - var wnd = new Array(1 << windowSize); - wnd[0] = new BN(1).toRed(this); - wnd[1] = a; - for (var i = 2; i < wnd.length; i++) { - wnd[i] = this.mul(wnd[i - 1], a); - } - - var res = wnd[0]; - var current = 0; - var currentLen = 0; - var start = num.bitLength() % 26; - if (start === 0) { - start = 26; - } - - for (i = num.length - 1; i >= 0; i--) { - var word = num.words[i]; - for (var j = start - 1; j >= 0; j--) { - var bit = (word >> j) & 1; - if (res !== wnd[0]) { - res = this.sqr(res); - } - - if (bit === 0 && current === 0) { - currentLen = 0; - continue; - } - - current <<= 1; - current |= bit; - currentLen++; - if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue; - - res = this.mul(res, wnd[current]); - currentLen = 0; - current = 0; - } - start = 26; - } - - return res; - }; - - Red.prototype.convertTo = function convertTo (num) { - var r = num.umod(this.m); - - return r === num ? r.clone() : r; - }; - - Red.prototype.convertFrom = function convertFrom (num) { - var res = num.clone(); - res.red = null; - return res; - }; - - // - // Montgomery method engine - // - - BN.mont = function mont (num) { - return new Mont(num); - }; - - function Mont (m) { - Red.call(this, m); - - this.shift = this.m.bitLength(); - if (this.shift % 26 !== 0) { - this.shift += 26 - (this.shift % 26); - } - - this.r = new BN(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); - } - inherits(Mont, Red); - - Mont.prototype.convertTo = function convertTo (num) { - return this.imod(num.ushln(this.shift)); - }; - - Mont.prototype.convertFrom = function convertFrom (num) { - var r = this.imod(num.mul(this.rinv)); - r.red = null; - return r; - }; - - Mont.prototype.imul = function imul (a, b) { - if (a.isZero() || b.isZero()) { - a.words[0] = 0; - a.length = 1; - return a; - } - - var t = a.imul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.mul = function mul (a, b) { - if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this); - - var t = a.mul(b); - var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m); - var u = t.isub(c).iushrn(this.shift); - var res = u; - if (u.cmp(this.m) >= 0) { - res = u.isub(this.m); - } else if (u.cmpn(0) < 0) { - res = u.iadd(this.m); - } - - return res._forceRed(this); - }; - - Mont.prototype.invm = function invm (a) { - // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R - var res = this.imod(a._invmp(this.m).mul(this.r2)); - return res._forceRed(this); - }; -})(typeof module === 'undefined' || module, this); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(76)(module))) - -/***/ }, -/* 13 */ -/***/ function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { return this; })(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1).Buffer)) - -/***/ }, -/* 15 */ -/***/ function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(42) - , min = Math.min; -module.exports = function(it){ - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(28); -module.exports = function(it){ - return Object(defined(it)); -}; - -/***/ }, -/* 17 */ -/***/ function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function(it, key){ - return hasOwnProperty.call(it, key); -}; - -/***/ }, -/* 18 */ -/***/ function(module, exports) { - -"use strict"; -'use strict'; - -exports.command = function command(send, name) { - return function (opts, cb) { - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - return send(name, null, opts, null, cb); - }; -}; - -exports.argCommand = function argCommand(send, name) { - return function (arg, opts, cb) { - if (typeof opts === 'function') { - cb = opts; - opts = {}; - } - return send(name, arg, opts, null, cb); - }; -}; - -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(11) - , createDesc = __webpack_require__(41); -module.exports = __webpack_require__(10) ? function(object, key, value){ - return dP.f(object, key, createDesc(1, value)); -} : function(object, key, value){ - object[key] = value; - return object; -}; - -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; - -var elliptic = exports; - -elliptic.version = __webpack_require__(232).version; -elliptic.utils = __webpack_require__(499); -elliptic.rand = __webpack_require__(156); -elliptic.hmacDRBG = __webpack_require__(497); -elliptic.curve = __webpack_require__(94); -elliptic.curves = __webpack_require__(490); - -// Protocols -elliptic.ec = __webpack_require__(491); -elliptic.eddsa = __webpack_require__(494); - - -/***/ }, -/* 21 */ -/***/ function(module, exports) { - -module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; -}; - -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { - -var global = __webpack_require__(5) - , hide = __webpack_require__(19) - , has = __webpack_require__(17) - , SRC = __webpack_require__(53)('src') - , TO_STRING = 'toString' - , $toString = Function[TO_STRING] - , TPL = ('' + $toString).split(TO_STRING); - -__webpack_require__(32).inspectSource = function(it){ - return $toString.call(it); -}; - -(module.exports = function(O, key, val, safe){ - var isFunction = typeof val == 'function'; - if(isFunction)has(val, 'name') || hide(val, 'name', key); - if(O[key] === val)return; - if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if(O === global){ - O[key] = val; - } else { - if(!safe){ - delete O[key]; - hide(O, key, val); - } else { - if(O[key])O[key] = val; - else hide(O, key, val); - } - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString(){ - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { - -var $export = __webpack_require__(0) - , fails = __webpack_require__(6) - , defined = __webpack_require__(28) - , quot = /"/g; -// B.2.3.2.1 CreateHTML(string, tag, attribute, value) -var createHTML = function(string, tag, attribute, value) { - var S = String(defined(string)) - , p1 = '<' + tag; - if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; - return p1 + '>' + S + ''; -}; -module.exports = function(NAME, exec){ - var O = {}; - O[NAME] = exec(createHTML); - $export($export.P + $export.F * fails(function(){ - var test = ''[NAME]('"'); - return test !== test.toLowerCase() || test.split('"').length > 3; - }), 'String', O); -}; - -/***/ }, -/* 24 */ -/***/ function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(70) - , defined = __webpack_require__(28); -module.exports = function(it){ - return IObject(defined(it)); -}; - -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { - -var pIE = __webpack_require__(71) - , createDesc = __webpack_require__(41) - , toIObject = __webpack_require__(24) - , toPrimitive = __webpack_require__(34) - , has = __webpack_require__(17) - , IE8_DOM_DEFINE = __webpack_require__(176) - , gOPD = Object.getOwnPropertyDescriptor; - -exports.f = __webpack_require__(10) ? gOPD : function getOwnPropertyDescriptor(O, P){ - O = toIObject(O); - P = toPrimitive(P, true); - if(IE8_DOM_DEFINE)try { - return gOPD(O, P); - } catch(e){ /* empty */ } - if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); -}; - -/***/ }, -/* 26 */ -/***/ function(module, exports, __webpack_require__) { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(17) - , toObject = __webpack_require__(16) - , IE_PROTO = __webpack_require__(119)('IE_PROTO') - , ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function(O){ - O = toObject(O); - if(has(O, IE_PROTO))return O[IE_PROTO]; - if(typeof O.constructor == 'function' && O instanceof O.constructor){ - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - -/***/ }, -/* 27 */ -/***/ function(module, exports) { - -var toString = {}.toString; - -module.exports = function(it){ - return toString.call(it).slice(8, -1); -}; - -/***/ }, -/* 28 */ -/***/ function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; -}; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - -var fails = __webpack_require__(6); - -module.exports = function(method, arg){ - return !!method && fails(function(){ - arg ? method.call(null, function(){}, 1) : method.call(null); - }); -}; - -/***/ }, -/* 30 */ -/***/ function(module, exports) { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -function EventEmitter() { - this._events = this._events || {}; - this._maxListeners = this._maxListeners || undefined; -} -module.exports = EventEmitter; - -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._maxListeners = undefined; - -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -EventEmitter.defaultMaxListeners = 10; - -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function(n) { - if (!isNumber(n) || n < 0 || isNaN(n)) - throw TypeError('n must be a positive number'); - this._maxListeners = n; - return this; -}; - -EventEmitter.prototype.emit = function(type) { - var er, handler, len, args, i, listeners; - - if (!this._events) - this._events = {}; - - // If there is no 'error' event listener then throw. - if (type === 'error') { - if (!this._events.error || - (isObject(this._events.error) && !this._events.error.length)) { - er = arguments[1]; - if (er instanceof Error) { - throw er; // Unhandled 'error' event - } else { - // At least give some kind of context to the user - var err = new Error('Uncaught, unspecified "error" event. (' + er + ')'); - err.context = er; - throw err; - } - } - } - - handler = this._events[type]; - - if (isUndefined(handler)) - return false; - - if (isFunction(handler)) { - switch (arguments.length) { - // fast cases - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - // slower - default: - args = Array.prototype.slice.call(arguments, 1); - handler.apply(this, args); - } - } else if (isObject(handler)) { - args = Array.prototype.slice.call(arguments, 1); - listeners = handler.slice(); - len = listeners.length; - for (i = 0; i < len; i++) - listeners[i].apply(this, args); - } - - return true; -}; - -EventEmitter.prototype.addListener = function(type, listener) { - var m; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events) - this._events = {}; - - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (this._events.newListener) - this.emit('newListener', type, - isFunction(listener.listener) ? - listener.listener : listener); - - if (!this._events[type]) - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - else if (isObject(this._events[type])) - // If we've already got an array, just append. - this._events[type].push(listener); - else - // Adding the second element, need to change to array. - this._events[type] = [this._events[type], listener]; - - // Check for listener leak - if (isObject(this._events[type]) && !this._events[type].warned) { - if (!isUndefined(this._maxListeners)) { - m = this._maxListeners; - } else { - m = EventEmitter.defaultMaxListeners; - } - - if (m && m > 0 && this._events[type].length > m) { - this._events[type].warned = true; - console.error('(node) warning: possible EventEmitter memory ' + - 'leak detected. %d listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.', - this._events[type].length); - if (typeof console.trace === 'function') { - // not supported in IE 10 - console.trace(); - } - } - } - - return this; -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.once = function(type, listener) { - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - var fired = false; - - function g() { - this.removeListener(type, g); - - if (!fired) { - fired = true; - listener.apply(this, arguments); - } - } - - g.listener = listener; - this.on(type, g); - - return this; -}; - -// emits a 'removeListener' event iff the listener was removed -EventEmitter.prototype.removeListener = function(type, listener) { - var list, position, length, i; - - if (!isFunction(listener)) - throw TypeError('listener must be a function'); - - if (!this._events || !this._events[type]) - return this; - - list = this._events[type]; - length = list.length; - position = -1; - - if (list === listener || - (isFunction(list.listener) && list.listener === listener)) { - delete this._events[type]; - if (this._events.removeListener) - this.emit('removeListener', type, listener); - - } else if (isObject(list)) { - for (i = length; i-- > 0;) { - if (list[i] === listener || - (list[i].listener && list[i].listener === listener)) { - position = i; - break; - } - } - - if (position < 0) - return this; - - if (list.length === 1) { - list.length = 0; - delete this._events[type]; - } else { - list.splice(position, 1); - } - - if (this._events.removeListener) - this.emit('removeListener', type, listener); - } - - return this; -}; - -EventEmitter.prototype.removeAllListeners = function(type) { - var key, listeners; - - if (!this._events) - return this; - - // not listening for removeListener, no need to emit - if (!this._events.removeListener) { - if (arguments.length === 0) - this._events = {}; - else if (this._events[type]) - delete this._events[type]; - return this; - } - - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - for (key in this._events) { - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = {}; - return this; - } - - listeners = this._events[type]; - - if (isFunction(listeners)) { - this.removeListener(type, listeners); - } else if (listeners) { - // LIFO order - while (listeners.length) - this.removeListener(type, listeners[listeners.length - 1]); - } - delete this._events[type]; - - return this; -}; - -EventEmitter.prototype.listeners = function(type) { - var ret; - if (!this._events || !this._events[type]) - ret = []; - else if (isFunction(this._events[type])) - ret = [this._events[type]]; - else - ret = this._events[type].slice(); - return ret; -}; - -EventEmitter.prototype.listenerCount = function(type) { - if (this._events) { - var evlistener = this._events[type]; - - if (isFunction(evlistener)) - return 1; - else if (evlistener) - return evlistener.length; - } - return 0; -}; - -EventEmitter.listenerCount = function(emitter, type) { - return emitter.listenerCount(type); -}; - -function isFunction(arg) { - return typeof arg === 'function'; -} - -function isNumber(arg) { - return typeof arg === 'number'; -} - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isUndefined(arg) { - return arg === void 0; -} - - -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { - -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var ctx = __webpack_require__(35) - , IObject = __webpack_require__(70) - , toObject = __webpack_require__(16) - , toLength = __webpack_require__(15) - , asc = __webpack_require__(297); -module.exports = function(TYPE, $create){ - var IS_MAP = TYPE == 1 - , IS_FILTER = TYPE == 2 - , IS_SOME = TYPE == 3 - , IS_EVERY = TYPE == 4 - , IS_FIND_INDEX = TYPE == 6 - , NO_HOLES = TYPE == 5 || IS_FIND_INDEX - , create = $create || asc; - return function($this, callbackfn, that){ - var O = toObject($this) - , self = IObject(O) - , f = ctx(callbackfn, that, 3) - , length = toLength(self.length) - , index = 0 - , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined - , val, res; - for(;length > index; index++)if(NO_HOLES || index in self){ - val = self[index]; - res = f(val, index, O); - if(TYPE){ - if(IS_MAP)result[index] = res; // map - else if(res)switch(TYPE){ - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if(IS_EVERY)return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - -/***/ }, -/* 32 */ -/***/ function(module, exports) { - -var core = module.exports = {version: '2.4.0'}; -if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { - -// most Object methods by ES6 should accept primitives -var $export = __webpack_require__(0) - , core = __webpack_require__(32) - , fails = __webpack_require__(6); -module.exports = function(KEY, exec){ - var fn = (core.Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); -}; - -/***/ }, -/* 34 */ -/***/ function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(7); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function(it, S){ - if(!isObject(it))return it; - var fn, val; - if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; - if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - throw TypeError("Can't convert object to primitive value"); -}; - -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(21); -module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; -}; - -/***/ }, -/* 36 */ -/***/ function(module, exports, __webpack_require__) { - -var Map = __webpack_require__(191) - , $export = __webpack_require__(0) - , shared = __webpack_require__(92)('metadata') - , store = shared.store || (shared.store = new (__webpack_require__(194))); - -var getOrCreateMetadataMap = function(target, targetKey, create){ - var targetMetadata = store.get(target); - if(!targetMetadata){ - if(!create)return undefined; - store.set(target, targetMetadata = new Map); - } - var keyMetadata = targetMetadata.get(targetKey); - if(!keyMetadata){ - if(!create)return undefined; - targetMetadata.set(targetKey, keyMetadata = new Map); - } return keyMetadata; -}; -var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? false : metadataMap.has(MetadataKey); -}; -var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ - var metadataMap = getOrCreateMetadataMap(O, P, false); - return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); -}; -var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ - getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); -}; -var ordinaryOwnMetadataKeys = function(target, targetKey){ - var metadataMap = getOrCreateMetadataMap(target, targetKey, false) - , keys = []; - if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); - return keys; -}; -var toMetaKey = function(it){ - return it === undefined || typeof it == 'symbol' ? it : String(it); -}; -var exp = function(O){ - $export($export.S, 'Reflect', O); -}; - -module.exports = { - store: store, - map: getOrCreateMetadataMap, - has: ordinaryHasOwnMetadata, - get: ordinaryGetOwnMetadata, - set: ordinaryDefineOwnMetadata, - keys: ordinaryOwnMetadataKeys, - key: toMetaKey, - exp: exp -}; - -/***/ }, -/* 37 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; -if(__webpack_require__(10)){ - var LIBRARY = __webpack_require__(46) - , global = __webpack_require__(5) - , fails = __webpack_require__(6) - , $export = __webpack_require__(0) - , $typed = __webpack_require__(93) - , $buffer = __webpack_require__(126) - , ctx = __webpack_require__(35) - , anInstance = __webpack_require__(39) - , propertyDesc = __webpack_require__(41) - , hide = __webpack_require__(19) - , redefineAll = __webpack_require__(50) - , isInteger = __webpack_require__(113) - , toInteger = __webpack_require__(42) - , toLength = __webpack_require__(15) - , toIndex = __webpack_require__(52) - , toPrimitive = __webpack_require__(34) - , has = __webpack_require__(17) - , same = __webpack_require__(188) - , classof = __webpack_require__(59) - , isObject = __webpack_require__(7) - , toObject = __webpack_require__(16) - , isArrayIter = __webpack_require__(111) - , create = __webpack_require__(47) - , getPrototypeOf = __webpack_require__(26) - , gOPN = __webpack_require__(48).f - , isIterable = __webpack_require__(304) - , getIterFn = __webpack_require__(128) - , uid = __webpack_require__(53) - , wks = __webpack_require__(8) - , createArrayMethod = __webpack_require__(31) - , createArrayIncludes = __webpack_require__(82) - , speciesConstructor = __webpack_require__(120) - , ArrayIterators = __webpack_require__(129) - , Iterators = __webpack_require__(45) - , $iterDetect = __webpack_require__(88) - , setSpecies = __webpack_require__(51) - , arrayFill = __webpack_require__(104) - , arrayCopyWithin = __webpack_require__(169) - , $DP = __webpack_require__(11) - , $GOPD = __webpack_require__(25) - , dP = $DP.f - , gOPD = $GOPD.f - , RangeError = global.RangeError - , TypeError = global.TypeError - , Uint8Array = global.Uint8Array - , ARRAY_BUFFER = 'ArrayBuffer' - , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER - , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' - , PROTOTYPE = 'prototype' - , ArrayProto = Array[PROTOTYPE] - , $ArrayBuffer = $buffer.ArrayBuffer - , $DataView = $buffer.DataView - , arrayForEach = createArrayMethod(0) - , arrayFilter = createArrayMethod(2) - , arraySome = createArrayMethod(3) - , arrayEvery = createArrayMethod(4) - , arrayFind = createArrayMethod(5) - , arrayFindIndex = createArrayMethod(6) - , arrayIncludes = createArrayIncludes(true) - , arrayIndexOf = createArrayIncludes(false) - , arrayValues = ArrayIterators.values - , arrayKeys = ArrayIterators.keys - , arrayEntries = ArrayIterators.entries - , arrayLastIndexOf = ArrayProto.lastIndexOf - , arrayReduce = ArrayProto.reduce - , arrayReduceRight = ArrayProto.reduceRight - , arrayJoin = ArrayProto.join - , arraySort = ArrayProto.sort - , arraySlice = ArrayProto.slice - , arrayToString = ArrayProto.toString - , arrayToLocaleString = ArrayProto.toLocaleString - , ITERATOR = wks('iterator') - , TAG = wks('toStringTag') - , TYPED_CONSTRUCTOR = uid('typed_constructor') - , DEF_CONSTRUCTOR = uid('def_constructor') - , ALL_CONSTRUCTORS = $typed.CONSTR - , TYPED_ARRAY = $typed.TYPED - , VIEW = $typed.VIEW - , WRONG_LENGTH = 'Wrong length!'; - - var $map = createArrayMethod(1, function(O, length){ - return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); - }); - - var LITTLE_ENDIAN = fails(function(){ - return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; - }); - - var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ - new Uint8Array(1).set({}); - }); - - var strictToLength = function(it, SAME){ - if(it === undefined)throw TypeError(WRONG_LENGTH); - var number = +it - , length = toLength(it); - if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); - return length; - }; - - var toOffset = function(it, BYTES){ - var offset = toInteger(it); - if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); - return offset; - }; - - var validate = function(it){ - if(isObject(it) && TYPED_ARRAY in it)return it; - throw TypeError(it + ' is not a typed array!'); - }; - - var allocate = function(C, length){ - if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ - throw TypeError('It is not a typed array constructor!'); - } return new C(length); - }; - - var speciesFromList = function(O, list){ - return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); - }; - - var fromList = function(C, list){ - var index = 0 - , length = list.length - , result = allocate(C, length); - while(length > index)result[index] = list[index++]; - return result; - }; - - var addGetter = function(it, key, internal){ - dP(it, key, {get: function(){ return this._d[internal]; }}); - }; - - var $from = function from(source /*, mapfn, thisArg */){ - var O = toObject(source) - , aLen = arguments.length - , mapfn = aLen > 1 ? arguments[1] : undefined - , mapping = mapfn !== undefined - , iterFn = getIterFn(O) - , i, length, values, result, step, iterator; - if(iterFn != undefined && !isArrayIter(iterFn)){ - for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ - values.push(step.value); - } O = values; - } - if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); - for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ - result[i] = mapping ? mapfn(O[i], i) : O[i]; - } - return result; - }; - - var $of = function of(/*...items*/){ - var index = 0 - , length = arguments.length - , result = allocate(this, length); - while(length > index)result[index] = arguments[index++]; - return result; - }; - - // iOS Safari 6.x fails here - var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); - - var $toLocaleString = function toLocaleString(){ - return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); - }; - - var proto = { - copyWithin: function copyWithin(target, start /*, end */){ - return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); - }, - every: function every(callbackfn /*, thisArg */){ - return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars - return arrayFill.apply(validate(this), arguments); - }, - filter: function filter(callbackfn /*, thisArg */){ - return speciesFromList(this, arrayFilter(validate(this), callbackfn, - arguments.length > 1 ? arguments[1] : undefined)); - }, - find: function find(predicate /*, thisArg */){ - return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - findIndex: function findIndex(predicate /*, thisArg */){ - return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); - }, - forEach: function forEach(callbackfn /*, thisArg */){ - arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - indexOf: function indexOf(searchElement /*, fromIndex */){ - return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - includes: function includes(searchElement /*, fromIndex */){ - return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); - }, - join: function join(separator){ // eslint-disable-line no-unused-vars - return arrayJoin.apply(validate(this), arguments); - }, - lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars - return arrayLastIndexOf.apply(validate(this), arguments); - }, - map: function map(mapfn /*, thisArg */){ - return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); - }, - reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars - return arrayReduce.apply(validate(this), arguments); - }, - reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars - return arrayReduceRight.apply(validate(this), arguments); - }, - reverse: function reverse(){ - var that = this - , length = validate(that).length - , middle = Math.floor(length / 2) - , index = 0 - , value; - while(index < middle){ - value = that[index]; - that[index++] = that[--length]; - that[length] = value; - } return that; - }, - some: function some(callbackfn /*, thisArg */){ - return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); - }, - sort: function sort(comparefn){ - return arraySort.call(validate(this), comparefn); - }, - subarray: function subarray(begin, end){ - var O = validate(this) - , length = O.length - , $begin = toIndex(begin, length); - return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( - O.buffer, - O.byteOffset + $begin * O.BYTES_PER_ELEMENT, - toLength((end === undefined ? length : toIndex(end, length)) - $begin) - ); - } - }; - - var $slice = function slice(start, end){ - return speciesFromList(this, arraySlice.call(validate(this), start, end)); - }; - - var $set = function set(arrayLike /*, offset */){ - validate(this); - var offset = toOffset(arguments[1], 1) - , length = this.length - , src = toObject(arrayLike) - , len = toLength(src.length) - , index = 0; - if(len + offset > length)throw RangeError(WRONG_LENGTH); - while(index < len)this[offset + index] = src[index++]; - }; - - var $iterators = { - entries: function entries(){ - return arrayEntries.call(validate(this)); - }, - keys: function keys(){ - return arrayKeys.call(validate(this)); - }, - values: function values(){ - return arrayValues.call(validate(this)); - } - }; - - var isTAIndex = function(target, key){ - return isObject(target) - && target[TYPED_ARRAY] - && typeof key != 'symbol' - && key in target - && String(+key) == String(key); - }; - var $getDesc = function getOwnPropertyDescriptor(target, key){ - return isTAIndex(target, key = toPrimitive(key, true)) - ? propertyDesc(2, target[key]) - : gOPD(target, key); - }; - var $setDesc = function defineProperty(target, key, desc){ - if(isTAIndex(target, key = toPrimitive(key, true)) - && isObject(desc) - && has(desc, 'value') - && !has(desc, 'get') - && !has(desc, 'set') - // TODO: add validation descriptor w/o calling accessors - && !desc.configurable - && (!has(desc, 'writable') || desc.writable) - && (!has(desc, 'enumerable') || desc.enumerable) - ){ - target[key] = desc.value; - return target; - } else return dP(target, key, desc); - }; - - if(!ALL_CONSTRUCTORS){ - $GOPD.f = $getDesc; - $DP.f = $setDesc; - } - - $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { - getOwnPropertyDescriptor: $getDesc, - defineProperty: $setDesc - }); - - if(fails(function(){ arrayToString.call({}); })){ - arrayToString = arrayToLocaleString = function toString(){ - return arrayJoin.call(this); - } - } - - var $TypedArrayPrototype$ = redefineAll({}, proto); - redefineAll($TypedArrayPrototype$, $iterators); - hide($TypedArrayPrototype$, ITERATOR, $iterators.values); - redefineAll($TypedArrayPrototype$, { - slice: $slice, - set: $set, - constructor: function(){ /* noop */ }, - toString: arrayToString, - toLocaleString: $toLocaleString - }); - addGetter($TypedArrayPrototype$, 'buffer', 'b'); - addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); - addGetter($TypedArrayPrototype$, 'byteLength', 'l'); - addGetter($TypedArrayPrototype$, 'length', 'e'); - dP($TypedArrayPrototype$, TAG, { - get: function(){ return this[TYPED_ARRAY]; } - }); - - module.exports = function(KEY, BYTES, wrapper, CLAMPED){ - CLAMPED = !!CLAMPED; - var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' - , ISNT_UINT8 = NAME != 'Uint8Array' - , GETTER = 'get' + KEY - , SETTER = 'set' + KEY - , TypedArray = global[NAME] - , Base = TypedArray || {} - , TAC = TypedArray && getPrototypeOf(TypedArray) - , FORCED = !TypedArray || !$typed.ABV - , O = {} - , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; - var getter = function(that, index){ - var data = that._d; - return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); - }; - var setter = function(that, index, value){ - var data = that._d; - if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; - data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); - }; - var addElement = function(that, index){ - dP(that, index, { - get: function(){ - return getter(this, index); - }, - set: function(value){ - return setter(this, index, value); - }, - enumerable: true - }); - }; - if(FORCED){ - TypedArray = wrapper(function(that, data, $offset, $length){ - anInstance(that, TypedArray, NAME, '_d'); - var index = 0 - , offset = 0 - , buffer, byteLength, length, klass; - if(!isObject(data)){ - length = strictToLength(data, true) - byteLength = length * BYTES; - buffer = new $ArrayBuffer(byteLength); - } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ - buffer = data; - offset = toOffset($offset, BYTES); - var $len = data.byteLength; - if($length === undefined){ - if($len % BYTES)throw RangeError(WRONG_LENGTH); - byteLength = $len - offset; - if(byteLength < 0)throw RangeError(WRONG_LENGTH); - } else { - byteLength = toLength($length) * BYTES; - if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); - } - length = byteLength / BYTES; - } else if(TYPED_ARRAY in data){ - return fromList(TypedArray, data); - } else { - return $from.call(TypedArray, data); - } - hide(that, '_d', { - b: buffer, - o: offset, - l: byteLength, - e: length, - v: new $DataView(buffer) - }); - while(index < length)addElement(that, index++); - }); - TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); - hide(TypedArrayPrototype, 'constructor', TypedArray); - } else if(!$iterDetect(function(iter){ - // V8 works with iterators, but fails in many other cases - // https://code.google.com/p/v8/issues/detail?id=4552 - new TypedArray(null); // eslint-disable-line no-new - new TypedArray(iter); // eslint-disable-line no-new - }, true)){ - TypedArray = wrapper(function(that, data, $offset, $length){ - anInstance(that, TypedArray, NAME); - var klass; - // `ws` module bug, temporarily remove validation length for Uint8Array - // https://github.com/websockets/ws/pull/645 - if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); - if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ - return $length !== undefined - ? new Base(data, toOffset($offset, BYTES), $length) - : $offset !== undefined - ? new Base(data, toOffset($offset, BYTES)) - : new Base(data); - } - if(TYPED_ARRAY in data)return fromList(TypedArray, data); - return $from.call(TypedArray, data); - }); - arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ - if(!(key in TypedArray))hide(TypedArray, key, Base[key]); - }); - TypedArray[PROTOTYPE] = TypedArrayPrototype; - if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; - } - var $nativeIterator = TypedArrayPrototype[ITERATOR] - , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) - , $iterator = $iterators.values; - hide(TypedArray, TYPED_CONSTRUCTOR, true); - hide(TypedArrayPrototype, TYPED_ARRAY, NAME); - hide(TypedArrayPrototype, VIEW, true); - hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); - - if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ - dP(TypedArrayPrototype, TAG, { - get: function(){ return NAME; } - }); - } - - O[NAME] = TypedArray; - - $export($export.G + $export.W + $export.F * (TypedArray != Base), O); - - $export($export.S, NAME, { - BYTES_PER_ELEMENT: BYTES, - from: $from, - of: $of - }); - - if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); - - $export($export.P, NAME, proto); - - setSpecies(NAME); - - $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); - - $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); - - $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); - - $export($export.P + $export.F * fails(function(){ - new TypedArray(1).slice(); - }), NAME, {slice: $slice}); - - $export($export.P + $export.F * (fails(function(){ - return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() - }) || !fails(function(){ - TypedArrayPrototype.toLocaleString.call([1, 2]); - })), NAME, {toLocaleString: $toLocaleString}); - - Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; - if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); - }; -} else module.exports = function(){ /* empty */ }; - -/***/ }, -/* 38 */ -/***/ function(module, exports, __webpack_require__) { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Buffer = __webpack_require__(1).Buffer; - -var isBufferEncoding = Buffer.isEncoding - || function(encoding) { - switch (encoding && encoding.toLowerCase()) { - case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; - default: return false; - } - } - - -function assertEncoding(encoding) { - if (encoding && !isBufferEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. CESU-8 is handled as part of the UTF-8 encoding. -// -// @TODO Handling all encodings inside a single object makes it very difficult -// to reason about this code, so it should be split up in the future. -// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code -// points as used by CESU-8. -var StringDecoder = exports.StringDecoder = function(encoding) { - this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); - assertEncoding(encoding); - switch (this.encoding) { - case 'utf8': - // CESU-8 represents each of Surrogate Pair by 3-bytes - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - // UTF-16 represents each of Surrogate Pair by 2-bytes - this.surrogateSize = 2; - this.detectIncompleteChar = utf16DetectIncompleteChar; - break; - case 'base64': - // Base-64 stores 3 bytes in 4 chars, and pads the remainder. - this.surrogateSize = 3; - this.detectIncompleteChar = base64DetectIncompleteChar; - break; - default: - this.write = passThroughWrite; - return; - } - - // Enough space to store all bytes of a single character. UTF-8 needs 4 - // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer(6); - // Number of bytes received for the current incomplete multi-byte character. - this.charReceived = 0; - // Number of bytes expected for the current incomplete multi-byte character. - this.charLength = 0; -}; - - -// write decodes the given buffer and returns it as JS string that is -// guaranteed to not contain any partial multi-byte characters. Any partial -// character found at the end of the buffer is buffered up, and will be -// returned when calling write again with the remaining bytes. -// -// Note: Converting a Buffer containing an orphan surrogate to a String -// currently works, but converting a String to a Buffer (via `new Buffer`, or -// Buffer#write) will replace incomplete surrogates with the unicode -// replacement character. See https://codereview.chromium.org/121173009/ . -StringDecoder.prototype.write = function(buffer) { - var charStr = ''; - // if our last write ended with an incomplete multibyte character - while (this.charLength) { - // determine how many remaining bytes this buffer has to offer for this char - var available = (buffer.length >= this.charLength - this.charReceived) ? - this.charLength - this.charReceived : - buffer.length; - - // add the new bytes to the char buffer - buffer.copy(this.charBuffer, this.charReceived, 0, available); - this.charReceived += available; - - if (this.charReceived < this.charLength) { - // still not enough chars in this buffer? wait for more ... - return ''; - } - - // remove bytes belonging to the current character from the buffer - buffer = buffer.slice(available, buffer.length); - - // get the character that was split - charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); - - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - var charCode = charStr.charCodeAt(charStr.length - 1); - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - this.charLength += this.surrogateSize; - charStr = ''; - continue; - } - this.charReceived = this.charLength = 0; - - // if there are no more bytes in this buffer, just emit our char - if (buffer.length === 0) { - return charStr; - } - break; - } - - // determine and set charLength / charReceived - this.detectIncompleteChar(buffer); - - var end = buffer.length; - if (this.charLength) { - // buffer the incomplete character bytes we got - buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); - end -= this.charReceived; - } - - charStr += buffer.toString(this.encoding, 0, end); - - var end = charStr.length - 1; - var charCode = charStr.charCodeAt(end); - // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character - if (charCode >= 0xD800 && charCode <= 0xDBFF) { - var size = this.surrogateSize; - this.charLength += size; - this.charReceived += size; - this.charBuffer.copy(this.charBuffer, size, 0, size); - buffer.copy(this.charBuffer, 0, 0, size); - return charStr.substring(0, end); - } - - // or just emit the charStr - return charStr; -}; - -// detectIncompleteChar determines if there is an incomplete UTF-8 character at -// the end of the given buffer. If so, it sets this.charLength to the byte -// length that character, and sets this.charReceived to the number of bytes -// that are available for this character. -StringDecoder.prototype.detectIncompleteChar = function(buffer) { - // determine how many bytes we have to check at the end of this buffer - var i = (buffer.length >= 3) ? 3 : buffer.length; - - // Figure out if one of the last i bytes of our buffer announces an - // incomplete char. - for (; i > 0; i--) { - var c = buffer[buffer.length - i]; - - // See http://en.wikipedia.org/wiki/UTF-8#Description - - // 110XXXXX - if (i == 1 && c >> 5 == 0x06) { - this.charLength = 2; - break; - } - - // 1110XXXX - if (i <= 2 && c >> 4 == 0x0E) { - this.charLength = 3; - break; - } - - // 11110XXX - if (i <= 3 && c >> 3 == 0x1E) { - this.charLength = 4; - break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} - - -/***/ }, -/* 39 */ -/***/ function(module, exports) { - -module.exports = function(it, Constructor, name, forbiddenField){ - if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ - throw TypeError(name + ': incorrect invocation!'); - } return it; -}; - -/***/ }, -/* 40 */ -/***/ function(module, exports, __webpack_require__) { - -var META = __webpack_require__(53)('meta') - , isObject = __webpack_require__(7) - , has = __webpack_require__(17) - , setDesc = __webpack_require__(11).f - , id = 0; -var isExtensible = Object.isExtensible || function(){ - return true; -}; -var FREEZE = !__webpack_require__(6)(function(){ - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function(it){ - setDesc(it, META, {value: { - i: 'O' + ++id, // object ID - w: {} // weak collections IDs - }}); -}; -var fastKey = function(it, create){ - // return primitive with prefix - if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if(!has(it, META)){ - // can't set metadata to uncaught frozen object - if(!isExtensible(it))return 'F'; - // not necessary to add metadata - if(!create)return 'E'; - // add missing metadata - setMeta(it); - // return object ID - } return it[META].i; -}; -var getWeak = function(it, create){ - if(!has(it, META)){ - // can't set metadata to uncaught frozen object - if(!isExtensible(it))return true; - // not necessary to add metadata - if(!create)return false; - // add missing metadata - setMeta(it); - // return hash weak collections IDs - } return it[META].w; -}; -// add metadata on freeze-family methods calling -var onFreeze = function(it){ - if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; - -/***/ }, -/* 41 */ -/***/ function(module, exports) { - -module.exports = function(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; -}; - -/***/ }, -/* 42 */ -/***/ function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil - , floor = Math.floor; -module.exports = function(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - -/***/ }, -/* 43 */ -/***/ function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; - -// path.resolve([from ...], to) -// posix version -exports.resolve = function() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : process.cwd(); - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -}; - -// path.normalize(path) -// posix version -exports.normalize = function(path) { - var isAbsolute = exports.isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isAbsolute).join('/'); - - if (!path && !isAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isAbsolute ? '/' : '') + path; -}; - -// posix version -exports.isAbsolute = function(path) { - return path.charAt(0) === '/'; -}; - -// posix version -exports.join = function() { - var paths = Array.prototype.slice.call(arguments, 0); - return exports.normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -}; - - -// path.relative(from, to) -// posix version -exports.relative = function(from, to) { - from = exports.resolve(from).substr(1); - to = exports.resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -}; - -exports.sep = '/'; -exports.delimiter = ':'; - -exports.dirname = function(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -}; - - -exports.basename = function(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -}; - - -exports.extname = function(path) { - return splitPath(path)[3]; -}; - -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' - ? function (str, start, len) { return str.substr(start, len) } - : function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) - -/***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = __webpack_require__(579); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = __webpack_require__(2); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(13), __webpack_require__(4))) - -/***/ }, -/* 45 */ -/***/ function(module, exports) { - -module.exports = {}; - -/***/ }, -/* 46 */ -/***/ function(module, exports) { - -module.exports = false; - -/***/ }, -/* 47 */ -/***/ function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(3) - , dPs = __webpack_require__(181) - , enumBugKeys = __webpack_require__(107) - , IE_PROTO = __webpack_require__(119)('IE_PROTO') - , Empty = function(){ /* empty */ } - , PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function(){ - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(106)('iframe') - , i = enumBugKeys.length - , gt = '>' - , iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(109).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(' - - - - - - - - - - - - - - - - - - - - -
-

OpenSign

-

Peer to peer agreements on the Ethereum blockchain.

-
-

OpenSign is a fully decentralized alternative to products like DocuSign and EchoSign.

-

Documents are stored on IPFS and the signatures are stored on the Ethereum blockchain.

- - -

- Learn more -

- -
- -

Ropsten Only

-

We are currently in testing on the Ropsten test net. To use OpenSign today please use the menu at the top left corner of Metamask to switch to the Ropsten test net. You can then collect some free ether from the faucet here.

- -

Create an Agreement in 3 Steps

-
Step 1: Upload a document
-

Upload the document or contract that you wish to be signed. It will be stored on IPFS, a public decentralized filesystem.

- -
Step 2: Sign the document
-

You will need MetaMask or a similar ethereum enabled browser in order to complete this step. Clicking "I agree" should open MetaMask and request you to submit a transaction for zero ether. There will be a gas cost for this transaction, likely between $0.3 and $0.30. Your ethereum address will be publically associated with the document.

- -
Step 3: Invite others to sign the document
-

You will be given a URL that you can share with other people. This URL will allow them to add their signature to the document too. You can use this URL yourself to see which ethereum addresses have added their signature.

- -

Further Details

-

This project is open source, the source code is available on Github

-

You can find the smart contract code here.

-

We use the Infura public IPFS node for file uploads.

- - -
- - - - -
- - - -
-
-
-

You need to install Metamask

-

It looks like you're not using an ethereum enabled browser. The simplest way to solve this is to

-

Download Metamask

-

You will need to install Metamask and then refresh this page. If you are using the live ethereum network then you will also need to pay for some ether in your account.

-
-
-
- - - -
-
-
-

You are not logged in to Metamask

-

It looks like you have Metamask installed but you are not logged in. Please log in and refresh the page

-
-
-
- - - -
-
-
-

Please use Ropsten Network

-

This dapp is only available on the Ropsten network at the moment, please switch network in the top left hand corner of MetaMask.

-

You can then collect some free ether from the faucet here.

-
-
-
- - - - -
-
-
-

Sign an Agreement

-
-
- - -
-
You have been invited to sign a document
-
-

-
-
- -
-
Who has signed already?
-
- -
-
- -
-
Add your signature
-
-

By clicking "I Agree" you confirm that you have read the document linked above and that you agree to sign it. You will need to be using a browser with Ethereum support such as the MetaMask plugin.

- -

You will need MetaMask or a similar ethereum enabled browser in order to complete this step. Clicking "I agree" should open MetaMask and request you to submit a transaction for zero ether. There will be a gas cost for this transaction, likely between $0.03 and $0.30.

-

Signing will associate your ethereum address with this document publically on the blockchain.

-
- - -
-
-
- -
-
Transaction Processing
-
-

Your transaction may take a few minutes to process on the Ethereum network.

- -

When your transaction has been processed then you can refresh the page and see that your address has been added to the list of signatures.

-
-
- -
- - - -
- - -
- - -
- - -
-

OpenSign

-
- - -
- - -
- - -
- - -
-

- OpenSign is a decentralized alternative to products like DocuSign and EchoSign. Documents are stored on IPFS, a decentralized filesystem, and the signatures are stored on the Ethereum blockchain. The only thing that's left is the code that's running in your browser right now, and that's hosted on IPFS too! -

- -
- - -
- - -
- - -
- - - - - - -
- - - - - - - - - - diff --git a/test/contract_spec.js b/test/contract_spec.js deleted file mode 100644 index d2a8be4..0000000 --- a/test/contract_spec.js +++ /dev/null @@ -1,28 +0,0 @@ -// describe("SimpleStorage", function() { -// before(function(done) { -// this.timeout(0); -// var contractsConfig = { -// "SimpleStorage": { -// args: [100, '0x123'] -// } -// }; -// EmbarkSpec.deployAll(contractsConfig, done); -// }); -// -// it("should set constructor value", function(done) { -// SimpleStorage.storedData(function(err, result) { -// assert.equal(result.toNumber(), 100); -// done(); -// }); -// }); -// -// it("set storage value", function(done) { -// SimpleStorage.set(150, function() { -// SimpleStorage.get(function(err, result) { -// assert.equal(result.toNumber(), 150); -// done(); -// }); -// }); -// }); -// -// }); From e745d2d1d9a5d5d486ec6b9201c712ace1f54b9d Mon Sep 17 00:00:00 2001 From: nervehammer Date: Fri, 26 Apr 2019 17:22:00 +0530 Subject: [PATCH 2/6] add gitignore --- .gitignore | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 34761c3..9f2ddf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,72 @@ -*.swp -.DS_Store -/node_modules -/dist +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +# embark .embark +artifacts + +# distribution +dist + +# misc +.DS_Store +*.swp \ No newline at end of file From fc6c5508512dc75417f28fee3d069b15a825adc1 Mon Sep 17 00:00:00 2001 From: nervehammer Date: Fri, 26 Apr 2019 17:27:20 +0530 Subject: [PATCH 3/6] move contract to root directory --- {app/contracts => contracts}/.gitkeep | 0 {app/contracts => contracts}/opensign.sol | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {app/contracts => contracts}/.gitkeep (100%) rename {app/contracts => contracts}/opensign.sol (100%) diff --git a/app/contracts/.gitkeep b/contracts/.gitkeep similarity index 100% rename from app/contracts/.gitkeep rename to contracts/.gitkeep diff --git a/app/contracts/opensign.sol b/contracts/opensign.sol similarity index 100% rename from app/contracts/opensign.sol rename to contracts/opensign.sol From 52f0d990f65cb24c40f769623e3a7812353a58c9 Mon Sep 17 00:00:00 2001 From: nervehammer Date: Fri, 26 Apr 2019 17:28:35 +0530 Subject: [PATCH 4/6] update config files --- config/blockchain.js | 61 +++++++++++++++++++++++++++++++++++++++ config/blockchain.json | 49 ------------------------------- config/communication.js | 12 ++++++++ config/communication.json | 12 -------- config/contracts.js | 16 ++++++++++ config/contracts.json | 24 --------------- config/storage.js | 28 ++++++++++++++++++ config/storage.json | 20 ------------- config/webserver.js | 5 ++++ config/webserver.json | 5 ---- 10 files changed, 122 insertions(+), 110 deletions(-) create mode 100644 config/blockchain.js delete mode 100644 config/blockchain.json create mode 100644 config/communication.js delete mode 100644 config/communication.json create mode 100644 config/contracts.js delete mode 100644 config/contracts.json create mode 100644 config/storage.js delete mode 100644 config/storage.json create mode 100644 config/webserver.js delete mode 100644 config/webserver.json diff --git a/config/blockchain.js b/config/blockchain.js new file mode 100644 index 0000000..2c35670 --- /dev/null +++ b/config/blockchain.js @@ -0,0 +1,61 @@ +module.exports = { + development: { + enabled: true, + networkType: 'custom', + genesisBlock: 'config/development/genesis.json', + datadir: '.embark/development/datadir', + mineWhenNeeded: true, + nodiscover: true, + maxpeers: 0, + rpcHost: 'localhost', + rpcPort: 8545, + rpcCorsDomain: 'http://localhost:8000', + accounts: [ + { + nodeAccounts: true, + numAddresses: '1', + password: 'config/development/password' + } + ], + wsOrigins: 'http://localhost:8000' + }, + testnet: { + enabled: true, + networkType: 'testnet', + light: true, + rpcHost: 'localhost', + rpcPort: 8545, + rpcCorsDomain: 'http://localhost:8000', + account: [ + { + nodeAccounts: true, + numAddresses: '1', + password: 'config/testnet/password' + } + ] + }, + livenet: { + enabled: true, + networkType: 'livenet', + light: true, + rpcHost: 'localhost', + rpcPort: 8545, + rpcCorsDomain: 'http://localhost:8000', + account: [ + { + nodeAccounts: true, + numAddresses: '1', + password: 'config/livenet/password' + } + ] + }, + privatenet: { + enabled: true, + networkType: 'custom', + rpcHost: 'localhost', + rpcPort: 8545, + datadir: 'yourdatadir', + networkId: '123', + bootnodes: '' + } +}; diff --git a/config/blockchain.json b/config/blockchain.json deleted file mode 100644 index 26c14fc..0000000 --- a/config/blockchain.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "development": { - "enabled": true, - "networkType": "custom", - "genesisBlock": "config/development/genesis.json", - "datadir": ".embark/development/datadir", - "mineWhenNeeded": true, - "nodiscover": true, - "maxpeers": 0, - "rpcHost": "localhost", - "rpcPort": 8545, - "rpcCorsDomain": "http://localhost:8000", - "account": { - "password": "config/development/password" - }, - "wsOrigins": "http://localhost:8000" - }, - "testnet": { - "enabled": true, - "networkType": "testnet", - "light": true, - "rpcHost": "localhost", - "rpcPort": 8545, - "rpcCorsDomain": "http://localhost:8000", - "account": { - "password": "config/testnet/password" - } - }, - "livenet": { - "enabled": true, - "networkType": "livenet", - "light": true, - "rpcHost": "localhost", - "rpcPort": 8545, - "rpcCorsDomain": "http://localhost:8000", - "account": { - "password": "config/livenet/password" - } - }, - "privatenet": { - "enabled": true, - "networkType": "custom", - "rpcHost": "localhost", - "rpcPort": 8545, - "datadir": "yourdatadir", - "networkId": "123", - "bootnodes": "" - } -} diff --git a/config/communication.js b/config/communication.js new file mode 100644 index 0000000..4c15a02 --- /dev/null +++ b/config/communication.js @@ -0,0 +1,12 @@ +module.exports = { + default: { + enabled: true, + provider: 'whisper', + available_providers: ['whisper', 'orbit'], + connection: { + host: 'localhost', + port: 8546, + type: 'ws' + } + } +}; diff --git a/config/communication.json b/config/communication.json deleted file mode 100644 index 80ec2f8..0000000 --- a/config/communication.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "default": { - "enabled": true, - "provider": "whisper", - "available_providers": ["whisper", "orbit"], - "connection": { - "host": "localhost", - "port": 8546, - "type": "ws" - } - } -} diff --git a/config/contracts.js b/config/contracts.js new file mode 100644 index 0000000..d60cea8 --- /dev/null +++ b/config/contracts.js @@ -0,0 +1,16 @@ +module.exports = { + default: { + deployment: { + host: 'localhost', + port: 8545, + type: 'rpc' + }, + dappConnection: ['$WEB3', 'ws://localhost:8546', 'http://localhost:8545'], + gas: 'auto', + contracts: { + OpenSign: { + address: '0x2841ea9a4a69c8ec9b741ab6ab89155b40ee8bbb' + } + } + } +}; diff --git a/config/contracts.json b/config/contracts.json deleted file mode 100644 index 84c2ecd..0000000 --- a/config/contracts.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "default": { - "versions": { - "web3.js": "1.0.0-beta", - "solc": "0.4.17" - }, - "deployment": { - "host": "localhost", - "port": 8545, - "type": "rpc" - }, - "dappConnection": [ - "$WEB3", - "http://localhost:8545" - ], - "gas": "auto", - "contracts": { - "OpenSign" : { - "address":"0x2841ea9a4a69c8ec9b741ab6ab89155b40ee8bbb" - } - } - } -} - diff --git a/config/storage.js b/config/storage.js new file mode 100644 index 0000000..b2a14c3 --- /dev/null +++ b/config/storage.js @@ -0,0 +1,28 @@ +module.exports = { + default: { + enabled: true, + ipfs_bin: 'ipfs', + provider: 'ipfs', + available_providers: ['ipfs'], + upload: { + host: 'ipfs.infura.io', + protocol: 'https', + port: 5001, + getUrl: 'https://ipfs.infura.io/ipfs/' + }, + dappConnection: [ + { + provider: 'ipfs', + host: 'localhost', + port: 5001, + getUrl: 'http://localhost:8080/ipfs/' + } + ] + }, + development: { + enabled: true, + provider: 'ipfs', + host: 'localhost', + port: 5001 + } +}; diff --git a/config/storage.json b/config/storage.json deleted file mode 100644 index 7c206be..0000000 --- a/config/storage.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "default": { - "enabled": true, - "ipfs_bin": "ipfs", - "provider": "ipfs", - "available_providers": ["ipfs"], - "host": "ipfs.infura.io", - "protocol": "https", - "port": 5001, - "getUrl": "https://ipfs.infura.io/ipfs/" - - }, - "development": { - "enabled": true, - "provider": "ipfs", - "host": "localhost", - "port": 5001, - "getUrl": "https://ipfs.infura.io/ipfs/" - } -} diff --git a/config/webserver.js b/config/webserver.js new file mode 100644 index 0000000..626c04d --- /dev/null +++ b/config/webserver.js @@ -0,0 +1,5 @@ +module.exports = { + enabled: true, + host: 'localhost', + port: 8000 +}; diff --git a/config/webserver.json b/config/webserver.json deleted file mode 100644 index c28a311..0000000 --- a/config/webserver.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enabled": true, - "host": "localhost", - "port": 8000 -} From 1d31929cef90bd73715fc65fb494d238d465bc0e Mon Sep 17 00:00:00 2001 From: nervehammer Date: Fri, 26 Apr 2019 17:35:07 +0530 Subject: [PATCH 5/6] update embark.json --- embark.json | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/embark.json b/embark.json index df2a33f..f595215 100644 --- a/embark.json +++ b/embark.json @@ -1,18 +1,30 @@ { - "contracts": ["app/contracts/**"], + "contracts": ["contracts/**"], "app": { "css/app.css": ["app/css/**"], - "js/app.js": ["embark.js", "app/js/_vendor/jquery.min.js", "app/js/_vendor/bootstrap.min.js", "app/js/**"], + "js/app.js": [ + "app/js/_vendor/jquery.min.js", + "app/js/_vendor/bootstrap.min.js", + "app/js/**", + "artifacts/embarkjs.js" + ], "index.html": "app/index.html", "sign/index.html": "app/sign.html", "favicon-96x96.png": "app/favicon-96x96.png", "favicon-32x32.png": "app/favicon-32x32.png", - "favicon-16x16.png": "app/favicon-16x16.png", + "favicon-16x16.png": "app/favicon-16x16.png", "apple-icon-180x180.png": "app/apple-icon-180x180.png", "android-icon-192x192.png": "app/android-icon-192x192.png" - }, "buildDir": "dist/", "config": "config/", - "plugins": {} + "versions": { + "web3": "1.0.0-beta", + "solc": "0.4.17", + "ipfs-api": "17.2.4" + }, + "generationDir": "artifacts", + "plugins": { + "embarkjs-connector-web3": {} + } } From a7af6cf7c0a8d434170462d30073fa7a292dd936 Mon Sep 17 00:00:00 2001 From: nervehammer Date: Fri, 26 Apr 2019 17:42:44 +0530 Subject: [PATCH 6/6] Add embarkjs-connector-web3 plugin --- package-lock.json | 13 +++++++++++++ package.json | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..afb83a2 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "sign_it", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "embarkjs-connector-web3": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/embarkjs-connector-web3/-/embarkjs-connector-web3-4.0.0.tgz", + "integrity": "sha512-mqLDRGawEfyqXgoSb2NgTwhlbAHwDrk7eyHrtEvywWgKfEPer+S+5IN+KGXi85d7QxcNKJSZ+BHve8wvWX0FfQ==" + } + } +} diff --git a/package.json b/package.json index 0d9fbf2..70c4b58 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,16 @@ "test": "embark test" }, "author": "", + "contributors": [ + { + "name": "Suraj Rawat", + "email": "suraj.raw120@gmail.com", + "url": "https://github.com/nervehammer" + } + ], "license": "ISC", "homepage": "", - "devDependencies": { + "dependencies": { + "embarkjs-connector-web3": "^4.0.0" } }