diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000000..1320b9a327 --- /dev/null +++ b/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["@babel/preset-env"] +} diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000..0c921ed1c3 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,193 @@ +# Javascript Node CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2 +jobs: + remix-ide-chrome: + docker: + # specify the version you desire here + - image: circleci/node:9.11.2-browsers + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + resource_class: xlarge + # - image: circleci/mongo:3.4.4 + environment: + - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" + - COMMIT_AUTHOR: "Circle CI" + - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" + working_directory: ~/remix-ide + + parallelism: 20 + steps: + - checkout + - run: npm install + - run: npm run lint && npm run test && npm run make-mock-compiler + - run: + name: Download Selenium + command: ./node_modules/.bin/selenium-standalone install --config=../remix-ide/seleniumConfig.js + - run: + name: Start Selenium + command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js + background: true + - run: ./ci/browser_tests_chrome.sh + - store_test_results: + path: ./reports/tests + - store_artifacts: + path: ./reports/screenshots + + remix-ide-firefox: + docker: + # specify the version you desire here + - image: circleci/node:9.11.2-browsers + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + resource_class: xlarge + # - image: circleci/mongo:3.4.4 + environment: + - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" + - COMMIT_AUTHOR: "Circle CI" + - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" + working_directory: ~/remix-ide + + parallelism: 20 + steps: + - checkout + - run: npm install + - run: npm run lint && npm run test && npm run make-mock-compiler + - run: + name: Download Selenium + command: ./node_modules/.bin/selenium-standalone install --config=../remix-ide/seleniumConfig.js + - run: + name: Start Selenium + command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js + background: true + - run: + name: Download Latest Firefox + command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb + - run: + name: Install Firefox + command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb + - run: ./ci/browser_tests_firefox.sh + - store_test_results: + path: ./reports/tests + - store_artifacts: + path: ./reports/screenshots + + remix-ide-run-deploy: + docker: + # specify the version you desire here + - image: circleci/node:9.11.2-browsers + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + resource_class: xlarge + # - image: circleci/mongo:3.4.4 + environment: + - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" + - COMMIT_AUTHOR: "Circle CI" + - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" + working_directory: ~/remix-ide + + steps: + - checkout + - run: npm install + - run: npm run lint && npm run test && npm run make-mock-compiler + - run: + name: Download Selenium + command: ./node_modules/.bin/selenium-standalone install --config=../remix-ide/seleniumConfig.js + - run: + name: Start Selenium + command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js + background: true + - run: ./ci/browser_tests_run_deploy.sh + - store_artifacts: + path: ./reports/screenshots + + + deploy-remix-live: + docker: + # specify the version you desire here + - image: circleci/node:9.11.2-browsers + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + resource_class: xlarge + # - image: circleci/mongo:3.4.4 + environment: + - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" + - COMMIT_AUTHOR: "Circle CI" + - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" + working_directory: ~/remix-ide + + steps: + - checkout + - run: npm install + - run: npm run lint && npm run test && npm run make-mock-compiler + - run: + name: Deploy + command: | + if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then + ./ci/deploy_from_travis_remix-live.sh; + fi + - store_artifacts: + path: ./reports/screenshots + + deploy-remix-alpha: + docker: + # specify the version you desire here + - image: circleci/node:9.11.2-browsers + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + resource_class: xlarge + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/mongo:3.4.4 + environment: + - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" + - COMMIT_AUTHOR: "Circle CI" + - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" + working_directory: ~/remix-ide + + steps: + - checkout + - run: npm install + - run: npm run lint && npm run test && npm run make-mock-compiler + - run: + name: Deploy + command: | + if [ "${CIRCLE_BRANCH}" == "master" ]; then + ./ci/deploy_from_travis_remix-alpha.sh; + fi + - store_artifacts: + path: ./reports/screenshots + +workflows: + version: 2 + build_all: + jobs: + - remix-ide-chrome + - remix-ide-firefox + - remix-ide-run-deploy + - deploy-remix-live: + requires: + - remix-ide-chrome + - remix-ide-firefox + - remix-ide-run-deploy + filters: + branches: + only: remix_live + - deploy-remix-alpha: + requires: + - remix-ide-chrome + - remix-ide-firefox + - remix-ide-run-deploy + filters: + branches: + only: master \ No newline at end of file diff --git a/.env b/.env new file mode 100644 index 0000000000..b08c745d22 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +gist_token = +account_passphrase = +account_password = \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..b324da238e --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +.idea +.vscode +build +node_modules +docs/_build +reports +soljson.js +soljson.js.* +npm-debug.log* +remix +.DS_Store +contracts +TODO +.tern-port diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000000..00282f7e0c --- /dev/null +++ b/.npmignore @@ -0,0 +1,7 @@ +.vscode +node_modules +reports +npm-debug.log* +package-lock.json +remix +.DS_Store diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..cc5875fabb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v10.15.3 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..ef1c5da85e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,37 @@ +language: node_js +node_js: + - "9" +addons: + chrome: stable +language: java +branches: + only: + - master + - remix_live +script: + - npm install + - npm run lint && npm run test && npm run make-mock-compiler && npm run build + - wget http://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar + - wget http://chromedriver.storage.googleapis.com/2.30/chromedriver_linux64.zip + - unzip chromedriver_linux64.zip + - java -Dwebdriver.chrome.driver="chromedriver" -jar selenium-server-standalone-3.5.3.jar & + - ./ci/browser_tests.sh +deploy: + - provider: script + script: ci/deploy_from_travis_remix-alpha.sh + skip_cleanup: true + on: + branch: master + - provider: script + script: ci/deploy_from_travis_remix-live.sh + skip_cleanup: true + on: + branch: remix_live +env: + global: + - ENCRYPTION_LABEL2="85f76a180658" + - ENCRYPTION_LABEL3="3737d4fd78e9" + - COMMIT_AUTHOR_EMAIL="chris@ethereum.org" + - COMMIT_AUTHOR="Travis CI" + - FILES_TO_PACKAGE="assets background.js build icon.png index.html manifest.json README.md soljson.js" +cache: false diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000000..f4f62e644d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014, 2015, 2019 the individual 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000000..2eaf34b977 --- /dev/null +++ b/README.md @@ -0,0 +1,137 @@ +[![CircleCI](https://circleci.com/gh/ethereum/remix-ide.svg?style=svg)](https://circleci.com/gh/ethereum/remix-ide) + +# Remix + +Remix is a browser-based compiler and IDE that enables users to build **Ethereum contracts with Solidity language** and to debug transactions. + +To try it out, visit [https://remix.ethereum.org](https://remix.ethereum.org). + +https://github.com/ethereum/remix-ide/releases also gives others ways to use Remix locally. Please check it out. + +Remix consists of many modules and in this repository you will find the Remix IDE (aka. Browser-Solidity). + +![Remix screenshot](https://github.com/ethereum/remix-ide/raw/master/remix_screenshot.png) + +## Offline Usage + +The `gh-pages` branch has always the latest stable build of Remix. It also contains a ZIP file with the entire build. Download it to use offline. + +Note: It contains the latest release of Solidity available at the time of the packaging. No other compiler versions are supported. + + +## INSTALLATION: + +Install **npm** and **node.js** (see https://docs.npmjs.com/getting-started/installing-node), then do: + +Remix-ide has been published as an npm module: + +```bash +npm install remix-ide -g +remix-ide +``` +Or if you want to clone the github repository (`wget` need to be installed first) : + +```bash +git clone https://github.com/ethereum/remix-ide.git +git clone https://github.com/ethereum/remix.git # only if you plan to link remix and remix-ide repositories and develop on it. + +cd remix # only if you plan to link remix and remix-ide repositories and develop on it. +npm install # only if you plan to link remix and remix-ide repositories and develop on it. +npm run bootstrap # only if you plan to link remix and remix-ide repositories and develop on it. + +cd remix-ide +npm install +npm run setupremix # only if you plan to link remix and remix-ide repositories and develop on it. +npm start +``` + +## DEVELOPING: + +Run `npm start` and open `http://127.0.0.1:8080` in your browser. + +Then open your `text editor` and start developing. +The browser will automatically refresh when files are saved. + +Most of the the time working with other modules (like debugger etc.) hosted in the [Remix repository](https://github.com/ethereum/remix) is not needed. + +### Troubleshooting building + +Some things to consider if you have trouble building the package: + +- Make sure that you have the correct version of `node`, `npm` and `nvm`. You can find the version that is tested on Travis CI by looking at the log in the [build results](https://travis-ci.org/ethereum/remix-ide). + +Run: + +```bash +node --version +npm --version +nvm --version +``` + +- In Debian based OS such as Ubuntu 14.04LTS you may need to run `apt-get install build-essential`. After installing `build-essential` run `npm rebuild`. + +## Unit Testing + +Register new unit test files in `test/index.js`. +The tests are written using [tape](https://www.npmjs.com/package/tape). + +Run the unit tests via: `npm test` + +For local headless browser tests run `npm run test-browser` +(requires Selenium to be installed - can be done with `npm run selenium-install`) + +Running unit tests via `npm test` requires at least node v7.0.0 + +## Browser Testing + +To run the Selenium tests via Nightwatch: + + - Build Remix IDE and serve it: `npm run build && npm run serve` # starts web server at localhost:8080 + - Make sure Selenium is installed `npm run selenium-install` # don't need to repeat + - Run a selenium server `npm run selenium` + - Run all the tests `npm run nightwatch_local_firefox` or `npm run nightwatch_local_chrome` + - Or run a specific test case: + + - npm run nightwatch_local_ballot + + - npm run nightwatch_local_libraryDeployment + + - npm run nightwatch_local_solidityImport + + - npm run nightwatch_local_recorder + + - npm run nightwatch_local_transactionExecution + + - npm run nightwatch_local_staticAnalysis + + - npm run nightwatch_local_signingMessage + + - npm run nightwatch_local_console + + - npm run nightwatch_local_remixd # remixd needs to be run +**NOTE:** + +- **the `ballot` tests suite** requires to run `ganache-cli` locally. + +- **the `remixd` tests suite** requires to run `remixd` locally. + +- **the `gist` tests suite** requires specifying a github access token in **.env file**. +``` + gist_token = +``` +**note that this token should have permission to create a gist.** + + +## Usage as a Chrome Extension + +If you would like to use this as a Chrome extension, you must either build it first or pull from the `gh-pages` branch, both described above. +After that, follow these steps: + +- Browse to `chrome://extensions/` +- Make sure 'Developer mode' has been checked +- Click 'Load unpacked extension...' to pop up a file-selection dialog +- Select your `remix-ide` folder + +## Documentation + +To see details about how to use Remix for developing and/or debugging Solidity contracts, please see [our documentation page](https://remix-ide.readthedocs.io/en/latest/) diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000000..c4192631f2 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/assets/css/font-awesome.min.css b/assets/css/font-awesome.min.css new file mode 100644 index 0000000000..540440ce89 --- /dev/null +++ b/assets/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/assets/css/pygment_trac.css b/assets/css/pygment_trac.css new file mode 100644 index 0000000000..c6a6452d24 --- /dev/null +++ b/assets/css/pygment_trac.css @@ -0,0 +1,69 @@ +.highlight { background: #ffffff; } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .o { font-weight: bold } /* Operator */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #d14 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sb { color: #d14 } /* Literal.String.Backtick */ +.highlight .sc { color: #d14 } /* Literal.String.Char */ +.highlight .sd { color: #d14 } /* Literal.String.Doc */ +.highlight .s2 { color: #d14 } /* Literal.String.Double */ +.highlight .se { color: #d14 } /* Literal.String.Escape */ +.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ +.highlight .si { color: #d14 } /* Literal.String.Interpol */ +.highlight .sx { color: #d14 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #d14 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ + +.type-csharp .highlight .k { color: #0000FF } +.type-csharp .highlight .kt { color: #0000FF } +.type-csharp .highlight .nf { color: #000000; font-weight: normal } +.type-csharp .highlight .nc { color: #2B91AF } +.type-csharp .highlight .nn { color: #000000 } +.type-csharp .highlight .s { color: #A31515 } +.type-csharp .highlight .sc { color: #A31515 } diff --git a/assets/fonts/FontAwesome.otf b/assets/fonts/FontAwesome.otf new file mode 100644 index 0000000000..401ec0f36e Binary files /dev/null and b/assets/fonts/FontAwesome.otf differ diff --git a/assets/fonts/fontawesome-webfont.eot b/assets/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000000..e9f60ca953 Binary files /dev/null and b/assets/fonts/fontawesome-webfont.eot differ diff --git a/assets/fonts/fontawesome-webfont.svg b/assets/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000000..855c845e53 --- /dev/null +++ b/assets/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/fontawesome-webfont.ttf b/assets/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000000..35acda2fa1 Binary files /dev/null and b/assets/fonts/fontawesome-webfont.ttf differ diff --git a/assets/fonts/fontawesome-webfont.woff b/assets/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000000..400014a4b0 Binary files /dev/null and b/assets/fonts/fontawesome-webfont.woff differ diff --git a/assets/fonts/fontawesome-webfont.woff2 b/assets/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000000..4d13fc6040 Binary files /dev/null and b/assets/fonts/fontawesome-webfont.woff2 differ diff --git a/assets/img/debuggerLogo.webp b/assets/img/debuggerLogo.webp new file mode 100644 index 0000000000..4773d498e9 Binary files /dev/null and b/assets/img/debuggerLogo.webp differ diff --git a/assets/img/gasStation_50.png b/assets/img/gasStation_50.png new file mode 100644 index 0000000000..6758609385 Binary files /dev/null and b/assets/img/gasStation_50.png differ diff --git a/assets/img/hexagon-remix-greengrey-texture.png b/assets/img/hexagon-remix-greengrey-texture.png new file mode 100644 index 0000000000..49717083ac Binary files /dev/null and b/assets/img/hexagon-remix-greengrey-texture.png differ diff --git a/assets/img/homeStickers.png b/assets/img/homeStickers.png new file mode 100644 index 0000000000..c481cec517 Binary files /dev/null and b/assets/img/homeStickers.png differ diff --git a/assets/img/moreLogo.webp b/assets/img/moreLogo.webp new file mode 100644 index 0000000000..a534e103a7 Binary files /dev/null and b/assets/img/moreLogo.webp differ diff --git a/assets/img/mythxLogo.webp b/assets/img/mythxLogo.webp new file mode 100644 index 0000000000..257f72dc59 Binary files /dev/null and b/assets/img/mythxLogo.webp differ diff --git a/assets/img/pipelineLogo.webp b/assets/img/pipelineLogo.webp new file mode 100644 index 0000000000..20114c22d2 Binary files /dev/null and b/assets/img/pipelineLogo.webp differ diff --git a/assets/img/sleepingRemiCroped.webp b/assets/img/sleepingRemiCroped.webp new file mode 100644 index 0000000000..4e01719ad2 Binary files /dev/null and b/assets/img/sleepingRemiCroped.webp differ diff --git a/assets/img/solidityLogo.webp b/assets/img/solidityLogo.webp new file mode 100644 index 0000000000..9a9821e6b5 Binary files /dev/null and b/assets/img/solidityLogo.webp differ diff --git a/assets/img/sourceVerifyLogo.webp b/assets/img/sourceVerifyLogo.webp new file mode 100644 index 0000000000..0819bfd3f9 Binary files /dev/null and b/assets/img/sourceVerifyLogo.webp differ diff --git a/assets/img/vyperLogo.webp b/assets/img/vyperLogo.webp new file mode 100644 index 0000000000..3f9f4c1afd Binary files /dev/null and b/assets/img/vyperLogo.webp differ diff --git a/assets/img/workshopLogo.webp b/assets/img/workshopLogo.webp new file mode 100644 index 0000000000..6717a42740 Binary files /dev/null and b/assets/img/workshopLogo.webp differ diff --git a/assets/js/0.7.7/app.js b/assets/js/0.7.7/app.js new file mode 100644 index 0000000000..e384e69029 --- /dev/null +++ b/assets/js/0.7.7/app.js @@ -0,0 +1,271121 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i|<<|>>|<<=|>>=|&&|\|\||[!&|+\-*\/%~^<>=]=?/ + }, { + token : "punctuation.operator", + regex : /[?:;]/ + }, { + token : "punctuation.operator", // keep "." and "," separate for easier cloning and modifying into "function_arguments" + regex : /[.,]/, + inheritingStateRuleId : "punctuation" + }, { + token : "paren.lparen", + regex : /[\[{]/ + }, { + token : "paren.lparen", // keep "(" separate for easier cloning and modifying into "function_arguments" + regex : /[(]/, + inheritingStateRuleId : "lparen" + }, { + token : "paren.rparen", + regex : /[\]}]/ + }, { + token : "paren.rparen", // keep ")" separate for easier cloning and modifying into "function_arguments" + regex : /[)]/, + inheritingStateRuleId : "rparen" + } + ], + "comment" : [ + commentWipMarkerRule("block"), + { + token : "comment.block", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment.block", + caseInsensitive : true + } + ], + "line_comment" : [ + commentWipMarkerRule("line"), + { + token : "comment.line.double-slash", + regex : "$|^", + next : "pop" + }, { + defaultToken : "comment.line.double-slash", + caseInsensitive : true + } + ], + "doc_comment" : [ + commentWipMarkerRule("block"), + natSpecRule("block"), + { + token : "comment.block.doc.documentation", // closing comment + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment.block.doc.documentation", + caseInsensitive : true + } + ], + "doc_line_comment" : [ + commentWipMarkerRule("line"), + natSpecRule("line"), + { + token : "comment.line.triple-slash.double-slash.doc.documentation", + regex : "$|^", + next : "pop" + }, { + defaultToken : "comment.line.triple-slash.double-slash.doc.documentation", + caseInsensitive : true + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string.quoted.double", // Multi-line string by ending line with back-slash, i.e. escaping \n. + regex : "\\\\$", + next : "qqstring" + }, { + token : "string.quoted.double", + regex : '"|$', + next : "pop" + }, { + defaultToken : "string.quoted.double" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string.quoted.single", // Multi-line string by ending line with back-slash, i.e. escaping \n. + regex : "\\\\$", + next : "qstring" + }, { + token : "string.quoted.single", + regex : "'|$", + next : "pop" + }, { + defaultToken : "string.quoted.single" + } + ] + }; + var functionArgumentsRules = deepCopy(this.$rules["start"]); + functionArgumentsRules.forEach(function(rule, ruleIndex) { + if (rule.inheritingStateRuleId) { + switch (rule.inheritingStateRuleId) { + case "keywordMapper": + rule.token = functionArgumentsKeywordMapper; + break; + case "punctuation": + rule.onMatch = function onFunctionArgumentsPunctuationMatch(value, currentState, stack) { + hasSeenFirstFunctionArgumentKeyword = false; + return rule.token; + }; + break; + case "lparen": + rule.next = pushFunctionArgumentsState; + break; + case "rparen": + rule.next = "pop"; + break; + case "fixedNumberType": + rule.onMatch = function onFunctionArgumentsFixedNumberTypeMatch(value, currentState, stack) { + hasSeenFirstFunctionArgumentKeyword = true; + return rule.token; + }; + break; + } + delete rule.inheritingStateRuleId; + delete this.$rules["start"][ruleIndex].inheritingStateRuleId; // TODO Keep id if there will be more "child" states. + functionArgumentsRules[ruleIndex] = rule; + } + }, this); + this.$rules["function_arguments"] = functionArgumentsRules; + + this.normalizeRules(); +}; + +oop.inherits(SolidityHighlightRules, TextHighlightRules); + +exports.SolidityHighlightRules = SolidityHighlightRules; +}); + +ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + +var context; +var contextCache = {}; +var initContext = function(editor) { + var id = -1; + if (editor.multiSelect) { + id = editor.selection.index; + if (contextCache.rangeCount != editor.multiSelect.rangeCount) + contextCache = {rangeCount: editor.multiSelect.rangeCount}; + } + if (contextCache[id]) + return context = contextCache[id]; + context = contextCache[id] = { + autoInsertedBrackets: 0, + autoInsertedRow: -1, + autoInsertedLineEnd: "", + maybeInsertedBrackets: 0, + maybeInsertedRow: -1, + maybeInsertedLineStart: "", + maybeInsertedLineEnd: "" + }; +}; + +var CstyleBehaviour = function() { + this.add("braces", "insertion", function(state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + initContext(editor); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + initContext(editor); + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", context.maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === '}') { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + var next_indent = this.$getIndent(session.getLine(openBracePos.row)); + } else if (closing) { + var next_indent = this.$getIndent(line); + } else { + CstyleBehaviour.clearMaybeInsertedClosing(); + return; + } + var indent = next_indent + session.getTabString(); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } else { + CstyleBehaviour.clearMaybeInsertedClosing(); + } + }); + + this.add("braces", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + context.maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function(state, action, editor, session, text) { + if (text == '(') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function(state, action, editor, session, text) { + if (text == '[') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { + if (text == '"' || text == "'") { + initContext(editor); + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + + +CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); +}; + +CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; +}; + +CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) + context.autoInsertedBrackets = 0; + context.autoInsertedRow = cursor.row; + context.autoInsertedLineEnd = bracket + line.substr(cursor.column); + context.autoInsertedBrackets++; +}; + +CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = cursor.row; + context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + context.maybeInsertedLineEnd = line.substr(cursor.column); + context.maybeInsertedBrackets++; +}; + +CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return context.autoInsertedBrackets > 0 && + cursor.row === context.autoInsertedRow && + bracket === context.autoInsertedLineEnd[0] && + line.substr(cursor.column) === context.autoInsertedLineEnd; +}; + +CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return context.maybeInsertedBrackets > 0 && + cursor.row === context.maybeInsertedRow && + line.substr(cursor.column) === context.maybeInsertedLineEnd && + line.substr(0, cursor.column) == context.maybeInsertedLineStart; +}; + +CstyleBehaviour.popAutoInsertedClosing = function() { + context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); + context.autoInsertedBrackets--; +}; + +CstyleBehaviour.clearMaybeInsertedClosing = function() { + if (context) { + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = -1; + } +}; + + + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define("ace/mode/solidity",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/solidity_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var SolidityHighlightRules = acequire("./solidity_highlight_rules").SolidityHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = SolidityHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc_comment") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.$id = "ace/mode/solidity"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +},{}],7:[function(require,module,exports){ +"use strict"; + +(function(root) { + + function checkInt(value) { + return (parseInt(value) === value); + } + + function checkInts(arrayish) { + if (!checkInt(arrayish.length)) { return false; } + + for (var i = 0; i < arrayish.length; i++) { + if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) { + return false; + } + } + + return true; + } + + function coerceArray(arg, copy) { + + // ArrayBuffer view + if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') { + + if (copy) { + if (arg.slice) { + arg = arg.slice(); + } else { + arg = Array.prototype.slice.call(arg); + } + } + + return arg; + } + + // It's an array; check it is a valid representation of a byte + if (Array.isArray(arg)) { + if (!checkInts(arg)) { + throw new Error('Array contains invalid value: ' + arg); + } + + return new Uint8Array(arg); + } + + // Something else, but behaves like an array (maybe a Buffer? Arguments?) + if (checkInt(arg.length) && checkInts(arg)) { + return new Uint8Array(arg); + } + + throw new Error('unsupported array-like object'); + } + + function createArray(length) { + return new Uint8Array(length); + } + + function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) { + if (sourceStart != null || sourceEnd != null) { + if (sourceArray.slice) { + sourceArray = sourceArray.slice(sourceStart, sourceEnd); + } else { + sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd); + } + } + targetArray.set(sourceArray, targetStart); + } + + + + var convertUtf8 = (function() { + function toBytes(text) { + var result = [], i = 0; + text = encodeURI(text); + while (i < text.length) { + var c = text.charCodeAt(i++); + + // if it is a % sign, encode the following 2 bytes as a hex value + if (c === 37) { + result.push(parseInt(text.substr(i, 2), 16)) + i += 2; + + // otherwise, just the actual byte + } else { + result.push(c) + } + } + + return coerceArray(result); + } + + function fromBytes(bytes) { + var result = [], i = 0; + + while (i < bytes.length) { + var c = bytes[i]; + + if (c < 128) { + result.push(String.fromCharCode(c)); + i++; + } else if (c > 191 && c < 224) { + result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f))); + i += 2; + } else { + result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f))); + i += 3; + } + } + + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + var convertHex = (function() { + function toBytes(text) { + var result = []; + for (var i = 0; i < text.length; i += 2) { + result.push(parseInt(text.substr(i, 2), 16)); + } + + return result; + } + + // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html + var Hex = '0123456789abcdef'; + + function fromBytes(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i++) { + var v = bytes[i]; + result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]); + } + return result.join(''); + } + + return { + toBytes: toBytes, + fromBytes: fromBytes, + } + })(); + + + // Number of rounds by keysize + var numberOfRounds = {16: 10, 24: 12, 32: 14} + + // Round constant words + var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91]; + + // S-box and Inverse S-box (S is for Substitution) + var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16]; + var Si =[0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]; + + // Transformations for encryption + var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a]; + var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616]; + var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16]; + var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c]; + + // Transformations for decryption + var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742]; + var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857]; + var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8]; + var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0]; + + // Transformations for decryption key expansion + var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]; + var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697]; + var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46]; + var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d]; + + function convertToInt32(bytes) { + var result = []; + for (var i = 0; i < bytes.length; i += 4) { + result.push( + (bytes[i ] << 24) | + (bytes[i + 1] << 16) | + (bytes[i + 2] << 8) | + bytes[i + 3] + ); + } + return result; + } + + var AES = function(key) { + if (!(this instanceof AES)) { + throw Error('AES must be instanitated with `new`'); + } + + Object.defineProperty(this, 'key', { + value: coerceArray(key, true) + }); + + this._prepare(); + } + + + AES.prototype._prepare = function() { + + var rounds = numberOfRounds[this.key.length]; + if (rounds == null) { + throw new Error('invalid key size (must be 16, 24 or 32 bytes)'); + } + + // encryption round keys + this._Ke = []; + + // decryption round keys + this._Kd = []; + + for (var i = 0; i <= rounds; i++) { + this._Ke.push([0, 0, 0, 0]); + this._Kd.push([0, 0, 0, 0]); + } + + var roundKeyCount = (rounds + 1) * 4; + var KC = this.key.length / 4; + + // convert the key into ints + var tk = convertToInt32(this.key); + + // copy values into round key arrays + var index; + for (var i = 0; i < KC; i++) { + index = i >> 2; + this._Ke[index][i % 4] = tk[i]; + this._Kd[rounds - index][i % 4] = tk[i]; + } + + // key expansion (fips-197 section 5.2) + var rconpointer = 0; + var t = KC, tt; + while (t < roundKeyCount) { + tt = tk[KC - 1]; + tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^ + (S[(tt >> 8) & 0xFF] << 16) ^ + (S[ tt & 0xFF] << 8) ^ + S[(tt >> 24) & 0xFF] ^ + (rcon[rconpointer] << 24)); + rconpointer += 1; + + // key expansion (for non-256 bit) + if (KC != 8) { + for (var i = 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + + // key expansion for 256-bit keys is "slightly different" (fips-197) + } else { + for (var i = 1; i < (KC / 2); i++) { + tk[i] ^= tk[i - 1]; + } + tt = tk[(KC / 2) - 1]; + + tk[KC / 2] ^= (S[ tt & 0xFF] ^ + (S[(tt >> 8) & 0xFF] << 8) ^ + (S[(tt >> 16) & 0xFF] << 16) ^ + (S[(tt >> 24) & 0xFF] << 24)); + + for (var i = (KC / 2) + 1; i < KC; i++) { + tk[i] ^= tk[i - 1]; + } + } + + // copy values into round key arrays + var i = 0, r, c; + while (i < KC && t < roundKeyCount) { + r = t >> 2; + c = t % 4; + this._Ke[r][c] = tk[i]; + this._Kd[rounds - r][c] = tk[i++]; + t++; + } + } + + // inverse-cipher-ify the decryption round key (fips-197 section 5.3) + for (var r = 1; r < rounds; r++) { + for (var c = 0; c < 4; c++) { + tt = this._Kd[r][c]; + this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^ + U2[(tt >> 16) & 0xFF] ^ + U3[(tt >> 8) & 0xFF] ^ + U4[ tt & 0xFF]); + } + } + } + + AES.prototype.encrypt = function(plaintext) { + if (plaintext.length != 16) { + throw new Error('invalid plaintext size (must be 16 bytes)'); + } + + var rounds = this._Ke.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(plaintext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Ke[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T1[(t[ i ] >> 24) & 0xff] ^ + T2[(t[(i + 1) % 4] >> 16) & 0xff] ^ + T3[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T4[ t[(i + 3) % 4] & 0xff] ^ + this._Ke[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Ke[rounds][i]; + result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + } + + AES.prototype.decrypt = function(ciphertext) { + if (ciphertext.length != 16) { + throw new Error('invalid ciphertext size (must be 16 bytes)'); + } + + var rounds = this._Kd.length - 1; + var a = [0, 0, 0, 0]; + + // convert plaintext to (ints ^ key) + var t = convertToInt32(ciphertext); + for (var i = 0; i < 4; i++) { + t[i] ^= this._Kd[0][i]; + } + + // apply round transforms + for (var r = 1; r < rounds; r++) { + for (var i = 0; i < 4; i++) { + a[i] = (T5[(t[ i ] >> 24) & 0xff] ^ + T6[(t[(i + 3) % 4] >> 16) & 0xff] ^ + T7[(t[(i + 2) % 4] >> 8) & 0xff] ^ + T8[ t[(i + 1) % 4] & 0xff] ^ + this._Kd[r][i]); + } + t = a.slice(); + } + + // the last round is special + var result = createArray(16), tt; + for (var i = 0; i < 4; i++) { + tt = this._Kd[rounds][i]; + result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff; + result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff; + result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff; + result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff; + } + + return result; + } + + + /** + * Mode Of Operation - Electonic Codebook (ECB) + */ + var ModeOfOperationECB = function(key) { + if (!(this instanceof ModeOfOperationECB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Electronic Code Block"; + this.name = "ecb"; + + this._aes = new AES(key); + } + + ModeOfOperationECB.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + block = this._aes.encrypt(block); + copyArray(block, ciphertext, i); + } + + return ciphertext; + } + + ModeOfOperationECB.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + copyArray(block, plaintext, i); + } + + return plaintext; + } + + + /** + * Mode Of Operation - Cipher Block Chaining (CBC) + */ + var ModeOfOperationCBC = function(key, iv) { + if (!(this instanceof ModeOfOperationCBC)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Block Chaining"; + this.name = "cbc"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastCipherblock = coerceArray(iv, true); + + this._aes = new AES(key); + } + + ModeOfOperationCBC.prototype.encrypt = function(plaintext) { + plaintext = coerceArray(plaintext); + + if ((plaintext.length % 16) !== 0) { + throw new Error('invalid plaintext size (must be multiple of 16 bytes)'); + } + + var ciphertext = createArray(plaintext.length); + var block = createArray(16); + + for (var i = 0; i < plaintext.length; i += 16) { + copyArray(plaintext, block, 0, i, i + 16); + + for (var j = 0; j < 16; j++) { + block[j] ^= this._lastCipherblock[j]; + } + + this._lastCipherblock = this._aes.encrypt(block); + copyArray(this._lastCipherblock, ciphertext, i); + } + + return ciphertext; + } + + ModeOfOperationCBC.prototype.decrypt = function(ciphertext) { + ciphertext = coerceArray(ciphertext); + + if ((ciphertext.length % 16) !== 0) { + throw new Error('invalid ciphertext size (must be multiple of 16 bytes)'); + } + + var plaintext = createArray(ciphertext.length); + var block = createArray(16); + + for (var i = 0; i < ciphertext.length; i += 16) { + copyArray(ciphertext, block, 0, i, i + 16); + block = this._aes.decrypt(block); + + for (var j = 0; j < 16; j++) { + plaintext[i + j] = block[j] ^ this._lastCipherblock[j]; + } + + copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16); + } + + return plaintext; + } + + + /** + * Mode Of Operation - Cipher Feedback (CFB) + */ + var ModeOfOperationCFB = function(key, iv, segmentSize) { + if (!(this instanceof ModeOfOperationCFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Cipher Feedback"; + this.name = "cfb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 size)'); + } + + if (!segmentSize) { segmentSize = 1; } + + this.segmentSize = segmentSize; + + this._shiftRegister = coerceArray(iv, true); + + this._aes = new AES(key); + } + + ModeOfOperationCFB.prototype.encrypt = function(plaintext) { + if ((plaintext.length % this.segmentSize) != 0) { + throw new Error('invalid plaintext size (must be segmentSize bytes)'); + } + + var encrypted = coerceArray(plaintext, true); + + var xorSegment; + for (var i = 0; i < encrypted.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + for (var j = 0; j < this.segmentSize; j++) { + encrypted[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return encrypted; + } + + ModeOfOperationCFB.prototype.decrypt = function(ciphertext) { + if ((ciphertext.length % this.segmentSize) != 0) { + throw new Error('invalid ciphertext size (must be segmentSize bytes)'); + } + + var plaintext = coerceArray(ciphertext, true); + + var xorSegment; + for (var i = 0; i < plaintext.length; i += this.segmentSize) { + xorSegment = this._aes.encrypt(this._shiftRegister); + + for (var j = 0; j < this.segmentSize; j++) { + plaintext[i + j] ^= xorSegment[j]; + } + + // Shift the register + copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); + copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); + } + + return plaintext; + } + + /** + * Mode Of Operation - Output Feedback (OFB) + */ + var ModeOfOperationOFB = function(key, iv) { + if (!(this instanceof ModeOfOperationOFB)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Output Feedback"; + this.name = "ofb"; + + if (!iv) { + iv = createArray(16); + + } else if (iv.length != 16) { + throw new Error('invalid initialation vector size (must be 16 bytes)'); + } + + this._lastPrecipher = coerceArray(iv, true); + this._lastPrecipherIndex = 16; + + this._aes = new AES(key); + } + + ModeOfOperationOFB.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._lastPrecipherIndex === 16) { + this._lastPrecipher = this._aes.encrypt(this._lastPrecipher); + this._lastPrecipherIndex = 0; + } + encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++]; + } + + return encrypted; + } + + // Decryption is symetric + ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt; + + + /** + * Counter object for CTR common mode of operation + */ + var Counter = function(initialValue) { + if (!(this instanceof Counter)) { + throw Error('Counter must be instanitated with `new`'); + } + + // We allow 0, but anything false-ish uses the default 1 + if (initialValue !== 0 && !initialValue) { initialValue = 1; } + + if (typeof(initialValue) === 'number') { + this._counter = createArray(16); + this.setValue(initialValue); + + } else { + this.setBytes(initialValue); + } + } + + Counter.prototype.setValue = function(value) { + if (typeof(value) !== 'number' || parseInt(value) != value) { + throw new Error('invalid counter value (must be an integer)'); + } + + for (var index = 15; index >= 0; --index) { + this._counter[index] = value % 256; + value = value >> 8; + } + } + + Counter.prototype.setBytes = function(bytes) { + bytes = coerceArray(bytes, true); + + if (bytes.length != 16) { + throw new Error('invalid counter bytes size (must be 16 bytes)'); + } + + this._counter = bytes; + }; + + Counter.prototype.increment = function() { + for (var i = 15; i >= 0; i--) { + if (this._counter[i] === 255) { + this._counter[i] = 0; + } else { + this._counter[i]++; + break; + } + } + } + + + /** + * Mode Of Operation - Counter (CTR) + */ + var ModeOfOperationCTR = function(key, counter) { + if (!(this instanceof ModeOfOperationCTR)) { + throw Error('AES must be instanitated with `new`'); + } + + this.description = "Counter"; + this.name = "ctr"; + + if (!(counter instanceof Counter)) { + counter = new Counter(counter) + } + + this._counter = counter; + + this._remainingCounter = null; + this._remainingCounterIndex = 16; + + this._aes = new AES(key); + } + + ModeOfOperationCTR.prototype.encrypt = function(plaintext) { + var encrypted = coerceArray(plaintext, true); + + for (var i = 0; i < encrypted.length; i++) { + if (this._remainingCounterIndex === 16) { + this._remainingCounter = this._aes.encrypt(this._counter._counter); + this._remainingCounterIndex = 0; + this._counter.increment(); + } + encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++]; + } + + return encrypted; + } + + // Decryption is symetric + ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt; + + + /////////////////////// + // Padding + + // See:https://tools.ietf.org/html/rfc2315 + function pkcs7pad(data) { + data = coerceArray(data, true); + var padder = 16 - (data.length % 16); + var result = createArray(data.length + padder); + copyArray(data, result); + for (var i = data.length; i < result.length; i++) { + result[i] = padder; + } + return result; + } + + function pkcs7strip(data) { + data = coerceArray(data, true); + if (data.length < 16) { throw new Error('PKCS#7 invalid length'); } + + var padder = data[data.length - 1]; + if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); } + + var length = data.length - padder; + for (var i = 0; i < padder; i++) { + if (data[length + i] !== padder) { + throw new Error('PKCS#7 invalid padding byte'); + } + } + + var result = createArray(length); + copyArray(data, result, 0, 0, length); + return result; + } + + /////////////////////// + // Exporting + + + // The block cipher + var aesjs = { + AES: AES, + Counter: Counter, + + ModeOfOperation: { + ecb: ModeOfOperationECB, + cbc: ModeOfOperationCBC, + cfb: ModeOfOperationCFB, + ofb: ModeOfOperationOFB, + ctr: ModeOfOperationCTR + }, + + utils: { + hex: convertHex, + utf8: convertUtf8 + }, + + padding: { + pkcs7: { + pad: pkcs7pad, + strip: pkcs7strip + } + }, + + _arrayTest: { + coerceArray: coerceArray, + createArray: createArray, + copyArray: copyArray, + } + }; + + + // node.js + if (typeof exports !== 'undefined') { + module.exports = aesjs + + // RequireJS/AMD + // http://www.requirejs.org/docs/api.html + // https://github.com/amdjs/amdjs-api/wiki/AMD + } else if (typeof(define) === 'function' && define.amd) { + define(aesjs); + + // Web Browsers + } else { + + // If there was an existing library at "aesjs" make sure it's still available + if (root.aesjs) { + aesjs._aesjs = root.aesjs; + } + + root.aesjs = aesjs; + } + + +})(this); + +},{}],8:[function(require,module,exports){ +/*! + * ansi-gray + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var wrap = require('ansi-wrap'); + +module.exports = function gray(message) { + return wrap(90, 39, message); +}; + +},{"ansi-wrap":10}],9:[function(require,module,exports){ +'use strict'; +const colorConvert = require('color-convert'); + +const wrapAnsi16 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => function () { + const code = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => function () { + const rgb = fn.apply(colorConvert, arguments); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Fix humans + styles.color.grey = styles.color.gray; + + for (const groupName of Object.keys(styles)) { + const group = styles[groupName]; + + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + } + + const ansi2ansi = n => n; + const rgb2rgb = (r, g, b) => [r, g, b]; + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; + styles.color.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 0) + }; + + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; + styles.bgColor.ansi16m = { + rgb: wrapAnsi16m(rgb2rgb, 10) + }; + + for (let key of Object.keys(colorConvert)) { + if (typeof colorConvert[key] !== 'object') { + continue; + } + + const suite = colorConvert[key]; + + if (key === 'ansi16') { + key = 'ansi'; + } + + if ('ansi16' in suite) { + styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); + styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); + } + + if ('ansi256' in suite) { + styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); + styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); + } + + if ('rgb' in suite) { + styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); + styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); + } + } + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); + +},{"color-convert":123}],10:[function(require,module,exports){ +'use strict'; + +module.exports = function(a, b, msg) { + return '\u001b['+ a + 'm' + msg + '\u001b[' + b + 'm'; +}; + +},{}],11:[function(require,module,exports){ +module.exports = require('./register')().Promise + +},{"./register":13}],12:[function(require,module,exports){ +"use strict" + // global key for user preferred registration +var REGISTRATION_KEY = '@@any-promise/REGISTRATION', + // Prior registration (preferred or detected) + registered = null + +/** + * Registers the given implementation. An implementation must + * be registered prior to any call to `require("any-promise")`, + * typically on application load. + * + * If called with no arguments, will return registration in + * following priority: + * + * For Node.js: + * + * 1. Previous registration + * 2. global.Promise if node.js version >= 0.12 + * 3. Auto detected promise based on first sucessful require of + * known promise libraries. Note this is a last resort, as the + * loaded library is non-deterministic. node.js >= 0.12 will + * always use global.Promise over this priority list. + * 4. Throws error. + * + * For Browser: + * + * 1. Previous registration + * 2. window.Promise + * 3. Throws error. + * + * Options: + * + * Promise: Desired Promise constructor + * global: Boolean - Should the registration be cached in a global variable to + * allow cross dependency/bundle registration? (default true) + */ +module.exports = function(root, loadImplementation){ + return function register(implementation, opts){ + implementation = implementation || null + opts = opts || {} + // global registration unless explicitly {global: false} in options (default true) + var registerGlobal = opts.global !== false; + + // load any previous global registration + if(registered === null && registerGlobal){ + registered = root[REGISTRATION_KEY] || null + } + + if(registered !== null + && implementation !== null + && registered.implementation !== implementation){ + // Throw error if attempting to redefine implementation + throw new Error('any-promise already defined as "'+registered.implementation+ + '". You can only register an implementation before the first '+ + ' call to require("any-promise") and an implementation cannot be changed') + } + + if(registered === null){ + // use provided implementation + if(implementation !== null && typeof opts.Promise !== 'undefined'){ + registered = { + Promise: opts.Promise, + implementation: implementation + } + } else { + // require implementation if implementation is specified but not provided + registered = loadImplementation(implementation) + } + + if(registerGlobal){ + // register preference globally in case multiple installations + root[REGISTRATION_KEY] = registered + } + } + + return registered + } +} + +},{}],13:[function(require,module,exports){ +"use strict"; +module.exports = require('./loader')(window, loadImplementation) + +/** + * Browser specific loadImplementation. Always uses `window.Promise` + * + * To register a custom implementation, must register with `Promise` option. + */ +function loadImplementation(){ + if(typeof window.Promise === 'undefined'){ + throw new Error("any-promise browser requires a polyfill or explicit registration"+ + " e.g: require('any-promise/register/bluebird')") + } + return { + Promise: window.Promise, + implementation: 'window.Promise' + } +} + +},{"./loader":12}],14:[function(require,module,exports){ +var asn1 = exports; + +asn1.bignum = require('bn.js'); + +asn1.define = require('./asn1/api').define; +asn1.base = require('./asn1/base'); +asn1.constants = require('./asn1/constants'); +asn1.decoders = require('./asn1/decoders'); +asn1.encoders = require('./asn1/encoders'); + +},{"./asn1/api":15,"./asn1/base":17,"./asn1/constants":21,"./asn1/decoders":23,"./asn1/encoders":26,"bn.js":66}],15:[function(require,module,exports){ +var asn1 = require('../asn1'); +var inherits = require('inherits'); + +var api = exports; + +api.define = function define(name, body) { + return new Entity(name, body); +}; + +function Entity(name, body) { + this.name = name; + this.body = body; + + this.decoders = {}; + this.encoders = {}; +}; + +Entity.prototype._createNamed = function createNamed(base) { + var named; + try { + named = require('vm').runInThisContext( + '(function ' + this.name + '(entity) {\n' + + ' this._initNamed(entity);\n' + + '})' + ); + } catch (e) { + named = function (entity) { + this._initNamed(entity); + }; + } + inherits(named, base); + named.prototype._initNamed = function initnamed(entity) { + base.call(this, entity); + }; + + return new named(this); +}; + +Entity.prototype._getDecoder = function _getDecoder(enc) { + enc = enc || 'der'; + // Lazily create decoder + if (!this.decoders.hasOwnProperty(enc)) + this.decoders[enc] = this._createNamed(asn1.decoders[enc]); + return this.decoders[enc]; +}; + +Entity.prototype.decode = function decode(data, enc, options) { + return this._getDecoder(enc).decode(data, options); +}; + +Entity.prototype._getEncoder = function _getEncoder(enc) { + enc = enc || 'der'; + // Lazily create encoder + if (!this.encoders.hasOwnProperty(enc)) + this.encoders[enc] = this._createNamed(asn1.encoders[enc]); + return this.encoders[enc]; +}; + +Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) { + return this._getEncoder(enc).encode(data, reporter); +}; + +},{"../asn1":14,"inherits":834,"vm":111}],16:[function(require,module,exports){ +var inherits = require('inherits'); +var Reporter = require('../base').Reporter; +var Buffer = require('buffer').Buffer; + +function DecoderBuffer(base, options) { + Reporter.call(this, options); + if (!Buffer.isBuffer(base)) { + this.error('Input not Buffer'); + return; + } + + this.base = base; + this.offset = 0; + this.length = base.length; +} +inherits(DecoderBuffer, Reporter); +exports.DecoderBuffer = DecoderBuffer; + +DecoderBuffer.prototype.save = function save() { + return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }; +}; + +DecoderBuffer.prototype.restore = function restore(save) { + // Return skipped data + var res = new DecoderBuffer(this.base); + res.offset = save.offset; + res.length = this.offset; + + this.offset = save.offset; + Reporter.prototype.restore.call(this, save.reporter); + + return res; +}; + +DecoderBuffer.prototype.isEmpty = function isEmpty() { + return this.offset === this.length; +}; + +DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) { + if (this.offset + 1 <= this.length) + return this.base.readUInt8(this.offset++, true); + else + return this.error(fail || 'DecoderBuffer overrun'); +} + +DecoderBuffer.prototype.skip = function skip(bytes, fail) { + if (!(this.offset + bytes <= this.length)) + return this.error(fail || 'DecoderBuffer overrun'); + + var res = new DecoderBuffer(this.base); + + // Share reporter state + res._reporterState = this._reporterState; + + res.offset = this.offset; + res.length = this.offset + bytes; + this.offset += bytes; + return res; +} + +DecoderBuffer.prototype.raw = function raw(save) { + return this.base.slice(save ? save.offset : this.offset, this.length); +} + +function EncoderBuffer(value, reporter) { + if (Array.isArray(value)) { + this.length = 0; + this.value = value.map(function(item) { + if (!(item instanceof EncoderBuffer)) + item = new EncoderBuffer(item, reporter); + this.length += item.length; + return item; + }, this); + } else if (typeof value === 'number') { + if (!(0 <= value && value <= 0xff)) + return reporter.error('non-byte EncoderBuffer value'); + this.value = value; + this.length = 1; + } else if (typeof value === 'string') { + this.value = value; + this.length = Buffer.byteLength(value); + } else if (Buffer.isBuffer(value)) { + this.value = value; + this.length = value.length; + } else { + return reporter.error('Unsupported type: ' + typeof value); + } +} +exports.EncoderBuffer = EncoderBuffer; + +EncoderBuffer.prototype.join = function join(out, offset) { + if (!out) + out = new Buffer(this.length); + if (!offset) + offset = 0; + + if (this.length === 0) + return out; + + if (Array.isArray(this.value)) { + this.value.forEach(function(item) { + item.join(out, offset); + offset += item.length; + }); + } else { + if (typeof this.value === 'number') + out[offset] = this.value; + else if (typeof this.value === 'string') + out.write(this.value, offset); + else if (Buffer.isBuffer(this.value)) + this.value.copy(out, offset); + offset += this.length; + } + + return out; +}; + +},{"../base":17,"buffer":113,"inherits":834}],17:[function(require,module,exports){ +var base = exports; + +base.Reporter = require('./reporter').Reporter; +base.DecoderBuffer = require('./buffer').DecoderBuffer; +base.EncoderBuffer = require('./buffer').EncoderBuffer; +base.Node = require('./node'); + +},{"./buffer":16,"./node":18,"./reporter":19}],18:[function(require,module,exports){ +var Reporter = require('../base').Reporter; +var EncoderBuffer = require('../base').EncoderBuffer; +var DecoderBuffer = require('../base').DecoderBuffer; +var assert = require('minimalistic-assert'); + +// Supported tags +var tags = [ + 'seq', 'seqof', 'set', 'setof', 'objid', 'bool', + 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc', + 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str', + 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr' +]; + +// Public methods list +var methods = [ + 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', + 'any', 'contains' +].concat(tags); + +// Overrided methods list +var overrided = [ + '_peekTag', '_decodeTag', '_use', + '_decodeStr', '_decodeObjid', '_decodeTime', + '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList', + + '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime', + '_encodeNull', '_encodeInt', '_encodeBool' +]; + +function Node(enc, parent) { + var state = {}; + this._baseState = state; + + state.enc = enc; + + state.parent = parent || null; + state.children = null; + + // State + state.tag = null; + state.args = null; + state.reverseArgs = null; + state.choice = null; + state.optional = false; + state.any = false; + state.obj = false; + state.use = null; + state.useDecoder = null; + state.key = null; + state['default'] = null; + state.explicit = null; + state.implicit = null; + state.contains = null; + + // Should create new instance on each method + if (!state.parent) { + state.children = []; + this._wrap(); + } +} +module.exports = Node; + +var stateProps = [ + 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice', + 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit', + 'implicit', 'contains' +]; + +Node.prototype.clone = function clone() { + var state = this._baseState; + var cstate = {}; + stateProps.forEach(function(prop) { + cstate[prop] = state[prop]; + }); + var res = new this.constructor(cstate.parent); + res._baseState = cstate; + return res; +}; + +Node.prototype._wrap = function wrap() { + var state = this._baseState; + methods.forEach(function(method) { + this[method] = function _wrappedMethod() { + var clone = new this.constructor(this); + state.children.push(clone); + return clone[method].apply(clone, arguments); + }; + }, this); +}; + +Node.prototype._init = function init(body) { + var state = this._baseState; + + assert(state.parent === null); + body.call(this); + + // Filter children + state.children = state.children.filter(function(child) { + return child._baseState.parent === this; + }, this); + assert.equal(state.children.length, 1, 'Root node can have only one child'); +}; + +Node.prototype._useArgs = function useArgs(args) { + var state = this._baseState; + + // Filter children and args + var children = args.filter(function(arg) { + return arg instanceof this.constructor; + }, this); + args = args.filter(function(arg) { + return !(arg instanceof this.constructor); + }, this); + + if (children.length !== 0) { + assert(state.children === null); + state.children = children; + + // Replace parent to maintain backward link + children.forEach(function(child) { + child._baseState.parent = this; + }, this); + } + if (args.length !== 0) { + assert(state.args === null); + state.args = args; + state.reverseArgs = args.map(function(arg) { + if (typeof arg !== 'object' || arg.constructor !== Object) + return arg; + + var res = {}; + Object.keys(arg).forEach(function(key) { + if (key == (key | 0)) + key |= 0; + var value = arg[key]; + res[value] = key; + }); + return res; + }); + } +}; + +// +// Overrided methods +// + +overrided.forEach(function(method) { + Node.prototype[method] = function _overrided() { + var state = this._baseState; + throw new Error(method + ' not implemented for encoding: ' + state.enc); + }; +}); + +// +// Public methods +// + +tags.forEach(function(tag) { + Node.prototype[tag] = function _tagMethod() { + var state = this._baseState; + var args = Array.prototype.slice.call(arguments); + + assert(state.tag === null); + state.tag = tag; + + this._useArgs(args); + + return this; + }; +}); + +Node.prototype.use = function use(item) { + assert(item); + var state = this._baseState; + + assert(state.use === null); + state.use = item; + + return this; +}; + +Node.prototype.optional = function optional() { + var state = this._baseState; + + state.optional = true; + + return this; +}; + +Node.prototype.def = function def(val) { + var state = this._baseState; + + assert(state['default'] === null); + state['default'] = val; + state.optional = true; + + return this; +}; + +Node.prototype.explicit = function explicit(num) { + var state = this._baseState; + + assert(state.explicit === null && state.implicit === null); + state.explicit = num; + + return this; +}; + +Node.prototype.implicit = function implicit(num) { + var state = this._baseState; + + assert(state.explicit === null && state.implicit === null); + state.implicit = num; + + return this; +}; + +Node.prototype.obj = function obj() { + var state = this._baseState; + var args = Array.prototype.slice.call(arguments); + + state.obj = true; + + if (args.length !== 0) + this._useArgs(args); + + return this; +}; + +Node.prototype.key = function key(newKey) { + var state = this._baseState; + + assert(state.key === null); + state.key = newKey; + + return this; +}; + +Node.prototype.any = function any() { + var state = this._baseState; + + state.any = true; + + return this; +}; + +Node.prototype.choice = function choice(obj) { + var state = this._baseState; + + assert(state.choice === null); + state.choice = obj; + this._useArgs(Object.keys(obj).map(function(key) { + return obj[key]; + })); + + return this; +}; + +Node.prototype.contains = function contains(item) { + var state = this._baseState; + + assert(state.use === null); + state.contains = item; + + return this; +}; + +// +// Decoding +// + +Node.prototype._decode = function decode(input, options) { + var state = this._baseState; + + // Decode root node + if (state.parent === null) + return input.wrapResult(state.children[0]._decode(input, options)); + + var result = state['default']; + var present = true; + + var prevKey = null; + if (state.key !== null) + prevKey = input.enterKey(state.key); + + // Check if tag is there + if (state.optional) { + var tag = null; + if (state.explicit !== null) + tag = state.explicit; + else if (state.implicit !== null) + tag = state.implicit; + else if (state.tag !== null) + tag = state.tag; + + if (tag === null && !state.any) { + // Trial and Error + var save = input.save(); + try { + if (state.choice === null) + this._decodeGeneric(state.tag, input, options); + else + this._decodeChoice(input, options); + present = true; + } catch (e) { + present = false; + } + input.restore(save); + } else { + present = this._peekTag(input, tag, state.any); + + if (input.isError(present)) + return present; + } + } + + // Push object on stack + var prevObj; + if (state.obj && present) + prevObj = input.enterObject(); + + if (present) { + // Unwrap explicit values + if (state.explicit !== null) { + var explicit = this._decodeTag(input, state.explicit); + if (input.isError(explicit)) + return explicit; + input = explicit; + } + + var start = input.offset; + + // Unwrap implicit and normal values + if (state.use === null && state.choice === null) { + if (state.any) + var save = input.save(); + var body = this._decodeTag( + input, + state.implicit !== null ? state.implicit : state.tag, + state.any + ); + if (input.isError(body)) + return body; + + if (state.any) + result = input.raw(save); + else + input = body; + } + + if (options && options.track && state.tag !== null) + options.track(input.path(), start, input.length, 'tagged'); + + if (options && options.track && state.tag !== null) + options.track(input.path(), input.offset, input.length, 'content'); + + // Select proper method for tag + if (state.any) + result = result; + else if (state.choice === null) + result = this._decodeGeneric(state.tag, input, options); + else + result = this._decodeChoice(input, options); + + if (input.isError(result)) + return result; + + // Decode children + if (!state.any && state.choice === null && state.children !== null) { + state.children.forEach(function decodeChildren(child) { + // NOTE: We are ignoring errors here, to let parser continue with other + // parts of encoded data + child._decode(input, options); + }); + } + + // Decode contained/encoded by schema, only in bit or octet strings + if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) { + var data = new DecoderBuffer(result); + result = this._getUse(state.contains, input._reporterState.obj) + ._decode(data, options); + } + } + + // Pop object + if (state.obj && present) + result = input.leaveObject(prevObj); + + // Set key + if (state.key !== null && (result !== null || present === true)) + input.leaveKey(prevKey, state.key, result); + else if (prevKey !== null) + input.exitKey(prevKey); + + return result; +}; + +Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) { + var state = this._baseState; + + if (tag === 'seq' || tag === 'set') + return null; + if (tag === 'seqof' || tag === 'setof') + return this._decodeList(input, tag, state.args[0], options); + else if (/str$/.test(tag)) + return this._decodeStr(input, tag, options); + else if (tag === 'objid' && state.args) + return this._decodeObjid(input, state.args[0], state.args[1], options); + else if (tag === 'objid') + return this._decodeObjid(input, null, null, options); + else if (tag === 'gentime' || tag === 'utctime') + return this._decodeTime(input, tag, options); + else if (tag === 'null_') + return this._decodeNull(input, options); + else if (tag === 'bool') + return this._decodeBool(input, options); + else if (tag === 'objDesc') + return this._decodeStr(input, tag, options); + else if (tag === 'int' || tag === 'enum') + return this._decodeInt(input, state.args && state.args[0], options); + + if (state.use !== null) { + return this._getUse(state.use, input._reporterState.obj) + ._decode(input, options); + } else { + return input.error('unknown tag: ' + tag); + } +}; + +Node.prototype._getUse = function _getUse(entity, obj) { + + var state = this._baseState; + // Create altered use decoder if implicit is set + state.useDecoder = this._use(entity, obj); + assert(state.useDecoder._baseState.parent === null); + state.useDecoder = state.useDecoder._baseState.children[0]; + if (state.implicit !== state.useDecoder._baseState.implicit) { + state.useDecoder = state.useDecoder.clone(); + state.useDecoder._baseState.implicit = state.implicit; + } + return state.useDecoder; +}; + +Node.prototype._decodeChoice = function decodeChoice(input, options) { + var state = this._baseState; + var result = null; + var match = false; + + Object.keys(state.choice).some(function(key) { + var save = input.save(); + var node = state.choice[key]; + try { + var value = node._decode(input, options); + if (input.isError(value)) + return false; + + result = { type: key, value: value }; + match = true; + } catch (e) { + input.restore(save); + return false; + } + return true; + }, this); + + if (!match) + return input.error('Choice not matched'); + + return result; +}; + +// +// Encoding +// + +Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) { + return new EncoderBuffer(data, this.reporter); +}; + +Node.prototype._encode = function encode(data, reporter, parent) { + var state = this._baseState; + if (state['default'] !== null && state['default'] === data) + return; + + var result = this._encodeValue(data, reporter, parent); + if (result === undefined) + return; + + if (this._skipDefault(result, reporter, parent)) + return; + + return result; +}; + +Node.prototype._encodeValue = function encode(data, reporter, parent) { + var state = this._baseState; + + // Decode root node + if (state.parent === null) + return state.children[0]._encode(data, reporter || new Reporter()); + + var result = null; + + // Set reporter to share it with a child class + this.reporter = reporter; + + // Check if data is there + if (state.optional && data === undefined) { + if (state['default'] !== null) + data = state['default'] + else + return; + } + + // Encode children first + var content = null; + var primitive = false; + if (state.any) { + // Anything that was given is translated to buffer + result = this._createEncoderBuffer(data); + } else if (state.choice) { + result = this._encodeChoice(data, reporter); + } else if (state.contains) { + content = this._getUse(state.contains, parent)._encode(data, reporter); + primitive = true; + } else if (state.children) { + content = state.children.map(function(child) { + if (child._baseState.tag === 'null_') + return child._encode(null, reporter, data); + + if (child._baseState.key === null) + return reporter.error('Child should have a key'); + var prevKey = reporter.enterKey(child._baseState.key); + + if (typeof data !== 'object') + return reporter.error('Child expected, but input is not object'); + + var res = child._encode(data[child._baseState.key], reporter, data); + reporter.leaveKey(prevKey); + + return res; + }, this).filter(function(child) { + return child; + }); + content = this._createEncoderBuffer(content); + } else { + if (state.tag === 'seqof' || state.tag === 'setof') { + // TODO(indutny): this should be thrown on DSL level + if (!(state.args && state.args.length === 1)) + return reporter.error('Too many args for : ' + state.tag); + + if (!Array.isArray(data)) + return reporter.error('seqof/setof, but data is not Array'); + + var child = this.clone(); + child._baseState.implicit = null; + content = this._createEncoderBuffer(data.map(function(item) { + var state = this._baseState; + + return this._getUse(state.args[0], data)._encode(item, reporter); + }, child)); + } else if (state.use !== null) { + result = this._getUse(state.use, parent)._encode(data, reporter); + } else { + content = this._encodePrimitive(state.tag, data); + primitive = true; + } + } + + // Encode data itself + var result; + if (!state.any && state.choice === null) { + var tag = state.implicit !== null ? state.implicit : state.tag; + var cls = state.implicit === null ? 'universal' : 'context'; + + if (tag === null) { + if (state.use === null) + reporter.error('Tag could be omitted only for .use()'); + } else { + if (state.use === null) + result = this._encodeComposite(tag, primitive, cls, content); + } + } + + // Wrap in explicit + if (state.explicit !== null) + result = this._encodeComposite(state.explicit, false, 'context', result); + + return result; +}; + +Node.prototype._encodeChoice = function encodeChoice(data, reporter) { + var state = this._baseState; + + var node = state.choice[data.type]; + if (!node) { + assert( + false, + data.type + ' not found in ' + + JSON.stringify(Object.keys(state.choice))); + } + return node._encode(data.value, reporter); +}; + +Node.prototype._encodePrimitive = function encodePrimitive(tag, data) { + var state = this._baseState; + + if (/str$/.test(tag)) + return this._encodeStr(data, tag); + else if (tag === 'objid' && state.args) + return this._encodeObjid(data, state.reverseArgs[0], state.args[1]); + else if (tag === 'objid') + return this._encodeObjid(data, null, null); + else if (tag === 'gentime' || tag === 'utctime') + return this._encodeTime(data, tag); + else if (tag === 'null_') + return this._encodeNull(); + else if (tag === 'int' || tag === 'enum') + return this._encodeInt(data, state.args && state.reverseArgs[0]); + else if (tag === 'bool') + return this._encodeBool(data); + else if (tag === 'objDesc') + return this._encodeStr(data, tag); + else + throw new Error('Unsupported tag: ' + tag); +}; + +Node.prototype._isNumstr = function isNumstr(str) { + return /^[0-9 ]*$/.test(str); +}; + +Node.prototype._isPrintstr = function isPrintstr(str) { + return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str); +}; + +},{"../base":17,"minimalistic-assert":960}],19:[function(require,module,exports){ +var inherits = require('inherits'); + +function Reporter(options) { + this._reporterState = { + obj: null, + path: [], + options: options || {}, + errors: [] + }; +} +exports.Reporter = Reporter; + +Reporter.prototype.isError = function isError(obj) { + return obj instanceof ReporterError; +}; + +Reporter.prototype.save = function save() { + var state = this._reporterState; + + return { obj: state.obj, pathLen: state.path.length }; +}; + +Reporter.prototype.restore = function restore(data) { + var state = this._reporterState; + + state.obj = data.obj; + state.path = state.path.slice(0, data.pathLen); +}; + +Reporter.prototype.enterKey = function enterKey(key) { + return this._reporterState.path.push(key); +}; + +Reporter.prototype.exitKey = function exitKey(index) { + var state = this._reporterState; + + state.path = state.path.slice(0, index - 1); +}; + +Reporter.prototype.leaveKey = function leaveKey(index, key, value) { + var state = this._reporterState; + + this.exitKey(index); + if (state.obj !== null) + state.obj[key] = value; +}; + +Reporter.prototype.path = function path() { + return this._reporterState.path.join('/'); +}; + +Reporter.prototype.enterObject = function enterObject() { + var state = this._reporterState; + + var prev = state.obj; + state.obj = {}; + return prev; +}; + +Reporter.prototype.leaveObject = function leaveObject(prev) { + var state = this._reporterState; + + var now = state.obj; + state.obj = prev; + return now; +}; + +Reporter.prototype.error = function error(msg) { + var err; + var state = this._reporterState; + + var inherited = msg instanceof ReporterError; + if (inherited) { + err = msg; + } else { + err = new ReporterError(state.path.map(function(elem) { + return '[' + JSON.stringify(elem) + ']'; + }).join(''), msg.message || msg, msg.stack); + } + + if (!state.options.partial) + throw err; + + if (!inherited) + state.errors.push(err); + + return err; +}; + +Reporter.prototype.wrapResult = function wrapResult(result) { + var state = this._reporterState; + if (!state.options.partial) + return result; + + return { + result: this.isError(result) ? null : result, + errors: state.errors + }; +}; + +function ReporterError(path, msg) { + this.path = path; + this.rethrow(msg); +}; +inherits(ReporterError, Error); + +ReporterError.prototype.rethrow = function rethrow(msg) { + this.message = msg + ' at: ' + (this.path || '(shallow)'); + if (Error.captureStackTrace) + Error.captureStackTrace(this, ReporterError); + + if (!this.stack) { + try { + // IE only adds stack when thrown + throw new Error(this.message); + } catch (e) { + this.stack = e.stack; + } + } + return this; +}; + +},{"inherits":834}],20:[function(require,module,exports){ +var constants = require('../constants'); + +exports.tagClass = { + 0: 'universal', + 1: 'application', + 2: 'context', + 3: 'private' +}; +exports.tagClassByName = constants._reverse(exports.tagClass); + +exports.tag = { + 0x00: 'end', + 0x01: 'bool', + 0x02: 'int', + 0x03: 'bitstr', + 0x04: 'octstr', + 0x05: 'null_', + 0x06: 'objid', + 0x07: 'objDesc', + 0x08: 'external', + 0x09: 'real', + 0x0a: 'enum', + 0x0b: 'embed', + 0x0c: 'utf8str', + 0x0d: 'relativeOid', + 0x10: 'seq', + 0x11: 'set', + 0x12: 'numstr', + 0x13: 'printstr', + 0x14: 't61str', + 0x15: 'videostr', + 0x16: 'ia5str', + 0x17: 'utctime', + 0x18: 'gentime', + 0x19: 'graphstr', + 0x1a: 'iso646str', + 0x1b: 'genstr', + 0x1c: 'unistr', + 0x1d: 'charstr', + 0x1e: 'bmpstr' +}; +exports.tagByName = constants._reverse(exports.tag); + +},{"../constants":21}],21:[function(require,module,exports){ +var constants = exports; + +// Helper +constants._reverse = function reverse(map) { + var res = {}; + + Object.keys(map).forEach(function(key) { + // Convert key to integer if it is stringified + if ((key | 0) == key) + key = key | 0; + + var value = map[key]; + res[value] = key; + }); + + return res; +}; + +constants.der = require('./der'); + +},{"./der":20}],22:[function(require,module,exports){ +var inherits = require('inherits'); + +var asn1 = require('../../asn1'); +var base = asn1.base; +var bignum = asn1.bignum; + +// Import DER constants +var der = asn1.constants.der; + +function DERDecoder(entity) { + this.enc = 'der'; + this.name = entity.name; + this.entity = entity; + + // Construct base tree + this.tree = new DERNode(); + this.tree._init(entity.body); +}; +module.exports = DERDecoder; + +DERDecoder.prototype.decode = function decode(data, options) { + if (!(data instanceof base.DecoderBuffer)) + data = new base.DecoderBuffer(data, options); + + return this.tree._decode(data, options); +}; + +// Tree methods + +function DERNode(parent) { + base.Node.call(this, 'der', parent); +} +inherits(DERNode, base.Node); + +DERNode.prototype._peekTag = function peekTag(buffer, tag, any) { + if (buffer.isEmpty()) + return false; + + var state = buffer.save(); + var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"'); + if (buffer.isError(decodedTag)) + return decodedTag; + + buffer.restore(state); + + return decodedTag.tag === tag || decodedTag.tagStr === tag || + (decodedTag.tagStr + 'of') === tag || any; +}; + +DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) { + var decodedTag = derDecodeTag(buffer, + 'Failed to decode tag of "' + tag + '"'); + if (buffer.isError(decodedTag)) + return decodedTag; + + var len = derDecodeLen(buffer, + decodedTag.primitive, + 'Failed to get length of "' + tag + '"'); + + // Failure + if (buffer.isError(len)) + return len; + + if (!any && + decodedTag.tag !== tag && + decodedTag.tagStr !== tag && + decodedTag.tagStr + 'of' !== tag) { + return buffer.error('Failed to match tag: "' + tag + '"'); + } + + if (decodedTag.primitive || len !== null) + return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); + + // Indefinite length... find END tag + var state = buffer.save(); + var res = this._skipUntilEnd( + buffer, + 'Failed to skip indefinite length body: "' + this.tag + '"'); + if (buffer.isError(res)) + return res; + + len = buffer.offset - state.offset; + buffer.restore(state); + return buffer.skip(len, 'Failed to match body of: "' + tag + '"'); +}; + +DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) { + while (true) { + var tag = derDecodeTag(buffer, fail); + if (buffer.isError(tag)) + return tag; + var len = derDecodeLen(buffer, tag.primitive, fail); + if (buffer.isError(len)) + return len; + + var res; + if (tag.primitive || len !== null) + res = buffer.skip(len) + else + res = this._skipUntilEnd(buffer, fail); + + // Failure + if (buffer.isError(res)) + return res; + + if (tag.tagStr === 'end') + break; + } +}; + +DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder, + options) { + var result = []; + while (!buffer.isEmpty()) { + var possibleEnd = this._peekTag(buffer, 'end'); + if (buffer.isError(possibleEnd)) + return possibleEnd; + + var res = decoder.decode(buffer, 'der', options); + if (buffer.isError(res) && possibleEnd) + break; + result.push(res); + } + return result; +}; + +DERNode.prototype._decodeStr = function decodeStr(buffer, tag) { + if (tag === 'bitstr') { + var unused = buffer.readUInt8(); + if (buffer.isError(unused)) + return unused; + return { unused: unused, data: buffer.raw() }; + } else if (tag === 'bmpstr') { + var raw = buffer.raw(); + if (raw.length % 2 === 1) + return buffer.error('Decoding of string type: bmpstr length mismatch'); + + var str = ''; + for (var i = 0; i < raw.length / 2; i++) { + str += String.fromCharCode(raw.readUInt16BE(i * 2)); + } + return str; + } else if (tag === 'numstr') { + var numstr = buffer.raw().toString('ascii'); + if (!this._isNumstr(numstr)) { + return buffer.error('Decoding of string type: ' + + 'numstr unsupported characters'); + } + return numstr; + } else if (tag === 'octstr') { + return buffer.raw(); + } else if (tag === 'objDesc') { + return buffer.raw(); + } else if (tag === 'printstr') { + var printstr = buffer.raw().toString('ascii'); + if (!this._isPrintstr(printstr)) { + return buffer.error('Decoding of string type: ' + + 'printstr unsupported characters'); + } + return printstr; + } else if (/str$/.test(tag)) { + return buffer.raw().toString(); + } else { + return buffer.error('Decoding of string type: ' + tag + ' unsupported'); + } +}; + +DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) { + var result; + var identifiers = []; + var ident = 0; + while (!buffer.isEmpty()) { + var subident = buffer.readUInt8(); + ident <<= 7; + ident |= subident & 0x7f; + if ((subident & 0x80) === 0) { + identifiers.push(ident); + ident = 0; + } + } + if (subident & 0x80) + identifiers.push(ident); + + var first = (identifiers[0] / 40) | 0; + var second = identifiers[0] % 40; + + if (relative) + result = identifiers; + else + result = [first, second].concat(identifiers.slice(1)); + + if (values) { + var tmp = values[result.join(' ')]; + if (tmp === undefined) + tmp = values[result.join('.')]; + if (tmp !== undefined) + result = tmp; + } + + return result; +}; + +DERNode.prototype._decodeTime = function decodeTime(buffer, tag) { + var str = buffer.raw().toString(); + if (tag === 'gentime') { + var year = str.slice(0, 4) | 0; + var mon = str.slice(4, 6) | 0; + var day = str.slice(6, 8) | 0; + var hour = str.slice(8, 10) | 0; + var min = str.slice(10, 12) | 0; + var sec = str.slice(12, 14) | 0; + } else if (tag === 'utctime') { + var year = str.slice(0, 2) | 0; + var mon = str.slice(2, 4) | 0; + var day = str.slice(4, 6) | 0; + var hour = str.slice(6, 8) | 0; + var min = str.slice(8, 10) | 0; + var sec = str.slice(10, 12) | 0; + if (year < 70) + year = 2000 + year; + else + year = 1900 + year; + } else { + return buffer.error('Decoding ' + tag + ' time is not supported yet'); + } + + return Date.UTC(year, mon - 1, day, hour, min, sec, 0); +}; + +DERNode.prototype._decodeNull = function decodeNull(buffer) { + return null; +}; + +DERNode.prototype._decodeBool = function decodeBool(buffer) { + var res = buffer.readUInt8(); + if (buffer.isError(res)) + return res; + else + return res !== 0; +}; + +DERNode.prototype._decodeInt = function decodeInt(buffer, values) { + // Bigint, return as it is (assume big endian) + var raw = buffer.raw(); + var res = new bignum(raw); + + if (values) + res = values[res.toString(10)] || res; + + return res; +}; + +DERNode.prototype._use = function use(entity, obj) { + if (typeof entity === 'function') + entity = entity(obj); + return entity._getDecoder('der').tree; +}; + +// Utility methods + +function derDecodeTag(buf, fail) { + var tag = buf.readUInt8(fail); + if (buf.isError(tag)) + return tag; + + var cls = der.tagClass[tag >> 6]; + var primitive = (tag & 0x20) === 0; + + // Multi-octet tag - load + if ((tag & 0x1f) === 0x1f) { + var oct = tag; + tag = 0; + while ((oct & 0x80) === 0x80) { + oct = buf.readUInt8(fail); + if (buf.isError(oct)) + return oct; + + tag <<= 7; + tag |= oct & 0x7f; + } + } else { + tag &= 0x1f; + } + var tagStr = der.tag[tag]; + + return { + cls: cls, + primitive: primitive, + tag: tag, + tagStr: tagStr + }; +} + +function derDecodeLen(buf, primitive, fail) { + var len = buf.readUInt8(fail); + if (buf.isError(len)) + return len; + + // Indefinite form + if (!primitive && len === 0x80) + return null; + + // Definite form + if ((len & 0x80) === 0) { + // Short form + return len; + } + + // Long form + var num = len & 0x7f; + if (num > 4) + return buf.error('length octect is too long'); + + len = 0; + for (var i = 0; i < num; i++) { + len <<= 8; + var j = buf.readUInt8(fail); + if (buf.isError(j)) + return j; + len |= j; + } + + return len; +} + +},{"../../asn1":14,"inherits":834}],23:[function(require,module,exports){ +var decoders = exports; + +decoders.der = require('./der'); +decoders.pem = require('./pem'); + +},{"./der":22,"./pem":24}],24:[function(require,module,exports){ +var inherits = require('inherits'); +var Buffer = require('buffer').Buffer; + +var DERDecoder = require('./der'); + +function PEMDecoder(entity) { + DERDecoder.call(this, entity); + this.enc = 'pem'; +}; +inherits(PEMDecoder, DERDecoder); +module.exports = PEMDecoder; + +PEMDecoder.prototype.decode = function decode(data, options) { + var lines = data.toString().split(/[\r\n]+/g); + + var label = options.label.toUpperCase(); + + var re = /^-----(BEGIN|END) ([^-]+)-----$/; + var start = -1; + var end = -1; + for (var i = 0; i < lines.length; i++) { + var match = lines[i].match(re); + if (match === null) + continue; + + if (match[2] !== label) + continue; + + if (start === -1) { + if (match[1] !== 'BEGIN') + break; + start = i; + } else { + if (match[1] !== 'END') + break; + end = i; + break; + } + } + if (start === -1 || end === -1) + throw new Error('PEM section not found for: ' + label); + + var base64 = lines.slice(start + 1, end).join(''); + // Remove excessive symbols + base64.replace(/[^a-z0-9\+\/=]+/gi, ''); + + var input = new Buffer(base64, 'base64'); + return DERDecoder.prototype.decode.call(this, input, options); +}; + +},{"./der":22,"buffer":113,"inherits":834}],25:[function(require,module,exports){ +var inherits = require('inherits'); +var Buffer = require('buffer').Buffer; + +var asn1 = require('../../asn1'); +var base = asn1.base; + +// Import DER constants +var der = asn1.constants.der; + +function DEREncoder(entity) { + this.enc = 'der'; + this.name = entity.name; + this.entity = entity; + + // Construct base tree + this.tree = new DERNode(); + this.tree._init(entity.body); +}; +module.exports = DEREncoder; + +DEREncoder.prototype.encode = function encode(data, reporter) { + return this.tree._encode(data, reporter).join(); +}; + +// Tree methods + +function DERNode(parent) { + base.Node.call(this, 'der', parent); +} +inherits(DERNode, base.Node); + +DERNode.prototype._encodeComposite = function encodeComposite(tag, + primitive, + cls, + content) { + var encodedTag = encodeTag(tag, primitive, cls, this.reporter); + + // Short form + if (content.length < 0x80) { + var header = new Buffer(2); + header[0] = encodedTag; + header[1] = content.length; + return this._createEncoderBuffer([ header, content ]); + } + + // Long form + // Count octets required to store length + var lenOctets = 1; + for (var i = content.length; i >= 0x100; i >>= 8) + lenOctets++; + + var header = new Buffer(1 + 1 + lenOctets); + header[0] = encodedTag; + header[1] = 0x80 | lenOctets; + + for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) + header[i] = j & 0xff; + + return this._createEncoderBuffer([ header, content ]); +}; + +DERNode.prototype._encodeStr = function encodeStr(str, tag) { + if (tag === 'bitstr') { + return this._createEncoderBuffer([ str.unused | 0, str.data ]); + } else if (tag === 'bmpstr') { + var buf = new Buffer(str.length * 2); + for (var i = 0; i < str.length; i++) { + buf.writeUInt16BE(str.charCodeAt(i), i * 2); + } + return this._createEncoderBuffer(buf); + } else if (tag === 'numstr') { + if (!this._isNumstr(str)) { + return this.reporter.error('Encoding of string type: numstr supports ' + + 'only digits and space'); + } + return this._createEncoderBuffer(str); + } else if (tag === 'printstr') { + if (!this._isPrintstr(str)) { + return this.reporter.error('Encoding of string type: printstr supports ' + + 'only latin upper and lower case letters, ' + + 'digits, space, apostrophe, left and rigth ' + + 'parenthesis, plus sign, comma, hyphen, ' + + 'dot, slash, colon, equal sign, ' + + 'question mark'); + } + return this._createEncoderBuffer(str); + } else if (/str$/.test(tag)) { + return this._createEncoderBuffer(str); + } else if (tag === 'objDesc') { + return this._createEncoderBuffer(str); + } else { + return this.reporter.error('Encoding of string type: ' + tag + + ' unsupported'); + } +}; + +DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) { + if (typeof id === 'string') { + if (!values) + return this.reporter.error('string objid given, but no values map found'); + if (!values.hasOwnProperty(id)) + return this.reporter.error('objid not found in values map'); + id = values[id].split(/[\s\.]+/g); + for (var i = 0; i < id.length; i++) + id[i] |= 0; + } else if (Array.isArray(id)) { + id = id.slice(); + for (var i = 0; i < id.length; i++) + id[i] |= 0; + } + + if (!Array.isArray(id)) { + return this.reporter.error('objid() should be either array or string, ' + + 'got: ' + JSON.stringify(id)); + } + + if (!relative) { + if (id[1] >= 40) + return this.reporter.error('Second objid identifier OOB'); + id.splice(0, 2, id[0] * 40 + id[1]); + } + + // Count number of octets + var size = 0; + for (var i = 0; i < id.length; i++) { + var ident = id[i]; + for (size++; ident >= 0x80; ident >>= 7) + size++; + } + + var objid = new Buffer(size); + var offset = objid.length - 1; + for (var i = id.length - 1; i >= 0; i--) { + var ident = id[i]; + objid[offset--] = ident & 0x7f; + while ((ident >>= 7) > 0) + objid[offset--] = 0x80 | (ident & 0x7f); + } + + return this._createEncoderBuffer(objid); +}; + +function two(num) { + if (num < 10) + return '0' + num; + else + return num; +} + +DERNode.prototype._encodeTime = function encodeTime(time, tag) { + var str; + var date = new Date(time); + + if (tag === 'gentime') { + str = [ + two(date.getFullYear()), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join(''); + } else if (tag === 'utctime') { + str = [ + two(date.getFullYear() % 100), + two(date.getUTCMonth() + 1), + two(date.getUTCDate()), + two(date.getUTCHours()), + two(date.getUTCMinutes()), + two(date.getUTCSeconds()), + 'Z' + ].join(''); + } else { + this.reporter.error('Encoding ' + tag + ' time is not supported yet'); + } + + return this._encodeStr(str, 'octstr'); +}; + +DERNode.prototype._encodeNull = function encodeNull() { + return this._createEncoderBuffer(''); +}; + +DERNode.prototype._encodeInt = function encodeInt(num, values) { + if (typeof num === 'string') { + if (!values) + return this.reporter.error('String int or enum given, but no values map'); + if (!values.hasOwnProperty(num)) { + return this.reporter.error('Values map doesn\'t contain: ' + + JSON.stringify(num)); + } + num = values[num]; + } + + // Bignum, assume big endian + if (typeof num !== 'number' && !Buffer.isBuffer(num)) { + var numArray = num.toArray(); + if (!num.sign && numArray[0] & 0x80) { + numArray.unshift(0); + } + num = new Buffer(numArray); + } + + if (Buffer.isBuffer(num)) { + var size = num.length; + if (num.length === 0) + size++; + + var out = new Buffer(size); + num.copy(out); + if (num.length === 0) + out[0] = 0 + return this._createEncoderBuffer(out); + } + + if (num < 0x80) + return this._createEncoderBuffer(num); + + if (num < 0x100) + return this._createEncoderBuffer([0, num]); + + var size = 1; + for (var i = num; i >= 0x100; i >>= 8) + size++; + + var out = new Array(size); + for (var i = out.length - 1; i >= 0; i--) { + out[i] = num & 0xff; + num >>= 8; + } + if(out[0] & 0x80) { + out.unshift(0); + } + + return this._createEncoderBuffer(new Buffer(out)); +}; + +DERNode.prototype._encodeBool = function encodeBool(value) { + return this._createEncoderBuffer(value ? 0xff : 0); +}; + +DERNode.prototype._use = function use(entity, obj) { + if (typeof entity === 'function') + entity = entity(obj); + return entity._getEncoder('der').tree; +}; + +DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) { + var state = this._baseState; + var i; + if (state['default'] === null) + return false; + + var data = dataBuffer.join(); + if (state.defaultBuffer === undefined) + state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join(); + + if (data.length !== state.defaultBuffer.length) + return false; + + for (i=0; i < data.length; i++) + if (data[i] !== state.defaultBuffer[i]) + return false; + + return true; +}; + +// Utility methods + +function encodeTag(tag, primitive, cls, reporter) { + var res; + + if (tag === 'seqof') + tag = 'seq'; + else if (tag === 'setof') + tag = 'set'; + + if (der.tagByName.hasOwnProperty(tag)) + res = der.tagByName[tag]; + else if (typeof tag === 'number' && (tag | 0) === tag) + res = tag; + else + return reporter.error('Unknown tag: ' + tag); + + if (res >= 0x1f) + return reporter.error('Multi-octet tag encoding unsupported'); + + if (!primitive) + res |= 0x20; + + res |= (der.tagClassByName[cls || 'universal'] << 6); + + return res; +} + +},{"../../asn1":14,"buffer":113,"inherits":834}],26:[function(require,module,exports){ +var encoders = exports; + +encoders.der = require('./der'); +encoders.pem = require('./pem'); + +},{"./der":25,"./pem":27}],27:[function(require,module,exports){ +var inherits = require('inherits'); + +var DEREncoder = require('./der'); + +function PEMEncoder(entity) { + DEREncoder.call(this, entity); + this.enc = 'pem'; +}; +inherits(PEMEncoder, DEREncoder); +module.exports = PEMEncoder; + +PEMEncoder.prototype.encode = function encode(data, options) { + var buf = DEREncoder.prototype.encode.call(this, data); + + var p = buf.toString('base64'); + var out = [ '-----BEGIN ' + options.label + '-----' ]; + for (var i = 0; i < p.length; i += 64) + out.push(p.slice(i, i + 64)); + out.push('-----END ' + options.label + '-----'); + return out.join('\n'); +}; + +},{"./der":25,"inherits":834}],28:[function(require,module,exports){ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + + newInvalidAsn1Error: function (msg) { + var e = new Error(); + e.name = 'InvalidAsn1Error'; + e.message = msg || ''; + return e; + } + +}; + +},{}],29:[function(require,module,exports){ +// Copyright 2011 Mark Cavage All rights reserved. + +var errors = require('./errors'); +var types = require('./types'); + +var Reader = require('./reader'); +var Writer = require('./writer'); + + +// --- Exports + +module.exports = { + + Reader: Reader, + + Writer: Writer + +}; + +for (var t in types) { + if (types.hasOwnProperty(t)) + module.exports[t] = types[t]; +} +for (var e in errors) { + if (errors.hasOwnProperty(e)) + module.exports[e] = errors[e]; +} + +},{"./errors":28,"./reader":30,"./types":31,"./writer":32}],30:[function(require,module,exports){ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); +var Buffer = require('safer-buffer').Buffer; + +var ASN1 = require('./types'); +var errors = require('./errors'); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + + + +// --- API + +function Reader(data) { + if (!data || !Buffer.isBuffer(data)) + throw new TypeError('data must be a node Buffer'); + + this._buf = data; + this._size = data.length; + + // These hold the "current" state + this._len = 0; + this._offset = 0; +} + +Object.defineProperty(Reader.prototype, 'length', { + enumerable: true, + get: function () { return (this._len); } +}); + +Object.defineProperty(Reader.prototype, 'offset', { + enumerable: true, + get: function () { return (this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'remain', { + get: function () { return (this._size - this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'buffer', { + get: function () { return (this._buf.slice(this._offset)); } +}); + + +/** + * Reads a single byte and advances offset; you can pass in `true` to make this + * a "peek" operation (i.e., get the byte, but don't advance the offset). + * + * @param {Boolean} peek true means don't move offset. + * @return {Number} the next byte, null if not enough data. + */ +Reader.prototype.readByte = function (peek) { + if (this._size - this._offset < 1) + return null; + + var b = this._buf[this._offset] & 0xff; + + if (!peek) + this._offset += 1; + + return b; +}; + + +Reader.prototype.peek = function () { + return this.readByte(true); +}; + + +/** + * Reads a (potentially) variable length off the BER buffer. This call is + * not really meant to be called directly, as callers have to manipulate + * the internal buffer afterwards. + * + * As a result of this call, you can call `Reader.length`, until the + * next thing called that does a readLength. + * + * @return {Number} the amount of offset to advance the buffer. + * @throws {InvalidAsn1Error} on bad ASN.1 + */ +Reader.prototype.readLength = function (offset) { + if (offset === undefined) + offset = this._offset; + + if (offset >= this._size) + return null; + + var lenB = this._buf[offset++] & 0xff; + if (lenB === null) + return null; + + if ((lenB & 0x80) === 0x80) { + lenB &= 0x7f; + + if (lenB === 0) + throw newInvalidAsn1Error('Indefinite length not supported'); + + if (lenB > 4) + throw newInvalidAsn1Error('encoding too long'); + + if (this._size - offset < lenB) + return null; + + this._len = 0; + for (var i = 0; i < lenB; i++) + this._len = (this._len << 8) + (this._buf[offset++] & 0xff); + + } else { + // Wasn't a variable length + this._len = lenB; + } + + return offset; +}; + + +/** + * Parses the next sequence in this BER buffer. + * + * To get the length of the sequence, call `Reader.length`. + * + * @return {Number} the sequence's tag. + */ +Reader.prototype.readSequence = function (tag) { + var seq = this.peek(); + if (seq === null) + return null; + if (tag !== undefined && tag !== seq) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + seq.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + this._offset = o; + return seq; +}; + + +Reader.prototype.readInt = function () { + return this._readTag(ASN1.Integer); +}; + + +Reader.prototype.readBoolean = function () { + return (this._readTag(ASN1.Boolean) === 0 ? false : true); +}; + + +Reader.prototype.readEnumeration = function () { + return this._readTag(ASN1.Enumeration); +}; + + +Reader.prototype.readString = function (tag, retbuf) { + if (!tag) + tag = ASN1.OctetString; + + var b = this.peek(); + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + + if (o === null) + return null; + + if (this.length > this._size - o) + return null; + + this._offset = o; + + if (this.length === 0) + return retbuf ? Buffer.alloc(0) : ''; + + var str = this._buf.slice(this._offset, this._offset + this.length); + this._offset += this.length; + + return retbuf ? str : str.toString('utf8'); +}; + +Reader.prototype.readOID = function (tag) { + if (!tag) + tag = ASN1.OID; + + var b = this.readString(tag, true); + if (b === null) + return null; + + var values = []; + var value = 0; + + for (var i = 0; i < b.length; i++) { + var byte = b[i] & 0xff; + + value <<= 7; + value += byte & 0x7f; + if ((byte & 0x80) === 0) { + values.push(value); + value = 0; + } + } + + value = values.shift(); + values.unshift(value % 40); + values.unshift((value / 40) >> 0); + + return values.join('.'); +}; + + +Reader.prototype._readTag = function (tag) { + assert.ok(tag !== undefined); + + var b = this.peek(); + + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + if (this.length > 4) + throw newInvalidAsn1Error('Integer too long: ' + this.length); + + if (this.length > this._size - o) + return null; + this._offset = o; + + var fb = this._buf[this._offset]; + var value = 0; + + for (var i = 0; i < this.length; i++) { + value <<= 8; + value |= (this._buf[this._offset++] & 0xff); + } + + if ((fb & 0x80) === 0x80 && i !== 4) + value -= (1 << (i * 8)); + + return value >> 0; +}; + + + +// --- Exported API + +module.exports = Reader; + +},{"./errors":28,"./types":31,"assert":35,"safer-buffer":1335}],31:[function(require,module,exports){ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + EOC: 0, + Boolean: 1, + Integer: 2, + BitString: 3, + OctetString: 4, + Null: 5, + OID: 6, + ObjectDescriptor: 7, + External: 8, + Real: 9, // float + Enumeration: 10, + PDV: 11, + Utf8String: 12, + RelativeOID: 13, + Sequence: 16, + Set: 17, + NumericString: 18, + PrintableString: 19, + T61String: 20, + VideotexString: 21, + IA5String: 22, + UTCTime: 23, + GeneralizedTime: 24, + GraphicString: 25, + VisibleString: 26, + GeneralString: 28, + UniversalString: 29, + CharacterString: 30, + BMPString: 31, + Constructor: 32, + Context: 128 +}; + +},{}],32:[function(require,module,exports){ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); +var Buffer = require('safer-buffer').Buffer; +var ASN1 = require('./types'); +var errors = require('./errors'); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + +var DEFAULT_OPTS = { + size: 1024, + growthFactor: 8 +}; + + +// --- Helpers + +function merge(from, to) { + assert.ok(from); + assert.equal(typeof (from), 'object'); + assert.ok(to); + assert.equal(typeof (to), 'object'); + + var keys = Object.getOwnPropertyNames(from); + keys.forEach(function (key) { + if (to[key]) + return; + + var value = Object.getOwnPropertyDescriptor(from, key); + Object.defineProperty(to, key, value); + }); + + return to; +} + + + +// --- API + +function Writer(options) { + options = merge(DEFAULT_OPTS, options || {}); + + this._buf = Buffer.alloc(options.size || 1024); + this._size = this._buf.length; + this._offset = 0; + this._options = options; + + // A list of offsets in the buffer where we need to insert + // sequence tag/len pairs. + this._seq = []; +} + +Object.defineProperty(Writer.prototype, 'buffer', { + get: function () { + if (this._seq.length) + throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); + + return (this._buf.slice(0, this._offset)); + } +}); + +Writer.prototype.writeByte = function (b) { + if (typeof (b) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(1); + this._buf[this._offset++] = b; +}; + + +Writer.prototype.writeInt = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Integer; + + var sz = 4; + + while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && + (sz > 1)) { + sz--; + i <<= 8; + } + + if (sz > 4) + throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); + + this._ensure(2 + sz); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = sz; + + while (sz-- > 0) { + this._buf[this._offset++] = ((i & 0xff000000) >>> 24); + i <<= 8; + } + +}; + + +Writer.prototype.writeNull = function () { + this.writeByte(ASN1.Null); + this.writeByte(0x00); +}; + + +Writer.prototype.writeEnumeration = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Enumeration; + + return this.writeInt(i, tag); +}; + + +Writer.prototype.writeBoolean = function (b, tag) { + if (typeof (b) !== 'boolean') + throw new TypeError('argument must be a Boolean'); + if (typeof (tag) !== 'number') + tag = ASN1.Boolean; + + this._ensure(3); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = 0x01; + this._buf[this._offset++] = b ? 0xff : 0x00; +}; + + +Writer.prototype.writeString = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); + if (typeof (tag) !== 'number') + tag = ASN1.OctetString; + + var len = Buffer.byteLength(s); + this.writeByte(tag); + this.writeLength(len); + if (len) { + this._ensure(len); + this._buf.write(s, this._offset); + this._offset += len; + } +}; + + +Writer.prototype.writeBuffer = function (buf, tag) { + if (typeof (tag) !== 'number') + throw new TypeError('tag must be a number'); + if (!Buffer.isBuffer(buf)) + throw new TypeError('argument must be a buffer'); + + this.writeByte(tag); + this.writeLength(buf.length); + this._ensure(buf.length); + buf.copy(this._buf, this._offset, 0, buf.length); + this._offset += buf.length; +}; + + +Writer.prototype.writeStringArray = function (strings) { + if ((!strings instanceof Array)) + throw new TypeError('argument must be an Array[String]'); + + var self = this; + strings.forEach(function (s) { + self.writeString(s); + }); +}; + +// This is really to solve DER cases, but whatever for now +Writer.prototype.writeOID = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string'); + if (typeof (tag) !== 'number') + tag = ASN1.OID; + + if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) + throw new Error('argument is not a valid OID string'); + + function encodeOctet(bytes, octet) { + if (octet < 128) { + bytes.push(octet); + } else if (octet < 16384) { + bytes.push((octet >>> 7) | 0x80); + bytes.push(octet & 0x7F); + } else if (octet < 2097152) { + bytes.push((octet >>> 14) | 0x80); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else if (octet < 268435456) { + bytes.push((octet >>> 21) | 0x80); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else { + bytes.push(((octet >>> 28) | 0x80) & 0xFF); + bytes.push(((octet >>> 21) | 0x80) & 0xFF); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } + } + + var tmp = s.split('.'); + var bytes = []; + bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); + tmp.slice(2).forEach(function (b) { + encodeOctet(bytes, parseInt(b, 10)); + }); + + var self = this; + this._ensure(2 + bytes.length); + this.writeByte(tag); + this.writeLength(bytes.length); + bytes.forEach(function (b) { + self.writeByte(b); + }); +}; + + +Writer.prototype.writeLength = function (len) { + if (typeof (len) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(4); + + if (len <= 0x7f) { + this._buf[this._offset++] = len; + } else if (len <= 0xff) { + this._buf[this._offset++] = 0x81; + this._buf[this._offset++] = len; + } else if (len <= 0xffff) { + this._buf[this._offset++] = 0x82; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else if (len <= 0xffffff) { + this._buf[this._offset++] = 0x83; + this._buf[this._offset++] = len >> 16; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else { + throw newInvalidAsn1Error('Length too long (> 4 bytes)'); + } +}; + +Writer.prototype.startSequence = function (tag) { + if (typeof (tag) !== 'number') + tag = ASN1.Sequence | ASN1.Constructor; + + this.writeByte(tag); + this._seq.push(this._offset); + this._ensure(3); + this._offset += 3; +}; + + +Writer.prototype.endSequence = function () { + var seq = this._seq.pop(); + var start = seq + 3; + var len = this._offset - start; + + if (len <= 0x7f) { + this._shift(start, len, -2); + this._buf[seq] = len; + } else if (len <= 0xff) { + this._shift(start, len, -1); + this._buf[seq] = 0x81; + this._buf[seq + 1] = len; + } else if (len <= 0xffff) { + this._buf[seq] = 0x82; + this._buf[seq + 1] = len >> 8; + this._buf[seq + 2] = len; + } else if (len <= 0xffffff) { + this._shift(start, len, 1); + this._buf[seq] = 0x83; + this._buf[seq + 1] = len >> 16; + this._buf[seq + 2] = len >> 8; + this._buf[seq + 3] = len; + } else { + throw newInvalidAsn1Error('Sequence too long'); + } +}; + + +Writer.prototype._shift = function (start, len, shift) { + assert.ok(start !== undefined); + assert.ok(len !== undefined); + assert.ok(shift); + + this._buf.copy(this._buf, start + shift, start, start + len); + this._offset += shift; +}; + +Writer.prototype._ensure = function (len) { + assert.ok(len); + + if (this._size - this._offset < len) { + var sz = this._size * this._options.growthFactor; + if (sz - this._offset < len) + sz += len; + + var buf = Buffer.alloc(sz); + + this._buf.copy(buf, 0, 0, this._offset); + this._buf = buf; + this._size = sz; + } +}; + + + +// --- Exported API + +module.exports = Writer; + +},{"./errors":28,"./types":31,"assert":35,"safer-buffer":1335}],33:[function(require,module,exports){ +// Copyright 2011 Mark Cavage All rights reserved. + +// If you have no idea what ASN.1 or BER is, see this: +// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +var Ber = require('./ber/index'); + + + +// --- Exported API + +module.exports = { + + Ber: Ber, + + BerReader: Ber.Reader, + + BerWriter: Ber.Writer + +}; + +},{"./ber/index":29}],34:[function(require,module,exports){ +(function (Buffer,process){ +// Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. + +var assert = require('assert'); +var Stream = require('stream').Stream; +var util = require('util'); + + +///--- Globals + +/* JSSTYLED */ +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + + +///--- Internal + +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); +} + +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); +} + +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); +} + +function noop() { + // Why even bother with asserts? +} + + +///--- Exports + +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; + } + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } +}; + +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } + + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { + if (k === 'AssertionError') { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); + +}).call(this,{"isBuffer":require("../is-buffer/index.js")},require('_process')) +},{"../is-buffer/index.js":839,"_process":109,"assert":35,"stream":1394,"util":1439}],35:[function(require,module,exports){ +(function (global){ +'use strict'; + +// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js +// original notice: + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +function compare(a, b) { + 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; +} +function isBuffer(b) { + if (global.Buffer && typeof global.Buffer.isBuffer === 'function') { + return global.Buffer.isBuffer(b); + } + return !!(b != null && b._isBuffer); +} + +// based on node assert, original notice: + +// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 +// +// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! +// +// Originally from narwhal.js (http://narwhaljs.org) +// Copyright (c) 2009 Thomas Robinson <280north.com> +// +// 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 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 util = require('util/'); +var hasOwn = Object.prototype.hasOwnProperty; +var pSlice = Array.prototype.slice; +var functionsHaveNames = (function () { + return function foo() {}.name === 'foo'; +}()); +function pToString (obj) { + return Object.prototype.toString.call(obj); +} +function isView(arrbuf) { + if (isBuffer(arrbuf)) { + return false; + } + if (typeof global.ArrayBuffer !== 'function') { + return false; + } + if (typeof ArrayBuffer.isView === 'function') { + return ArrayBuffer.isView(arrbuf); + } + if (!arrbuf) { + return false; + } + if (arrbuf instanceof DataView) { + return true; + } + if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) { + return true; + } + return false; +} +// 1. The assert module provides functions that throw +// AssertionError's when particular conditions are not met. The +// assert module must conform to the following interface. + +var assert = module.exports = ok; + +// 2. The AssertionError is defined in assert. +// new assert.AssertionError({ message: message, +// actual: actual, +// expected: expected }) + +var regex = /\s*function\s+([^\(\s]*)\s*/; +// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js +function getName(func) { + if (!util.isFunction(func)) { + return; + } + if (functionsHaveNames) { + return func.name; + } + var str = func.toString(); + var match = str.match(regex); + return match && match[1]; +} +assert.AssertionError = function AssertionError(options) { + this.name = 'AssertionError'; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } + var stackStartFunction = options.stackStartFunction || fail; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, stackStartFunction); + } else { + // non v8 browsers so we can have a stacktrace + var err = new Error(); + if (err.stack) { + var out = err.stack; + + // try to strip useless frames + var fn_name = getName(stackStartFunction); + var idx = out.indexOf('\n' + fn_name); + if (idx >= 0) { + // once we have located the function frame + // we need to strip out everything before it (and its line) + var next_line = out.indexOf('\n', idx + 1); + out = out.substring(next_line + 1); + } + + this.stack = out; + } + } +}; + +// assert.AssertionError instanceof Error +util.inherits(assert.AssertionError, Error); + +function truncate(s, n) { + if (typeof s === 'string') { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } +} +function inspect(something) { + if (functionsHaveNames || !util.isFunction(something)) { + return util.inspect(something); + } + var rawname = getName(something); + var name = rawname ? ': ' + rawname : ''; + return '[Function' + name + ']'; +} +function getMessage(self) { + return truncate(inspect(self.actual), 128) + ' ' + + self.operator + ' ' + + truncate(inspect(self.expected), 128); +} + +// At present only the three keys mentioned above are used and +// understood by the spec. Implementations or sub modules can pass +// other keys to the AssertionError's constructor - they will be +// ignored. + +// 3. All of the following functions must throw an AssertionError +// when a corresponding condition is not met, with a message that +// may be undefined if not provided. All assertion methods provide +// both the actual and expected values to the assertion error for +// display purposes. + +function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message: message, + actual: actual, + expected: expected, + operator: operator, + stackStartFunction: stackStartFunction + }); +} + +// EXTENSION! allows for well behaved errors defined elsewhere. +assert.fail = fail; + +// 4. Pure assertion tests whether a value is truthy, as determined +// by !!guard. +// assert.ok(guard, message_opt); +// This statement is equivalent to assert.equal(true, !!guard, +// message_opt);. To test strictly for the value true, use +// assert.strictEqual(true, guard, message_opt);. + +function ok(value, message) { + if (!value) fail(value, true, message, '==', assert.ok); +} +assert.ok = ok; + +// 5. The equality assertion tests shallow, coercive equality with +// ==. +// assert.equal(actual, expected, message_opt); + +assert.equal = function equal(actual, expected, message) { + if (actual != expected) fail(actual, expected, message, '==', assert.equal); +}; + +// 6. The non-equality assertion tests for whether two objects are not equal +// with != assert.notEqual(actual, expected, message_opt); + +assert.notEqual = function notEqual(actual, expected, message) { + if (actual == expected) { + fail(actual, expected, message, '!=', assert.notEqual); + } +}; + +// 7. The equivalence assertion tests a deep equality relation. +// assert.deepEqual(actual, expected, message_opt); + +assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'deepEqual', assert.deepEqual); + } +}; + +assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { + if (!_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual); + } +}; + +function _deepEqual(actual, expected, strict, memos) { + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + } else if (isBuffer(actual) && isBuffer(expected)) { + return compare(actual, expected) === 0; + + // 7.2. If the expected value is a Date object, the actual value is + // equivalent if it is also a Date object that refers to the same time. + } else if (util.isDate(actual) && util.isDate(expected)) { + return actual.getTime() === expected.getTime(); + + // 7.3 If the expected value is a RegExp object, the actual value is + // equivalent if it is also a RegExp object with the same source and + // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source && + actual.global === expected.global && + actual.multiline === expected.multiline && + actual.lastIndex === expected.lastIndex && + actual.ignoreCase === expected.ignoreCase; + + // 7.4. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if ((actual === null || typeof actual !== 'object') && + (expected === null || typeof expected !== 'object')) { + return strict ? actual === expected : actual == expected; + + // If both values are instances of typed arrays, wrap their underlying + // ArrayBuffers in a Buffer each to increase performance + // This optimization requires the arrays to have the same type as checked by + // Object.prototype.toString (aka pToString). Never perform binary + // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their + // bit patterns are not identical. + } else if (isView(actual) && isView(expected) && + pToString(actual) === pToString(expected) && + !(actual instanceof Float32Array || + actual instanceof Float64Array)) { + return compare(new Uint8Array(actual.buffer), + new Uint8Array(expected.buffer)) === 0; + + // 7.5 For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else if (isBuffer(actual) !== isBuffer(expected)) { + return false; + } else { + memos = memos || {actual: [], expected: []}; + + var actualIndex = memos.actual.indexOf(actual); + if (actualIndex !== -1) { + if (actualIndex === memos.expected.indexOf(expected)) { + return true; + } + } + + memos.actual.push(actual); + memos.expected.push(expected); + + return objEquiv(actual, expected, strict, memos); + } +} + +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} + +function objEquiv(a, b, strict, actualVisitedObjects) { + if (a === null || a === undefined || b === null || b === undefined) + return false; + // if one is a primitive, the other must be same + if (util.isPrimitive(a) || util.isPrimitive(b)) + return a === b; + if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) + return false; + var aIsArgs = isArguments(a); + var bIsArgs = isArguments(b); + if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) + return false; + if (aIsArgs) { + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b, strict); + } + var ka = objectKeys(a); + var kb = objectKeys(b); + var key, i; + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length !== kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] !== kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) + return false; + } + return true; +} + +// 8. The non-equivalence assertion tests for any deep inequality. +// assert.notDeepEqual(actual, expected, message_opt); + +assert.notDeepEqual = function notDeepEqual(actual, expected, message) { + if (_deepEqual(actual, expected, false)) { + fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); + } +}; + +assert.notDeepStrictEqual = notDeepStrictEqual; +function notDeepStrictEqual(actual, expected, message) { + if (_deepEqual(actual, expected, true)) { + fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual); + } +} + + +// 9. The strict equality assertion tests strict equality, as determined by ===. +// assert.strictEqual(actual, expected, message_opt); + +assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, '===', assert.strictEqual); + } +}; + +// 10. The strict non-equality assertion tests for strict inequality, as +// determined by !==. assert.notStrictEqual(actual, expected, message_opt); + +assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, '!==', assert.notStrictEqual); + } +}; + +function expectedException(actual, expected) { + if (!actual || !expected) { + return false; + } + + if (Object.prototype.toString.call(expected) == '[object RegExp]') { + return expected.test(actual); + } + + try { + if (actual instanceof expected) { + return true; + } + } catch (e) { + // Ignore. The instanceof check doesn't work for arrow functions. + } + + if (Error.isPrototypeOf(expected)) { + return false; + } + + return expected.call({}, actual) === true; +} + +function _tryBlock(block) { + var error; + try { + block(); + } catch (e) { + error = e; + } + return error; +} + +function _throws(shouldThrow, block, expected, message) { + var actual; + + if (typeof block !== 'function') { + throw new TypeError('"block" argument must be a function'); + } + + if (typeof expected === 'string') { + message = expected; + expected = null; + } + + actual = _tryBlock(block); + + message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + + (message ? ' ' + message : '.'); + + if (shouldThrow && !actual) { + fail(actual, expected, 'Missing expected exception' + message); + } + + var userProvidedMessage = typeof message === 'string'; + var isUnwantedException = !shouldThrow && util.isError(actual); + var isUnexpectedException = !shouldThrow && actual && !expected; + + if ((isUnwantedException && + userProvidedMessage && + expectedException(actual, expected)) || + isUnexpectedException) { + fail(actual, expected, 'Got unwanted exception' + message); + } + + if ((shouldThrow && actual && expected && + !expectedException(actual, expected)) || (!shouldThrow && actual)) { + throw actual; + } +} + +// 11. Expected to throw an error: +// assert.throws(block, Error_opt, message_opt); + +assert.throws = function(block, /*optional*/error, /*optional*/message) { + _throws(true, block, error, message); +}; + +// EXTENSION! This is annoying to write outside this module. +assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) { + _throws(false, block, error, message); +}; + +assert.ifError = function(err) { if (err) throw err; }; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); + } + return keys; +}; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"util/":38}],36:[function(require,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 + } +} + +},{}],37:[function(require,module,exports){ +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.readUInt8 === 'function'; +} +},{}],38:[function(require,module,exports){ +(function (process,global){ +// 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 = require('./support/isBuffer'); + +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 = require('inherits'); + +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); +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"./support/isBuffer":37,"_process":109,"inherits":36}],39:[function(require,module,exports){ +'use strict'; + +module.exports = require('./lib/AsyncEventEmitter'); + +},{"./lib/AsyncEventEmitter":40}],40:[function(require,module,exports){ +'use strict'; + +var EventEmitter = require('events').EventEmitter, + util = require('util'), + eachSeries = require('async/eachSeries'), + AsyncEventEmitter; + + +module.exports = exports = AsyncEventEmitter = function AsyncEventEmitter () { + EventEmitter.call(this); +}; + +util.inherits(AsyncEventEmitter, EventEmitter); + + +/* Public methods +============================================================================= */ + +AsyncEventEmitter.prototype.emit = function(event, data, callback) { + var self = this, + listeners = self._events[event] || []; + + // Optional data argument + if(!callback && typeof data === 'function') { + callback = data; + data = undefined; + } + + // Special treatment of internal newListener and removeListener events + if(event === 'newListener' || event === 'removeListener') { + data = { + event: data, + fn: callback + }; + + callback = undefined; + } + + // A single listener is just a function not an array... + listeners = Array.isArray(listeners) ? listeners : [listeners]; + + eachSeries(listeners.slice(), function (fn, next) { + var err; + + // Support synchronous functions + if(fn.length < 2) { + try { + fn.call(self, data); + } + catch (e) { + err = e; + } + + return next(err); + } + + // Async + fn.call(self, data, next); + }, callback); + + return self; +}; + + +AsyncEventEmitter.prototype.once = function (type, listener) { + var self = this, + g; + + if (typeof listener !== 'function') { + throw new TypeError('listener must be a function'); + } + + // Hack to support set arity + if(listener.length >= 2) { + g = function (e, next) { + self.removeListener(type, g); + listener(e, next); + }; + } + else { + g = function (e) { + self.removeListener(type, g); + listener(e); + }; + } + + g.listener = listener; + self.on(type, g); + + return self; +}; + + +AsyncEventEmitter.prototype.first = function(event, listener) { + var listeners = this._events[event] || []; + + // Contract + if(typeof listener !== 'function') { + throw new TypeError('listener must be a function'); + } + + // Listeners are not always an array + if(!Array.isArray(listeners)) { + this._events[event] = listeners = [listeners]; + } + + listeners.unshift(listener); + + return this; +}; + + +AsyncEventEmitter.prototype.at = function(event, index, listener) { + var listeners = this._events[event] || []; + + // Contract + if(typeof listener !== 'function') { + throw new TypeError('listener must be a function'); + } + if(typeof index !== 'number' || index < 0) { + throw new TypeError('index must be a non-negative integer'); + } + + // Listeners are not always an array + if(!Array.isArray(listeners)) { + this._events[event] = listeners = [listeners]; + } + + listeners.splice(index, 0, listener); + + return this; +}; + + +AsyncEventEmitter.prototype.before = function(event, target, listener) { + return this._beforeOrAfter(event, target, listener); +}; + + +AsyncEventEmitter.prototype.after = function(event, target, listener) { + return this._beforeOrAfter(event, target, listener, 'after'); +}; + + +/* Private methods +============================================================================= */ + +AsyncEventEmitter.prototype._beforeOrAfter = function(event, target, listener, beforeOrAfter) { + var listeners = this._events[event] || [], + i, index, + add = beforeOrAfter === 'after' ? 1 : 0; + + // Contract + if(typeof listener !== 'function') { + throw new TypeError('listener must be a function'); + } + if(typeof target !== 'function') { + throw new TypeError('target must be a function'); + } + + // Listeners are not always an array + if(!Array.isArray(listeners)) { + this._events[event] = listeners = [listeners]; + } + + index = listeners.length; + + for(i = listeners.length; i--;) { + if(listeners[i] === target) { + index = i + add; + break; + } + } + + listeners.splice(index, 0, listener); + + return this; +}; + +},{"async/eachSeries":44,"events":708,"util":1439}],41:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = asyncify; + +var _isObject = require('lodash/isObject'); + +var _isObject2 = _interopRequireDefault(_isObject); + +var _initialParams = require('./internal/initialParams'); + +var _initialParams2 = _interopRequireDefault(_initialParams); + +var _setImmediate = require('./internal/setImmediate'); + +var _setImmediate2 = _interopRequireDefault(_setImmediate); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Take a sync function and make it async, passing its return value to a + * callback. This is useful for plugging sync functions into a waterfall, + * series, or other async functions. Any arguments passed to the generated + * function will be passed to the wrapped function (except for the final + * callback argument). Errors thrown will be passed to the callback. + * + * If the function passed to `asyncify` returns a Promise, that promises's + * resolved/rejected state will be used to call the callback, rather than simply + * the synchronous return value. + * + * This also means you can asyncify ES2017 `async` functions. + * + * @name asyncify + * @static + * @memberOf module:Utils + * @method + * @alias wrapSync + * @category Util + * @param {Function} func - The synchronous function, or Promise-returning + * function to convert to an {@link AsyncFunction}. + * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be + * invoked with `(args..., callback)`. + * @example + * + * // passing a regular synchronous function + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(JSON.parse), + * function (data, next) { + * // data is the result of parsing the text. + * // If there was a parsing error, it would have been caught. + * } + * ], callback); + * + * // passing a function returning a promise + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(function (contents) { + * return db.model.create(contents); + * }), + * function (model, next) { + * // `model` is the instantiated model object. + * // If there was an error, this function would be skipped. + * } + * ], callback); + * + * // es2017 example, though `asyncify` is not needed if your JS environment + * // supports async functions out of the box + * var q = async.queue(async.asyncify(async function(file) { + * var intermediateStep = await processFile(file); + * return await somePromise(intermediateStep) + * })); + * + * q.push(files); + */ +function asyncify(func) { + return (0, _initialParams2.default)(function (args, callback) { + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + // if result is Promise object + if ((0, _isObject2.default)(result) && typeof result.then === 'function') { + result.then(function (value) { + invokeCallback(callback, null, value); + }, function (err) { + invokeCallback(callback, err.message ? err : new Error(err)); + }); + } else { + callback(null, result); + } + }); +} + +function invokeCallback(callback, error, value) { + try { + callback(error, value); + } catch (e) { + (0, _setImmediate2.default)(rethrow, e); + } +} + +function rethrow(error) { + throw error; +} +module.exports = exports['default']; +},{"./internal/initialParams":49,"./internal/setImmediate":53,"lodash/isObject":926}],42:[function(require,module,exports){ +(function (process,global,setImmediate){ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.async = global.async || {}))); +}(this, (function (exports) { 'use strict'; + +function slice(arrayLike, start) { + start = start|0; + var newLen = Math.max(arrayLike.length - start, 0); + var newArr = Array(newLen); + for(var idx = 0; idx < newLen; idx++) { + newArr[idx] = arrayLike[start + idx]; + } + return newArr; +} + +/** + * Creates a continuation function with some arguments already applied. + * + * Useful as a shorthand when combined with other control flow functions. Any + * arguments passed to the returned function are added to the arguments + * originally passed to apply. + * + * @name apply + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {Function} fn - The function you want to eventually apply all + * arguments to. Invokes with (arguments...). + * @param {...*} arguments... - Any number of arguments to automatically apply + * when the continuation is called. + * @returns {Function} the partially-applied function + * @example + * + * // using apply + * async.parallel([ + * async.apply(fs.writeFile, 'testfile1', 'test1'), + * async.apply(fs.writeFile, 'testfile2', 'test2') + * ]); + * + * + * // the same process without using apply + * async.parallel([ + * function(callback) { + * fs.writeFile('testfile1', 'test1', callback); + * }, + * function(callback) { + * fs.writeFile('testfile2', 'test2', callback); + * } + * ]); + * + * // It's possible to pass any number of additional arguments when calling the + * // continuation: + * + * node> var fn = async.apply(sys.puts, 'one'); + * node> fn('two', 'three'); + * one + * two + * three + */ +var apply = function(fn/*, ...args*/) { + var args = slice(arguments, 1); + return function(/*callArgs*/) { + var callArgs = slice(arguments); + return fn.apply(null, args.concat(callArgs)); + }; +}; + +var initialParams = function (fn) { + return function (/*...args, callback*/) { + var args = slice(arguments); + var callback = args.pop(); + fn.call(this, args, callback); + }; +}; + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; +var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; + +function fallback(fn) { + setTimeout(fn, 0); +} + +function wrap(defer) { + return function (fn/*, ...args*/) { + var args = slice(arguments, 1); + defer(function () { + fn.apply(null, args); + }); + }; +} + +var _defer; + +if (hasSetImmediate) { + _defer = setImmediate; +} else if (hasNextTick) { + _defer = process.nextTick; +} else { + _defer = fallback; +} + +var setImmediate$1 = wrap(_defer); + +/** + * Take a sync function and make it async, passing its return value to a + * callback. This is useful for plugging sync functions into a waterfall, + * series, or other async functions. Any arguments passed to the generated + * function will be passed to the wrapped function (except for the final + * callback argument). Errors thrown will be passed to the callback. + * + * If the function passed to `asyncify` returns a Promise, that promises's + * resolved/rejected state will be used to call the callback, rather than simply + * the synchronous return value. + * + * This also means you can asyncify ES2017 `async` functions. + * + * @name asyncify + * @static + * @memberOf module:Utils + * @method + * @alias wrapSync + * @category Util + * @param {Function} func - The synchronous function, or Promise-returning + * function to convert to an {@link AsyncFunction}. + * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be + * invoked with `(args..., callback)`. + * @example + * + * // passing a regular synchronous function + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(JSON.parse), + * function (data, next) { + * // data is the result of parsing the text. + * // If there was a parsing error, it would have been caught. + * } + * ], callback); + * + * // passing a function returning a promise + * async.waterfall([ + * async.apply(fs.readFile, filename, "utf8"), + * async.asyncify(function (contents) { + * return db.model.create(contents); + * }), + * function (model, next) { + * // `model` is the instantiated model object. + * // If there was an error, this function would be skipped. + * } + * ], callback); + * + * // es2017 example, though `asyncify` is not needed if your JS environment + * // supports async functions out of the box + * var q = async.queue(async.asyncify(async function(file) { + * var intermediateStep = await processFile(file); + * return await somePromise(intermediateStep) + * })); + * + * q.push(files); + */ +function asyncify(func) { + return initialParams(function (args, callback) { + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + // if result is Promise object + if (isObject(result) && typeof result.then === 'function') { + result.then(function(value) { + invokeCallback(callback, null, value); + }, function(err) { + invokeCallback(callback, err.message ? err : new Error(err)); + }); + } else { + callback(null, result); + } + }); +} + +function invokeCallback(callback, error, value) { + try { + callback(error, value); + } catch (e) { + setImmediate$1(rethrow, e); + } +} + +function rethrow(error) { + throw error; +} + +var supportsSymbol = typeof Symbol === 'function'; + +function isAsync(fn) { + return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; +} + +function wrapAsync(asyncFn) { + return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; +} + +function applyEach$1(eachfn) { + return function(fns/*, ...args*/) { + var args = slice(arguments, 1); + var go = initialParams(function(args, callback) { + var that = this; + return eachfn(fns, function (fn, cb) { + wrapAsync(fn).apply(that, args.concat(cb)); + }, callback); + }); + if (args.length) { + return go.apply(this, args); + } + else { + return go; + } + }; +} + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Built-in value references. */ +var Symbol$1 = root.Symbol; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Built-in value references. */ +var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined; + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag$1), + tag = value[symToStringTag$1]; + + try { + value[symToStringTag$1] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; +} + +/** Used for built-in method references. */ +var objectProto$1 = Object.prototype; + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString$1 = objectProto$1.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString$1.call(value); +} + +/** `Object#toString` result references. */ +var nullTag = '[object Null]'; +var undefinedTag = '[object Undefined]'; + +/** Built-in value references. */ +var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined; + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]'; +var funcTag = '[object Function]'; +var genTag = '[object GeneratorFunction]'; +var proxyTag = '[object Proxy]'; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +// A temporary value used to identify if the loop should be broken. +// See #1064, #1293 +var breakLoop = {}; + +/** + * This method returns `undefined`. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] + */ +function noop() { + // No operation performed. +} + +function once(fn) { + return function () { + if (fn === null) return; + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} + +var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; + +var getIterator = function (coll) { + return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); +}; + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +/** Used for built-in method references. */ +var objectProto$3 = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty$2 = objectProto$3.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto$3.propertyIsEnumerable; + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER$1 = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER$1 : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** `Object#toString` result references. */ +var argsTag$1 = '[object Arguments]'; +var arrayTag = '[object Array]'; +var boolTag = '[object Boolean]'; +var dateTag = '[object Date]'; +var errorTag = '[object Error]'; +var funcTag$1 = '[object Function]'; +var mapTag = '[object Map]'; +var numberTag = '[object Number]'; +var objectTag = '[object Object]'; +var regexpTag = '[object RegExp]'; +var setTag = '[object Set]'; +var stringTag = '[object String]'; +var weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]'; +var dataViewTag = '[object DataView]'; +var float32Tag = '[object Float32Array]'; +var float64Tag = '[object Float64Array]'; +var int8Tag = '[object Int8Array]'; +var int16Tag = '[object Int16Array]'; +var int32Tag = '[object Int32Array]'; +var uint8Tag = '[object Uint8Array]'; +var uint8ClampedTag = '[object Uint8ClampedArray]'; +var uint16Tag = '[object Uint16Array]'; +var uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag$1] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag$1] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** Detect free variable `exports`. */ +var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports$1 && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** Used for built-in method references. */ +var objectProto$2 = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty$1 = objectProto$2.hasOwnProperty; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty$1.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +/** Used for built-in method references. */ +var objectProto$5 = Object.prototype; + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$5; + + return value === proto; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); + +/** Used for built-in method references. */ +var objectProto$4 = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty$3 = objectProto$4.hasOwnProperty; + +/** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty$3.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; +} + +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +} + +function createArrayIterator(coll) { + var i = -1; + var len = coll.length; + return function next() { + return ++i < len ? {value: coll[i], key: i} : null; + } +} + +function createES2015Iterator(iterator) { + var i = -1; + return function next() { + var item = iterator.next(); + if (item.done) + return null; + i++; + return {value: item.value, key: i}; + } +} + +function createObjectIterator(obj) { + var okeys = keys(obj); + var i = -1; + var len = okeys.length; + return function next() { + var key = okeys[++i]; + return i < len ? {value: obj[key], key: key} : null; + }; +} + +function iterator(coll) { + if (isArrayLike(coll)) { + return createArrayIterator(coll); + } + + var iterator = getIterator(coll); + return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); +} + +function onlyOnce(fn) { + return function() { + if (fn === null) throw new Error("Callback was already called."); + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} + +function _eachOfLimit(limit) { + return function (obj, iteratee, callback) { + callback = once(callback || noop); + if (limit <= 0 || !obj) { + return callback(null); + } + var nextElem = iterator(obj); + var done = false; + var running = 0; + var looping = false; + + function iterateeCallback(err, value) { + running -= 1; + if (err) { + done = true; + callback(err); + } + else if (value === breakLoop || (done && running <= 0)) { + done = true; + return callback(null); + } + else if (!looping) { + replenish(); + } + } + + function replenish () { + looping = true; + while (running < limit && !done) { + var elem = nextElem(); + if (elem === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); + } + looping = false; + } + + replenish(); + }; +} + +/** + * The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a + * time. + * + * @name eachOfLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.eachOf]{@link module:Collections.eachOf} + * @alias forEachOfLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each + * item in `coll`. The `key` is the item's key, or index in the case of an + * array. + * Invoked with (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +function eachOfLimit(coll, limit, iteratee, callback) { + _eachOfLimit(limit)(coll, wrapAsync(iteratee), callback); +} + +function doLimit(fn, limit) { + return function (iterable, iteratee, callback) { + return fn(iterable, limit, iteratee, callback); + }; +} + +// eachOf implementation optimized for array-likes +function eachOfArrayLike(coll, iteratee, callback) { + callback = once(callback || noop); + var index = 0, + completed = 0, + length = coll.length; + if (length === 0) { + callback(null); + } + + function iteratorCallback(err, value) { + if (err) { + callback(err); + } else if ((++completed === length) || value === breakLoop) { + callback(null); + } + } + + for (; index < length; index++) { + iteratee(coll[index], index, onlyOnce(iteratorCallback)); + } +} + +// a generic version of eachOf which can handle array, object, and iterator cases. +var eachOfGeneric = doLimit(eachOfLimit, Infinity); + +/** + * Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument + * to the iteratee. + * + * @name eachOf + * @static + * @memberOf module:Collections + * @method + * @alias forEachOf + * @category Collection + * @see [async.each]{@link module:Collections.each} + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - A function to apply to each + * item in `coll`. + * The `key` is the item's key, or index in the case of an array. + * Invoked with (item, key, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + * @example + * + * var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; + * var configs = {}; + * + * async.forEachOf(obj, function (value, key, callback) { + * fs.readFile(__dirname + value, "utf8", function (err, data) { + * if (err) return callback(err); + * try { + * configs[key] = JSON.parse(data); + * } catch (e) { + * return callback(e); + * } + * callback(); + * }); + * }, function (err) { + * if (err) console.error(err.message); + * // configs is now a map of JSON data + * doSomethingWith(configs); + * }); + */ +var eachOf = function(coll, iteratee, callback) { + var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; + eachOfImplementation(coll, wrapAsync(iteratee), callback); +}; + +function doParallel(fn) { + return function (obj, iteratee, callback) { + return fn(eachOf, obj, wrapAsync(iteratee), callback); + }; +} + +function _asyncMap(eachfn, arr, iteratee, callback) { + callback = callback || noop; + arr = arr || []; + var results = []; + var counter = 0; + var _iteratee = wrapAsync(iteratee); + + eachfn(arr, function (value, _, callback) { + var index = counter++; + _iteratee(value, function (err, v) { + results[index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); +} + +/** + * Produces a new collection of values by mapping each value in `coll` through + * the `iteratee` function. The `iteratee` is called with an item from `coll` + * and a callback for when it has finished processing. Each of these callback + * takes 2 arguments: an `error`, and the transformed item from `coll`. If + * `iteratee` passes an error to its callback, the main `callback` (for the + * `map` function) is immediately called with the error. + * + * Note, that since this function applies the `iteratee` to each item in + * parallel, there is no guarantee that the `iteratee` functions will complete + * in order. However, the results array will be in the same order as the + * original `coll`. + * + * If `map` is passed an Object, the results will be an Array. The results + * will roughly be in the order of the original Objects' keys (but this can + * vary across JavaScript engines). + * + * @name map + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with the transformed item. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an Array of the + * transformed items from the `coll`. Invoked with (err, results). + * @example + * + * async.map(['file1','file2','file3'], fs.stat, function(err, results) { + * // results is now an array of stats for each file + * }); + */ +var map = doParallel(_asyncMap); + +/** + * Applies the provided arguments to each function in the array, calling + * `callback` after all functions have completed. If you only provide the first + * argument, `fns`, then it will return a function which lets you pass in the + * arguments as if it were a single function call. If more arguments are + * provided, `callback` is required while `args` is still optional. + * + * @name applyEach + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s + * to all call with the same arguments + * @param {...*} [args] - any number of separate arguments to pass to the + * function. + * @param {Function} [callback] - the final argument should be the callback, + * called when all functions have completed processing. + * @returns {Function} - If only the first argument, `fns`, is provided, it will + * return a function which lets you pass in the arguments as if it were a single + * function call. The signature is `(..args, callback)`. If invoked with any + * arguments, `callback` is required. + * @example + * + * async.applyEach([enableSearch, updateSchema], 'bucket', callback); + * + * // partial application example: + * async.each( + * buckets, + * async.applyEach([enableSearch, updateSchema]), + * callback + * ); + */ +var applyEach = applyEach$1(map); + +function doParallelLimit(fn) { + return function (obj, limit, iteratee, callback) { + return fn(_eachOfLimit(limit), obj, wrapAsync(iteratee), callback); + }; +} + +/** + * The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time. + * + * @name mapLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.map]{@link module:Collections.map} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with the transformed item. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an array of the + * transformed items from the `coll`. Invoked with (err, results). + */ +var mapLimit = doParallelLimit(_asyncMap); + +/** + * The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time. + * + * @name mapSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.map]{@link module:Collections.map} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with the transformed item. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Results is an array of the + * transformed items from the `coll`. Invoked with (err, results). + */ +var mapSeries = doLimit(mapLimit, 1); + +/** + * The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time. + * + * @name applyEachSeries + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.applyEach]{@link module:ControlFlow.applyEach} + * @category Control Flow + * @param {Array|Iterable|Object} fns - A collection of {@link AsyncFunction}s to all + * call with the same arguments + * @param {...*} [args] - any number of separate arguments to pass to the + * function. + * @param {Function} [callback] - the final argument should be the callback, + * called when all functions have completed processing. + * @returns {Function} - If only the first argument is provided, it will return + * a function which lets you pass in the arguments as if it were a single + * function call. + */ +var applyEachSeries = applyEach$1(mapSeries); + +/** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; +} + +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +/** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); +} + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} + +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +/** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} + +/** + * Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on + * their requirements. Each function can optionally depend on other functions + * being completed first, and each function is run as soon as its requirements + * are satisfied. + * + * If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence + * will stop. Further tasks will not execute (so any other functions depending + * on it will not run), and the main `callback` is immediately called with the + * error. + * + * {@link AsyncFunction}s also receive an object containing the results of functions which + * have completed so far as the first argument, if they have dependencies. If a + * task function has no dependencies, it will only be passed a callback. + * + * @name auto + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Object} tasks - An object. Each of its properties is either a + * function or an array of requirements, with the {@link AsyncFunction} itself the last item + * in the array. The object's key of a property serves as the name of the task + * defined by that property, i.e. can be used when specifying requirements for + * other tasks. The function receives one or two arguments: + * * a `results` object, containing the results of the previously executed + * functions, only passed if the task has any dependencies, + * * a `callback(err, result)` function, which must be called when finished, + * passing an `error` (which can be `null`) and the result of the function's + * execution. + * @param {number} [concurrency=Infinity] - An optional `integer` for + * determining the maximum number of tasks that can be run in parallel. By + * default, as many as possible. + * @param {Function} [callback] - An optional callback which is called when all + * the tasks have been completed. It receives the `err` argument if any `tasks` + * pass an error to their callback. Results are always returned; however, if an + * error occurs, no further `tasks` will be performed, and the results object + * will only contain partial results. Invoked with (err, results). + * @returns undefined + * @example + * + * async.auto({ + * // this function will just be passed a callback + * readData: async.apply(fs.readFile, 'data.txt', 'utf-8'), + * showData: ['readData', function(results, cb) { + * // results.readData is the file's contents + * // ... + * }] + * }, callback); + * + * async.auto({ + * get_data: function(callback) { + * console.log('in get_data'); + * // async code to get some data + * callback(null, 'data', 'converted to array'); + * }, + * make_folder: function(callback) { + * console.log('in make_folder'); + * // async code to create a directory to store a file in + * // this is run at the same time as getting the data + * callback(null, 'folder'); + * }, + * write_file: ['get_data', 'make_folder', function(results, callback) { + * console.log('in write_file', JSON.stringify(results)); + * // once there is some data and the directory exists, + * // write the data to a file in the directory + * callback(null, 'filename'); + * }], + * email_link: ['write_file', function(results, callback) { + * console.log('in email_link', JSON.stringify(results)); + * // once the file is written let's email a link to it... + * // results.write_file contains the filename returned by write_file. + * callback(null, {'file':results.write_file, 'email':'user@example.com'}); + * }] + * }, function(err, results) { + * console.log('err = ', err); + * console.log('results = ', results); + * }); + */ +var auto = function (tasks, concurrency, callback) { + if (typeof concurrency === 'function') { + // concurrency is optional, shift the args. + callback = concurrency; + concurrency = null; + } + callback = once(callback || noop); + var keys$$1 = keys(tasks); + var numTasks = keys$$1.length; + if (!numTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = numTasks; + } + + var results = {}; + var runningTasks = 0; + var hasError = false; + + var listeners = Object.create(null); + + var readyTasks = []; + + // for cycle detection: + var readyToCheck = []; // tasks that have been identified as reachable + // without the possibility of returning to an ancestor task + var uncheckedDependencies = {}; + + baseForOwn(tasks, function (task, key) { + if (!isArray(task)) { + // no dependencies + enqueueTask(key, [task]); + readyToCheck.push(key); + return; + } + + var dependencies = task.slice(0, task.length - 1); + var remainingDependencies = dependencies.length; + if (remainingDependencies === 0) { + enqueueTask(key, task); + readyToCheck.push(key); + return; + } + uncheckedDependencies[key] = remainingDependencies; + + arrayEach(dependencies, function (dependencyName) { + if (!tasks[dependencyName]) { + throw new Error('async.auto task `' + key + + '` has a non-existent dependency `' + + dependencyName + '` in ' + + dependencies.join(', ')); + } + addListener(dependencyName, function () { + remainingDependencies--; + if (remainingDependencies === 0) { + enqueueTask(key, task); + } + }); + }); + }); + + checkForDeadlocks(); + processQueue(); + + function enqueueTask(key, task) { + readyTasks.push(function () { + runTask(key, task); + }); + } + + function processQueue() { + if (readyTasks.length === 0 && runningTasks === 0) { + return callback(null, results); + } + while(readyTasks.length && runningTasks < concurrency) { + var run = readyTasks.shift(); + run(); + } + + } + + function addListener(taskName, fn) { + var taskListeners = listeners[taskName]; + if (!taskListeners) { + taskListeners = listeners[taskName] = []; + } + + taskListeners.push(fn); + } + + function taskComplete(taskName) { + var taskListeners = listeners[taskName] || []; + arrayEach(taskListeners, function (fn) { + fn(); + }); + processQueue(); + } + + + function runTask(key, task) { + if (hasError) return; + + var taskCallback = onlyOnce(function(err, result) { + runningTasks--; + if (arguments.length > 2) { + result = slice(arguments, 1); + } + if (err) { + var safeResults = {}; + baseForOwn(results, function(val, rkey) { + safeResults[rkey] = val; + }); + safeResults[key] = result; + hasError = true; + listeners = Object.create(null); + + callback(err, safeResults); + } else { + results[key] = result; + taskComplete(key); + } + }); + + runningTasks++; + var taskFn = wrapAsync(task[task.length - 1]); + if (task.length > 1) { + taskFn(results, taskCallback); + } else { + taskFn(taskCallback); + } + } + + function checkForDeadlocks() { + // Kahn's algorithm + // https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm + // http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html + var currentTask; + var counter = 0; + while (readyToCheck.length) { + currentTask = readyToCheck.pop(); + counter++; + arrayEach(getDependents(currentTask), function (dependent) { + if (--uncheckedDependencies[dependent] === 0) { + readyToCheck.push(dependent); + } + }); + } + + if (counter !== numTasks) { + throw new Error( + 'async.auto cannot execute tasks due to a recursive dependency' + ); + } + } + + function getDependents(taskName) { + var result = []; + baseForOwn(tasks, function (task, key) { + if (isArray(task) && baseIndexOf(task, taskName, 0) >= 0) { + result.push(key); + } + }); + return result; + } +}; + +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} + +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; + +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined; +var symbolToString = symbolProto ? symbolProto.toString : undefined; + +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; +} + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff'; +var rsComboMarksRange = '\\u0300-\\u036f'; +var reComboHalfMarksRange = '\\ufe20-\\ufe2f'; +var rsComboSymbolsRange = '\\u20d0-\\u20ff'; +var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; +var rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +/** Used to compose unicode character classes. */ +var rsAstralRange$1 = '\\ud800-\\udfff'; +var rsComboMarksRange$1 = '\\u0300-\\u036f'; +var reComboHalfMarksRange$1 = '\\ufe20-\\ufe2f'; +var rsComboSymbolsRange$1 = '\\u20d0-\\u20ff'; +var rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1; +var rsVarRange$1 = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange$1 + ']'; +var rsCombo = '[' + rsComboRange$1 + ']'; +var rsFitz = '\\ud83c[\\udffb-\\udfff]'; +var rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')'; +var rsNonAstral = '[^' + rsAstralRange$1 + ']'; +var rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'; +var rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'; +var rsZWJ$1 = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?'; +var rsOptVar = '[' + rsVarRange$1 + ']?'; +var rsOptJoin = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*'; +var rsSeq = rsOptVar + reOptMod + rsOptJoin; +var rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +/** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ +function toString(value) { + return value == null ? '' : baseToString(value); +} + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; + +/** + * Removes leading and trailing whitespace or specified characters from `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] + */ +function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); +} + +var FN_ARGS = /^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m; +var FN_ARG_SPLIT = /,/; +var FN_ARG = /(=.+)?(\s*)$/; +var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; + +function parseParams(func) { + func = func.toString().replace(STRIP_COMMENTS, ''); + func = func.match(FN_ARGS)[2].replace(' ', ''); + func = func ? func.split(FN_ARG_SPLIT) : []; + func = func.map(function (arg){ + return trim(arg.replace(FN_ARG, '')); + }); + return func; +} + +/** + * A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent + * tasks are specified as parameters to the function, after the usual callback + * parameter, with the parameter names matching the names of the tasks it + * depends on. This can provide even more readable task graphs which can be + * easier to maintain. + * + * If a final callback is specified, the task results are similarly injected, + * specified as named parameters after the initial error parameter. + * + * The autoInject function is purely syntactic sugar and its semantics are + * otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}. + * + * @name autoInject + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.auto]{@link module:ControlFlow.auto} + * @category Control Flow + * @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of + * the form 'func([dependencies...], callback). The object's key of a property + * serves as the name of the task defined by that property, i.e. can be used + * when specifying requirements for other tasks. + * * The `callback` parameter is a `callback(err, result)` which must be called + * when finished, passing an `error` (which can be `null`) and the result of + * the function's execution. The remaining parameters name other tasks on + * which the task is dependent, and the results from those tasks are the + * arguments of those parameters. + * @param {Function} [callback] - An optional callback which is called when all + * the tasks have been completed. It receives the `err` argument if any `tasks` + * pass an error to their callback, and a `results` object with any completed + * task results, similar to `auto`. + * @example + * + * // The example from `auto` can be rewritten as follows: + * async.autoInject({ + * get_data: function(callback) { + * // async code to get some data + * callback(null, 'data', 'converted to array'); + * }, + * make_folder: function(callback) { + * // async code to create a directory to store a file in + * // this is run at the same time as getting the data + * callback(null, 'folder'); + * }, + * write_file: function(get_data, make_folder, callback) { + * // once there is some data and the directory exists, + * // write the data to a file in the directory + * callback(null, 'filename'); + * }, + * email_link: function(write_file, callback) { + * // once the file is written let's email a link to it... + * // write_file contains the filename returned by write_file. + * callback(null, {'file':write_file, 'email':'user@example.com'}); + * } + * }, function(err, results) { + * console.log('err = ', err); + * console.log('email_link = ', results.email_link); + * }); + * + * // If you are using a JS minifier that mangles parameter names, `autoInject` + * // will not work with plain functions, since the parameter names will be + * // collapsed to a single letter identifier. To work around this, you can + * // explicitly specify the names of the parameters your task function needs + * // in an array, similar to Angular.js dependency injection. + * + * // This still has an advantage over plain `auto`, since the results a task + * // depends on are still spread into arguments. + * async.autoInject({ + * //... + * write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) { + * callback(null, 'filename'); + * }], + * email_link: ['write_file', function(write_file, callback) { + * callback(null, {'file':write_file, 'email':'user@example.com'}); + * }] + * //... + * }, function(err, results) { + * console.log('err = ', err); + * console.log('email_link = ', results.email_link); + * }); + */ +function autoInject(tasks, callback) { + var newTasks = {}; + + baseForOwn(tasks, function (taskFn, key) { + var params; + var fnIsAsync = isAsync(taskFn); + var hasNoDeps = + (!fnIsAsync && taskFn.length === 1) || + (fnIsAsync && taskFn.length === 0); + + if (isArray(taskFn)) { + params = taskFn.slice(0, -1); + taskFn = taskFn[taskFn.length - 1]; + + newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); + } else if (hasNoDeps) { + // no dependencies, use the function as-is + newTasks[key] = taskFn; + } else { + params = parseParams(taskFn); + if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { + throw new Error("autoInject task functions require explicit parameters."); + } + + // remove callback param + if (!fnIsAsync) params.pop(); + + newTasks[key] = params.concat(newTask); + } + + function newTask(results, taskCb) { + var newArgs = arrayMap(params, function (name) { + return results[name]; + }); + newArgs.push(taskCb); + wrapAsync(taskFn).apply(null, newArgs); + } + }); + + auto(newTasks, callback); +} + +// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation +// used for queues. This implementation assumes that the node provided by the user can be modified +// to adjust the next and last properties. We implement only the minimal functionality +// for queue support. +function DLL() { + this.head = this.tail = null; + this.length = 0; +} + +function setInitial(dll, node) { + dll.length = 1; + dll.head = dll.tail = node; +} + +DLL.prototype.removeLink = function(node) { + if (node.prev) node.prev.next = node.next; + else this.head = node.next; + if (node.next) node.next.prev = node.prev; + else this.tail = node.prev; + + node.prev = node.next = null; + this.length -= 1; + return node; +}; + +DLL.prototype.empty = function () { + while(this.head) this.shift(); + return this; +}; + +DLL.prototype.insertAfter = function(node, newNode) { + newNode.prev = node; + newNode.next = node.next; + if (node.next) node.next.prev = newNode; + else this.tail = newNode; + node.next = newNode; + this.length += 1; +}; + +DLL.prototype.insertBefore = function(node, newNode) { + newNode.prev = node.prev; + newNode.next = node; + if (node.prev) node.prev.next = newNode; + else this.head = newNode; + node.prev = newNode; + this.length += 1; +}; + +DLL.prototype.unshift = function(node) { + if (this.head) this.insertBefore(this.head, node); + else setInitial(this, node); +}; + +DLL.prototype.push = function(node) { + if (this.tail) this.insertAfter(this.tail, node); + else setInitial(this, node); +}; + +DLL.prototype.shift = function() { + return this.head && this.removeLink(this.head); +}; + +DLL.prototype.pop = function() { + return this.tail && this.removeLink(this.tail); +}; + +DLL.prototype.toArray = function () { + var arr = Array(this.length); + var curr = this.head; + for(var idx = 0; idx < this.length; idx++) { + arr[idx] = curr.data; + curr = curr.next; + } + return arr; +}; + +DLL.prototype.remove = function (testFn) { + var curr = this.head; + while(!!curr) { + var next = curr.next; + if (testFn(curr)) { + this.removeLink(curr); + } + curr = next; + } + return this; +}; + +function queue(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } + else if(concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + + var _worker = wrapAsync(worker); + var numRunning = 0; + var workersList = []; + + var processingScheduled = false; + function _insert(data, insertAtFront, callback) { + if (callback != null && typeof callback !== 'function') { + throw new Error('task callback must be a function'); + } + q.started = true; + if (!isArray(data)) { + data = [data]; + } + if (data.length === 0 && q.idle()) { + // call drain immediately if there are no tasks + return setImmediate$1(function() { + q.drain(); + }); + } + + for (var i = 0, l = data.length; i < l; i++) { + var item = { + data: data[i], + callback: callback || noop + }; + + if (insertAtFront) { + q._tasks.unshift(item); + } else { + q._tasks.push(item); + } + } + + if (!processingScheduled) { + processingScheduled = true; + setImmediate$1(function() { + processingScheduled = false; + q.process(); + }); + } + } + + function _next(tasks) { + return function(err){ + numRunning -= 1; + + for (var i = 0, l = tasks.length; i < l; i++) { + var task = tasks[i]; + + var index = baseIndexOf(workersList, task, 0); + if (index === 0) { + workersList.shift(); + } else if (index > 0) { + workersList.splice(index, 1); + } + + task.callback.apply(task, arguments); + + if (err != null) { + q.error(err, task.data); + } + } + + if (numRunning <= (q.concurrency - q.buffer) ) { + q.unsaturated(); + } + + if (q.idle()) { + q.drain(); + } + q.process(); + }; + } + + var isProcessing = false; + var q = { + _tasks: new DLL(), + concurrency: concurrency, + payload: payload, + saturated: noop, + unsaturated:noop, + buffer: concurrency / 4, + empty: noop, + drain: noop, + error: noop, + started: false, + paused: false, + push: function (data, callback) { + _insert(data, false, callback); + }, + kill: function () { + q.drain = noop; + q._tasks.empty(); + }, + unshift: function (data, callback) { + _insert(data, true, callback); + }, + remove: function (testFn) { + q._tasks.remove(testFn); + }, + process: function () { + // Avoid trying to start too many processing operations. This can occur + // when callbacks resolve synchronously (#1267). + if (isProcessing) { + return; + } + isProcessing = true; + while(!q.paused && numRunning < q.concurrency && q._tasks.length){ + var tasks = [], data = []; + var l = q._tasks.length; + if (q.payload) l = Math.min(l, q.payload); + for (var i = 0; i < l; i++) { + var node = q._tasks.shift(); + tasks.push(node); + workersList.push(node); + data.push(node.data); + } + + numRunning += 1; + + if (q._tasks.length === 0) { + q.empty(); + } + + if (numRunning === q.concurrency) { + q.saturated(); + } + + var cb = onlyOnce(_next(tasks)); + _worker(data, cb); + } + isProcessing = false; + }, + length: function () { + return q._tasks.length; + }, + running: function () { + return numRunning; + }, + workersList: function () { + return workersList; + }, + idle: function() { + return q._tasks.length + numRunning === 0; + }, + pause: function () { + q.paused = true; + }, + resume: function () { + if (q.paused === false) { return; } + q.paused = false; + setImmediate$1(q.process); + } + }; + return q; +} + +/** + * A cargo of tasks for the worker function to complete. Cargo inherits all of + * the same methods and event callbacks as [`queue`]{@link module:ControlFlow.queue}. + * @typedef {Object} CargoObject + * @memberOf module:ControlFlow + * @property {Function} length - A function returning the number of items + * waiting to be processed. Invoke like `cargo.length()`. + * @property {number} payload - An `integer` for determining how many tasks + * should be process per round. This property can be changed after a `cargo` is + * created to alter the payload on-the-fly. + * @property {Function} push - Adds `task` to the `queue`. The callback is + * called once the `worker` has finished processing the task. Instead of a + * single task, an array of `tasks` can be submitted. The respective callback is + * used for every task in the list. Invoke like `cargo.push(task, [callback])`. + * @property {Function} saturated - A callback that is called when the + * `queue.length()` hits the concurrency and further tasks will be queued. + * @property {Function} empty - A callback that is called when the last item + * from the `queue` is given to a `worker`. + * @property {Function} drain - A callback that is called when the last item + * from the `queue` has returned from the `worker`. + * @property {Function} idle - a function returning false if there are items + * waiting or being processed, or true if not. Invoke like `cargo.idle()`. + * @property {Function} pause - a function that pauses the processing of tasks + * until `resume()` is called. Invoke like `cargo.pause()`. + * @property {Function} resume - a function that resumes the processing of + * queued tasks when the queue is paused. Invoke like `cargo.resume()`. + * @property {Function} kill - a function that removes the `drain` callback and + * empties remaining tasks from the queue forcing it to go idle. Invoke like `cargo.kill()`. + */ + +/** + * Creates a `cargo` object with the specified payload. Tasks added to the + * cargo will be processed altogether (up to the `payload` limit). If the + * `worker` is in progress, the task is queued until it becomes available. Once + * the `worker` has completed some tasks, each callback of those tasks is + * called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) + * for how `cargo` and `queue` work. + * + * While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers + * at a time, cargo passes an array of tasks to a single worker, repeating + * when the worker is finished. + * + * @name cargo + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.queue]{@link module:ControlFlow.queue} + * @category Control Flow + * @param {AsyncFunction} worker - An asynchronous function for processing an array + * of queued tasks. Invoked with `(tasks, callback)`. + * @param {number} [payload=Infinity] - An optional `integer` for determining + * how many tasks should be processed per round; if omitted, the default is + * unlimited. + * @returns {module:ControlFlow.CargoObject} A cargo object to manage the tasks. Callbacks can + * attached as certain properties to listen for specific events during the + * lifecycle of the cargo and inner queue. + * @example + * + * // create a cargo object with payload 2 + * var cargo = async.cargo(function(tasks, callback) { + * for (var i=0; i true + */ +function identity(value) { + return value; +} + +function _createTester(check, getResult) { + return function(eachfn, arr, iteratee, cb) { + cb = cb || noop; + var testPassed = false; + var testResult; + eachfn(arr, function(value, _, callback) { + iteratee(value, function(err, result) { + if (err) { + callback(err); + } else if (check(result) && !testResult) { + testPassed = true; + testResult = getResult(true, value); + callback(null, breakLoop); + } else { + callback(); + } + }); + }, function(err) { + if (err) { + cb(err); + } else { + cb(null, testPassed ? testResult : getResult(false)); + } + }); + }; +} + +function _findGetResult(v, x) { + return x; +} + +/** + * Returns the first value in `coll` that passes an async truth test. The + * `iteratee` is applied in parallel, meaning the first iteratee to return + * `true` will fire the detect `callback` with that result. That means the + * result might not be the first item in the original `coll` (in terms of order) + * that passes the test. + + * If order within the original `coll` is important, then look at + * [`detectSeries`]{@link module:Collections.detectSeries}. + * + * @name detect + * @static + * @memberOf module:Collections + * @method + * @alias find + * @category Collections + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. + * The iteratee must complete with a boolean value as its result. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + * @example + * + * async.detect(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // result now equals the first file in the list that exists + * }); + */ +var detect = doParallel(_createTester(identity, _findGetResult)); + +/** + * The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a + * time. + * + * @name detectLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.detect]{@link module:Collections.detect} + * @alias findLimit + * @category Collections + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. + * The iteratee must complete with a boolean value as its result. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + */ +var detectLimit = doParallelLimit(_createTester(identity, _findGetResult)); + +/** + * The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time. + * + * @name detectSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.detect]{@link module:Collections.detect} + * @alias findSeries + * @category Collections + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`. + * The iteratee must complete with a boolean value as its result. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the `iteratee` functions have finished. + * Result will be the first item in the array that passes the truth test + * (iteratee) or the value `undefined` if none passed. Invoked with + * (err, result). + */ +var detectSeries = doLimit(detectLimit, 1); + +function consoleFunc(name) { + return function (fn/*, ...args*/) { + var args = slice(arguments, 1); + args.push(function (err/*, ...args*/) { + var args = slice(arguments, 1); + if (typeof console === 'object') { + if (err) { + if (console.error) { + console.error(err); + } + } else if (console[name]) { + arrayEach(args, function (x) { + console[name](x); + }); + } + } + }); + wrapAsync(fn).apply(null, args); + }; +} + +/** + * Logs the result of an [`async` function]{@link AsyncFunction} to the + * `console` using `console.dir` to display the properties of the resulting object. + * Only works in Node.js or in browsers that support `console.dir` and + * `console.error` (such as FF and Chrome). + * If multiple arguments are returned from the async function, + * `console.dir` is called on each argument in order. + * + * @name dir + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} function - The function you want to eventually apply + * all arguments to. + * @param {...*} arguments... - Any number of arguments to apply to the function. + * @example + * + * // in a module + * var hello = function(name, callback) { + * setTimeout(function() { + * callback(null, {hello: name}); + * }, 1000); + * }; + * + * // in the node repl + * node> async.dir(hello, 'world'); + * {hello: 'world'} + */ +var dir = consoleFunc('dir'); + +/** + * The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in + * the order of operations, the arguments `test` and `fn` are switched. + * + * Also a version of [`doWhilst`]{@link module:ControlFlow.doWhilst} with asynchronous `test` function. + * @name doDuring + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.during]{@link module:ControlFlow.during} + * @category Control Flow + * @param {AsyncFunction} fn - An async function which is called each time + * `test` passes. Invoked with (callback). + * @param {AsyncFunction} test - asynchronous truth test to perform before each + * execution of `fn`. Invoked with (...args, callback), where `...args` are the + * non-error args from the previous callback of `fn`. + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error if one occurred, otherwise `null`. + */ +function doDuring(fn, test, callback) { + callback = onlyOnce(callback || noop); + var _fn = wrapAsync(fn); + var _test = wrapAsync(test); + + function next(err/*, ...args*/) { + if (err) return callback(err); + var args = slice(arguments, 1); + args.push(check); + _test.apply(this, args); + } + + function check(err, truth) { + if (err) return callback(err); + if (!truth) return callback(null); + _fn(next); + } + + check(null, true); + +} + +/** + * The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in + * the order of operations, the arguments `test` and `iteratee` are switched. + * + * `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + * + * @name doWhilst + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.whilst]{@link module:ControlFlow.whilst} + * @category Control Flow + * @param {AsyncFunction} iteratee - A function which is called each time `test` + * passes. Invoked with (callback). + * @param {Function} test - synchronous truth test to perform after each + * execution of `iteratee`. Invoked with any non-error callback results of + * `iteratee`. + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `iteratee` has stopped. + * `callback` will be passed an error and any arguments passed to the final + * `iteratee`'s callback. Invoked with (err, [results]); + */ +function doWhilst(iteratee, test, callback) { + callback = onlyOnce(callback || noop); + var _iteratee = wrapAsync(iteratee); + var next = function(err/*, ...args*/) { + if (err) return callback(err); + var args = slice(arguments, 1); + if (test.apply(this, args)) return _iteratee(next); + callback.apply(null, [null].concat(args)); + }; + _iteratee(next); +} + +/** + * Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the + * argument ordering differs from `until`. + * + * @name doUntil + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.doWhilst]{@link module:ControlFlow.doWhilst} + * @category Control Flow + * @param {AsyncFunction} iteratee - An async function which is called each time + * `test` fails. Invoked with (callback). + * @param {Function} test - synchronous truth test to perform after each + * execution of `iteratee`. Invoked with any non-error callback results of + * `iteratee`. + * @param {Function} [callback] - A callback which is called after the test + * function has passed and repeated execution of `iteratee` has stopped. `callback` + * will be passed an error and any arguments passed to the final `iteratee`'s + * callback. Invoked with (err, [results]); + */ +function doUntil(iteratee, test, callback) { + doWhilst(iteratee, function() { + return !test.apply(this, arguments); + }, callback); +} + +/** + * Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that + * is passed a callback in the form of `function (err, truth)`. If error is + * passed to `test` or `fn`, the main callback is immediately called with the + * value of the error. + * + * @name during + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.whilst]{@link module:ControlFlow.whilst} + * @category Control Flow + * @param {AsyncFunction} test - asynchronous truth test to perform before each + * execution of `fn`. Invoked with (callback). + * @param {AsyncFunction} fn - An async function which is called each time + * `test` passes. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `fn` has stopped. `callback` + * will be passed an error, if one occurred, otherwise `null`. + * @example + * + * var count = 0; + * + * async.during( + * function (callback) { + * return callback(null, count < 5); + * }, + * function (callback) { + * count++; + * setTimeout(callback, 1000); + * }, + * function (err) { + * // 5 seconds have passed + * } + * ); + */ +function during(test, fn, callback) { + callback = onlyOnce(callback || noop); + var _fn = wrapAsync(fn); + var _test = wrapAsync(test); + + function next(err) { + if (err) return callback(err); + _test(check); + } + + function check(err, truth) { + if (err) return callback(err); + if (!truth) return callback(null); + _fn(next); + } + + _test(check); +} + +function _withoutIndex(iteratee) { + return function (value, index, callback) { + return iteratee(value, callback); + }; +} + +/** + * Applies the function `iteratee` to each item in `coll`, in parallel. + * The `iteratee` is called with an item from the list, and a callback for when + * it has finished. If the `iteratee` passes an error to its `callback`, the + * main `callback` (for the `each` function) is immediately called with the + * error. + * + * Note, that since this function applies `iteratee` to each item in parallel, + * there is no guarantee that the iteratee functions will complete in order. + * + * @name each + * @static + * @memberOf module:Collections + * @method + * @alias forEach + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to + * each item in `coll`. Invoked with (item, callback). + * The array index is not passed to the iteratee. + * If you need the index, use `eachOf`. + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + * @example + * + * // assuming openFiles is an array of file names and saveFile is a function + * // to save the modified contents of that file: + * + * async.each(openFiles, saveFile, function(err){ + * // if any of the saves produced an error, err would equal that error + * }); + * + * // assuming openFiles is an array of file names + * async.each(openFiles, function(file, callback) { + * + * // Perform operation on file here. + * console.log('Processing file ' + file); + * + * if( file.length > 32 ) { + * console.log('This file name is too long'); + * callback('File name too long'); + * } else { + * // Do work to process file here + * console.log('File processed'); + * callback(); + * } + * }, function(err) { + * // if any of the file processing produced an error, err would equal that error + * if( err ) { + * // One of the iterations produced an error. + * // All processing will now stop. + * console.log('A file failed to process'); + * } else { + * console.log('All files have been processed successfully'); + * } + * }); + */ +function eachLimit(coll, iteratee, callback) { + eachOf(coll, _withoutIndex(wrapAsync(iteratee)), callback); +} + +/** + * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. + * + * @name eachLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfLimit`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +function eachLimit$1(coll, limit, iteratee, callback) { + _eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); +} + +/** + * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. + * + * @name eachSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each + * item in `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfSeries`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +var eachSeries = doLimit(eachLimit$1, 1); + +/** + * Wrap an async function and ensure it calls its callback on a later tick of + * the event loop. If the function already calls its callback on a next tick, + * no extra deferral is added. This is useful for preventing stack overflows + * (`RangeError: Maximum call stack size exceeded`) and generally keeping + * [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) + * contained. ES2017 `async` functions are returned as-is -- they are immune + * to Zalgo's corrupting influences, as they always resolve on a later tick. + * + * @name ensureAsync + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} fn - an async function, one that expects a node-style + * callback as its last argument. + * @returns {AsyncFunction} Returns a wrapped function with the exact same call + * signature as the function passed in. + * @example + * + * function sometimesAsync(arg, callback) { + * if (cache[arg]) { + * return callback(null, cache[arg]); // this would be synchronous!! + * } else { + * doSomeIO(arg, callback); // this IO would be asynchronous + * } + * } + * + * // this has a risk of stack overflows if many results are cached in a row + * async.mapSeries(args, sometimesAsync, done); + * + * // this will defer sometimesAsync's callback if necessary, + * // preventing stack overflows + * async.mapSeries(args, async.ensureAsync(sometimesAsync), done); + */ +function ensureAsync(fn) { + if (isAsync(fn)) return fn; + return initialParams(function (args, callback) { + var sync = true; + args.push(function () { + var innerArgs = arguments; + if (sync) { + setImmediate$1(function () { + callback.apply(null, innerArgs); + }); + } else { + callback.apply(null, innerArgs); + } + }); + fn.apply(this, args); + sync = false; + }); +} + +function notId(v) { + return !v; +} + +/** + * Returns `true` if every element in `coll` satisfies an async test. If any + * iteratee call returns `false`, the main `callback` is immediately called. + * + * @name every + * @static + * @memberOf module:Collections + * @method + * @alias all + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collection in parallel. + * The iteratee must complete with a boolean result value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + * @example + * + * async.every(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // if result is true then every file exists + * }); + */ +var every = doParallel(_createTester(notId, notId)); + +/** + * The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time. + * + * @name everyLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.every]{@link module:Collections.every} + * @alias allLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collection in parallel. + * The iteratee must complete with a boolean result value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + */ +var everyLimit = doParallelLimit(_createTester(notId, notId)); + +/** + * The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time. + * + * @name everySeries + * @static + * @memberOf module:Collections + * @method + * @see [async.every]{@link module:Collections.every} + * @alias allSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collection in series. + * The iteratee must complete with a boolean result value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result will be either `true` or `false` + * depending on the values of the async tests. Invoked with (err, result). + */ +var everySeries = doLimit(everyLimit, 1); + +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} + +function filterArray(eachfn, arr, iteratee, callback) { + var truthValues = new Array(arr.length); + eachfn(arr, function (x, index, callback) { + iteratee(x, function (err, v) { + truthValues[index] = !!v; + callback(err); + }); + }, function (err) { + if (err) return callback(err); + var results = []; + for (var i = 0; i < arr.length; i++) { + if (truthValues[i]) results.push(arr[i]); + } + callback(null, results); + }); +} + +function filterGeneric(eachfn, coll, iteratee, callback) { + var results = []; + eachfn(coll, function (x, index, callback) { + iteratee(x, function (err, v) { + if (err) { + callback(err); + } else { + if (v) { + results.push({index: index, value: x}); + } + callback(); + } + }); + }, function (err) { + if (err) { + callback(err); + } else { + callback(null, arrayMap(results.sort(function (a, b) { + return a.index - b.index; + }), baseProperty('value'))); + } + }); +} + +function _filter(eachfn, coll, iteratee, callback) { + var filter = isArrayLike(coll) ? filterArray : filterGeneric; + filter(eachfn, coll, wrapAsync(iteratee), callback || noop); +} + +/** + * Returns a new array of all the values in `coll` which pass an async truth + * test. This operation is performed in parallel, but the results array will be + * in the same order as the original. + * + * @name filter + * @static + * @memberOf module:Collections + * @method + * @alias select + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + * @example + * + * async.filter(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, results) { + * // results now equals an array of the existing files + * }); + */ +var filter = doParallel(_filter); + +/** + * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a + * time. + * + * @name filterLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.filter]{@link module:Collections.filter} + * @alias selectLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ +var filterLimit = doParallelLimit(_filter); + +/** + * The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time. + * + * @name filterSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.filter]{@link module:Collections.filter} + * @alias selectSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - A truth test to apply to each item in `coll`. + * The `iteratee` is passed a `callback(err, truthValue)`, which must be called + * with a boolean argument once it has completed. Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results) + */ +var filterSeries = doLimit(filterLimit, 1); + +/** + * Calls the asynchronous function `fn` with a callback parameter that allows it + * to call itself again, in series, indefinitely. + + * If an error is passed to the callback then `errback` is called with the + * error, and execution stops, otherwise it will never be called. + * + * @name forever + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {AsyncFunction} fn - an async function to call repeatedly. + * Invoked with (next). + * @param {Function} [errback] - when `fn` passes an error to it's callback, + * this function will be called, and execution stops. Invoked with (err). + * @example + * + * async.forever( + * function(next) { + * // next is suitable for passing to things that need a callback(err [, whatever]); + * // it will result in this function being called again. + * }, + * function(err) { + * // if next is called with a value in its first parameter, it will appear + * // in here as 'err', and execution will stop. + * } + * ); + */ +function forever(fn, errback) { + var done = onlyOnce(errback || noop); + var task = wrapAsync(ensureAsync(fn)); + + function next(err) { + if (err) return done(err); + task(next); + } + next(); +} + +/** + * The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time. + * + * @name groupByLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.groupBy]{@link module:Collections.groupBy} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a `key` to group the value under. + * Invoked with (value, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Result is an `Object` whoses + * properties are arrays of values which returned the corresponding key. + */ +var groupByLimit = function(coll, limit, iteratee, callback) { + callback = callback || noop; + var _iteratee = wrapAsync(iteratee); + mapLimit(coll, limit, function(val, callback) { + _iteratee(val, function(err, key) { + if (err) return callback(err); + return callback(null, {key: key, val: val}); + }); + }, function(err, mapResults) { + var result = {}; + // from MDN, handle object having an `hasOwnProperty` prop + var hasOwnProperty = Object.prototype.hasOwnProperty; + + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + var key = mapResults[i].key; + var val = mapResults[i].val; + + if (hasOwnProperty.call(result, key)) { + result[key].push(val); + } else { + result[key] = [val]; + } + } + } + + return callback(err, result); + }); +}; + +/** + * Returns a new object, where each value corresponds to an array of items, from + * `coll`, that returned the corresponding key. That is, the keys of the object + * correspond to the values passed to the `iteratee` callback. + * + * Note: Since this function applies the `iteratee` to each item in parallel, + * there is no guarantee that the `iteratee` functions will complete in order. + * However, the values for each key in the `result` will be in the same order as + * the original `coll`. For Objects, the values will roughly be in the order of + * the original Objects' keys (but this can vary across JavaScript engines). + * + * @name groupBy + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a `key` to group the value under. + * Invoked with (value, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Result is an `Object` whoses + * properties are arrays of values which returned the corresponding key. + * @example + * + * async.groupBy(['userId1', 'userId2', 'userId3'], function(userId, callback) { + * db.findById(userId, function(err, user) { + * if (err) return callback(err); + * return callback(null, user.age); + * }); + * }, function(err, result) { + * // result is object containing the userIds grouped by age + * // e.g. { 30: ['userId1', 'userId3'], 42: ['userId2']}; + * }); + */ +var groupBy = doLimit(groupByLimit, Infinity); + +/** + * The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time. + * + * @name groupBySeries + * @static + * @memberOf module:Collections + * @method + * @see [async.groupBy]{@link module:Collections.groupBy} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a `key` to group the value under. + * Invoked with (value, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. Result is an `Object` whoses + * properties are arrays of values which returned the corresponding key. + */ +var groupBySeries = doLimit(groupByLimit, 1); + +/** + * Logs the result of an `async` function to the `console`. Only works in + * Node.js or in browsers that support `console.log` and `console.error` (such + * as FF and Chrome). If multiple arguments are returned from the async + * function, `console.log` is called on each argument in order. + * + * @name log + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} function - The function you want to eventually apply + * all arguments to. + * @param {...*} arguments... - Any number of arguments to apply to the function. + * @example + * + * // in a module + * var hello = function(name, callback) { + * setTimeout(function() { + * callback(null, 'hello ' + name); + * }, 1000); + * }; + * + * // in the node repl + * node> async.log(hello, 'world'); + * 'hello world' + */ +var log = consoleFunc('log'); + +/** + * The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a + * time. + * + * @name mapValuesLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.mapValues]{@link module:Collections.mapValues} + * @category Collection + * @param {Object} obj - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - A function to apply to each value and key + * in `coll`. + * The iteratee should complete with the transformed value as its result. + * Invoked with (value, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). + */ +function mapValuesLimit(obj, limit, iteratee, callback) { + callback = once(callback || noop); + var newObj = {}; + var _iteratee = wrapAsync(iteratee); + eachOfLimit(obj, limit, function(val, key, next) { + _iteratee(val, key, function (err, result) { + if (err) return next(err); + newObj[key] = result; + next(); + }); + }, function (err) { + callback(err, newObj); + }); +} + +/** + * A relative of [`map`]{@link module:Collections.map}, designed for use with objects. + * + * Produces a new Object by mapping each value of `obj` through the `iteratee` + * function. The `iteratee` is called each `value` and `key` from `obj` and a + * callback for when it has finished processing. Each of these callbacks takes + * two arguments: an `error`, and the transformed item from `obj`. If `iteratee` + * passes an error to its callback, the main `callback` (for the `mapValues` + * function) is immediately called with the error. + * + * Note, the order of the keys in the result is not guaranteed. The keys will + * be roughly in the order they complete, (but this is very engine-specific) + * + * @name mapValues + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Object} obj - A collection to iterate over. + * @param {AsyncFunction} iteratee - A function to apply to each value and key + * in `coll`. + * The iteratee should complete with the transformed value as its result. + * Invoked with (value, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). + * @example + * + * async.mapValues({ + * f1: 'file1', + * f2: 'file2', + * f3: 'file3' + * }, function (file, key, callback) { + * fs.stat(file, callback); + * }, function(err, result) { + * // result is now a map of stats for each file, e.g. + * // { + * // f1: [stats for file1], + * // f2: [stats for file2], + * // f3: [stats for file3] + * // } + * }); + */ + +var mapValues = doLimit(mapValuesLimit, Infinity); + +/** + * The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time. + * + * @name mapValuesSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.mapValues]{@link module:Collections.mapValues} + * @category Collection + * @param {Object} obj - A collection to iterate over. + * @param {AsyncFunction} iteratee - A function to apply to each value and key + * in `coll`. + * The iteratee should complete with the transformed value as its result. + * Invoked with (value, key, callback). + * @param {Function} [callback] - A callback which is called when all `iteratee` + * functions have finished, or an error occurs. `result` is a new object consisting + * of each key from `obj`, with each transformed value on the right-hand side. + * Invoked with (err, result). + */ +var mapValuesSeries = doLimit(mapValuesLimit, 1); + +function has(obj, key) { + return key in obj; +} + +/** + * Caches the results of an async function. When creating a hash to store + * function results against, the callback is omitted from the hash and an + * optional hash function can be used. + * + * If no hash function is specified, the first argument is used as a hash key, + * which may work reasonably if it is a string or a data type that converts to a + * distinct string. Note that objects and arrays will not behave reasonably. + * Neither will cases where the other arguments are significant. In such cases, + * specify your own hash function. + * + * The cache of results is exposed as the `memo` property of the function + * returned by `memoize`. + * + * @name memoize + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} fn - The async function to proxy and cache results from. + * @param {Function} hasher - An optional function for generating a custom hash + * for storing results. It has all the arguments applied to it apart from the + * callback, and must be synchronous. + * @returns {AsyncFunction} a memoized version of `fn` + * @example + * + * var slow_fn = function(name, callback) { + * // do something + * callback(null, result); + * }; + * var fn = async.memoize(slow_fn); + * + * // fn can now be used as if it were slow_fn + * fn('some name', function() { + * // callback + * }); + */ +function memoize(fn, hasher) { + var memo = Object.create(null); + var queues = Object.create(null); + hasher = hasher || identity; + var _fn = wrapAsync(fn); + var memoized = initialParams(function memoized(args, callback) { + var key = hasher.apply(null, args); + if (has(memo, key)) { + setImmediate$1(function() { + callback.apply(null, memo[key]); + }); + } else if (has(queues, key)) { + queues[key].push(callback); + } else { + queues[key] = [callback]; + _fn.apply(null, args.concat(function(/*args*/) { + var args = slice(arguments); + memo[key] = args; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, args); + } + })); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; +} + +/** + * Calls `callback` on a later loop around the event loop. In Node.js this just + * calls `process.nextTick`. In the browser it will use `setImmediate` if + * available, otherwise `setTimeout(callback, 0)`, which means other higher + * priority events may precede the execution of `callback`. + * + * This is used internally for browser-compatibility purposes. + * + * @name nextTick + * @static + * @memberOf module:Utils + * @method + * @see [async.setImmediate]{@link module:Utils.setImmediate} + * @category Util + * @param {Function} callback - The function to call on a later loop around + * the event loop. Invoked with (args...). + * @param {...*} args... - any number of additional arguments to pass to the + * callback on the next tick. + * @example + * + * var call_order = []; + * async.nextTick(function() { + * call_order.push('two'); + * // call_order now equals ['one','two'] + * }); + * call_order.push('one'); + * + * async.setImmediate(function (a, b, c) { + * // a, b, and c equal 1, 2, and 3 + * }, 1, 2, 3); + */ +var _defer$1; + +if (hasNextTick) { + _defer$1 = process.nextTick; +} else if (hasSetImmediate) { + _defer$1 = setImmediate; +} else { + _defer$1 = fallback; +} + +var nextTick = wrap(_defer$1); + +function _parallel(eachfn, tasks, callback) { + callback = callback || noop; + var results = isArrayLike(tasks) ? [] : {}; + + eachfn(tasks, function (task, key, callback) { + wrapAsync(task)(function (err, result) { + if (arguments.length > 2) { + result = slice(arguments, 1); + } + results[key] = result; + callback(err); + }); + }, function (err) { + callback(err, results); + }); +} + +/** + * Run the `tasks` collection of functions in parallel, without waiting until + * the previous function has completed. If any of the functions pass an error to + * its callback, the main `callback` is immediately called with the value of the + * error. Once the `tasks` have completed, the results are passed to the final + * `callback` as an array. + * + * **Note:** `parallel` is about kicking-off I/O tasks in parallel, not about + * parallel execution of code. If your tasks do not use any timers or perform + * any I/O, they will actually be executed in series. Any synchronous setup + * sections for each task will happen one after the other. JavaScript remains + * single-threaded. + * + * **Hint:** Use [`reflect`]{@link module:Utils.reflect} to continue the + * execution of other tasks when a task fails. + * + * It is also possible to use an object instead of an array. Each property will + * be run as a function and the results will be passed to the final `callback` + * as an object instead of an array. This can be a more readable way of handling + * results from {@link async.parallel}. + * + * @name parallel + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection of + * [async functions]{@link AsyncFunction} to run. + * Each async function can complete with any number of optional `result` values. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed successfully. This function gets a results array + * (or object) containing all the result arguments passed to the task callbacks. + * Invoked with (err, results). + * + * @example + * async.parallel([ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ], + * // optional callback + * function(err, results) { + * // the results array will equal ['one','two'] even though + * // the second function had a shorter timeout. + * }); + * + * // an example using an object instead of an array + * async.parallel({ + * one: function(callback) { + * setTimeout(function() { + * callback(null, 1); + * }, 200); + * }, + * two: function(callback) { + * setTimeout(function() { + * callback(null, 2); + * }, 100); + * } + * }, function(err, results) { + * // results is now equals to: {one: 1, two: 2} + * }); + */ +function parallelLimit(tasks, callback) { + _parallel(eachOf, tasks, callback); +} + +/** + * The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a + * time. + * + * @name parallelLimit + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.parallel]{@link module:ControlFlow.parallel} + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection of + * [async functions]{@link AsyncFunction} to run. + * Each async function can complete with any number of optional `result` values. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed successfully. This function gets a results array + * (or object) containing all the result arguments passed to the task callbacks. + * Invoked with (err, results). + */ +function parallelLimit$1(tasks, limit, callback) { + _parallel(_eachOfLimit(limit), tasks, callback); +} + +/** + * A queue of tasks for the worker function to complete. + * @typedef {Object} QueueObject + * @memberOf module:ControlFlow + * @property {Function} length - a function returning the number of items + * waiting to be processed. Invoke with `queue.length()`. + * @property {boolean} started - a boolean indicating whether or not any + * items have been pushed and processed by the queue. + * @property {Function} running - a function returning the number of items + * currently being processed. Invoke with `queue.running()`. + * @property {Function} workersList - a function returning the array of items + * currently being processed. Invoke with `queue.workersList()`. + * @property {Function} idle - a function returning false if there are items + * waiting or being processed, or true if not. Invoke with `queue.idle()`. + * @property {number} concurrency - an integer for determining how many `worker` + * functions should be run in parallel. This property can be changed after a + * `queue` is created to alter the concurrency on-the-fly. + * @property {Function} push - add a new task to the `queue`. Calls `callback` + * once the `worker` has finished processing the task. Instead of a single task, + * a `tasks` array can be submitted. The respective callback is used for every + * task in the list. Invoke with `queue.push(task, [callback])`, + * @property {Function} unshift - add a new task to the front of the `queue`. + * Invoke with `queue.unshift(task, [callback])`. + * @property {Function} remove - remove items from the queue that match a test + * function. The test function will be passed an object with a `data` property, + * and a `priority` property, if this is a + * [priorityQueue]{@link module:ControlFlow.priorityQueue} object. + * Invoked with `queue.remove(testFn)`, where `testFn` is of the form + * `function ({data, priority}) {}` and returns a Boolean. + * @property {Function} saturated - a callback that is called when the number of + * running workers hits the `concurrency` limit, and further tasks will be + * queued. + * @property {Function} unsaturated - a callback that is called when the number + * of running workers is less than the `concurrency` & `buffer` limits, and + * further tasks will not be queued. + * @property {number} buffer - A minimum threshold buffer in order to say that + * the `queue` is `unsaturated`. + * @property {Function} empty - a callback that is called when the last item + * from the `queue` is given to a `worker`. + * @property {Function} drain - a callback that is called when the last item + * from the `queue` has returned from the `worker`. + * @property {Function} error - a callback that is called when a task errors. + * Has the signature `function(error, task)`. + * @property {boolean} paused - a boolean for determining whether the queue is + * in a paused state. + * @property {Function} pause - a function that pauses the processing of tasks + * until `resume()` is called. Invoke with `queue.pause()`. + * @property {Function} resume - a function that resumes the processing of + * queued tasks when the queue is paused. Invoke with `queue.resume()`. + * @property {Function} kill - a function that removes the `drain` callback and + * empties remaining tasks from the queue forcing it to go idle. No more tasks + * should be pushed to the queue after calling this function. Invoke with `queue.kill()`. + */ + +/** + * Creates a `queue` object with the specified `concurrency`. Tasks added to the + * `queue` are processed in parallel (up to the `concurrency` limit). If all + * `worker`s are in progress, the task is queued until one becomes available. + * Once a `worker` completes a `task`, that `task`'s callback is called. + * + * @name queue + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {AsyncFunction} worker - An async function for processing a queued task. + * If you want to handle errors from an individual task, pass a callback to + * `q.push()`. Invoked with (task, callback). + * @param {number} [concurrency=1] - An `integer` for determining how many + * `worker` functions should be run in parallel. If omitted, the concurrency + * defaults to `1`. If the concurrency is `0`, an error is thrown. + * @returns {module:ControlFlow.QueueObject} A queue object to manage the tasks. Callbacks can + * attached as certain properties to listen for specific events during the + * lifecycle of the queue. + * @example + * + * // create a queue object with concurrency 2 + * var q = async.queue(function(task, callback) { + * console.log('hello ' + task.name); + * callback(); + * }, 2); + * + * // assign a callback + * q.drain = function() { + * console.log('all items have been processed'); + * }; + * + * // add some items to the queue + * q.push({name: 'foo'}, function(err) { + * console.log('finished processing foo'); + * }); + * q.push({name: 'bar'}, function (err) { + * console.log('finished processing bar'); + * }); + * + * // add some items to the queue (batch-wise) + * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { + * console.log('finished processing item'); + * }); + * + * // add some items to the front of the queue + * q.unshift({name: 'bar'}, function (err) { + * console.log('finished processing bar'); + * }); + */ +var queue$1 = function (worker, concurrency) { + var _worker = wrapAsync(worker); + return queue(function (items, cb) { + _worker(items[0], cb); + }, concurrency, 1); +}; + +/** + * The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and + * completed in ascending priority order. + * + * @name priorityQueue + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.queue]{@link module:ControlFlow.queue} + * @category Control Flow + * @param {AsyncFunction} worker - An async function for processing a queued task. + * If you want to handle errors from an individual task, pass a callback to + * `q.push()`. + * Invoked with (task, callback). + * @param {number} concurrency - An `integer` for determining how many `worker` + * functions should be run in parallel. If omitted, the concurrency defaults to + * `1`. If the concurrency is `0`, an error is thrown. + * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two + * differences between `queue` and `priorityQueue` objects: + * * `push(task, priority, [callback])` - `priority` should be a number. If an + * array of `tasks` is given, all tasks will be assigned the same priority. + * * The `unshift` method was removed. + */ +var priorityQueue = function(worker, concurrency) { + // Start with a normal queue + var q = queue$1(worker, concurrency); + + // Override push to accept second parameter representing priority + q.push = function(data, priority, callback) { + if (callback == null) callback = noop; + if (typeof callback !== 'function') { + throw new Error('task callback must be a function'); + } + q.started = true; + if (!isArray(data)) { + data = [data]; + } + if (data.length === 0) { + // call drain immediately if there are no tasks + return setImmediate$1(function() { + q.drain(); + }); + } + + priority = priority || 0; + var nextNode = q._tasks.head; + while (nextNode && priority >= nextNode.priority) { + nextNode = nextNode.next; + } + + for (var i = 0, l = data.length; i < l; i++) { + var item = { + data: data[i], + priority: priority, + callback: callback + }; + + if (nextNode) { + q._tasks.insertBefore(nextNode, item); + } else { + q._tasks.push(item); + } + } + setImmediate$1(q.process); + }; + + // Remove unshift function + delete q.unshift; + + return q; +}; + +/** + * Runs the `tasks` array of functions in parallel, without waiting until the + * previous function has completed. Once any of the `tasks` complete or pass an + * error to its callback, the main `callback` is immediately called. It's + * equivalent to `Promise.race()`. + * + * @name race + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array} tasks - An array containing [async functions]{@link AsyncFunction} + * to run. Each function can complete with an optional `result` value. + * @param {Function} callback - A callback to run once any of the functions have + * completed. This function gets an error or result from the first function that + * completed. Invoked with (err, result). + * @returns undefined + * @example + * + * async.race([ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ], + * // main callback + * function(err, result) { + * // the result will be equal to 'two' as it finishes earlier + * }); + */ +function race(tasks, callback) { + callback = once(callback || noop); + if (!isArray(tasks)) return callback(new TypeError('First argument to race must be an array of functions')); + if (!tasks.length) return callback(); + for (var i = 0, l = tasks.length; i < l; i++) { + wrapAsync(tasks[i])(callback); + } +} + +/** + * Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order. + * + * @name reduceRight + * @static + * @memberOf module:Collections + * @method + * @see [async.reduce]{@link module:Collections.reduce} + * @alias foldr + * @category Collection + * @param {Array} array - A collection to iterate over. + * @param {*} memo - The initial state of the reduction. + * @param {AsyncFunction} iteratee - A function applied to each item in the + * array to produce the next step in the reduction. + * The `iteratee` should complete with the next state of the reduction. + * If the iteratee complete with an error, the reduction is stopped and the + * main `callback` is immediately called with the error. + * Invoked with (memo, item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result is the reduced value. Invoked with + * (err, result). + */ +function reduceRight (array, memo, iteratee, callback) { + var reversed = slice(array).reverse(); + reduce(reversed, memo, iteratee, callback); +} + +/** + * Wraps the async function in another function that always completes with a + * result object, even when it errors. + * + * The result object has either the property `error` or `value`. + * + * @name reflect + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} fn - The async function you want to wrap + * @returns {Function} - A function that always passes null to it's callback as + * the error. The second argument to the callback will be an `object` with + * either an `error` or a `value` property. + * @example + * + * async.parallel([ + * async.reflect(function(callback) { + * // do some stuff ... + * callback(null, 'one'); + * }), + * async.reflect(function(callback) { + * // do some more stuff but error ... + * callback('bad stuff happened'); + * }), + * async.reflect(function(callback) { + * // do some more stuff ... + * callback(null, 'two'); + * }) + * ], + * // optional callback + * function(err, results) { + * // values + * // results[0].value = 'one' + * // results[1].error = 'bad stuff happened' + * // results[2].value = 'two' + * }); + */ +function reflect(fn) { + var _fn = wrapAsync(fn); + return initialParams(function reflectOn(args, reflectCallback) { + args.push(function callback(error, cbArg) { + if (error) { + reflectCallback(null, { error: error }); + } else { + var value; + if (arguments.length <= 2) { + value = cbArg; + } else { + value = slice(arguments, 1); + } + reflectCallback(null, { value: value }); + } + }); + + return _fn.apply(this, args); + }); +} + +/** + * A helper function that wraps an array or an object of functions with `reflect`. + * + * @name reflectAll + * @static + * @memberOf module:Utils + * @method + * @see [async.reflect]{@link module:Utils.reflect} + * @category Util + * @param {Array|Object|Iterable} tasks - The collection of + * [async functions]{@link AsyncFunction} to wrap in `async.reflect`. + * @returns {Array} Returns an array of async functions, each wrapped in + * `async.reflect` + * @example + * + * let tasks = [ + * function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * function(callback) { + * // do some more stuff but error ... + * callback(new Error('bad stuff happened')); + * }, + * function(callback) { + * setTimeout(function() { + * callback(null, 'two'); + * }, 100); + * } + * ]; + * + * async.parallel(async.reflectAll(tasks), + * // optional callback + * function(err, results) { + * // values + * // results[0].value = 'one' + * // results[1].error = Error('bad stuff happened') + * // results[2].value = 'two' + * }); + * + * // an example using an object instead of an array + * let tasks = { + * one: function(callback) { + * setTimeout(function() { + * callback(null, 'one'); + * }, 200); + * }, + * two: function(callback) { + * callback('two'); + * }, + * three: function(callback) { + * setTimeout(function() { + * callback(null, 'three'); + * }, 100); + * } + * }; + * + * async.parallel(async.reflectAll(tasks), + * // optional callback + * function(err, results) { + * // values + * // results.one.value = 'one' + * // results.two.error = 'two' + * // results.three.value = 'three' + * }); + */ +function reflectAll(tasks) { + var results; + if (isArray(tasks)) { + results = arrayMap(tasks, reflect); + } else { + results = {}; + baseForOwn(tasks, function(task, key) { + results[key] = reflect.call(this, task); + }); + } + return results; +} + +function reject$1(eachfn, arr, iteratee, callback) { + _filter(eachfn, arr, function(value, cb) { + iteratee(value, function(err, v) { + cb(err, !v); + }); + }, callback); +} + +/** + * The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test. + * + * @name reject + * @static + * @memberOf module:Collections + * @method + * @see [async.filter]{@link module:Collections.filter} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - An async truth test to apply to each item in + * `coll`. + * The should complete with a boolean value as its `result`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + * @example + * + * async.reject(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, results) { + * // results now equals an array of missing files + * createFiles(results); + * }); + */ +var reject = doParallel(reject$1); + +/** + * The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a + * time. + * + * @name rejectLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.reject]{@link module:Collections.reject} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {Function} iteratee - An async truth test to apply to each item in + * `coll`. + * The should complete with a boolean value as its `result`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ +var rejectLimit = doParallelLimit(reject$1); + +/** + * The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time. + * + * @name rejectSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.reject]{@link module:Collections.reject} + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {Function} iteratee - An async truth test to apply to each item in + * `coll`. + * The should complete with a boolean value as its `result`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Invoked with (err, results). + */ +var rejectSeries = doLimit(rejectLimit, 1); + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant$1(value) { + return function() { + return value; + }; +} + +/** + * Attempts to get a successful response from `task` no more than `times` times + * before returning an error. If the task is successful, the `callback` will be + * passed the result of the successful task. If all attempts fail, the callback + * will be passed the error and result (if any) of the final attempt. + * + * @name retry + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @see [async.retryable]{@link module:ControlFlow.retryable} + * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - Can be either an + * object with `times` and `interval` or a number. + * * `times` - The number of attempts to make before giving up. The default + * is `5`. + * * `interval` - The time to wait between retries, in milliseconds. The + * default is `0`. The interval may also be specified as a function of the + * retry count (see example). + * * `errorFilter` - An optional synchronous function that is invoked on + * erroneous result. If it returns `true` the retry attempts will continue; + * if the function returns `false` the retry flow is aborted with the current + * attempt's error and result being returned to the final callback. + * Invoked with (err). + * * If `opts` is a number, the number specifies the number of times to retry, + * with the default interval of `0`. + * @param {AsyncFunction} task - An async function to retry. + * Invoked with (callback). + * @param {Function} [callback] - An optional callback which is called when the + * task has succeeded, or after the final failed attempt. It receives the `err` + * and `result` arguments of the last attempt at completing the `task`. Invoked + * with (err, results). + * + * @example + * + * // The `retry` function can be used as a stand-alone control flow by passing + * // a callback, as shown below: + * + * // try calling apiMethod 3 times + * async.retry(3, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod 3 times, waiting 200 ms between each retry + * async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod 10 times with exponential backoff + * // (i.e. intervals of 100, 200, 400, 800, 1600, ... milliseconds) + * async.retry({ + * times: 10, + * interval: function(retryCount) { + * return 50 * Math.pow(2, retryCount); + * } + * }, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod the default 5 times no delay between each retry + * async.retry(apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // try calling apiMethod only when error condition satisfies, all other + * // errors will abort the retry control flow and return to final callback + * async.retry({ + * errorFilter: function(err) { + * return err.message === 'Temporary error'; // only retry on a specific error + * } + * }, apiMethod, function(err, result) { + * // do something with the result + * }); + * + * // to retry individual methods that are not as reliable within other + * // control flow functions, use the `retryable` wrapper: + * async.auto({ + * users: api.getUsers.bind(api), + * payments: async.retryable(3, api.getPayments.bind(api)) + * }, function(err, results) { + * // do something with the results + * }); + * + */ +function retry(opts, task, callback) { + var DEFAULT_TIMES = 5; + var DEFAULT_INTERVAL = 0; + + var options = { + times: DEFAULT_TIMES, + intervalFunc: constant$1(DEFAULT_INTERVAL) + }; + + function parseTimes(acc, t) { + if (typeof t === 'object') { + acc.times = +t.times || DEFAULT_TIMES; + + acc.intervalFunc = typeof t.interval === 'function' ? + t.interval : + constant$1(+t.interval || DEFAULT_INTERVAL); + + acc.errorFilter = t.errorFilter; + } else if (typeof t === 'number' || typeof t === 'string') { + acc.times = +t || DEFAULT_TIMES; + } else { + throw new Error("Invalid arguments for async.retry"); + } + } + + if (arguments.length < 3 && typeof opts === 'function') { + callback = task || noop; + task = opts; + } else { + parseTimes(options, opts); + callback = callback || noop; + } + + if (typeof task !== 'function') { + throw new Error("Invalid arguments for async.retry"); + } + + var _task = wrapAsync(task); + + var attempt = 1; + function retryAttempt() { + _task(function(err) { + if (err && attempt++ < options.times && + (typeof options.errorFilter != 'function' || + options.errorFilter(err))) { + setTimeout(retryAttempt, options.intervalFunc(attempt)); + } else { + callback.apply(null, arguments); + } + }); + } + + retryAttempt(); +} + +/** + * A close relative of [`retry`]{@link module:ControlFlow.retry}. This method + * wraps a task and makes it retryable, rather than immediately calling it + * with retries. + * + * @name retryable + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.retry]{@link module:ControlFlow.retry} + * @category Control Flow + * @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional + * options, exactly the same as from `retry` + * @param {AsyncFunction} task - the asynchronous function to wrap. + * This function will be passed any arguments passed to the returned wrapper. + * Invoked with (...args, callback). + * @returns {AsyncFunction} The wrapped function, which when invoked, will + * retry on an error, based on the parameters specified in `opts`. + * This function will accept the same parameters as `task`. + * @example + * + * async.auto({ + * dep1: async.retryable(3, getFromFlakyService), + * process: ["dep1", async.retryable(3, function (results, cb) { + * maybeProcessData(results.dep1, cb); + * })] + * }, callback); + */ +var retryable = function (opts, task) { + if (!task) { + task = opts; + opts = null; + } + var _task = wrapAsync(task); + return initialParams(function (args, callback) { + function taskFn(cb) { + _task.apply(null, args.concat(cb)); + } + + if (opts) retry(opts, taskFn, callback); + else retry(taskFn, callback); + + }); +}; + +/** + * Run the functions in the `tasks` collection in series, each one running once + * the previous function has completed. If any functions in the series pass an + * error to its callback, no more functions are run, and `callback` is + * immediately called with the value of the error. Otherwise, `callback` + * receives an array of results when `tasks` have completed. + * + * It is also possible to use an object instead of an array. Each property will + * be run as a function, and the results will be passed to the final `callback` + * as an object instead of an array. This can be a more readable way of handling + * results from {@link async.series}. + * + * **Note** that while many implementations preserve the order of object + * properties, the [ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) + * explicitly states that + * + * > The mechanics and order of enumerating the properties is not specified. + * + * So if you rely on the order in which your series of functions are executed, + * and want this to work on all platforms, consider using an array. + * + * @name series + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection containing + * [async functions]{@link AsyncFunction} to run in series. + * Each function can complete with any number of optional `result` values. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed. This function gets a results array (or object) + * containing all the result arguments passed to the `task` callbacks. Invoked + * with (err, result). + * @example + * async.series([ + * function(callback) { + * // do some stuff ... + * callback(null, 'one'); + * }, + * function(callback) { + * // do some more stuff ... + * callback(null, 'two'); + * } + * ], + * // optional callback + * function(err, results) { + * // results is now equal to ['one', 'two'] + * }); + * + * async.series({ + * one: function(callback) { + * setTimeout(function() { + * callback(null, 1); + * }, 200); + * }, + * two: function(callback){ + * setTimeout(function() { + * callback(null, 2); + * }, 100); + * } + * }, function(err, results) { + * // results is now equal to: {one: 1, two: 2} + * }); + */ +function series(tasks, callback) { + _parallel(eachOfSeries, tasks, callback); +} + +/** + * Returns `true` if at least one element in the `coll` satisfies an async test. + * If any iteratee call returns `true`, the main `callback` is immediately + * called. + * + * @name some + * @static + * @memberOf module:Collections + * @method + * @alias any + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collections in parallel. + * The iteratee should complete with a boolean `result` value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + * @example + * + * async.some(['file1','file2','file3'], function(filePath, callback) { + * fs.access(filePath, function(err) { + * callback(null, !err) + * }); + * }, function(err, result) { + * // if result is true then at least one of the files exists + * }); + */ +var some = doParallel(_createTester(Boolean, identity)); + +/** + * The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time. + * + * @name someLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.some]{@link module:Collections.some} + * @alias anyLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collections in parallel. + * The iteratee should complete with a boolean `result` value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + */ +var someLimit = doParallelLimit(_createTester(Boolean, identity)); + +/** + * The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time. + * + * @name someSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.some]{@link module:Collections.some} + * @alias anySeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async truth test to apply to each item + * in the collections in series. + * The iteratee should complete with a boolean `result` value. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called as soon as any + * iteratee returns `true`, or after all the iteratee functions have finished. + * Result will be either `true` or `false` depending on the values of the async + * tests. Invoked with (err, result). + */ +var someSeries = doLimit(someLimit, 1); + +/** + * Sorts a list by the results of running each `coll` value through an async + * `iteratee`. + * + * @name sortBy + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The iteratee should complete with a value to use as the sort criteria as + * its `result`. + * Invoked with (item, callback). + * @param {Function} callback - A callback which is called after all the + * `iteratee` functions have finished, or an error occurs. Results is the items + * from the original `coll` sorted by the values returned by the `iteratee` + * calls. Invoked with (err, results). + * @example + * + * async.sortBy(['file1','file2','file3'], function(file, callback) { + * fs.stat(file, function(err, stats) { + * callback(err, stats.mtime); + * }); + * }, function(err, results) { + * // results is now the original array of files sorted by + * // modified date + * }); + * + * // By modifying the callback parameter the + * // sorting order can be influenced: + * + * // ascending order + * async.sortBy([1,9,3,5], function(x, callback) { + * callback(null, x); + * }, function(err,result) { + * // result callback + * }); + * + * // descending order + * async.sortBy([1,9,3,5], function(x, callback) { + * callback(null, x*-1); //<- x*-1 instead of x, turns the order around + * }, function(err,result) { + * // result callback + * }); + */ +function sortBy (coll, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + map(coll, function (x, callback) { + _iteratee(x, function (err, criteria) { + if (err) return callback(err); + callback(null, {value: x, criteria: criteria}); + }); + }, function (err, results) { + if (err) return callback(err); + callback(null, arrayMap(results.sort(comparator), baseProperty('value'))); + }); + + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } +} + +/** + * Sets a time limit on an asynchronous function. If the function does not call + * its callback within the specified milliseconds, it will be called with a + * timeout error. The code property for the error object will be `'ETIMEDOUT'`. + * + * @name timeout + * @static + * @memberOf module:Utils + * @method + * @category Util + * @param {AsyncFunction} asyncFn - The async function to limit in time. + * @param {number} milliseconds - The specified time limit. + * @param {*} [info] - Any variable you want attached (`string`, `object`, etc) + * to timeout Error for more information.. + * @returns {AsyncFunction} Returns a wrapped function that can be used with any + * of the control flow functions. + * Invoke this function with the same parameters as you would `asyncFunc`. + * @example + * + * function myFunction(foo, callback) { + * doAsyncTask(foo, function(err, data) { + * // handle errors + * if (err) return callback(err); + * + * // do some stuff ... + * + * // return processed data + * return callback(null, data); + * }); + * } + * + * var wrapped = async.timeout(myFunction, 1000); + * + * // call `wrapped` as you would `myFunction` + * wrapped({ bar: 'bar' }, function(err, data) { + * // if `myFunction` takes < 1000 ms to execute, `err` + * // and `data` will have their expected values + * + * // else `err` will be an Error with the code 'ETIMEDOUT' + * }); + */ +function timeout(asyncFn, milliseconds, info) { + var fn = wrapAsync(asyncFn); + + return initialParams(function (args, callback) { + var timedOut = false; + var timer; + + function timeoutCallback() { + var name = asyncFn.name || 'anonymous'; + var error = new Error('Callback function "' + name + '" timed out.'); + error.code = 'ETIMEDOUT'; + if (info) { + error.info = info; + } + timedOut = true; + callback(error); + } + + args.push(function () { + if (!timedOut) { + callback.apply(null, arguments); + clearTimeout(timer); + } + }); + + // setup timer and call original function + timer = setTimeout(timeoutCallback, milliseconds); + fn.apply(null, args); + }); +} + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil; +var nativeMax = Math.max; + +/** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ +function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; +} + +/** + * The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a + * time. + * + * @name timesLimit + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.times]{@link module:ControlFlow.times} + * @category Control Flow + * @param {number} count - The number of times to run the function. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - The async function to call `n` times. + * Invoked with the iteration index and a callback: (n, next). + * @param {Function} callback - see [async.map]{@link module:Collections.map}. + */ +function timeLimit(count, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + mapLimit(baseRange(0, count, 1), limit, _iteratee, callback); +} + +/** + * Calls the `iteratee` function `n` times, and accumulates results in the same + * manner you would use with [map]{@link module:Collections.map}. + * + * @name times + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.map]{@link module:Collections.map} + * @category Control Flow + * @param {number} n - The number of times to run the function. + * @param {AsyncFunction} iteratee - The async function to call `n` times. + * Invoked with the iteration index and a callback: (n, next). + * @param {Function} callback - see {@link module:Collections.map}. + * @example + * + * // Pretend this is some complicated async factory + * var createUser = function(id, callback) { + * callback(null, { + * id: 'user' + id + * }); + * }; + * + * // generate 5 users + * async.times(5, function(n, next) { + * createUser(n, function(err, user) { + * next(err, user); + * }); + * }, function(err, users) { + * // we should now have 5 users + * }); + */ +var times = doLimit(timeLimit, Infinity); + +/** + * The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time. + * + * @name timesSeries + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.times]{@link module:ControlFlow.times} + * @category Control Flow + * @param {number} n - The number of times to run the function. + * @param {AsyncFunction} iteratee - The async function to call `n` times. + * Invoked with the iteration index and a callback: (n, next). + * @param {Function} callback - see {@link module:Collections.map}. + */ +var timesSeries = doLimit(timeLimit, 1); + +/** + * A relative of `reduce`. Takes an Object or Array, and iterates over each + * element in series, each step potentially mutating an `accumulator` value. + * The type of the accumulator defaults to the type of collection passed in. + * + * @name transform + * @static + * @memberOf module:Collections + * @method + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {*} [accumulator] - The initial state of the transform. If omitted, + * it will default to an empty Object or Array, depending on the type of `coll` + * @param {AsyncFunction} iteratee - A function applied to each item in the + * collection that potentially modifies the accumulator. + * Invoked with (accumulator, item, key, callback). + * @param {Function} [callback] - A callback which is called after all the + * `iteratee` functions have finished. Result is the transformed accumulator. + * Invoked with (err, result). + * @example + * + * async.transform([1,2,3], function(acc, item, index, callback) { + * // pointless async: + * process.nextTick(function() { + * acc.push(item * 2) + * callback(null) + * }); + * }, function(err, result) { + * // result is now equal to [2, 4, 6] + * }); + * + * @example + * + * async.transform({a: 1, b: 2, c: 3}, function (obj, val, key, callback) { + * setImmediate(function () { + * obj[key] = val * 2; + * callback(); + * }) + * }, function (err, result) { + * // result is equal to {a: 2, b: 4, c: 6} + * }) + */ +function transform (coll, accumulator, iteratee, callback) { + if (arguments.length <= 3) { + callback = iteratee; + iteratee = accumulator; + accumulator = isArray(coll) ? [] : {}; + } + callback = once(callback || noop); + var _iteratee = wrapAsync(iteratee); + + eachOf(coll, function(v, k, cb) { + _iteratee(accumulator, v, k, cb); + }, function(err) { + callback(err, accumulator); + }); +} + +/** + * It runs each task in series but stops whenever any of the functions were + * successful. If one of the tasks were successful, the `callback` will be + * passed the result of the successful task. If all tasks fail, the callback + * will be passed the error and result (if any) of the final attempt. + * + * @name tryEach + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array|Iterable|Object} tasks - A collection containing functions to + * run, each function is passed a `callback(err, result)` it must call on + * completion with an error `err` (which can be `null`) and an optional `result` + * value. + * @param {Function} [callback] - An optional callback which is called when one + * of the tasks has succeeded, or all have failed. It receives the `err` and + * `result` arguments of the last attempt at completing the `task`. Invoked with + * (err, results). + * @example + * async.tryEach([ + * function getDataFromFirstWebsite(callback) { + * // Try getting the data from the first website + * callback(err, data); + * }, + * function getDataFromSecondWebsite(callback) { + * // First website failed, + * // Try getting the data from the backup website + * callback(err, data); + * } + * ], + * // optional callback + * function(err, results) { + * Now do something with the data. + * }); + * + */ +function tryEach(tasks, callback) { + var error = null; + var result; + callback = callback || noop; + eachSeries(tasks, function(task, callback) { + wrapAsync(task)(function (err, res/*, ...args*/) { + if (arguments.length > 2) { + result = slice(arguments, 1); + } else { + result = res; + } + error = err; + callback(!err); + }); + }, function () { + callback(error, result); + }); +} + +/** + * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original, + * unmemoized form. Handy for testing. + * + * @name unmemoize + * @static + * @memberOf module:Utils + * @method + * @see [async.memoize]{@link module:Utils.memoize} + * @category Util + * @param {AsyncFunction} fn - the memoized function + * @returns {AsyncFunction} a function that calls the original unmemoized function + */ +function unmemoize(fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; +} + +/** + * Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when + * stopped, or an error occurs. + * + * @name whilst + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Function} test - synchronous truth test to perform before each + * execution of `iteratee`. Invoked with (). + * @param {AsyncFunction} iteratee - An async function which is called each time + * `test` passes. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has failed and repeated execution of `iteratee` has stopped. `callback` + * will be passed an error and any arguments passed to the final `iteratee`'s + * callback. Invoked with (err, [results]); + * @returns undefined + * @example + * + * var count = 0; + * async.whilst( + * function() { return count < 5; }, + * function(callback) { + * count++; + * setTimeout(function() { + * callback(null, count); + * }, 1000); + * }, + * function (err, n) { + * // 5 seconds have passed, n = 5 + * } + * ); + */ +function whilst(test, iteratee, callback) { + callback = onlyOnce(callback || noop); + var _iteratee = wrapAsync(iteratee); + if (!test()) return callback(null); + var next = function(err/*, ...args*/) { + if (err) return callback(err); + if (test()) return _iteratee(next); + var args = slice(arguments, 1); + callback.apply(null, [null].concat(args)); + }; + _iteratee(next); +} + +/** + * Repeatedly call `iteratee` until `test` returns `true`. Calls `callback` when + * stopped, or an error occurs. `callback` will be passed an error and any + * arguments passed to the final `iteratee`'s callback. + * + * The inverse of [whilst]{@link module:ControlFlow.whilst}. + * + * @name until + * @static + * @memberOf module:ControlFlow + * @method + * @see [async.whilst]{@link module:ControlFlow.whilst} + * @category Control Flow + * @param {Function} test - synchronous truth test to perform before each + * execution of `iteratee`. Invoked with (). + * @param {AsyncFunction} iteratee - An async function which is called each time + * `test` fails. Invoked with (callback). + * @param {Function} [callback] - A callback which is called after the test + * function has passed and repeated execution of `iteratee` has stopped. `callback` + * will be passed an error and any arguments passed to the final `iteratee`'s + * callback. Invoked with (err, [results]); + */ +function until(test, iteratee, callback) { + whilst(function() { + return !test.apply(this, arguments); + }, iteratee, callback); +} + +/** + * Runs the `tasks` array of functions in series, each passing their results to + * the next in the array. However, if any of the `tasks` pass an error to their + * own callback, the next function is not executed, and the main `callback` is + * immediately called with the error. + * + * @name waterfall + * @static + * @memberOf module:ControlFlow + * @method + * @category Control Flow + * @param {Array} tasks - An array of [async functions]{@link AsyncFunction} + * to run. + * Each function should complete with any number of `result` values. + * The `result` values will be passed as arguments, in order, to the next task. + * @param {Function} [callback] - An optional callback to run once all the + * functions have completed. This will be passed the results of the last task's + * callback. Invoked with (err, [results]). + * @returns undefined + * @example + * + * async.waterfall([ + * function(callback) { + * callback(null, 'one', 'two'); + * }, + * function(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * }, + * function(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + * ], function (err, result) { + * // result now equals 'done' + * }); + * + * // Or, with named functions: + * async.waterfall([ + * myFirstFunction, + * mySecondFunction, + * myLastFunction, + * ], function (err, result) { + * // result now equals 'done' + * }); + * function myFirstFunction(callback) { + * callback(null, 'one', 'two'); + * } + * function mySecondFunction(arg1, arg2, callback) { + * // arg1 now equals 'one' and arg2 now equals 'two' + * callback(null, 'three'); + * } + * function myLastFunction(arg1, callback) { + * // arg1 now equals 'three' + * callback(null, 'done'); + * } + */ +var waterfall = function(tasks, callback) { + callback = once(callback || noop); + if (!isArray(tasks)) return callback(new Error('First argument to waterfall must be an array of functions')); + if (!tasks.length) return callback(); + var taskIndex = 0; + + function nextTask(args) { + var task = wrapAsync(tasks[taskIndex++]); + args.push(onlyOnce(next)); + task.apply(null, args); + } + + function next(err/*, ...args*/) { + if (err || taskIndex === tasks.length) { + return callback.apply(null, arguments); + } + nextTask(slice(arguments, 1)); + } + + nextTask([]); +}; + +/** + * An "async function" in the context of Async is an asynchronous function with + * a variable number of parameters, with the final parameter being a callback. + * (`function (arg1, arg2, ..., callback) {}`) + * The final callback is of the form `callback(err, results...)`, which must be + * called once the function is completed. The callback should be called with a + * Error as its first argument to signal that an error occurred. + * Otherwise, if no error occurred, it should be called with `null` as the first + * argument, and any additional `result` arguments that may apply, to signal + * successful completion. + * The callback must be called exactly once, ideally on a later tick of the + * JavaScript event loop. + * + * This type of function is also referred to as a "Node-style async function", + * or a "continuation passing-style function" (CPS). Most of the methods of this + * library are themselves CPS/Node-style async functions, or functions that + * return CPS/Node-style async functions. + * + * Wherever we accept a Node-style async function, we also directly accept an + * [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}. + * In this case, the `async` function will not be passed a final callback + * argument, and any thrown error will be used as the `err` argument of the + * implicit callback, and the return value will be used as the `result` value. + * (i.e. a `rejected` of the returned Promise becomes the `err` callback + * argument, and a `resolved` value becomes the `result`.) + * + * Note, due to JavaScript limitations, we can only detect native `async` + * functions and not transpilied implementations. + * Your environment must have `async`/`await` support for this to work. + * (e.g. Node > v7.6, or a recent version of a modern browser). + * If you are using `async` functions through a transpiler (e.g. Babel), you + * must still wrap the function with [asyncify]{@link module:Utils.asyncify}, + * because the `async function` will be compiled to an ordinary function that + * returns a promise. + * + * @typedef {Function} AsyncFunction + * @static + */ + +/** + * Async is a utility module which provides straight-forward, powerful functions + * for working with asynchronous JavaScript. Although originally designed for + * use with [Node.js](http://nodejs.org) and installable via + * `npm install --save async`, it can also be used directly in the browser. + * @module async + * @see AsyncFunction + */ + + +/** + * A collection of `async` functions for manipulating collections, such as + * arrays and objects. + * @module Collections + */ + +/** + * A collection of `async` functions for controlling the flow through a script. + * @module ControlFlow + */ + +/** + * A collection of `async` utility functions. + * @module Utils + */ + +var index = { + apply: apply, + applyEach: applyEach, + applyEachSeries: applyEachSeries, + asyncify: asyncify, + auto: auto, + autoInject: autoInject, + cargo: cargo, + compose: compose, + concat: concat, + concatLimit: concatLimit, + concatSeries: concatSeries, + constant: constant, + detect: detect, + detectLimit: detectLimit, + detectSeries: detectSeries, + dir: dir, + doDuring: doDuring, + doUntil: doUntil, + doWhilst: doWhilst, + during: during, + each: eachLimit, + eachLimit: eachLimit$1, + eachOf: eachOf, + eachOfLimit: eachOfLimit, + eachOfSeries: eachOfSeries, + eachSeries: eachSeries, + ensureAsync: ensureAsync, + every: every, + everyLimit: everyLimit, + everySeries: everySeries, + filter: filter, + filterLimit: filterLimit, + filterSeries: filterSeries, + forever: forever, + groupBy: groupBy, + groupByLimit: groupByLimit, + groupBySeries: groupBySeries, + log: log, + map: map, + mapLimit: mapLimit, + mapSeries: mapSeries, + mapValues: mapValues, + mapValuesLimit: mapValuesLimit, + mapValuesSeries: mapValuesSeries, + memoize: memoize, + nextTick: nextTick, + parallel: parallelLimit, + parallelLimit: parallelLimit$1, + priorityQueue: priorityQueue, + queue: queue$1, + race: race, + reduce: reduce, + reduceRight: reduceRight, + reflect: reflect, + reflectAll: reflectAll, + reject: reject, + rejectLimit: rejectLimit, + rejectSeries: rejectSeries, + retry: retry, + retryable: retryable, + seq: seq, + series: series, + setImmediate: setImmediate$1, + some: some, + someLimit: someLimit, + someSeries: someSeries, + sortBy: sortBy, + timeout: timeout, + times: times, + timesLimit: timeLimit, + timesSeries: timesSeries, + transform: transform, + tryEach: tryEach, + unmemoize: unmemoize, + until: until, + waterfall: waterfall, + whilst: whilst, + + // aliases + all: every, + allLimit: everyLimit, + allSeries: everySeries, + any: some, + anyLimit: someLimit, + anySeries: someSeries, + find: detect, + findLimit: detectLimit, + findSeries: detectSeries, + forEach: eachLimit, + forEachSeries: eachSeries, + forEachLimit: eachLimit$1, + forEachOf: eachOf, + forEachOfSeries: eachOfSeries, + forEachOfLimit: eachOfLimit, + inject: reduce, + foldl: reduce, + foldr: reduceRight, + select: filter, + selectLimit: filterLimit, + selectSeries: filterSeries, + wrapSync: asyncify +}; + +exports['default'] = index; +exports.apply = apply; +exports.applyEach = applyEach; +exports.applyEachSeries = applyEachSeries; +exports.asyncify = asyncify; +exports.auto = auto; +exports.autoInject = autoInject; +exports.cargo = cargo; +exports.compose = compose; +exports.concat = concat; +exports.concatLimit = concatLimit; +exports.concatSeries = concatSeries; +exports.constant = constant; +exports.detect = detect; +exports.detectLimit = detectLimit; +exports.detectSeries = detectSeries; +exports.dir = dir; +exports.doDuring = doDuring; +exports.doUntil = doUntil; +exports.doWhilst = doWhilst; +exports.during = during; +exports.each = eachLimit; +exports.eachLimit = eachLimit$1; +exports.eachOf = eachOf; +exports.eachOfLimit = eachOfLimit; +exports.eachOfSeries = eachOfSeries; +exports.eachSeries = eachSeries; +exports.ensureAsync = ensureAsync; +exports.every = every; +exports.everyLimit = everyLimit; +exports.everySeries = everySeries; +exports.filter = filter; +exports.filterLimit = filterLimit; +exports.filterSeries = filterSeries; +exports.forever = forever; +exports.groupBy = groupBy; +exports.groupByLimit = groupByLimit; +exports.groupBySeries = groupBySeries; +exports.log = log; +exports.map = map; +exports.mapLimit = mapLimit; +exports.mapSeries = mapSeries; +exports.mapValues = mapValues; +exports.mapValuesLimit = mapValuesLimit; +exports.mapValuesSeries = mapValuesSeries; +exports.memoize = memoize; +exports.nextTick = nextTick; +exports.parallel = parallelLimit; +exports.parallelLimit = parallelLimit$1; +exports.priorityQueue = priorityQueue; +exports.queue = queue$1; +exports.race = race; +exports.reduce = reduce; +exports.reduceRight = reduceRight; +exports.reflect = reflect; +exports.reflectAll = reflectAll; +exports.reject = reject; +exports.rejectLimit = rejectLimit; +exports.rejectSeries = rejectSeries; +exports.retry = retry; +exports.retryable = retryable; +exports.seq = seq; +exports.series = series; +exports.setImmediate = setImmediate$1; +exports.some = some; +exports.someLimit = someLimit; +exports.someSeries = someSeries; +exports.sortBy = sortBy; +exports.timeout = timeout; +exports.times = times; +exports.timesLimit = timeLimit; +exports.timesSeries = timesSeries; +exports.transform = transform; +exports.tryEach = tryEach; +exports.unmemoize = unmemoize; +exports.until = until; +exports.waterfall = waterfall; +exports.whilst = whilst; +exports.all = every; +exports.allLimit = everyLimit; +exports.allSeries = everySeries; +exports.any = some; +exports.anyLimit = someLimit; +exports.anySeries = someSeries; +exports.find = detect; +exports.findLimit = detectLimit; +exports.findSeries = detectSeries; +exports.forEach = eachLimit; +exports.forEachSeries = eachSeries; +exports.forEachLimit = eachLimit$1; +exports.forEachOf = eachOf; +exports.forEachOfSeries = eachOfSeries; +exports.forEachOfLimit = eachOfLimit; +exports.inject = reduce; +exports.foldl = reduce; +exports.foldr = reduceRight; +exports.select = filter; +exports.selectLimit = filterLimit; +exports.selectSeries = filterSeries; +exports.wrapSync = asyncify; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate) +},{"_process":109,"timers":1415}],43:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = eachLimit; + +var _eachOfLimit = require('./internal/eachOfLimit'); + +var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); + +var _withoutIndex = require('./internal/withoutIndex'); + +var _withoutIndex2 = _interopRequireDefault(_withoutIndex); + +var _wrapAsync = require('./internal/wrapAsync'); + +var _wrapAsync2 = _interopRequireDefault(_wrapAsync); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time. + * + * @name eachLimit + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachLimit + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {number} limit - The maximum number of async operations at a time. + * @param {AsyncFunction} iteratee - An async function to apply to each item in + * `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfLimit`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +function eachLimit(coll, limit, iteratee, callback) { + (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback); +} +module.exports = exports['default']; +},{"./internal/eachOfLimit":47,"./internal/withoutIndex":55,"./internal/wrapAsync":56}],44:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _eachLimit = require('./eachLimit'); + +var _eachLimit2 = _interopRequireDefault(_eachLimit); + +var _doLimit = require('./internal/doLimit'); + +var _doLimit2 = _interopRequireDefault(_doLimit); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time. + * + * @name eachSeries + * @static + * @memberOf module:Collections + * @method + * @see [async.each]{@link module:Collections.each} + * @alias forEachSeries + * @category Collection + * @param {Array|Iterable|Object} coll - A collection to iterate over. + * @param {AsyncFunction} iteratee - An async function to apply to each + * item in `coll`. + * The array index is not passed to the iteratee. + * If you need the index, use `eachOfSeries`. + * Invoked with (item, callback). + * @param {Function} [callback] - A callback which is called when all + * `iteratee` functions have finished, or an error occurs. Invoked with (err). + */ +exports.default = (0, _doLimit2.default)(_eachLimit2.default, 1); +module.exports = exports['default']; +},{"./eachLimit":43,"./internal/doLimit":46}],45:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// A temporary value used to identify if the loop should be broken. +// See #1064, #1293 +exports.default = {}; +module.exports = exports["default"]; +},{}],46:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = doLimit; +function doLimit(fn, limit) { + return function (iterable, iteratee, callback) { + return fn(iterable, limit, iteratee, callback); + }; +} +module.exports = exports["default"]; +},{}],47:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _eachOfLimit; + +var _noop = require('lodash/noop'); + +var _noop2 = _interopRequireDefault(_noop); + +var _once = require('./once'); + +var _once2 = _interopRequireDefault(_once); + +var _iterator = require('./iterator'); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _onlyOnce = require('./onlyOnce'); + +var _onlyOnce2 = _interopRequireDefault(_onlyOnce); + +var _breakLoop = require('./breakLoop'); + +var _breakLoop2 = _interopRequireDefault(_breakLoop); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _eachOfLimit(limit) { + return function (obj, iteratee, callback) { + callback = (0, _once2.default)(callback || _noop2.default); + if (limit <= 0 || !obj) { + return callback(null); + } + var nextElem = (0, _iterator2.default)(obj); + var done = false; + var running = 0; + var looping = false; + + function iterateeCallback(err, value) { + running -= 1; + if (err) { + done = true; + callback(err); + } else if (value === _breakLoop2.default || done && running <= 0) { + done = true; + return callback(null); + } else if (!looping) { + replenish(); + } + } + + function replenish() { + looping = true; + while (running < limit && !done) { + var elem = nextElem(); + if (elem === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback)); + } + looping = false; + } + + replenish(); + }; +} +module.exports = exports['default']; +},{"./breakLoop":45,"./iterator":50,"./once":51,"./onlyOnce":52,"lodash/noop":930}],48:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (coll) { + return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol](); +}; + +var iteratorSymbol = typeof Symbol === 'function' && Symbol.iterator; + +module.exports = exports['default']; +},{}],49:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (fn) { + return function () /*...args, callback*/{ + var args = (0, _slice2.default)(arguments); + var callback = args.pop(); + fn.call(this, args, callback); + }; +}; + +var _slice = require('./slice'); + +var _slice2 = _interopRequireDefault(_slice); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = exports['default']; +},{"./slice":54}],50:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = iterator; + +var _isArrayLike = require('lodash/isArrayLike'); + +var _isArrayLike2 = _interopRequireDefault(_isArrayLike); + +var _getIterator = require('./getIterator'); + +var _getIterator2 = _interopRequireDefault(_getIterator); + +var _keys = require('lodash/keys'); + +var _keys2 = _interopRequireDefault(_keys); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function createArrayIterator(coll) { + var i = -1; + var len = coll.length; + return function next() { + return ++i < len ? { value: coll[i], key: i } : null; + }; +} + +function createES2015Iterator(iterator) { + var i = -1; + return function next() { + var item = iterator.next(); + if (item.done) return null; + i++; + return { value: item.value, key: i }; + }; +} + +function createObjectIterator(obj) { + var okeys = (0, _keys2.default)(obj); + var i = -1; + var len = okeys.length; + return function next() { + var key = okeys[++i]; + return i < len ? { value: obj[key], key: key } : null; + }; +} + +function iterator(coll) { + if ((0, _isArrayLike2.default)(coll)) { + return createArrayIterator(coll); + } + + var iterator = (0, _getIterator2.default)(coll); + return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); +} +module.exports = exports['default']; +},{"./getIterator":48,"lodash/isArrayLike":922,"lodash/keys":929}],51:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = once; +function once(fn) { + return function () { + if (fn === null) return; + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} +module.exports = exports["default"]; +},{}],52:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = onlyOnce; +function onlyOnce(fn) { + return function () { + if (fn === null) throw new Error("Callback was already called."); + var callFn = fn; + fn = null; + callFn.apply(this, arguments); + }; +} +module.exports = exports["default"]; +},{}],53:[function(require,module,exports){ +(function (process,setImmediate){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.hasNextTick = exports.hasSetImmediate = undefined; +exports.fallback = fallback; +exports.wrap = wrap; + +var _slice = require('./slice'); + +var _slice2 = _interopRequireDefault(_slice); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate; +var hasNextTick = exports.hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; + +function fallback(fn) { + setTimeout(fn, 0); +} + +function wrap(defer) { + return function (fn /*, ...args*/) { + var args = (0, _slice2.default)(arguments, 1); + defer(function () { + fn.apply(null, args); + }); + }; +} + +var _defer; + +if (hasSetImmediate) { + _defer = setImmediate; +} else if (hasNextTick) { + _defer = process.nextTick; +} else { + _defer = fallback; +} + +exports.default = wrap(_defer); +}).call(this,require('_process'),require("timers").setImmediate) +},{"./slice":54,"_process":109,"timers":1415}],54:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = slice; +function slice(arrayLike, start) { + start = start | 0; + var newLen = Math.max(arrayLike.length - start, 0); + var newArr = Array(newLen); + for (var idx = 0; idx < newLen; idx++) { + newArr[idx] = arrayLike[start + idx]; + } + return newArr; +} +module.exports = exports["default"]; +},{}],55:[function(require,module,exports){ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _withoutIndex; +function _withoutIndex(iteratee) { + return function (value, index, callback) { + return iteratee(value, callback); + }; +} +module.exports = exports["default"]; +},{}],56:[function(require,module,exports){ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.isAsync = undefined; + +var _asyncify = require('../asyncify'); + +var _asyncify2 = _interopRequireDefault(_asyncify); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var supportsSymbol = typeof Symbol === 'function'; + +function isAsync(fn) { + return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction'; +} + +function wrapAsync(asyncFn) { + return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn; +} + +exports.default = wrapAsync; +exports.isAsync = isAsync; +},{"../asyncify":41}],57:[function(require,module,exports){ + +/*! + * Copyright 2010 LearnBoost + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Module dependencies. + */ + +var crypto = require('crypto') + , parse = require('url').parse + ; + +/** + * Valid keys. + */ + +var keys = + [ 'acl' + , 'location' + , 'logging' + , 'notification' + , 'partNumber' + , 'policy' + , 'requestPayment' + , 'torrent' + , 'uploadId' + , 'uploads' + , 'versionId' + , 'versioning' + , 'versions' + , 'website' + ] + +/** + * Return an "Authorization" header value with the given `options` + * in the form of "AWS :" + * + * @param {Object} options + * @return {String} + * @api private + */ + +function authorization (options) { + return 'AWS ' + options.key + ':' + sign(options) +} + +module.exports = authorization +module.exports.authorization = authorization + +/** + * Simple HMAC-SHA1 Wrapper + * + * @param {Object} options + * @return {String} + * @api private + */ + +function hmacSha1 (options) { + return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') +} + +module.exports.hmacSha1 = hmacSha1 + +/** + * Create a base64 sha1 HMAC for `options`. + * + * @param {Object} options + * @return {String} + * @api private + */ + +function sign (options) { + options.message = stringToSign(options) + return hmacSha1(options) +} +module.exports.sign = sign + +/** + * Create a base64 sha1 HMAC for `options`. + * + * Specifically to be used with S3 presigned URLs + * + * @param {Object} options + * @return {String} + * @api private + */ + +function signQuery (options) { + options.message = queryStringToSign(options) + return hmacSha1(options) +} +module.exports.signQuery= signQuery + +/** + * Return a string for sign() with the given `options`. + * + * Spec: + * + * \n + * \n + * \n + * \n + * [headers\n] + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function stringToSign (options) { + var headers = options.amazonHeaders || '' + if (headers) headers += '\n' + var r = + [ options.verb + , options.md5 + , options.contentType + , options.date ? options.date.toUTCString() : '' + , headers + options.resource + ] + return r.join('\n') +} +module.exports.stringToSign = stringToSign + +/** + * Return a string for sign() with the given `options`, but is meant exclusively + * for S3 presigned URLs + * + * Spec: + * + * \n + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function queryStringToSign (options){ + return 'GET\n\n\n' + options.date + '\n' + options.resource +} +module.exports.queryStringToSign = queryStringToSign + +/** + * Perform the following: + * + * - ignore non-amazon headers + * - lowercase fields + * - sort lexicographically + * - trim whitespace between ":" + * - join with newline + * + * @param {Object} headers + * @return {String} + * @api private + */ + +function canonicalizeHeaders (headers) { + var buf = [] + , fields = Object.keys(headers) + ; + for (var i = 0, len = fields.length; i < len; ++i) { + var field = fields[i] + , val = headers[field] + , field = field.toLowerCase() + ; + if (0 !== field.indexOf('x-amz')) continue + buf.push(field + ':' + val) + } + return buf.sort().join('\n') +} +module.exports.canonicalizeHeaders = canonicalizeHeaders + +/** + * Perform the following: + * + * - ignore non sub-resources + * - sort lexicographically + * + * @param {String} resource + * @return {String} + * @api private + */ + +function canonicalizeResource (resource) { + var url = parse(resource, true) + , path = url.pathname + , buf = [] + ; + + Object.keys(url.query).forEach(function(key){ + if (!~keys.indexOf(key)) return + var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) + buf.push(key + val) + }) + + return path + (buf.length ? '?' + buf.sort().join('&') : '') +} +module.exports.canonicalizeResource = canonicalizeResource + +},{"crypto":470,"url":1433}],58:[function(require,module,exports){ +(function (process,Buffer){ +var aws4 = exports, + url = require('url'), + querystring = require('querystring'), + crypto = require('crypto'), + lru = require('./lru'), + credentialsCache = lru(1000) + +// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html + +function hmac(key, string, encoding) { + return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) +} + +function hash(string, encoding) { + return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +} + +// This function assumes the string has already been percent encoded +function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +// request: { path | body, [host], [method], [headers], [service], [region] } +// credentials: { accessKeyId, secretAccessKey, [sessionToken] } +function RequestSigner(request, credentials) { + + if (typeof request === 'string') request = url.parse(request) + + var headers = request.headers = (request.headers || {}), + hostParts = this.matchHost(request.hostname || request.host || headers.Host || headers.host) + + this.request = request + this.credentials = credentials || this.defaultCredentials() + + this.service = request.service || hostParts[0] || '' + this.region = request.region || hostParts[1] || 'us-east-1' + + // SES uses a different domain from the service name + if (this.service === 'email') this.service = 'ses' + + if (!request.method && request.body) + request.method = 'POST' + + if (!headers.Host && !headers.host) { + headers.Host = request.hostname || request.host || this.createHost() + + // If a port is specified explicitly, use it as is + if (request.port) + headers.Host += ':' + request.port + } + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host + + this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' +} + +RequestSigner.prototype.matchHost = function(host) { + var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/) + var hostParts = (match || []).slice(1, 3) + + // ES's hostParts are sometimes the other way round, if the value that is expected + // to be region equals ‘es’ switch them back + // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com + if (hostParts[1] === 'es') + hostParts = hostParts.reverse() + + return hostParts +} + +// http://docs.aws.amazon.com/general/latest/gr/rande.html +RequestSigner.prototype.isSingleRegion = function() { + // Special case for S3 and SimpleDB in us-east-1 + if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true + + return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] + .indexOf(this.service) >= 0 +} + +RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? '' : + (this.service === 's3' && this.region !== 'us-east-1' ? '-' : '.') + this.region, + service = this.service === 'ses' ? 'email' : this.service + return service + region + '.amazonaws.com' +} + +RequestSigner.prototype.prepareRequest = function() { + this.parsePath() + + var request = this.request, headers = request.headers, query + + if (request.signQuery) { + + this.parsedPath.query = query = this.parsedPath.query || {} + + if (this.credentials.sessionToken) + query['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !query['X-Amz-Expires']) + query['X-Amz-Expires'] = 86400 + + if (query['X-Amz-Date']) + this.datetime = query['X-Amz-Date'] + else + query['X-Amz-Date'] = this.getDateTime() + + query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' + query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() + query['X-Amz-SignedHeaders'] = this.signedHeaders() + + } else { + + if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { + if (request.body && !headers['Content-Type'] && !headers['content-type']) + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + + if (request.body && !headers['Content-Length'] && !headers['content-length']) + headers['Content-Length'] = Buffer.byteLength(request.body) + + if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) + headers['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) + headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') + + if (headers['X-Amz-Date'] || headers['x-amz-date']) + this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] + else + headers['X-Amz-Date'] = this.getDateTime() + } + + delete headers.Authorization + delete headers.authorization + } +} + +RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest() + + if (this.request.signQuery) { + this.parsedPath.query['X-Amz-Signature'] = this.signature() + } else { + this.request.headers.Authorization = this.authHeader() + } + + this.request.path = this.formatPath() + + return this.request +} + +RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, + date = new Date(headers.Date || headers.date || new Date) + + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') + + // Remove the trailing 'Z' on the timestamp string for CodeCommit git access + if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) + } + return this.datetime +} + +RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8) +} + +RequestSigner.prototype.authHeader = function() { + return [ + 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), + 'SignedHeaders=' + this.signedHeaders(), + 'Signature=' + this.signature(), + ].join(', ') +} + +RequestSigner.prototype.signature = function() { + var date = this.getDate(), + cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), + kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) + if (!kCredentials) { + kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) + kRegion = hmac(kDate, this.region) + kService = hmac(kRegion, this.service) + kCredentials = hmac(kService, 'aws4_request') + credentialsCache.set(cacheKey, kCredentials) + } + return hmac(kCredentials, this.stringToSign(), 'hex') +} + +RequestSigner.prototype.stringToSign = function() { + return [ + 'AWS4-HMAC-SHA256', + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), 'hex'), + ].join('\n') +} + +RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest() + + var pathStr = this.parsedPath.path, + query = this.parsedPath.query, + headers = this.request.headers, + queryStr = '', + normalizePath = this.service !== 's3', + decodePath = this.service === 's3' || this.request.doNotEncodePath, + decodeSlashesInPath = this.service === 's3', + firstValOnly = this.service === 's3', + bodyHash + + if (this.service === 's3' && this.request.signQuery) { + bodyHash = 'UNSIGNED-PAYLOAD' + } else if (this.isCodeCommitGit) { + bodyHash = '' + } else { + bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || + hash(this.request.body || '', 'hex') + } + + if (query) { + queryStr = encodeRfc3986(querystring.stringify(Object.keys(query).sort().reduce(function(obj, key) { + if (!key) return obj + obj[key] = !Array.isArray(query[key]) ? query[key] : + (firstValOnly ? query[key][0] : query[key].slice().sort()) + return obj + }, {}))) + } + if (pathStr !== '/') { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') + pathStr = pathStr.split('/').reduce(function(path, piece) { + if (normalizePath && piece === '..') { + path.pop() + } else if (!normalizePath || piece !== '.') { + if (decodePath) piece = decodeURIComponent(piece) + path.push(encodeRfc3986(encodeURIComponent(piece))) + } + return path + }, []).join('/') + if (pathStr[0] !== '/') pathStr = '/' + pathStr + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') + } + + return [ + this.request.method || 'GET', + pathStr, + queryStr, + this.canonicalHeaders() + '\n', + this.signedHeaders(), + bodyHash, + ].join('\n') +} + +RequestSigner.prototype.canonicalHeaders = function() { + var headers = this.request.headers + function trimAll(header) { + return header.toString().trim().replace(/\s+/g, ' ') + } + return Object.keys(headers) + .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) + .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) + .join('\n') +} + +RequestSigner.prototype.signedHeaders = function() { + return Object.keys(this.request.headers) + .map(function(key) { return key.toLowerCase() }) + .sort() + .join(';') +} + +RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + 'aws4_request', + ].join('/') +} + +RequestSigner.prototype.defaultCredentials = function() { + var env = process.env + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN, + } +} + +RequestSigner.prototype.parsePath = function() { + var path = this.request.path || '/', + queryIx = path.indexOf('?'), + query = null + + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)) + path = path.slice(0, queryIx) + } + + // S3 doesn't always encode characters > 127 correctly and + // all services don't encode characters > 255 correctly + // So if there are non-reserved chars (and it's not already all % encoded), just encode them all + if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { + path = path.split('/').map(function(piece) { + return encodeURIComponent(decodeURIComponent(piece)) + }).join('/') + } + + this.parsedPath = { + path: path, + query: query, + } +} + +RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, + query = this.parsedPath.query + + if (!query) return path + + // Services don't support empty query string keys + if (query[''] != null) delete query[''] + + return path + '?' + encodeRfc3986(querystring.stringify(query)) +} + +aws4.RequestSigner = RequestSigner + +aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign() +} + +}).call(this,require('_process'),require("buffer").Buffer) +},{"./lru":59,"_process":109,"buffer":113,"crypto":470,"querystring":1035,"url":1433}],59:[function(require,module,exports){ +module.exports = function(size) { + return new LruCache(size) +} + +function LruCache(size) { + this.capacity = size | 0 + this.map = Object.create(null) + this.list = new DoublyLinkedList() +} + +LruCache.prototype.get = function(key) { + var node = this.map[key] + if (node == null) return undefined + this.used(node) + return node.val +} + +LruCache.prototype.set = function(key, val) { + var node = this.map[key] + if (node != null) { + node.val = val + } else { + if (!this.capacity) this.prune() + if (!this.capacity) return false + node = new DoublyLinkedNode(key, val) + this.map[key] = node + this.capacity-- + } + this.used(node) + return true +} + +LruCache.prototype.used = function(node) { + this.list.moveToFront(node) +} + +LruCache.prototype.prune = function() { + var node = this.list.pop() + if (node != null) { + delete this.map[node.key] + this.capacity++ + } +} + + +function DoublyLinkedList() { + this.firstNode = null + this.lastNode = null +} + +DoublyLinkedList.prototype.moveToFront = function(node) { + if (this.firstNode == node) return + + this.remove(node) + + if (this.firstNode == null) { + this.firstNode = node + this.lastNode = node + node.prev = null + node.next = null + } else { + node.prev = null + node.next = this.firstNode + node.next.prev = node + this.firstNode = node + } +} + +DoublyLinkedList.prototype.pop = function() { + var lastNode = this.lastNode + if (lastNode != null) { + this.remove(lastNode) + } + return lastNode +} + +DoublyLinkedList.prototype.remove = function(node) { + if (this.firstNode == node) { + this.firstNode = node.next + } else if (node.prev != null) { + node.prev.next = node.next + } + if (this.lastNode == node) { + this.lastNode = node.prev + } else if (node.next != null) { + node.next.prev = node.prev + } +} + + +function DoublyLinkedNode(key, val) { + this.key = key + this.val = val + this.prev = null + this.next = null +} + +},{}],60:[function(require,module,exports){ +(function (global){ +"use strict"; + +require("core-js/shim"); + +require("regenerator-runtime/runtime"); + +require("core-js/fn/regexp/escape"); + +if (global._babelPolyfill) { + throw new Error("only one instance of babel-polyfill is allowed"); +} +global._babelPolyfill = true; + +var DEFINE_PROPERTY = "defineProperty"; +function define(O, key, value) { + O[key] || Object[DEFINE_PROPERTY](O, key, { + writable: true, + configurable: true, + value: value + }); +} + +define(String.prototype, "padLeft", "".padStart); +define(String.prototype, "padRight", "".padEnd); + +"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) { + [][key] && define(Array, key, Function.call.bind([][key])); +}); +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"core-js/fn/regexp/escape":135,"core-js/shim":463,"regenerator-runtime/runtime":61}],61:[function(require,module,exports){ +(function (global){ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof global.process === "object" && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],62:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + for (var i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],63:[function(require,module,exports){ +'use strict'; + +var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; + +/* + * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a + * result, it retains the original copyright and license. The two files are + * under slightly different (but compatible) licenses, and are here combined in + * one file. + * + * Credit for the actual porting work goes to: + * Devi Mandiri + */ + +/* + * The Blowfish portions are under the following license: + * + * Blowfish block cipher for OpenBSD + * Copyright 1997 Niels Provos + * All rights reserved. + * + * Implementation advice by David Mazieres . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * The bcrypt_pbkdf portions are under the following license: + * + * Copyright (c) 2013 Ted Unangst + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Performance improvements (Javascript-specific): + * + * Copyright 2016, Joyent Inc + * Author: Alex Wilson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +// Ported from OpenBSD bcrypt_pbkdf.c v1.9 + +var BLF_J = 0; + +var Blowfish = function() { + this.S = [ + new Uint32Array([ + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), + new Uint32Array([ + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), + new Uint32Array([ + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), + new Uint32Array([ + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) + ]; + this.P = new Uint32Array([ + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b]); +}; + +function F(S, x8, i) { + return (((S[0][x8[i+3]] + + S[1][x8[i+2]]) ^ + S[2][x8[i+1]]) + + S[3][x8[i]]); +}; + +Blowfish.prototype.encipher = function(x, x8) { + if (x8 === undefined) { + x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + } + x[0] ^= this.P[0]; + for (var i = 1; i < 16; i += 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[17]; + x[1] = t; +}; + +Blowfish.prototype.decipher = function(x) { + var x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + x[0] ^= this.P[17]; + for (var i = 16; i > 0; i -= 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[0]; + x[1] = t; +}; + +function stream2word(data, databytes){ + var i, temp = 0; + for (i = 0; i < 4; i++, BLF_J++) { + if (BLF_J >= databytes) BLF_J = 0; + temp = (temp << 8) | data[BLF_J]; + } + return temp; +}; + +Blowfish.prototype.expand0state = function(key, keybytes) { + var d = new Uint32Array(2), i, k; + var d8 = new Uint8Array(d.buffer); + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + BLF_J = 0; + + for (i = 0; i < 18; i += 2) { + this.encipher(d, d8); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + this.encipher(d, d8); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } +}; + +Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { + var d = new Uint32Array(2), i, k; + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + + for (i = 0, BLF_J = 0; i < 18; i += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } + BLF_J = 0; +}; + +Blowfish.prototype.enc = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.encipher(data.subarray(i*2)); + } +}; + +Blowfish.prototype.dec = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.decipher(data.subarray(i*2)); + } +}; + +var BCRYPT_BLOCKS = 8, + BCRYPT_HASHSIZE = 32; + +function bcrypt_hash(sha2pass, sha2salt, out) { + var state = new Blowfish(), + cdata = new Uint32Array(BCRYPT_BLOCKS), i, + ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, + 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, + 105,116,101]); //"OxychromaticBlowfishSwatDynamite" + + state.expandstate(sha2salt, 64, sha2pass, 64); + for (i = 0; i < 64; i++) { + state.expand0state(sha2salt, 64); + state.expand0state(sha2pass, 64); + } + + for (i = 0; i < BCRYPT_BLOCKS; i++) + cdata[i] = stream2word(ciphertext, ciphertext.byteLength); + for (i = 0; i < 64; i++) + state.enc(cdata, cdata.byteLength / 8); + + for (i = 0; i < BCRYPT_BLOCKS; i++) { + out[4*i+3] = cdata[i] >>> 24; + out[4*i+2] = cdata[i] >>> 16; + out[4*i+1] = cdata[i] >>> 8; + out[4*i+0] = cdata[i]; + } +}; + +function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { + var sha2pass = new Uint8Array(64), + sha2salt = new Uint8Array(64), + out = new Uint8Array(BCRYPT_HASHSIZE), + tmpout = new Uint8Array(BCRYPT_HASHSIZE), + countsalt = new Uint8Array(saltlen+4), + i, j, amt, stride, dest, count, + origkeylen = keylen; + + if (rounds < 1) + return -1; + if (passlen === 0 || saltlen === 0 || keylen === 0 || + keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) + return -1; + + stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); + amt = Math.floor((keylen + stride - 1) / stride); + + for (i = 0; i < saltlen; i++) + countsalt[i] = salt[i]; + + crypto_hash_sha512(sha2pass, pass, passlen); + + for (count = 1; keylen > 0; count++) { + countsalt[saltlen+0] = count >>> 24; + countsalt[saltlen+1] = count >>> 16; + countsalt[saltlen+2] = count >>> 8; + countsalt[saltlen+3] = count; + + crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (i = out.byteLength; i--;) + out[i] = tmpout[i]; + + for (i = 1; i < rounds; i++) { + crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (j = 0; j < out.byteLength; j++) + out[j] ^= tmpout[j]; + } + + amt = Math.min(amt, keylen); + for (i = 0; i < amt; i++) { + dest = i * stride + (count - 1); + if (dest >= origkeylen) + break; + key[dest] = out[i]; + } + keylen -= i; + } + + return 0; +}; + +module.exports = { + BLOCKS: BCRYPT_BLOCKS, + HASHSIZE: BCRYPT_HASHSIZE, + hash: bcrypt_hash, + pbkdf: bcrypt_pbkdf +}; + +},{"tweetnacl":1427}],64:[function(require,module,exports){ +var document = require('global/document') +var hyperx = require('hyperx') +var onload = require('on-load') + +var SVGNS = 'http://www.w3.org/2000/svg' +var XLINKNS = 'http://www.w3.org/1999/xlink' + +var BOOL_PROPS = { + autofocus: 1, + checked: 1, + defaultchecked: 1, + disabled: 1, + formnovalidate: 1, + indeterminate: 1, + readonly: 1, + required: 1, + selected: 1, + willvalidate: 1 +} +var COMMENT_TAG = '!--' +var SVG_TAGS = [ + 'svg', + 'altGlyph', 'altGlyphDef', 'altGlyphItem', 'animate', 'animateColor', + 'animateMotion', 'animateTransform', 'circle', 'clipPath', 'color-profile', + 'cursor', 'defs', 'desc', 'ellipse', 'feBlend', 'feColorMatrix', + 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', + 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', + 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', + 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', + 'feSpotLight', 'feTile', 'feTurbulence', 'filter', 'font', 'font-face', + 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', + 'foreignObject', 'g', 'glyph', 'glyphRef', 'hkern', 'image', 'line', + 'linearGradient', 'marker', 'mask', 'metadata', 'missing-glyph', 'mpath', + 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', + 'set', 'stop', 'switch', 'symbol', 'text', 'textPath', 'title', 'tref', + 'tspan', 'use', 'view', 'vkern' +] + +function belCreateElement (tag, props, children) { + var el + + // If an svg tag, it needs a namespace + if (SVG_TAGS.indexOf(tag) !== -1) { + props.namespace = SVGNS + } + + // If we are using a namespace + var ns = false + if (props.namespace) { + ns = props.namespace + delete props.namespace + } + + // Create the element + if (ns) { + el = document.createElementNS(ns, tag) + } else if (tag === COMMENT_TAG) { + return document.createComment(props.comment) + } else { + el = document.createElement(tag) + } + + // If adding onload events + if (props.onload || props.onunload) { + var load = props.onload || function () {} + var unload = props.onunload || function () {} + onload(el, function belOnload () { + load(el) + }, function belOnunload () { + unload(el) + }, + // We have to use non-standard `caller` to find who invokes `belCreateElement` + belCreateElement.caller.caller.caller) + delete props.onload + delete props.onunload + } + + // Create the properties + for (var p in props) { + if (props.hasOwnProperty(p)) { + var key = p.toLowerCase() + var val = props[p] + // Normalize className + if (key === 'classname') { + key = 'class' + p = 'class' + } + // The for attribute gets transformed to htmlFor, but we just set as for + if (p === 'htmlFor') { + p = 'for' + } + // If a property is boolean, set itself to the key + if (BOOL_PROPS[key]) { + if (val === 'true') val = key + else if (val === 'false') continue + } + // If a property prefers being set directly vs setAttribute + if (key.slice(0, 2) === 'on') { + el[p] = val + } else { + if (ns) { + if (p === 'xlink:href') { + el.setAttributeNS(XLINKNS, p, val) + } else if (/^xmlns($|:)/i.test(p)) { + // skip xmlns definitions + } else { + el.setAttributeNS(null, p, val) + } + } else { + el.setAttribute(p, val) + } + } + } + } + + function appendChild (childs) { + if (!Array.isArray(childs)) return + for (var i = 0; i < childs.length; i++) { + var node = childs[i] + if (Array.isArray(node)) { + appendChild(node) + continue + } + + if (typeof node === 'number' || + typeof node === 'boolean' || + typeof node === 'function' || + node instanceof Date || + node instanceof RegExp) { + node = node.toString() + } + + if (typeof node === 'string') { + if (el.lastChild && el.lastChild.nodeName === '#text') { + el.lastChild.nodeValue += node + continue + } + node = document.createTextNode(node) + } + + if (node && node.nodeType) { + el.appendChild(node) + } + } + } + appendChild(children) + + return el +} + +module.exports = hyperx(belCreateElement, {comments: true}) +module.exports.default = module.exports +module.exports.createElement = belCreateElement + +},{"global/document":731,"hyperx":824,"on-load":984}],65:[function(require,module,exports){ +// Reference https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki +// Format: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] +// NOTE: SIGHASH byte ignored AND restricted, truncate before use + +var Buffer = require('safe-buffer').Buffer + +function check (buffer) { + if (buffer.length < 8) return false + if (buffer.length > 72) return false + if (buffer[0] !== 0x30) return false + if (buffer[1] !== buffer.length - 2) return false + if (buffer[2] !== 0x02) return false + + var lenR = buffer[3] + if (lenR === 0) return false + if (5 + lenR >= buffer.length) return false + if (buffer[4 + lenR] !== 0x02) return false + + var lenS = buffer[5 + lenR] + if (lenS === 0) return false + if ((6 + lenR + lenS) !== buffer.length) return false + + if (buffer[4] & 0x80) return false + if (lenR > 1 && (buffer[4] === 0x00) && !(buffer[5] & 0x80)) return false + + if (buffer[lenR + 6] & 0x80) return false + if (lenS > 1 && (buffer[lenR + 6] === 0x00) && !(buffer[lenR + 7] & 0x80)) return false + return true +} + +function decode (buffer) { + if (buffer.length < 8) throw new Error('DER sequence length is too short') + if (buffer.length > 72) throw new Error('DER sequence length is too long') + if (buffer[0] !== 0x30) throw new Error('Expected DER sequence') + if (buffer[1] !== buffer.length - 2) throw new Error('DER sequence length is invalid') + if (buffer[2] !== 0x02) throw new Error('Expected DER integer') + + var lenR = buffer[3] + if (lenR === 0) throw new Error('R length is zero') + if (5 + lenR >= buffer.length) throw new Error('R length is too long') + if (buffer[4 + lenR] !== 0x02) throw new Error('Expected DER integer (2)') + + var lenS = buffer[5 + lenR] + if (lenS === 0) throw new Error('S length is zero') + if ((6 + lenR + lenS) !== buffer.length) throw new Error('S length is invalid') + + if (buffer[4] & 0x80) throw new Error('R value is negative') + if (lenR > 1 && (buffer[4] === 0x00) && !(buffer[5] & 0x80)) throw new Error('R value excessively padded') + + if (buffer[lenR + 6] & 0x80) throw new Error('S value is negative') + if (lenS > 1 && (buffer[lenR + 6] === 0x00) && !(buffer[lenR + 7] & 0x80)) throw new Error('S value excessively padded') + + // non-BIP66 - extract R, S values + return { + r: buffer.slice(4, 4 + lenR), + s: buffer.slice(6 + lenR) + } +} + +/* + * Expects r and s to be positive DER integers. + * + * The DER format uses the most significant bit as a sign bit (& 0x80). + * If the significant bit is set AND the integer is positive, a 0x00 is prepended. + * + * Examples: + * + * 0 => 0x00 + * 1 => 0x01 + * -1 => 0xff + * 127 => 0x7f + * -127 => 0x81 + * 128 => 0x0080 + * -128 => 0x80 + * 255 => 0x00ff + * -255 => 0xff01 + * 16300 => 0x3fac + * -16300 => 0xc054 + * 62300 => 0x00f35c + * -62300 => 0xff0ca4 +*/ +function encode (r, s) { + var lenR = r.length + var lenS = s.length + if (lenR === 0) throw new Error('R length is zero') + if (lenS === 0) throw new Error('S length is zero') + if (lenR > 33) throw new Error('R length is too long') + if (lenS > 33) throw new Error('S length is too long') + if (r[0] & 0x80) throw new Error('R value is negative') + if (s[0] & 0x80) throw new Error('S value is negative') + if (lenR > 1 && (r[0] === 0x00) && !(r[1] & 0x80)) throw new Error('R value excessively padded') + if (lenS > 1 && (s[0] === 0x00) && !(s[1] & 0x80)) throw new Error('S value excessively padded') + + var signature = Buffer.allocUnsafe(6 + lenR + lenS) + + // 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] + signature[0] = 0x30 + signature[1] = signature.length - 2 + signature[2] = 0x02 + signature[3] = r.length + r.copy(signature, 4) + signature[4 + lenR] = 0x02 + signature[5 + lenR] = s.length + s.copy(signature, 6 + lenR) + + return signature +} + +module.exports = { + check: check, + decode: decode, + encode: encode +} + +},{"safe-buffer":1334}],66:[function(require,module,exports){ +(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 = require('buffer').Buffer; + } catch (e) { + } + + BN.isBN = function isBN (num) { + if (num instanceof BN) { + return true; + } + + return num !== null && typeof num === 'object' && + num.constructor.wordSize === BN.wordSize && 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 (this.length <= s) { + return this; + } + + 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).toRed(this); + 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); + +},{"buffer":77}],67:[function(require,module,exports){ +ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(acequire, exports, module) { +"use strict"; +var oop = acequire("./lib/oop"); +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var lang = acequire("./lib/lang"); +var Range = acequire("./range").Range; +var Anchor = acequire("./anchor").Anchor; +var HashHandler = acequire("./keyboard/hash_handler").HashHandler; +var Tokenizer = acequire("./tokenizer").Tokenizer; +var comparePoints = Range.comparePoints; + +var SnippetManager = function() { + this.snippetMap = {}; + this.snippetNameMap = {}; +}; + +(function() { + oop.implement(this, EventEmitter); + + this.getTokenizer = function() { + function TabstopToken(str, _, stack) { + str = str.substr(1); + if (/^\d+$/.test(str) && !stack.inFormatString) + return [{tabstopId: parseInt(str, 10)}]; + return [{text: str}]; + } + function escape(ch) { + return "(?:[^\\\\" + ch + "]|\\\\.)"; + } + SnippetManager.$tokenizer = new Tokenizer({ + start: [ + {regex: /:/, onMatch: function(val, state, stack) { + if (stack.length && stack[0].expectIf) { + stack[0].expectIf = false; + stack[0].elseBranch = stack[0]; + return [stack[0]]; + } + return ":"; + }}, + {regex: /\\./, onMatch: function(val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) { + val = ch; + }else if ("`$\\".indexOf(ch) != -1) { + val = ch; + } else if (stack.inFormatString) { + if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\n"; + else if ("ulULE".indexOf(ch) != -1) { + val = {changeCase: ch, local: ch > "a"}; + } + } + + return [val]; + }}, + {regex: /}/, onMatch: function(val, state, stack) { + return [stack.length ? stack.shift() : val]; + }}, + {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken}, + {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) { + var t = TabstopToken(str.substr(1), state, stack); + stack.unshift(t[0]); + return t; + }, next: "snippetVar"}, + {regex: /\n/, token: "newline", merge: false} + ], + snippetVar: [ + {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) { + stack[0].choices = val.slice(1, -1).split(","); + }, next: "start"}, + {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?", + onMatch: function(val, state, stack) { + var ts = stack[0]; + ts.fmtString = val; + + val = this.splitRegex.exec(val); + ts.guard = val[1]; + ts.fmt = val[2]; + ts.flag = val[3]; + return ""; + }, next: "start"}, + {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) { + stack[0].code = val.splice(1, -1); + return ""; + }, next: "start"}, + {regex: "\\?", onMatch: function(val, state, stack) { + if (stack[0]) + stack[0].expectIf = true; + }, next: "start"}, + {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"} + ], + formatString: [ + {regex: "/(" + escape("/") + "+)/", token: "regex"}, + {regex: "", onMatch: function(val, state, stack) { + stack.inFormatString = true; + }, next: "start"} + ] + }); + SnippetManager.prototype.getTokenizer = function() { + return SnippetManager.$tokenizer; + }; + return SnippetManager.$tokenizer; + }; + + this.tokenizeTmSnippet = function(str, startState) { + return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) { + return x.value || x; + }); + }; + + this.$getDefaultValue = function(editor, name) { + if (/^[A-Z]\d+$/.test(name)) { + var i = name.substr(1); + return (this.variables[name[0] + "__"] || {})[i]; + } + if (/^\d+$/.test(name)) { + return (this.variables.__ || {})[name]; + } + name = name.replace(/^TM_/, ""); + + if (!editor) + return; + var s = editor.session; + switch(name) { + case "CURRENT_WORD": + var r = s.getWordRange(); + case "SELECTION": + case "SELECTED_TEXT": + return s.getTextRange(r); + case "CURRENT_LINE": + return s.getLine(editor.getCursorPosition().row); + case "PREV_LINE": // not possible in textmate + return s.getLine(editor.getCursorPosition().row - 1); + case "LINE_INDEX": + return editor.getCursorPosition().column; + case "LINE_NUMBER": + return editor.getCursorPosition().row + 1; + case "SOFT_TABS": + return s.getUseSoftTabs() ? "YES" : "NO"; + case "TAB_SIZE": + return s.getTabSize(); + case "FILENAME": + case "FILEPATH": + return ""; + case "FULLNAME": + return "Ace"; + } + }; + this.variables = {}; + this.getVariableValue = function(editor, varName) { + if (this.variables.hasOwnProperty(varName)) + return this.variables[varName](editor, varName) || ""; + return this.$getDefaultValue(editor, varName) || ""; + }; + this.tmStrFormat = function(str, ch, editor) { + var flag = ch.flag || ""; + var re = ch.guard; + re = new RegExp(re, flag.replace(/[^gi]/, "")); + var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString"); + var _self = this; + var formatted = str.replace(re, function() { + _self.variables.__ = arguments; + var fmtParts = _self.resolveVariables(fmtTokens, editor); + var gChangeCase = "E"; + for (var i = 0; i < fmtParts.length; i++) { + var ch = fmtParts[i]; + if (typeof ch == "object") { + fmtParts[i] = ""; + if (ch.changeCase && ch.local) { + var next = fmtParts[i + 1]; + if (next && typeof next == "string") { + if (ch.changeCase == "u") + fmtParts[i] = next[0].toUpperCase(); + else + fmtParts[i] = next[0].toLowerCase(); + fmtParts[i + 1] = next.substr(1); + } + } else if (ch.changeCase) { + gChangeCase = ch.changeCase; + } + } else if (gChangeCase == "U") { + fmtParts[i] = ch.toUpperCase(); + } else if (gChangeCase == "L") { + fmtParts[i] = ch.toLowerCase(); + } + } + return fmtParts.join(""); + }); + this.variables.__ = null; + return formatted; + }; + + this.resolveVariables = function(snippet, editor) { + var result = []; + for (var i = 0; i < snippet.length; i++) { + var ch = snippet[i]; + if (typeof ch == "string") { + result.push(ch); + } else if (typeof ch != "object") { + continue; + } else if (ch.skip) { + gotoNext(ch); + } else if (ch.processed < i) { + continue; + } else if (ch.text) { + var value = this.getVariableValue(editor, ch.text); + if (value && ch.fmtString) + value = this.tmStrFormat(value, ch); + ch.processed = i; + if (ch.expectIf == null) { + if (value) { + result.push(value); + gotoNext(ch); + } + } else { + if (value) { + ch.skip = ch.elseBranch; + } else + gotoNext(ch); + } + } else if (ch.tabstopId != null) { + result.push(ch); + } else if (ch.changeCase != null) { + result.push(ch); + } + } + function gotoNext(ch) { + var i1 = snippet.indexOf(ch, i + 1); + if (i1 != -1) + i = i1; + } + return result; + }; + + this.insertSnippetForSelection = function(editor, snippetText) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var tabString = editor.session.getTabString(); + var indentString = line.match(/^\s*/)[0]; + + if (cursor.column < indentString.length) + indentString = indentString.slice(0, cursor.column); + + var tokens = this.tokenizeTmSnippet(snippetText); + tokens = this.resolveVariables(tokens, editor); + tokens = tokens.map(function(x) { + if (x == "\n") + return x + indentString; + if (typeof x == "string") + return x.replace(/\t/g, tabString); + return x; + }); + var tabstops = []; + tokens.forEach(function(p, i) { + if (typeof p != "object") + return; + var id = p.tabstopId; + var ts = tabstops[id]; + if (!ts) { + ts = tabstops[id] = []; + ts.index = id; + ts.value = ""; + } + if (ts.indexOf(p) !== -1) + return; + ts.push(p); + var i1 = tokens.indexOf(p, i + 1); + if (i1 === -1) + return; + + var value = tokens.slice(i + 1, i1); + var isNested = value.some(function(t) {return typeof t === "object"}); + if (isNested && !ts.value) { + ts.value = value; + } else if (value.length && (!ts.value || typeof ts.value !== "string")) { + ts.value = value.join(""); + } + }); + tabstops.forEach(function(ts) {ts.length = 0}); + var expanding = {}; + function copyValue(val) { + var copy = []; + for (var i = 0; i < val.length; i++) { + var p = val[i]; + if (typeof p == "object") { + if (expanding[p.tabstopId]) + continue; + var j = val.lastIndexOf(p, i - 1); + p = copy[j] || {tabstopId: p.tabstopId}; + } + copy[i] = p; + } + return copy; + } + for (var i = 0; i < tokens.length; i++) { + var p = tokens[i]; + if (typeof p != "object") + continue; + var id = p.tabstopId; + var i1 = tokens.indexOf(p, i + 1); + if (expanding[id]) { + if (expanding[id] === p) + expanding[id] = null; + continue; + } + + var ts = tabstops[id]; + var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value); + arg.unshift(i + 1, Math.max(0, i1 - i)); + arg.push(p); + expanding[id] = p; + tokens.splice.apply(tokens, arg); + + if (ts.indexOf(p) === -1) + ts.push(p); + } + var row = 0, column = 0; + var text = ""; + tokens.forEach(function(t) { + if (typeof t === "string") { + if (t[0] === "\n"){ + column = t.length - 1; + row ++; + } else + column += t.length; + text += t; + } else { + if (!t.start) + t.start = {row: row, column: column}; + else + t.end = {row: row, column: column}; + } + }); + var range = editor.getSelectionRange(); + var end = editor.session.replace(range, text); + + var tabstopManager = new TabstopManager(editor); + var selectionId = editor.inVirtualSelectionMode && editor.selection.index; + tabstopManager.addTabstops(tabstops, range.start, end, selectionId); + }; + + this.insertSnippet = function(editor, snippetText) { + var self = this; + if (editor.inVirtualSelectionMode) + return self.insertSnippetForSelection(editor, snippetText); + + editor.forEachSelection(function() { + self.insertSnippetForSelection(editor, snippetText); + }, null, {keepOrder: true}); + + if (editor.tabstopManager) + editor.tabstopManager.tabNext(); + }; + + this.$getScope = function(editor) { + var scope = editor.session.$mode.$id || ""; + scope = scope.split("/").pop(); + if (scope === "html" || scope === "php") { + if (scope === "php" && !editor.session.$mode.inlinePhp) + scope = "html"; + var c = editor.getCursorPosition(); + var state = editor.session.getState(c.row); + if (typeof state === "object") { + state = state[0]; + } + if (state.substring) { + if (state.substring(0, 3) == "js-") + scope = "javascript"; + else if (state.substring(0, 4) == "css-") + scope = "css"; + else if (state.substring(0, 4) == "php-") + scope = "php"; + } + } + + return scope; + }; + + this.getActiveScopes = function(editor) { + var scope = this.$getScope(editor); + var scopes = [scope]; + var snippetMap = this.snippetMap; + if (snippetMap[scope] && snippetMap[scope].includeScopes) { + scopes.push.apply(scopes, snippetMap[scope].includeScopes); + } + scopes.push("_"); + return scopes; + }; + + this.expandWithTab = function(editor, options) { + var self = this; + var result = editor.forEachSelection(function() { + return self.expandSnippetForSelection(editor, options); + }, null, {keepOrder: true}); + if (result && editor.tabstopManager) + editor.tabstopManager.tabNext(); + return result; + }; + + this.expandSnippetForSelection = function(editor, options) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var before = line.substring(0, cursor.column); + var after = line.substr(cursor.column); + + var snippetMap = this.snippetMap; + var snippet; + this.getActiveScopes(editor).some(function(scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = this.findMatchingSnippet(snippets, before, after); + return !!snippet; + }, this); + if (!snippet) + return false; + if (options && options.dryRun) + return true; + editor.session.doc.removeInLine(cursor.row, + cursor.column - snippet.replaceBefore.length, + cursor.column + snippet.replaceAfter.length + ); + + this.variables.M__ = snippet.matchBefore; + this.variables.T__ = snippet.matchAfter; + this.insertSnippetForSelection(editor, snippet.content); + + this.variables.M__ = this.variables.T__ = null; + return true; + }; + + this.findMatchingSnippet = function(snippetList, before, after) { + for (var i = snippetList.length; i--;) { + var s = snippetList[i]; + if (s.startRe && !s.startRe.test(before)) + continue; + if (s.endRe && !s.endRe.test(after)) + continue; + if (!s.startRe && !s.endRe) + continue; + + s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; + s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; + s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; + s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; + return s; + } + }; + + this.snippetMap = {}; + this.snippetNameMap = {}; + this.register = function(snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + var self = this; + + if (!snippets) + snippets = []; + + function wrapRegexp(src) { + if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) + src = "(?:" + src + ")"; + + return src || ""; + } + function guardedRegexp(re, guard, opening) { + re = wrapRegexp(re); + guard = wrapRegexp(guard); + if (opening) { + re = guard + re; + if (re && re[re.length - 1] != "$") + re = re + "$"; + } else { + re = re + guard; + if (re && re[0] != "^") + re = "^" + re; + } + return new RegExp(re); + } + + function addSnippet(s) { + if (!s.scope) + s.scope = scope || "_"; + scope = s.scope; + if (!snippetMap[scope]) { + snippetMap[scope] = []; + snippetNameMap[scope] = {}; + } + + var map = snippetNameMap[scope]; + if (s.name) { + var old = map[s.name]; + if (old) + self.unregister(old); + map[s.name] = s; + } + snippetMap[scope].push(s); + + if (s.tabTrigger && !s.trigger) { + if (!s.guard && /^\w/.test(s.tabTrigger)) + s.guard = "\\b"; + s.trigger = lang.escapeRegExp(s.tabTrigger); + } + + if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard) + return; + + s.startRe = guardedRegexp(s.trigger, s.guard, true); + s.triggerRe = new RegExp(s.trigger, "", true); + + s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); + s.endTriggerRe = new RegExp(s.endTrigger, "", true); + } + + if (snippets && snippets.content) + addSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(addSnippet); + + this._signal("registerSnippets", {scope: scope}); + }; + this.unregister = function(snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + + function removeSnippet(s) { + var nameMap = snippetNameMap[s.scope||scope]; + if (nameMap && nameMap[s.name]) { + delete nameMap[s.name]; + var map = snippetMap[s.scope||scope]; + var i = map && map.indexOf(s); + if (i >= 0) + map.splice(i, 1); + } + } + if (snippets.content) + removeSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(removeSnippet); + }; + this.parseSnippetFile = function(str) { + str = str.replace(/\r/g, ""); + var list = [], snippet = {}; + var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; + var m; + while (m = re.exec(str)) { + if (m[1]) { + try { + snippet = JSON.parse(m[1]); + list.push(snippet); + } catch (e) {} + } if (m[4]) { + snippet.content = m[4].replace(/^\t/gm, ""); + list.push(snippet); + snippet = {}; + } else { + var key = m[2], val = m[3]; + if (key == "regex") { + var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; + snippet.guard = guardRe.exec(val)[1]; + snippet.trigger = guardRe.exec(val)[1]; + snippet.endTrigger = guardRe.exec(val)[1]; + snippet.endGuard = guardRe.exec(val)[1]; + } else if (key == "snippet") { + snippet.tabTrigger = val.match(/^\S*/)[0]; + if (!snippet.name) + snippet.name = val; + } else { + snippet[key] = val; + } + } + } + return list; + }; + this.getSnippetByName = function(name, editor) { + var snippetMap = this.snippetNameMap; + var snippet; + this.getActiveScopes(editor).some(function(scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = snippets[name]; + return !!snippet; + }, this); + return snippet; + }; + +}).call(SnippetManager.prototype); + + +var TabstopManager = function(editor) { + if (editor.tabstopManager) + return editor.tabstopManager; + editor.tabstopManager = this; + this.$onChange = this.onChange.bind(this); + this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; + this.$onChangeSession = this.onChangeSession.bind(this); + this.$onAfterExec = this.onAfterExec.bind(this); + this.attach(editor); +}; +(function() { + this.attach = function(editor) { + this.index = 0; + this.ranges = []; + this.tabstops = []; + this.$openTabstops = null; + this.selectedTabstop = null; + + this.editor = editor; + this.editor.on("change", this.$onChange); + this.editor.on("changeSelection", this.$onChangeSelection); + this.editor.on("changeSession", this.$onChangeSession); + this.editor.commands.on("afterExec", this.$onAfterExec); + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + }; + this.detach = function() { + this.tabstops.forEach(this.removeTabstopMarkers, this); + this.ranges = null; + this.tabstops = null; + this.selectedTabstop = null; + this.editor.removeListener("change", this.$onChange); + this.editor.removeListener("changeSelection", this.$onChangeSelection); + this.editor.removeListener("changeSession", this.$onChangeSession); + this.editor.commands.removeListener("afterExec", this.$onAfterExec); + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.tabstopManager = null; + this.editor = null; + }; + + this.onChange = function(delta) { + var changeRange = delta; + var isRemove = delta.action[0] == "r"; + var start = delta.start; + var end = delta.end; + var startRow = start.row; + var endRow = end.row; + var lineDif = endRow - startRow; + var colDiff = end.column - start.column; + + if (isRemove) { + lineDif = -lineDif; + colDiff = -colDiff; + } + if (!this.$inChange && isRemove) { + var ts = this.selectedTabstop; + var changedOutside = ts && !ts.some(function(r) { + return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0; + }); + if (changedOutside) + return this.detach(); + } + var ranges = this.ranges; + for (var i = 0; i < ranges.length; i++) { + var r = ranges[i]; + if (r.end.row < start.row) + continue; + + if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { + this.removeRange(r); + i--; + continue; + } + + if (r.start.row == startRow && r.start.column > start.column) + r.start.column += colDiff; + if (r.end.row == startRow && r.end.column >= start.column) + r.end.column += colDiff; + if (r.start.row >= startRow) + r.start.row += lineDif; + if (r.end.row >= startRow) + r.end.row += lineDif; + + if (comparePoints(r.start, r.end) > 0) + this.removeRange(r); + } + if (!ranges.length) + this.detach(); + }; + this.updateLinkedFields = function() { + var ts = this.selectedTabstop; + if (!ts || !ts.hasLinkedRanges) + return; + this.$inChange = true; + var session = this.editor.session; + var text = session.getTextRange(ts.firstNonLinked); + for (var i = ts.length; i--;) { + var range = ts[i]; + if (!range.linked) + continue; + var fmt = exports.snippetManager.tmStrFormat(text, range.original); + session.replace(range, fmt); + } + this.$inChange = false; + }; + this.onAfterExec = function(e) { + if (e.command && !e.command.readOnly) + this.updateLinkedFields(); + }; + this.onChangeSelection = function() { + if (!this.editor) + return; + var lead = this.editor.selection.lead; + var anchor = this.editor.selection.anchor; + var isEmpty = this.editor.selection.isEmpty(); + for (var i = this.ranges.length; i--;) { + if (this.ranges[i].linked) + continue; + var containsLead = this.ranges[i].contains(lead.row, lead.column); + var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); + if (containsLead && containsAnchor) + return; + } + this.detach(); + }; + this.onChangeSession = function() { + this.detach(); + }; + this.tabNext = function(dir) { + var max = this.tabstops.length; + var index = this.index + (dir || 1); + index = Math.min(Math.max(index, 1), max); + if (index == max) + index = 0; + this.selectTabstop(index); + if (index === 0) + this.detach(); + }; + this.selectTabstop = function(index) { + this.$openTabstops = null; + var ts = this.tabstops[this.index]; + if (ts) + this.addTabstopMarkers(ts); + this.index = index; + ts = this.tabstops[this.index]; + if (!ts || !ts.length) + return; + + this.selectedTabstop = ts; + if (!this.editor.inVirtualSelectionMode) { + var sel = this.editor.multiSelect; + sel.toSingleRange(ts.firstNonLinked.clone()); + for (var i = ts.length; i--;) { + if (ts.hasLinkedRanges && ts[i].linked) + continue; + sel.addRange(ts[i].clone(), true); + } + if (sel.ranges[0]) + sel.addRange(sel.ranges[0].clone()); + } else { + this.editor.selection.setRange(ts.firstNonLinked); + } + + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + }; + this.addTabstops = function(tabstops, start, end) { + if (!this.$openTabstops) + this.$openTabstops = []; + if (!tabstops[0]) { + var p = Range.fromPoints(end, end); + moveRelative(p.start, start); + moveRelative(p.end, start); + tabstops[0] = [p]; + tabstops[0].index = 0; + } + + var i = this.index; + var arg = [i + 1, 0]; + var ranges = this.ranges; + tabstops.forEach(function(ts, index) { + var dest = this.$openTabstops[index] || ts; + + for (var i = ts.length; i--;) { + var p = ts[i]; + var range = Range.fromPoints(p.start, p.end || p.start); + movePoint(range.start, start); + movePoint(range.end, start); + range.original = p; + range.tabstop = dest; + ranges.push(range); + if (dest != ts) + dest.unshift(range); + else + dest[i] = range; + if (p.fmtString) { + range.linked = true; + dest.hasLinkedRanges = true; + } else if (!dest.firstNonLinked) + dest.firstNonLinked = range; + } + if (!dest.firstNonLinked) + dest.hasLinkedRanges = false; + if (dest === ts) { + arg.push(dest); + this.$openTabstops[index] = dest; + } + this.addTabstopMarkers(dest); + }, this); + + if (arg.length > 2) { + if (this.tabstops.length) + arg.push(arg.splice(2, 1)[0]); + this.tabstops.splice.apply(this.tabstops, arg); + } + }; + + this.addTabstopMarkers = function(ts) { + var session = this.editor.session; + ts.forEach(function(range) { + if (!range.markerId) + range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); + }); + }; + this.removeTabstopMarkers = function(ts) { + var session = this.editor.session; + ts.forEach(function(range) { + session.removeMarker(range.markerId); + range.markerId = null; + }); + }; + this.removeRange = function(range) { + var i = range.tabstop.indexOf(range); + range.tabstop.splice(i, 1); + i = this.ranges.indexOf(range); + this.ranges.splice(i, 1); + this.editor.session.removeMarker(range.markerId); + if (!range.tabstop.length) { + i = this.tabstops.indexOf(range.tabstop); + if (i != -1) + this.tabstops.splice(i, 1); + if (!this.tabstops.length) + this.detach(); + } + }; + + this.keyboardHandler = new HashHandler(); + this.keyboardHandler.bindKeys({ + "Tab": function(ed) { + if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) { + return; + } + + ed.tabstopManager.tabNext(1); + }, + "Shift-Tab": function(ed) { + ed.tabstopManager.tabNext(-1); + }, + "Esc": function(ed) { + ed.tabstopManager.detach(); + }, + "Return": function(ed) { + return false; + } + }); +}).call(TabstopManager.prototype); + + + +var changeTracker = {}; +changeTracker.onChange = Anchor.prototype.onChange; +changeTracker.setPosition = function(row, column) { + this.pos.row = row; + this.pos.column = column; +}; +changeTracker.update = function(pos, delta, $insertRight) { + this.$insertRight = $insertRight; + this.pos = pos; + this.onChange(delta); +}; + +var movePoint = function(point, diff) { + if (point.row == 0) + point.column += diff.column; + point.row += diff.row; +}; + +var moveRelative = function(point, start) { + if (point.row == start.row) + point.column -= start.column; + point.row -= start.row; +}; + + +acequire("./lib/dom").importCssString("\ +.ace_snippet-marker {\ + -moz-box-sizing: border-box;\ + box-sizing: border-box;\ + background: rgba(194, 193, 208, 0.09);\ + border: 1px dotted rgba(211, 208, 235, 0.62);\ + position: absolute;\ +}"); + +exports.snippetManager = new SnippetManager(); + + +var Editor = acequire("./editor").Editor; +(function() { + this.insertSnippet = function(content, options) { + return exports.snippetManager.insertSnippet(this, content, options); + }; + this.expandSnippet = function(options) { + return exports.snippetManager.expandWithTab(this, options); + }; +}).call(Editor.prototype); + +}); + +ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(acequire, exports, module) { +"use strict"; + +var Renderer = acequire("../virtual_renderer").VirtualRenderer; +var Editor = acequire("../editor").Editor; +var Range = acequire("../range").Range; +var event = acequire("../lib/event"); +var lang = acequire("../lib/lang"); +var dom = acequire("../lib/dom"); + +var $singleLineEditor = function(el) { + var renderer = new Renderer(el); + + renderer.$maxLines = 4; + + var editor = new Editor(renderer); + + editor.setHighlightActiveLine(false); + editor.setShowPrintMargin(false); + editor.renderer.setShowGutter(false); + editor.renderer.setHighlightGutterLine(false); + + editor.$mouseHandler.$focusWaitTimout = 0; + editor.$highlightTagPending = true; + + return editor; +}; + +var AcePopup = function(parentNode) { + var el = dom.createElement("div"); + var popup = new $singleLineEditor(el); + + if (parentNode) + parentNode.appendChild(el); + el.style.display = "none"; + popup.renderer.content.style.cursor = "default"; + popup.renderer.setStyle("ace_autocomplete"); + + popup.setOption("displayIndentGuides", false); + popup.setOption("dragDelay", 150); + + var noop = function(){}; + + popup.focus = noop; + popup.$isFocused = true; + + popup.renderer.$cursorLayer.restartTimer = noop; + popup.renderer.$cursorLayer.element.style.opacity = 0; + + popup.renderer.$maxLines = 8; + popup.renderer.$keepTextAreaAtCursor = false; + + popup.setHighlightActiveLine(false); + popup.session.highlight(""); + popup.session.$searchHighlight.clazz = "ace_highlight-marker"; + + popup.on("mousedown", function(e) { + var pos = e.getDocumentPosition(); + popup.selection.moveToPosition(pos); + selectionMarker.start.row = selectionMarker.end.row = pos.row; + e.stop(); + }); + + var lastMouseEvent; + var hoverMarker = new Range(-1,0,-1,Infinity); + var selectionMarker = new Range(-1,0,-1,Infinity); + selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine"); + popup.setSelectOnHover = function(val) { + if (!val) { + hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine"); + } else if (hoverMarker.id) { + popup.session.removeMarker(hoverMarker.id); + hoverMarker.id = null; + } + }; + popup.setSelectOnHover(false); + popup.on("mousemove", function(e) { + if (!lastMouseEvent) { + lastMouseEvent = e; + return; + } + if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) { + return; + } + lastMouseEvent = e; + lastMouseEvent.scrollTop = popup.renderer.scrollTop; + var row = lastMouseEvent.getDocumentPosition().row; + if (hoverMarker.start.row != row) { + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row); + } + }); + popup.renderer.on("beforeRender", function() { + if (lastMouseEvent && hoverMarker.start.row != -1) { + lastMouseEvent.$pos = null; + var row = lastMouseEvent.getDocumentPosition().row; + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row, true); + } + }); + popup.renderer.on("afterRender", function() { + var row = popup.getRow(); + var t = popup.renderer.$textLayer; + var selected = t.element.childNodes[row - t.config.firstRow]; + if (selected == t.selectedNode) + return; + if (t.selectedNode) + dom.removeCssClass(t.selectedNode, "ace_selected"); + t.selectedNode = selected; + if (selected) + dom.addCssClass(selected, "ace_selected"); + }); + var hideHoverMarker = function() { setHoverMarker(-1) }; + var setHoverMarker = function(row, suppressRedraw) { + if (row !== hoverMarker.start.row) { + hoverMarker.start.row = hoverMarker.end.row = row; + if (!suppressRedraw) + popup.session._emit("changeBackMarker"); + popup._emit("changeHoverMarker"); + } + }; + popup.getHoveredRow = function() { + return hoverMarker.start.row; + }; + + event.addListener(popup.container, "mouseout", hideHoverMarker); + popup.on("hide", hideHoverMarker); + popup.on("changeSelection", hideHoverMarker); + + popup.session.doc.getLength = function() { + return popup.data.length; + }; + popup.session.doc.getLine = function(i) { + var data = popup.data[i]; + if (typeof data == "string") + return data; + return (data && data.value) || ""; + }; + + var bgTokenizer = popup.session.bgTokenizer; + bgTokenizer.$tokenizeRow = function(row) { + var data = popup.data[row]; + var tokens = []; + if (!data) + return tokens; + if (typeof data == "string") + data = {value: data}; + if (!data.caption) + data.caption = data.value || data.name; + + var last = -1; + var flag, c; + for (var i = 0; i < data.caption.length; i++) { + c = data.caption[i]; + flag = data.matchMask & (1 << i) ? 1 : 0; + if (last !== flag) { + tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c}); + last = flag; + } else { + tokens[tokens.length - 1].value += c; + } + } + + if (data.meta) { + var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth; + var metaData = data.meta; + if (metaData.length + data.caption.length > maxW - 2) { + metaData = metaData.substr(0, maxW - data.caption.length - 3) + "\u2026" + } + tokens.push({type: "rightAlignedText", value: metaData}); + } + return tokens; + }; + bgTokenizer.$updateOnChange = noop; + bgTokenizer.start = noop; + + popup.session.$computeWidth = function() { + return this.screenWidth = 0; + }; + + popup.$blockScrolling = Infinity; + popup.isOpen = false; + popup.isTopdown = false; + + popup.data = []; + popup.setData = function(list) { + popup.setValue(lang.stringRepeat("\n", list.length), -1); + popup.data = list || []; + popup.setRow(0); + }; + popup.getData = function(row) { + return popup.data[row]; + }; + + popup.getRow = function() { + return selectionMarker.start.row; + }; + popup.setRow = function(line) { + line = Math.max(0, Math.min(this.data.length, line)); + if (selectionMarker.start.row != line) { + popup.selection.clearSelection(); + selectionMarker.start.row = selectionMarker.end.row = line || 0; + popup.session._emit("changeBackMarker"); + popup.moveCursorTo(line || 0, 0); + if (popup.isOpen) + popup._signal("select"); + } + }; + + popup.on("changeSelection", function() { + if (popup.isOpen) + popup.setRow(popup.selection.lead.row); + popup.renderer.scrollCursorIntoView(); + }); + + popup.hide = function() { + this.container.style.display = "none"; + this._signal("hide"); + popup.isOpen = false; + }; + popup.show = function(pos, lineHeight, topdownOnly) { + var el = this.container; + var screenHeight = window.innerHeight; + var screenWidth = window.innerWidth; + var renderer = this.renderer; + var maxH = renderer.$maxLines * lineHeight * 1.4; + var top = pos.top + this.$borderSize; + if (top + maxH > screenHeight - lineHeight && !topdownOnly) { + el.style.top = ""; + el.style.bottom = screenHeight - top + "px"; + popup.isTopdown = false; + } else { + top += lineHeight; + el.style.top = top + "px"; + el.style.bottom = ""; + popup.isTopdown = true; + } + + el.style.display = ""; + this.renderer.$textLayer.checkForSizeChanges(); + + var left = pos.left; + if (left + el.offsetWidth > screenWidth) + left = screenWidth - el.offsetWidth; + + el.style.left = left + "px"; + + this._signal("show"); + lastMouseEvent = null; + popup.isOpen = true; + }; + + popup.getTextLeftOffset = function() { + return this.$borderSize + this.renderer.$padding + this.$imageSize; + }; + + popup.$imageSize = 0; + popup.$borderSize = 1; + + return popup; +}; + +dom.importCssString("\ +.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ + background-color: #CAD6FA;\ + z-index: 1;\ +}\ +.ace_editor.ace_autocomplete .ace_line-hover {\ + border: 1px solid #abbffe;\ + margin-top: -1px;\ + background: rgba(233,233,253,0.4);\ +}\ +.ace_editor.ace_autocomplete .ace_line-hover {\ + position: absolute;\ + z-index: 2;\ +}\ +.ace_editor.ace_autocomplete .ace_scroller {\ + background: none;\ + border: none;\ + box-shadow: none;\ +}\ +.ace_rightAlignedText {\ + color: gray;\ + display: inline-block;\ + position: absolute;\ + right: 4px;\ + text-align: right;\ + z-index: -1;\ +}\ +.ace_editor.ace_autocomplete .ace_completion-highlight{\ + color: #000;\ + text-shadow: 0 0 0.01em;\ +}\ +.ace_editor.ace_autocomplete {\ + width: 280px;\ + z-index: 200000;\ + background: #fbfbfb;\ + color: #444;\ + border: 1px lightgray solid;\ + position: fixed;\ + box-shadow: 2px 3px 5px rgba(0,0,0,.2);\ + line-height: 1.4;\ +}"); + +exports.AcePopup = AcePopup; + +}); + +ace.define("ace/autocomplete/util",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + +exports.parForEach = function(array, fn, callback) { + var completed = 0; + var arLength = array.length; + if (arLength === 0) + callback(); + for (var i = 0; i < arLength; i++) { + fn(array[i], function(result, err) { + completed++; + if (completed === arLength) + callback(result, err); + }); + } +}; + +var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/; + +exports.retrievePrecedingIdentifier = function(text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos-1; i >= 0; i--) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf.reverse().join(""); +}; + +exports.retrieveFollowingIdentifier = function(text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos; i < text.length; i++) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf; +}; + +exports.getCompletionPrefix = function (editor) { + var pos = editor.getCursorPosition(); + var line = editor.session.getLine(pos.row); + var prefix; + editor.completers.forEach(function(completer) { + if (completer.identifierRegexps) { + completer.identifierRegexps.forEach(function(identifierRegex) { + if (!prefix && identifierRegex) + prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + }.bind(this)); + } + }.bind(this)); + return prefix || this.retrievePrecedingIdentifier(line, pos.column); +}; + +}); + +ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"], function(acequire, exports, module) { +"use strict"; + +var HashHandler = acequire("./keyboard/hash_handler").HashHandler; +var AcePopup = acequire("./autocomplete/popup").AcePopup; +var util = acequire("./autocomplete/util"); +var event = acequire("./lib/event"); +var lang = acequire("./lib/lang"); +var dom = acequire("./lib/dom"); +var snippetManager = acequire("./snippets").snippetManager; + +var Autocomplete = function() { + this.autoInsert = false; + this.autoSelect = true; + this.exactMatch = false; + this.gatherCompletionsId = 0; + this.keyboardHandler = new HashHandler(); + this.keyboardHandler.bindKeys(this.commands); + + this.blurListener = this.blurListener.bind(this); + this.changeListener = this.changeListener.bind(this); + this.mousedownListener = this.mousedownListener.bind(this); + this.mousewheelListener = this.mousewheelListener.bind(this); + + this.changeTimer = lang.delayedCall(function() { + this.updateCompletions(true); + }.bind(this)); + + this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); +}; + +(function() { + + this.$init = function() { + this.popup = new AcePopup(document.body || document.documentElement); + this.popup.on("click", function(e) { + this.insertMatch(); + e.stop(); + }.bind(this)); + this.popup.focus = this.editor.focus.bind(this.editor); + this.popup.on("show", this.tooltipTimer.bind(null, null)); + this.popup.on("select", this.tooltipTimer.bind(null, null)); + this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)); + return this.popup; + }; + + this.getPopup = function() { + return this.popup || this.$init(); + }; + + this.openPopup = function(editor, prefix, keepPopupPosition) { + if (!this.popup) + this.$init(); + + this.popup.setData(this.completions.filtered); + + editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + + var renderer = editor.renderer; + this.popup.setRow(this.autoSelect ? 0 : -1); + if (!keepPopupPosition) { + this.popup.setTheme(editor.getTheme()); + this.popup.setFontSize(editor.getFontSize()); + + var lineHeight = renderer.layerConfig.lineHeight; + + var pos = renderer.$cursorLayer.getPixelPosition(this.base, true); + pos.left -= this.popup.getTextLeftOffset(); + + var rect = editor.container.getBoundingClientRect(); + pos.top += rect.top - renderer.layerConfig.offset; + pos.left += rect.left - editor.renderer.scrollLeft; + pos.left += renderer.gutterWidth; + + this.popup.show(pos, lineHeight); + } else if (keepPopupPosition && !prefix) { + this.detach(); + } + }; + + this.detach = function() { + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.off("changeSelection", this.changeListener); + this.editor.off("blur", this.blurListener); + this.editor.off("mousedown", this.mousedownListener); + this.editor.off("mousewheel", this.mousewheelListener); + this.changeTimer.cancel(); + this.hideDocTooltip(); + + this.gatherCompletionsId += 1; + if (this.popup && this.popup.isOpen) + this.popup.hide(); + + if (this.base) + this.base.detach(); + this.activated = false; + this.completions = this.base = null; + }; + + this.changeListener = function(e) { + var cursor = this.editor.selection.lead; + if (cursor.row != this.base.row || cursor.column < this.base.column) { + this.detach(); + } + if (this.activated) + this.changeTimer.schedule(); + else + this.detach(); + }; + + this.blurListener = function(e) { + var el = document.activeElement; + var text = this.editor.textInput.getElement(); + var fromTooltip = e.relatedTarget && e.relatedTarget == this.tooltipNode; + var container = this.popup && this.popup.container; + if (el != text && el.parentNode != container && !fromTooltip + && el != this.tooltipNode && e.relatedTarget != text + ) { + this.detach(); + } + }; + + this.mousedownListener = function(e) { + this.detach(); + }; + + this.mousewheelListener = function(e) { + this.detach(); + }; + + this.goTo = function(where) { + var row = this.popup.getRow(); + var max = this.popup.session.getLength() - 1; + + switch(where) { + case "up": row = row <= 0 ? max : row - 1; break; + case "down": row = row >= max ? -1 : row + 1; break; + case "start": row = 0; break; + case "end": row = max; break; + } + + this.popup.setRow(row); + }; + + this.insertMatch = function(data, options) { + if (!data) + data = this.popup.getData(this.popup.getRow()); + if (!data) + return false; + + if (data.completer && data.completer.insertMatch) { + data.completer.insertMatch(this.editor, data); + } else { + if (this.completions.filterText) { + var ranges = this.editor.selection.getAllRanges(); + for (var i = 0, range; range = ranges[i]; i++) { + range.start.column -= this.completions.filterText.length; + this.editor.session.remove(range); + } + } + if (data.snippet) + snippetManager.insertSnippet(this.editor, data.snippet); + else + this.editor.execCommand("insertstring", data.value || data); + } + this.detach(); + }; + + + this.commands = { + "Up": function(editor) { editor.completer.goTo("up"); }, + "Down": function(editor) { editor.completer.goTo("down"); }, + "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); }, + "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); }, + + "Esc": function(editor) { editor.completer.detach(); }, + "Return": function(editor) { return editor.completer.insertMatch(); }, + "Shift-Return": function(editor) { editor.completer.insertMatch(null, {deleteSuffix: true}); }, + "Tab": function(editor) { + var result = editor.completer.insertMatch(); + if (!result && !editor.tabstopManager) + editor.completer.goTo("down"); + else + return result; + }, + + "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); }, + "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); } + }; + + this.gatherCompletions = function(editor, callback) { + var session = editor.getSession(); + var pos = editor.getCursorPosition(); + + var line = session.getLine(pos.row); + var prefix = util.getCompletionPrefix(editor); + + this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); + this.base.$insertRight = true; + + var matches = []; + var total = editor.completers.length; + editor.completers.forEach(function(completer, i) { + completer.getCompletions(editor, session, pos, prefix, function(err, results) { + if (!err && results) + matches = matches.concat(results); + var pos = editor.getCursorPosition(); + var line = session.getLine(pos.row); + callback(null, { + prefix: prefix, + matches: matches, + finished: (--total === 0) + }); + }); + }); + return true; + }; + + this.showPopup = function(editor) { + if (this.editor) + this.detach(); + + this.activated = true; + + this.editor = editor; + if (editor.completer != this) { + if (editor.completer) + editor.completer.detach(); + editor.completer = this; + } + + editor.on("changeSelection", this.changeListener); + editor.on("blur", this.blurListener); + editor.on("mousedown", this.mousedownListener); + editor.on("mousewheel", this.mousewheelListener); + + this.updateCompletions(); + }; + + this.updateCompletions = function(keepPopupPosition) { + if (keepPopupPosition && this.base && this.completions) { + var pos = this.editor.getCursorPosition(); + var prefix = this.editor.session.getTextRange({start: this.base, end: pos}); + if (prefix == this.completions.filterText) + return; + this.completions.setFilter(prefix); + if (!this.completions.filtered.length) + return this.detach(); + if (this.completions.filtered.length == 1 + && this.completions.filtered[0].value == prefix + && !this.completions.filtered[0].snippet) + return this.detach(); + this.openPopup(this.editor, prefix, keepPopupPosition); + return; + } + var _id = this.gatherCompletionsId; + this.gatherCompletions(this.editor, function(err, results) { + var detachIfFinished = function() { + if (!results.finished) return; + return this.detach(); + }.bind(this); + + var prefix = results.prefix; + var matches = results && results.matches; + + if (!matches || !matches.length) + return detachIfFinished(); + if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId) + return; + + this.completions = new FilteredList(matches); + + if (this.exactMatch) + this.completions.exactMatch = true; + + this.completions.setFilter(prefix); + var filtered = this.completions.filtered; + if (!filtered.length) + return detachIfFinished(); + if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet) + return detachIfFinished(); + if (this.autoInsert && filtered.length == 1 && results.finished) + return this.insertMatch(filtered[0]); + + this.openPopup(this.editor, prefix, keepPopupPosition); + }.bind(this)); + }; + + this.cancelContextMenu = function() { + this.editor.$mouseHandler.cancelContextMenu(); + }; + + this.updateDocTooltip = function() { + var popup = this.popup; + var all = popup.data; + var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); + var doc = null; + if (!selected || !this.editor || !this.popup.isOpen) + return this.hideDocTooltip(); + this.editor.completers.some(function(completer) { + if (completer.getDocTooltip) + doc = completer.getDocTooltip(selected); + return doc; + }); + if (!doc) + doc = selected; + + if (typeof doc == "string") + doc = {docText: doc}; + if (!doc || !(doc.docHTML || doc.docText)) + return this.hideDocTooltip(); + this.showDocTooltip(doc); + }; + + this.showDocTooltip = function(item) { + if (!this.tooltipNode) { + this.tooltipNode = dom.createElement("div"); + this.tooltipNode.className = "ace_tooltip ace_doc-tooltip"; + this.tooltipNode.style.margin = 0; + this.tooltipNode.style.pointerEvents = "auto"; + this.tooltipNode.tabIndex = -1; + this.tooltipNode.onblur = this.blurListener.bind(this); + } + + var tooltipNode = this.tooltipNode; + if (item.docHTML) { + tooltipNode.innerHTML = item.docHTML; + } else if (item.docText) { + tooltipNode.textContent = item.docText; + } + + if (!tooltipNode.parentNode) + document.body.appendChild(tooltipNode); + var popup = this.popup; + var rect = popup.container.getBoundingClientRect(); + tooltipNode.style.top = popup.container.style.top; + tooltipNode.style.bottom = popup.container.style.bottom; + + if (window.innerWidth - rect.right < 320) { + tooltipNode.style.right = window.innerWidth - rect.left + "px"; + tooltipNode.style.left = ""; + } else { + tooltipNode.style.left = (rect.right + 1) + "px"; + tooltipNode.style.right = ""; + } + tooltipNode.style.display = "block"; + }; + + this.hideDocTooltip = function() { + this.tooltipTimer.cancel(); + if (!this.tooltipNode) return; + var el = this.tooltipNode; + if (!this.editor.isFocused() && document.activeElement == el) + this.editor.focus(); + this.tooltipNode = null; + if (el.parentNode) + el.parentNode.removeChild(el); + }; + +}).call(Autocomplete.prototype); + +Autocomplete.startCommand = { + name: "startAutocomplete", + exec: function(editor) { + if (!editor.completer) + editor.completer = new Autocomplete(); + editor.completer.autoInsert = false; + editor.completer.autoSelect = true; + editor.completer.showPopup(editor); + editor.completer.cancelContextMenu(); + }, + bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" +}; + +var FilteredList = function(array, filterText) { + this.all = array; + this.filtered = array; + this.filterText = filterText || ""; + this.exactMatch = false; +}; +(function(){ + this.setFilter = function(str) { + if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0) + var matches = this.filtered; + else + var matches = this.all; + + this.filterText = str; + matches = this.filterCompletions(matches, this.filterText); + matches = matches.sort(function(a, b) { + return b.exactMatch - a.exactMatch || b.score - a.score; + }); + var prev = null; + matches = matches.filter(function(item){ + var caption = item.snippet || item.caption || item.value; + if (caption === prev) return false; + prev = caption; + return true; + }); + + this.filtered = matches; + }; + this.filterCompletions = function(items, needle) { + var results = []; + var upper = needle.toUpperCase(); + var lower = needle.toLowerCase(); + loop: for (var i = 0, item; item = items[i]; i++) { + var caption = item.value || item.caption || item.snippet; + if (!caption) continue; + var lastIndex = -1; + var matchMask = 0; + var penalty = 0; + var index, distance; + + if (this.exactMatch) { + if (needle !== caption.substr(0, needle.length)) + continue loop; + }else{ + for (var j = 0; j < needle.length; j++) { + var i1 = caption.indexOf(lower[j], lastIndex + 1); + var i2 = caption.indexOf(upper[j], lastIndex + 1); + index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; + if (index < 0) + continue loop; + distance = index - lastIndex - 1; + if (distance > 0) { + if (lastIndex === -1) + penalty += 10; + penalty += distance; + } + matchMask = matchMask | (1 << index); + lastIndex = index; + } + } + item.matchMask = matchMask; + item.exactMatch = penalty ? 0 : 1; + item.score = (item.score || 0) - penalty; + results.push(item); + } + return results; + }; +}).call(FilteredList.prototype); + +exports.Autocomplete = Autocomplete; +exports.FilteredList = FilteredList; + +}); + +ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(acequire, exports, module) { + var Range = acequire("../range").Range; + + var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/; + + function getWordIndex(doc, pos) { + var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos)); + return textBefore.split(splitRegex).length - 1; + } + function wordDistance(doc, pos) { + var prefixPos = getWordIndex(doc, pos); + var words = doc.getValue().split(splitRegex); + var wordScores = Object.create(null); + + var currentWord = words[prefixPos]; + + words.forEach(function(word, idx) { + if (!word || word === currentWord) return; + + var distance = Math.abs(prefixPos - idx); + var score = words.length - distance; + if (wordScores[word]) { + wordScores[word] = Math.max(score, wordScores[word]); + } else { + wordScores[word] = score; + } + }); + return wordScores; + } + + exports.getCompletions = function(editor, session, pos, prefix, callback) { + var wordScore = wordDistance(session, pos, prefix); + var wordList = Object.keys(wordScore); + callback(null, wordList.map(function(word) { + return { + caption: word, + value: word, + score: wordScore[word], + meta: "local" + }; + })); + }; +}); + +ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(acequire, exports, module) { +"use strict"; + +var snippetManager = acequire("../snippets").snippetManager; +var Autocomplete = acequire("../autocomplete").Autocomplete; +var config = acequire("../config"); +var lang = acequire("../lib/lang"); +var util = acequire("../autocomplete/util"); + +var textCompleter = acequire("../autocomplete/text_completer"); +var keyWordCompleter = { + getCompletions: function(editor, session, pos, prefix, callback) { + if (session.$mode.completer) { + return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback); + } + var state = editor.session.getState(pos.row); + var completions = session.$mode.getCompletions(state, session, pos, prefix); + callback(null, completions); + } +}; + +var snippetCompleter = { + getCompletions: function(editor, session, pos, prefix, callback) { + var snippetMap = snippetManager.snippetMap; + var completions = []; + snippetManager.getActiveScopes(editor).forEach(function(scope) { + var snippets = snippetMap[scope] || []; + for (var i = snippets.length; i--;) { + var s = snippets[i]; + var caption = s.name || s.tabTrigger; + if (!caption) + continue; + completions.push({ + caption: caption, + snippet: s.content, + meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet", + type: "snippet" + }); + } + }, this); + callback(null, completions); + }, + getDocTooltip: function(item) { + if (item.type == "snippet" && !item.docHTML) { + item.docHTML = [ + "", lang.escapeHTML(item.caption), "", "
", + lang.escapeHTML(item.snippet) + ].join(""); + } + } +}; + +var completers = [snippetCompleter, textCompleter, keyWordCompleter]; +exports.setCompleters = function(val) { + completers.length = 0; + if (val) completers.push.apply(completers, val); +}; +exports.addCompleter = function(completer) { + completers.push(completer); +}; +exports.textCompleter = textCompleter; +exports.keyWordCompleter = keyWordCompleter; +exports.snippetCompleter = snippetCompleter; + +var expandSnippet = { + name: "expandSnippet", + exec: function(editor) { + return snippetManager.expandWithTab(editor); + }, + bindKey: "Tab" +}; + +var onChangeMode = function(e, editor) { + loadSnippetsForMode(editor.session.$mode); +}; + +var loadSnippetsForMode = function(mode) { + var id = mode.$id; + if (!snippetManager.files) + snippetManager.files = {}; + loadSnippetFile(id); + if (mode.modes) + mode.modes.forEach(loadSnippetsForMode); +}; + +var loadSnippetFile = function(id) { + if (!id || snippetManager.files[id]) + return; + var snippetFilePath = id.replace("mode", "snippets"); + snippetManager.files[id] = {}; + config.loadModule(snippetFilePath, function(m) { + if (m) { + snippetManager.files[id] = m; + if (!m.snippets && m.snippetText) + m.snippets = snippetManager.parseSnippetFile(m.snippetText); + snippetManager.register(m.snippets || [], m.scope); + if (m.includeScopes) { + snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes; + m.includeScopes.forEach(function(x) { + loadSnippetFile("ace/mode/" + x); + }); + } + } + }); +}; + +var doLiveAutocomplete = function(e) { + var editor = e.editor; + var hasCompleter = editor.completer && editor.completer.activated; + if (e.command.name === "backspace") { + if (hasCompleter && !util.getCompletionPrefix(editor)) + editor.completer.detach(); + } + else if (e.command.name === "insertstring") { + var prefix = util.getCompletionPrefix(editor); + if (prefix && !hasCompleter) { + if (!editor.completer) { + editor.completer = new Autocomplete(); + } + editor.completer.autoInsert = false; + editor.completer.showPopup(editor); + } + } +}; + +var Editor = acequire("../editor").Editor; +acequire("../config").defineOptions(Editor.prototype, "editor", { + enableBasicAutocompletion: { + set: function(val) { + if (val) { + if (!this.completers) + this.completers = Array.isArray(val)? val: completers; + this.commands.addCommand(Autocomplete.startCommand); + } else { + this.commands.removeCommand(Autocomplete.startCommand); + } + }, + value: false + }, + enableLiveAutocompletion: { + set: function(val) { + if (val) { + if (!this.completers) + this.completers = Array.isArray(val)? val: completers; + this.commands.on('afterExec', doLiveAutocomplete); + } else { + this.commands.removeListener('afterExec', doLiveAutocomplete); + } + }, + value: false + }, + enableSnippets: { + set: function(val) { + if (val) { + this.commands.addCommand(expandSnippet); + this.on("changeMode", onChangeMode); + onChangeMode(null, this); + } else { + this.commands.removeCommand(expandSnippet); + this.off("changeMode", onChangeMode); + } + }, + value: false + } +}); +}); + (function() { + ace.acequire(["ace/ext/language_tools"], function() {}); + })(); + +},{}],68:[function(require,module,exports){ +ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(acequire, exports, module) { +"use strict"; + +var dom = acequire("../lib/dom"); +var lang = acequire("../lib/lang"); +var event = acequire("../lib/event"); +var searchboxCss = "\ +.ace_search {\ +background-color: #ddd;\ +border: 1px solid #cbcbcb;\ +border-top: 0 none;\ +max-width: 325px;\ +overflow: hidden;\ +margin: 0;\ +padding: 4px;\ +padding-right: 6px;\ +padding-bottom: 0;\ +position: absolute;\ +top: 0px;\ +z-index: 99;\ +white-space: normal;\ +}\ +.ace_search.left {\ +border-left: 0 none;\ +border-radius: 0px 0px 5px 0px;\ +left: 0;\ +}\ +.ace_search.right {\ +border-radius: 0px 0px 0px 5px;\ +border-right: 0 none;\ +right: 0;\ +}\ +.ace_search_form, .ace_replace_form {\ +border-radius: 3px;\ +border: 1px solid #cbcbcb;\ +float: left;\ +margin-bottom: 4px;\ +overflow: hidden;\ +}\ +.ace_search_form.ace_nomatch {\ +outline: 1px solid red;\ +}\ +.ace_search_field {\ +background-color: white;\ +border-right: 1px solid #cbcbcb;\ +border: 0 none;\ +-webkit-box-sizing: border-box;\ +-moz-box-sizing: border-box;\ +box-sizing: border-box;\ +float: left;\ +height: 22px;\ +outline: 0;\ +padding: 0 7px;\ +width: 214px;\ +margin: 0;\ +}\ +.ace_searchbtn,\ +.ace_replacebtn {\ +background: #fff;\ +border: 0 none;\ +border-left: 1px solid #dcdcdc;\ +cursor: pointer;\ +float: left;\ +height: 22px;\ +margin: 0;\ +position: relative;\ +}\ +.ace_searchbtn:last-child,\ +.ace_replacebtn:last-child {\ +border-top-right-radius: 3px;\ +border-bottom-right-radius: 3px;\ +}\ +.ace_searchbtn:disabled {\ +background: none;\ +cursor: default;\ +}\ +.ace_searchbtn {\ +background-position: 50% 50%;\ +background-repeat: no-repeat;\ +width: 27px;\ +}\ +.ace_searchbtn.prev {\ +background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \ +}\ +.ace_searchbtn.next {\ +background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \ +}\ +.ace_searchbtn_close {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\ +border-radius: 50%;\ +border: 0 none;\ +color: #656565;\ +cursor: pointer;\ +float: right;\ +font: 16px/16px Arial;\ +height: 14px;\ +margin: 5px 1px 9px 5px;\ +padding: 0;\ +text-align: center;\ +width: 14px;\ +}\ +.ace_searchbtn_close:hover {\ +background-color: #656565;\ +background-position: 50% 100%;\ +color: white;\ +}\ +.ace_replacebtn.prev {\ +width: 54px\ +}\ +.ace_replacebtn.next {\ +width: 27px\ +}\ +.ace_button {\ +margin-left: 2px;\ +cursor: pointer;\ +-webkit-user-select: none;\ +-moz-user-select: none;\ +-o-user-select: none;\ +-ms-user-select: none;\ +user-select: none;\ +overflow: hidden;\ +opacity: 0.7;\ +border: 1px solid rgba(100,100,100,0.23);\ +padding: 1px;\ +-moz-box-sizing: border-box;\ +box-sizing: border-box;\ +color: black;\ +}\ +.ace_button:hover {\ +background-color: #eee;\ +opacity:1;\ +}\ +.ace_button:active {\ +background-color: #ddd;\ +}\ +.ace_button.checked {\ +border-color: #3399ff;\ +opacity:1;\ +}\ +.ace_search_options{\ +margin-bottom: 3px;\ +text-align: right;\ +-webkit-user-select: none;\ +-moz-user-select: none;\ +-o-user-select: none;\ +-ms-user-select: none;\ +user-select: none;\ +}"; +var HashHandler = acequire("../keyboard/hash_handler").HashHandler; +var keyUtil = acequire("../lib/keys"); + +dom.importCssString(searchboxCss, "ace_searchbox"); + +var html = ''.replace(/>\s+/g, ">"); + +var SearchBox = function(editor, range, showReplaceForm) { + var div = dom.createElement("div"); + div.innerHTML = html; + this.element = div.firstChild; + + this.$init(); + this.setEditor(editor); +}; + +(function() { + this.setEditor = function(editor) { + editor.searchBox = this; + editor.container.appendChild(this.element); + this.editor = editor; + }; + + this.$initElements = function(sb) { + this.searchBox = sb.querySelector(".ace_search_form"); + this.replaceBox = sb.querySelector(".ace_replace_form"); + this.searchOptions = sb.querySelector(".ace_search_options"); + this.regExpOption = sb.querySelector("[action=toggleRegexpMode]"); + this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]"); + this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]"); + this.searchInput = this.searchBox.querySelector(".ace_search_field"); + this.replaceInput = this.replaceBox.querySelector(".ace_search_field"); + }; + + this.$init = function() { + var sb = this.element; + + this.$initElements(sb); + + var _this = this; + event.addListener(sb, "mousedown", function(e) { + setTimeout(function(){ + _this.activeInput.focus(); + }, 0); + event.stopPropagation(e); + }); + event.addListener(sb, "click", function(e) { + var t = e.target || e.srcElement; + var action = t.getAttribute("action"); + if (action && _this[action]) + _this[action](); + else if (_this.$searchBarKb.commands[action]) + _this.$searchBarKb.commands[action].exec(_this); + event.stopPropagation(e); + }); + + event.addCommandKeyListener(sb, function(e, hashId, keyCode) { + var keyString = keyUtil.keyCodeToString(keyCode); + var command = _this.$searchBarKb.findKeyCommand(hashId, keyString); + if (command && command.exec) { + command.exec(_this); + event.stopEvent(e); + } + }); + + this.$onChange = lang.delayedCall(function() { + _this.find(false, false); + }); + + event.addListener(this.searchInput, "input", function() { + _this.$onChange.schedule(20); + }); + event.addListener(this.searchInput, "focus", function() { + _this.activeInput = _this.searchInput; + _this.searchInput.value && _this.highlight(); + }); + event.addListener(this.replaceInput, "focus", function() { + _this.activeInput = _this.replaceInput; + _this.searchInput.value && _this.highlight(); + }); + }; + this.$closeSearchBarKb = new HashHandler([{ + bindKey: "Esc", + name: "closeSearchBar", + exec: function(editor) { + editor.searchBox.hide(); + } + }]); + this.$searchBarKb = new HashHandler(); + this.$searchBarKb.bindKeys({ + "Ctrl-f|Command-f": function(sb) { + var isReplace = sb.isReplace = !sb.isReplace; + sb.replaceBox.style.display = isReplace ? "" : "none"; + sb.searchInput.focus(); + }, + "Ctrl-H|Command-Option-F": function(sb) { + sb.replaceBox.style.display = ""; + sb.replaceInput.focus(); + }, + "Ctrl-G|Command-G": function(sb) { + sb.findNext(); + }, + "Ctrl-Shift-G|Command-Shift-G": function(sb) { + sb.findPrev(); + }, + "esc": function(sb) { + setTimeout(function() { sb.hide();}); + }, + "Return": function(sb) { + if (sb.activeInput == sb.replaceInput) + sb.replace(); + sb.findNext(); + }, + "Shift-Return": function(sb) { + if (sb.activeInput == sb.replaceInput) + sb.replace(); + sb.findPrev(); + }, + "Alt-Return": function(sb) { + if (sb.activeInput == sb.replaceInput) + sb.replaceAll(); + sb.findAll(); + }, + "Tab": function(sb) { + (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus(); + } + }); + + this.$searchBarKb.addCommands([{ + name: "toggleRegexpMode", + bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"}, + exec: function(sb) { + sb.regExpOption.checked = !sb.regExpOption.checked; + sb.$syncOptions(); + } + }, { + name: "toggleCaseSensitive", + bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"}, + exec: function(sb) { + sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked; + sb.$syncOptions(); + } + }, { + name: "toggleWholeWords", + bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"}, + exec: function(sb) { + sb.wholeWordOption.checked = !sb.wholeWordOption.checked; + sb.$syncOptions(); + } + }]); + + this.$syncOptions = function() { + dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked); + dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked); + dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked); + this.find(false, false); + }; + + this.highlight = function(re) { + this.editor.session.highlight(re || this.editor.$search.$options.re); + this.editor.renderer.updateBackMarkers() + }; + this.find = function(skipCurrent, backwards, preventScroll) { + var range = this.editor.find(this.searchInput.value, { + skipCurrent: skipCurrent, + backwards: backwards, + wrap: true, + regExp: this.regExpOption.checked, + caseSensitive: this.caseSensitiveOption.checked, + wholeWord: this.wholeWordOption.checked, + preventScroll: preventScroll + }); + var noMatch = !range && this.searchInput.value; + dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); + this.editor._emit("findSearchBox", { match: !noMatch }); + this.highlight(); + }; + this.findNext = function() { + this.find(true, false); + }; + this.findPrev = function() { + this.find(true, true); + }; + this.findAll = function(){ + var range = this.editor.findAll(this.searchInput.value, { + regExp: this.regExpOption.checked, + caseSensitive: this.caseSensitiveOption.checked, + wholeWord: this.wholeWordOption.checked + }); + var noMatch = !range && this.searchInput.value; + dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); + this.editor._emit("findSearchBox", { match: !noMatch }); + this.highlight(); + this.hide(); + }; + this.replace = function() { + if (!this.editor.getReadOnly()) + this.editor.replace(this.replaceInput.value); + }; + this.replaceAndFindNext = function() { + if (!this.editor.getReadOnly()) { + this.editor.replace(this.replaceInput.value); + this.findNext() + } + }; + this.replaceAll = function() { + if (!this.editor.getReadOnly()) + this.editor.replaceAll(this.replaceInput.value); + }; + + this.hide = function() { + this.element.style.display = "none"; + this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb); + this.editor.focus(); + }; + this.show = function(value, isReplace) { + this.element.style.display = ""; + this.replaceBox.style.display = isReplace ? "" : "none"; + + this.isReplace = isReplace; + + if (value) + this.searchInput.value = value; + + this.find(false, false, true); + + this.searchInput.focus(); + this.searchInput.select(); + + this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb); + }; + + this.isFocused = function() { + var el = document.activeElement; + return el == this.searchInput || el == this.replaceInput; + } +}).call(SearchBox.prototype); + +exports.SearchBox = SearchBox; + +exports.Search = function(editor, isReplace) { + var sb = editor.searchBox || new SearchBox(editor); + sb.show(editor.session.getTextRange(), isReplace); +}; + +}); + (function() { + ace.acequire(["ace/ext/searchbox"], function() {}); + })(); + +},{}],69:[function(require,module,exports){ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +/** + * Define a module along with a payload + * @param module a name for the payload + * @param payload a function to call with (acequire, exports, module) params + */ + +(function() { + +var ACE_NAMESPACE = "ace"; + +var global = (function() { return this; })(); +if (!global && typeof window != "undefined") global = window; // strict mode + + +if (!ACE_NAMESPACE && typeof acequirejs !== "undefined") + return; + + +var define = function(module, deps, payload) { + if (typeof module !== "string") { + if (define.original) + define.original.apply(this, arguments); + else { + console.error("dropping module because define wasn\'t a string."); + console.trace(); + } + return; + } + if (arguments.length == 2) + payload = deps; + if (!define.modules[module]) { + define.payloads[module] = payload; + define.modules[module] = null; + } +}; + +define.modules = {}; +define.payloads = {}; + +/** + * Get at functionality define()ed using the function above + */ +var _acequire = function(parentId, module, callback) { + if (typeof module === "string") { + var payload = lookup(parentId, module); + if (payload != undefined) { + callback && callback(); + return payload; + } + } else if (Object.prototype.toString.call(module) === "[object Array]") { + var params = []; + for (var i = 0, l = module.length; i < l; ++i) { + var dep = lookup(parentId, module[i]); + if (dep == undefined && acequire.original) + return; + params.push(dep); + } + return callback && callback.apply(null, params) || true; + } +}; + +var acequire = function(module, callback) { + var packagedModule = _acequire("", module, callback); + if (packagedModule == undefined && acequire.original) + return acequire.original.apply(this, arguments); + return packagedModule; +}; + +var normalizeModule = function(parentId, moduleName) { + // normalize plugin acequires + if (moduleName.indexOf("!") !== -1) { + var chunks = moduleName.split("!"); + return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]); + } + // normalize relative acequires + if (moduleName.charAt(0) == ".") { + var base = parentId.split("/").slice(0, -1).join("/"); + moduleName = base + "/" + moduleName; + + while(moduleName.indexOf(".") !== -1 && previous != moduleName) { + var previous = moduleName; + moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); + } + } + return moduleName; +}; + +/** + * Internal function to lookup moduleNames and resolve them by calling the + * definition function if needed. + */ +var lookup = function(parentId, moduleName) { + moduleName = normalizeModule(parentId, moduleName); + + var module = define.modules[moduleName]; + if (!module) { + module = define.payloads[moduleName]; + if (typeof module === 'function') { + var exports = {}; + var mod = { + id: moduleName, + uri: '', + exports: exports, + packaged: true + }; + + var req = function(module, callback) { + return _acequire(moduleName, module, callback); + }; + + var returnValue = module(req, exports, mod); + exports = returnValue || mod.exports; + define.modules[moduleName] = exports; + delete define.payloads[moduleName]; + } + module = define.modules[moduleName] = exports || module; + } + return module; +}; + +function exportAce(ns) { + var root = global; + if (ns) { + if (!global[ns]) + global[ns] = {}; + root = global[ns]; + } + + if (!root.define || !root.define.packaged) { + define.original = root.define; + root.define = define; + root.define.packaged = true; + } + + if (!root.acequire || !root.acequire.packaged) { + acequire.original = root.acequire; + root.acequire = acequire; + root.acequire.packaged = true; + } +} + +exportAce(ACE_NAMESPACE); + +})(); + +ace.define("ace/lib/regexp",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + + var real = { + exec: RegExp.prototype.exec, + test: RegExp.prototype.test, + match: String.prototype.match, + replace: String.prototype.replace, + split: String.prototype.split + }, + compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups + compliantLastIndexIncrement = function () { + var x = /^/g; + real.test.call(x, ""); + return !x.lastIndex; + }(); + + if (compliantLastIndexIncrement && compliantExecNpcg) + return; + RegExp.prototype.exec = function (str) { + var match = real.exec.apply(this, arguments), + name, r2; + if ( typeof(str) == 'string' && match) { + if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { + r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", "")); + real.replace.call(str.slice(match.index), r2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) + match[i] = undefined; + } + }); + } + if (this._xregexp && this._xregexp.captureNames) { + for (var i = 1; i < match.length; i++) { + name = this._xregexp.captureNames[i - 1]; + if (name) + match[name] = match[i]; + } + } + if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + } + return match; + }; + if (!compliantLastIndexIncrement) { + RegExp.prototype.test = function (str) { + var match = real.exec.call(this, str); + if (match && this.global && !match[0].length && (this.lastIndex > match.index)) + this.lastIndex--; + return !!match; + }; + } + + function getNativeFlags (regex) { + return (regex.global ? "g" : "") + + (regex.ignoreCase ? "i" : "") + + (regex.multiline ? "m" : "") + + (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 + (regex.sticky ? "y" : ""); + } + + function indexOf (array, item, from) { + if (Array.prototype.indexOf) // Use the native array method if available + return array.indexOf(item, from); + for (var i = from || 0; i < array.length; i++) { + if (array[i] === item) + return i; + } + return -1; + } + +}); + +ace.define("ace/lib/es5-shim",["require","exports","module"], function(acequire, exports, module) { + +function Empty() {} + +if (!Function.prototype.bind) { + Function.prototype.bind = function bind(that) { // .length is 1 + var target = this; + if (typeof target != "function") { + throw new TypeError("Function.prototype.bind called on incompatible " + target); + } + var args = slice.call(arguments, 1); // for normal call + var bound = function () { + + if (this instanceof bound) { + + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + + } + + }; + if(target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; +} +var call = Function.prototype.call; +var prototypeOfArray = Array.prototype; +var prototypeOfObject = Object.prototype; +var slice = prototypeOfArray.slice; +var _toString = call.bind(prototypeOfObject.toString); +var owns = call.bind(prototypeOfObject.hasOwnProperty); +var defineGetter; +var defineSetter; +var lookupGetter; +var lookupSetter; +var supportsAccessors; +if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { + defineGetter = call.bind(prototypeOfObject.__defineGetter__); + defineSetter = call.bind(prototypeOfObject.__defineSetter__); + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); +} +if ([1,2].splice(0).length != 2) { + if(function() { // test IE < 9 to splice bug - see issue #138 + function makeArray(l) { + var a = new Array(l+2); + a[0] = a[1] = 0; + return a; + } + var array = [], lengthBefore; + + array.splice.apply(array, makeArray(20)); + array.splice.apply(array, makeArray(26)); + + lengthBefore = array.length; //46 + array.splice(5, 0, "XXX"); // add one element + + lengthBefore + 1 == array.length + + if (lengthBefore + 1 == array.length) { + return true;// has right splice implementation without bugs + } + }()) {//IE 6/7 + var array_splice = Array.prototype.splice; + Array.prototype.splice = function(start, deleteCount) { + if (!arguments.length) { + return []; + } else { + return array_splice.apply(this, [ + start === void 0 ? 0 : start, + deleteCount === void 0 ? (this.length - start) : deleteCount + ].concat(slice.call(arguments, 2))) + } + }; + } else {//IE8 + Array.prototype.splice = function(pos, removeCount){ + var length = this.length; + if (pos > 0) { + if (pos > length) + pos = length; + } else if (pos == void 0) { + pos = 0; + } else if (pos < 0) { + pos = Math.max(length + pos, 0); + } + + if (!(pos+removeCount < length)) + removeCount = length - pos; + + var removed = this.slice(pos, pos+removeCount); + var insert = slice.call(arguments, 2); + var add = insert.length; + if (pos === length) { + if (add) { + this.push.apply(this, insert); + } + } else { + var remove = Math.min(removeCount, length - pos); + var tailOldPos = pos + remove; + var tailNewPos = tailOldPos + add - remove; + var tailCount = length - tailOldPos; + var lengthAfterRemove = length - remove; + + if (tailNewPos < tailOldPos) { // case A + for (var i = 0; i < tailCount; ++i) { + this[tailNewPos+i] = this[tailOldPos+i]; + } + } else if (tailNewPos > tailOldPos) { // case B + for (i = tailCount; i--; ) { + this[tailNewPos+i] = this[tailOldPos+i]; + } + } // else, add == remove (nothing to do) + + if (add && pos === lengthAfterRemove) { + this.length = lengthAfterRemove; // truncate array + this.push.apply(this, insert); + } else { + this.length = lengthAfterRemove + add; // reserves space + for (i = 0; i < add; ++i) { + this[pos+i] = insert[i]; + } + } + } + return removed; + }; + } +} +if (!Array.isArray) { + Array.isArray = function isArray(obj) { + return _toString(obj) == "[object Array]"; + }; +} +var boxedString = Object("a"), + splitString = boxedString[0] != "a" || !(0 in boxedString); + +if (!Array.prototype.forEach) { + Array.prototype.forEach = function forEach(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + thisp = arguments[1], + i = -1, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(); // TODO message + } + + while (++i < length) { + if (i in self) { + fun.call(thisp, self[i], i, object); + } + } + }; +} +if (!Array.prototype.map) { + Array.prototype.map = function map(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = Array(length), + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) + result[i] = fun.call(thisp, self[i], i, object); + } + return result; + }; +} +if (!Array.prototype.filter) { + Array.prototype.filter = function filter(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = [], + value, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (fun.call(thisp, value, i, object)) { + result.push(value); + } + } + } + return result; + }; +} +if (!Array.prototype.every) { + Array.prototype.every = function every(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && !fun.call(thisp, self[i], i, object)) { + return false; + } + } + return true; + }; +} +if (!Array.prototype.some) { + Array.prototype.some = function some(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && fun.call(thisp, self[i], i, object)) { + return true; + } + } + return false; + }; +} +if (!Array.prototype.reduce) { + Array.prototype.reduce = function reduce(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + if (!length && arguments.length == 1) { + throw new TypeError("reduce of empty array with no initial value"); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + if (++i >= length) { + throw new TypeError("reduce of empty array with no initial value"); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = fun.call(void 0, result, self[i], i, object); + } + } + + return result; + }; +} +if (!Array.prototype.reduceRight) { + Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + if (!length && arguments.length == 1) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + + var result, i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + if (--i < 0) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + } while (true); + } + + do { + if (i in this) { + result = fun.call(void 0, result, self[i], i, object); + } + } while (i--); + + return result; + }; +} +if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { + Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = toInteger(arguments[1]); + } + i = i >= 0 ? i : Math.max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === sought) { + return i; + } + } + return -1; + }; +} +if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { + Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = Math.min(i, toInteger(arguments[1])); + } + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && sought === self[i]) { + return i; + } + } + return -1; + }; +} +if (!Object.getPrototypeOf) { + Object.getPrototypeOf = function getPrototypeOf(object) { + return object.__proto__ || ( + object.constructor ? + object.constructor.prototype : + prototypeOfObject + ); + }; +} +if (!Object.getOwnPropertyDescriptor) { + var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + + "non-object: "; + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { + if ((typeof object != "object" && typeof object != "function") || object === null) + throw new TypeError(ERR_NON_OBJECT + object); + if (!owns(object, property)) + return; + + var descriptor, getter, setter; + descriptor = { enumerable: true, configurable: true }; + if (supportsAccessors) { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + + var getter = lookupGetter(object, property); + var setter = lookupSetter(object, property); + object.__proto__ = prototype; + + if (getter || setter) { + if (getter) descriptor.get = getter; + if (setter) descriptor.set = setter; + return descriptor; + } + } + descriptor.value = object[property]; + return descriptor; + }; +} +if (!Object.getOwnPropertyNames) { + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + return Object.keys(object); + }; +} +if (!Object.create) { + var createEmpty; + if (Object.prototype.__proto__ === null) { + createEmpty = function () { + return { "__proto__": null }; + }; + } else { + createEmpty = function () { + var empty = {}; + for (var i in empty) + empty[i] = null; + empty.constructor = + empty.hasOwnProperty = + empty.propertyIsEnumerable = + empty.isPrototypeOf = + empty.toLocaleString = + empty.toString = + empty.valueOf = + empty.__proto__ = null; + return empty; + } + } + + Object.create = function create(prototype, properties) { + var object; + if (prototype === null) { + object = createEmpty(); + } else { + if (typeof prototype != "object") + throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); + var Type = function () {}; + Type.prototype = prototype; + object = new Type(); + object.__proto__ = prototype; + } + if (properties !== void 0) + Object.defineProperties(object, properties); + return object; + }; +} + +function doesDefinePropertyWork(object) { + try { + Object.defineProperty(object, "sentinel", {}); + return "sentinel" in object; + } catch (exception) { + } +} +if (Object.defineProperty) { + var definePropertyWorksOnObject = doesDefinePropertyWork({}); + var definePropertyWorksOnDom = typeof document == "undefined" || + doesDefinePropertyWork(document.createElement("div")); + if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { + var definePropertyFallback = Object.defineProperty; + } +} + +if (!Object.defineProperty || definePropertyFallback) { + var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; + var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " + var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + + "on this javascript engine"; + + Object.defineProperty = function defineProperty(object, property, descriptor) { + if ((typeof object != "object" && typeof object != "function") || object === null) + throw new TypeError(ERR_NON_OBJECT_TARGET + object); + if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) + throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); + if (definePropertyFallback) { + try { + return definePropertyFallback.call(Object, object, property, descriptor); + } catch (exception) { + } + } + if (owns(descriptor, "value")) { + + if (supportsAccessors && (lookupGetter(object, property) || + lookupSetter(object, property))) + { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + delete object[property]; + object[property] = descriptor.value; + object.__proto__ = prototype; + } else { + object[property] = descriptor.value; + } + } else { + if (!supportsAccessors) + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + if (owns(descriptor, "get")) + defineGetter(object, property, descriptor.get); + if (owns(descriptor, "set")) + defineSetter(object, property, descriptor.set); + } + + return object; + }; +} +if (!Object.defineProperties) { + Object.defineProperties = function defineProperties(object, properties) { + for (var property in properties) { + if (owns(properties, property)) + Object.defineProperty(object, property, properties[property]); + } + return object; + }; +} +if (!Object.seal) { + Object.seal = function seal(object) { + return object; + }; +} +if (!Object.freeze) { + Object.freeze = function freeze(object) { + return object; + }; +} +try { + Object.freeze(function () {}); +} catch (exception) { + Object.freeze = (function freeze(freezeObject) { + return function freeze(object) { + if (typeof object == "function") { + return object; + } else { + return freezeObject(object); + } + }; + })(Object.freeze); +} +if (!Object.preventExtensions) { + Object.preventExtensions = function preventExtensions(object) { + return object; + }; +} +if (!Object.isSealed) { + Object.isSealed = function isSealed(object) { + return false; + }; +} +if (!Object.isFrozen) { + Object.isFrozen = function isFrozen(object) { + return false; + }; +} +if (!Object.isExtensible) { + Object.isExtensible = function isExtensible(object) { + if (Object(object) === object) { + throw new TypeError(); // TODO message + } + var name = ''; + while (owns(object, name)) { + name += '?'; + } + object[name] = true; + var returnValue = owns(object, name); + delete object[name]; + return returnValue; + }; +} +if (!Object.keys) { + var hasDontEnumBug = true, + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + dontEnumsLength = dontEnums.length; + + for (var key in {"toString": null}) { + hasDontEnumBug = false; + } + + Object.keys = function keys(object) { + + if ( + (typeof object != "object" && typeof object != "function") || + object === null + ) { + throw new TypeError("Object.keys called on a non-object"); + } + + var keys = []; + for (var name in object) { + if (owns(object, name)) { + keys.push(name); + } + } + + if (hasDontEnumBug) { + for (var i = 0, ii = dontEnumsLength; i < ii; i++) { + var dontEnum = dontEnums[i]; + if (owns(object, dontEnum)) { + keys.push(dontEnum); + } + } + } + return keys; + }; + +} +if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; +} +var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + + "\u2029\uFEFF"; +if (!String.prototype.trim || ws.trim()) { + ws = "[" + ws + "]"; + var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), + trimEndRegexp = new RegExp(ws + ws + "*$"); + String.prototype.trim = function trim() { + return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); + }; +} + +function toInteger(n) { + n = +n; + if (n !== n) { // isNaN + n = 0; + } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; +} + +function isPrimitive(input) { + var type = typeof input; + return ( + input === null || + type === "undefined" || + type === "boolean" || + type === "number" || + type === "string" + ); +} + +function toPrimitive(input) { + var val, valueOf, toString; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (typeof valueOf === "function") { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toString = input.toString; + if (typeof toString === "function") { + val = toString.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); +} +var toObject = function (o) { + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert "+o+" to object"); + } + return Object(o); +}; + +}); + +ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(acequire, exports, module) { +"use strict"; + +acequire("./regexp"); +acequire("./es5-shim"); + +}); + +ace.define("ace/lib/dom",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + +var XHTML_NS = "http://www.w3.org/1999/xhtml"; + +exports.getDocumentHead = function(doc) { + if (!doc) + doc = document; + return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; +}; + +exports.createElement = function(tag, ns) { + return document.createElementNS ? + document.createElementNS(ns || XHTML_NS, tag) : + document.createElement(tag); +}; + +exports.hasCssClass = function(el, name) { + var classes = (el.className || "").split(/\s+/g); + return classes.indexOf(name) !== -1; +}; +exports.addCssClass = function(el, name) { + if (!exports.hasCssClass(el, name)) { + el.className += " " + name; + } +}; +exports.removeCssClass = function(el, name) { + var classes = el.className.split(/\s+/g); + while (true) { + var index = classes.indexOf(name); + if (index == -1) { + break; + } + classes.splice(index, 1); + } + el.className = classes.join(" "); +}; + +exports.toggleCssClass = function(el, name) { + var classes = el.className.split(/\s+/g), add = true; + while (true) { + var index = classes.indexOf(name); + if (index == -1) { + break; + } + add = false; + classes.splice(index, 1); + } + if (add) + classes.push(name); + + el.className = classes.join(" "); + return add; +}; +exports.setCssClass = function(node, className, include) { + if (include) { + exports.addCssClass(node, className); + } else { + exports.removeCssClass(node, className); + } +}; + +exports.hasCssString = function(id, doc) { + var index = 0, sheets; + doc = doc || document; + + if (doc.createStyleSheet && (sheets = doc.styleSheets)) { + while (index < sheets.length) + if (sheets[index++].owningElement.id === id) return true; + } else if ((sheets = doc.getElementsByTagName("style"))) { + while (index < sheets.length) + if (sheets[index++].id === id) return true; + } + + return false; +}; + +exports.importCssString = function importCssString(cssText, id, doc) { + doc = doc || document; + if (id && exports.hasCssString(id, doc)) + return null; + + var style; + + if (id) + cssText += "\n/*# sourceURL=ace/css/" + id + " */"; + + if (doc.createStyleSheet) { + style = doc.createStyleSheet(); + style.cssText = cssText; + if (id) + style.owningElement.id = id; + } else { + style = exports.createElement("style"); + style.appendChild(doc.createTextNode(cssText)); + if (id) + style.id = id; + + exports.getDocumentHead(doc).appendChild(style); + } +}; + +exports.importCssStylsheet = function(uri, doc) { + if (doc.createStyleSheet) { + doc.createStyleSheet(uri); + } else { + var link = exports.createElement('link'); + link.rel = 'stylesheet'; + link.href = uri; + + exports.getDocumentHead(doc).appendChild(link); + } +}; + +exports.getInnerWidth = function(element) { + return ( + parseInt(exports.computedStyle(element, "paddingLeft"), 10) + + parseInt(exports.computedStyle(element, "paddingRight"), 10) + + element.clientWidth + ); +}; + +exports.getInnerHeight = function(element) { + return ( + parseInt(exports.computedStyle(element, "paddingTop"), 10) + + parseInt(exports.computedStyle(element, "paddingBottom"), 10) + + element.clientHeight + ); +}; + +exports.scrollbarWidth = function(document) { + var inner = exports.createElement("ace_inner"); + inner.style.width = "100%"; + inner.style.minWidth = "0px"; + inner.style.height = "200px"; + inner.style.display = "block"; + + var outer = exports.createElement("ace_outer"); + var style = outer.style; + + style.position = "absolute"; + style.left = "-10000px"; + style.overflow = "hidden"; + style.width = "200px"; + style.minWidth = "0px"; + style.height = "150px"; + style.display = "block"; + + outer.appendChild(inner); + + var body = document.documentElement; + body.appendChild(outer); + + var noScrollbar = inner.offsetWidth; + + style.overflow = "scroll"; + var withScrollbar = inner.offsetWidth; + + if (noScrollbar == withScrollbar) { + withScrollbar = outer.clientWidth; + } + + body.removeChild(outer); + + return noScrollbar-withScrollbar; +}; + +if (typeof document == "undefined") { + exports.importCssString = function() {}; + return; +} + +if (window.pageYOffset !== undefined) { + exports.getPageScrollTop = function() { + return window.pageYOffset; + }; + + exports.getPageScrollLeft = function() { + return window.pageXOffset; + }; +} +else { + exports.getPageScrollTop = function() { + return document.body.scrollTop; + }; + + exports.getPageScrollLeft = function() { + return document.body.scrollLeft; + }; +} + +if (window.getComputedStyle) + exports.computedStyle = function(element, style) { + if (style) + return (window.getComputedStyle(element, "") || {})[style] || ""; + return window.getComputedStyle(element, "") || {}; + }; +else + exports.computedStyle = function(element, style) { + if (style) + return element.currentStyle[style]; + return element.currentStyle; + }; +exports.setInnerHtml = function(el, innerHtml) { + var element = el.cloneNode(false);//document.createElement("div"); + element.innerHTML = innerHtml; + el.parentNode.replaceChild(element, el); + return element; +}; + +if ("textContent" in document.documentElement) { + exports.setInnerText = function(el, innerText) { + el.textContent = innerText; + }; + + exports.getInnerText = function(el) { + return el.textContent; + }; +} +else { + exports.setInnerText = function(el, innerText) { + el.innerText = innerText; + }; + + exports.getInnerText = function(el) { + return el.innerText; + }; +} + +exports.getParentWindow = function(document) { + return document.defaultView || document.parentWindow; +}; + +}); + +ace.define("ace/lib/oop",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + +exports.inherits = function(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +}; + +exports.mixin = function(obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } + return obj; +}; + +exports.implement = function(proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); + +ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(acequire, exports, module) { +"use strict"; + +acequire("./fixoldbrowsers"); + +var oop = acequire("./oop"); +var Keys = (function() { + var ret = { + MODIFIER_KEYS: { + 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' + }, + + KEY_MODS: { + "ctrl": 1, "alt": 2, "option" : 2, "shift": 4, + "super": 8, "meta": 8, "command": 8, "cmd": 8 + }, + + FUNCTION_KEYS : { + 8 : "Backspace", + 9 : "Tab", + 13 : "Return", + 19 : "Pause", + 27 : "Esc", + 32 : "Space", + 33 : "PageUp", + 34 : "PageDown", + 35 : "End", + 36 : "Home", + 37 : "Left", + 38 : "Up", + 39 : "Right", + 40 : "Down", + 44 : "Print", + 45 : "Insert", + 46 : "Delete", + 96 : "Numpad0", + 97 : "Numpad1", + 98 : "Numpad2", + 99 : "Numpad3", + 100: "Numpad4", + 101: "Numpad5", + 102: "Numpad6", + 103: "Numpad7", + 104: "Numpad8", + 105: "Numpad9", + '-13': "NumpadEnter", + 112: "F1", + 113: "F2", + 114: "F3", + 115: "F4", + 116: "F5", + 117: "F6", + 118: "F7", + 119: "F8", + 120: "F9", + 121: "F10", + 122: "F11", + 123: "F12", + 144: "Numlock", + 145: "Scrolllock" + }, + + PRINTABLE_KEYS: { + 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', + 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', + 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', + 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', + 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', + 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', + 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', + 219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*' + } + }; + var name, i; + for (i in ret.FUNCTION_KEYS) { + name = ret.FUNCTION_KEYS[i].toLowerCase(); + ret[name] = parseInt(i, 10); + } + for (i in ret.PRINTABLE_KEYS) { + name = ret.PRINTABLE_KEYS[i].toLowerCase(); + ret[name] = parseInt(i, 10); + } + oop.mixin(ret, ret.MODIFIER_KEYS); + oop.mixin(ret, ret.PRINTABLE_KEYS); + oop.mixin(ret, ret.FUNCTION_KEYS); + ret.enter = ret["return"]; + ret.escape = ret.esc; + ret.del = ret["delete"]; + ret[173] = '-'; + + (function() { + var mods = ["cmd", "ctrl", "alt", "shift"]; + for (var i = Math.pow(2, mods.length); i--;) { + ret.KEY_MODS[i] = mods.filter(function(x) { + return i & ret.KEY_MODS[x]; + }).join("-") + "-"; + } + })(); + + ret.KEY_MODS[0] = ""; + ret.KEY_MODS[-1] = "input-"; + + return ret; +})(); +oop.mixin(exports, Keys); + +exports.keyCodeToString = function(keyCode) { + var keyString = Keys[keyCode]; + if (typeof keyString != "string") + keyString = String.fromCharCode(keyCode); + return keyString.toLowerCase(); +}; + +}); + +ace.define("ace/lib/useragent",["require","exports","module"], function(acequire, exports, module) { +"use strict"; +exports.OS = { + LINUX: "LINUX", + MAC: "MAC", + WINDOWS: "WINDOWS" +}; +exports.getOS = function() { + if (exports.isMac) { + return exports.OS.MAC; + } else if (exports.isLinux) { + return exports.OS.LINUX; + } else { + return exports.OS.WINDOWS; + } +}; +if (typeof navigator != "object") + return; + +var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); +var ua = navigator.userAgent; +exports.isWin = (os == "win"); +exports.isMac = (os == "mac"); +exports.isLinux = (os == "linux"); +exports.isIE = + (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) + ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) + : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie + +exports.isOldIE = exports.isIE && exports.isIE < 9; +exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko"; +exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4; +exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; +exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; + +exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; + +exports.isAIR = ua.indexOf("AdobeAIR") >= 0; + +exports.isIPad = ua.indexOf("iPad") >= 0; + +exports.isTouchPad = ua.indexOf("TouchPad") >= 0; + +exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; + +}); + +ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(acequire, exports, module) { +"use strict"; + +var keys = acequire("./keys"); +var useragent = acequire("./useragent"); + +var pressedKeys = null; +var ts = 0; + +exports.addListener = function(elem, type, callback) { + if (elem.addEventListener) { + return elem.addEventListener(type, callback, false); + } + if (elem.attachEvent) { + var wrapper = function() { + callback.call(elem, window.event); + }; + callback._wrapper = wrapper; + elem.attachEvent("on" + type, wrapper); + } +}; + +exports.removeListener = function(elem, type, callback) { + if (elem.removeEventListener) { + return elem.removeEventListener(type, callback, false); + } + if (elem.detachEvent) { + elem.detachEvent("on" + type, callback._wrapper || callback); + } +}; +exports.stopEvent = function(e) { + exports.stopPropagation(e); + exports.preventDefault(e); + return false; +}; + +exports.stopPropagation = function(e) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.cancelBubble = true; +}; + +exports.preventDefault = function(e) { + if (e.preventDefault) + e.preventDefault(); + else + e.returnValue = false; +}; +exports.getButton = function(e) { + if (e.type == "dblclick") + return 0; + if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey))) + return 2; + if (e.preventDefault) { + return e.button; + } + else { + return {1:0, 2:2, 4:1}[e.button]; + } +}; + +exports.capture = function(el, eventHandler, releaseCaptureHandler) { + function onMouseUp(e) { + eventHandler && eventHandler(e); + releaseCaptureHandler && releaseCaptureHandler(e); + + exports.removeListener(document, "mousemove", eventHandler, true); + exports.removeListener(document, "mouseup", onMouseUp, true); + exports.removeListener(document, "dragstart", onMouseUp, true); + } + + exports.addListener(document, "mousemove", eventHandler, true); + exports.addListener(document, "mouseup", onMouseUp, true); + exports.addListener(document, "dragstart", onMouseUp, true); + + return onMouseUp; +}; + +exports.addTouchMoveListener = function (el, callback) { + if ("ontouchmove" in el) { + var startx, starty; + exports.addListener(el, "touchstart", function (e) { + var touchObj = e.changedTouches[0]; + startx = touchObj.clientX; + starty = touchObj.clientY; + }); + exports.addListener(el, "touchmove", function (e) { + var factor = 1, + touchObj = e.changedTouches[0]; + + e.wheelX = -(touchObj.clientX - startx) / factor; + e.wheelY = -(touchObj.clientY - starty) / factor; + + startx = touchObj.clientX; + starty = touchObj.clientY; + + callback(e); + }); + } +}; + +exports.addMouseWheelListener = function(el, callback) { + if ("onmousewheel" in el) { + exports.addListener(el, "mousewheel", function(e) { + var factor = 8; + if (e.wheelDeltaX !== undefined) { + e.wheelX = -e.wheelDeltaX / factor; + e.wheelY = -e.wheelDeltaY / factor; + } else { + e.wheelX = 0; + e.wheelY = -e.wheelDelta / factor; + } + callback(e); + }); + } else if ("onwheel" in el) { + exports.addListener(el, "wheel", function(e) { + var factor = 0.35; + switch (e.deltaMode) { + case e.DOM_DELTA_PIXEL: + e.wheelX = e.deltaX * factor || 0; + e.wheelY = e.deltaY * factor || 0; + break; + case e.DOM_DELTA_LINE: + case e.DOM_DELTA_PAGE: + e.wheelX = (e.deltaX || 0) * 5; + e.wheelY = (e.deltaY || 0) * 5; + break; + } + + callback(e); + }); + } else { + exports.addListener(el, "DOMMouseScroll", function(e) { + if (e.axis && e.axis == e.HORIZONTAL_AXIS) { + e.wheelX = (e.detail || 0) * 5; + e.wheelY = 0; + } else { + e.wheelX = 0; + e.wheelY = (e.detail || 0) * 5; + } + callback(e); + }); + } +}; + +exports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) { + var clicks = 0; + var startX, startY, timer; + var eventNames = { + 2: "dblclick", + 3: "tripleclick", + 4: "quadclick" + }; + + function onMousedown(e) { + if (exports.getButton(e) !== 0) { + clicks = 0; + } else if (e.detail > 1) { + clicks++; + if (clicks > 4) + clicks = 1; + } else { + clicks = 1; + } + if (useragent.isIE) { + var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; + if (!timer || isNewClick) + clicks = 1; + if (timer) + clearTimeout(timer); + timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); + + if (clicks == 1) { + startX = e.clientX; + startY = e.clientY; + } + } + + e._clicks = clicks; + + eventHandler[callbackName]("mousedown", e); + + if (clicks > 4) + clicks = 0; + else if (clicks > 1) + return eventHandler[callbackName](eventNames[clicks], e); + } + function onDblclick(e) { + clicks = 2; + if (timer) + clearTimeout(timer); + timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); + eventHandler[callbackName]("mousedown", e); + eventHandler[callbackName](eventNames[clicks], e); + } + if (!Array.isArray(elements)) + elements = [elements]; + elements.forEach(function(el) { + exports.addListener(el, "mousedown", onMousedown); + if (useragent.isOldIE) + exports.addListener(el, "dblclick", onDblclick); + }); +}; + +var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window) + ? function(e) { + return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0); + } + : function(e) { + return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); + }; + +exports.getModifierString = function(e) { + return keys.KEY_MODS[getModifierHash(e)]; +}; + +function normalizeCommandKeys(callback, e, keyCode) { + var hashId = getModifierHash(e); + + if (!useragent.isMac && pressedKeys) { + if (pressedKeys.OSKey) + hashId |= 8; + if (pressedKeys.altGr) { + if ((3 & hashId) != 3) + pressedKeys.altGr = 0; + else + return; + } + if (keyCode === 18 || keyCode === 17) { + var location = "location" in e ? e.location : e.keyLocation; + if (keyCode === 17 && location === 1) { + if (pressedKeys[keyCode] == 1) + ts = e.timeStamp; + } else if (keyCode === 18 && hashId === 3 && location === 2) { + var dt = e.timeStamp - ts; + if (dt < 50) + pressedKeys.altGr = true; + } + } + } + + if (keyCode in keys.MODIFIER_KEYS) { + keyCode = -1; + } + if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) { + keyCode = -1; + } + + if (!hashId && keyCode === 13) { + var location = "location" in e ? e.location : e.keyLocation; + if (location === 3) { + callback(e, hashId, -keyCode); + if (e.defaultPrevented) + return; + } + } + + if (useragent.isChromeOS && hashId & 8) { + callback(e, hashId, keyCode); + if (e.defaultPrevented) + return; + else + hashId &= ~8; + } + if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) { + return false; + } + + return callback(e, hashId, keyCode); +} + + +exports.addCommandKeyListener = function(el, callback) { + var addListener = exports.addListener; + if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) { + var lastKeyDownKeyCode = null; + addListener(el, "keydown", function(e) { + lastKeyDownKeyCode = e.keyCode; + }); + addListener(el, "keypress", function(e) { + return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); + }); + } else { + var lastDefaultPrevented = null; + + addListener(el, "keydown", function(e) { + var keyCode = e.keyCode; + pressedKeys[keyCode] = (pressedKeys[keyCode] || 0) + 1; + if (keyCode == 91 || keyCode == 92) { + pressedKeys.OSKey = true; + } else if (pressedKeys.OSKey) { + if (e.timeStamp - pressedKeys.lastT > 200 && pressedKeys.count == 1) + resetPressedKeys(); + } + if (pressedKeys[keyCode] == 1) + pressedKeys.count++; + pressedKeys.lastT = e.timeStamp; + var result = normalizeCommandKeys(callback, e, keyCode); + lastDefaultPrevented = e.defaultPrevented; + return result; + }); + + addListener(el, "keypress", function(e) { + if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { + exports.stopEvent(e); + lastDefaultPrevented = null; + } + }); + + addListener(el, "keyup", function(e) { + var keyCode = e.keyCode; + if (!pressedKeys[keyCode]) { + resetPressedKeys(); + } else { + pressedKeys.count = Math.max(pressedKeys.count - 1, 0); + } + if (keyCode == 91 || keyCode == 92) { + pressedKeys.OSKey = false; + } + pressedKeys[keyCode] = null; + }); + + if (!pressedKeys) { + resetPressedKeys(); + addListener(window, "focus", resetPressedKeys); + } + } +}; +function resetPressedKeys() { + pressedKeys = Object.create(null); + pressedKeys.count = 0; + pressedKeys.lastT = 0; +} + +if (typeof window == "object" && window.postMessage && !useragent.isOldIE) { + var postMessageId = 1; + exports.nextTick = function(callback, win) { + win = win || window; + var messageName = "zero-timeout-message-" + postMessageId; + exports.addListener(win, "message", function listener(e) { + if (e.data == messageName) { + exports.stopPropagation(e); + exports.removeListener(win, "message", listener); + callback(); + } + }); + win.postMessage(messageName, "*"); + }; +} + + +exports.nextFrame = typeof window == "object" && (window.requestAnimationFrame + || window.mozRequestAnimationFrame + || window.webkitRequestAnimationFrame + || window.msRequestAnimationFrame + || window.oRequestAnimationFrame); + +if (exports.nextFrame) + exports.nextFrame = exports.nextFrame.bind(window); +else + exports.nextFrame = function(callback) { + setTimeout(callback, 17); + }; +}); + +ace.define("ace/lib/lang",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + +exports.last = function(a) { + return a[a.length - 1]; +}; + +exports.stringReverse = function(string) { + return string.split("").reverse().join(""); +}; + +exports.stringRepeat = function (string, count) { + var result = ''; + while (count > 0) { + if (count & 1) + result += string; + + if (count >>= 1) + string += string; + } + return result; +}; + +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; + +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; + +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; + +exports.copyObject = function(obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; + +exports.copyArray = function(array){ + var copy = []; + for (var i=0, l=array.length; i 1); + return ev.preventDefault(); + }; + + this.startSelect = function(pos, waitForClickSelection) { + pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); + var editor = this.editor; + editor.$blockScrolling++; + if (this.mousedownEvent.getShiftKey()) + editor.selection.selectToPosition(pos); + else if (!waitForClickSelection) + editor.selection.moveToPosition(pos); + if (!waitForClickSelection) + this.select(); + if (editor.renderer.scroller.setCapture) { + editor.renderer.scroller.setCapture(); + } + editor.setStyle("ace_selecting"); + this.setState("select"); + editor.$blockScrolling--; + }; + + this.select = function() { + var anchor, editor = this.editor; + var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); + editor.$blockScrolling++; + if (this.$clickSelection) { + var cmp = this.$clickSelection.comparePoint(cursor); + + if (cmp == -1) { + anchor = this.$clickSelection.end; + } else if (cmp == 1) { + anchor = this.$clickSelection.start; + } else { + var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); + cursor = orientedRange.cursor; + anchor = orientedRange.anchor; + } + editor.selection.setSelectionAnchor(anchor.row, anchor.column); + } + editor.selection.selectToPosition(cursor); + editor.$blockScrolling--; + editor.renderer.scrollCursorIntoView(); + }; + + this.extendSelectionBy = function(unitName) { + var anchor, editor = this.editor; + var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); + var range = editor.selection[unitName](cursor.row, cursor.column); + editor.$blockScrolling++; + if (this.$clickSelection) { + var cmpStart = this.$clickSelection.comparePoint(range.start); + var cmpEnd = this.$clickSelection.comparePoint(range.end); + + if (cmpStart == -1 && cmpEnd <= 0) { + anchor = this.$clickSelection.end; + if (range.end.row != cursor.row || range.end.column != cursor.column) + cursor = range.start; + } else if (cmpEnd == 1 && cmpStart >= 0) { + anchor = this.$clickSelection.start; + if (range.start.row != cursor.row || range.start.column != cursor.column) + cursor = range.end; + } else if (cmpStart == -1 && cmpEnd == 1) { + cursor = range.end; + anchor = range.start; + } else { + var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); + cursor = orientedRange.cursor; + anchor = orientedRange.anchor; + } + editor.selection.setSelectionAnchor(anchor.row, anchor.column); + } + editor.selection.selectToPosition(cursor); + editor.$blockScrolling--; + editor.renderer.scrollCursorIntoView(); + }; + + this.selectEnd = + this.selectAllEnd = + this.selectByWordsEnd = + this.selectByLinesEnd = function() { + this.$clickSelection = null; + this.editor.unsetStyle("ace_selecting"); + if (this.editor.renderer.scroller.releaseCapture) { + this.editor.renderer.scroller.releaseCapture(); + } + }; + + this.focusWait = function() { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + var time = Date.now(); + + if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout) + this.startSelect(this.mousedownEvent.getDocumentPosition()); + }; + + this.onDoubleClick = function(ev) { + var pos = ev.getDocumentPosition(); + var editor = this.editor; + var session = editor.session; + + var range = session.getBracketRange(pos); + if (range) { + if (range.isEmpty()) { + range.start.column--; + range.end.column++; + } + this.setState("select"); + } else { + range = editor.selection.getWordRange(pos.row, pos.column); + this.setState("selectByWords"); + } + this.$clickSelection = range; + this.select(); + }; + + this.onTripleClick = function(ev) { + var pos = ev.getDocumentPosition(); + var editor = this.editor; + + this.setState("selectByLines"); + var range = editor.getSelectionRange(); + if (range.isMultiLine() && range.contains(pos.row, pos.column)) { + this.$clickSelection = editor.selection.getLineRange(range.start.row); + this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; + } else { + this.$clickSelection = editor.selection.getLineRange(pos.row); + } + this.select(); + }; + + this.onQuadClick = function(ev) { + var editor = this.editor; + + editor.selectAll(); + this.$clickSelection = editor.getSelectionRange(); + this.setState("selectAll"); + }; + + this.onMouseWheel = function(ev) { + if (ev.getAccelKey()) + return; + if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { + ev.wheelX = ev.wheelY; + ev.wheelY = 0; + } + + var t = ev.domEvent.timeStamp; + var dt = t - (this.$lastScrollTime||0); + + var editor = this.editor; + var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); + if (isScrolable || dt < 200) { + this.$lastScrollTime = t; + editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); + return ev.stop(); + } + }; + + this.onTouchMove = function (ev) { + var t = ev.domEvent.timeStamp; + var dt = t - (this.$lastScrollTime || 0); + + var editor = this.editor; + var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); + if (isScrolable || dt < 200) { + this.$lastScrollTime = t; + editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); + return ev.stop(); + } + }; + +}).call(DefaultHandlers.prototype); + +exports.DefaultHandlers = DefaultHandlers; + +function calcDistance(ax, ay, bx, by) { + return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); +} + +function calcRangeOrientation(range, cursor) { + if (range.start.row == range.end.row) + var cmp = 2 * cursor.column - range.start.column - range.end.column; + else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) + var cmp = cursor.column - 4; + else + var cmp = 2 * cursor.row - range.start.row - range.end.row; + + if (cmp < 0) + return {cursor: range.start, anchor: range.end}; + else + return {cursor: range.end, anchor: range.start}; +} + +}); + +ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var dom = acequire("./lib/dom"); +function Tooltip (parentNode) { + this.isOpen = false; + this.$element = null; + this.$parentNode = parentNode; +} + +(function() { + this.$init = function() { + this.$element = dom.createElement("div"); + this.$element.className = "ace_tooltip"; + this.$element.style.display = "none"; + this.$parentNode.appendChild(this.$element); + return this.$element; + }; + this.getElement = function() { + return this.$element || this.$init(); + }; + this.setText = function(text) { + dom.setInnerText(this.getElement(), text); + }; + this.setHtml = function(html) { + this.getElement().innerHTML = html; + }; + this.setPosition = function(x, y) { + this.getElement().style.left = x + "px"; + this.getElement().style.top = y + "px"; + }; + this.setClassName = function(className) { + dom.addCssClass(this.getElement(), className); + }; + this.show = function(text, x, y) { + if (text != null) + this.setText(text); + if (x != null && y != null) + this.setPosition(x, y); + if (!this.isOpen) { + this.getElement().style.display = "block"; + this.isOpen = true; + } + }; + + this.hide = function() { + if (this.isOpen) { + this.getElement().style.display = "none"; + this.isOpen = false; + } + }; + this.getHeight = function() { + return this.getElement().offsetHeight; + }; + this.getWidth = function() { + return this.getElement().offsetWidth; + }; + +}).call(Tooltip.prototype); + +exports.Tooltip = Tooltip; +}); + +ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(acequire, exports, module) { +"use strict"; +var dom = acequire("../lib/dom"); +var oop = acequire("../lib/oop"); +var event = acequire("../lib/event"); +var Tooltip = acequire("../tooltip").Tooltip; + +function GutterHandler(mouseHandler) { + var editor = mouseHandler.editor; + var gutter = editor.renderer.$gutterLayer; + var tooltip = new GutterTooltip(editor.container); + + mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { + if (!editor.isFocused() || e.getButton() != 0) + return; + var gutterRegion = gutter.getRegion(e); + + if (gutterRegion == "foldWidgets") + return; + + var row = e.getDocumentPosition().row; + var selection = editor.session.selection; + + if (e.getShiftKey()) + selection.selectTo(row, 0); + else { + if (e.domEvent.detail == 2) { + editor.selectAll(); + return e.preventDefault(); + } + mouseHandler.$clickSelection = editor.selection.getLineRange(row); + } + mouseHandler.setState("selectByLines"); + mouseHandler.captureMouse(e); + return e.preventDefault(); + }); + + + var tooltipTimeout, mouseEvent, tooltipAnnotation; + + function showTooltip() { + var row = mouseEvent.getDocumentPosition().row; + var annotation = gutter.$annotations[row]; + if (!annotation) + return hideTooltip(); + + var maxRow = editor.session.getLength(); + if (row == maxRow) { + var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; + var pos = mouseEvent.$pos; + if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) + return hideTooltip(); + } + + if (tooltipAnnotation == annotation) + return; + tooltipAnnotation = annotation.text.join("
"); + + tooltip.setHtml(tooltipAnnotation); + tooltip.show(); + editor.on("mousewheel", hideTooltip); + + if (mouseHandler.$tooltipFollowsMouse) { + moveTooltip(mouseEvent); + } else { + var gutterElement = mouseEvent.domEvent.target; + var rect = gutterElement.getBoundingClientRect(); + var style = tooltip.getElement().style; + style.left = rect.right + "px"; + style.top = rect.bottom + "px"; + } + } + + function hideTooltip() { + if (tooltipTimeout) + tooltipTimeout = clearTimeout(tooltipTimeout); + if (tooltipAnnotation) { + tooltip.hide(); + tooltipAnnotation = null; + editor.removeEventListener("mousewheel", hideTooltip); + } + } + + function moveTooltip(e) { + tooltip.setPosition(e.x, e.y); + } + + mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { + var target = e.domEvent.target || e.domEvent.srcElement; + if (dom.hasCssClass(target, "ace_fold-widget")) + return hideTooltip(); + + if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) + moveTooltip(e); + + mouseEvent = e; + if (tooltipTimeout) + return; + tooltipTimeout = setTimeout(function() { + tooltipTimeout = null; + if (mouseEvent && !mouseHandler.isMousePressed) + showTooltip(); + else + hideTooltip(); + }, 50); + }); + + event.addListener(editor.renderer.$gutter, "mouseout", function(e) { + mouseEvent = null; + if (!tooltipAnnotation || tooltipTimeout) + return; + + tooltipTimeout = setTimeout(function() { + tooltipTimeout = null; + hideTooltip(); + }, 50); + }); + + editor.on("changeSession", hideTooltip); +} + +function GutterTooltip(parentNode) { + Tooltip.call(this, parentNode); +} + +oop.inherits(GutterTooltip, Tooltip); + +(function(){ + this.setPosition = function(x, y) { + var windowWidth = window.innerWidth || document.documentElement.clientWidth; + var windowHeight = window.innerHeight || document.documentElement.clientHeight; + var width = this.getWidth(); + var height = this.getHeight(); + x += 15; + y += 15; + if (x + width > windowWidth) { + x -= (x + width) - windowWidth; + } + if (y + height > windowHeight) { + y -= 20 + height; + } + Tooltip.prototype.setPosition.call(this, x, y); + }; + +}).call(GutterTooltip.prototype); + + + +exports.GutterHandler = GutterHandler; + +}); + +ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(acequire, exports, module) { +"use strict"; + +var event = acequire("../lib/event"); +var useragent = acequire("../lib/useragent"); +var MouseEvent = exports.MouseEvent = function(domEvent, editor) { + this.domEvent = domEvent; + this.editor = editor; + + this.x = this.clientX = domEvent.clientX; + this.y = this.clientY = domEvent.clientY; + + this.$pos = null; + this.$inSelection = null; + + this.propagationStopped = false; + this.defaultPrevented = false; +}; + +(function() { + + this.stopPropagation = function() { + event.stopPropagation(this.domEvent); + this.propagationStopped = true; + }; + + this.preventDefault = function() { + event.preventDefault(this.domEvent); + this.defaultPrevented = true; + }; + + this.stop = function() { + this.stopPropagation(); + this.preventDefault(); + }; + this.getDocumentPosition = function() { + if (this.$pos) + return this.$pos; + + this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); + return this.$pos; + }; + this.inSelection = function() { + if (this.$inSelection !== null) + return this.$inSelection; + + var editor = this.editor; + + + var selectionRange = editor.getSelectionRange(); + if (selectionRange.isEmpty()) + this.$inSelection = false; + else { + var pos = this.getDocumentPosition(); + this.$inSelection = selectionRange.contains(pos.row, pos.column); + } + + return this.$inSelection; + }; + this.getButton = function() { + return event.getButton(this.domEvent); + }; + this.getShiftKey = function() { + return this.domEvent.shiftKey; + }; + + this.getAccelKey = useragent.isMac + ? function() { return this.domEvent.metaKey; } + : function() { return this.domEvent.ctrlKey; }; + +}).call(MouseEvent.prototype); + +}); + +ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(acequire, exports, module) { +"use strict"; + +var dom = acequire("../lib/dom"); +var event = acequire("../lib/event"); +var useragent = acequire("../lib/useragent"); + +var AUTOSCROLL_DELAY = 200; +var SCROLL_CURSOR_DELAY = 200; +var SCROLL_CURSOR_HYSTERESIS = 5; + +function DragdropHandler(mouseHandler) { + + var editor = mouseHandler.editor; + + var blankImage = dom.createElement("img"); + blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (useragent.isOpera) + blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; + + var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; + + exports.forEach(function(x) { + mouseHandler[x] = this[x]; + }, this); + editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); + + + var mouseTarget = editor.container; + var dragSelectionMarker, x, y; + var timerId, range; + var dragCursor, counter = 0; + var dragOperation; + var isInternal; + var autoScrollStartTime; + var cursorMovedTime; + var cursorPointOnCaretMoved; + + this.onDragStart = function(e) { + if (this.cancelDrag || !mouseTarget.draggable) { + var self = this; + setTimeout(function(){ + self.startSelect(); + self.captureMouse(e); + }, 0); + return e.preventDefault(); + } + range = editor.getSelectionRange(); + + var dataTransfer = e.dataTransfer; + dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; + if (useragent.isOpera) { + editor.container.appendChild(blankImage); + blankImage.scrollTop = 0; + } + dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); + if (useragent.isOpera) { + editor.container.removeChild(blankImage); + } + dataTransfer.clearData(); + dataTransfer.setData("Text", editor.session.getTextRange()); + + isInternal = true; + this.setState("drag"); + }; + + this.onDragEnd = function(e) { + mouseTarget.draggable = false; + isInternal = false; + this.setState(null); + if (!editor.getReadOnly()) { + var dropEffect = e.dataTransfer.dropEffect; + if (!dragOperation && dropEffect == "move") + editor.session.remove(editor.getSelectionRange()); + editor.renderer.$cursorLayer.setBlinking(true); + } + this.editor.unsetStyle("ace_dragging"); + this.editor.renderer.setCursorStyle(""); + }; + + this.onDragEnter = function(e) { + if (editor.getReadOnly() || !canAccept(e.dataTransfer)) + return; + x = e.clientX; + y = e.clientY; + if (!dragSelectionMarker) + addDragMarker(); + counter++; + e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); + return event.preventDefault(e); + }; + + this.onDragOver = function(e) { + if (editor.getReadOnly() || !canAccept(e.dataTransfer)) + return; + x = e.clientX; + y = e.clientY; + if (!dragSelectionMarker) { + addDragMarker(); + counter++; + } + if (onMouseMoveTimer !== null) + onMouseMoveTimer = null; + + e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); + return event.preventDefault(e); + }; + + this.onDragLeave = function(e) { + counter--; + if (counter <= 0 && dragSelectionMarker) { + clearDragMarker(); + dragOperation = null; + return event.preventDefault(e); + } + }; + + this.onDrop = function(e) { + if (!dragCursor) + return; + var dataTransfer = e.dataTransfer; + if (isInternal) { + switch (dragOperation) { + case "move": + if (range.contains(dragCursor.row, dragCursor.column)) { + range = { + start: dragCursor, + end: dragCursor + }; + } else { + range = editor.moveText(range, dragCursor); + } + break; + case "copy": + range = editor.moveText(range, dragCursor, true); + break; + } + } else { + var dropData = dataTransfer.getData('Text'); + range = { + start: dragCursor, + end: editor.session.insert(dragCursor, dropData) + }; + editor.focus(); + dragOperation = null; + } + clearDragMarker(); + return event.preventDefault(e); + }; + + event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); + event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); + event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); + event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); + event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); + event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); + + function scrollCursorIntoView(cursor, prevCursor) { + var now = Date.now(); + var vMovement = !prevCursor || cursor.row != prevCursor.row; + var hMovement = !prevCursor || cursor.column != prevCursor.column; + if (!cursorMovedTime || vMovement || hMovement) { + editor.$blockScrolling += 1; + editor.moveCursorToPosition(cursor); + editor.$blockScrolling -= 1; + cursorMovedTime = now; + cursorPointOnCaretMoved = {x: x, y: y}; + } else { + var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); + if (distance > SCROLL_CURSOR_HYSTERESIS) { + cursorMovedTime = null; + } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { + editor.renderer.scrollCursorIntoView(); + cursorMovedTime = null; + } + } + } + + function autoScroll(cursor, prevCursor) { + var now = Date.now(); + var lineHeight = editor.renderer.layerConfig.lineHeight; + var characterWidth = editor.renderer.layerConfig.characterWidth; + var editorRect = editor.renderer.scroller.getBoundingClientRect(); + var offsets = { + x: { + left: x - editorRect.left, + right: editorRect.right - x + }, + y: { + top: y - editorRect.top, + bottom: editorRect.bottom - y + } + }; + var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); + var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); + var scrollCursor = {row: cursor.row, column: cursor.column}; + if (nearestXOffset / characterWidth <= 2) { + scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); + } + if (nearestYOffset / lineHeight <= 1) { + scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); + } + var vScroll = cursor.row != scrollCursor.row; + var hScroll = cursor.column != scrollCursor.column; + var vMovement = !prevCursor || cursor.row != prevCursor.row; + if (vScroll || (hScroll && !vMovement)) { + if (!autoScrollStartTime) + autoScrollStartTime = now; + else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) + editor.renderer.scrollCursorIntoView(scrollCursor); + } else { + autoScrollStartTime = null; + } + } + + function onDragInterval() { + var prevCursor = dragCursor; + dragCursor = editor.renderer.screenToTextCoordinates(x, y); + scrollCursorIntoView(dragCursor, prevCursor); + autoScroll(dragCursor, prevCursor); + } + + function addDragMarker() { + range = editor.selection.toOrientedRange(); + dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); + editor.clearSelection(); + if (editor.isFocused()) + editor.renderer.$cursorLayer.setBlinking(false); + clearInterval(timerId); + onDragInterval(); + timerId = setInterval(onDragInterval, 20); + counter = 0; + event.addListener(document, "mousemove", onMouseMove); + } + + function clearDragMarker() { + clearInterval(timerId); + editor.session.removeMarker(dragSelectionMarker); + dragSelectionMarker = null; + editor.$blockScrolling += 1; + editor.selection.fromOrientedRange(range); + editor.$blockScrolling -= 1; + if (editor.isFocused() && !isInternal) + editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()); + range = null; + dragCursor = null; + counter = 0; + autoScrollStartTime = null; + cursorMovedTime = null; + event.removeListener(document, "mousemove", onMouseMove); + } + var onMouseMoveTimer = null; + function onMouseMove() { + if (onMouseMoveTimer == null) { + onMouseMoveTimer = setTimeout(function() { + if (onMouseMoveTimer != null && dragSelectionMarker) + clearDragMarker(); + }, 20); + } + } + + function canAccept(dataTransfer) { + var types = dataTransfer.types; + return !types || Array.prototype.some.call(types, function(type) { + return type == 'text/plain' || type == 'Text'; + }); + } + + function getDropEffect(e) { + var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; + var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; + + var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; + var effectAllowed = "uninitialized"; + try { + effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); + } catch (e) {} + var dropEffect = "none"; + + if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "copy"; + else if (moveAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "move"; + else if (copyAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "copy"; + + return dropEffect; + } +} + +(function() { + + this.dragWait = function() { + var interval = Date.now() - this.mousedownEvent.time; + if (interval > this.editor.getDragDelay()) + this.startDrag(); + }; + + this.dragWaitEnd = function() { + var target = this.editor.container; + target.draggable = false; + this.startSelect(this.mousedownEvent.getDocumentPosition()); + this.selectEnd(); + }; + + this.dragReadyEnd = function(e) { + this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()); + this.editor.unsetStyle("ace_dragging"); + this.editor.renderer.setCursorStyle(""); + this.dragWaitEnd(); + }; + + this.startDrag = function(){ + this.cancelDrag = false; + var editor = this.editor; + var target = editor.container; + target.draggable = true; + editor.renderer.$cursorLayer.setBlinking(false); + editor.setStyle("ace_dragging"); + var cursorStyle = useragent.isWin ? "default" : "move"; + editor.renderer.setCursorStyle(cursorStyle); + this.setState("dragReady"); + }; + + this.onMouseDrag = function(e) { + var target = this.editor.container; + if (useragent.isIE && this.state == "dragReady") { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + if (distance > 3) + target.dragDrop(); + } + if (this.state === "dragWait") { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + if (distance > 0) { + target.draggable = false; + this.startSelect(this.mousedownEvent.getDocumentPosition()); + } + } + }; + + this.onMouseDown = function(e) { + if (!this.$dragEnabled) + return; + this.mousedownEvent = e; + var editor = this.editor; + + var inSelection = e.inSelection(); + var button = e.getButton(); + var clickCount = e.domEvent.detail || 1; + if (clickCount === 1 && button === 0 && inSelection) { + if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) + return; + this.mousedownEvent.time = Date.now(); + var eventTarget = e.domEvent.target || e.domEvent.srcElement; + if ("unselectable" in eventTarget) + eventTarget.unselectable = "on"; + if (editor.getDragDelay()) { + if (useragent.isWebKit) { + this.cancelDrag = true; + var mouseTarget = editor.container; + mouseTarget.draggable = true; + } + this.setState("dragWait"); + } else { + this.startDrag(); + } + this.captureMouse(e, this.onMouseDrag.bind(this)); + e.defaultPrevented = true; + } + }; + +}).call(DragdropHandler.prototype); + + +function calcDistance(ax, ay, bx, by) { + return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); +} + +exports.DragdropHandler = DragdropHandler; + +}); + +ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { +"use strict"; +var dom = acequire("./dom"); + +exports.get = function (url, callback) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + callback(xhr.responseText); + } + }; + xhr.send(null); +}; + +exports.loadScript = function(path, callback) { + var head = dom.getDocumentHead(); + var s = document.createElement('script'); + + s.src = path; + head.appendChild(s); + + s.onload = s.onreadystatechange = function(_, isAbort) { + if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { + s = s.onload = s.onreadystatechange = null; + if (!isAbort) + callback(); + } + }; +}; +exports.qualifyURL = function(url) { + var a = document.createElement('a'); + a.href = url; + return a.href; +} + +}); + +ace.define("ace/lib/event_emitter",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + +var EventEmitter = {}; +var stopPropagation = function() { this.propagationStopped = true; }; +var preventDefault = function() { this.defaultPrevented = true; }; + +EventEmitter._emit = +EventEmitter._dispatchEvent = function(eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + + if (typeof e != "object" || !e) + e = {}; + + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + + listeners = listeners.slice(); + for (var i=0; i 1) + base = parts[parts.length - 2]; + var path = options[component + "Path"]; + if (path == null) { + path = options.basePath; + } else if (sep == "/") { + component = sep = ""; + } + if (path && path.slice(-1) != "/") + path += "/"; + return path + component + sep + base + this.get("suffix"); +}; + +exports.setModuleUrl = function(name, subst) { + return options.$moduleUrls[name] = subst; +}; + +exports.$loading = {}; +exports.loadModule = function(moduleName, onLoad) { + var module, moduleType; + if (Array.isArray(moduleName)) { + moduleType = moduleName[0]; + moduleName = moduleName[1]; + } + + try { + module = acequire(moduleName); + } catch (e) {} + if (module && !exports.$loading[moduleName]) + return onLoad && onLoad(module); + + if (!exports.$loading[moduleName]) + exports.$loading[moduleName] = []; + + exports.$loading[moduleName].push(onLoad); + + if (exports.$loading[moduleName].length > 1) + return; + + var afterLoad = function() { + acequire([moduleName], function(module) { + exports._emit("load.module", {name: moduleName, module: module}); + var listeners = exports.$loading[moduleName]; + exports.$loading[moduleName] = null; + listeners.forEach(function(onLoad) { + onLoad && onLoad(module); + }); + }); + }; + + if (!exports.get("packaged")) + return afterLoad(); + net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); +}; +init(true);function init(packaged) { + + if (!global || !global.document) + return; + + options.packaged = packaged || acequire.packaged || module.packaged || (global.define && define.packaged); + + var scriptOptions = {}; + var scriptUrl = ""; + var currentScript = (document.currentScript || document._currentScript ); // native or polyfill + var currentDocument = currentScript && currentScript.ownerDocument || document; + + var scripts = currentDocument.getElementsByTagName("script"); + for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); + }; + + this.contains = function(row, column) { + return this.compare(row, column) == 0; + }; + this.compareRange = function(range) { + var cmp, + end = range.end, + start = range.start; + + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } else if (cmp == 0) { + return 1; + } else { + return 0; + } + } else if (cmp == -1) { + return -2; + } else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } else if (cmp == 1) { + return 42; + } else { + return 0; + } + } + }; + this.comparePoint = function(p) { + return this.compare(p.row, p.column); + }; + this.containsRange = function(range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + this.intersects = function(range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + this.isEnd = function(row, column) { + return this.end.row == row && this.end.column == column; + }; + this.isStart = function(row, column) { + return this.start.row == row && this.start.column == column; + }; + this.setStart = function(row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } else { + this.start.row = row; + this.start.column = column; + } + }; + this.setEnd = function(row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } else { + this.end.row = row; + this.end.column = column; + } + }; + this.inside = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideStart = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideEnd = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.compare = function(row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + } + } + + if (row < this.start.row) + return -1; + + if (row > this.end.row) + return 1; + + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + + return 0; + }; + this.compareStart = function(row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.compareEnd = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else { + return this.compare(row, column); + } + }; + this.compareInside = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.clipRows = function(firstRow, lastRow) { + if (this.end.row > lastRow) + var end = {row: lastRow + 1, column: 0}; + else if (this.end.row < firstRow) + var end = {row: firstRow, column: 0}; + + if (this.start.row > lastRow) + var start = {row: lastRow + 1, column: 0}; + else if (this.start.row < firstRow) + var start = {row: firstRow, column: 0}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + this.extend = function(row, column) { + var cmp = this.compare(row, column); + + if (cmp == 0) + return this; + else if (cmp == -1) + var start = {row: row, column: column}; + else + var end = {row: row, column: column}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + + this.isEmpty = function() { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + this.isMultiLine = function() { + return (this.start.row !== this.end.row); + }; + this.clone = function() { + return Range.fromPoints(this.start, this.end); + }; + this.collapseRows = function() { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) + else + return new Range(this.start.row, 0, this.end.row, 0) + }; + this.toScreenRange = function(session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + + return new Range( + screenPosStart.row, screenPosStart.column, + screenPosEnd.row, screenPosEnd.column + ); + }; + this.moveBy = function(row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + +}).call(Range.prototype); +Range.fromPoints = function(start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = comparePoints; + +Range.comparePoints = function(p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; + + +exports.Range = Range; +}); + +ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var lang = acequire("./lib/lang"); +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var Range = acequire("./range").Range; +var Selection = function(session) { + this.session = session; + this.doc = session.getDocument(); + + this.clearSelection(); + this.lead = this.selectionLead = this.doc.createAnchor(0, 0); + this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0); + + var self = this; + this.lead.on("change", function(e) { + self._emit("changeCursor"); + if (!self.$isEmpty) + self._emit("changeSelection"); + if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) + self.$desiredColumn = null; + }); + + this.selectionAnchor.on("change", function() { + if (!self.$isEmpty) + self._emit("changeSelection"); + }); +}; + +(function() { + + oop.implement(this, EventEmitter); + this.isEmpty = function() { + return (this.$isEmpty || ( + this.anchor.row == this.lead.row && + this.anchor.column == this.lead.column + )); + }; + this.isMultiLine = function() { + if (this.isEmpty()) { + return false; + } + + return this.getRange().isMultiLine(); + }; + this.getCursor = function() { + return this.lead.getPosition(); + }; + this.setSelectionAnchor = function(row, column) { + this.anchor.setPosition(row, column); + + if (this.$isEmpty) { + this.$isEmpty = false; + this._emit("changeSelection"); + } + }; + this.getSelectionAnchor = function() { + if (this.$isEmpty) + return this.getSelectionLead(); + else + return this.anchor.getPosition(); + }; + this.getSelectionLead = function() { + return this.lead.getPosition(); + }; + this.shiftSelection = function(columns) { + if (this.$isEmpty) { + this.moveCursorTo(this.lead.row, this.lead.column + columns); + return; + } + + var anchor = this.getSelectionAnchor(); + var lead = this.getSelectionLead(); + + var isBackwards = this.isBackwards(); + + if (!isBackwards || anchor.column !== 0) + this.setSelectionAnchor(anchor.row, anchor.column + columns); + + if (isBackwards || lead.column !== 0) { + this.$moveSelection(function() { + this.moveCursorTo(lead.row, lead.column + columns); + }); + } + }; + this.isBackwards = function() { + var anchor = this.anchor; + var lead = this.lead; + return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); + }; + this.getRange = function() { + var anchor = this.anchor; + var lead = this.lead; + + if (this.isEmpty()) + return Range.fromPoints(lead, lead); + + if (this.isBackwards()) { + return Range.fromPoints(lead, anchor); + } + else { + return Range.fromPoints(anchor, lead); + } + }; + this.clearSelection = function() { + if (!this.$isEmpty) { + this.$isEmpty = true; + this._emit("changeSelection"); + } + }; + this.selectAll = function() { + var lastRow = this.doc.getLength() - 1; + this.setSelectionAnchor(0, 0); + this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length); + }; + this.setRange = + this.setSelectionRange = function(range, reverse) { + if (reverse) { + this.setSelectionAnchor(range.end.row, range.end.column); + this.selectTo(range.start.row, range.start.column); + } else { + this.setSelectionAnchor(range.start.row, range.start.column); + this.selectTo(range.end.row, range.end.column); + } + if (this.getRange().isEmpty()) + this.$isEmpty = true; + this.$desiredColumn = null; + }; + + this.$moveSelection = function(mover) { + var lead = this.lead; + if (this.$isEmpty) + this.setSelectionAnchor(lead.row, lead.column); + + mover.call(this); + }; + this.selectTo = function(row, column) { + this.$moveSelection(function() { + this.moveCursorTo(row, column); + }); + }; + this.selectToPosition = function(pos) { + this.$moveSelection(function() { + this.moveCursorToPosition(pos); + }); + }; + this.moveTo = function(row, column) { + this.clearSelection(); + this.moveCursorTo(row, column); + }; + this.moveToPosition = function(pos) { + this.clearSelection(); + this.moveCursorToPosition(pos); + }; + this.selectUp = function() { + this.$moveSelection(this.moveCursorUp); + }; + this.selectDown = function() { + this.$moveSelection(this.moveCursorDown); + }; + this.selectRight = function() { + this.$moveSelection(this.moveCursorRight); + }; + this.selectLeft = function() { + this.$moveSelection(this.moveCursorLeft); + }; + this.selectLineStart = function() { + this.$moveSelection(this.moveCursorLineStart); + }; + this.selectLineEnd = function() { + this.$moveSelection(this.moveCursorLineEnd); + }; + this.selectFileEnd = function() { + this.$moveSelection(this.moveCursorFileEnd); + }; + this.selectFileStart = function() { + this.$moveSelection(this.moveCursorFileStart); + }; + this.selectWordRight = function() { + this.$moveSelection(this.moveCursorWordRight); + }; + this.selectWordLeft = function() { + this.$moveSelection(this.moveCursorWordLeft); + }; + this.getWordRange = function(row, column) { + if (typeof column == "undefined") { + var cursor = row || this.lead; + row = cursor.row; + column = cursor.column; + } + return this.session.getWordRange(row, column); + }; + this.selectWord = function() { + this.setSelectionRange(this.getWordRange()); + }; + this.selectAWord = function() { + var cursor = this.getCursor(); + var range = this.session.getAWordRange(cursor.row, cursor.column); + this.setSelectionRange(range); + }; + + this.getLineRange = function(row, excludeLastChar) { + var rowStart = typeof row == "number" ? row : this.lead.row; + var rowEnd; + + var foldLine = this.session.getFoldLine(rowStart); + if (foldLine) { + rowStart = foldLine.start.row; + rowEnd = foldLine.end.row; + } else { + rowEnd = rowStart; + } + if (excludeLastChar === true) + return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length); + else + return new Range(rowStart, 0, rowEnd + 1, 0); + }; + this.selectLine = function() { + this.setSelectionRange(this.getLineRange()); + }; + this.moveCursorUp = function() { + this.moveCursorBy(-1, 0); + }; + this.moveCursorDown = function() { + this.moveCursorBy(1, 0); + }; + this.moveCursorLeft = function() { + var cursor = this.lead.getPosition(), + fold; + + if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { + this.moveCursorTo(fold.start.row, fold.start.column); + } else if (cursor.column === 0) { + if (cursor.row > 0) { + this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); + } + } + else { + var tabSize = this.session.getTabSize(); + if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize) + this.moveCursorBy(0, -tabSize); + else + this.moveCursorBy(0, -1); + } + }; + this.moveCursorRight = function() { + var cursor = this.lead.getPosition(), + fold; + if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { + this.moveCursorTo(fold.end.row, fold.end.column); + } + else if (this.lead.column == this.doc.getLine(this.lead.row).length) { + if (this.lead.row < this.doc.getLength() - 1) { + this.moveCursorTo(this.lead.row + 1, 0); + } + } + else { + var tabSize = this.session.getTabSize(); + var cursor = this.lead; + if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize) + this.moveCursorBy(0, tabSize); + else + this.moveCursorBy(0, 1); + } + }; + this.moveCursorLineStart = function() { + var row = this.lead.row; + var column = this.lead.column; + var screenRow = this.session.documentToScreenRow(row, column); + var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); + var beforeCursor = this.session.getDisplayLine( + row, null, firstColumnPosition.row, + firstColumnPosition.column + ); + + var leadingSpace = beforeCursor.match(/^\s*/); + if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) + firstColumnPosition.column += leadingSpace[0].length; + this.moveCursorToPosition(firstColumnPosition); + }; + this.moveCursorLineEnd = function() { + var lead = this.lead; + var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); + if (this.lead.column == lineEnd.column) { + var line = this.session.getLine(lineEnd.row); + if (lineEnd.column == line.length) { + var textEnd = line.search(/\s+$/); + if (textEnd > 0) + lineEnd.column = textEnd; + } + } + + this.moveCursorTo(lineEnd.row, lineEnd.column); + }; + this.moveCursorFileEnd = function() { + var row = this.doc.getLength() - 1; + var column = this.doc.getLine(row).length; + this.moveCursorTo(row, column); + }; + this.moveCursorFileStart = function() { + this.moveCursorTo(0, 0); + }; + this.moveCursorLongWordRight = function() { + var row = this.lead.row; + var column = this.lead.column; + var line = this.doc.getLine(row); + var rightOfCursor = line.substring(column); + + var match; + this.session.nonTokenRe.lastIndex = 0; + this.session.tokenRe.lastIndex = 0; + var fold = this.session.getFoldAt(row, column, 1); + if (fold) { + this.moveCursorTo(fold.end.row, fold.end.column); + return; + } + if (match = this.session.nonTokenRe.exec(rightOfCursor)) { + column += this.session.nonTokenRe.lastIndex; + this.session.nonTokenRe.lastIndex = 0; + rightOfCursor = line.substring(column); + } + if (column >= line.length) { + this.moveCursorTo(row, line.length); + this.moveCursorRight(); + if (row < this.doc.getLength() - 1) + this.moveCursorWordRight(); + return; + } + if (match = this.session.tokenRe.exec(rightOfCursor)) { + column += this.session.tokenRe.lastIndex; + this.session.tokenRe.lastIndex = 0; + } + + this.moveCursorTo(row, column); + }; + this.moveCursorLongWordLeft = function() { + var row = this.lead.row; + var column = this.lead.column; + var fold; + if (fold = this.session.getFoldAt(row, column, -1)) { + this.moveCursorTo(fold.start.row, fold.start.column); + return; + } + + var str = this.session.getFoldStringAt(row, column, -1); + if (str == null) { + str = this.doc.getLine(row).substring(0, column); + } + + var leftOfCursor = lang.stringReverse(str); + var match; + this.session.nonTokenRe.lastIndex = 0; + this.session.tokenRe.lastIndex = 0; + if (match = this.session.nonTokenRe.exec(leftOfCursor)) { + column -= this.session.nonTokenRe.lastIndex; + leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); + this.session.nonTokenRe.lastIndex = 0; + } + if (column <= 0) { + this.moveCursorTo(row, 0); + this.moveCursorLeft(); + if (row > 0) + this.moveCursorWordLeft(); + return; + } + if (match = this.session.tokenRe.exec(leftOfCursor)) { + column -= this.session.tokenRe.lastIndex; + this.session.tokenRe.lastIndex = 0; + } + + this.moveCursorTo(row, column); + }; + + this.$shortWordEndIndex = function(rightOfCursor) { + var match, index = 0, ch; + var whitespaceRe = /\s/; + var tokenRe = this.session.tokenRe; + + tokenRe.lastIndex = 0; + if (match = this.session.tokenRe.exec(rightOfCursor)) { + index = this.session.tokenRe.lastIndex; + } else { + while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) + index ++; + + if (index < 1) { + tokenRe.lastIndex = 0; + while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) { + tokenRe.lastIndex = 0; + index ++; + if (whitespaceRe.test(ch)) { + if (index > 2) { + index--; + break; + } else { + while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) + index ++; + if (index > 2) + break; + } + } + } + } + } + tokenRe.lastIndex = 0; + + return index; + }; + + this.moveCursorShortWordRight = function() { + var row = this.lead.row; + var column = this.lead.column; + var line = this.doc.getLine(row); + var rightOfCursor = line.substring(column); + + var fold = this.session.getFoldAt(row, column, 1); + if (fold) + return this.moveCursorTo(fold.end.row, fold.end.column); + + if (column == line.length) { + var l = this.doc.getLength(); + do { + row++; + rightOfCursor = this.doc.getLine(row); + } while (row < l && /^\s*$/.test(rightOfCursor)); + + if (!/^\s+/.test(rightOfCursor)) + rightOfCursor = ""; + column = 0; + } + + var index = this.$shortWordEndIndex(rightOfCursor); + + this.moveCursorTo(row, column + index); + }; + + this.moveCursorShortWordLeft = function() { + var row = this.lead.row; + var column = this.lead.column; + + var fold; + if (fold = this.session.getFoldAt(row, column, -1)) + return this.moveCursorTo(fold.start.row, fold.start.column); + + var line = this.session.getLine(row).substring(0, column); + if (column === 0) { + do { + row--; + line = this.doc.getLine(row); + } while (row > 0 && /^\s*$/.test(line)); + + column = line.length; + if (!/\s+$/.test(line)) + line = ""; + } + + var leftOfCursor = lang.stringReverse(line); + var index = this.$shortWordEndIndex(leftOfCursor); + + return this.moveCursorTo(row, column - index); + }; + + this.moveCursorWordRight = function() { + if (this.session.$selectLongWords) + this.moveCursorLongWordRight(); + else + this.moveCursorShortWordRight(); + }; + + this.moveCursorWordLeft = function() { + if (this.session.$selectLongWords) + this.moveCursorLongWordLeft(); + else + this.moveCursorShortWordLeft(); + }; + this.moveCursorBy = function(rows, chars) { + var screenPos = this.session.documentToScreenPosition( + this.lead.row, + this.lead.column + ); + + if (chars === 0) { + if (this.$desiredColumn) + screenPos.column = this.$desiredColumn; + else + this.$desiredColumn = screenPos.column; + } + + var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column); + + if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { + if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) { + if (docPos.row > 0 || rows > 0) + docPos.row++; + } + } + this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0); + }; + this.moveCursorToPosition = function(position) { + this.moveCursorTo(position.row, position.column); + }; + this.moveCursorTo = function(row, column, keepDesiredColumn) { + var fold = this.session.getFoldAt(row, column, 1); + if (fold) { + row = fold.start.row; + column = fold.start.column; + } + + this.$keepDesiredColumnOnChange = true; + this.lead.setPosition(row, column); + this.$keepDesiredColumnOnChange = false; + + if (!keepDesiredColumn) + this.$desiredColumn = null; + }; + this.moveCursorToScreen = function(row, column, keepDesiredColumn) { + var pos = this.session.screenToDocumentPosition(row, column); + this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); + }; + this.detach = function() { + this.lead.detach(); + this.anchor.detach(); + this.session = this.doc = null; + }; + + this.fromOrientedRange = function(range) { + this.setSelectionRange(range, range.cursor == range.start); + this.$desiredColumn = range.desiredColumn || this.$desiredColumn; + }; + + this.toOrientedRange = function(range) { + var r = this.getRange(); + if (range) { + range.start.column = r.start.column; + range.start.row = r.start.row; + range.end.column = r.end.column; + range.end.row = r.end.row; + } else { + range = r; + } + + range.cursor = this.isBackwards() ? range.start : range.end; + range.desiredColumn = this.$desiredColumn; + return range; + }; + this.getRangeOfMovements = function(func) { + var start = this.getCursor(); + try { + func(this); + var end = this.getCursor(); + return Range.fromPoints(start,end); + } catch(e) { + return Range.fromPoints(start,start); + } finally { + this.moveCursorToPosition(start); + } + }; + + this.toJSON = function() { + if (this.rangeCount) { + var data = this.ranges.map(function(r) { + var r1 = r.clone(); + r1.isBackwards = r.cursor == r.start; + return r1; + }); + } else { + var data = this.getRange(); + data.isBackwards = this.isBackwards(); + } + return data; + }; + + this.fromJSON = function(data) { + if (data.start == undefined) { + if (this.rangeList) { + this.toSingleRange(data[0]); + for (var i = data.length; i--; ) { + var r = Range.fromPoints(data[i].start, data[i].end); + if (data[i].isBackwards) + r.cursor = r.start; + this.addRange(r, true); + } + return; + } else + data = data[0]; + } + if (this.rangeList) + this.toSingleRange(data); + this.setSelectionRange(data, data.isBackwards); + }; + + this.isEqual = function(data) { + if ((data.length || this.rangeCount) && data.length != this.rangeCount) + return false; + if (!data.length || !this.ranges) + return this.getRange().isEqual(data); + + for (var i = this.ranges.length; i--; ) { + if (!this.ranges[i].isEqual(data[i])) + return false; + } + return true; + }; + +}).call(Selection.prototype); + +exports.Selection = Selection; +}); + +ace.define("ace/tokenizer",["require","exports","module","ace/config"], function(acequire, exports, module) { +"use strict"; + +var config = acequire("./config"); +var MAX_TOKEN_COUNT = 2000; +var Tokenizer = function(rules) { + this.states = rules; + + this.regExps = {}; + this.matchMappings = {}; + for (var key in this.states) { + var state = this.states[key]; + var ruleRegExps = []; + var matchTotal = 0; + var mapping = this.matchMappings[key] = {defaultToken: "text"}; + var flag = "g"; + + var splitterRurles = []; + for (var i = 0; i < state.length; i++) { + var rule = state[i]; + if (rule.defaultToken) + mapping.defaultToken = rule.defaultToken; + if (rule.caseInsensitive) + flag = "gi"; + if (rule.regex == null) + continue; + + if (rule.regex instanceof RegExp) + rule.regex = rule.regex.toString().slice(1, -1); + var adjustedregex = rule.regex; + var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2; + if (Array.isArray(rule.token)) { + if (rule.token.length == 1 || matchcount == 1) { + rule.token = rule.token[0]; + } else if (matchcount - 1 != rule.token.length) { + this.reportError("number of classes and regexp groups doesn't match", { + rule: rule, + groupCount: matchcount - 1 + }); + rule.token = rule.token[0]; + } else { + rule.tokenArray = rule.token; + rule.token = null; + rule.onMatch = this.$arrayTokens; + } + } else if (typeof rule.token == "function" && !rule.onMatch) { + if (matchcount > 1) + rule.onMatch = this.$applyToken; + else + rule.onMatch = rule.token; + } + + if (matchcount > 1) { + if (/\\\d/.test(rule.regex)) { + adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) { + return "\\" + (parseInt(digit, 10) + matchTotal + 1); + }); + } else { + matchcount = 1; + adjustedregex = this.removeCapturingGroups(rule.regex); + } + if (!rule.splitRegex && typeof rule.token != "string") + splitterRurles.push(rule); // flag will be known only at the very end + } + + mapping[matchTotal] = i; + matchTotal += matchcount; + + ruleRegExps.push(adjustedregex); + if (!rule.onMatch) + rule.onMatch = null; + } + + if (!ruleRegExps.length) { + mapping[0] = 0; + ruleRegExps.push("$"); + } + + splitterRurles.forEach(function(rule) { + rule.splitRegex = this.createSplitterRegexp(rule.regex, flag); + }, this); + + this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag); + } +}; + +(function() { + this.$setMaxTokenCount = function(m) { + MAX_TOKEN_COUNT = m | 0; + }; + + this.$applyToken = function(str) { + var values = this.splitRegex.exec(str).slice(1); + var types = this.token.apply(this, values); + if (typeof types === "string") + return [{type: types, value: str}]; + + var tokens = []; + for (var i = 0, l = types.length; i < l; i++) { + if (values[i]) + tokens[tokens.length] = { + type: types[i], + value: values[i] + }; + } + return tokens; + }; + + this.$arrayTokens = function(str) { + if (!str) + return []; + var values = this.splitRegex.exec(str); + if (!values) + return "text"; + var tokens = []; + var types = this.tokenArray; + for (var i = 0, l = types.length; i < l; i++) { + if (values[i + 1]) + tokens[tokens.length] = { + type: types[i], + value: values[i + 1] + }; + } + return tokens; + }; + + this.removeCapturingGroups = function(src) { + var r = src.replace( + /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, + function(x, y) {return y ? "(?:" : x;} + ); + return r; + }; + + this.createSplitterRegexp = function(src, flag) { + if (src.indexOf("(?=") != -1) { + var stack = 0; + var inChClass = false; + var lastCapture = {}; + src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function( + m, esc, parenOpen, parenClose, square, index + ) { + if (inChClass) { + inChClass = square != "]"; + } else if (square) { + inChClass = true; + } else if (parenClose) { + if (stack == lastCapture.stack) { + lastCapture.end = index+1; + lastCapture.stack = -1; + } + stack--; + } else if (parenOpen) { + stack++; + if (parenOpen.length != 1) { + lastCapture.stack = stack + lastCapture.start = index; + } + } + return m; + }); + + if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end))) + src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end); + } + if (src.charAt(0) != "^") src = "^" + src; + if (src.charAt(src.length - 1) != "$") src += "$"; + + return new RegExp(src, (flag||"").replace("g", "")); + }; + this.getLineTokens = function(line, startState) { + if (startState && typeof startState != "string") { + var stack = startState.slice(0); + startState = stack[0]; + if (startState === "#tmp") { + stack.shift() + startState = stack.shift() + } + } else + var stack = []; + + var currentState = startState || "start"; + var state = this.states[currentState]; + if (!state) { + currentState = "start"; + state = this.states[currentState]; + } + var mapping = this.matchMappings[currentState]; + var re = this.regExps[currentState]; + re.lastIndex = 0; + + var match, tokens = []; + var lastIndex = 0; + var matchAttempts = 0; + + var token = {type: null, value: ""}; + + while (match = re.exec(line)) { + var type = mapping.defaultToken; + var rule = null; + var value = match[0]; + var index = re.lastIndex; + + if (index - value.length > lastIndex) { + var skipped = line.substring(lastIndex, index - value.length); + if (token.type == type) { + token.value += skipped; + } else { + if (token.type) + tokens.push(token); + token = {type: type, value: skipped}; + } + } + + for (var i = 0; i < match.length-2; i++) { + if (match[i + 1] === undefined) + continue; + + rule = state[mapping[i]]; + + if (rule.onMatch) + type = rule.onMatch(value, currentState, stack); + else + type = rule.token; + + if (rule.next) { + if (typeof rule.next == "string") { + currentState = rule.next; + } else { + currentState = rule.next(currentState, stack); + } + + state = this.states[currentState]; + if (!state) { + this.reportError("state doesn't exist", currentState); + currentState = "start"; + state = this.states[currentState]; + } + mapping = this.matchMappings[currentState]; + lastIndex = index; + re = this.regExps[currentState]; + re.lastIndex = index; + } + break; + } + + if (value) { + if (typeof type === "string") { + if ((!rule || rule.merge !== false) && token.type === type) { + token.value += value; + } else { + if (token.type) + tokens.push(token); + token = {type: type, value: value}; + } + } else if (type) { + if (token.type) + tokens.push(token); + token = {type: null, value: ""}; + for (var i = 0; i < type.length; i++) + tokens.push(type[i]); + } + } + + if (lastIndex == line.length) + break; + + lastIndex = index; + + if (matchAttempts++ > MAX_TOKEN_COUNT) { + if (matchAttempts > 2 * line.length) { + this.reportError("infinite loop with in ace tokenizer", { + startState: startState, + line: line + }); + } + while (lastIndex < line.length) { + if (token.type) + tokens.push(token); + token = { + value: line.substring(lastIndex, lastIndex += 2000), + type: "overflow" + }; + } + currentState = "start"; + stack = []; + break; + } + } + + if (token.type) + tokens.push(token); + + if (stack.length > 1) { + if (stack[0] !== currentState) + stack.unshift("#tmp", currentState); + } + return { + tokens : tokens, + state : stack.length ? stack : currentState + }; + }; + + this.reportError = config.reportError; + +}).call(Tokenizer.prototype); + +exports.Tokenizer = Tokenizer; +}); + +ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(acequire, exports, module) { +"use strict"; + +var lang = acequire("../lib/lang"); + +var TextHighlightRules = function() { + + this.$rules = { + "start" : [{ + token : "empty_line", + regex : '^$' + }, { + defaultToken : "text" + }] + }; +}; + +(function() { + + this.addRules = function(rules, prefix) { + if (!prefix) { + for (var key in rules) + this.$rules[key] = rules[key]; + return; + } + for (var key in rules) { + var state = rules[key]; + for (var i = 0; i < state.length; i++) { + var rule = state[i]; + if (rule.next || rule.onMatch) { + if (typeof rule.next == "string") { + if (rule.next.indexOf(prefix) !== 0) + rule.next = prefix + rule.next; + } + if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) + rule.nextState = prefix + rule.nextState; + } + } + this.$rules[prefix + key] = state; + } + }; + + this.getRules = function() { + return this.$rules; + }; + + this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) { + var embedRules = typeof HighlightRules == "function" + ? new HighlightRules().getRules() + : HighlightRules; + if (states) { + for (var i = 0; i < states.length; i++) + states[i] = prefix + states[i]; + } else { + states = []; + for (var key in embedRules) + states.push(prefix + key); + } + + this.addRules(embedRules, prefix); + + if (escapeRules) { + var addRules = Array.prototype[append ? "push" : "unshift"]; + for (var i = 0; i < states.length; i++) + addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules)); + } + + if (!this.$embeds) + this.$embeds = []; + this.$embeds.push(prefix); + }; + + this.getEmbeds = function() { + return this.$embeds; + }; + + var pushState = function(currentState, stack) { + if (currentState != "start" || stack.length) + stack.unshift(this.nextState, currentState); + return this.nextState; + }; + var popState = function(currentState, stack) { + stack.shift(); + return stack.shift() || "start"; + }; + + this.normalizeRules = function() { + var id = 0; + var rules = this.$rules; + function processState(key) { + var state = rules[key]; + state.processed = true; + for (var i = 0; i < state.length; i++) { + var rule = state[i]; + if (!rule.regex && rule.start) { + rule.regex = rule.start; + if (!rule.next) + rule.next = []; + rule.next.push({ + defaultToken: rule.token + }, { + token: rule.token + ".end", + regex: rule.end || rule.start, + next: "pop" + }); + rule.token = rule.token + ".start"; + rule.push = true; + } + var next = rule.next || rule.push; + if (next && Array.isArray(next)) { + var stateName = rule.stateName; + if (!stateName) { + stateName = rule.token; + if (typeof stateName != "string") + stateName = stateName[0] || ""; + if (rules[stateName]) + stateName += id++; + } + rules[stateName] = next; + rule.next = stateName; + processState(stateName); + } else if (next == "pop") { + rule.next = popState; + } + + if (rule.push) { + rule.nextState = rule.next || rule.push; + rule.next = pushState; + delete rule.push; + } + + if (rule.rules) { + for (var r in rule.rules) { + if (rules[r]) { + if (rules[r].push) + rules[r].push.apply(rules[r], rule.rules[r]); + } else { + rules[r] = rule.rules[r]; + } + } + } + if (rule.include || typeof rule == "string") { + var includeName = rule.include || rule; + var toInsert = rules[includeName]; + } else if (Array.isArray(rule)) + toInsert = rule; + + if (toInsert) { + var args = [i, 1].concat(toInsert); + if (rule.noEscape) + args = args.filter(function(x) {return !x.next;}); + state.splice.apply(state, args); + i--; + toInsert = null; + } + + if (rule.keywordMap) { + rule.token = this.createKeywordMapper( + rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive + ); + delete rule.defaultToken; + } + } + } + Object.keys(rules).forEach(processState, this); + }; + + this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) { + var keywords = Object.create(null); + Object.keys(map).forEach(function(className) { + var a = map[className]; + if (ignoreCase) + a = a.toLowerCase(); + var list = a.split(splitChar || "|"); + for (var i = list.length; i--; ) + keywords[list[i]] = className; + }); + if (Object.getPrototypeOf(keywords)) { + keywords.__proto__ = null; + } + this.$keywordList = Object.keys(keywords); + map = null; + return ignoreCase + ? function(value) {return keywords[value.toLowerCase()] || defaultToken } + : function(value) {return keywords[value] || defaultToken }; + }; + + this.getKeywords = function() { + return this.$keywords; + }; + +}).call(TextHighlightRules.prototype); + +exports.TextHighlightRules = TextHighlightRules; +}); + +ace.define("ace/mode/behaviour",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + +var Behaviour = function() { + this.$behaviours = {}; +}; + +(function () { + + this.add = function (name, action, callback) { + switch (undefined) { + case this.$behaviours: + this.$behaviours = {}; + case this.$behaviours[name]: + this.$behaviours[name] = {}; + } + this.$behaviours[name][action] = callback; + } + + this.addBehaviours = function (behaviours) { + for (var key in behaviours) { + for (var action in behaviours[key]) { + this.add(key, action, behaviours[key][action]); + } + } + } + + this.remove = function (name) { + if (this.$behaviours && this.$behaviours[name]) { + delete this.$behaviours[name]; + } + } + + this.inherit = function (mode, filter) { + if (typeof mode === "function") { + var behaviours = new mode().getBehaviours(filter); + } else { + var behaviours = mode.getBehaviours(filter); + } + this.addBehaviours(behaviours); + } + + this.getBehaviours = function (filter) { + if (!filter) { + return this.$behaviours; + } else { + var ret = {} + for (var i = 0; i < filter.length; i++) { + if (this.$behaviours[filter[i]]) { + ret[filter[i]] = this.$behaviours[filter[i]]; + } + } + return ret; + } + } + +}).call(Behaviour.prototype); + +exports.Behaviour = Behaviour; +}); + +ace.define("ace/unicode",["require","exports","module"], function(acequire, exports, module) { +"use strict"; +exports.packages = {}; + +addUnicodePackage({ + L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", + Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", + Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", + Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", + Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", + Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", + M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", + Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", + Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", + Me: "0488048906DE20DD-20E020E2-20E4A670-A672", + N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", + Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", + Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", + No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", + P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", + Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", + Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", + Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", + Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", + Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", + Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", + Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", + S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", + Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", + Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", + Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", + So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", + Z: "002000A01680180E2000-200A20282029202F205F3000", + Zs: "002000A01680180E2000-200A202F205F3000", + Zl: "2028", + Zp: "2029", + C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", + Cc: "0000-001F007F-009F", + Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", + Co: "E000-F8FF", + Cs: "D800-DFFF", + Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" +}); + +function addUnicodePackage (pack) { + var codePoint = /\w{4}/g; + for (var name in pack) + exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); +} + +}); + +ace.define("ace/token_iterator",["require","exports","module"], function(acequire, exports, module) { +"use strict"; +var TokenIterator = function(session, initialRow, initialColumn) { + this.$session = session; + this.$row = initialRow; + this.$rowTokens = session.getTokens(initialRow); + + var token = session.getTokenAt(initialRow, initialColumn); + this.$tokenIndex = token ? token.index : -1; +}; + +(function() { + this.stepBackward = function() { + this.$tokenIndex -= 1; + + while (this.$tokenIndex < 0) { + this.$row -= 1; + if (this.$row < 0) { + this.$row = 0; + return null; + } + + this.$rowTokens = this.$session.getTokens(this.$row); + this.$tokenIndex = this.$rowTokens.length - 1; + } + + return this.$rowTokens[this.$tokenIndex]; + }; + this.stepForward = function() { + this.$tokenIndex += 1; + var rowCount; + while (this.$tokenIndex >= this.$rowTokens.length) { + this.$row += 1; + if (!rowCount) + rowCount = this.$session.getLength(); + if (this.$row >= rowCount) { + this.$row = rowCount - 1; + return null; + } + + this.$rowTokens = this.$session.getTokens(this.$row); + this.$tokenIndex = 0; + } + + return this.$rowTokens[this.$tokenIndex]; + }; + this.getCurrentToken = function () { + return this.$rowTokens[this.$tokenIndex]; + }; + this.getCurrentTokenRow = function () { + return this.$row; + }; + this.getCurrentTokenColumn = function() { + var rowTokens = this.$rowTokens; + var tokenIndex = this.$tokenIndex; + var column = rowTokens[tokenIndex].start; + if (column !== undefined) + return column; + + column = 0; + while (tokenIndex > 0) { + tokenIndex -= 1; + column += rowTokens[tokenIndex].value.length; + } + + return column; + }; + this.getCurrentTokenPosition = function() { + return {row: this.$row, column: this.getCurrentTokenColumn()}; + }; + +}).call(TokenIterator.prototype); + +exports.TokenIterator = TokenIterator; +}); + +ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(acequire, exports, module) { +"use strict"; + +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var Behaviour = acequire("./behaviour").Behaviour; +var unicode = acequire("../unicode"); +var lang = acequire("../lib/lang"); +var TokenIterator = acequire("../token_iterator").TokenIterator; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = TextHighlightRules; + this.$behaviour = new Behaviour(); +}; + +(function() { + + this.tokenRe = new RegExp("^[" + + unicode.packages.L + + unicode.packages.Mn + unicode.packages.Mc + + unicode.packages.Nd + + unicode.packages.Pc + "\\$_]+", "g" + ); + + this.nonTokenRe = new RegExp("^(?:[^" + + unicode.packages.L + + unicode.packages.Mn + unicode.packages.Mc + + unicode.packages.Nd + + unicode.packages.Pc + "\\$_]|\\s])+", "g" + ); + + this.getTokenizer = function() { + if (!this.$tokenizer) { + this.$highlightRules = this.$highlightRules || new this.HighlightRules(); + this.$tokenizer = new Tokenizer(this.$highlightRules.getRules()); + } + return this.$tokenizer; + }; + + this.lineCommentStart = ""; + this.blockComment = ""; + + this.toggleCommentLines = function(state, session, startRow, endRow) { + var doc = session.doc; + + var ignoreBlankLines = true; + var shouldRemove = true; + var minIndent = Infinity; + var tabSize = session.getTabSize(); + var insertAtTabStop = false; + + if (!this.lineCommentStart) { + if (!this.blockComment) + return false; + var lineCommentStart = this.blockComment.start; + var lineCommentEnd = this.blockComment.end; + var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")"); + var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$"); + + var comment = function(line, i) { + if (testRemove(line, i)) + return; + if (!ignoreBlankLines || /\S/.test(line)) { + doc.insertInLine({row: i, column: line.length}, lineCommentEnd); + doc.insertInLine({row: i, column: minIndent}, lineCommentStart); + } + }; + + var uncomment = function(line, i) { + var m; + if (m = line.match(regexpEnd)) + doc.removeInLine(i, line.length - m[0].length, line.length); + if (m = line.match(regexpStart)) + doc.removeInLine(i, m[1].length, m[0].length); + }; + + var testRemove = function(line, row) { + if (regexpStart.test(line)) + return true; + var tokens = session.getTokens(row); + for (var i = 0; i < tokens.length; i++) { + if (tokens[i].type === "comment") + return true; + } + }; + } else { + if (Array.isArray(this.lineCommentStart)) { + var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|"); + var lineCommentStart = this.lineCommentStart[0]; + } else { + var regexpStart = lang.escapeRegExp(this.lineCommentStart); + var lineCommentStart = this.lineCommentStart; + } + regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?"); + + insertAtTabStop = session.getUseSoftTabs(); + + var uncomment = function(line, i) { + var m = line.match(regexpStart); + if (!m) return; + var start = m[1].length, end = m[0].length; + if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ") + end--; + doc.removeInLine(i, start, end); + }; + var commentWithSpace = lineCommentStart + " "; + var comment = function(line, i) { + if (!ignoreBlankLines || /\S/.test(line)) { + if (shouldInsertSpace(line, minIndent, minIndent)) + doc.insertInLine({row: i, column: minIndent}, commentWithSpace); + else + doc.insertInLine({row: i, column: minIndent}, lineCommentStart); + } + }; + var testRemove = function(line, i) { + return regexpStart.test(line); + }; + + var shouldInsertSpace = function(line, before, after) { + var spaces = 0; + while (before-- && line.charAt(before) == " ") + spaces++; + if (spaces % tabSize != 0) + return false; + var spaces = 0; + while (line.charAt(after++) == " ") + spaces++; + if (tabSize > 2) + return spaces % tabSize != tabSize - 1; + else + return spaces % tabSize == 0; + return true; + }; + } + + function iter(fun) { + for (var i = startRow; i <= endRow; i++) + fun(doc.getLine(i), i); + } + + + var minEmptyLength = Infinity; + iter(function(line, i) { + var indent = line.search(/\S/); + if (indent !== -1) { + if (indent < minIndent) + minIndent = indent; + if (shouldRemove && !testRemove(line, i)) + shouldRemove = false; + } else if (minEmptyLength > line.length) { + minEmptyLength = line.length; + } + }); + + if (minIndent == Infinity) { + minIndent = minEmptyLength; + ignoreBlankLines = false; + shouldRemove = false; + } + + if (insertAtTabStop && minIndent % tabSize != 0) + minIndent = Math.floor(minIndent / tabSize) * tabSize; + + iter(shouldRemove ? uncomment : comment); + }; + + this.toggleBlockComment = function(state, session, range, cursor) { + var comment = this.blockComment; + if (!comment) + return; + if (!comment.start && comment[0]) + comment = comment[0]; + + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + var sel = session.selection; + var initialRange = session.selection.toOrientedRange(); + var startRow, colDiff; + + if (token && /comment/.test(token.type)) { + var startRange, endRange; + while (token && /comment/.test(token.type)) { + var i = token.value.indexOf(comment.start); + if (i != -1) { + var row = iterator.getCurrentTokenRow(); + var column = iterator.getCurrentTokenColumn() + i; + startRange = new Range(row, column, row, column + comment.start.length); + break; + } + token = iterator.stepBackward(); + } + + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + while (token && /comment/.test(token.type)) { + var i = token.value.indexOf(comment.end); + if (i != -1) { + var row = iterator.getCurrentTokenRow(); + var column = iterator.getCurrentTokenColumn() + i; + endRange = new Range(row, column, row, column + comment.end.length); + break; + } + token = iterator.stepForward(); + } + if (endRange) + session.remove(endRange); + if (startRange) { + session.remove(startRange); + startRow = startRange.start.row; + colDiff = -comment.start.length; + } + } else { + colDiff = comment.start.length; + startRow = range.start.row; + session.insert(range.end, comment.end); + session.insert(range.start, comment.start); + } + if (initialRange.start.row == startRow) + initialRange.start.column += colDiff; + if (initialRange.end.row == startRow) + initialRange.end.column += colDiff; + session.selection.fromOrientedRange(initialRange); + }; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.autoOutdent = function(state, doc, row) { + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + + this.createWorker = function(session) { + return null; + }; + + this.createModeDelegates = function (mapping) { + this.$embeds = []; + this.$modes = {}; + for (var i in mapping) { + if (mapping[i]) { + this.$embeds.push(i); + this.$modes[i] = new mapping[i](); + } + } + + var delegations = ["toggleBlockComment", "toggleCommentLines", "getNextLineIndent", + "checkOutdent", "autoOutdent", "transformAction", "getCompletions"]; + + for (var i = 0; i < delegations.length; i++) { + (function(scope) { + var functionName = delegations[i]; + var defaultHandler = scope[functionName]; + scope[delegations[i]] = function() { + return this.$delegator(functionName, arguments, defaultHandler); + }; + }(this)); + } + }; + + this.$delegator = function(method, args, defaultHandler) { + var state = args[0]; + if (typeof state != "string") + state = state[0]; + for (var i = 0; i < this.$embeds.length; i++) { + if (!this.$modes[this.$embeds[i]]) continue; + + var split = state.split(this.$embeds[i]); + if (!split[0] && split[1]) { + args[0] = split[1]; + var mode = this.$modes[this.$embeds[i]]; + return mode[method].apply(mode, args); + } + } + var ret = defaultHandler.apply(this, args); + return defaultHandler ? ret : undefined; + }; + + this.transformAction = function(state, action, editor, session, param) { + if (this.$behaviour) { + var behaviours = this.$behaviour.getBehaviours(); + for (var key in behaviours) { + if (behaviours[key][action]) { + var ret = behaviours[key][action].apply(this, arguments); + if (ret) { + return ret; + } + } + } + } + }; + + this.getKeywords = function(append) { + if (!this.completionKeywords) { + var rules = this.$tokenizer.rules; + var completionKeywords = []; + for (var rule in rules) { + var ruleItr = rules[rule]; + for (var r = 0, l = ruleItr.length; r < l; r++) { + if (typeof ruleItr[r].token === "string") { + if (/keyword|support|storage/.test(ruleItr[r].token)) + completionKeywords.push(ruleItr[r].regex); + } + else if (typeof ruleItr[r].token === "object") { + for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { + if (/keyword|support|storage/.test(ruleItr[r].token[a])) { + var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a]; + completionKeywords.push(rule.substr(1, rule.length - 2)); + } + } + } + } + } + this.completionKeywords = completionKeywords; + } + if (!append) + return this.$keywordList; + return completionKeywords.concat(this.$keywordList || []); + }; + + this.$createKeywordList = function() { + if (!this.$highlightRules) + this.getTokenizer(); + return this.$keywordList = this.$highlightRules.$keywordList || []; + }; + + this.getCompletions = function(state, session, pos, prefix) { + var keywords = this.$keywordList || this.$createKeywordList(); + return keywords.map(function(word) { + return { + name: word, + value: word, + score: 0, + meta: "keyword" + }; + }); + }; + + this.$id = "ace/mode/text"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define("ace/apply_delta",["require","exports","module"], function(acequire, exports, module) { +"use strict"; + +function throwDeltaError(delta, errorText){ + console.log("Invalid Delta:", delta); + throw "Invalid Delta: " + errorText; +} + +function positionInDocument(docLines, position) { + return position.row >= 0 && position.row < docLines.length && + position.column >= 0 && position.column <= docLines[position.row].length; +} + +function validateDelta(docLines, delta) { + if (delta.action != "insert" && delta.action != "remove") + throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); + if (!(delta.lines instanceof Array)) + throwDeltaError(delta, "delta.lines must be an Array"); + if (!delta.start || !delta.end) + throwDeltaError(delta, "delta.start/end must be an present"); + var start = delta.start; + if (!positionInDocument(docLines, delta.start)) + throwDeltaError(delta, "delta.start must be contained in document"); + var end = delta.end; + if (delta.action == "remove" && !positionInDocument(docLines, end)) + throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); + var numRangeRows = end.row - start.row; + var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); + if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) + throwDeltaError(delta, "delta.range must match delta lines"); +} + +exports.applyDelta = function(docLines, delta, doNotValidate) { + + var row = delta.start.row; + var startColumn = delta.start.column; + var line = docLines[row] || ""; + switch (delta.action) { + case "insert": + var lines = delta.lines; + if (lines.length === 1) { + docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); + } else { + var args = [row, 1].concat(delta.lines); + docLines.splice.apply(docLines, args); + docLines[row] = line.substring(0, startColumn) + docLines[row]; + docLines[row + delta.lines.length - 1] += line.substring(startColumn); + } + break; + case "remove": + var endColumn = delta.end.column; + var endRow = delta.end.row; + if (row === endRow) { + docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); + } else { + docLines.splice( + row, endRow - row + 1, + line.substring(0, startColumn) + docLines[endRow].substring(endColumn) + ); + } + break; + } +} +}); + +ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; + +var Anchor = exports.Anchor = function(doc, row, column) { + this.$onChange = this.onChange.bind(this); + this.attach(doc); + + if (typeof column == "undefined") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); +}; + +(function() { + + oop.implement(this, EventEmitter); + this.getPosition = function() { + return this.$clipPositionToDocument(this.row, this.column); + }; + this.getDocument = function() { + return this.document; + }; + this.$insertRight = false; + this.onChange = function(delta) { + if (delta.start.row == delta.end.row && delta.start.row != this.row) + return; + + if (delta.start.row > this.row) + return; + + var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); + this.setPosition(point.row, point.column, true); + }; + + function $pointsInOrder(point1, point2, equalPointsInOrder) { + var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; + return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); + } + + function $getTransformedPoint(delta, point, moveIfEqual) { + var deltaIsInsert = delta.action == "insert"; + var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); + var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); + var deltaStart = delta.start; + var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. + if ($pointsInOrder(point, deltaStart, moveIfEqual)) { + return { + row: point.row, + column: point.column + }; + } + if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { + return { + row: point.row + deltaRowShift, + column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) + }; + } + + return { + row: deltaStart.row, + column: deltaStart.column + }; + } + this.setPosition = function(row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } else { + pos = this.$clipPositionToDocument(row, column); + } + + if (this.row == pos.row && this.column == pos.column) + return; + + var old = { + row: this.row, + column: this.column + }; + + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + this.detach = function() { + this.document.removeEventListener("change", this.$onChange); + }; + this.attach = function(doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + this.$clipPositionToDocument = function(row, column) { + var pos = {}; + + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + + if (column < 0) + pos.column = 0; + + return pos; + }; + +}).call(Anchor.prototype); + +}); + +ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var applyDelta = acequire("./apply_delta").applyDelta; +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var Range = acequire("./range").Range; +var Anchor = acequire("./anchor").Anchor; + +var Document = function(textOrLines) { + this.$lines = [""]; + if (textOrLines.length === 0) { + this.$lines = [""]; + } else if (Array.isArray(textOrLines)) { + this.insertMergedLines({row: 0, column: 0}, textOrLines); + } else { + this.insert({row: 0, column:0}, textOrLines); + } +}; + +(function() { + + oop.implement(this, EventEmitter); + this.setValue = function(text) { + var len = this.getLength() - 1; + this.remove(new Range(0, 0, len, this.getLine(len).length)); + this.insert({row: 0, column: 0}, text); + }; + this.getValue = function() { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + this.createAnchor = function(row, column) { + return new Anchor(this, row, column); + }; + if ("aaa".split(/a/).length === 0) { + this.$split = function(text) { + return text.replace(/\r\n|\r/g, "\n").split("\n"); + }; + } else { + this.$split = function(text) { + return text.split(/\r\n|\r|\n/); + }; + } + + + this.$detectNewLine = function(text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + this.getNewLineCharacter = function() { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + + this.$autoNewLine = ""; + this.$newLineMode = "auto"; + this.setNewLineMode = function(newLineMode) { + if (this.$newLineMode === newLineMode) + return; + + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + this.getNewLineMode = function() { + return this.$newLineMode; + }; + this.isNewLine = function(text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + this.getLine = function(row) { + return this.$lines[row] || ""; + }; + this.getLines = function(firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + this.getAllLines = function() { + return this.getLines(0, this.getLength()); + }; + this.getLength = function() { + return this.$lines.length; + }; + this.getTextRange = function(range) { + return this.getLinesForRange(range).join(this.getNewLineCharacter()); + }; + this.getLinesForRange = function(range) { + var lines; + if (range.start.row === range.end.row) { + lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; + } else { + lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + } + return lines; + }; + this.insertLines = function(row, lines) { + console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); + return this.insertFullLines(row, lines); + }; + this.removeLines = function(firstRow, lastRow) { + console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); + return this.removeFullLines(firstRow, lastRow); + }; + this.insertNewLine = function(position) { + console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead."); + return this.insertMergedLines(position, ["", ""]); + }; + this.insert = function(position, text) { + if (this.getLength() <= 1) + this.$detectNewLine(text); + + return this.insertMergedLines(position, this.$split(text)); + }; + this.insertInLine = function(position, text) { + var start = this.clippedPos(position.row, position.column); + var end = this.pos(position.row, position.column + text.length); + + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: [text] + }, true); + + return this.clonePos(end); + }; + + this.clippedPos = function(row, column) { + var length = this.getLength(); + if (row === undefined) { + row = length; + } else if (row < 0) { + row = 0; + } else if (row >= length) { + row = length - 1; + column = undefined; + } + var line = this.getLine(row); + if (column == undefined) + column = line.length; + column = Math.min(Math.max(column, 0), line.length); + return {row: row, column: column}; + }; + + this.clonePos = function(pos) { + return {row: pos.row, column: pos.column}; + }; + + this.pos = function(row, column) { + return {row: row, column: column}; + }; + + this.$clipPosition = function(position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length - 1).length; + } else { + position.row = Math.max(0, position.row); + position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); + } + return position; + }; + this.insertFullLines = function(row, lines) { + row = Math.min(Math.max(row, 0), this.getLength()); + var column = 0; + if (row < this.getLength()) { + lines = lines.concat([""]); + column = 0; + } else { + lines = [""].concat(lines); + row--; + column = this.$lines[row].length; + } + this.insertMergedLines({row: row, column: column}, lines); + }; + this.insertMergedLines = function(position, lines) { + var start = this.clippedPos(position.row, position.column); + var end = { + row: start.row + lines.length - 1, + column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length + }; + + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: lines + }); + + return this.clonePos(end); + }; + this.remove = function(range) { + var start = this.clippedPos(range.start.row, range.start.column); + var end = this.clippedPos(range.end.row, range.end.column); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({start: start, end: end}) + }); + return this.clonePos(start); + }; + this.removeInLine = function(row, startColumn, endColumn) { + var start = this.clippedPos(row, startColumn); + var end = this.clippedPos(row, endColumn); + + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({start: start, end: end}) + }, true); + + return this.clonePos(start); + }; + this.removeFullLines = function(firstRow, lastRow) { + firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); + lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1); + var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; + var deleteLastNewLine = lastRow < this.getLength() - 1; + var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow ); + var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 ); + var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow ); + var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); + var range = new Range(startRow, startCol, endRow, endCol); + var deletedLines = this.$lines.slice(firstRow, lastRow + 1); + + this.applyDelta({ + start: range.start, + end: range.end, + action: "remove", + lines: this.getLinesForRange(range) + }); + return deletedLines; + }; + this.removeNewLine = function(row) { + if (row < this.getLength() - 1 && row >= 0) { + this.applyDelta({ + start: this.pos(row, this.getLine(row).length), + end: this.pos(row + 1, 0), + action: "remove", + lines: ["", ""] + }); + } + }; + this.replace = function(range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length === 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + + this.remove(range); + var end; + if (text) { + end = this.insert(range.start, text); + } + else { + end = range.start; + } + + return end; + }; + this.applyDeltas = function(deltas) { + for (var i=0; i=0; i--) { + this.revertDelta(deltas[i]); + } + }; + this.applyDelta = function(delta, doNotValidate) { + var isInsert = delta.action == "insert"; + if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] + : !Range.comparePoints(delta.start, delta.end)) { + return; + } + + if (isInsert && delta.lines.length > 20000) + this.$splitAndapplyLargeDelta(delta, 20000); + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + }; + + this.$splitAndapplyLargeDelta = function(delta, MAX) { + var lines = delta.lines; + var l = lines.length; + var row = delta.start.row; + var column = delta.start.column; + var from = 0, to = 0; + do { + from = to; + to += MAX - 1; + var chunk = lines.slice(from, to); + if (to > l) { + delta.lines = chunk; + delta.start.row = row + from; + delta.start.column = column; + break; + } + chunk.push(""); + this.applyDelta({ + start: this.pos(row + from, column), + end: this.pos(row + to, column = 0), + action: delta.action, + lines: chunk + }, true); + } while(true); + }; + this.revertDelta = function(delta) { + this.applyDelta({ + start: this.clonePos(delta.start), + end: this.clonePos(delta.end), + action: (delta.action == "insert" ? "remove" : "insert"), + lines: delta.lines.slice() + }); + }; + this.indexToPosition = function(index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return {row: i, column: index + lines[i].length + newlineLength}; + } + return {row: l-1, column: lines[l-1].length}; + }; + this.positionToIndex = function(pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + + return index + pos.column; + }; + +}).call(Document.prototype); + +exports.Document = Document; +}); + +ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; + +var BackgroundTokenizer = function(tokenizer, editor) { + this.running = false; + this.lines = []; + this.states = []; + this.currentLine = 0; + this.tokenizer = tokenizer; + + var self = this; + + this.$worker = function() { + if (!self.running) { return; } + + var workerStart = new Date(); + var currentLine = self.currentLine; + var endLine = -1; + var doc = self.doc; + + var startLine = currentLine; + while (self.lines[currentLine]) + currentLine++; + + var len = doc.getLength(); + var processedLines = 0; + self.running = false; + while (currentLine < len) { + self.$tokenizeRow(currentLine); + endLine = currentLine; + do { + currentLine++; + } while (self.lines[currentLine]); + processedLines ++; + if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { + self.running = setTimeout(self.$worker, 20); + break; + } + } + self.currentLine = currentLine; + + if (startLine <= endLine) + self.fireUpdateEvent(startLine, endLine); + }; +}; + +(function(){ + + oop.implement(this, EventEmitter); + this.setTokenizer = function(tokenizer) { + this.tokenizer = tokenizer; + this.lines = []; + this.states = []; + + this.start(0); + }; + this.setDocument = function(doc) { + this.doc = doc; + this.lines = []; + this.states = []; + + this.stop(); + }; + this.fireUpdateEvent = function(firstRow, lastRow) { + var data = { + first: firstRow, + last: lastRow + }; + this._signal("update", {data: data}); + }; + this.start = function(startRow) { + this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength()); + this.lines.splice(this.currentLine, this.lines.length); + this.states.splice(this.currentLine, this.states.length); + + this.stop(); + this.running = setTimeout(this.$worker, 700); + }; + + this.scheduleStart = function() { + if (!this.running) + this.running = setTimeout(this.$worker, 700); + } + + this.$updateOnChange = function(delta) { + var startRow = delta.start.row; + var len = delta.end.row - startRow; + + if (len === 0) { + this.lines[startRow] = null; + } else if (delta.action == "remove") { + this.lines.splice(startRow, len + 1, null); + this.states.splice(startRow, len + 1, null); + } else { + var args = Array(len + 1); + args.unshift(startRow, 1); + this.lines.splice.apply(this.lines, args); + this.states.splice.apply(this.states, args); + } + + this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength()); + + this.stop(); + }; + this.stop = function() { + if (this.running) + clearTimeout(this.running); + this.running = false; + }; + this.getTokens = function(row) { + return this.lines[row] || this.$tokenizeRow(row); + }; + this.getState = function(row) { + if (this.currentLine == row) + this.$tokenizeRow(row); + return this.states[row] || "start"; + }; + + this.$tokenizeRow = function(row) { + var line = this.doc.getLine(row); + var state = this.states[row - 1]; + + var data = this.tokenizer.getLineTokens(line, state, row); + + if (this.states[row] + "" !== data.state + "") { + this.states[row] = data.state; + this.lines[row + 1] = null; + if (this.currentLine > row + 1) + this.currentLine = row + 1; + } else if (this.currentLine == row) { + this.currentLine = row + 1; + } + + return this.lines[row] = data.tokens; + }; + +}).call(BackgroundTokenizer.prototype); + +exports.BackgroundTokenizer = BackgroundTokenizer; +}); + +ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(acequire, exports, module) { +"use strict"; + +var lang = acequire("./lib/lang"); +var oop = acequire("./lib/oop"); +var Range = acequire("./range").Range; + +var SearchHighlight = function(regExp, clazz, type) { + this.setRegexp(regExp); + this.clazz = clazz; + this.type = type || "text"; +}; + +(function() { + this.MAX_RANGES = 500; + + this.setRegexp = function(regExp) { + if (this.regExp+"" == regExp+"") + return; + this.regExp = regExp; + this.cache = []; + }; + + this.update = function(html, markerLayer, session, config) { + if (!this.regExp) + return; + var start = config.firstRow, end = config.lastRow; + + for (var i = start; i <= end; i++) { + var ranges = this.cache[i]; + if (ranges == null) { + ranges = lang.getMatchOffsets(session.getLine(i), this.regExp); + if (ranges.length > this.MAX_RANGES) + ranges = ranges.slice(0, this.MAX_RANGES); + ranges = ranges.map(function(match) { + return new Range(i, match.offset, i, match.offset + match.length); + }); + this.cache[i] = ranges.length ? ranges : ""; + } + + for (var j = ranges.length; j --; ) { + markerLayer.drawSingleLineMarker( + html, ranges[j].toScreenRange(session), this.clazz, config); + } + } + }; + +}).call(SearchHighlight.prototype); + +exports.SearchHighlight = SearchHighlight; +}); + +ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../range").Range; +function FoldLine(foldData, folds) { + this.foldData = foldData; + if (Array.isArray(folds)) { + this.folds = folds; + } else { + folds = this.folds = [ folds ]; + } + + var last = folds[folds.length - 1]; + this.range = new Range(folds[0].start.row, folds[0].start.column, + last.end.row, last.end.column); + this.start = this.range.start; + this.end = this.range.end; + + this.folds.forEach(function(fold) { + fold.setFoldLine(this); + }, this); +} + +(function() { + this.shiftRow = function(shift) { + this.start.row += shift; + this.end.row += shift; + this.folds.forEach(function(fold) { + fold.start.row += shift; + fold.end.row += shift; + }); + }; + + this.addFold = function(fold) { + if (fold.sameRow) { + if (fold.start.row < this.startRow || fold.endRow > this.endRow) { + throw new Error("Can't add a fold to this FoldLine as it has no connection"); + } + this.folds.push(fold); + this.folds.sort(function(a, b) { + return -a.range.compareEnd(b.start.row, b.start.column); + }); + if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { + this.end.row = fold.end.row; + this.end.column = fold.end.column; + } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { + this.start.row = fold.start.row; + this.start.column = fold.start.column; + } + } else if (fold.start.row == this.end.row) { + this.folds.push(fold); + this.end.row = fold.end.row; + this.end.column = fold.end.column; + } else if (fold.end.row == this.start.row) { + this.folds.unshift(fold); + this.start.row = fold.start.row; + this.start.column = fold.start.column; + } else { + throw new Error("Trying to add fold to FoldRow that doesn't have a matching row"); + } + fold.foldLine = this; + }; + + this.containsRow = function(row) { + return row >= this.start.row && row <= this.end.row; + }; + + this.walk = function(callback, endRow, endColumn) { + var lastEnd = 0, + folds = this.folds, + fold, + cmp, stop, isNewRow = true; + + if (endRow == null) { + endRow = this.end.row; + endColumn = this.end.column; + } + + for (var i = 0; i < folds.length; i++) { + fold = folds[i]; + + cmp = fold.range.compareStart(endRow, endColumn); + if (cmp == -1) { + callback(null, endRow, endColumn, lastEnd, isNewRow); + return; + } + + stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); + stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); + if (stop || cmp === 0) { + return; + } + isNewRow = !fold.sameRow; + lastEnd = fold.end.column; + } + callback(null, endRow, endColumn, lastEnd, isNewRow); + }; + + this.getNextFoldTo = function(row, column) { + var fold, cmp; + for (var i = 0; i < this.folds.length; i++) { + fold = this.folds[i]; + cmp = fold.range.compareEnd(row, column); + if (cmp == -1) { + return { + fold: fold, + kind: "after" + }; + } else if (cmp === 0) { + return { + fold: fold, + kind: "inside" + }; + } + } + return null; + }; + + this.addRemoveChars = function(row, column, len) { + var ret = this.getNextFoldTo(row, column), + fold, folds; + if (ret) { + fold = ret.fold; + if (ret.kind == "inside" + && fold.start.column != column + && fold.start.row != row) + { + window.console && window.console.log(row, column, fold); + } else if (fold.start.row == row) { + folds = this.folds; + var i = folds.indexOf(fold); + if (i === 0) { + this.start.column += len; + } + for (i; i < folds.length; i++) { + fold = folds[i]; + fold.start.column += len; + if (!fold.sameRow) { + return; + } + fold.end.column += len; + } + this.end.column += len; + } + } + }; + + this.split = function(row, column) { + var pos = this.getNextFoldTo(row, column); + + if (!pos || pos.kind == "inside") + return null; + + var fold = pos.fold; + var folds = this.folds; + var foldData = this.foldData; + + var i = folds.indexOf(fold); + var foldBefore = folds[i - 1]; + this.end.row = foldBefore.end.row; + this.end.column = foldBefore.end.column; + folds = folds.splice(i, folds.length - i); + + var newFoldLine = new FoldLine(foldData, folds); + foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); + return newFoldLine; + }; + + this.merge = function(foldLineNext) { + var folds = foldLineNext.folds; + for (var i = 0; i < folds.length; i++) { + this.addFold(folds[i]); + } + var foldData = this.foldData; + foldData.splice(foldData.indexOf(foldLineNext), 1); + }; + + this.toString = function() { + var ret = [this.range.toString() + ": [" ]; + + this.folds.forEach(function(fold) { + ret.push(" " + fold.toString()); + }); + ret.push("]"); + return ret.join("\n"); + }; + + this.idxToPosition = function(idx) { + var lastFoldEndColumn = 0; + + for (var i = 0; i < this.folds.length; i++) { + var fold = this.folds[i]; + + idx -= fold.start.column - lastFoldEndColumn; + if (idx < 0) { + return { + row: fold.start.row, + column: fold.start.column + idx + }; + } + + idx -= fold.placeholder.length; + if (idx < 0) { + return fold.start; + } + + lastFoldEndColumn = fold.end.column; + } + + return { + row: this.end.row, + column: this.end.column + idx + }; + }; +}).call(FoldLine.prototype); + +exports.FoldLine = FoldLine; +}); + +ace.define("ace/range_list",["require","exports","module","ace/range"], function(acequire, exports, module) { +"use strict"; +var Range = acequire("./range").Range; +var comparePoints = Range.comparePoints; + +var RangeList = function() { + this.ranges = []; +}; + +(function() { + this.comparePoints = comparePoints; + + this.pointIndex = function(pos, excludeEdges, startIndex) { + var list = this.ranges; + + for (var i = startIndex || 0; i < list.length; i++) { + var range = list[i]; + var cmpEnd = comparePoints(pos, range.end); + if (cmpEnd > 0) + continue; + var cmpStart = comparePoints(pos, range.start); + if (cmpEnd === 0) + return excludeEdges && cmpStart !== 0 ? -i-2 : i; + if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges)) + return i; + + return -i-1; + } + return -i - 1; + }; + + this.add = function(range) { + var excludeEdges = !range.isEmpty(); + var startIndex = this.pointIndex(range.start, excludeEdges); + if (startIndex < 0) + startIndex = -startIndex - 1; + + var endIndex = this.pointIndex(range.end, excludeEdges, startIndex); + + if (endIndex < 0) + endIndex = -endIndex - 1; + else + endIndex++; + return this.ranges.splice(startIndex, endIndex - startIndex, range); + }; + + this.addList = function(list) { + var removed = []; + for (var i = list.length; i--; ) { + removed.push.apply(removed, this.add(list[i])); + } + return removed; + }; + + this.substractPoint = function(pos) { + var i = this.pointIndex(pos); + + if (i >= 0) + return this.ranges.splice(i, 1); + }; + this.merge = function() { + var removed = []; + var list = this.ranges; + + list = list.sort(function(a, b) { + return comparePoints(a.start, b.start); + }); + + var next = list[0], range; + for (var i = 1; i < list.length; i++) { + range = next; + next = list[i]; + var cmp = comparePoints(range.end, next.start); + if (cmp < 0) + continue; + + if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) + continue; + + if (comparePoints(range.end, next.end) < 0) { + range.end.row = next.end.row; + range.end.column = next.end.column; + } + + list.splice(i, 1); + removed.push(next); + next = range; + i--; + } + + this.ranges = list; + + return removed; + }; + + this.contains = function(row, column) { + return this.pointIndex({row: row, column: column}) >= 0; + }; + + this.containsPoint = function(pos) { + return this.pointIndex(pos) >= 0; + }; + + this.rangeAtPoint = function(pos) { + var i = this.pointIndex(pos); + if (i >= 0) + return this.ranges[i]; + }; + + + this.clipRows = function(startRow, endRow) { + var list = this.ranges; + if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) + return []; + + var startIndex = this.pointIndex({row: startRow, column: 0}); + if (startIndex < 0) + startIndex = -startIndex - 1; + var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex); + if (endIndex < 0) + endIndex = -endIndex - 1; + + var clipped = []; + for (var i = startIndex; i < endIndex; i++) { + clipped.push(list[i]); + } + return clipped; + }; + + this.removeAll = function() { + return this.ranges.splice(0, this.ranges.length); + }; + + this.attach = function(session) { + if (this.session) + this.detach(); + + this.session = session; + this.onChange = this.$onChange.bind(this); + + this.session.on('change', this.onChange); + }; + + this.detach = function() { + if (!this.session) + return; + this.session.removeListener('change', this.onChange); + this.session = null; + }; + + this.$onChange = function(delta) { + if (delta.action == "insert"){ + var start = delta.start; + var end = delta.end; + } else { + var end = delta.start; + var start = delta.end; + } + var startRow = start.row; + var endRow = end.row; + var lineDif = endRow - startRow; + + var colDiff = -start.column + end.column; + var ranges = this.ranges; + + for (var i = 0, n = ranges.length; i < n; i++) { + var r = ranges[i]; + if (r.end.row < startRow) + continue; + if (r.start.row > startRow) + break; + + if (r.start.row == startRow && r.start.column >= start.column ) { + if (r.start.column == start.column && this.$insertRight) { + } else { + r.start.column += colDiff; + r.start.row += lineDif; + } + } + if (r.end.row == startRow && r.end.column >= start.column) { + if (r.end.column == start.column && this.$insertRight) { + continue; + } + if (r.end.column == start.column && colDiff > 0 && i < n - 1) { + if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) + r.end.column -= colDiff; + } + r.end.column += colDiff; + r.end.row += lineDif; + } + } + + if (lineDif != 0 && i < n) { + for (; i < n; i++) { + var r = ranges[i]; + r.start.row += lineDif; + r.end.row += lineDif; + } + } + }; + +}).call(RangeList.prototype); + +exports.RangeList = RangeList; +}); + +ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../range").Range; +var RangeList = acequire("../range_list").RangeList; +var oop = acequire("../lib/oop") +var Fold = exports.Fold = function(range, placeholder) { + this.foldLine = null; + this.placeholder = placeholder; + this.range = range; + this.start = range.start; + this.end = range.end; + + this.sameRow = range.start.row == range.end.row; + this.subFolds = this.ranges = []; +}; + +oop.inherits(Fold, RangeList); + +(function() { + + this.toString = function() { + return '"' + this.placeholder + '" ' + this.range.toString(); + }; + + this.setFoldLine = function(foldLine) { + this.foldLine = foldLine; + this.subFolds.forEach(function(fold) { + fold.setFoldLine(foldLine); + }); + }; + + this.clone = function() { + var range = this.range.clone(); + var fold = new Fold(range, this.placeholder); + this.subFolds.forEach(function(subFold) { + fold.subFolds.push(subFold.clone()); + }); + fold.collapseChildren = this.collapseChildren; + return fold; + }; + + this.addSubFold = function(fold) { + if (this.range.isEqual(fold)) + return; + + if (!this.range.containsRange(fold)) + throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); + consumeRange(fold, this.start); + + var row = fold.start.row, column = fold.start.column; + for (var i = 0, cmp = -1; i < this.subFolds.length; i++) { + cmp = this.subFolds[i].range.compare(row, column); + if (cmp != 1) + break; + } + var afterStart = this.subFolds[i]; + + if (cmp == 0) + return afterStart.addSubFold(fold); + var row = fold.range.end.row, column = fold.range.end.column; + for (var j = i, cmp = -1; j < this.subFolds.length; j++) { + cmp = this.subFolds[j].range.compare(row, column); + if (cmp != 1) + break; + } + var afterEnd = this.subFolds[j]; + + if (cmp == 0) + throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); + + var consumedFolds = this.subFolds.splice(i, j - i, fold); + fold.setFoldLine(this.foldLine); + + return fold; + }; + + this.restoreRange = function(range) { + return restoreRange(range, this.start); + }; + +}).call(Fold.prototype); + +function consumePoint(point, anchor) { + point.row -= anchor.row; + if (point.row == 0) + point.column -= anchor.column; +} +function consumeRange(range, anchor) { + consumePoint(range.start, anchor); + consumePoint(range.end, anchor); +} +function restorePoint(point, anchor) { + if (point.row == 0) + point.column += anchor.column; + point.row += anchor.row; +} +function restoreRange(range, anchor) { + restorePoint(range.start, anchor); + restorePoint(range.end, anchor); +} + +}); + +ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../range").Range; +var FoldLine = acequire("./fold_line").FoldLine; +var Fold = acequire("./fold").Fold; +var TokenIterator = acequire("../token_iterator").TokenIterator; + +function Folding() { + this.getFoldAt = function(row, column, side) { + var foldLine = this.getFoldLine(row); + if (!foldLine) + return null; + + var folds = foldLine.folds; + for (var i = 0; i < folds.length; i++) { + var fold = folds[i]; + if (fold.range.contains(row, column)) { + if (side == 1 && fold.range.isEnd(row, column)) { + continue; + } else if (side == -1 && fold.range.isStart(row, column)) { + continue; + } + return fold; + } + } + }; + this.getFoldsInRange = function(range) { + var start = range.start; + var end = range.end; + var foldLines = this.$foldData; + var foundFolds = []; + + start.column += 1; + end.column -= 1; + + for (var i = 0; i < foldLines.length; i++) { + var cmp = foldLines[i].range.compareRange(range); + if (cmp == 2) { + continue; + } + else if (cmp == -2) { + break; + } + + var folds = foldLines[i].folds; + for (var j = 0; j < folds.length; j++) { + var fold = folds[j]; + cmp = fold.range.compareRange(range); + if (cmp == -2) { + break; + } else if (cmp == 2) { + continue; + } else + if (cmp == 42) { + break; + } + foundFolds.push(fold); + } + } + start.column -= 1; + end.column += 1; + + return foundFolds; + }; + + this.getFoldsInRangeList = function(ranges) { + if (Array.isArray(ranges)) { + var folds = []; + ranges.forEach(function(range) { + folds = folds.concat(this.getFoldsInRange(range)); + }, this); + } else { + var folds = this.getFoldsInRange(ranges); + } + return folds; + }; + this.getAllFolds = function() { + var folds = []; + var foldLines = this.$foldData; + + for (var i = 0; i < foldLines.length; i++) + for (var j = 0; j < foldLines[i].folds.length; j++) + folds.push(foldLines[i].folds[j]); + + return folds; + }; + this.getFoldStringAt = function(row, column, trim, foldLine) { + foldLine = foldLine || this.getFoldLine(row); + if (!foldLine) + return null; + + var lastFold = { + end: { column: 0 } + }; + var str, fold; + for (var i = 0; i < foldLine.folds.length; i++) { + fold = foldLine.folds[i]; + var cmp = fold.range.compareEnd(row, column); + if (cmp == -1) { + str = this + .getLine(fold.start.row) + .substring(lastFold.end.column, fold.start.column); + break; + } + else if (cmp === 0) { + return null; + } + lastFold = fold; + } + if (!str) + str = this.getLine(fold.start.row).substring(lastFold.end.column); + + if (trim == -1) + return str.substring(0, column - lastFold.end.column); + else if (trim == 1) + return str.substring(column - lastFold.end.column); + else + return str; + }; + + this.getFoldLine = function(docRow, startFoldLine) { + var foldData = this.$foldData; + var i = 0; + if (startFoldLine) + i = foldData.indexOf(startFoldLine); + if (i == -1) + i = 0; + for (i; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { + return foldLine; + } else if (foldLine.end.row > docRow) { + return null; + } + } + return null; + }; + this.getNextFoldLine = function(docRow, startFoldLine) { + var foldData = this.$foldData; + var i = 0; + if (startFoldLine) + i = foldData.indexOf(startFoldLine); + if (i == -1) + i = 0; + for (i; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (foldLine.end.row >= docRow) { + return foldLine; + } + } + return null; + }; + + this.getFoldedRowCount = function(first, last) { + var foldData = this.$foldData, rowCount = last-first+1; + for (var i = 0; i < foldData.length; i++) { + var foldLine = foldData[i], + end = foldLine.end.row, + start = foldLine.start.row; + if (end >= last) { + if (start < last) { + if (start >= first) + rowCount -= last-start; + else + rowCount = 0; // in one fold + } + break; + } else if (end >= first){ + if (start >= first) // fold inside range + rowCount -= end-start; + else + rowCount -= end-first+1; + } + } + return rowCount; + }; + + this.$addFoldLine = function(foldLine) { + this.$foldData.push(foldLine); + this.$foldData.sort(function(a, b) { + return a.start.row - b.start.row; + }); + return foldLine; + }; + this.addFold = function(placeholder, range) { + var foldData = this.$foldData; + var added = false; + var fold; + + if (placeholder instanceof Fold) + fold = placeholder; + else { + fold = new Fold(range, placeholder); + fold.collapseChildren = range.collapseChildren; + } + this.$clipRangeToDocument(fold.range); + + var startRow = fold.start.row; + var startColumn = fold.start.column; + var endRow = fold.end.row; + var endColumn = fold.end.column; + if (!(startRow < endRow || + startRow == endRow && startColumn <= endColumn - 2)) + throw new Error("The range has to be at least 2 characters width"); + + var startFold = this.getFoldAt(startRow, startColumn, 1); + var endFold = this.getFoldAt(endRow, endColumn, -1); + if (startFold && endFold == startFold) + return startFold.addSubFold(fold); + + if (startFold && !startFold.range.isStart(startRow, startColumn)) + this.removeFold(startFold); + + if (endFold && !endFold.range.isEnd(endRow, endColumn)) + this.removeFold(endFold); + var folds = this.getFoldsInRange(fold.range); + if (folds.length > 0) { + this.removeFolds(folds); + folds.forEach(function(subFold) { + fold.addSubFold(subFold); + }); + } + + for (var i = 0; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (endRow == foldLine.start.row) { + foldLine.addFold(fold); + added = true; + break; + } else if (startRow == foldLine.end.row) { + foldLine.addFold(fold); + added = true; + if (!fold.sameRow) { + var foldLineNext = foldData[i + 1]; + if (foldLineNext && foldLineNext.start.row == endRow) { + foldLine.merge(foldLineNext); + break; + } + } + break; + } else if (endRow <= foldLine.start.row) { + break; + } + } + + if (!added) + foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); + + if (this.$useWrapMode) + this.$updateWrapData(foldLine.start.row, foldLine.start.row); + else + this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row); + this.$modified = true; + this._signal("changeFold", { data: fold, action: "add" }); + + return fold; + }; + + this.addFolds = function(folds) { + folds.forEach(function(fold) { + this.addFold(fold); + }, this); + }; + + this.removeFold = function(fold) { + var foldLine = fold.foldLine; + var startRow = foldLine.start.row; + var endRow = foldLine.end.row; + + var foldLines = this.$foldData; + var folds = foldLine.folds; + if (folds.length == 1) { + foldLines.splice(foldLines.indexOf(foldLine), 1); + } else + if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { + folds.pop(); + foldLine.end.row = folds[folds.length - 1].end.row; + foldLine.end.column = folds[folds.length - 1].end.column; + } else + if (foldLine.range.isStart(fold.start.row, fold.start.column)) { + folds.shift(); + foldLine.start.row = folds[0].start.row; + foldLine.start.column = folds[0].start.column; + } else + if (fold.sameRow) { + folds.splice(folds.indexOf(fold), 1); + } else + { + var newFoldLine = foldLine.split(fold.start.row, fold.start.column); + folds = newFoldLine.folds; + folds.shift(); + newFoldLine.start.row = folds[0].start.row; + newFoldLine.start.column = folds[0].start.column; + } + + if (!this.$updating) { + if (this.$useWrapMode) + this.$updateWrapData(startRow, endRow); + else + this.$updateRowLengthCache(startRow, endRow); + } + this.$modified = true; + this._signal("changeFold", { data: fold, action: "remove" }); + }; + + this.removeFolds = function(folds) { + var cloneFolds = []; + for (var i = 0; i < folds.length; i++) { + cloneFolds.push(folds[i]); + } + + cloneFolds.forEach(function(fold) { + this.removeFold(fold); + }, this); + this.$modified = true; + }; + + this.expandFold = function(fold) { + this.removeFold(fold); + fold.subFolds.forEach(function(subFold) { + fold.restoreRange(subFold); + this.addFold(subFold); + }, this); + if (fold.collapseChildren > 0) { + this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1); + } + fold.subFolds = []; + }; + + this.expandFolds = function(folds) { + folds.forEach(function(fold) { + this.expandFold(fold); + }, this); + }; + + this.unfold = function(location, expandInner) { + var range, folds; + if (location == null) { + range = new Range(0, 0, this.getLength(), 0); + expandInner = true; + } else if (typeof location == "number") + range = new Range(location, 0, location, this.getLine(location).length); + else if ("row" in location) + range = Range.fromPoints(location, location); + else + range = location; + + folds = this.getFoldsInRangeList(range); + if (expandInner) { + this.removeFolds(folds); + } else { + var subFolds = folds; + while (subFolds.length) { + this.expandFolds(subFolds); + subFolds = this.getFoldsInRangeList(range); + } + } + if (folds.length) + return folds; + }; + this.isRowFolded = function(docRow, startFoldRow) { + return !!this.getFoldLine(docRow, startFoldRow); + }; + + this.getRowFoldEnd = function(docRow, startFoldRow) { + var foldLine = this.getFoldLine(docRow, startFoldRow); + return foldLine ? foldLine.end.row : docRow; + }; + + this.getRowFoldStart = function(docRow, startFoldRow) { + var foldLine = this.getFoldLine(docRow, startFoldRow); + return foldLine ? foldLine.start.row : docRow; + }; + + this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) { + if (startRow == null) + startRow = foldLine.start.row; + if (startColumn == null) + startColumn = 0; + if (endRow == null) + endRow = foldLine.end.row; + if (endColumn == null) + endColumn = this.getLine(endRow).length; + var doc = this.doc; + var textLine = ""; + + foldLine.walk(function(placeholder, row, column, lastColumn) { + if (row < startRow) + return; + if (row == startRow) { + if (column < startColumn) + return; + lastColumn = Math.max(startColumn, lastColumn); + } + + if (placeholder != null) { + textLine += placeholder; + } else { + textLine += doc.getLine(row).substring(lastColumn, column); + } + }, endRow, endColumn); + return textLine; + }; + + this.getDisplayLine = function(row, endColumn, startRow, startColumn) { + var foldLine = this.getFoldLine(row); + + if (!foldLine) { + var line; + line = this.doc.getLine(row); + return line.substring(startColumn || 0, endColumn || line.length); + } else { + return this.getFoldDisplayLine( + foldLine, row, endColumn, startRow, startColumn); + } + }; + + this.$cloneFoldData = function() { + var fd = []; + fd = this.$foldData.map(function(foldLine) { + var folds = foldLine.folds.map(function(fold) { + return fold.clone(); + }); + return new FoldLine(fd, folds); + }); + + return fd; + }; + + this.toggleFold = function(tryToUnfold) { + var selection = this.selection; + var range = selection.getRange(); + var fold; + var bracketPos; + + if (range.isEmpty()) { + var cursor = range.start; + fold = this.getFoldAt(cursor.row, cursor.column); + + if (fold) { + this.expandFold(fold); + return; + } else if (bracketPos = this.findMatchingBracket(cursor)) { + if (range.comparePoint(bracketPos) == 1) { + range.end = bracketPos; + } else { + range.start = bracketPos; + range.start.column++; + range.end.column--; + } + } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) { + if (range.comparePoint(bracketPos) == 1) + range.end = bracketPos; + else + range.start = bracketPos; + + range.start.column++; + } else { + range = this.getCommentFoldRange(cursor.row, cursor.column) || range; + } + } else { + var folds = this.getFoldsInRange(range); + if (tryToUnfold && folds.length) { + this.expandFolds(folds); + return; + } else if (folds.length == 1 ) { + fold = folds[0]; + } + } + + if (!fold) + fold = this.getFoldAt(range.start.row, range.start.column); + + if (fold && fold.range.toString() == range.toString()) { + this.expandFold(fold); + return; + } + + var placeholder = "..."; + if (!range.isMultiLine()) { + placeholder = this.getTextRange(range); + if (placeholder.length < 4) + return; + placeholder = placeholder.trim().substring(0, 2) + ".."; + } + + this.addFold(placeholder, range); + }; + + this.getCommentFoldRange = function(row, column, dir) { + var iterator = new TokenIterator(this, row, column); + var token = iterator.getCurrentToken(); + if (token && /^comment|string/.test(token.type)) { + var range = new Range(); + var re = new RegExp(token.type.replace(/\..*/, "\\.")); + if (dir != 1) { + do { + token = iterator.stepBackward(); + } while (token && re.test(token.type)); + iterator.stepForward(); + } + + range.start.row = iterator.getCurrentTokenRow(); + range.start.column = iterator.getCurrentTokenColumn() + 2; + + iterator = new TokenIterator(this, row, column); + + if (dir != -1) { + do { + token = iterator.stepForward(); + } while (token && re.test(token.type)); + token = iterator.stepBackward(); + } else + token = iterator.getCurrentToken(); + + range.end.row = iterator.getCurrentTokenRow(); + range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2; + return range; + } + }; + + this.foldAll = function(startRow, endRow, depth) { + if (depth == undefined) + depth = 100000; // JSON.stringify doesn't hanle Infinity + var foldWidgets = this.foldWidgets; + if (!foldWidgets) + return; // mode doesn't support folding + endRow = endRow || this.getLength(); + startRow = startRow || 0; + for (var row = startRow; row < endRow; row++) { + if (foldWidgets[row] == null) + foldWidgets[row] = this.getFoldWidget(row); + if (foldWidgets[row] != "start") + continue; + + var range = this.getFoldWidgetRange(row); + if (range && range.isMultiLine() + && range.end.row <= endRow + && range.start.row >= startRow + ) { + row = range.end.row; + try { + var fold = this.addFold("...", range); + if (fold) + fold.collapseChildren = depth; + } catch(e) {} + } + } + }; + this.$foldStyles = { + "manual": 1, + "markbegin": 1, + "markbeginend": 1 + }; + this.$foldStyle = "markbegin"; + this.setFoldStyle = function(style) { + if (!this.$foldStyles[style]) + throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]"); + + if (this.$foldStyle == style) + return; + + this.$foldStyle = style; + + if (style == "manual") + this.unfold(); + var mode = this.$foldMode; + this.$setFolding(null); + this.$setFolding(mode); + }; + + this.$setFolding = function(foldMode) { + if (this.$foldMode == foldMode) + return; + + this.$foldMode = foldMode; + + this.off('change', this.$updateFoldWidgets); + this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); + this._signal("changeAnnotation"); + + if (!foldMode || this.$foldStyle == "manual") { + this.foldWidgets = null; + return; + } + + this.foldWidgets = []; + this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle); + this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle); + + this.$updateFoldWidgets = this.updateFoldWidgets.bind(this); + this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this); + this.on('change', this.$updateFoldWidgets); + this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); + }; + + this.getParentFoldRangeData = function (row, ignoreCurrent) { + var fw = this.foldWidgets; + if (!fw || (ignoreCurrent && fw[row])) + return {}; + + var i = row - 1, firstRange; + while (i >= 0) { + var c = fw[i]; + if (c == null) + c = fw[i] = this.getFoldWidget(i); + + if (c == "start") { + var range = this.getFoldWidgetRange(i); + if (!firstRange) + firstRange = range; + if (range && range.end.row >= row) + break; + } + i--; + } + + return { + range: i !== -1 && range, + firstRange: firstRange + }; + }; + + this.onFoldWidgetClick = function(row, e) { + e = e.domEvent; + var options = { + children: e.shiftKey, + all: e.ctrlKey || e.metaKey, + siblings: e.altKey + }; + + var range = this.$toggleFoldWidget(row, options); + if (!range) { + var el = (e.target || e.srcElement); + if (el && /ace_fold-widget/.test(el.className)) + el.className += " ace_invalid"; + } + }; + + this.$toggleFoldWidget = function(row, options) { + if (!this.getFoldWidget) + return; + var type = this.getFoldWidget(row); + var line = this.getLine(row); + + var dir = type === "end" ? -1 : 1; + var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir); + + if (fold) { + if (options.children || options.all) + this.removeFold(fold); + else + this.expandFold(fold); + return; + } + + var range = this.getFoldWidgetRange(row, true); + if (range && !range.isMultiLine()) { + fold = this.getFoldAt(range.start.row, range.start.column, 1); + if (fold && range.isEqual(fold.range)) { + this.removeFold(fold); + return; + } + } + + if (options.siblings) { + var data = this.getParentFoldRangeData(row); + if (data.range) { + var startRow = data.range.start.row + 1; + var endRow = data.range.end.row; + } + this.foldAll(startRow, endRow, options.all ? 10000 : 0); + } else if (options.children) { + endRow = range ? range.end.row : this.getLength(); + this.foldAll(row + 1, endRow, options.all ? 10000 : 0); + } else if (range) { + if (options.all) + range.collapseChildren = 10000; + this.addFold("...", range); + } + + return range; + }; + + + + this.toggleFoldWidget = function(toggleParent) { + var row = this.selection.getCursor().row; + row = this.getRowFoldStart(row); + var range = this.$toggleFoldWidget(row, {}); + + if (range) + return; + var data = this.getParentFoldRangeData(row, true); + range = data.range || data.firstRange; + + if (range) { + row = range.start.row; + var fold = this.getFoldAt(row, this.getLine(row).length, 1); + + if (fold) { + this.removeFold(fold); + } else { + this.addFold("...", range); + } + } + }; + + this.updateFoldWidgets = function(delta) { + var firstRow = delta.start.row; + var len = delta.end.row - firstRow; + + if (len === 0) { + this.foldWidgets[firstRow] = null; + } else if (delta.action == 'remove') { + this.foldWidgets.splice(firstRow, len + 1, null); + } else { + var args = Array(len + 1); + args.unshift(firstRow, 1); + this.foldWidgets.splice.apply(this.foldWidgets, args); + } + }; + this.tokenizerUpdateFoldWidgets = function(e) { + var rows = e.data; + if (rows.first != rows.last) { + if (this.foldWidgets.length > rows.first) + this.foldWidgets.splice(rows.first, this.foldWidgets.length); + } + }; +} + +exports.Folding = Folding; + +}); + +ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(acequire, exports, module) { +"use strict"; + +var TokenIterator = acequire("../token_iterator").TokenIterator; +var Range = acequire("../range").Range; + + +function BracketMatch() { + + this.findMatchingBracket = function(position, chr) { + if (position.column == 0) return null; + + var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1); + if (charBeforeCursor == "") return null; + + var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); + if (!match) + return null; + + if (match[1]) + return this.$findClosingBracket(match[1], position); + else + return this.$findOpeningBracket(match[2], position); + }; + + this.getBracketRange = function(pos) { + var line = this.getLine(pos.row); + var before = true, range; + + var chr = line.charAt(pos.column-1); + var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); + if (!match) { + chr = line.charAt(pos.column); + pos = {row: pos.row, column: pos.column + 1}; + match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); + before = false; + } + if (!match) + return null; + + if (match[1]) { + var bracketPos = this.$findClosingBracket(match[1], pos); + if (!bracketPos) + return null; + range = Range.fromPoints(pos, bracketPos); + if (!before) { + range.end.column++; + range.start.column--; + } + range.cursor = range.end; + } else { + var bracketPos = this.$findOpeningBracket(match[2], pos); + if (!bracketPos) + return null; + range = Range.fromPoints(bracketPos, pos); + if (!before) { + range.start.column++; + range.end.column--; + } + range.cursor = range.start; + } + + return range; + }; + + this.$brackets = { + ")": "(", + "(": ")", + "]": "[", + "[": "]", + "{": "}", + "}": "{" + }; + + this.$findOpeningBracket = function(bracket, position, typeRe) { + var openBracket = this.$brackets[bracket]; + var depth = 1; + + var iterator = new TokenIterator(this, position.row, position.column); + var token = iterator.getCurrentToken(); + if (!token) + token = iterator.stepForward(); + if (!token) + return; + + if (!typeRe){ + typeRe = new RegExp( + "(\\.?" + + token.type.replace(".", "\\.").replace("rparen", ".paren") + .replace(/\b(?:end)\b/, "(?:start|begin|end)") + + ")+" + ); + } + var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; + var value = token.value; + + while (true) { + + while (valueIndex >= 0) { + var chr = value.charAt(valueIndex); + if (chr == openBracket) { + depth -= 1; + if (depth == 0) { + return {row: iterator.getCurrentTokenRow(), + column: valueIndex + iterator.getCurrentTokenColumn()}; + } + } + else if (chr == bracket) { + depth += 1; + } + valueIndex -= 1; + } + do { + token = iterator.stepBackward(); + } while (token && !typeRe.test(token.type)); + + if (token == null) + break; + + value = token.value; + valueIndex = value.length - 1; + } + + return null; + }; + + this.$findClosingBracket = function(bracket, position, typeRe) { + var closingBracket = this.$brackets[bracket]; + var depth = 1; + + var iterator = new TokenIterator(this, position.row, position.column); + var token = iterator.getCurrentToken(); + if (!token) + token = iterator.stepForward(); + if (!token) + return; + + if (!typeRe){ + typeRe = new RegExp( + "(\\.?" + + token.type.replace(".", "\\.").replace("lparen", ".paren") + .replace(/\b(?:start|begin)\b/, "(?:start|begin|end)") + + ")+" + ); + } + var valueIndex = position.column - iterator.getCurrentTokenColumn(); + + while (true) { + + var value = token.value; + var valueLength = value.length; + while (valueIndex < valueLength) { + var chr = value.charAt(valueIndex); + if (chr == closingBracket) { + depth -= 1; + if (depth == 0) { + return {row: iterator.getCurrentTokenRow(), + column: valueIndex + iterator.getCurrentTokenColumn()}; + } + } + else if (chr == bracket) { + depth += 1; + } + valueIndex += 1; + } + do { + token = iterator.stepForward(); + } while (token && !typeRe.test(token.type)); + + if (token == null) + break; + + valueIndex = 0; + } + + return null; + }; +} +exports.BracketMatch = BracketMatch; + +}); + +ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var lang = acequire("./lib/lang"); +var config = acequire("./config"); +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var Selection = acequire("./selection").Selection; +var TextMode = acequire("./mode/text").Mode; +var Range = acequire("./range").Range; +var Document = acequire("./document").Document; +var BackgroundTokenizer = acequire("./background_tokenizer").BackgroundTokenizer; +var SearchHighlight = acequire("./search_highlight").SearchHighlight; + +var EditSession = function(text, mode) { + this.$breakpoints = []; + this.$decorations = []; + this.$frontMarkers = {}; + this.$backMarkers = {}; + this.$markerId = 1; + this.$undoSelect = true; + + this.$foldData = []; + this.$foldData.toString = function() { + return this.join("\n"); + }; + this.on("changeFold", this.onChangeFold.bind(this)); + this.$onChange = this.onChange.bind(this); + + if (typeof text != "object" || !text.getLine) + text = new Document(text); + + this.setDocument(text); + this.selection = new Selection(this); + + config.resetOptions(this); + this.setMode(mode); + config._signal("session", this); +}; + + +(function() { + + oop.implement(this, EventEmitter); + this.setDocument = function(doc) { + if (this.doc) + this.doc.removeListener("change", this.$onChange); + + this.doc = doc; + doc.on("change", this.$onChange); + + if (this.bgTokenizer) + this.bgTokenizer.setDocument(this.getDocument()); + + this.resetCaches(); + }; + this.getDocument = function() { + return this.doc; + }; + this.$resetRowCache = function(docRow) { + if (!docRow) { + this.$docRowCache = []; + this.$screenRowCache = []; + return; + } + var l = this.$docRowCache.length; + var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1; + if (l > i) { + this.$docRowCache.splice(i, l); + this.$screenRowCache.splice(i, l); + } + }; + + this.$getRowCacheIndex = function(cacheArray, val) { + var low = 0; + var hi = cacheArray.length - 1; + + while (low <= hi) { + var mid = (low + hi) >> 1; + var c = cacheArray[mid]; + + if (val > c) + low = mid + 1; + else if (val < c) + hi = mid - 1; + else + return mid; + } + + return low -1; + }; + + this.resetCaches = function() { + this.$modified = true; + this.$wrapData = []; + this.$rowLengthCache = []; + this.$resetRowCache(0); + if (this.bgTokenizer) + this.bgTokenizer.start(0); + }; + + this.onChangeFold = function(e) { + var fold = e.data; + this.$resetRowCache(fold.start.row); + }; + + this.onChange = function(delta) { + this.$modified = true; + + this.$resetRowCache(delta.start.row); + + var removedFolds = this.$updateInternalDataOnChange(delta); + if (!this.$fromUndo && this.$undoManager && !delta.ignore) { + this.$deltasDoc.push(delta); + if (removedFolds && removedFolds.length != 0) { + this.$deltasFold.push({ + action: "removeFolds", + folds: removedFolds + }); + } + + this.$informUndoManager.schedule(); + } + + this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta); + this._signal("change", delta); + }; + this.setValue = function(text) { + this.doc.setValue(text); + this.selection.moveTo(0, 0); + + this.$resetRowCache(0); + this.$deltas = []; + this.$deltasDoc = []; + this.$deltasFold = []; + this.setUndoManager(this.$undoManager); + this.getUndoManager().reset(); + }; + this.getValue = + this.toString = function() { + return this.doc.getValue(); + }; + this.getSelection = function() { + return this.selection; + }; + this.getState = function(row) { + return this.bgTokenizer.getState(row); + }; + this.getTokens = function(row) { + return this.bgTokenizer.getTokens(row); + }; + this.getTokenAt = function(row, column) { + var tokens = this.bgTokenizer.getTokens(row); + var token, c = 0; + if (column == null) { + i = tokens.length - 1; + c = this.getLine(row).length; + } else { + for (var i = 0; i < tokens.length; i++) { + c += tokens[i].value.length; + if (c >= column) + break; + } + } + token = tokens[i]; + if (!token) + return null; + token.index = i; + token.start = c - token.value.length; + return token; + }; + this.setUndoManager = function(undoManager) { + this.$undoManager = undoManager; + this.$deltas = []; + this.$deltasDoc = []; + this.$deltasFold = []; + + if (this.$informUndoManager) + this.$informUndoManager.cancel(); + + if (undoManager) { + var self = this; + + this.$syncInformUndoManager = function() { + self.$informUndoManager.cancel(); + + if (self.$deltasFold.length) { + self.$deltas.push({ + group: "fold", + deltas: self.$deltasFold + }); + self.$deltasFold = []; + } + + if (self.$deltasDoc.length) { + self.$deltas.push({ + group: "doc", + deltas: self.$deltasDoc + }); + self.$deltasDoc = []; + } + + if (self.$deltas.length > 0) { + undoManager.execute({ + action: "aceupdate", + args: [self.$deltas, self], + merge: self.mergeUndoDeltas + }); + } + self.mergeUndoDeltas = false; + self.$deltas = []; + }; + this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); + } + }; + this.markUndoGroup = function() { + if (this.$syncInformUndoManager) + this.$syncInformUndoManager(); + }; + + this.$defaultUndoManager = { + undo: function() {}, + redo: function() {}, + reset: function() {} + }; + this.getUndoManager = function() { + return this.$undoManager || this.$defaultUndoManager; + }; + this.getTabString = function() { + if (this.getUseSoftTabs()) { + return lang.stringRepeat(" ", this.getTabSize()); + } else { + return "\t"; + } + }; + this.setUseSoftTabs = function(val) { + this.setOption("useSoftTabs", val); + }; + this.getUseSoftTabs = function() { + return this.$useSoftTabs && !this.$mode.$indentWithTabs; + }; + this.setTabSize = function(tabSize) { + this.setOption("tabSize", tabSize); + }; + this.getTabSize = function() { + return this.$tabSize; + }; + this.isTabStop = function(position) { + return this.$useSoftTabs && (position.column % this.$tabSize === 0); + }; + + this.$overwrite = false; + this.setOverwrite = function(overwrite) { + this.setOption("overwrite", overwrite); + }; + this.getOverwrite = function() { + return this.$overwrite; + }; + this.toggleOverwrite = function() { + this.setOverwrite(!this.$overwrite); + }; + this.addGutterDecoration = function(row, className) { + if (!this.$decorations[row]) + this.$decorations[row] = ""; + this.$decorations[row] += " " + className; + this._signal("changeBreakpoint", {}); + }; + this.removeGutterDecoration = function(row, className) { + this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, ""); + this._signal("changeBreakpoint", {}); + }; + this.getBreakpoints = function() { + return this.$breakpoints; + }; + this.setBreakpoints = function(rows) { + this.$breakpoints = []; + for (var i=0; i 0) + inToken = !!line.charAt(column - 1).match(this.tokenRe); + + if (!inToken) + inToken = !!line.charAt(column).match(this.tokenRe); + + if (inToken) + var re = this.tokenRe; + else if (/^\s+$/.test(line.slice(column-1, column+1))) + var re = /\s/; + else + var re = this.nonTokenRe; + + var start = column; + if (start > 0) { + do { + start--; + } + while (start >= 0 && line.charAt(start).match(re)); + start++; + } + + var end = column; + while (end < line.length && line.charAt(end).match(re)) { + end++; + } + + return new Range(row, start, row, end); + }; + this.getAWordRange = function(row, column) { + var wordRange = this.getWordRange(row, column); + var line = this.getLine(wordRange.end.row); + + while (line.charAt(wordRange.end.column).match(/[ \t]/)) { + wordRange.end.column += 1; + } + return wordRange; + }; + this.setNewLineMode = function(newLineMode) { + this.doc.setNewLineMode(newLineMode); + }; + this.getNewLineMode = function() { + return this.doc.getNewLineMode(); + }; + this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); }; + this.getUseWorker = function() { return this.$useWorker; }; + this.onReloadTokenizer = function(e) { + var rows = e.data; + this.bgTokenizer.start(rows.first); + this._signal("tokenizerUpdate", e); + }; + + this.$modes = {}; + this.$mode = null; + this.$modeId = null; + this.setMode = function(mode, cb) { + if (mode && typeof mode === "object") { + if (mode.getTokenizer) + return this.$onChangeMode(mode); + var options = mode; + var path = options.path; + } else { + path = mode || "ace/mode/text"; + } + if (!this.$modes["ace/mode/text"]) + this.$modes["ace/mode/text"] = new TextMode(); + + if (this.$modes[path] && !options) { + this.$onChangeMode(this.$modes[path]); + cb && cb(); + return; + } + this.$modeId = path; + config.loadModule(["mode", path], function(m) { + if (this.$modeId !== path) + return cb && cb(); + if (this.$modes[path] && !options) { + this.$onChangeMode(this.$modes[path]); + } else if (m && m.Mode) { + m = new m.Mode(options); + if (!options) { + this.$modes[path] = m; + m.$id = path; + } + this.$onChangeMode(m); + } + cb && cb(); + }.bind(this)); + if (!this.$mode) + this.$onChangeMode(this.$modes["ace/mode/text"], true); + }; + + this.$onChangeMode = function(mode, $isPlaceholder) { + if (!$isPlaceholder) + this.$modeId = mode.$id; + if (this.$mode === mode) + return; + + this.$mode = mode; + + this.$stopWorker(); + + if (this.$useWorker) + this.$startWorker(); + + var tokenizer = mode.getTokenizer(); + + if(tokenizer.addEventListener !== undefined) { + var onReloadTokenizer = this.onReloadTokenizer.bind(this); + tokenizer.addEventListener("update", onReloadTokenizer); + } + + if (!this.bgTokenizer) { + this.bgTokenizer = new BackgroundTokenizer(tokenizer); + var _self = this; + this.bgTokenizer.addEventListener("update", function(e) { + _self._signal("tokenizerUpdate", e); + }); + } else { + this.bgTokenizer.setTokenizer(tokenizer); + } + + this.bgTokenizer.setDocument(this.getDocument()); + + this.tokenRe = mode.tokenRe; + this.nonTokenRe = mode.nonTokenRe; + + + if (!$isPlaceholder) { + if (mode.attachToSession) + mode.attachToSession(this); + this.$options.wrapMethod.set.call(this, this.$wrapMethod); + this.$setFolding(mode.foldingRules); + this.bgTokenizer.start(0); + this._emit("changeMode"); + } + }; + + this.$stopWorker = function() { + if (this.$worker) { + this.$worker.terminate(); + this.$worker = null; + } + }; + + this.$startWorker = function() { + try { + this.$worker = this.$mode.createWorker(this); + } catch (e) { + config.warn("Could not load worker", e); + this.$worker = null; + } + }; + this.getMode = function() { + return this.$mode; + }; + + this.$scrollTop = 0; + this.setScrollTop = function(scrollTop) { + if (this.$scrollTop === scrollTop || isNaN(scrollTop)) + return; + + this.$scrollTop = scrollTop; + this._signal("changeScrollTop", scrollTop); + }; + this.getScrollTop = function() { + return this.$scrollTop; + }; + + this.$scrollLeft = 0; + this.setScrollLeft = function(scrollLeft) { + if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) + return; + + this.$scrollLeft = scrollLeft; + this._signal("changeScrollLeft", scrollLeft); + }; + this.getScrollLeft = function() { + return this.$scrollLeft; + }; + this.getScreenWidth = function() { + this.$computeWidth(); + if (this.lineWidgets) + return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); + return this.screenWidth; + }; + + this.getLineWidgetMaxWidth = function() { + if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth; + var width = 0; + this.lineWidgets.forEach(function(w) { + if (w && w.screenWidth > width) + width = w.screenWidth; + }); + return this.lineWidgetWidth = width; + }; + + this.$computeWidth = function(force) { + if (this.$modified || force) { + this.$modified = false; + + if (this.$useWrapMode) + return this.screenWidth = this.$wrapLimit; + + var lines = this.doc.getAllLines(); + var cache = this.$rowLengthCache; + var longestScreenLine = 0; + var foldIndex = 0; + var foldLine = this.$foldData[foldIndex]; + var foldStart = foldLine ? foldLine.start.row : Infinity; + var len = lines.length; + + for (var i = 0; i < len; i++) { + if (i > foldStart) { + i = foldLine.end.row + 1; + if (i >= len) + break; + foldLine = this.$foldData[foldIndex++]; + foldStart = foldLine ? foldLine.start.row : Infinity; + } + + if (cache[i] == null) + cache[i] = this.$getStringScreenWidth(lines[i])[0]; + + if (cache[i] > longestScreenLine) + longestScreenLine = cache[i]; + } + this.screenWidth = longestScreenLine; + } + }; + this.getLine = function(row) { + return this.doc.getLine(row); + }; + this.getLines = function(firstRow, lastRow) { + return this.doc.getLines(firstRow, lastRow); + }; + this.getLength = function() { + return this.doc.getLength(); + }; + this.getTextRange = function(range) { + return this.doc.getTextRange(range || this.selection.getRange()); + }; + this.insert = function(position, text) { + return this.doc.insert(position, text); + }; + this.remove = function(range) { + return this.doc.remove(range); + }; + this.removeFullLines = function(firstRow, lastRow){ + return this.doc.removeFullLines(firstRow, lastRow); + }; + this.undoChanges = function(deltas, dontSelect) { + if (!deltas.length) + return; + + this.$fromUndo = true; + var lastUndoRange = null; + for (var i = deltas.length - 1; i != -1; i--) { + var delta = deltas[i]; + if (delta.group == "doc") { + this.doc.revertDeltas(delta.deltas); + lastUndoRange = + this.$getUndoSelection(delta.deltas, true, lastUndoRange); + } else { + delta.deltas.forEach(function(foldDelta) { + this.addFolds(foldDelta.folds); + }, this); + } + } + this.$fromUndo = false; + lastUndoRange && + this.$undoSelect && + !dontSelect && + this.selection.setSelectionRange(lastUndoRange); + return lastUndoRange; + }; + this.redoChanges = function(deltas, dontSelect) { + if (!deltas.length) + return; + + this.$fromUndo = true; + var lastUndoRange = null; + for (var i = 0; i < deltas.length; i++) { + var delta = deltas[i]; + if (delta.group == "doc") { + this.doc.applyDeltas(delta.deltas); + lastUndoRange = + this.$getUndoSelection(delta.deltas, false, lastUndoRange); + } + } + this.$fromUndo = false; + lastUndoRange && + this.$undoSelect && + !dontSelect && + this.selection.setSelectionRange(lastUndoRange); + return lastUndoRange; + }; + this.setUndoSelect = function(enable) { + this.$undoSelect = enable; + }; + + this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { + function isInsert(delta) { + return isUndo ? delta.action !== "insert" : delta.action === "insert"; + } + + var delta = deltas[0]; + var range, point; + var lastDeltaIsInsert = false; + if (isInsert(delta)) { + range = Range.fromPoints(delta.start, delta.end); + lastDeltaIsInsert = true; + } else { + range = Range.fromPoints(delta.start, delta.start); + lastDeltaIsInsert = false; + } + + for (var i = 1; i < deltas.length; i++) { + delta = deltas[i]; + if (isInsert(delta)) { + point = delta.start; + if (range.compare(point.row, point.column) == -1) { + range.setStart(point); + } + point = delta.end; + if (range.compare(point.row, point.column) == 1) { + range.setEnd(point); + } + lastDeltaIsInsert = true; + } else { + point = delta.start; + if (range.compare(point.row, point.column) == -1) { + range = Range.fromPoints(delta.start, delta.start); + } + lastDeltaIsInsert = false; + } + } + if (lastUndoRange != null) { + if (Range.comparePoints(lastUndoRange.start, range.start) === 0) { + lastUndoRange.start.column += range.end.column - range.start.column; + lastUndoRange.end.column += range.end.column - range.start.column; + } + + var cmp = lastUndoRange.compareRange(range); + if (cmp == 1) { + range.setStart(lastUndoRange.start); + } else if (cmp == -1) { + range.setEnd(lastUndoRange.end); + } + } + + return range; + }; + this.replace = function(range, text) { + return this.doc.replace(range, text); + }; + this.moveText = function(fromRange, toPosition, copy) { + var text = this.getTextRange(fromRange); + var folds = this.getFoldsInRange(fromRange); + + var toRange = Range.fromPoints(toPosition, toPosition); + if (!copy) { + this.remove(fromRange); + var rowDiff = fromRange.start.row - fromRange.end.row; + var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column; + if (collDiff) { + if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) + toRange.start.column += collDiff; + if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) + toRange.end.column += collDiff; + } + if (rowDiff && toRange.start.row >= fromRange.end.row) { + toRange.start.row += rowDiff; + toRange.end.row += rowDiff; + } + } + + toRange.end = this.insert(toRange.start, text); + if (folds.length) { + var oldStart = fromRange.start; + var newStart = toRange.start; + var rowDiff = newStart.row - oldStart.row; + var collDiff = newStart.column - oldStart.column; + this.addFolds(folds.map(function(x) { + x = x.clone(); + if (x.start.row == oldStart.row) + x.start.column += collDiff; + if (x.end.row == oldStart.row) + x.end.column += collDiff; + x.start.row += rowDiff; + x.end.row += rowDiff; + return x; + })); + } + + return toRange; + }; + this.indentRows = function(startRow, endRow, indentString) { + indentString = indentString.replace(/\t/g, this.getTabString()); + for (var row=startRow; row<=endRow; row++) + this.doc.insertInLine({row: row, column: 0}, indentString); + }; + this.outdentRows = function (range) { + var rowRange = range.collapseRows(); + var deleteRange = new Range(0, 0, 0, 0); + var size = this.getTabSize(); + + for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { + var line = this.getLine(i); + + deleteRange.start.row = i; + deleteRange.end.row = i; + for (var j = 0; j < size; ++j) + if (line.charAt(j) != ' ') + break; + if (j < size && line.charAt(j) == '\t') { + deleteRange.start.column = j; + deleteRange.end.column = j + 1; + } else { + deleteRange.start.column = 0; + deleteRange.end.column = j; + } + this.remove(deleteRange); + } + }; + + this.$moveLines = function(firstRow, lastRow, dir) { + firstRow = this.getRowFoldStart(firstRow); + lastRow = this.getRowFoldEnd(lastRow); + if (dir < 0) { + var row = this.getRowFoldStart(firstRow + dir); + if (row < 0) return 0; + var diff = row-firstRow; + } else if (dir > 0) { + var row = this.getRowFoldEnd(lastRow + dir); + if (row > this.doc.getLength()-1) return 0; + var diff = row-lastRow; + } else { + firstRow = this.$clipRowToDocument(firstRow); + lastRow = this.$clipRowToDocument(lastRow); + var diff = lastRow - firstRow + 1; + } + + var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE); + var folds = this.getFoldsInRange(range).map(function(x){ + x = x.clone(); + x.start.row += diff; + x.end.row += diff; + return x; + }); + + var lines = dir == 0 + ? this.doc.getLines(firstRow, lastRow) + : this.doc.removeFullLines(firstRow, lastRow); + this.doc.insertFullLines(firstRow+diff, lines); + folds.length && this.addFolds(folds); + return diff; + }; + this.moveLinesUp = function(firstRow, lastRow) { + return this.$moveLines(firstRow, lastRow, -1); + }; + this.moveLinesDown = function(firstRow, lastRow) { + return this.$moveLines(firstRow, lastRow, 1); + }; + this.duplicateLines = function(firstRow, lastRow) { + return this.$moveLines(firstRow, lastRow, 0); + }; + + + this.$clipRowToDocument = function(row) { + return Math.max(0, Math.min(row, this.doc.getLength()-1)); + }; + + this.$clipColumnToRow = function(row, column) { + if (column < 0) + return 0; + return Math.min(this.doc.getLine(row).length, column); + }; + + + this.$clipPositionToDocument = function(row, column) { + column = Math.max(0, column); + + if (row < 0) { + row = 0; + column = 0; + } else { + var len = this.doc.getLength(); + if (row >= len) { + row = len - 1; + column = this.doc.getLine(len-1).length; + } else { + column = Math.min(this.doc.getLine(row).length, column); + } + } + + return { + row: row, + column: column + }; + }; + + this.$clipRangeToDocument = function(range) { + if (range.start.row < 0) { + range.start.row = 0; + range.start.column = 0; + } else { + range.start.column = this.$clipColumnToRow( + range.start.row, + range.start.column + ); + } + + var len = this.doc.getLength() - 1; + if (range.end.row > len) { + range.end.row = len; + range.end.column = this.doc.getLine(len).length; + } else { + range.end.column = this.$clipColumnToRow( + range.end.row, + range.end.column + ); + } + return range; + }; + this.$wrapLimit = 80; + this.$useWrapMode = false; + this.$wrapLimitRange = { + min : null, + max : null + }; + this.setUseWrapMode = function(useWrapMode) { + if (useWrapMode != this.$useWrapMode) { + this.$useWrapMode = useWrapMode; + this.$modified = true; + this.$resetRowCache(0); + if (useWrapMode) { + var len = this.getLength(); + this.$wrapData = Array(len); + this.$updateWrapData(0, len - 1); + } + + this._signal("changeWrapMode"); + } + }; + this.getUseWrapMode = function() { + return this.$useWrapMode; + }; + this.setWrapLimitRange = function(min, max) { + if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { + this.$wrapLimitRange = { min: min, max: max }; + this.$modified = true; + if (this.$useWrapMode) + this._signal("changeWrapMode"); + } + }; + this.adjustWrapLimit = function(desiredLimit, $printMargin) { + var limits = this.$wrapLimitRange; + if (limits.max < 0) + limits = {min: $printMargin, max: $printMargin}; + var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max); + if (wrapLimit != this.$wrapLimit && wrapLimit > 1) { + this.$wrapLimit = wrapLimit; + this.$modified = true; + if (this.$useWrapMode) { + this.$updateWrapData(0, this.getLength() - 1); + this.$resetRowCache(0); + this._signal("changeWrapLimit"); + } + return true; + } + return false; + }; + + this.$constrainWrapLimit = function(wrapLimit, min, max) { + if (min) + wrapLimit = Math.max(min, wrapLimit); + + if (max) + wrapLimit = Math.min(max, wrapLimit); + + return wrapLimit; + }; + this.getWrapLimit = function() { + return this.$wrapLimit; + }; + this.setWrapLimit = function (limit) { + this.setWrapLimitRange(limit, limit); + }; + this.getWrapLimitRange = function() { + return { + min : this.$wrapLimitRange.min, + max : this.$wrapLimitRange.max + }; + }; + + this.$updateInternalDataOnChange = function(delta) { + var useWrapMode = this.$useWrapMode; + var action = delta.action; + var start = delta.start; + var end = delta.end; + var firstRow = start.row; + var lastRow = end.row; + var len = lastRow - firstRow; + var removedFolds = null; + + this.$updating = true; + if (len != 0) { + if (action === "remove") { + this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len); + + var foldLines = this.$foldData; + removedFolds = this.getFoldsInRange(delta); + this.removeFolds(removedFolds); + + var foldLine = this.getFoldLine(end.row); + var idx = 0; + if (foldLine) { + foldLine.addRemoveChars(end.row, end.column, start.column - end.column); + foldLine.shiftRow(-len); + + var foldLineBefore = this.getFoldLine(firstRow); + if (foldLineBefore && foldLineBefore !== foldLine) { + foldLineBefore.merge(foldLine); + foldLine = foldLineBefore; + } + idx = foldLines.indexOf(foldLine) + 1; + } + + for (idx; idx < foldLines.length; idx++) { + var foldLine = foldLines[idx]; + if (foldLine.start.row >= end.row) { + foldLine.shiftRow(-len); + } + } + + lastRow = firstRow; + } else { + var args = Array(len); + args.unshift(firstRow, 0); + var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache + arr.splice.apply(arr, args); + var foldLines = this.$foldData; + var foldLine = this.getFoldLine(firstRow); + var idx = 0; + if (foldLine) { + var cmp = foldLine.range.compareInside(start.row, start.column); + if (cmp == 0) { + foldLine = foldLine.split(start.row, start.column); + if (foldLine) { + foldLine.shiftRow(len); + foldLine.addRemoveChars(lastRow, 0, end.column - start.column); + } + } else + if (cmp == -1) { + foldLine.addRemoveChars(firstRow, 0, end.column - start.column); + foldLine.shiftRow(len); + } + idx = foldLines.indexOf(foldLine) + 1; + } + + for (idx; idx < foldLines.length; idx++) { + var foldLine = foldLines[idx]; + if (foldLine.start.row >= firstRow) { + foldLine.shiftRow(len); + } + } + } + } else { + len = Math.abs(delta.start.column - delta.end.column); + if (action === "remove") { + removedFolds = this.getFoldsInRange(delta); + this.removeFolds(removedFolds); + + len = -len; + } + var foldLine = this.getFoldLine(firstRow); + if (foldLine) { + foldLine.addRemoveChars(firstRow, start.column, len); + } + } + + if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { + console.error("doc.getLength() and $wrapData.length have to be the same!"); + } + this.$updating = false; + + if (useWrapMode) + this.$updateWrapData(firstRow, lastRow); + else + this.$updateRowLengthCache(firstRow, lastRow); + + return removedFolds; + }; + + this.$updateRowLengthCache = function(firstRow, lastRow, b) { + this.$rowLengthCache[firstRow] = null; + this.$rowLengthCache[lastRow] = null; + }; + + this.$updateWrapData = function(firstRow, lastRow) { + var lines = this.doc.getAllLines(); + var tabSize = this.getTabSize(); + var wrapData = this.$wrapData; + var wrapLimit = this.$wrapLimit; + var tokens; + var foldLine; + + var row = firstRow; + lastRow = Math.min(lastRow, lines.length - 1); + while (row <= lastRow) { + foldLine = this.getFoldLine(row, foldLine); + if (!foldLine) { + tokens = this.$getDisplayTokens(lines[row]); + wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); + row ++; + } else { + tokens = []; + foldLine.walk(function(placeholder, row, column, lastColumn) { + var walkTokens; + if (placeholder != null) { + walkTokens = this.$getDisplayTokens( + placeholder, tokens.length); + walkTokens[0] = PLACEHOLDER_START; + for (var i = 1; i < walkTokens.length; i++) { + walkTokens[i] = PLACEHOLDER_BODY; + } + } else { + walkTokens = this.$getDisplayTokens( + lines[row].substring(lastColumn, column), + tokens.length); + } + tokens = tokens.concat(walkTokens); + }.bind(this), + foldLine.end.row, + lines[foldLine.end.row].length + 1 + ); + + wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); + row = foldLine.end.row + 1; + } + } + }; + var CHAR = 1, + CHAR_EXT = 2, + PLACEHOLDER_START = 3, + PLACEHOLDER_BODY = 4, + PUNCTUATION = 9, + SPACE = 10, + TAB = 11, + TAB_SPACE = 12; + + + this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) { + if (tokens.length == 0) { + return []; + } + + var splits = []; + var displayLength = tokens.length; + var lastSplit = 0, lastDocSplit = 0; + + var isCode = this.$wrapAsCode; + + var indentedSoftWrap = this.$indentedSoftWrap; + var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8) + || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2); + + function getWrapIndent() { + var indentation = 0; + if (maxIndent === 0) + return indentation; + if (indentedSoftWrap) { + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token == SPACE) + indentation += 1; + else if (token == TAB) + indentation += tabSize; + else if (token == TAB_SPACE) + continue; + else + break; + } + } + if (isCode && indentedSoftWrap !== false) + indentation += tabSize; + return Math.min(indentation, maxIndent); + } + function addSplit(screenPos) { + var displayed = tokens.slice(lastSplit, screenPos); + var len = displayed.length; + displayed.join("") + .replace(/12/g, function() { + len -= 1; + }) + .replace(/2/g, function() { + len -= 1; + }); + + if (!splits.length) { + indent = getWrapIndent(); + splits.indent = indent; + } + lastDocSplit += len; + splits.push(lastDocSplit); + lastSplit = screenPos; + } + var indent = 0; + while (displayLength - lastSplit > wrapLimit - indent) { + var split = lastSplit + wrapLimit - indent; + if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) { + addSplit(split); + continue; + } + if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) { + for (split; split != lastSplit - 1; split--) { + if (tokens[split] == PLACEHOLDER_START) { + break; + } + } + if (split > lastSplit) { + addSplit(split); + continue; + } + split = lastSplit + wrapLimit; + for (split; split < tokens.length; split++) { + if (tokens[split] != PLACEHOLDER_BODY) { + break; + } + } + if (split == tokens.length) { + break; // Breaks the while-loop. + } + addSplit(split); + continue; + } + var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1); + while (split > minSplit && tokens[split] < PLACEHOLDER_START) { + split --; + } + if (isCode) { + while (split > minSplit && tokens[split] < PLACEHOLDER_START) { + split --; + } + while (split > minSplit && tokens[split] == PUNCTUATION) { + split --; + } + } else { + while (split > minSplit && tokens[split] < SPACE) { + split --; + } + } + if (split > minSplit) { + addSplit(++split); + continue; + } + split = lastSplit + wrapLimit; + if (tokens[split] == CHAR_EXT) + split--; + addSplit(split - indent); + } + return splits; + }; + this.$getDisplayTokens = function(str, offset) { + var arr = []; + var tabSize; + offset = offset || 0; + + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + if (c == 9) { + tabSize = this.getScreenTabSize(arr.length + offset); + arr.push(TAB); + for (var n = 1; n < tabSize; n++) { + arr.push(TAB_SPACE); + } + } + else if (c == 32) { + arr.push(SPACE); + } else if((c > 39 && c < 48) || (c > 57 && c < 64)) { + arr.push(PUNCTUATION); + } + else if (c >= 0x1100 && isFullWidth(c)) { + arr.push(CHAR, CHAR_EXT); + } else { + arr.push(CHAR); + } + } + return arr; + }; + this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { + if (maxScreenColumn == 0) + return [0, 0]; + if (maxScreenColumn == null) + maxScreenColumn = Infinity; + screenColumn = screenColumn || 0; + + var c, column; + for (column = 0; column < str.length; column++) { + c = str.charCodeAt(column); + if (c == 9) { + screenColumn += this.getScreenTabSize(screenColumn); + } + else if (c >= 0x1100 && isFullWidth(c)) { + screenColumn += 2; + } else { + screenColumn += 1; + } + if (screenColumn > maxScreenColumn) { + break; + } + } + + return [screenColumn, column]; + }; + + this.lineWidgets = null; + this.getRowLength = function(row) { + if (this.lineWidgets) + var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; + else + h = 0 + if (!this.$useWrapMode || !this.$wrapData[row]) { + return 1 + h; + } else { + return this.$wrapData[row].length + 1 + h; + } + }; + this.getRowLineCount = function(row) { + if (!this.$useWrapMode || !this.$wrapData[row]) { + return 1; + } else { + return this.$wrapData[row].length + 1; + } + }; + + this.getRowWrapIndent = function(screenRow) { + if (this.$useWrapMode) { + var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); + var splits = this.$wrapData[pos.row]; + return splits.length && splits[0] < pos.column ? splits.indent : 0; + } else { + return 0; + } + } + this.getScreenLastRowColumn = function(screenRow) { + var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); + return this.documentToScreenColumn(pos.row, pos.column); + }; + this.getDocumentLastRowColumn = function(docRow, docColumn) { + var screenRow = this.documentToScreenRow(docRow, docColumn); + return this.getScreenLastRowColumn(screenRow); + }; + this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { + var screenRow = this.documentToScreenRow(docRow, docColumn); + return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); + }; + this.getRowSplitData = function(row) { + if (!this.$useWrapMode) { + return undefined; + } else { + return this.$wrapData[row]; + } + }; + this.getScreenTabSize = function(screenColumn) { + return this.$tabSize - screenColumn % this.$tabSize; + }; + + + this.screenToDocumentRow = function(screenRow, screenColumn) { + return this.screenToDocumentPosition(screenRow, screenColumn).row; + }; + + + this.screenToDocumentColumn = function(screenRow, screenColumn) { + return this.screenToDocumentPosition(screenRow, screenColumn).column; + }; + this.screenToDocumentPosition = function(screenRow, screenColumn) { + if (screenRow < 0) + return {row: 0, column: 0}; + + var line; + var docRow = 0; + var docColumn = 0; + var column; + var row = 0; + var rowLength = 0; + + var rowCache = this.$screenRowCache; + var i = this.$getRowCacheIndex(rowCache, screenRow); + var l = rowCache.length; + if (l && i >= 0) { + var row = rowCache[i]; + var docRow = this.$docRowCache[i]; + var doCache = screenRow > rowCache[l - 1]; + } else { + var doCache = !l; + } + + var maxRow = this.getLength() - 1; + var foldLine = this.getNextFoldLine(docRow); + var foldStart = foldLine ? foldLine.start.row : Infinity; + + while (row <= screenRow) { + rowLength = this.getRowLength(docRow); + if (row + rowLength > screenRow || docRow >= maxRow) { + break; + } else { + row += rowLength; + docRow++; + if (docRow > foldStart) { + docRow = foldLine.end.row+1; + foldLine = this.getNextFoldLine(docRow, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + } + + if (doCache) { + this.$docRowCache.push(docRow); + this.$screenRowCache.push(row); + } + } + + if (foldLine && foldLine.start.row <= docRow) { + line = this.getFoldDisplayLine(foldLine); + docRow = foldLine.start.row; + } else if (row + rowLength <= screenRow || docRow > maxRow) { + return { + row: maxRow, + column: this.getLine(maxRow).length + }; + } else { + line = this.getLine(docRow); + foldLine = null; + } + var wrapIndent = 0; + if (this.$useWrapMode) { + var splits = this.$wrapData[docRow]; + if (splits) { + var splitIndex = Math.floor(screenRow - row); + column = splits[splitIndex]; + if(splitIndex > 0 && splits.length) { + wrapIndent = splits.indent; + docColumn = splits[splitIndex - 1] || splits[splits.length - 1]; + line = line.substring(docColumn); + } + } + } + + docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1]; + if (this.$useWrapMode && docColumn >= column) + docColumn = column - 1; + + if (foldLine) + return foldLine.idxToPosition(docColumn); + + return {row: docRow, column: docColumn}; + }; + this.documentToScreenPosition = function(docRow, docColumn) { + if (typeof docColumn === "undefined") + var pos = this.$clipPositionToDocument(docRow.row, docRow.column); + else + pos = this.$clipPositionToDocument(docRow, docColumn); + + docRow = pos.row; + docColumn = pos.column; + + var screenRow = 0; + var foldStartRow = null; + var fold = null; + fold = this.getFoldAt(docRow, docColumn, 1); + if (fold) { + docRow = fold.start.row; + docColumn = fold.start.column; + } + + var rowEnd, row = 0; + + + var rowCache = this.$docRowCache; + var i = this.$getRowCacheIndex(rowCache, docRow); + var l = rowCache.length; + if (l && i >= 0) { + var row = rowCache[i]; + var screenRow = this.$screenRowCache[i]; + var doCache = docRow > rowCache[l - 1]; + } else { + var doCache = !l; + } + + var foldLine = this.getNextFoldLine(row); + var foldStart = foldLine ?foldLine.start.row :Infinity; + + while (row < docRow) { + if (row >= foldStart) { + rowEnd = foldLine.end.row + 1; + if (rowEnd > docRow) + break; + foldLine = this.getNextFoldLine(rowEnd, foldLine); + foldStart = foldLine ?foldLine.start.row :Infinity; + } + else { + rowEnd = row + 1; + } + + screenRow += this.getRowLength(row); + row = rowEnd; + + if (doCache) { + this.$docRowCache.push(row); + this.$screenRowCache.push(screenRow); + } + } + var textLine = ""; + if (foldLine && row >= foldStart) { + textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); + foldStartRow = foldLine.start.row; + } else { + textLine = this.getLine(docRow).substring(0, docColumn); + foldStartRow = docRow; + } + var wrapIndent = 0; + if (this.$useWrapMode) { + var wrapRow = this.$wrapData[foldStartRow]; + if (wrapRow) { + var screenRowOffset = 0; + while (textLine.length >= wrapRow[screenRowOffset]) { + screenRow ++; + screenRowOffset++; + } + textLine = textLine.substring( + wrapRow[screenRowOffset - 1] || 0, textLine.length + ); + wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0; + } + } + + return { + row: screenRow, + column: wrapIndent + this.$getStringScreenWidth(textLine)[0] + }; + }; + this.documentToScreenColumn = function(row, docColumn) { + return this.documentToScreenPosition(row, docColumn).column; + }; + this.documentToScreenRow = function(docRow, docColumn) { + return this.documentToScreenPosition(docRow, docColumn).row; + }; + this.getScreenLength = function() { + var screenRows = 0; + var fold = null; + if (!this.$useWrapMode) { + screenRows = this.getLength(); + var foldData = this.$foldData; + for (var i = 0; i < foldData.length; i++) { + fold = foldData[i]; + screenRows -= fold.end.row - fold.start.row; + } + } else { + var lastRow = this.$wrapData.length; + var row = 0, i = 0; + var fold = this.$foldData[i++]; + var foldStart = fold ? fold.start.row :Infinity; + + while (row < lastRow) { + var splits = this.$wrapData[row]; + screenRows += splits ? splits.length + 1 : 1; + row ++; + if (row > foldStart) { + row = fold.end.row+1; + fold = this.$foldData[i++]; + foldStart = fold ?fold.start.row :Infinity; + } + } + } + if (this.lineWidgets) + screenRows += this.$getWidgetScreenLength(); + + return screenRows; + }; + this.$setFontMetrics = function(fm) { + if (!this.$enableVarChar) return; + this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { + if (maxScreenColumn === 0) + return [0, 0]; + if (!maxScreenColumn) + maxScreenColumn = Infinity; + screenColumn = screenColumn || 0; + + var c, column; + for (column = 0; column < str.length; column++) { + c = str.charAt(column); + if (c === "\t") { + screenColumn += this.getScreenTabSize(screenColumn); + } else { + screenColumn += fm.getCharacterWidth(c); + } + if (screenColumn > maxScreenColumn) { + break; + } + } + + return [screenColumn, column]; + }; + }; + + this.destroy = function() { + if (this.bgTokenizer) { + this.bgTokenizer.setDocument(null); + this.bgTokenizer = null; + } + this.$stopWorker(); + }; + function isFullWidth(c) { + if (c < 0x1100) + return false; + return c >= 0x1100 && c <= 0x115F || + c >= 0x11A3 && c <= 0x11A7 || + c >= 0x11FA && c <= 0x11FF || + c >= 0x2329 && c <= 0x232A || + c >= 0x2E80 && c <= 0x2E99 || + c >= 0x2E9B && c <= 0x2EF3 || + c >= 0x2F00 && c <= 0x2FD5 || + c >= 0x2FF0 && c <= 0x2FFB || + c >= 0x3000 && c <= 0x303E || + c >= 0x3041 && c <= 0x3096 || + c >= 0x3099 && c <= 0x30FF || + c >= 0x3105 && c <= 0x312D || + c >= 0x3131 && c <= 0x318E || + c >= 0x3190 && c <= 0x31BA || + c >= 0x31C0 && c <= 0x31E3 || + c >= 0x31F0 && c <= 0x321E || + c >= 0x3220 && c <= 0x3247 || + c >= 0x3250 && c <= 0x32FE || + c >= 0x3300 && c <= 0x4DBF || + c >= 0x4E00 && c <= 0xA48C || + c >= 0xA490 && c <= 0xA4C6 || + c >= 0xA960 && c <= 0xA97C || + c >= 0xAC00 && c <= 0xD7A3 || + c >= 0xD7B0 && c <= 0xD7C6 || + c >= 0xD7CB && c <= 0xD7FB || + c >= 0xF900 && c <= 0xFAFF || + c >= 0xFE10 && c <= 0xFE19 || + c >= 0xFE30 && c <= 0xFE52 || + c >= 0xFE54 && c <= 0xFE66 || + c >= 0xFE68 && c <= 0xFE6B || + c >= 0xFF01 && c <= 0xFF60 || + c >= 0xFFE0 && c <= 0xFFE6; + } + +}).call(EditSession.prototype); + +acequire("./edit_session/folding").Folding.call(EditSession.prototype); +acequire("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype); + + +config.defineOptions(EditSession.prototype, "session", { + wrap: { + set: function(value) { + if (!value || value == "off") + value = false; + else if (value == "free") + value = true; + else if (value == "printMargin") + value = -1; + else if (typeof value == "string") + value = parseInt(value, 10) || false; + + if (this.$wrap == value) + return; + this.$wrap = value; + if (!value) { + this.setUseWrapMode(false); + } else { + var col = typeof value == "number" ? value : null; + this.setWrapLimitRange(col, col); + this.setUseWrapMode(true); + } + }, + get: function() { + if (this.getUseWrapMode()) { + if (this.$wrap == -1) + return "printMargin"; + if (!this.getWrapLimitRange().min) + return "free"; + return this.$wrap; + } + return "off"; + }, + handlesSet: true + }, + wrapMethod: { + set: function(val) { + val = val == "auto" + ? this.$mode.type != "text" + : val != "text"; + if (val != this.$wrapAsCode) { + this.$wrapAsCode = val; + if (this.$useWrapMode) { + this.$modified = true; + this.$resetRowCache(0); + this.$updateWrapData(0, this.getLength() - 1); + } + } + }, + initialValue: "auto" + }, + indentedSoftWrap: { initialValue: true }, + firstLineNumber: { + set: function() {this._signal("changeBreakpoint");}, + initialValue: 1 + }, + useWorker: { + set: function(useWorker) { + this.$useWorker = useWorker; + + this.$stopWorker(); + if (useWorker) + this.$startWorker(); + }, + initialValue: true + }, + useSoftTabs: {initialValue: true}, + tabSize: { + set: function(tabSize) { + if (isNaN(tabSize) || this.$tabSize === tabSize) return; + + this.$modified = true; + this.$rowLengthCache = []; + this.$tabSize = tabSize; + this._signal("changeTabSize"); + }, + initialValue: 4, + handlesSet: true + }, + overwrite: { + set: function(val) {this._signal("changeOverwrite");}, + initialValue: false + }, + newLineMode: { + set: function(val) {this.doc.setNewLineMode(val)}, + get: function() {return this.doc.getNewLineMode()}, + handlesSet: true + }, + mode: { + set: function(val) { this.setMode(val) }, + get: function() { return this.$modeId } + } +}); + +exports.EditSession = EditSession; +}); + +ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(acequire, exports, module) { +"use strict"; + +var lang = acequire("./lib/lang"); +var oop = acequire("./lib/oop"); +var Range = acequire("./range").Range; + +var Search = function() { + this.$options = {}; +}; + +(function() { + this.set = function(options) { + oop.mixin(this.$options, options); + return this; + }; + this.getOptions = function() { + return lang.copyObject(this.$options); + }; + this.setOptions = function(options) { + this.$options = options; + }; + this.find = function(session) { + var options = this.$options; + var iterator = this.$matchIterator(session, options); + if (!iterator) + return false; + + var firstRange = null; + iterator.forEach(function(range, row, offset) { + if (!range.start) { + var column = range.offset + (offset || 0); + firstRange = new Range(row, column, row, column + range.length); + if (!range.length && options.start && options.start.start + && options.skipCurrent != false && firstRange.isEqual(options.start) + ) { + firstRange = null; + return false; + } + } else + firstRange = range; + return true; + }); + + return firstRange; + }; + this.findAll = function(session) { + var options = this.$options; + if (!options.needle) + return []; + this.$assembleRegExp(options); + + var range = options.range; + var lines = range + ? session.getLines(range.start.row, range.end.row) + : session.doc.getAllLines(); + + var ranges = []; + var re = options.re; + if (options.$isMultiLine) { + var len = re.length; + var maxRow = lines.length - len; + var prevRange; + outer: for (var row = re.offset || 0; row <= maxRow; row++) { + for (var j = 0; j < len; j++) + if (lines[row + j].search(re[j]) == -1) + continue outer; + + var startLine = lines[row]; + var line = lines[row + len - 1]; + var startIndex = startLine.length - startLine.match(re[0])[0].length; + var endIndex = line.match(re[len - 1])[0].length; + + if (prevRange && prevRange.end.row === row && + prevRange.end.column > startIndex + ) { + continue; + } + ranges.push(prevRange = new Range( + row, startIndex, row + len - 1, endIndex + )); + if (len > 2) + row = row + len - 2; + } + } else { + for (var i = 0; i < lines.length; i++) { + var matches = lang.getMatchOffsets(lines[i], re); + for (var j = 0; j < matches.length; j++) { + var match = matches[j]; + ranges.push(new Range(i, match.offset, i, match.offset + match.length)); + } + } + } + + if (range) { + var startColumn = range.start.column; + var endColumn = range.start.column; + var i = 0, j = ranges.length - 1; + while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row) + i++; + + while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row) + j--; + + ranges = ranges.slice(i, j + 1); + for (i = 0, j = ranges.length; i < j; i++) { + ranges[i].start.row += range.start.row; + ranges[i].end.row += range.start.row; + } + } + + return ranges; + }; + this.replace = function(input, replacement) { + var options = this.$options; + + var re = this.$assembleRegExp(options); + if (options.$isMultiLine) + return replacement; + + if (!re) + return; + + var match = re.exec(input); + if (!match || match[0].length != input.length) + return null; + + replacement = input.replace(re, replacement); + if (options.preserveCase) { + replacement = replacement.split(""); + for (var i = Math.min(input.length, input.length); i--; ) { + var ch = input[i]; + if (ch && ch.toLowerCase() != ch) + replacement[i] = replacement[i].toUpperCase(); + else + replacement[i] = replacement[i].toLowerCase(); + } + replacement = replacement.join(""); + } + + return replacement; + }; + + this.$matchIterator = function(session, options) { + var re = this.$assembleRegExp(options); + if (!re) + return false; + + var callback; + if (options.$isMultiLine) { + var len = re.length; + var matchIterator = function(line, row, offset) { + var startIndex = line.search(re[0]); + if (startIndex == -1) + return; + for (var i = 1; i < len; i++) { + line = session.getLine(row + i); + if (line.search(re[i]) == -1) + return; + } + + var endIndex = line.match(re[len - 1])[0].length; + + var range = new Range(row, startIndex, row + len - 1, endIndex); + if (re.offset == 1) { + range.start.row--; + range.start.column = Number.MAX_VALUE; + } else if (offset) + range.start.column += offset; + + if (callback(range)) + return true; + }; + } else if (options.backwards) { + var matchIterator = function(line, row, startIndex) { + var matches = lang.getMatchOffsets(line, re); + for (var i = matches.length-1; i >= 0; i--) + if (callback(matches[i], row, startIndex)) + return true; + }; + } else { + var matchIterator = function(line, row, startIndex) { + var matches = lang.getMatchOffsets(line, re); + for (var i = 0; i < matches.length; i++) + if (callback(matches[i], row, startIndex)) + return true; + }; + } + + var lineIterator = this.$lineIterator(session, options); + + return { + forEach: function(_callback) { + callback = _callback; + lineIterator.forEach(matchIterator); + } + }; + }; + + this.$assembleRegExp = function(options, $disableFakeMultiline) { + if (options.needle instanceof RegExp) + return options.re = options.needle; + + var needle = options.needle; + + if (!options.needle) + return options.re = false; + + if (!options.regExp) + needle = lang.escapeRegExp(needle); + + if (options.wholeWord) + needle = "\\b" + needle + "\\b"; + + var modifier = options.caseSensitive ? "gm" : "gmi"; + + options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle); + if (options.$isMultiLine) + return options.re = this.$assembleMultilineRegExp(needle, modifier); + + try { + var re = new RegExp(needle, modifier); + } catch(e) { + re = false; + } + return options.re = re; + }; + + this.$assembleMultilineRegExp = function(needle, modifier) { + var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n"); + var re = []; + for (var i = 0; i < parts.length; i++) try { + re.push(new RegExp(parts[i], modifier)); + } catch(e) { + return false; + } + if (parts[0] == "") { + re.shift(); + re.offset = 1; + } else { + re.offset = 0; + } + return re; + }; + + this.$lineIterator = function(session, options) { + var backwards = options.backwards == true; + var skipCurrent = options.skipCurrent != false; + + var range = options.range; + var start = options.start; + if (!start) + start = range ? range[backwards ? "end" : "start"] : session.selection.getRange(); + + if (start.start) + start = start[skipCurrent != backwards ? "end" : "start"]; + + var firstRow = range ? range.start.row : 0; + var lastRow = range ? range.end.row : session.getLength() - 1; + + var forEach = backwards ? function(callback) { + var row = start.row; + + var line = session.getLine(row).substring(0, start.column); + if (callback(line, row)) + return; + + for (row--; row >= firstRow; row--) + if (callback(session.getLine(row), row)) + return; + + if (options.wrap == false) + return; + + for (row = lastRow, firstRow = start.row; row >= firstRow; row--) + if (callback(session.getLine(row), row)) + return; + } : function(callback) { + var row = start.row; + + var line = session.getLine(row).substr(start.column); + if (callback(line, row, start.column)) + return; + + for (row = row+1; row <= lastRow; row++) + if (callback(session.getLine(row), row)) + return; + + if (options.wrap == false) + return; + + for (row = firstRow, lastRow = start.row; row <= lastRow; row++) + if (callback(session.getLine(row), row)) + return; + }; + + return {forEach: forEach}; + }; + +}).call(Search.prototype); + +exports.Search = Search; +}); + +ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(acequire, exports, module) { +"use strict"; + +var keyUtil = acequire("../lib/keys"); +var useragent = acequire("../lib/useragent"); +var KEY_MODS = keyUtil.KEY_MODS; + +function HashHandler(config, platform) { + this.platform = platform || (useragent.isMac ? "mac" : "win"); + this.commands = {}; + this.commandKeyBinding = {}; + this.addCommands(config); + this.$singleCommand = true; +} + +function MultiHashHandler(config, platform) { + HashHandler.call(this, config, platform); + this.$singleCommand = false; +} + +MultiHashHandler.prototype = HashHandler.prototype; + +(function() { + + + this.addCommand = function(command) { + if (this.commands[command.name]) + this.removeCommand(command); + + this.commands[command.name] = command; + + if (command.bindKey) + this._buildKeyHash(command); + }; + + this.removeCommand = function(command, keepCommand) { + var name = command && (typeof command === 'string' ? command : command.name); + command = this.commands[name]; + if (!keepCommand) + delete this.commands[name]; + var ckb = this.commandKeyBinding; + for (var keyId in ckb) { + var cmdGroup = ckb[keyId]; + if (cmdGroup == command) { + delete ckb[keyId]; + } else if (Array.isArray(cmdGroup)) { + var i = cmdGroup.indexOf(command); + if (i != -1) { + cmdGroup.splice(i, 1); + if (cmdGroup.length == 1) + ckb[keyId] = cmdGroup[0]; + } + } + } + }; + + this.bindKey = function(key, command, position) { + if (typeof key == "object" && key) { + if (position == undefined) + position = key.position; + key = key[this.platform]; + } + if (!key) + return; + if (typeof command == "function") + return this.addCommand({exec: command, bindKey: key, name: command.name || key}); + + key.split("|").forEach(function(keyPart) { + var chain = ""; + if (keyPart.indexOf(" ") != -1) { + var parts = keyPart.split(/\s+/); + keyPart = parts.pop(); + parts.forEach(function(keyPart) { + var binding = this.parseKeys(keyPart); + var id = KEY_MODS[binding.hashId] + binding.key; + chain += (chain ? " " : "") + id; + this._addCommandToBinding(chain, "chainKeys"); + }, this); + chain += " "; + } + var binding = this.parseKeys(keyPart); + var id = KEY_MODS[binding.hashId] + binding.key; + this._addCommandToBinding(chain + id, command, position); + }, this); + }; + + function getPosition(command) { + return typeof command == "object" && command.bindKey + && command.bindKey.position || 0; + } + this._addCommandToBinding = function(keyId, command, position) { + var ckb = this.commandKeyBinding, i; + if (!command) { + delete ckb[keyId]; + } else if (!ckb[keyId] || this.$singleCommand) { + ckb[keyId] = command; + } else { + if (!Array.isArray(ckb[keyId])) { + ckb[keyId] = [ckb[keyId]]; + } else if ((i = ckb[keyId].indexOf(command)) != -1) { + ckb[keyId].splice(i, 1); + } + + if (typeof position != "number") { + if (position || command.isDefault) + position = -100; + else + position = getPosition(command); + } + var commands = ckb[keyId]; + for (i = 0; i < commands.length; i++) { + var other = commands[i]; + var otherPos = getPosition(other); + if (otherPos > position) + break; + } + commands.splice(i, 0, command); + } + }; + + this.addCommands = function(commands) { + commands && Object.keys(commands).forEach(function(name) { + var command = commands[name]; + if (!command) + return; + + if (typeof command === "string") + return this.bindKey(command, name); + + if (typeof command === "function") + command = { exec: command }; + + if (typeof command !== "object") + return; + + if (!command.name) + command.name = name; + + this.addCommand(command); + }, this); + }; + + this.removeCommands = function(commands) { + Object.keys(commands).forEach(function(name) { + this.removeCommand(commands[name]); + }, this); + }; + + this.bindKeys = function(keyList) { + Object.keys(keyList).forEach(function(key) { + this.bindKey(key, keyList[key]); + }, this); + }; + + this._buildKeyHash = function(command) { + this.bindKey(command.bindKey, command); + }; + this.parseKeys = function(keys) { + var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}); + var key = parts.pop(); + + var keyCode = keyUtil[key]; + if (keyUtil.FUNCTION_KEYS[keyCode]) + key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase(); + else if (!parts.length) + return {key: key, hashId: -1}; + else if (parts.length == 1 && parts[0] == "shift") + return {key: key.toUpperCase(), hashId: -1}; + + var hashId = 0; + for (var i = parts.length; i--;) { + var modifier = keyUtil.KEY_MODS[parts[i]]; + if (modifier == null) { + if (typeof console != "undefined") + console.error("invalid modifier " + parts[i] + " in " + keys); + return false; + } + hashId |= modifier; + } + return {key: key, hashId: hashId}; + }; + + this.findKeyCommand = function findKeyCommand(hashId, keyString) { + var key = KEY_MODS[hashId] + keyString; + return this.commandKeyBinding[key]; + }; + + this.handleKeyboard = function(data, hashId, keyString, keyCode) { + if (keyCode < 0) return; + var key = KEY_MODS[hashId] + keyString; + var command = this.commandKeyBinding[key]; + if (data.$keyChain) { + data.$keyChain += " " + key; + command = this.commandKeyBinding[data.$keyChain] || command; + } + + if (command) { + if (command == "chainKeys" || command[command.length - 1] == "chainKeys") { + data.$keyChain = data.$keyChain || key; + return {command: "null"}; + } + } + + if (data.$keyChain) { + if ((!hashId || hashId == 4) && keyString.length == 1) + data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input + else if (hashId == -1 || keyCode > 0) + data.$keyChain = ""; // reset keyChain + } + return {command: command}; + }; + + this.getStatusText = function(editor, data) { + return data.$keyChain || ""; + }; + +}).call(HashHandler.prototype); + +exports.HashHandler = HashHandler; +exports.MultiHashHandler = MultiHashHandler; +}); + +ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var MultiHashHandler = acequire("../keyboard/hash_handler").MultiHashHandler; +var EventEmitter = acequire("../lib/event_emitter").EventEmitter; + +var CommandManager = function(platform, commands) { + MultiHashHandler.call(this, commands, platform); + this.byName = this.commands; + this.setDefaultHandler("exec", function(e) { + return e.command.exec(e.editor, e.args || {}); + }); +}; + +oop.inherits(CommandManager, MultiHashHandler); + +(function() { + + oop.implement(this, EventEmitter); + + this.exec = function(command, editor, args) { + if (Array.isArray(command)) { + for (var i = command.length; i--; ) { + if (this.exec(command[i], editor, args)) return true; + } + return false; + } + + if (typeof command === "string") + command = this.commands[command]; + + if (!command) + return false; + + if (editor && editor.$readOnly && !command.readOnly) + return false; + + var e = {editor: editor, command: command, args: args}; + e.returnValue = this._emit("exec", e); + this._signal("afterExec", e); + + return e.returnValue === false ? false : true; + }; + + this.toggleRecording = function(editor) { + if (this.$inReplay) + return; + + editor && editor._emit("changeStatus"); + if (this.recording) { + this.macro.pop(); + this.removeEventListener("exec", this.$addCommandToMacro); + + if (!this.macro.length) + this.macro = this.oldMacro; + + return this.recording = false; + } + if (!this.$addCommandToMacro) { + this.$addCommandToMacro = function(e) { + this.macro.push([e.command, e.args]); + }.bind(this); + } + + this.oldMacro = this.macro; + this.macro = []; + this.on("exec", this.$addCommandToMacro); + return this.recording = true; + }; + + this.replay = function(editor) { + if (this.$inReplay || !this.macro) + return; + + if (this.recording) + return this.toggleRecording(editor); + + try { + this.$inReplay = true; + this.macro.forEach(function(x) { + if (typeof x == "string") + this.exec(x, editor); + else + this.exec(x[0], editor, x[1]); + }, this); + } finally { + this.$inReplay = false; + } + }; + + this.trimMacro = function(m) { + return m.map(function(x){ + if (typeof x[0] != "string") + x[0] = x[0].name; + if (!x[1]) + x = x[0]; + return x; + }); + }; + +}).call(CommandManager.prototype); + +exports.CommandManager = CommandManager; + +}); + +ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(acequire, exports, module) { +"use strict"; + +var lang = acequire("../lib/lang"); +var config = acequire("../config"); +var Range = acequire("../range").Range; + +function bindKey(win, mac) { + return {win: win, mac: mac}; +} +exports.commands = [{ + name: "showSettingsMenu", + bindKey: bindKey("Ctrl-,", "Command-,"), + exec: function(editor) { + config.loadModule("ace/ext/settings_menu", function(module) { + module.init(editor); + editor.showSettingsMenu(); + }); + }, + readOnly: true +}, { + name: "goToNextError", + bindKey: bindKey("Alt-E", "Ctrl-E"), + exec: function(editor) { + config.loadModule("ace/ext/error_marker", function(module) { + module.showErrorMarker(editor, 1); + }); + }, + scrollIntoView: "animate", + readOnly: true +}, { + name: "goToPreviousError", + bindKey: bindKey("Alt-Shift-E", "Ctrl-Shift-E"), + exec: function(editor) { + config.loadModule("ace/ext/error_marker", function(module) { + module.showErrorMarker(editor, -1); + }); + }, + scrollIntoView: "animate", + readOnly: true +}, { + name: "selectall", + bindKey: bindKey("Ctrl-A", "Command-A"), + exec: function(editor) { editor.selectAll(); }, + readOnly: true +}, { + name: "centerselection", + bindKey: bindKey(null, "Ctrl-L"), + exec: function(editor) { editor.centerSelection(); }, + readOnly: true +}, { + name: "gotoline", + bindKey: bindKey("Ctrl-L", "Command-L"), + exec: function(editor) { + var line = parseInt(prompt("Enter line number:"), 10); + if (!isNaN(line)) { + editor.gotoLine(line); + } + }, + readOnly: true +}, { + name: "fold", + bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), + exec: function(editor) { editor.session.toggleFold(false); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true +}, { + name: "unfold", + bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), + exec: function(editor) { editor.session.toggleFold(true); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true +}, { + name: "toggleFoldWidget", + bindKey: bindKey("F2", "F2"), + exec: function(editor) { editor.session.toggleFoldWidget(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true +}, { + name: "toggleParentFoldWidget", + bindKey: bindKey("Alt-F2", "Alt-F2"), + exec: function(editor) { editor.session.toggleFoldWidget(true); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true +}, { + name: "foldall", + bindKey: bindKey(null, "Ctrl-Command-Option-0"), + exec: function(editor) { editor.session.foldAll(); }, + scrollIntoView: "center", + readOnly: true +}, { + name: "foldOther", + bindKey: bindKey("Alt-0", "Command-Option-0"), + exec: function(editor) { + editor.session.foldAll(); + editor.session.unfold(editor.selection.getAllRanges()); + }, + scrollIntoView: "center", + readOnly: true +}, { + name: "unfoldall", + bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), + exec: function(editor) { editor.session.unfold(); }, + scrollIntoView: "center", + readOnly: true +}, { + name: "findnext", + bindKey: bindKey("Ctrl-K", "Command-G"), + exec: function(editor) { editor.findNext(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true +}, { + name: "findprevious", + bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), + exec: function(editor) { editor.findPrevious(); }, + multiSelectAction: "forEach", + scrollIntoView: "center", + readOnly: true +}, { + name: "selectOrFindNext", + bindKey: bindKey("Alt-K", "Ctrl-G"), + exec: function(editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + else + editor.findNext(); + }, + readOnly: true +}, { + name: "selectOrFindPrevious", + bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), + exec: function(editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + else + editor.findPrevious(); + }, + readOnly: true +}, { + name: "find", + bindKey: bindKey("Ctrl-F", "Command-F"), + exec: function(editor) { + config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)}); + }, + readOnly: true +}, { + name: "overwrite", + bindKey: "Insert", + exec: function(editor) { editor.toggleOverwrite(); }, + readOnly: true +}, { + name: "selecttostart", + bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"), + exec: function(editor) { editor.getSelection().selectFileStart(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" +}, { + name: "gotostart", + bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), + exec: function(editor) { editor.navigateFileStart(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" +}, { + name: "selectup", + bindKey: bindKey("Shift-Up", "Shift-Up"), + exec: function(editor) { editor.getSelection().selectUp(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "golineup", + bindKey: bindKey("Up", "Up|Ctrl-P"), + exec: function(editor, args) { editor.navigateUp(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selecttoend", + bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"), + exec: function(editor) { editor.getSelection().selectFileEnd(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" +}, { + name: "gotoend", + bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), + exec: function(editor) { editor.navigateFileEnd(); }, + multiSelectAction: "forEach", + readOnly: true, + scrollIntoView: "animate", + aceCommandGroup: "fileJump" +}, { + name: "selectdown", + bindKey: bindKey("Shift-Down", "Shift-Down"), + exec: function(editor) { editor.getSelection().selectDown(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "golinedown", + bindKey: bindKey("Down", "Down|Ctrl-N"), + exec: function(editor, args) { editor.navigateDown(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectwordleft", + bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), + exec: function(editor) { editor.getSelection().selectWordLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "gotowordleft", + bindKey: bindKey("Ctrl-Left", "Option-Left"), + exec: function(editor) { editor.navigateWordLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selecttolinestart", + bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"), + exec: function(editor) { editor.getSelection().selectLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "gotolinestart", + bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), + exec: function(editor) { editor.navigateLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectleft", + bindKey: bindKey("Shift-Left", "Shift-Left"), + exec: function(editor) { editor.getSelection().selectLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "gotoleft", + bindKey: bindKey("Left", "Left|Ctrl-B"), + exec: function(editor, args) { editor.navigateLeft(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectwordright", + bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), + exec: function(editor) { editor.getSelection().selectWordRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "gotowordright", + bindKey: bindKey("Ctrl-Right", "Option-Right"), + exec: function(editor) { editor.navigateWordRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selecttolineend", + bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"), + exec: function(editor) { editor.getSelection().selectLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "gotolineend", + bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), + exec: function(editor) { editor.navigateLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectright", + bindKey: bindKey("Shift-Right", "Shift-Right"), + exec: function(editor) { editor.getSelection().selectRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "gotoright", + bindKey: bindKey("Right", "Right|Ctrl-F"), + exec: function(editor, args) { editor.navigateRight(args.times); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectpagedown", + bindKey: "Shift-PageDown", + exec: function(editor) { editor.selectPageDown(); }, + readOnly: true +}, { + name: "pagedown", + bindKey: bindKey(null, "Option-PageDown"), + exec: function(editor) { editor.scrollPageDown(); }, + readOnly: true +}, { + name: "gotopagedown", + bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), + exec: function(editor) { editor.gotoPageDown(); }, + readOnly: true +}, { + name: "selectpageup", + bindKey: "Shift-PageUp", + exec: function(editor) { editor.selectPageUp(); }, + readOnly: true +}, { + name: "pageup", + bindKey: bindKey(null, "Option-PageUp"), + exec: function(editor) { editor.scrollPageUp(); }, + readOnly: true +}, { + name: "gotopageup", + bindKey: "PageUp", + exec: function(editor) { editor.gotoPageUp(); }, + readOnly: true +}, { + name: "scrollup", + bindKey: bindKey("Ctrl-Up", null), + exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, + readOnly: true +}, { + name: "scrolldown", + bindKey: bindKey("Ctrl-Down", null), + exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, + readOnly: true +}, { + name: "selectlinestart", + bindKey: "Shift-Home", + exec: function(editor) { editor.getSelection().selectLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectlineend", + bindKey: "Shift-End", + exec: function(editor) { editor.getSelection().selectLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "togglerecording", + bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), + exec: function(editor) { editor.commands.toggleRecording(editor); }, + readOnly: true +}, { + name: "replaymacro", + bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), + exec: function(editor) { editor.commands.replay(editor); }, + readOnly: true +}, { + name: "jumptomatching", + bindKey: bindKey("Ctrl-P", "Ctrl-P"), + exec: function(editor) { editor.jumpToMatching(); }, + multiSelectAction: "forEach", + scrollIntoView: "animate", + readOnly: true +}, { + name: "selecttomatching", + bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"), + exec: function(editor) { editor.jumpToMatching(true); }, + multiSelectAction: "forEach", + scrollIntoView: "animate", + readOnly: true +}, { + name: "expandToMatching", + bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), + exec: function(editor) { editor.jumpToMatching(true, true); }, + multiSelectAction: "forEach", + scrollIntoView: "animate", + readOnly: true +}, { + name: "passKeysToBrowser", + bindKey: bindKey(null, null), + exec: function() {}, + passEvent: true, + readOnly: true +}, { + name: "copy", + exec: function(editor) { + }, + readOnly: true +}, +{ + name: "cut", + exec: function(editor) { + var range = editor.getSelectionRange(); + editor._emit("cut", range); + + if (!editor.selection.isEmpty()) { + editor.session.remove(range); + editor.clearSelection(); + } + }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" +}, { + name: "paste", + exec: function(editor, args) { + editor.$handlePaste(args); + }, + scrollIntoView: "cursor" +}, { + name: "removeline", + bindKey: bindKey("Ctrl-D", "Command-D"), + exec: function(editor) { editor.removeLines(); }, + scrollIntoView: "cursor", + multiSelectAction: "forEachLine" +}, { + name: "duplicateSelection", + bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), + exec: function(editor) { editor.duplicateSelection(); }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" +}, { + name: "sortlines", + bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), + exec: function(editor) { editor.sortLines(); }, + scrollIntoView: "selection", + multiSelectAction: "forEachLine" +}, { + name: "togglecomment", + bindKey: bindKey("Ctrl-/", "Command-/"), + exec: function(editor) { editor.toggleCommentLines(); }, + multiSelectAction: "forEachLine", + scrollIntoView: "selectionPart" +}, { + name: "toggleBlockComment", + bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), + exec: function(editor) { editor.toggleBlockComment(); }, + multiSelectAction: "forEach", + scrollIntoView: "selectionPart" +}, { + name: "modifyNumberUp", + bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), + exec: function(editor) { editor.modifyNumber(1); }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" +}, { + name: "modifyNumberDown", + bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), + exec: function(editor) { editor.modifyNumber(-1); }, + scrollIntoView: "cursor", + multiSelectAction: "forEach" +}, { + name: "replace", + bindKey: bindKey("Ctrl-H", "Command-Option-F"), + exec: function(editor) { + config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)}); + } +}, { + name: "undo", + bindKey: bindKey("Ctrl-Z", "Command-Z"), + exec: function(editor) { editor.undo(); } +}, { + name: "redo", + bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), + exec: function(editor) { editor.redo(); } +}, { + name: "copylinesup", + bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), + exec: function(editor) { editor.copyLinesUp(); }, + scrollIntoView: "cursor" +}, { + name: "movelinesup", + bindKey: bindKey("Alt-Up", "Option-Up"), + exec: function(editor) { editor.moveLinesUp(); }, + scrollIntoView: "cursor" +}, { + name: "copylinesdown", + bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), + exec: function(editor) { editor.copyLinesDown(); }, + scrollIntoView: "cursor" +}, { + name: "movelinesdown", + bindKey: bindKey("Alt-Down", "Option-Down"), + exec: function(editor) { editor.moveLinesDown(); }, + scrollIntoView: "cursor" +}, { + name: "del", + bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), + exec: function(editor) { editor.remove("right"); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "backspace", + bindKey: bindKey( + "Shift-Backspace|Backspace", + "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H" + ), + exec: function(editor) { editor.remove("left"); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "cut_or_delete", + bindKey: bindKey("Shift-Delete", null), + exec: function(editor) { + if (editor.selection.isEmpty()) { + editor.remove("left"); + } else { + return false; + } + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "removetolinestart", + bindKey: bindKey("Alt-Backspace", "Command-Backspace"), + exec: function(editor) { editor.removeToLineStart(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "removetolineend", + bindKey: bindKey("Alt-Delete", "Ctrl-K"), + exec: function(editor) { editor.removeToLineEnd(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "removewordleft", + bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), + exec: function(editor) { editor.removeWordLeft(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "removewordright", + bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), + exec: function(editor) { editor.removeWordRight(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "outdent", + bindKey: bindKey("Shift-Tab", "Shift-Tab"), + exec: function(editor) { editor.blockOutdent(); }, + multiSelectAction: "forEach", + scrollIntoView: "selectionPart" +}, { + name: "indent", + bindKey: bindKey("Tab", "Tab"), + exec: function(editor) { editor.indent(); }, + multiSelectAction: "forEach", + scrollIntoView: "selectionPart" +}, { + name: "blockoutdent", + bindKey: bindKey("Ctrl-[", "Ctrl-["), + exec: function(editor) { editor.blockOutdent(); }, + multiSelectAction: "forEachLine", + scrollIntoView: "selectionPart" +}, { + name: "blockindent", + bindKey: bindKey("Ctrl-]", "Ctrl-]"), + exec: function(editor) { editor.blockIndent(); }, + multiSelectAction: "forEachLine", + scrollIntoView: "selectionPart" +}, { + name: "insertstring", + exec: function(editor, str) { editor.insert(str); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "inserttext", + exec: function(editor, args) { + editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "splitline", + bindKey: bindKey(null, "Ctrl-O"), + exec: function(editor) { editor.splitLine(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "transposeletters", + bindKey: bindKey("Ctrl-T", "Ctrl-T"), + exec: function(editor) { editor.transposeLetters(); }, + multiSelectAction: function(editor) {editor.transposeSelections(1); }, + scrollIntoView: "cursor" +}, { + name: "touppercase", + bindKey: bindKey("Ctrl-U", "Ctrl-U"), + exec: function(editor) { editor.toUpperCase(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "tolowercase", + bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), + exec: function(editor) { editor.toLowerCase(); }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "expandtoline", + bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), + exec: function(editor) { + var range = editor.selection.getRange(); + + range.start.column = range.end.column = 0; + range.end.row++; + editor.selection.setRange(range, false); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "joinlines", + bindKey: bindKey(null, null), + exec: function(editor) { + var isBackwards = editor.selection.isBackwards(); + var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor(); + var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead(); + var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length; + var selectedText = editor.session.doc.getTextRange(editor.selection.getRange()); + var selectedCount = selectedText.replace(/\n\s*/, " ").length; + var insertLine = editor.session.doc.getLine(selectionStart.row); + + for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) { + var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i))); + if (curLine.length !== 0) { + curLine = " " + curLine; + } + insertLine += curLine; + } + + if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) { + insertLine += editor.session.doc.getNewLineCharacter(); + } + + editor.clearSelection(); + editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine); + + if (selectedCount > 0) { + editor.selection.moveCursorTo(selectionStart.row, selectionStart.column); + editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount); + } else { + firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol; + editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol); + } + }, + multiSelectAction: "forEach", + readOnly: true +}, { + name: "invertSelection", + bindKey: bindKey(null, null), + exec: function(editor) { + var endRow = editor.session.doc.getLength() - 1; + var endCol = editor.session.doc.getLine(endRow).length; + var ranges = editor.selection.rangeList.ranges; + var newRanges = []; + if (ranges.length < 1) { + ranges = [editor.selection.getRange()]; + } + + for (var i = 0; i < ranges.length; i++) { + if (i == (ranges.length - 1)) { + if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) { + newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol)); + } + } + + if (i === 0) { + if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) { + newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column)); + } + } else { + newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column)); + } + } + + editor.exitMultiSelectMode(); + editor.clearSelection(); + + for(var i = 0; i < newRanges.length; i++) { + editor.selection.addRange(newRanges[i], false); + } + }, + readOnly: true, + scrollIntoView: "none" +}]; + +}); + +ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(acequire, exports, module) { +"use strict"; + +acequire("./lib/fixoldbrowsers"); + +var oop = acequire("./lib/oop"); +var dom = acequire("./lib/dom"); +var lang = acequire("./lib/lang"); +var useragent = acequire("./lib/useragent"); +var TextInput = acequire("./keyboard/textinput").TextInput; +var MouseHandler = acequire("./mouse/mouse_handler").MouseHandler; +var FoldHandler = acequire("./mouse/fold_handler").FoldHandler; +var KeyBinding = acequire("./keyboard/keybinding").KeyBinding; +var EditSession = acequire("./edit_session").EditSession; +var Search = acequire("./search").Search; +var Range = acequire("./range").Range; +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var CommandManager = acequire("./commands/command_manager").CommandManager; +var defaultCommands = acequire("./commands/default_commands").commands; +var config = acequire("./config"); +var TokenIterator = acequire("./token_iterator").TokenIterator; +var Editor = function(renderer, session) { + var container = renderer.getContainerElement(); + this.container = container; + this.renderer = renderer; + + this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); + this.textInput = new TextInput(renderer.getTextAreaContainer(), this); + this.renderer.textarea = this.textInput.getElement(); + this.keyBinding = new KeyBinding(this); + this.$mouseHandler = new MouseHandler(this); + new FoldHandler(this); + + this.$blockScrolling = 0; + this.$search = new Search().set({ + wrap: true + }); + + this.$historyTracker = this.$historyTracker.bind(this); + this.commands.on("exec", this.$historyTracker); + + this.$initOperationListeners(); + + this._$emitInputEvent = lang.delayedCall(function() { + this._signal("input", {}); + if (this.session && this.session.bgTokenizer) + this.session.bgTokenizer.scheduleStart(); + }.bind(this)); + + this.on("change", function(_, _self) { + _self._$emitInputEvent.schedule(31); + }); + + this.setSession(session || new EditSession("")); + config.resetOptions(this); + config._signal("editor", this); +}; + +(function(){ + + oop.implement(this, EventEmitter); + + this.$initOperationListeners = function() { + function last(a) {return a[a.length - 1]} + + this.selections = []; + this.commands.on("exec", this.startOperation.bind(this), true); + this.commands.on("afterExec", this.endOperation.bind(this), true); + + this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this)); + + this.on("change", function() { + this.curOp || this.startOperation(); + this.curOp.docChanged = true; + }.bind(this), true); + + this.on("changeSelection", function() { + this.curOp || this.startOperation(); + this.curOp.selectionChanged = true; + }.bind(this), true); + }; + + this.curOp = null; + this.prevOp = {}; + this.startOperation = function(commadEvent) { + if (this.curOp) { + if (!commadEvent || this.curOp.command) + return; + this.prevOp = this.curOp; + } + if (!commadEvent) { + this.previousCommand = null; + commadEvent = {}; + } + + this.$opResetTimer.schedule(); + this.curOp = { + command: commadEvent.command || {}, + args: commadEvent.args, + scrollTop: this.renderer.scrollTop + }; + if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined) + this.$blockScrolling++; + }; + + this.endOperation = function(e) { + if (this.curOp) { + if (e && e.returnValue === false) + return this.curOp = null; + this._signal("beforeEndOperation"); + var command = this.curOp.command; + if (command.name && this.$blockScrolling > 0) + this.$blockScrolling--; + var scrollIntoView = command && command.scrollIntoView; + if (scrollIntoView) { + switch (scrollIntoView) { + case "center-animate": + scrollIntoView = "animate"; + case "center": + this.renderer.scrollCursorIntoView(null, 0.5); + break; + case "animate": + case "cursor": + this.renderer.scrollCursorIntoView(); + break; + case "selectionPart": + var range = this.selection.getRange(); + var config = this.renderer.layerConfig; + if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) { + this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead); + } + break; + default: + break; + } + if (scrollIntoView == "animate") + this.renderer.animateScrolling(this.curOp.scrollTop); + } + + this.prevOp = this.curOp; + this.curOp = null; + } + }; + this.$mergeableCommands = ["backspace", "del", "insertstring"]; + this.$historyTracker = function(e) { + if (!this.$mergeUndoDeltas) + return; + + var prev = this.prevOp; + var mergeableCommands = this.$mergeableCommands; + var shouldMerge = prev.command && (e.command.name == prev.command.name); + if (e.command.name == "insertstring") { + var text = e.args; + if (this.mergeNextCommand === undefined) + this.mergeNextCommand = true; + + shouldMerge = shouldMerge + && this.mergeNextCommand // previous command allows to coalesce with + && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type + + this.mergeNextCommand = true; + } else { + shouldMerge = shouldMerge + && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable + } + + if ( + this.$mergeUndoDeltas != "always" + && Date.now() - this.sequenceStartTime > 2000 + ) { + shouldMerge = false; // the sequence is too long + } + + if (shouldMerge) + this.session.mergeUndoDeltas = true; + else if (mergeableCommands.indexOf(e.command.name) !== -1) + this.sequenceStartTime = Date.now(); + }; + this.setKeyboardHandler = function(keyboardHandler, cb) { + if (keyboardHandler && typeof keyboardHandler === "string") { + this.$keybindingId = keyboardHandler; + var _self = this; + config.loadModule(["keybinding", keyboardHandler], function(module) { + if (_self.$keybindingId == keyboardHandler) + _self.keyBinding.setKeyboardHandler(module && module.handler); + cb && cb(); + }); + } else { + this.$keybindingId = null; + this.keyBinding.setKeyboardHandler(keyboardHandler); + cb && cb(); + } + }; + this.getKeyboardHandler = function() { + return this.keyBinding.getKeyboardHandler(); + }; + this.setSession = function(session) { + if (this.session == session) + return; + if (this.curOp) this.endOperation(); + this.curOp = {}; + + var oldSession = this.session; + if (oldSession) { + this.session.off("change", this.$onDocumentChange); + this.session.off("changeMode", this.$onChangeMode); + this.session.off("tokenizerUpdate", this.$onTokenizerUpdate); + this.session.off("changeTabSize", this.$onChangeTabSize); + this.session.off("changeWrapLimit", this.$onChangeWrapLimit); + this.session.off("changeWrapMode", this.$onChangeWrapMode); + this.session.off("changeFold", this.$onChangeFold); + this.session.off("changeFrontMarker", this.$onChangeFrontMarker); + this.session.off("changeBackMarker", this.$onChangeBackMarker); + this.session.off("changeBreakpoint", this.$onChangeBreakpoint); + this.session.off("changeAnnotation", this.$onChangeAnnotation); + this.session.off("changeOverwrite", this.$onCursorChange); + this.session.off("changeScrollTop", this.$onScrollTopChange); + this.session.off("changeScrollLeft", this.$onScrollLeftChange); + + var selection = this.session.getSelection(); + selection.off("changeCursor", this.$onCursorChange); + selection.off("changeSelection", this.$onSelectionChange); + } + + this.session = session; + if (session) { + this.$onDocumentChange = this.onDocumentChange.bind(this); + session.on("change", this.$onDocumentChange); + this.renderer.setSession(session); + + this.$onChangeMode = this.onChangeMode.bind(this); + session.on("changeMode", this.$onChangeMode); + + this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); + session.on("tokenizerUpdate", this.$onTokenizerUpdate); + + this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer); + session.on("changeTabSize", this.$onChangeTabSize); + + this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); + session.on("changeWrapLimit", this.$onChangeWrapLimit); + + this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); + session.on("changeWrapMode", this.$onChangeWrapMode); + + this.$onChangeFold = this.onChangeFold.bind(this); + session.on("changeFold", this.$onChangeFold); + + this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); + this.session.on("changeFrontMarker", this.$onChangeFrontMarker); + + this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); + this.session.on("changeBackMarker", this.$onChangeBackMarker); + + this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); + this.session.on("changeBreakpoint", this.$onChangeBreakpoint); + + this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); + this.session.on("changeAnnotation", this.$onChangeAnnotation); + + this.$onCursorChange = this.onCursorChange.bind(this); + this.session.on("changeOverwrite", this.$onCursorChange); + + this.$onScrollTopChange = this.onScrollTopChange.bind(this); + this.session.on("changeScrollTop", this.$onScrollTopChange); + + this.$onScrollLeftChange = this.onScrollLeftChange.bind(this); + this.session.on("changeScrollLeft", this.$onScrollLeftChange); + + this.selection = session.getSelection(); + this.selection.on("changeCursor", this.$onCursorChange); + + this.$onSelectionChange = this.onSelectionChange.bind(this); + this.selection.on("changeSelection", this.$onSelectionChange); + + this.onChangeMode(); + + this.$blockScrolling += 1; + this.onCursorChange(); + this.$blockScrolling -= 1; + + this.onScrollTopChange(); + this.onScrollLeftChange(); + this.onSelectionChange(); + this.onChangeFrontMarker(); + this.onChangeBackMarker(); + this.onChangeBreakpoint(); + this.onChangeAnnotation(); + this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); + this.renderer.updateFull(); + } else { + this.selection = null; + this.renderer.setSession(session); + } + + this._signal("changeSession", { + session: session, + oldSession: oldSession + }); + + this.curOp = null; + + oldSession && oldSession._signal("changeEditor", {oldEditor: this}); + session && session._signal("changeEditor", {editor: this}); + }; + this.getSession = function() { + return this.session; + }; + this.setValue = function(val, cursorPos) { + this.session.doc.setValue(val); + + if (!cursorPos) + this.selectAll(); + else if (cursorPos == 1) + this.navigateFileEnd(); + else if (cursorPos == -1) + this.navigateFileStart(); + + return val; + }; + this.getValue = function() { + return this.session.getValue(); + }; + this.getSelection = function() { + return this.selection; + }; + this.resize = function(force) { + this.renderer.onResize(force); + }; + this.setTheme = function(theme, cb) { + this.renderer.setTheme(theme, cb); + }; + this.getTheme = function() { + return this.renderer.getTheme(); + }; + this.setStyle = function(style) { + this.renderer.setStyle(style); + }; + this.unsetStyle = function(style) { + this.renderer.unsetStyle(style); + }; + this.getFontSize = function () { + return this.getOption("fontSize") || + dom.computedStyle(this.container, "fontSize"); + }; + this.setFontSize = function(size) { + this.setOption("fontSize", size); + }; + + this.$highlightBrackets = function() { + if (this.session.$bracketHighlight) { + this.session.removeMarker(this.session.$bracketHighlight); + this.session.$bracketHighlight = null; + } + + if (this.$highlightPending) { + return; + } + var self = this; + this.$highlightPending = true; + setTimeout(function() { + self.$highlightPending = false; + var session = self.session; + if (!session || !session.bgTokenizer) return; + var pos = session.findMatchingBracket(self.getCursorPosition()); + if (pos) { + var range = new Range(pos.row, pos.column, pos.row, pos.column + 1); + } else if (session.$mode.getMatching) { + var range = session.$mode.getMatching(self.session); + } + if (range) + session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text"); + }, 50); + }; + this.$highlightTags = function() { + if (this.$highlightTagPending) + return; + var self = this; + this.$highlightTagPending = true; + setTimeout(function() { + self.$highlightTagPending = false; + + var session = self.session; + if (!session || !session.bgTokenizer) return; + + var pos = self.getCursorPosition(); + var iterator = new TokenIterator(self.session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + + if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { + session.removeMarker(session.$tagHighlight); + session.$tagHighlight = null; + return; + } + + if (token.type.indexOf("tag-open") != -1) { + token = iterator.stepForward(); + if (!token) + return; + } + + var tag = token.value; + var depth = 0; + var prevToken = iterator.stepBackward(); + + if (prevToken.value == '<'){ + do { + prevToken = token; + token = iterator.stepForward(); + + if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { + if (prevToken.value === '<'){ + depth++; + } else if (prevToken.value === '= 0); + } else { + do { + token = prevToken; + prevToken = iterator.stepBackward(); + + if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { + if (prevToken.value === '<') { + depth++; + } else if (prevToken.value === ' 1)) + highlight = false; + } + + if (session.$highlightLineMarker && !highlight) { + session.removeMarker(session.$highlightLineMarker.id); + session.$highlightLineMarker = null; + } else if (!session.$highlightLineMarker && highlight) { + var range = new Range(highlight.row, highlight.column, highlight.row, Infinity); + range.id = session.addMarker(range, "ace_active-line", "screenLine"); + session.$highlightLineMarker = range; + } else if (highlight) { + session.$highlightLineMarker.start.row = highlight.row; + session.$highlightLineMarker.end.row = highlight.row; + session.$highlightLineMarker.start.column = highlight.column; + session._signal("changeBackMarker"); + } + }; + + this.onSelectionChange = function(e) { + var session = this.session; + + if (session.$selectionMarker) { + session.removeMarker(session.$selectionMarker); + } + session.$selectionMarker = null; + + if (!this.selection.isEmpty()) { + var range = this.selection.getRange(); + var style = this.getSelectionStyle(); + session.$selectionMarker = session.addMarker(range, "ace_selection", style); + } else { + this.$updateHighlightActiveLine(); + } + + var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp(); + this.session.highlight(re); + + this._signal("changeSelection"); + }; + + this.$getSelectionHighLightRegexp = function() { + var session = this.session; + + var selection = this.getSelectionRange(); + if (selection.isEmpty() || selection.isMultiLine()) + return; + + var startOuter = selection.start.column - 1; + var endOuter = selection.end.column + 1; + var line = session.getLine(selection.start.row); + var lineCols = line.length; + var needle = line.substring(Math.max(startOuter, 0), + Math.min(endOuter, lineCols)); + if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || + (endOuter <= lineCols && /[\w\d]$/.test(needle))) + return; + + needle = line.substring(selection.start.column, selection.end.column); + if (!/^[\w\d]+$/.test(needle)) + return; + + var re = this.$search.$assembleRegExp({ + wholeWord: true, + caseSensitive: true, + needle: needle + }); + + return re; + }; + + + this.onChangeFrontMarker = function() { + this.renderer.updateFrontMarkers(); + }; + + this.onChangeBackMarker = function() { + this.renderer.updateBackMarkers(); + }; + + + this.onChangeBreakpoint = function() { + this.renderer.updateBreakpoints(); + }; + + this.onChangeAnnotation = function() { + this.renderer.setAnnotations(this.session.getAnnotations()); + }; + + + this.onChangeMode = function(e) { + this.renderer.updateText(); + this._emit("changeMode", e); + }; + + + this.onChangeWrapLimit = function() { + this.renderer.updateFull(); + }; + + this.onChangeWrapMode = function() { + this.renderer.onResize(true); + }; + + + this.onChangeFold = function() { + this.$updateHighlightActiveLine(); + this.renderer.updateFull(); + }; + this.getSelectedText = function() { + return this.session.getTextRange(this.getSelectionRange()); + }; + this.getCopyText = function() { + var text = this.getSelectedText(); + this._signal("copy", text); + return text; + }; + this.onCopy = function() { + this.commands.exec("copy", this); + }; + this.onCut = function() { + this.commands.exec("cut", this); + }; + this.onPaste = function(text, event) { + var e = {text: text, event: event}; + this.commands.exec("paste", this, e); + }; + + this.$handlePaste = function(e) { + if (typeof e == "string") + e = {text: e}; + this._signal("paste", e); + var text = e.text; + if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { + this.insert(text); + } else { + var lines = text.split(/\r\n|\r|\n/); + var ranges = this.selection.rangeList.ranges; + + if (lines.length > ranges.length || lines.length < 2 || !lines[1]) + return this.commands.exec("insertstring", this, text); + + for (var i = ranges.length; i--;) { + var range = ranges[i]; + if (!range.isEmpty()) + this.session.remove(range); + + this.session.insert(range.start, lines[i]); + } + } + }; + + this.execCommand = function(command, args) { + return this.commands.exec(command, this, args); + }; + this.insert = function(text, pasted) { + var session = this.session; + var mode = session.getMode(); + var cursor = this.getCursorPosition(); + + if (this.getBehavioursEnabled() && !pasted) { + var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); + if (transform) { + if (text !== transform.text) { + this.session.mergeUndoDeltas = false; + this.$mergeNextCommand = false; + } + text = transform.text; + + } + } + + if (text == "\t") + text = this.session.getTabString(); + if (!this.selection.isEmpty()) { + var range = this.getSelectionRange(); + cursor = this.session.remove(range); + this.clearSelection(); + } + else if (this.session.getOverwrite()) { + var range = new Range.fromPoints(cursor, cursor); + range.end.column += text.length; + this.session.remove(range); + } + + if (text == "\n" || text == "\r\n") { + var line = session.getLine(cursor.row); + if (cursor.column > line.search(/\S|$/)) { + var d = line.substr(cursor.column).search(/\S|$/); + session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d); + } + } + this.clearSelection(); + + var start = cursor.column; + var lineState = session.getState(cursor.row); + var line = session.getLine(cursor.row); + var shouldOutdent = mode.checkOutdent(lineState, line, text); + var end = session.insert(cursor, text); + + if (transform && transform.selection) { + if (transform.selection.length == 2) { // Transform relative to the current column + this.selection.setSelectionRange( + new Range(cursor.row, start + transform.selection[0], + cursor.row, start + transform.selection[1])); + } else { // Transform relative to the current row. + this.selection.setSelectionRange( + new Range(cursor.row + transform.selection[0], + transform.selection[1], + cursor.row + transform.selection[2], + transform.selection[3])); + } + } + + if (session.getDocument().isNewLine(text)) { + var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); + + session.insert({row: cursor.row+1, column: 0}, lineIndent); + } + if (shouldOutdent) + mode.autoOutdent(lineState, session, cursor.row); + }; + + this.onTextInput = function(text) { + this.keyBinding.onTextInput(text); + }; + + this.onCommandKey = function(e, hashId, keyCode) { + this.keyBinding.onCommandKey(e, hashId, keyCode); + }; + this.setOverwrite = function(overwrite) { + this.session.setOverwrite(overwrite); + }; + this.getOverwrite = function() { + return this.session.getOverwrite(); + }; + this.toggleOverwrite = function() { + this.session.toggleOverwrite(); + }; + this.setScrollSpeed = function(speed) { + this.setOption("scrollSpeed", speed); + }; + this.getScrollSpeed = function() { + return this.getOption("scrollSpeed"); + }; + this.setDragDelay = function(dragDelay) { + this.setOption("dragDelay", dragDelay); + }; + this.getDragDelay = function() { + return this.getOption("dragDelay"); + }; + this.setSelectionStyle = function(val) { + this.setOption("selectionStyle", val); + }; + this.getSelectionStyle = function() { + return this.getOption("selectionStyle"); + }; + this.setHighlightActiveLine = function(shouldHighlight) { + this.setOption("highlightActiveLine", shouldHighlight); + }; + this.getHighlightActiveLine = function() { + return this.getOption("highlightActiveLine"); + }; + this.setHighlightGutterLine = function(shouldHighlight) { + this.setOption("highlightGutterLine", shouldHighlight); + }; + + this.getHighlightGutterLine = function() { + return this.getOption("highlightGutterLine"); + }; + this.setHighlightSelectedWord = function(shouldHighlight) { + this.setOption("highlightSelectedWord", shouldHighlight); + }; + this.getHighlightSelectedWord = function() { + return this.$highlightSelectedWord; + }; + + this.setAnimatedScroll = function(shouldAnimate){ + this.renderer.setAnimatedScroll(shouldAnimate); + }; + + this.getAnimatedScroll = function(){ + return this.renderer.getAnimatedScroll(); + }; + this.setShowInvisibles = function(showInvisibles) { + this.renderer.setShowInvisibles(showInvisibles); + }; + this.getShowInvisibles = function() { + return this.renderer.getShowInvisibles(); + }; + + this.setDisplayIndentGuides = function(display) { + this.renderer.setDisplayIndentGuides(display); + }; + + this.getDisplayIndentGuides = function() { + return this.renderer.getDisplayIndentGuides(); + }; + this.setShowPrintMargin = function(showPrintMargin) { + this.renderer.setShowPrintMargin(showPrintMargin); + }; + this.getShowPrintMargin = function() { + return this.renderer.getShowPrintMargin(); + }; + this.setPrintMarginColumn = function(showPrintMargin) { + this.renderer.setPrintMarginColumn(showPrintMargin); + }; + this.getPrintMarginColumn = function() { + return this.renderer.getPrintMarginColumn(); + }; + this.setReadOnly = function(readOnly) { + this.setOption("readOnly", readOnly); + }; + this.getReadOnly = function() { + return this.getOption("readOnly"); + }; + this.setBehavioursEnabled = function (enabled) { + this.setOption("behavioursEnabled", enabled); + }; + this.getBehavioursEnabled = function () { + return this.getOption("behavioursEnabled"); + }; + this.setWrapBehavioursEnabled = function (enabled) { + this.setOption("wrapBehavioursEnabled", enabled); + }; + this.getWrapBehavioursEnabled = function () { + return this.getOption("wrapBehavioursEnabled"); + }; + this.setShowFoldWidgets = function(show) { + this.setOption("showFoldWidgets", show); + + }; + this.getShowFoldWidgets = function() { + return this.getOption("showFoldWidgets"); + }; + + this.setFadeFoldWidgets = function(fade) { + this.setOption("fadeFoldWidgets", fade); + }; + + this.getFadeFoldWidgets = function() { + return this.getOption("fadeFoldWidgets"); + }; + this.remove = function(dir) { + if (this.selection.isEmpty()){ + if (dir == "left") + this.selection.selectLeft(); + else + this.selection.selectRight(); + } + + var range = this.getSelectionRange(); + if (this.getBehavioursEnabled()) { + var session = this.session; + var state = session.getState(range.start.row); + var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); + + if (range.end.column === 0) { + var text = session.getTextRange(range); + if (text[text.length - 1] == "\n") { + var line = session.getLine(range.end.row); + if (/^\s+$/.test(line)) { + range.end.column = line.length; + } + } + } + if (new_range) + range = new_range; + } + + this.session.remove(range); + this.clearSelection(); + }; + this.removeWordRight = function() { + if (this.selection.isEmpty()) + this.selection.selectWordRight(); + + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + this.removeWordLeft = function() { + if (this.selection.isEmpty()) + this.selection.selectWordLeft(); + + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + this.removeToLineStart = function() { + if (this.selection.isEmpty()) + this.selection.selectLineStart(); + + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + this.removeToLineEnd = function() { + if (this.selection.isEmpty()) + this.selection.selectLineEnd(); + + var range = this.getSelectionRange(); + if (range.start.column == range.end.column && range.start.row == range.end.row) { + range.end.column = 0; + range.end.row++; + } + + this.session.remove(range); + this.clearSelection(); + }; + this.splitLine = function() { + if (!this.selection.isEmpty()) { + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + } + + var cursor = this.getCursorPosition(); + this.insert("\n"); + this.moveCursorToPosition(cursor); + }; + this.transposeLetters = function() { + if (!this.selection.isEmpty()) { + return; + } + + var cursor = this.getCursorPosition(); + var column = cursor.column; + if (column === 0) + return; + + var line = this.session.getLine(cursor.row); + var swap, range; + if (column < line.length) { + swap = line.charAt(column) + line.charAt(column-1); + range = new Range(cursor.row, column-1, cursor.row, column+1); + } + else { + swap = line.charAt(column-1) + line.charAt(column-2); + range = new Range(cursor.row, column-2, cursor.row, column); + } + this.session.replace(range, swap); + }; + this.toLowerCase = function() { + var originalRange = this.getSelectionRange(); + if (this.selection.isEmpty()) { + this.selection.selectWord(); + } + + var range = this.getSelectionRange(); + var text = this.session.getTextRange(range); + this.session.replace(range, text.toLowerCase()); + this.selection.setSelectionRange(originalRange); + }; + this.toUpperCase = function() { + var originalRange = this.getSelectionRange(); + if (this.selection.isEmpty()) { + this.selection.selectWord(); + } + + var range = this.getSelectionRange(); + var text = this.session.getTextRange(range); + this.session.replace(range, text.toUpperCase()); + this.selection.setSelectionRange(originalRange); + }; + this.indent = function() { + var session = this.session; + var range = this.getSelectionRange(); + + if (range.start.row < range.end.row) { + var rows = this.$getSelectedRows(); + session.indentRows(rows.first, rows.last, "\t"); + return; + } else if (range.start.column < range.end.column) { + var text = session.getTextRange(range); + if (!/^\s+$/.test(text)) { + var rows = this.$getSelectedRows(); + session.indentRows(rows.first, rows.last, "\t"); + return; + } + } + + var line = session.getLine(range.start.row); + var position = range.start; + var size = session.getTabSize(); + var column = session.documentToScreenColumn(position.row, position.column); + + if (this.session.getUseSoftTabs()) { + var count = (size - column % size); + var indentString = lang.stringRepeat(" ", count); + } else { + var count = column % size; + while (line[range.start.column] == " " && count) { + range.start.column--; + count--; + } + this.selection.setSelectionRange(range); + indentString = "\t"; + } + return this.insert(indentString); + }; + this.blockIndent = function() { + var rows = this.$getSelectedRows(); + this.session.indentRows(rows.first, rows.last, "\t"); + }; + this.blockOutdent = function() { + var selection = this.session.getSelection(); + this.session.outdentRows(selection.getRange()); + }; + this.sortLines = function() { + var rows = this.$getSelectedRows(); + var session = this.session; + + var lines = []; + for (i = rows.first; i <= rows.last; i++) + lines.push(session.getLine(i)); + + lines.sort(function(a, b) { + if (a.toLowerCase() < b.toLowerCase()) return -1; + if (a.toLowerCase() > b.toLowerCase()) return 1; + return 0; + }); + + var deleteRange = new Range(0, 0, 0, 0); + for (var i = rows.first; i <= rows.last; i++) { + var line = session.getLine(i); + deleteRange.start.row = i; + deleteRange.end.row = i; + deleteRange.end.column = line.length; + session.replace(deleteRange, lines[i-rows.first]); + } + }; + this.toggleCommentLines = function() { + var state = this.session.getState(this.getCursorPosition().row); + var rows = this.$getSelectedRows(); + this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); + }; + + this.toggleBlockComment = function() { + var cursor = this.getCursorPosition(); + var state = this.session.getState(cursor.row); + var range = this.getSelectionRange(); + this.session.getMode().toggleBlockComment(state, this.session, range, cursor); + }; + this.getNumberAt = function(row, column) { + var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g; + _numberRx.lastIndex = 0; + + var s = this.session.getLine(row); + while (_numberRx.lastIndex < column) { + var m = _numberRx.exec(s); + if(m.index <= column && m.index+m[0].length >= column){ + var number = { + value: m[0], + start: m.index, + end: m.index+m[0].length + }; + return number; + } + } + return null; + }; + this.modifyNumber = function(amount) { + var row = this.selection.getCursor().row; + var column = this.selection.getCursor().column; + var charRange = new Range(row, column-1, row, column); + + var c = this.session.getTextRange(charRange); + if (!isNaN(parseFloat(c)) && isFinite(c)) { + var nr = this.getNumberAt(row, column); + if (nr) { + var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end; + var decimals = nr.start + nr.value.length - fp; + + var t = parseFloat(nr.value); + t *= Math.pow(10, decimals); + + + if(fp !== nr.end && column < fp){ + amount *= Math.pow(10, nr.end - column - 1); + } else { + amount *= Math.pow(10, nr.end - column); + } + + t += amount; + t /= Math.pow(10, decimals); + var nnr = t.toFixed(decimals); + var replaceRange = new Range(row, nr.start, row, nr.end); + this.session.replace(replaceRange, nnr); + this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length)); + + } + } + }; + this.removeLines = function() { + var rows = this.$getSelectedRows(); + this.session.removeFullLines(rows.first, rows.last); + this.clearSelection(); + }; + + this.duplicateSelection = function() { + var sel = this.selection; + var doc = this.session; + var range = sel.getRange(); + var reverse = sel.isBackwards(); + if (range.isEmpty()) { + var row = range.start.row; + doc.duplicateLines(row, row); + } else { + var point = reverse ? range.start : range.end; + var endPoint = doc.insert(point, doc.getTextRange(range), false); + range.start = point; + range.end = endPoint; + + sel.setSelectionRange(range, reverse); + } + }; + this.moveLinesDown = function() { + this.$moveLines(1, false); + }; + this.moveLinesUp = function() { + this.$moveLines(-1, false); + }; + this.moveText = function(range, toPosition, copy) { + return this.session.moveText(range, toPosition, copy); + }; + this.copyLinesUp = function() { + this.$moveLines(-1, true); + }; + this.copyLinesDown = function() { + this.$moveLines(1, true); + }; + this.$moveLines = function(dir, copy) { + var rows, moved; + var selection = this.selection; + if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) { + var range = selection.toOrientedRange(); + rows = this.$getSelectedRows(range); + moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir); + if (copy && dir == -1) moved = 0; + range.moveBy(moved, 0); + selection.fromOrientedRange(range); + } else { + var ranges = selection.rangeList.ranges; + selection.rangeList.detach(this.session); + this.inVirtualSelectionMode = true; + + var diff = 0; + var totalDiff = 0; + var l = ranges.length; + for (var i = 0; i < l; i++) { + var rangeIndex = i; + ranges[i].moveBy(diff, 0); + rows = this.$getSelectedRows(ranges[i]); + var first = rows.first; + var last = rows.last; + while (++i < l) { + if (totalDiff) ranges[i].moveBy(totalDiff, 0); + var subRows = this.$getSelectedRows(ranges[i]); + if (copy && subRows.first != last) + break; + else if (!copy && subRows.first > last + 1) + break; + last = subRows.last; + } + i--; + diff = this.session.$moveLines(first, last, copy ? 0 : dir); + if (copy && dir == -1) rangeIndex = i + 1; + while (rangeIndex <= i) { + ranges[rangeIndex].moveBy(diff, 0); + rangeIndex++; + } + if (!copy) diff = 0; + totalDiff += diff; + } + + selection.fromOrientedRange(selection.ranges[0]); + selection.rangeList.attach(this.session); + this.inVirtualSelectionMode = false; + } + }; + this.$getSelectedRows = function(range) { + range = (range || this.getSelectionRange()).collapseRows(); + + return { + first: this.session.getRowFoldStart(range.start.row), + last: this.session.getRowFoldEnd(range.end.row) + }; + }; + + this.onCompositionStart = function(text) { + this.renderer.showComposition(this.getCursorPosition()); + }; + + this.onCompositionUpdate = function(text) { + this.renderer.setCompositionText(text); + }; + + this.onCompositionEnd = function() { + this.renderer.hideComposition(); + }; + this.getFirstVisibleRow = function() { + return this.renderer.getFirstVisibleRow(); + }; + this.getLastVisibleRow = function() { + return this.renderer.getLastVisibleRow(); + }; + this.isRowVisible = function(row) { + return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); + }; + this.isRowFullyVisible = function(row) { + return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow()); + }; + this.$getVisibleRowCount = function() { + return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; + }; + + this.$moveByPage = function(dir, select) { + var renderer = this.renderer; + var config = this.renderer.layerConfig; + var rows = dir * Math.floor(config.height / config.lineHeight); + + this.$blockScrolling++; + if (select === true) { + this.selection.$moveSelection(function(){ + this.moveCursorBy(rows, 0); + }); + } else if (select === false) { + this.selection.moveCursorBy(rows, 0); + this.selection.clearSelection(); + } + this.$blockScrolling--; + + var scrollTop = renderer.scrollTop; + + renderer.scrollBy(0, rows * config.lineHeight); + if (select != null) + renderer.scrollCursorIntoView(null, 0.5); + + renderer.animateScrolling(scrollTop); + }; + this.selectPageDown = function() { + this.$moveByPage(1, true); + }; + this.selectPageUp = function() { + this.$moveByPage(-1, true); + }; + this.gotoPageDown = function() { + this.$moveByPage(1, false); + }; + this.gotoPageUp = function() { + this.$moveByPage(-1, false); + }; + this.scrollPageDown = function() { + this.$moveByPage(1); + }; + this.scrollPageUp = function() { + this.$moveByPage(-1); + }; + this.scrollToRow = function(row) { + this.renderer.scrollToRow(row); + }; + this.scrollToLine = function(line, center, animate, callback) { + this.renderer.scrollToLine(line, center, animate, callback); + }; + this.centerSelection = function() { + var range = this.getSelectionRange(); + var pos = { + row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2), + column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2) + }; + this.renderer.alignCursor(pos, 0.5); + }; + this.getCursorPosition = function() { + return this.selection.getCursor(); + }; + this.getCursorPositionScreen = function() { + return this.session.documentToScreenPosition(this.getCursorPosition()); + }; + this.getSelectionRange = function() { + return this.selection.getRange(); + }; + this.selectAll = function() { + this.$blockScrolling += 1; + this.selection.selectAll(); + this.$blockScrolling -= 1; + }; + this.clearSelection = function() { + this.selection.clearSelection(); + }; + this.moveCursorTo = function(row, column) { + this.selection.moveCursorTo(row, column); + }; + this.moveCursorToPosition = function(pos) { + this.selection.moveCursorToPosition(pos); + }; + this.jumpToMatching = function(select, expand) { + var cursor = this.getCursorPosition(); + var iterator = new TokenIterator(this.session, cursor.row, cursor.column); + var prevToken = iterator.getCurrentToken(); + var token = prevToken || iterator.stepForward(); + + if (!token) return; + var matchType; + var found = false; + var depth = {}; + var i = cursor.column - token.start; + var bracketType; + var brackets = { + ")": "(", + "(": "(", + "]": "[", + "[": "[", + "{": "{", + "}": "{" + }; + + do { + if (token.value.match(/[{}()\[\]]/g)) { + for (; i < token.value.length && !found; i++) { + if (!brackets[token.value[i]]) { + continue; + } + + bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen"); + + if (isNaN(depth[bracketType])) { + depth[bracketType] = 0; + } + + switch (token.value[i]) { + case '(': + case '[': + case '{': + depth[bracketType]++; + break; + case ')': + case ']': + case '}': + depth[bracketType]--; + + if (depth[bracketType] === -1) { + matchType = 'bracket'; + found = true; + } + break; + } + } + } + else if (token && token.type.indexOf('tag-name') !== -1) { + if (isNaN(depth[token.value])) { + depth[token.value] = 0; + } + + if (prevToken.value === '<') { + depth[token.value]++; + } + else if (prevToken.value === '= 0; --i) { + if(this.$tryReplace(ranges[i], replacement)) { + replaced++; + } + } + + this.selection.setSelectionRange(selection); + this.$blockScrolling -= 1; + + return replaced; + }; + + this.$tryReplace = function(range, replacement) { + var input = this.session.getTextRange(range); + replacement = this.$search.replace(input, replacement); + if (replacement !== null) { + range.end = this.session.replace(range, replacement); + return range; + } else { + return null; + } + }; + this.getLastSearchOptions = function() { + return this.$search.getOptions(); + }; + this.find = function(needle, options, animate) { + if (!options) + options = {}; + + if (typeof needle == "string" || needle instanceof RegExp) + options.needle = needle; + else if (typeof needle == "object") + oop.mixin(options, needle); + + var range = this.selection.getRange(); + if (options.needle == null) { + needle = this.session.getTextRange(range) + || this.$search.$options.needle; + if (!needle) { + range = this.session.getWordRange(range.start.row, range.start.column); + needle = this.session.getTextRange(range); + } + this.$search.set({needle: needle}); + } + + this.$search.set(options); + if (!options.start) + this.$search.set({start: range}); + + var newRange = this.$search.find(this.session); + if (options.preventScroll) + return newRange; + if (newRange) { + this.revealRange(newRange, animate); + return newRange; + } + if (options.backwards) + range.start = range.end; + else + range.end = range.start; + this.selection.setRange(range); + }; + this.findNext = function(options, animate) { + this.find({skipCurrent: true, backwards: false}, options, animate); + }; + this.findPrevious = function(options, animate) { + this.find(options, {skipCurrent: true, backwards: true}, animate); + }; + + this.revealRange = function(range, animate) { + this.$blockScrolling += 1; + this.session.unfold(range); + this.selection.setSelectionRange(range); + this.$blockScrolling -= 1; + + var scrollTop = this.renderer.scrollTop; + this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); + if (animate !== false) + this.renderer.animateScrolling(scrollTop); + }; + this.undo = function() { + this.$blockScrolling++; + this.session.getUndoManager().undo(); + this.$blockScrolling--; + this.renderer.scrollCursorIntoView(null, 0.5); + }; + this.redo = function() { + this.$blockScrolling++; + this.session.getUndoManager().redo(); + this.$blockScrolling--; + this.renderer.scrollCursorIntoView(null, 0.5); + }; + this.destroy = function() { + this.renderer.destroy(); + this._signal("destroy", this); + if (this.session) { + this.session.destroy(); + } + }; + this.setAutoScrollEditorIntoView = function(enable) { + if (!enable) + return; + var rect; + var self = this; + var shouldScroll = false; + if (!this.$scrollAnchor) + this.$scrollAnchor = document.createElement("div"); + var scrollAnchor = this.$scrollAnchor; + scrollAnchor.style.cssText = "position:absolute"; + this.container.insertBefore(scrollAnchor, this.container.firstChild); + var onChangeSelection = this.on("changeSelection", function() { + shouldScroll = true; + }); + var onBeforeRender = this.renderer.on("beforeRender", function() { + if (shouldScroll) + rect = self.renderer.container.getBoundingClientRect(); + }); + var onAfterRender = this.renderer.on("afterRender", function() { + if (shouldScroll && rect && (self.isFocused() + || self.searchBox && self.searchBox.isFocused()) + ) { + var renderer = self.renderer; + var pos = renderer.$cursorLayer.$pixelPos; + var config = renderer.layerConfig; + var top = pos.top - config.offset; + if (pos.top >= 0 && top + rect.top < 0) { + shouldScroll = true; + } else if (pos.top < config.height && + pos.top + rect.top + config.lineHeight > window.innerHeight) { + shouldScroll = false; + } else { + shouldScroll = null; + } + if (shouldScroll != null) { + scrollAnchor.style.top = top + "px"; + scrollAnchor.style.left = pos.left + "px"; + scrollAnchor.style.height = config.lineHeight + "px"; + scrollAnchor.scrollIntoView(shouldScroll); + } + shouldScroll = rect = null; + } + }); + this.setAutoScrollEditorIntoView = function(enable) { + if (enable) + return; + delete this.setAutoScrollEditorIntoView; + this.off("changeSelection", onChangeSelection); + this.renderer.off("afterRender", onAfterRender); + this.renderer.off("beforeRender", onBeforeRender); + }; + }; + + + this.$resetCursorStyle = function() { + var style = this.$cursorStyle || "ace"; + var cursorLayer = this.renderer.$cursorLayer; + if (!cursorLayer) + return; + cursorLayer.setSmoothBlinking(/smooth/.test(style)); + cursorLayer.isBlinking = !this.$readOnly && style != "wide"; + dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); + }; + +}).call(Editor.prototype); + + + +config.defineOptions(Editor.prototype, "editor", { + selectionStyle: { + set: function(style) { + this.onSelectionChange(); + this._signal("changeSelectionStyle", {data: style}); + }, + initialValue: "line" + }, + highlightActiveLine: { + set: function() {this.$updateHighlightActiveLine();}, + initialValue: true + }, + highlightSelectedWord: { + set: function(shouldHighlight) {this.$onSelectionChange();}, + initialValue: true + }, + readOnly: { + set: function(readOnly) { + this.$resetCursorStyle(); + }, + initialValue: false + }, + cursorStyle: { + set: function(val) { this.$resetCursorStyle(); }, + values: ["ace", "slim", "smooth", "wide"], + initialValue: "ace" + }, + mergeUndoDeltas: { + values: [false, true, "always"], + initialValue: true + }, + behavioursEnabled: {initialValue: true}, + wrapBehavioursEnabled: {initialValue: true}, + autoScrollEditorIntoView: { + set: function(val) {this.setAutoScrollEditorIntoView(val)} + }, + keyboardHandler: { + set: function(val) { this.setKeyboardHandler(val); }, + get: function() { return this.keybindingId; }, + handlesSet: true + }, + + hScrollBarAlwaysVisible: "renderer", + vScrollBarAlwaysVisible: "renderer", + highlightGutterLine: "renderer", + animatedScroll: "renderer", + showInvisibles: "renderer", + showPrintMargin: "renderer", + printMarginColumn: "renderer", + printMargin: "renderer", + fadeFoldWidgets: "renderer", + showFoldWidgets: "renderer", + showLineNumbers: "renderer", + showGutter: "renderer", + displayIndentGuides: "renderer", + fontSize: "renderer", + fontFamily: "renderer", + maxLines: "renderer", + minLines: "renderer", + scrollPastEnd: "renderer", + fixedWidthGutter: "renderer", + theme: "renderer", + + scrollSpeed: "$mouseHandler", + dragDelay: "$mouseHandler", + dragEnabled: "$mouseHandler", + focusTimout: "$mouseHandler", + tooltipFollowsMouse: "$mouseHandler", + + firstLineNumber: "session", + overwrite: "session", + newLineMode: "session", + useWorker: "session", + useSoftTabs: "session", + tabSize: "session", + wrap: "session", + indentedSoftWrap: "session", + foldStyle: "session", + mode: "session" +}); + +exports.Editor = Editor; +}); + +ace.define("ace/undomanager",["require","exports","module"], function(acequire, exports, module) { +"use strict"; +var UndoManager = function() { + this.reset(); +}; + +(function() { + this.execute = function(options) { + var deltaSets = options.args[0]; + this.$doc = options.args[1]; + if (options.merge && this.hasUndo()){ + this.dirtyCounter--; + deltaSets = this.$undoStack.pop().concat(deltaSets); + } + this.$undoStack.push(deltaSets); + this.$redoStack = []; + if (this.dirtyCounter < 0) { + this.dirtyCounter = NaN; + } + this.dirtyCounter++; + }; + this.undo = function(dontSelect) { + var deltaSets = this.$undoStack.pop(); + var undoSelectionRange = null; + if (deltaSets) { + undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect); + this.$redoStack.push(deltaSets); + this.dirtyCounter--; + } + + return undoSelectionRange; + }; + this.redo = function(dontSelect) { + var deltaSets = this.$redoStack.pop(); + var redoSelectionRange = null; + if (deltaSets) { + redoSelectionRange = + this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect); + this.$undoStack.push(deltaSets); + this.dirtyCounter++; + } + return redoSelectionRange; + }; + this.reset = function() { + this.$undoStack = []; + this.$redoStack = []; + this.dirtyCounter = 0; + }; + this.hasUndo = function() { + return this.$undoStack.length > 0; + }; + this.hasRedo = function() { + return this.$redoStack.length > 0; + }; + this.markClean = function() { + this.dirtyCounter = 0; + }; + this.isClean = function() { + return this.dirtyCounter === 0; + }; + this.$serializeDeltas = function(deltaSets) { + return cloneDeltaSetsObj(deltaSets, $serializeDelta); + }; + this.$deserializeDeltas = function(deltaSets) { + return cloneDeltaSetsObj(deltaSets, $deserializeDelta); + }; + + function $serializeDelta(delta){ + return { + action: delta.action, + start: delta.start, + end: delta.end, + lines: delta.lines.length == 1 ? null : delta.lines, + text: delta.lines.length == 1 ? delta.lines[0] : null + }; + } + + function $deserializeDelta(delta) { + return { + action: delta.action, + start: delta.start, + end: delta.end, + lines: delta.lines || [delta.text] + }; + } + + function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) { + var deltaSets_new = new Array(deltaSets_old.length); + for (var i = 0; i < deltaSets_old.length; i++) { + var deltaSet_old = deltaSets_old[i]; + var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)}; + + for (var j = 0; j < deltaSet_old.deltas.length; j++) { + var delta_old = deltaSet_old.deltas[j]; + deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old); + } + + deltaSets_new[i] = deltaSet_new; + } + return deltaSets_new; + } + +}).call(UndoManager.prototype); + +exports.UndoManager = UndoManager; +}); + +ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(acequire, exports, module) { +"use strict"; + +var dom = acequire("../lib/dom"); +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var EventEmitter = acequire("../lib/event_emitter").EventEmitter; + +var Gutter = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_gutter-layer"; + parentEl.appendChild(this.element); + this.setShowFoldWidgets(this.$showFoldWidgets); + + this.gutterWidth = 0; + + this.$annotations = []; + this.$updateAnnotations = this.$updateAnnotations.bind(this); + + this.$cells = []; +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.setSession = function(session) { + if (this.session) + this.session.removeEventListener("change", this.$updateAnnotations); + this.session = session; + if (session) + session.on("change", this.$updateAnnotations); + }; + + this.addGutterDecoration = function(row, className){ + if (window.console) + console.warn && console.warn("deprecated use session.addGutterDecoration"); + this.session.addGutterDecoration(row, className); + }; + + this.removeGutterDecoration = function(row, className){ + if (window.console) + console.warn && console.warn("deprecated use session.removeGutterDecoration"); + this.session.removeGutterDecoration(row, className); + }; + + this.setAnnotations = function(annotations) { + this.$annotations = []; + for (var i = 0; i < annotations.length; i++) { + var annotation = annotations[i]; + var row = annotation.row; + var rowInfo = this.$annotations[row]; + if (!rowInfo) + rowInfo = this.$annotations[row] = {text: []}; + + var annoText = annotation.text; + annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; + + if (rowInfo.text.indexOf(annoText) === -1) + rowInfo.text.push(annoText); + + var type = annotation.type; + if (type == "error") + rowInfo.className = " ace_error"; + else if (type == "warning" && rowInfo.className != " ace_error") + rowInfo.className = " ace_warning"; + else if (type == "info" && (!rowInfo.className)) + rowInfo.className = " ace_info"; + } + }; + + this.$updateAnnotations = function (delta) { + if (!this.$annotations.length) + return; + var firstRow = delta.start.row; + var len = delta.end.row - firstRow; + if (len === 0) { + } else if (delta.action == 'remove') { + this.$annotations.splice(firstRow, len + 1, null); + } else { + var args = new Array(len + 1); + args.unshift(firstRow, 1); + this.$annotations.splice.apply(this.$annotations, args); + } + }; + + this.update = function(config) { + var session = this.session; + var firstRow = config.firstRow; + var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar + session.getLength() - 1); + var fold = session.getNextFoldLine(firstRow); + var foldStart = fold ? fold.start.row : Infinity; + var foldWidgets = this.$showFoldWidgets && session.foldWidgets; + var breakpoints = session.$breakpoints; + var decorations = session.$decorations; + var firstLineNumber = session.$firstLineNumber; + var lastLineNumber = 0; + + var gutterRenderer = session.gutterRenderer || this.$renderer; + + var cell = null; + var index = -1; + var row = firstRow; + while (true) { + if (row > foldStart) { + row = fold.end.row + 1; + fold = session.getNextFoldLine(row, fold); + foldStart = fold ? fold.start.row : Infinity; + } + if (row > lastRow) { + while (this.$cells.length > index + 1) { + cell = this.$cells.pop(); + this.element.removeChild(cell.element); + } + break; + } + + cell = this.$cells[++index]; + if (!cell) { + cell = {element: null, textNode: null, foldWidget: null}; + cell.element = dom.createElement("div"); + cell.textNode = document.createTextNode(''); + cell.element.appendChild(cell.textNode); + this.element.appendChild(cell.element); + this.$cells[index] = cell; + } + + var className = "ace_gutter-cell "; + if (breakpoints[row]) + className += breakpoints[row]; + if (decorations[row]) + className += decorations[row]; + if (this.$annotations[row]) + className += this.$annotations[row].className; + if (cell.element.className != className) + cell.element.className = className; + + var height = session.getRowLength(row) * config.lineHeight + "px"; + if (height != cell.element.style.height) + cell.element.style.height = height; + + if (foldWidgets) { + var c = foldWidgets[row]; + if (c == null) + c = foldWidgets[row] = session.getFoldWidget(row); + } + + if (c) { + if (!cell.foldWidget) { + cell.foldWidget = dom.createElement("span"); + cell.element.appendChild(cell.foldWidget); + } + var className = "ace_fold-widget ace_" + c; + if (c == "start" && row == foldStart && row < fold.end.row) + className += " ace_closed"; + else + className += " ace_open"; + if (cell.foldWidget.className != className) + cell.foldWidget.className = className; + + var height = config.lineHeight + "px"; + if (cell.foldWidget.style.height != height) + cell.foldWidget.style.height = height; + } else { + if (cell.foldWidget) { + cell.element.removeChild(cell.foldWidget); + cell.foldWidget = null; + } + } + + var text = lastLineNumber = gutterRenderer + ? gutterRenderer.getText(session, row) + : row + firstLineNumber; + if (text != cell.textNode.data) + cell.textNode.data = text; + + row++; + } + + this.element.style.height = config.minHeight + "px"; + + if (this.$fixedWidth || session.$useWrapMode) + lastLineNumber = session.getLength() + firstLineNumber; + + var gutterWidth = gutterRenderer + ? gutterRenderer.getWidth(session, lastLineNumber, config) + : lastLineNumber.toString().length * config.characterWidth; + + var padding = this.$padding || this.$computePadding(); + gutterWidth += padding.left + padding.right; + if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { + this.gutterWidth = gutterWidth; + this.element.style.width = Math.ceil(this.gutterWidth) + "px"; + this._emit("changeGutterWidth", gutterWidth); + } + }; + + this.$fixedWidth = false; + + this.$showLineNumbers = true; + this.$renderer = ""; + this.setShowLineNumbers = function(show) { + this.$renderer = !show && { + getWidth: function() {return ""}, + getText: function() {return ""} + }; + }; + + this.getShowLineNumbers = function() { + return this.$showLineNumbers; + }; + + this.$showFoldWidgets = true; + this.setShowFoldWidgets = function(show) { + if (show) + dom.addCssClass(this.element, "ace_folding-enabled"); + else + dom.removeCssClass(this.element, "ace_folding-enabled"); + + this.$showFoldWidgets = show; + this.$padding = null; + }; + + this.getShowFoldWidgets = function() { + return this.$showFoldWidgets; + }; + + this.$computePadding = function() { + if (!this.element.firstChild) + return {left: 0, right: 0}; + var style = dom.computedStyle(this.element.firstChild); + this.$padding = {}; + this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; + this.$padding.right = parseInt(style.paddingRight) || 0; + return this.$padding; + }; + + this.getRegion = function(point) { + var padding = this.$padding || this.$computePadding(); + var rect = this.element.getBoundingClientRect(); + if (point.x < padding.left + rect.left) + return "markers"; + if (this.$showFoldWidgets && point.x > rect.right - padding.right) + return "foldWidgets"; + }; + +}).call(Gutter.prototype); + +exports.Gutter = Gutter; + +}); + +ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../range").Range; +var dom = acequire("../lib/dom"); + +var Marker = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_marker-layer"; + parentEl.appendChild(this.element); +}; + +(function() { + + this.$padding = 0; + + this.setPadding = function(padding) { + this.$padding = padding; + }; + this.setSession = function(session) { + this.session = session; + }; + + this.setMarkers = function(markers) { + this.markers = markers; + }; + + this.update = function(config) { + var config = config || this.config; + if (!config) + return; + + this.config = config; + + + var html = []; + for (var key in this.markers) { + var marker = this.markers[key]; + + if (!marker.range) { + marker.update(html, this, this.session, config); + continue; + } + + var range = marker.range.clipRows(config.firstRow, config.lastRow); + if (range.isEmpty()) continue; + + range = range.toScreenRange(this.session); + if (marker.renderer) { + var top = this.$getTop(range.start.row, config); + var left = this.$padding + range.start.column * config.characterWidth; + marker.renderer(html, range, left, top, config); + } else if (marker.type == "fullLine") { + this.drawFullLineMarker(html, range, marker.clazz, config); + } else if (marker.type == "screenLine") { + this.drawScreenLineMarker(html, range, marker.clazz, config); + } else if (range.isMultiLine()) { + if (marker.type == "text") + this.drawTextMarker(html, range, marker.clazz, config); + else + this.drawMultiLineMarker(html, range, marker.clazz, config); + } else { + this.drawSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config); + } + } + this.element.innerHTML = html.join(""); + }; + + this.$getTop = function(row, layerConfig) { + return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; + }; + + function getBorderClass(tl, tr, br, bl) { + return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0); + } + this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) { + var session = this.session; + var start = range.start.row; + var end = range.end.row; + var row = start; + var prev = 0; + var curr = 0; + var next = session.getScreenLastRowColumn(row); + var lineRange = new Range(row, range.start.column, row, curr); + for (; row <= end; row++) { + lineRange.start.row = lineRange.end.row = row; + lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row); + lineRange.end.column = next; + prev = curr; + curr = next; + next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column; + this.drawSingleLineMarker(stringBuilder, lineRange, + clazz + (row == start ? " ace_start" : "") + " ace_br" + + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end), + layerConfig, row == end ? 0 : 1, extraStyle); + } + }; + this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { + var padding = this.$padding; + var height = config.lineHeight; + var top = this.$getTop(range.start.row, config); + var left = padding + range.start.column * config.characterWidth; + extraStyle = extraStyle || ""; + + stringBuilder.push( + "
" + ); + top = this.$getTop(range.end.row, config); + var width = range.end.column * config.characterWidth; + + stringBuilder.push( + "
" + ); + height = (range.end.row - range.start.row - 1) * config.lineHeight; + if (height <= 0) + return; + top = this.$getTop(range.start.row + 1, config); + + var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8); + + stringBuilder.push( + "
" + ); + }; + this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { + var height = config.lineHeight; + var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; + + var top = this.$getTop(range.start.row, config); + var left = this.$padding + range.start.column * config.characterWidth; + + stringBuilder.push( + "
" + ); + }; + + this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { + var top = this.$getTop(range.start.row, config); + var height = config.lineHeight; + if (range.start.row != range.end.row) + height += this.$getTop(range.end.row, config) - top; + + stringBuilder.push( + "
" + ); + }; + + this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { + var top = this.$getTop(range.start.row, config); + var height = config.lineHeight; + + stringBuilder.push( + "
" + ); + }; + +}).call(Marker.prototype); + +exports.Marker = Marker; + +}); + +ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var dom = acequire("../lib/dom"); +var lang = acequire("../lib/lang"); +var useragent = acequire("../lib/useragent"); +var EventEmitter = acequire("../lib/event_emitter").EventEmitter; + +var Text = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_text-layer"; + parentEl.appendChild(this.element); + this.$updateEolChar = this.$updateEolChar.bind(this); +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.EOF_CHAR = "\xB6"; + this.EOL_CHAR_LF = "\xAC"; + this.EOL_CHAR_CRLF = "\xa4"; + this.EOL_CHAR = this.EOL_CHAR_LF; + this.TAB_CHAR = "\u2014"; //"\u21E5"; + this.SPACE_CHAR = "\xB7"; + this.$padding = 0; + + this.$updateEolChar = function() { + var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n" + ? this.EOL_CHAR_LF + : this.EOL_CHAR_CRLF; + if (this.EOL_CHAR != EOL_CHAR) { + this.EOL_CHAR = EOL_CHAR; + return true; + } + } + + this.setPadding = function(padding) { + this.$padding = padding; + this.element.style.padding = "0 " + padding + "px"; + }; + + this.getLineHeight = function() { + return this.$fontMetrics.$characterSize.height || 0; + }; + + this.getCharacterWidth = function() { + return this.$fontMetrics.$characterSize.width || 0; + }; + + this.$setFontMetrics = function(measure) { + this.$fontMetrics = measure; + this.$fontMetrics.on("changeCharacterSize", function(e) { + this._signal("changeCharacterSize", e); + }.bind(this)); + this.$pollSizeChanges(); + } + + this.checkForSizeChanges = function() { + this.$fontMetrics.checkForSizeChanges(); + }; + this.$pollSizeChanges = function() { + return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges(); + }; + this.setSession = function(session) { + this.session = session; + if (session) + this.$computeTabString(); + }; + + this.showInvisibles = false; + this.setShowInvisibles = function(showInvisibles) { + if (this.showInvisibles == showInvisibles) + return false; + + this.showInvisibles = showInvisibles; + this.$computeTabString(); + return true; + }; + + this.displayIndentGuides = true; + this.setDisplayIndentGuides = function(display) { + if (this.displayIndentGuides == display) + return false; + + this.displayIndentGuides = display; + this.$computeTabString(); + return true; + }; + + this.$tabStrings = []; + this.onChangeTabSize = + this.$computeTabString = function() { + var tabSize = this.session.getTabSize(); + this.tabSize = tabSize; + var tabStr = this.$tabStrings = [0]; + for (var i = 1; i < tabSize + 1; i++) { + if (this.showInvisibles) { + tabStr.push("" + + lang.stringRepeat(this.TAB_CHAR, i) + + ""); + } else { + tabStr.push(lang.stringRepeat(" ", i)); + } + } + if (this.displayIndentGuides) { + this.$indentGuideRe = /\s\S| \t|\t |\s$/; + var className = "ace_indent-guide"; + var spaceClass = ""; + var tabClass = ""; + if (this.showInvisibles) { + className += " ace_invisible"; + spaceClass = " ace_invisible_space"; + tabClass = " ace_invisible_tab"; + var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize); + var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize); + } else{ + var spaceContent = lang.stringRepeat(" ", this.tabSize); + var tabContent = spaceContent; + } + + this.$tabStrings[" "] = "" + spaceContent + ""; + this.$tabStrings["\t"] = "" + tabContent + ""; + } + }; + + this.updateLines = function(config, firstRow, lastRow) { + if (this.config.lastRow != config.lastRow || + this.config.firstRow != config.firstRow) { + this.scrollLines(config); + } + this.config = config; + + var first = Math.max(firstRow, config.firstRow); + var last = Math.min(lastRow, config.lastRow); + + var lineElements = this.element.childNodes; + var lineElementsIdx = 0; + + for (var row = config.firstRow; row < first; row++) { + var foldLine = this.session.getFoldLine(row); + if (foldLine) { + if (foldLine.containsRow(first)) { + first = foldLine.start.row; + break; + } else { + row = foldLine.end.row; + } + } + lineElementsIdx ++; + } + + var row = first; + var foldLine = this.session.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + + while (true) { + if (row > foldStart) { + row = foldLine.end.row+1; + foldLine = this.session.getNextFoldLine(row, foldLine); + foldStart = foldLine ? foldLine.start.row :Infinity; + } + if (row > last) + break; + + var lineElement = lineElements[lineElementsIdx++]; + if (lineElement) { + var html = []; + this.$renderLine( + html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false + ); + lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; + lineElement.innerHTML = html.join(""); + } + row++; + } + }; + + this.scrollLines = function(config) { + var oldConfig = this.config; + this.config = config; + + if (!oldConfig || oldConfig.lastRow < config.firstRow) + return this.update(config); + + if (config.lastRow < oldConfig.firstRow) + return this.update(config); + + var el = this.element; + if (oldConfig.firstRow < config.firstRow) + for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) + el.removeChild(el.firstChild); + + if (oldConfig.lastRow > config.lastRow) + for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) + el.removeChild(el.lastChild); + + if (config.firstRow < oldConfig.firstRow) { + var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); + if (el.firstChild) + el.insertBefore(fragment, el.firstChild); + else + el.appendChild(fragment); + } + + if (config.lastRow > oldConfig.lastRow) { + var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); + el.appendChild(fragment); + } + }; + + this.$renderLinesFragment = function(config, firstRow, lastRow) { + var fragment = this.element.ownerDocument.createDocumentFragment(); + var row = firstRow; + var foldLine = this.session.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + + while (true) { + if (row > foldStart) { + row = foldLine.end.row+1; + foldLine = this.session.getNextFoldLine(row, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + if (row > lastRow) + break; + + var container = dom.createElement("div"); + + var html = []; + this.$renderLine(html, row, false, row == foldStart ? foldLine : false); + container.innerHTML = html.join(""); + if (this.$useLineGroups()) { + container.className = 'ace_line_group'; + fragment.appendChild(container); + container.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; + + } else { + while(container.firstChild) + fragment.appendChild(container.firstChild); + } + + row++; + } + return fragment; + }; + + this.update = function(config) { + this.config = config; + + var html = []; + var firstRow = config.firstRow, lastRow = config.lastRow; + + var row = firstRow; + var foldLine = this.session.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + + while (true) { + if (row > foldStart) { + row = foldLine.end.row+1; + foldLine = this.session.getNextFoldLine(row, foldLine); + foldStart = foldLine ? foldLine.start.row :Infinity; + } + if (row > lastRow) + break; + + if (this.$useLineGroups()) + html.push("
") + + this.$renderLine(html, row, false, row == foldStart ? foldLine : false); + + if (this.$useLineGroups()) + html.push("
"); // end the line group + + row++; + } + this.element.innerHTML = html.join(""); + }; + + this.$textToken = { + "text": true, + "rparen": true, + "lparen": true + }; + + this.$renderToken = function(stringBuilder, screenColumn, token, value) { + var self = this; + var replaceReg = /\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g; + var replaceFunc = function(c, a, b, tabIdx, idx4) { + if (a) { + return self.showInvisibles + ? "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" + : c; + } else if (c == "&") { + return "&"; + } else if (c == "<") { + return "<"; + } else if (c == ">") { + return ">"; + } else if (c == "\t") { + var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); + screenColumn += tabSize - 1; + return self.$tabStrings[tabSize]; + } else if (c == "\u3000") { + var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; + var space = self.showInvisibles ? self.SPACE_CHAR : ""; + screenColumn += 1; + return "" + space + ""; + } else if (b) { + return "" + self.SPACE_CHAR + ""; + } else { + screenColumn += 1; + return "" + c + ""; + } + }; + + var output = value.replace(replaceReg, replaceFunc); + + if (!this.$textToken[token.type]) { + var classes = "ace_" + token.type.replace(/\./g, " ace_"); + var style = ""; + if (token.type == "fold") + style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' "; + stringBuilder.push("", output, ""); + } + else { + stringBuilder.push(output); + } + return screenColumn + value.length; + }; + + this.renderIndentGuide = function(stringBuilder, value, max) { + var cols = value.search(this.$indentGuideRe); + if (cols <= 0 || cols >= max) + return value; + if (value[0] == " ") { + cols -= cols % this.tabSize; + stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize)); + return value.substr(cols); + } else if (value[0] == "\t") { + stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols)); + return value.substr(cols); + } + return value; + }; + + this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) { + var chars = 0; + var split = 0; + var splitChars = splits[0]; + var screenColumn = 0; + + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + var value = token.value; + if (i == 0 && this.displayIndentGuides) { + chars = value.length; + value = this.renderIndentGuide(stringBuilder, value, splitChars); + if (!value) + continue; + chars -= value.length; + } + + if (chars + value.length < splitChars) { + screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); + chars += value.length; + } else { + while (chars + value.length >= splitChars) { + screenColumn = this.$renderToken( + stringBuilder, screenColumn, + token, value.substring(0, splitChars - chars) + ); + value = value.substring(splitChars - chars); + chars = splitChars; + + if (!onlyContents) { + stringBuilder.push("", + "
" + ); + } + + stringBuilder.push(lang.stringRepeat("\xa0", splits.indent)); + + split ++; + screenColumn = 0; + splitChars = splits[split] || Number.MAX_VALUE; + } + if (value.length != 0) { + chars += value.length; + screenColumn = this.$renderToken( + stringBuilder, screenColumn, token, value + ); + } + } + } + }; + + this.$renderSimpleLine = function(stringBuilder, tokens) { + var screenColumn = 0; + var token = tokens[0]; + var value = token.value; + if (this.displayIndentGuides) + value = this.renderIndentGuide(stringBuilder, value); + if (value) + screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); + for (var i = 1; i < tokens.length; i++) { + token = tokens[i]; + value = token.value; + screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); + } + }; + this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) { + if (!foldLine && foldLine != false) + foldLine = this.session.getFoldLine(row); + + if (foldLine) + var tokens = this.$getFoldLineTokens(row, foldLine); + else + var tokens = this.session.getTokens(row); + + + if (!onlyContents) { + stringBuilder.push( + "
" + ); + } + + if (tokens.length) { + var splits = this.session.getRowSplitData(row); + if (splits && splits.length) + this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents); + else + this.$renderSimpleLine(stringBuilder, tokens); + } + + if (this.showInvisibles) { + if (foldLine) + row = foldLine.end.row + + stringBuilder.push( + "", + row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, + "" + ); + } + if (!onlyContents) + stringBuilder.push("
"); + }; + + this.$getFoldLineTokens = function(row, foldLine) { + var session = this.session; + var renderTokens = []; + + function addTokens(tokens, from, to) { + var idx = 0, col = 0; + while ((col + tokens[idx].value.length) < from) { + col += tokens[idx].value.length; + idx++; + + if (idx == tokens.length) + return; + } + if (col != from) { + var value = tokens[idx].value.substring(from - col); + if (value.length > (to - from)) + value = value.substring(0, to - from); + + renderTokens.push({ + type: tokens[idx].type, + value: value + }); + + col = from + value.length; + idx += 1; + } + + while (col < to && idx < tokens.length) { + var value = tokens[idx].value; + if (value.length + col > to) { + renderTokens.push({ + type: tokens[idx].type, + value: value.substring(0, to - col) + }); + } else + renderTokens.push(tokens[idx]); + col += value.length; + idx += 1; + } + } + + var tokens = session.getTokens(row); + foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { + if (placeholder != null) { + renderTokens.push({ + type: "fold", + value: placeholder + }); + } else { + if (isNewRow) + tokens = session.getTokens(row); + + if (tokens.length) + addTokens(tokens, lastColumn, column); + } + }, foldLine.end.row, this.session.getLine(foldLine.end.row).length); + + return renderTokens; + }; + + this.$useLineGroups = function() { + return this.session.getUseWrapMode(); + }; + + this.destroy = function() { + clearInterval(this.$pollSizeChangesTimer); + if (this.$measureNode) + this.$measureNode.parentNode.removeChild(this.$measureNode); + delete this.$measureNode; + }; + +}).call(Text.prototype); + +exports.Text = Text; + +}); + +ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { +"use strict"; + +var dom = acequire("../lib/dom"); +var isIE8; + +var Cursor = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_cursor-layer"; + parentEl.appendChild(this.element); + + if (isIE8 === undefined) + isIE8 = !("opacity" in this.element.style); + + this.isVisible = false; + this.isBlinking = true; + this.blinkInterval = 1000; + this.smoothBlinking = false; + + this.cursors = []; + this.cursor = this.addCursor(); + dom.addCssClass(this.element, "ace_hidden-cursors"); + this.$updateCursors = (isIE8 + ? this.$updateVisibility + : this.$updateOpacity).bind(this); +}; + +(function() { + + this.$updateVisibility = function(val) { + var cursors = this.cursors; + for (var i = cursors.length; i--; ) + cursors[i].style.visibility = val ? "" : "hidden"; + }; + this.$updateOpacity = function(val) { + var cursors = this.cursors; + for (var i = cursors.length; i--; ) + cursors[i].style.opacity = val ? "" : "0"; + }; + + + this.$padding = 0; + this.setPadding = function(padding) { + this.$padding = padding; + }; + + this.setSession = function(session) { + this.session = session; + }; + + this.setBlinking = function(blinking) { + if (blinking != this.isBlinking){ + this.isBlinking = blinking; + this.restartTimer(); + } + }; + + this.setBlinkInterval = function(blinkInterval) { + if (blinkInterval != this.blinkInterval){ + this.blinkInterval = blinkInterval; + this.restartTimer(); + } + }; + + this.setSmoothBlinking = function(smoothBlinking) { + if (smoothBlinking != this.smoothBlinking && !isIE8) { + this.smoothBlinking = smoothBlinking; + dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); + this.$updateCursors(true); + this.$updateCursors = (this.$updateOpacity).bind(this); + this.restartTimer(); + } + }; + + this.addCursor = function() { + var el = dom.createElement("div"); + el.className = "ace_cursor"; + this.element.appendChild(el); + this.cursors.push(el); + return el; + }; + + this.removeCursor = function() { + if (this.cursors.length > 1) { + var el = this.cursors.pop(); + el.parentNode.removeChild(el); + return el; + } + }; + + this.hideCursor = function() { + this.isVisible = false; + dom.addCssClass(this.element, "ace_hidden-cursors"); + this.restartTimer(); + }; + + this.showCursor = function() { + this.isVisible = true; + dom.removeCssClass(this.element, "ace_hidden-cursors"); + this.restartTimer(); + }; + + this.restartTimer = function() { + var update = this.$updateCursors; + clearInterval(this.intervalId); + clearTimeout(this.timeoutId); + if (this.smoothBlinking) { + dom.removeCssClass(this.element, "ace_smooth-blinking"); + } + + update(true); + + if (!this.isBlinking || !this.blinkInterval || !this.isVisible) + return; + + if (this.smoothBlinking) { + setTimeout(function(){ + dom.addCssClass(this.element, "ace_smooth-blinking"); + }.bind(this)); + } + + var blink = function(){ + this.timeoutId = setTimeout(function() { + update(false); + }, 0.6 * this.blinkInterval); + }.bind(this); + + this.intervalId = setInterval(function() { + update(true); + blink(); + }, this.blinkInterval); + + blink(); + }; + + this.getPixelPosition = function(position, onScreen) { + if (!this.config || !this.session) + return {left : 0, top : 0}; + + if (!position) + position = this.session.selection.getCursor(); + var pos = this.session.documentToScreenPosition(position); + var cursorLeft = this.$padding + pos.column * this.config.characterWidth; + var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * + this.config.lineHeight; + + return {left : cursorLeft, top : cursorTop}; + }; + + this.update = function(config) { + this.config = config; + + var selections = this.session.$selectionMarkers; + var i = 0, cursorIndex = 0; + + if (selections === undefined || selections.length === 0){ + selections = [{cursor: null}]; + } + + for (var i = 0, n = selections.length; i < n; i++) { + var pixelPos = this.getPixelPosition(selections[i].cursor, true); + if ((pixelPos.top > config.height + config.offset || + pixelPos.top < 0) && i > 1) { + continue; + } + + var style = (this.cursors[cursorIndex++] || this.addCursor()).style; + + if (!this.drawCursor) { + style.left = pixelPos.left + "px"; + style.top = pixelPos.top + "px"; + style.width = config.characterWidth + "px"; + style.height = config.lineHeight + "px"; + } else { + this.drawCursor(style, pixelPos, config, selections[i], this.session); + } + } + while (this.cursors.length > cursorIndex) + this.removeCursor(); + + var overwrite = this.session.getOverwrite(); + this.$setOverwrite(overwrite); + this.$pixelPos = pixelPos; + this.restartTimer(); + }; + + this.drawCursor = null; + + this.$setOverwrite = function(overwrite) { + if (overwrite != this.overwrite) { + this.overwrite = overwrite; + if (overwrite) + dom.addCssClass(this.element, "ace_overwrite-cursors"); + else + dom.removeCssClass(this.element, "ace_overwrite-cursors"); + } + }; + + this.destroy = function() { + clearInterval(this.intervalId); + clearTimeout(this.timeoutId); + }; + +}).call(Cursor.prototype); + +exports.Cursor = Cursor; + +}); + +ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var dom = acequire("./lib/dom"); +var event = acequire("./lib/event"); +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var ScrollBar = function(parent) { + this.element = dom.createElement("div"); + this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix; + + this.inner = dom.createElement("div"); + this.inner.className = "ace_scrollbar-inner"; + this.element.appendChild(this.inner); + + parent.appendChild(this.element); + + this.setVisible(false); + this.skipEvent = false; + + event.addListener(this.element, "scroll", this.onScroll.bind(this)); + event.addListener(this.element, "mousedown", event.preventDefault); +}; + +(function() { + oop.implement(this, EventEmitter); + + this.setVisible = function(isVisible) { + this.element.style.display = isVisible ? "" : "none"; + this.isVisible = isVisible; + }; +}).call(ScrollBar.prototype); +var VScrollBar = function(parent, renderer) { + ScrollBar.call(this, parent); + this.scrollTop = 0; + renderer.$scrollbarWidth = + this.width = dom.scrollbarWidth(parent.ownerDocument); + this.inner.style.width = + this.element.style.width = (this.width || 15) + 5 + "px"; +}; + +oop.inherits(VScrollBar, ScrollBar); + +(function() { + + this.classSuffix = '-v'; + this.onScroll = function() { + if (!this.skipEvent) { + this.scrollTop = this.element.scrollTop; + this._emit("scroll", {data: this.scrollTop}); + } + this.skipEvent = false; + }; + this.getWidth = function() { + return this.isVisible ? this.width : 0; + }; + this.setHeight = function(height) { + this.element.style.height = height + "px"; + }; + this.setInnerHeight = function(height) { + this.inner.style.height = height + "px"; + }; + this.setScrollHeight = function(height) { + this.inner.style.height = height + "px"; + }; + this.setScrollTop = function(scrollTop) { + if (this.scrollTop != scrollTop) { + this.skipEvent = true; + this.scrollTop = this.element.scrollTop = scrollTop; + } + }; + +}).call(VScrollBar.prototype); +var HScrollBar = function(parent, renderer) { + ScrollBar.call(this, parent); + this.scrollLeft = 0; + this.height = renderer.$scrollbarWidth; + this.inner.style.height = + this.element.style.height = (this.height || 15) + 5 + "px"; +}; + +oop.inherits(HScrollBar, ScrollBar); + +(function() { + + this.classSuffix = '-h'; + this.onScroll = function() { + if (!this.skipEvent) { + this.scrollLeft = this.element.scrollLeft; + this._emit("scroll", {data: this.scrollLeft}); + } + this.skipEvent = false; + }; + this.getHeight = function() { + return this.isVisible ? this.height : 0; + }; + this.setWidth = function(width) { + this.element.style.width = width + "px"; + }; + this.setInnerWidth = function(width) { + this.inner.style.width = width + "px"; + }; + this.setScrollWidth = function(width) { + this.inner.style.width = width + "px"; + }; + this.setScrollLeft = function(scrollLeft) { + if (this.scrollLeft != scrollLeft) { + this.skipEvent = true; + this.scrollLeft = this.element.scrollLeft = scrollLeft; + } + }; + +}).call(HScrollBar.prototype); + + +exports.ScrollBar = VScrollBar; // backward compatibility +exports.ScrollBarV = VScrollBar; // backward compatibility +exports.ScrollBarH = HScrollBar; // backward compatibility + +exports.VScrollBar = VScrollBar; +exports.HScrollBar = HScrollBar; +}); + +ace.define("ace/renderloop",["require","exports","module","ace/lib/event"], function(acequire, exports, module) { +"use strict"; + +var event = acequire("./lib/event"); + + +var RenderLoop = function(onRender, win) { + this.onRender = onRender; + this.pending = false; + this.changes = 0; + this.window = win || window; +}; + +(function() { + + + this.schedule = function(change) { + this.changes = this.changes | change; + if (!this.pending && this.changes) { + this.pending = true; + var _self = this; + event.nextFrame(function() { + _self.pending = false; + var changes; + while (changes = _self.changes) { + _self.changes = 0; + _self.onRender(changes); + } + }, this.window); + } + }; + +}).call(RenderLoop.prototype); + +exports.RenderLoop = RenderLoop; +}); + +ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var dom = acequire("../lib/dom"); +var lang = acequire("../lib/lang"); +var useragent = acequire("../lib/useragent"); +var EventEmitter = acequire("../lib/event_emitter").EventEmitter; + +var CHAR_COUNT = 0; + +var FontMetrics = exports.FontMetrics = function(parentEl) { + this.el = dom.createElement("div"); + this.$setMeasureNodeStyles(this.el.style, true); + + this.$main = dom.createElement("div"); + this.$setMeasureNodeStyles(this.$main.style); + + this.$measureNode = dom.createElement("div"); + this.$setMeasureNodeStyles(this.$measureNode.style); + + + this.el.appendChild(this.$main); + this.el.appendChild(this.$measureNode); + parentEl.appendChild(this.el); + + if (!CHAR_COUNT) + this.$testFractionalRect(); + this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); + + this.$characterSize = {width: 0, height: 0}; + this.checkForSizeChanges(); +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.$characterSize = {width: 0, height: 0}; + + this.$testFractionalRect = function() { + var el = dom.createElement("div"); + this.$setMeasureNodeStyles(el.style); + el.style.width = "0.2px"; + document.documentElement.appendChild(el); + var w = el.getBoundingClientRect().width; + if (w > 0 && w < 1) + CHAR_COUNT = 50; + else + CHAR_COUNT = 100; + el.parentNode.removeChild(el); + }; + + this.$setMeasureNodeStyles = function(style, isRoot) { + style.width = style.height = "auto"; + style.left = style.top = "0px"; + style.visibility = "hidden"; + style.position = "absolute"; + style.whiteSpace = "pre"; + + if (useragent.isIE < 8) { + style["font-family"] = "inherit"; + } else { + style.font = "inherit"; + } + style.overflow = isRoot ? "hidden" : "visible"; + }; + + this.checkForSizeChanges = function() { + var size = this.$measureSizes(); + if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { + this.$measureNode.style.fontWeight = "bold"; + var boldSize = this.$measureSizes(); + this.$measureNode.style.fontWeight = ""; + this.$characterSize = size; + this.charSizes = Object.create(null); + this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height; + this._emit("changeCharacterSize", {data: size}); + } + }; + + this.$pollSizeChanges = function() { + if (this.$pollSizeChangesTimer) + return this.$pollSizeChangesTimer; + var self = this; + return this.$pollSizeChangesTimer = setInterval(function() { + self.checkForSizeChanges(); + }, 500); + }; + + this.setPolling = function(val) { + if (val) { + this.$pollSizeChanges(); + } else if (this.$pollSizeChangesTimer) { + clearInterval(this.$pollSizeChangesTimer); + this.$pollSizeChangesTimer = 0; + } + }; + + this.$measureSizes = function() { + if (CHAR_COUNT === 50) { + var rect = null; + try { + rect = this.$measureNode.getBoundingClientRect(); + } catch(e) { + rect = {width: 0, height:0 }; + } + var size = { + height: rect.height, + width: rect.width / CHAR_COUNT + }; + } else { + var size = { + height: this.$measureNode.clientHeight, + width: this.$measureNode.clientWidth / CHAR_COUNT + }; + } + if (size.width === 0 || size.height === 0) + return null; + return size; + }; + + this.$measureCharWidth = function(ch) { + this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT); + var rect = this.$main.getBoundingClientRect(); + return rect.width / CHAR_COUNT; + }; + + this.getCharacterWidth = function(ch) { + var w = this.charSizes[ch]; + if (w === undefined) { + w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width; + } + return w; + }; + + this.destroy = function() { + clearInterval(this.$pollSizeChangesTimer); + if (this.el && this.el.parentNode) + this.el.parentNode.removeChild(this.el); + }; + +}).call(FontMetrics.prototype); + +}); + +ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var dom = acequire("./lib/dom"); +var config = acequire("./config"); +var useragent = acequire("./lib/useragent"); +var GutterLayer = acequire("./layer/gutter").Gutter; +var MarkerLayer = acequire("./layer/marker").Marker; +var TextLayer = acequire("./layer/text").Text; +var CursorLayer = acequire("./layer/cursor").Cursor; +var HScrollBar = acequire("./scrollbar").HScrollBar; +var VScrollBar = acequire("./scrollbar").VScrollBar; +var RenderLoop = acequire("./renderloop").RenderLoop; +var FontMetrics = acequire("./layer/font_metrics").FontMetrics; +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var editorCss = ".ace_editor {\ +position: relative;\ +overflow: hidden;\ +font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\ +direction: ltr;\ +}\ +.ace_scroller {\ +position: absolute;\ +overflow: hidden;\ +top: 0;\ +bottom: 0;\ +background-color: inherit;\ +-ms-user-select: none;\ +-moz-user-select: none;\ +-webkit-user-select: none;\ +user-select: none;\ +cursor: text;\ +}\ +.ace_content {\ +position: absolute;\ +-moz-box-sizing: border-box;\ +-webkit-box-sizing: border-box;\ +box-sizing: border-box;\ +min-width: 100%;\ +}\ +.ace_dragging .ace_scroller:before{\ +position: absolute;\ +top: 0;\ +left: 0;\ +right: 0;\ +bottom: 0;\ +content: '';\ +background: rgba(250, 250, 250, 0.01);\ +z-index: 1000;\ +}\ +.ace_dragging.ace_dark .ace_scroller:before{\ +background: rgba(0, 0, 0, 0.01);\ +}\ +.ace_selecting, .ace_selecting * {\ +cursor: text !important;\ +}\ +.ace_gutter {\ +position: absolute;\ +overflow : hidden;\ +width: auto;\ +top: 0;\ +bottom: 0;\ +left: 0;\ +cursor: default;\ +z-index: 4;\ +-ms-user-select: none;\ +-moz-user-select: none;\ +-webkit-user-select: none;\ +user-select: none;\ +}\ +.ace_gutter-active-line {\ +position: absolute;\ +left: 0;\ +right: 0;\ +}\ +.ace_scroller.ace_scroll-left {\ +box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ +}\ +.ace_gutter-cell {\ +padding-left: 19px;\ +padding-right: 6px;\ +background-repeat: no-repeat;\ +}\ +.ace_gutter-cell.ace_error {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\ +background-repeat: no-repeat;\ +background-position: 2px center;\ +}\ +.ace_gutter-cell.ace_warning {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\ +background-position: 2px center;\ +}\ +.ace_gutter-cell.ace_info {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\ +background-position: 2px center;\ +}\ +.ace_dark .ace_gutter-cell.ace_info {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\ +}\ +.ace_scrollbar {\ +position: absolute;\ +right: 0;\ +bottom: 0;\ +z-index: 6;\ +}\ +.ace_scrollbar-inner {\ +position: absolute;\ +cursor: text;\ +left: 0;\ +top: 0;\ +}\ +.ace_scrollbar-v{\ +overflow-x: hidden;\ +overflow-y: scroll;\ +top: 0;\ +}\ +.ace_scrollbar-h {\ +overflow-x: scroll;\ +overflow-y: hidden;\ +left: 0;\ +}\ +.ace_print-margin {\ +position: absolute;\ +height: 100%;\ +}\ +.ace_text-input {\ +position: absolute;\ +z-index: 0;\ +width: 0.5em;\ +height: 1em;\ +opacity: 0;\ +background: transparent;\ +-moz-appearance: none;\ +appearance: none;\ +border: none;\ +resize: none;\ +outline: none;\ +overflow: hidden;\ +font: inherit;\ +padding: 0 1px;\ +margin: 0 -1px;\ +text-indent: -1em;\ +-ms-user-select: text;\ +-moz-user-select: text;\ +-webkit-user-select: text;\ +user-select: text;\ +white-space: pre!important;\ +}\ +.ace_text-input.ace_composition {\ +background: inherit;\ +color: inherit;\ +z-index: 1000;\ +opacity: 1;\ +text-indent: 0;\ +}\ +.ace_layer {\ +z-index: 1;\ +position: absolute;\ +overflow: hidden;\ +word-wrap: normal;\ +white-space: pre;\ +height: 100%;\ +width: 100%;\ +-moz-box-sizing: border-box;\ +-webkit-box-sizing: border-box;\ +box-sizing: border-box;\ +pointer-events: none;\ +}\ +.ace_gutter-layer {\ +position: relative;\ +width: auto;\ +text-align: right;\ +pointer-events: auto;\ +}\ +.ace_text-layer {\ +font: inherit !important;\ +}\ +.ace_cjk {\ +display: inline-block;\ +text-align: center;\ +}\ +.ace_cursor-layer {\ +z-index: 4;\ +}\ +.ace_cursor {\ +z-index: 4;\ +position: absolute;\ +-moz-box-sizing: border-box;\ +-webkit-box-sizing: border-box;\ +box-sizing: border-box;\ +border-left: 2px solid;\ +transform: translatez(0);\ +}\ +.ace_slim-cursors .ace_cursor {\ +border-left-width: 1px;\ +}\ +.ace_overwrite-cursors .ace_cursor {\ +border-left-width: 0;\ +border-bottom: 1px solid;\ +}\ +.ace_hidden-cursors .ace_cursor {\ +opacity: 0.2;\ +}\ +.ace_smooth-blinking .ace_cursor {\ +-webkit-transition: opacity 0.18s;\ +transition: opacity 0.18s;\ +}\ +.ace_editor.ace_multiselect .ace_cursor {\ +border-left-width: 1px;\ +}\ +.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ +position: absolute;\ +z-index: 3;\ +}\ +.ace_marker-layer .ace_selection {\ +position: absolute;\ +z-index: 5;\ +}\ +.ace_marker-layer .ace_bracket {\ +position: absolute;\ +z-index: 6;\ +}\ +.ace_marker-layer .ace_active-line {\ +position: absolute;\ +z-index: 2;\ +}\ +.ace_marker-layer .ace_selected-word {\ +position: absolute;\ +z-index: 4;\ +-moz-box-sizing: border-box;\ +-webkit-box-sizing: border-box;\ +box-sizing: border-box;\ +}\ +.ace_line .ace_fold {\ +-moz-box-sizing: border-box;\ +-webkit-box-sizing: border-box;\ +box-sizing: border-box;\ +display: inline-block;\ +height: 11px;\ +margin-top: -2px;\ +vertical-align: middle;\ +background-image:\ +url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ +url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\ +background-repeat: no-repeat, repeat-x;\ +background-position: center center, top left;\ +color: transparent;\ +border: 1px solid black;\ +border-radius: 2px;\ +cursor: pointer;\ +pointer-events: auto;\ +}\ +.ace_dark .ace_fold {\ +}\ +.ace_fold:hover{\ +background-image:\ +url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ +url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\ +}\ +.ace_tooltip {\ +background-color: #FFF;\ +background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\ +background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ +border: 1px solid gray;\ +border-radius: 1px;\ +box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\ +color: black;\ +max-width: 100%;\ +padding: 3px 4px;\ +position: fixed;\ +z-index: 999999;\ +-moz-box-sizing: border-box;\ +-webkit-box-sizing: border-box;\ +box-sizing: border-box;\ +cursor: default;\ +white-space: pre;\ +word-wrap: break-word;\ +line-height: normal;\ +font-style: normal;\ +font-weight: normal;\ +letter-spacing: normal;\ +pointer-events: none;\ +}\ +.ace_folding-enabled > .ace_gutter-cell {\ +padding-right: 13px;\ +}\ +.ace_fold-widget {\ +-moz-box-sizing: border-box;\ +-webkit-box-sizing: border-box;\ +box-sizing: border-box;\ +margin: 0 -12px 0 1px;\ +display: none;\ +width: 11px;\ +vertical-align: top;\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\ +background-repeat: no-repeat;\ +background-position: center;\ +border-radius: 3px;\ +border: 1px solid transparent;\ +cursor: pointer;\ +}\ +.ace_folding-enabled .ace_fold-widget {\ +display: inline-block; \ +}\ +.ace_fold-widget.ace_end {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\ +}\ +.ace_fold-widget.ace_closed {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\ +}\ +.ace_fold-widget:hover {\ +border: 1px solid rgba(0, 0, 0, 0.3);\ +background-color: rgba(255, 255, 255, 0.2);\ +box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\ +}\ +.ace_fold-widget:active {\ +border: 1px solid rgba(0, 0, 0, 0.4);\ +background-color: rgba(0, 0, 0, 0.05);\ +box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\ +}\ +.ace_dark .ace_fold-widget {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\ +}\ +.ace_dark .ace_fold-widget.ace_end {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\ +}\ +.ace_dark .ace_fold-widget.ace_closed {\ +background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\ +}\ +.ace_dark .ace_fold-widget:hover {\ +box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ +background-color: rgba(255, 255, 255, 0.1);\ +}\ +.ace_dark .ace_fold-widget:active {\ +box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ +}\ +.ace_fold-widget.ace_invalid {\ +background-color: #FFB4B4;\ +border-color: #DE5555;\ +}\ +.ace_fade-fold-widgets .ace_fold-widget {\ +-webkit-transition: opacity 0.4s ease 0.05s;\ +transition: opacity 0.4s ease 0.05s;\ +opacity: 0;\ +}\ +.ace_fade-fold-widgets:hover .ace_fold-widget {\ +-webkit-transition: opacity 0.05s ease 0.05s;\ +transition: opacity 0.05s ease 0.05s;\ +opacity:1;\ +}\ +.ace_underline {\ +text-decoration: underline;\ +}\ +.ace_bold {\ +font-weight: bold;\ +}\ +.ace_nobold .ace_bold {\ +font-weight: normal;\ +}\ +.ace_italic {\ +font-style: italic;\ +}\ +.ace_error-marker {\ +background-color: rgba(255, 0, 0,0.2);\ +position: absolute;\ +z-index: 9;\ +}\ +.ace_highlight-marker {\ +background-color: rgba(255, 255, 0,0.2);\ +position: absolute;\ +z-index: 8;\ +}\ +.ace_br1 {border-top-left-radius : 3px;}\ +.ace_br2 {border-top-right-radius : 3px;}\ +.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\ +.ace_br4 {border-bottom-right-radius: 3px;}\ +.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\ +.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\ +.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\ +.ace_br8 {border-bottom-left-radius : 3px;}\ +.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\ +.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\ +.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +"; + +dom.importCssString(editorCss, "ace_editor.css"); + +var VirtualRenderer = function(container, theme) { + var _self = this; + + this.container = container || dom.createElement("div"); + this.$keepTextAreaAtCursor = !useragent.isOldIE; + + dom.addCssClass(this.container, "ace_editor"); + + this.setTheme(theme); + + this.$gutter = dom.createElement("div"); + this.$gutter.className = "ace_gutter"; + this.container.appendChild(this.$gutter); + + this.scroller = dom.createElement("div"); + this.scroller.className = "ace_scroller"; + this.container.appendChild(this.scroller); + + this.content = dom.createElement("div"); + this.content.className = "ace_content"; + this.scroller.appendChild(this.content); + + this.$gutterLayer = new GutterLayer(this.$gutter); + this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)); + + this.$markerBack = new MarkerLayer(this.content); + + var textLayer = this.$textLayer = new TextLayer(this.content); + this.canvas = textLayer.element; + + this.$markerFront = new MarkerLayer(this.content); + + this.$cursorLayer = new CursorLayer(this.content); + this.$horizScroll = false; + this.$vScroll = false; + + this.scrollBar = + this.scrollBarV = new VScrollBar(this.container, this); + this.scrollBarH = new HScrollBar(this.container, this); + this.scrollBarV.addEventListener("scroll", function(e) { + if (!_self.$scrollAnimation) + _self.session.setScrollTop(e.data - _self.scrollMargin.top); + }); + this.scrollBarH.addEventListener("scroll", function(e) { + if (!_self.$scrollAnimation) + _self.session.setScrollLeft(e.data - _self.scrollMargin.left); + }); + + this.scrollTop = 0; + this.scrollLeft = 0; + + this.cursorPos = { + row : 0, + column : 0 + }; + + this.$fontMetrics = new FontMetrics(this.container); + this.$textLayer.$setFontMetrics(this.$fontMetrics); + this.$textLayer.addEventListener("changeCharacterSize", function(e) { + _self.updateCharacterSize(); + _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height); + _self._signal("changeCharacterSize", e); + }); + + this.$size = { + width: 0, + height: 0, + scrollerHeight: 0, + scrollerWidth: 0, + $dirty: true + }; + + this.layerConfig = { + width : 1, + padding : 0, + firstRow : 0, + firstRowScreen: 0, + lastRow : 0, + lineHeight : 0, + characterWidth : 0, + minHeight : 1, + maxHeight : 1, + offset : 0, + height : 1, + gutterOffset: 1 + }; + + this.scrollMargin = { + left: 0, + right: 0, + top: 0, + bottom: 0, + v: 0, + h: 0 + }; + + this.$loop = new RenderLoop( + this.$renderChanges.bind(this), + this.container.ownerDocument.defaultView + ); + this.$loop.schedule(this.CHANGE_FULL); + + this.updateCharacterSize(); + this.setPadding(4); + config.resetOptions(this); + config._emit("renderer", this); +}; + +(function() { + + this.CHANGE_CURSOR = 1; + this.CHANGE_MARKER = 2; + this.CHANGE_GUTTER = 4; + this.CHANGE_SCROLL = 8; + this.CHANGE_LINES = 16; + this.CHANGE_TEXT = 32; + this.CHANGE_SIZE = 64; + this.CHANGE_MARKER_BACK = 128; + this.CHANGE_MARKER_FRONT = 256; + this.CHANGE_FULL = 512; + this.CHANGE_H_SCROLL = 1024; + + oop.implement(this, EventEmitter); + + this.updateCharacterSize = function() { + if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) { + this.$allowBoldFonts = this.$textLayer.allowBoldFonts; + this.setStyle("ace_nobold", !this.$allowBoldFonts); + } + + this.layerConfig.characterWidth = + this.characterWidth = this.$textLayer.getCharacterWidth(); + this.layerConfig.lineHeight = + this.lineHeight = this.$textLayer.getLineHeight(); + this.$updatePrintMargin(); + }; + this.setSession = function(session) { + if (this.session) + this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode); + + this.session = session; + if (session && this.scrollMargin.top && session.getScrollTop() <= 0) + session.setScrollTop(-this.scrollMargin.top); + + this.$cursorLayer.setSession(session); + this.$markerBack.setSession(session); + this.$markerFront.setSession(session); + this.$gutterLayer.setSession(session); + this.$textLayer.setSession(session); + if (!session) + return; + + this.$loop.schedule(this.CHANGE_FULL); + this.session.$setFontMetrics(this.$fontMetrics); + + this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); + this.onChangeNewLineMode() + this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); + }; + this.updateLines = function(firstRow, lastRow, force) { + if (lastRow === undefined) + lastRow = Infinity; + + if (!this.$changedLines) { + this.$changedLines = { + firstRow: firstRow, + lastRow: lastRow + }; + } + else { + if (this.$changedLines.firstRow > firstRow) + this.$changedLines.firstRow = firstRow; + + if (this.$changedLines.lastRow < lastRow) + this.$changedLines.lastRow = lastRow; + } + if (this.$changedLines.lastRow < this.layerConfig.firstRow) { + if (force) + this.$changedLines.lastRow = this.layerConfig.lastRow; + else + return; + } + if (this.$changedLines.firstRow > this.layerConfig.lastRow) + return; + this.$loop.schedule(this.CHANGE_LINES); + }; + + this.onChangeNewLineMode = function() { + this.$loop.schedule(this.CHANGE_TEXT); + this.$textLayer.$updateEolChar(); + }; + + this.onChangeTabSize = function() { + this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); + this.$textLayer.onChangeTabSize(); + }; + this.updateText = function() { + this.$loop.schedule(this.CHANGE_TEXT); + }; + this.updateFull = function(force) { + if (force) + this.$renderChanges(this.CHANGE_FULL, true); + else + this.$loop.schedule(this.CHANGE_FULL); + }; + this.updateFontSize = function() { + this.$textLayer.checkForSizeChanges(); + }; + + this.$changes = 0; + this.$updateSizeAsync = function() { + if (this.$loop.pending) + this.$size.$dirty = true; + else + this.onResize(); + }; + this.onResize = function(force, gutterWidth, width, height) { + if (this.resizing > 2) + return; + else if (this.resizing > 0) + this.resizing++; + else + this.resizing = force ? 1 : 0; + var el = this.container; + if (!height) + height = el.clientHeight || el.scrollHeight; + if (!width) + width = el.clientWidth || el.scrollWidth; + var changes = this.$updateCachedSize(force, gutterWidth, width, height); + + + if (!this.$size.scrollerHeight || (!width && !height)) + return this.resizing = 0; + + if (force) + this.$gutterLayer.$padding = null; + + if (force) + this.$renderChanges(changes | this.$changes, true); + else + this.$loop.schedule(changes | this.$changes); + + if (this.resizing) + this.resizing = 0; + this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null; + }; + + this.$updateCachedSize = function(force, gutterWidth, width, height) { + height -= (this.$extraHeight || 0); + var changes = 0; + var size = this.$size; + var oldSize = { + width: size.width, + height: size.height, + scrollerHeight: size.scrollerHeight, + scrollerWidth: size.scrollerWidth + }; + if (height && (force || size.height != height)) { + size.height = height; + changes |= this.CHANGE_SIZE; + + size.scrollerHeight = size.height; + if (this.$horizScroll) + size.scrollerHeight -= this.scrollBarH.getHeight(); + this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px"; + + changes = changes | this.CHANGE_SCROLL; + } + + if (width && (force || size.width != width)) { + changes |= this.CHANGE_SIZE; + size.width = width; + + if (gutterWidth == null) + gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; + + this.gutterWidth = gutterWidth; + + this.scrollBarH.element.style.left = + this.scroller.style.left = gutterWidth + "px"; + size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); + + this.scrollBarH.element.style.right = + this.scroller.style.right = this.scrollBarV.getWidth() + "px"; + this.scroller.style.bottom = this.scrollBarH.getHeight() + "px"; + + if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) + changes |= this.CHANGE_FULL; + } + + size.$dirty = !width || !height; + + if (changes) + this._signal("resize", oldSize); + + return changes; + }; + + this.onGutterResize = function() { + var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; + if (gutterWidth != this.gutterWidth) + this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); + + if (this.session.getUseWrapMode() && this.adjustWrapLimit()) { + this.$loop.schedule(this.CHANGE_FULL); + } else if (this.$size.$dirty) { + this.$loop.schedule(this.CHANGE_FULL); + } else { + this.$computeLayerConfig(); + this.$loop.schedule(this.CHANGE_MARKER); + } + }; + this.adjustWrapLimit = function() { + var availableWidth = this.$size.scrollerWidth - this.$padding * 2; + var limit = Math.floor(availableWidth / this.characterWidth); + return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn); + }; + this.setAnimatedScroll = function(shouldAnimate){ + this.setOption("animatedScroll", shouldAnimate); + }; + this.getAnimatedScroll = function() { + return this.$animatedScroll; + }; + this.setShowInvisibles = function(showInvisibles) { + this.setOption("showInvisibles", showInvisibles); + }; + this.getShowInvisibles = function() { + return this.getOption("showInvisibles"); + }; + this.getDisplayIndentGuides = function() { + return this.getOption("displayIndentGuides"); + }; + + this.setDisplayIndentGuides = function(display) { + this.setOption("displayIndentGuides", display); + }; + this.setShowPrintMargin = function(showPrintMargin) { + this.setOption("showPrintMargin", showPrintMargin); + }; + this.getShowPrintMargin = function() { + return this.getOption("showPrintMargin"); + }; + this.setPrintMarginColumn = function(showPrintMargin) { + this.setOption("printMarginColumn", showPrintMargin); + }; + this.getPrintMarginColumn = function() { + return this.getOption("printMarginColumn"); + }; + this.getShowGutter = function(){ + return this.getOption("showGutter"); + }; + this.setShowGutter = function(show){ + return this.setOption("showGutter", show); + }; + + this.getFadeFoldWidgets = function(){ + return this.getOption("fadeFoldWidgets") + }; + + this.setFadeFoldWidgets = function(show) { + this.setOption("fadeFoldWidgets", show); + }; + + this.setHighlightGutterLine = function(shouldHighlight) { + this.setOption("highlightGutterLine", shouldHighlight); + }; + + this.getHighlightGutterLine = function() { + return this.getOption("highlightGutterLine"); + }; + + this.$updateGutterLineHighlight = function() { + var pos = this.$cursorLayer.$pixelPos; + var height = this.layerConfig.lineHeight; + if (this.session.getUseWrapMode()) { + var cursor = this.session.selection.getCursor(); + cursor.column = 0; + pos = this.$cursorLayer.getPixelPosition(cursor, true); + height *= this.session.getRowLength(cursor.row); + } + this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px"; + this.$gutterLineHighlight.style.height = height + "px"; + }; + + this.$updatePrintMargin = function() { + if (!this.$showPrintMargin && !this.$printMarginEl) + return; + + if (!this.$printMarginEl) { + var containerEl = dom.createElement("div"); + containerEl.className = "ace_layer ace_print-margin-layer"; + this.$printMarginEl = dom.createElement("div"); + this.$printMarginEl.className = "ace_print-margin"; + containerEl.appendChild(this.$printMarginEl); + this.content.insertBefore(containerEl, this.content.firstChild); + } + + var style = this.$printMarginEl.style; + style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px"; + style.visibility = this.$showPrintMargin ? "visible" : "hidden"; + + if (this.session && this.session.$wrap == -1) + this.adjustWrapLimit(); + }; + this.getContainerElement = function() { + return this.container; + }; + this.getMouseEventTarget = function() { + return this.scroller; + }; + this.getTextAreaContainer = function() { + return this.container; + }; + this.$moveTextAreaToCursor = function() { + if (!this.$keepTextAreaAtCursor) + return; + var config = this.layerConfig; + var posTop = this.$cursorLayer.$pixelPos.top; + var posLeft = this.$cursorLayer.$pixelPos.left; + posTop -= config.offset; + + var style = this.textarea.style; + var h = this.lineHeight; + if (posTop < 0 || posTop > config.height - h) { + style.top = style.left = "0"; + return; + } + + var w = this.characterWidth; + if (this.$composition) { + var val = this.textarea.value.replace(/^\x01+/, ""); + w *= (this.session.$getStringScreenWidth(val)[0]+2); + h += 2; + } + posLeft -= this.scrollLeft; + if (posLeft > this.$size.scrollerWidth - w) + posLeft = this.$size.scrollerWidth - w; + + posLeft += this.gutterWidth; + style.height = h + "px"; + style.width = w + "px"; + style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px"; + style.top = Math.min(posTop, this.$size.height - h) + "px"; + }; + this.getFirstVisibleRow = function() { + return this.layerConfig.firstRow; + }; + this.getFirstFullyVisibleRow = function() { + return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); + }; + this.getLastFullyVisibleRow = function() { + var config = this.layerConfig; + var lastRow = config.lastRow + var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight; + if (top - this.session.getScrollTop() > config.height - config.lineHeight) + return lastRow - 1; + return lastRow; + }; + this.getLastVisibleRow = function() { + return this.layerConfig.lastRow; + }; + + this.$padding = null; + this.setPadding = function(padding) { + this.$padding = padding; + this.$textLayer.setPadding(padding); + this.$cursorLayer.setPadding(padding); + this.$markerFront.setPadding(padding); + this.$markerBack.setPadding(padding); + this.$loop.schedule(this.CHANGE_FULL); + this.$updatePrintMargin(); + }; + + this.setScrollMargin = function(top, bottom, left, right) { + var sm = this.scrollMargin; + sm.top = top|0; + sm.bottom = bottom|0; + sm.right = right|0; + sm.left = left|0; + sm.v = sm.top + sm.bottom; + sm.h = sm.left + sm.right; + if (sm.top && this.scrollTop <= 0 && this.session) + this.session.setScrollTop(-sm.top); + this.updateFull(); + }; + this.getHScrollBarAlwaysVisible = function() { + return this.$hScrollBarAlwaysVisible; + }; + this.setHScrollBarAlwaysVisible = function(alwaysVisible) { + this.setOption("hScrollBarAlwaysVisible", alwaysVisible); + }; + this.getVScrollBarAlwaysVisible = function() { + return this.$vScrollBarAlwaysVisible; + }; + this.setVScrollBarAlwaysVisible = function(alwaysVisible) { + this.setOption("vScrollBarAlwaysVisible", alwaysVisible); + }; + + this.$updateScrollBarV = function() { + var scrollHeight = this.layerConfig.maxHeight; + var scrollerHeight = this.$size.scrollerHeight; + if (!this.$maxLines && this.$scrollPastEnd) { + scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; + if (this.scrollTop > scrollHeight - scrollerHeight) { + scrollHeight = this.scrollTop + scrollerHeight; + this.scrollBarV.scrollTop = null; + } + } + this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); + this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); + }; + this.$updateScrollBarH = function() { + this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h); + this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); + }; + + this.$frozen = false; + this.freeze = function() { + this.$frozen = true; + }; + + this.unfreeze = function() { + this.$frozen = false; + }; + + this.$renderChanges = function(changes, force) { + if (this.$changes) { + changes |= this.$changes; + this.$changes = 0; + } + if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) { + this.$changes |= changes; + return; + } + if (this.$size.$dirty) { + this.$changes |= changes; + return this.onResize(true); + } + if (!this.lineHeight) { + this.$textLayer.checkForSizeChanges(); + } + + this._signal("beforeRender"); + var config = this.layerConfig; + if (changes & this.CHANGE_FULL || + changes & this.CHANGE_SIZE || + changes & this.CHANGE_TEXT || + changes & this.CHANGE_LINES || + changes & this.CHANGE_SCROLL || + changes & this.CHANGE_H_SCROLL + ) { + changes |= this.$computeLayerConfig(); + if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { + var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight; + if (st > 0) { + this.scrollTop = st; + changes = changes | this.CHANGE_SCROLL; + changes |= this.$computeLayerConfig(); + } + } + config = this.layerConfig; + this.$updateScrollBarV(); + if (changes & this.CHANGE_H_SCROLL) + this.$updateScrollBarH(); + this.$gutterLayer.element.style.marginTop = (-config.offset) + "px"; + this.content.style.marginTop = (-config.offset) + "px"; + this.content.style.width = config.width + 2 * this.$padding + "px"; + this.content.style.height = config.minHeight + "px"; + } + if (changes & this.CHANGE_H_SCROLL) { + this.content.style.marginLeft = -this.scrollLeft + "px"; + this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"; + } + if (changes & this.CHANGE_FULL) { + this.$textLayer.update(config); + if (this.$showGutter) + this.$gutterLayer.update(config); + this.$markerBack.update(config); + this.$markerFront.update(config); + this.$cursorLayer.update(config); + this.$moveTextAreaToCursor(); + this.$highlightGutterLine && this.$updateGutterLineHighlight(); + this._signal("afterRender"); + return; + } + if (changes & this.CHANGE_SCROLL) { + if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) + this.$textLayer.update(config); + else + this.$textLayer.scrollLines(config); + + if (this.$showGutter) + this.$gutterLayer.update(config); + this.$markerBack.update(config); + this.$markerFront.update(config); + this.$cursorLayer.update(config); + this.$highlightGutterLine && this.$updateGutterLineHighlight(); + this.$moveTextAreaToCursor(); + this._signal("afterRender"); + return; + } + + if (changes & this.CHANGE_TEXT) { + this.$textLayer.update(config); + if (this.$showGutter) + this.$gutterLayer.update(config); + } + else if (changes & this.CHANGE_LINES) { + if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter) + this.$gutterLayer.update(config); + } + else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { + if (this.$showGutter) + this.$gutterLayer.update(config); + } + + if (changes & this.CHANGE_CURSOR) { + this.$cursorLayer.update(config); + this.$moveTextAreaToCursor(); + this.$highlightGutterLine && this.$updateGutterLineHighlight(); + } + + if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { + this.$markerFront.update(config); + } + + if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { + this.$markerBack.update(config); + } + + this._signal("afterRender"); + }; + + + this.$autosize = function() { + var height = this.session.getScreenLength() * this.lineHeight; + var maxHeight = this.$maxLines * this.lineHeight; + var desiredHeight = Math.max( + (this.$minLines||1) * this.lineHeight, + Math.min(maxHeight, height) + ) + this.scrollMargin.v + (this.$extraHeight || 0); + if (this.$horizScroll) + desiredHeight += this.scrollBarH.getHeight(); + var vScroll = height > maxHeight; + + if (desiredHeight != this.desiredHeight || + this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { + if (vScroll != this.$vScroll) { + this.$vScroll = vScroll; + this.scrollBarV.setVisible(vScroll); + } + + var w = this.container.clientWidth; + this.container.style.height = desiredHeight + "px"; + this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight); + this.desiredHeight = desiredHeight; + + this._signal("autosize"); + } + }; + + this.$computeLayerConfig = function() { + var session = this.session; + var size = this.$size; + + var hideScrollbars = size.height <= 2 * this.lineHeight; + var screenLines = this.session.getScreenLength(); + var maxHeight = screenLines * this.lineHeight; + + var longestLine = this.$getLongestLine(); + + var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || + size.scrollerWidth - longestLine - 2 * this.$padding < 0); + + var hScrollChanged = this.$horizScroll !== horizScroll; + if (hScrollChanged) { + this.$horizScroll = horizScroll; + this.scrollBarH.setVisible(horizScroll); + } + var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine + if (this.$maxLines && this.lineHeight > 1) + this.$autosize(); + + var offset = this.scrollTop % this.lineHeight; + var minHeight = size.scrollerHeight + this.lineHeight; + + var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd + ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd + : 0; + maxHeight += scrollPastEnd; + + var sm = this.scrollMargin; + this.session.setScrollTop(Math.max(-sm.top, + Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom))); + + this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, + longestLine + 2 * this.$padding - size.scrollerWidth + sm.right))); + + var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || + size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top); + var vScrollChanged = vScrollBefore !== vScroll; + if (vScrollChanged) { + this.$vScroll = vScroll; + this.scrollBarV.setVisible(vScroll); + } + + var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; + var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); + var lastRow = firstRow + lineCount; + var firstRowScreen, firstRowHeight; + var lineHeight = this.lineHeight; + firstRow = session.screenToDocumentRow(firstRow, 0); + var foldLine = session.getFoldLine(firstRow); + if (foldLine) { + firstRow = foldLine.start.row; + } + + firstRowScreen = session.documentToScreenRow(firstRow, 0); + firstRowHeight = session.getRowLength(firstRow) * lineHeight; + + lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); + minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + + firstRowHeight; + + offset = this.scrollTop - firstRowScreen * lineHeight; + + var changes = 0; + if (this.layerConfig.width != longestLine) + changes = this.CHANGE_H_SCROLL; + if (hScrollChanged || vScrollChanged) { + changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); + this._signal("scrollbarVisibilityChanged"); + if (vScrollChanged) + longestLine = this.$getLongestLine(); + } + + this.layerConfig = { + width : longestLine, + padding : this.$padding, + firstRow : firstRow, + firstRowScreen: firstRowScreen, + lastRow : lastRow, + lineHeight : lineHeight, + characterWidth : this.characterWidth, + minHeight : minHeight, + maxHeight : maxHeight, + offset : offset, + gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)), + height : this.$size.scrollerHeight + }; + + return changes; + }; + + this.$updateLines = function() { + var firstRow = this.$changedLines.firstRow; + var lastRow = this.$changedLines.lastRow; + this.$changedLines = null; + + var layerConfig = this.layerConfig; + + if (firstRow > layerConfig.lastRow + 1) { return; } + if (lastRow < layerConfig.firstRow) { return; } + if (lastRow === Infinity) { + if (this.$showGutter) + this.$gutterLayer.update(layerConfig); + this.$textLayer.update(layerConfig); + return; + } + this.$textLayer.updateLines(layerConfig, firstRow, lastRow); + return true; + }; + + this.$getLongestLine = function() { + var charCount = this.session.getScreenWidth(); + if (this.showInvisibles && !this.session.$useWrapMode) + charCount += 1; + + return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); + }; + this.updateFrontMarkers = function() { + this.$markerFront.setMarkers(this.session.getMarkers(true)); + this.$loop.schedule(this.CHANGE_MARKER_FRONT); + }; + this.updateBackMarkers = function() { + this.$markerBack.setMarkers(this.session.getMarkers()); + this.$loop.schedule(this.CHANGE_MARKER_BACK); + }; + this.addGutterDecoration = function(row, className){ + this.$gutterLayer.addGutterDecoration(row, className); + }; + this.removeGutterDecoration = function(row, className){ + this.$gutterLayer.removeGutterDecoration(row, className); + }; + this.updateBreakpoints = function(rows) { + this.$loop.schedule(this.CHANGE_GUTTER); + }; + this.setAnnotations = function(annotations) { + this.$gutterLayer.setAnnotations(annotations); + this.$loop.schedule(this.CHANGE_GUTTER); + }; + this.updateCursor = function() { + this.$loop.schedule(this.CHANGE_CURSOR); + }; + this.hideCursor = function() { + this.$cursorLayer.hideCursor(); + }; + this.showCursor = function() { + this.$cursorLayer.showCursor(); + }; + + this.scrollSelectionIntoView = function(anchor, lead, offset) { + this.scrollCursorIntoView(anchor, offset); + this.scrollCursorIntoView(lead, offset); + }; + this.scrollCursorIntoView = function(cursor, offset, $viewMargin) { + if (this.$size.scrollerHeight === 0) + return; + + var pos = this.$cursorLayer.getPixelPosition(cursor); + + var left = pos.left; + var top = pos.top; + + var topMargin = $viewMargin && $viewMargin.top || 0; + var bottomMargin = $viewMargin && $viewMargin.bottom || 0; + + var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop; + + if (scrollTop + topMargin > top) { + if (offset && scrollTop + topMargin > top + this.lineHeight) + top -= offset * this.$size.scrollerHeight; + if (top === 0) + top = -this.scrollMargin.top; + this.session.setScrollTop(top); + } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) { + if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight) + top += offset * this.$size.scrollerHeight; + this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight); + } + + var scrollLeft = this.scrollLeft; + + if (scrollLeft > left) { + if (left < this.$padding + 2 * this.layerConfig.characterWidth) + left = -this.scrollMargin.left; + this.session.setScrollLeft(left); + } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) { + this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth)); + } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) { + this.session.setScrollLeft(0); + } + }; + this.getScrollTop = function() { + return this.session.getScrollTop(); + }; + this.getScrollLeft = function() { + return this.session.getScrollLeft(); + }; + this.getScrollTopRow = function() { + return this.scrollTop / this.lineHeight; + }; + this.getScrollBottomRow = function() { + return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); + }; + this.scrollToRow = function(row) { + this.session.setScrollTop(row * this.lineHeight); + }; + + this.alignCursor = function(cursor, alignment) { + if (typeof cursor == "number") + cursor = {row: cursor, column: 0}; + + var pos = this.$cursorLayer.getPixelPosition(cursor); + var h = this.$size.scrollerHeight - this.lineHeight; + var offset = pos.top - h * (alignment || 0); + + this.session.setScrollTop(offset); + return offset; + }; + + this.STEPS = 8; + this.$calcSteps = function(fromValue, toValue){ + var i = 0; + var l = this.STEPS; + var steps = []; + + var func = function(t, x_min, dx) { + return dx * (Math.pow(t - 1, 3) + 1) + x_min; + }; + + for (i = 0; i < l; ++i) + steps.push(func(i / this.STEPS, fromValue, toValue - fromValue)); + + return steps; + }; + this.scrollToLine = function(line, center, animate, callback) { + var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0}); + var offset = pos.top; + if (center) + offset -= this.$size.scrollerHeight / 2; + + var initialScroll = this.scrollTop; + this.session.setScrollTop(offset); + if (animate !== false) + this.animateScrolling(initialScroll, callback); + }; + + this.animateScrolling = function(fromValue, callback) { + var toValue = this.scrollTop; + if (!this.$animatedScroll) + return; + var _self = this; + + if (fromValue == toValue) + return; + + if (this.$scrollAnimation) { + var oldSteps = this.$scrollAnimation.steps; + if (oldSteps.length) { + fromValue = oldSteps[0]; + if (fromValue == toValue) + return; + } + } + + var steps = _self.$calcSteps(fromValue, toValue); + this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps}; + + clearInterval(this.$timer); + + _self.session.setScrollTop(steps.shift()); + _self.session.$scrollTop = toValue; + this.$timer = setInterval(function() { + if (steps.length) { + _self.session.setScrollTop(steps.shift()); + _self.session.$scrollTop = toValue; + } else if (toValue != null) { + _self.session.$scrollTop = -1; + _self.session.setScrollTop(toValue); + toValue = null; + } else { + _self.$timer = clearInterval(_self.$timer); + _self.$scrollAnimation = null; + callback && callback(); + } + }, 10); + }; + this.scrollToY = function(scrollTop) { + if (this.scrollTop !== scrollTop) { + this.$loop.schedule(this.CHANGE_SCROLL); + this.scrollTop = scrollTop; + } + }; + this.scrollToX = function(scrollLeft) { + if (this.scrollLeft !== scrollLeft) + this.scrollLeft = scrollLeft; + this.$loop.schedule(this.CHANGE_H_SCROLL); + }; + this.scrollTo = function(x, y) { + this.session.setScrollTop(y); + this.session.setScrollLeft(y); + }; + this.scrollBy = function(deltaX, deltaY) { + deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); + deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); + }; + this.isScrollableBy = function(deltaX, deltaY) { + if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) + return true; + if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight + - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) + return true; + if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) + return true; + if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth + - this.layerConfig.width < -1 + this.scrollMargin.right) + return true; + }; + + this.pixelToScreenCoordinates = function(x, y) { + var canvasPos = this.scroller.getBoundingClientRect(); + + var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth; + var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); + var col = Math.round(offset); + + return {row: row, column: col, side: offset - col > 0 ? 1 : -1}; + }; + + this.screenToTextCoordinates = function(x, y) { + var canvasPos = this.scroller.getBoundingClientRect(); + + var col = Math.round( + (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth + ); + + var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight; + + return this.session.screenToDocumentPosition(row, Math.max(col, 0)); + }; + this.textToScreenCoordinates = function(row, column) { + var canvasPos = this.scroller.getBoundingClientRect(); + var pos = this.session.documentToScreenPosition(row, column); + + var x = this.$padding + Math.round(pos.column * this.characterWidth); + var y = pos.row * this.lineHeight; + + return { + pageX: canvasPos.left + x - this.scrollLeft, + pageY: canvasPos.top + y - this.scrollTop + }; + }; + this.visualizeFocus = function() { + dom.addCssClass(this.container, "ace_focus"); + }; + this.visualizeBlur = function() { + dom.removeCssClass(this.container, "ace_focus"); + }; + this.showComposition = function(position) { + if (!this.$composition) + this.$composition = { + keepTextAreaAtCursor: this.$keepTextAreaAtCursor, + cssText: this.textarea.style.cssText + }; + + this.$keepTextAreaAtCursor = true; + dom.addCssClass(this.textarea, "ace_composition"); + this.textarea.style.cssText = ""; + this.$moveTextAreaToCursor(); + }; + this.setCompositionText = function(text) { + this.$moveTextAreaToCursor(); + }; + this.hideComposition = function() { + if (!this.$composition) + return; + + dom.removeCssClass(this.textarea, "ace_composition"); + this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor; + this.textarea.style.cssText = this.$composition.cssText; + this.$composition = null; + }; + this.setTheme = function(theme, cb) { + var _self = this; + this.$themeId = theme; + _self._dispatchEvent('themeChange',{theme:theme}); + + if (!theme || typeof theme == "string") { + var moduleName = theme || this.$options.theme.initialValue; + config.loadModule(["theme", moduleName], afterLoad); + } else { + afterLoad(theme); + } + + function afterLoad(module) { + if (_self.$themeId != theme) + return cb && cb(); + if (!module.cssClass) + return; + dom.importCssString( + module.cssText, + module.cssClass, + _self.container.ownerDocument + ); + + if (_self.theme) + dom.removeCssClass(_self.container, _self.theme.cssClass); + + var padding = "padding" in module ? module.padding + : "padding" in (_self.theme || {}) ? 4 : _self.$padding; + if (_self.$padding && padding != _self.$padding) + _self.setPadding(padding); + _self.$theme = module.cssClass; + + _self.theme = module; + dom.addCssClass(_self.container, module.cssClass); + dom.setCssClass(_self.container, "ace_dark", module.isDark); + if (_self.$size) { + _self.$size.width = 0; + _self.$updateSizeAsync(); + } + + _self._dispatchEvent('themeLoaded', {theme:module}); + cb && cb(); + } + }; + this.getTheme = function() { + return this.$themeId; + }; + this.setStyle = function(style, include) { + dom.setCssClass(this.container, style, include !== false); + }; + this.unsetStyle = function(style) { + dom.removeCssClass(this.container, style); + }; + + this.setCursorStyle = function(style) { + if (this.scroller.style.cursor != style) + this.scroller.style.cursor = style; + }; + this.setMouseCursor = function(cursorStyle) { + this.scroller.style.cursor = cursorStyle; + }; + this.destroy = function() { + this.$textLayer.destroy(); + this.$cursorLayer.destroy(); + }; + +}).call(VirtualRenderer.prototype); + + +config.defineOptions(VirtualRenderer.prototype, "renderer", { + animatedScroll: {initialValue: false}, + showInvisibles: { + set: function(value) { + if (this.$textLayer.setShowInvisibles(value)) + this.$loop.schedule(this.CHANGE_TEXT); + }, + initialValue: false + }, + showPrintMargin: { + set: function() { this.$updatePrintMargin(); }, + initialValue: true + }, + printMarginColumn: { + set: function() { this.$updatePrintMargin(); }, + initialValue: 80 + }, + printMargin: { + set: function(val) { + if (typeof val == "number") + this.$printMarginColumn = val; + this.$showPrintMargin = !!val; + this.$updatePrintMargin(); + }, + get: function() { + return this.$showPrintMargin && this.$printMarginColumn; + } + }, + showGutter: { + set: function(show){ + this.$gutter.style.display = show ? "block" : "none"; + this.$loop.schedule(this.CHANGE_FULL); + this.onGutterResize(); + }, + initialValue: true + }, + fadeFoldWidgets: { + set: function(show) { + dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show); + }, + initialValue: false + }, + showFoldWidgets: { + set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)}, + initialValue: true + }, + showLineNumbers: { + set: function(show) { + this.$gutterLayer.setShowLineNumbers(show); + this.$loop.schedule(this.CHANGE_GUTTER); + }, + initialValue: true + }, + displayIndentGuides: { + set: function(show) { + if (this.$textLayer.setDisplayIndentGuides(show)) + this.$loop.schedule(this.CHANGE_TEXT); + }, + initialValue: true + }, + highlightGutterLine: { + set: function(shouldHighlight) { + if (!this.$gutterLineHighlight) { + this.$gutterLineHighlight = dom.createElement("div"); + this.$gutterLineHighlight.className = "ace_gutter-active-line"; + this.$gutter.appendChild(this.$gutterLineHighlight); + return; + } + + this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none"; + if (this.$cursorLayer.$pixelPos) + this.$updateGutterLineHighlight(); + }, + initialValue: false, + value: true + }, + hScrollBarAlwaysVisible: { + set: function(val) { + if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) + this.$loop.schedule(this.CHANGE_SCROLL); + }, + initialValue: false + }, + vScrollBarAlwaysVisible: { + set: function(val) { + if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) + this.$loop.schedule(this.CHANGE_SCROLL); + }, + initialValue: false + }, + fontSize: { + set: function(size) { + if (typeof size == "number") + size = size + "px"; + this.container.style.fontSize = size; + this.updateFontSize(); + }, + initialValue: 12 + }, + fontFamily: { + set: function(name) { + this.container.style.fontFamily = name; + this.updateFontSize(); + } + }, + maxLines: { + set: function(val) { + this.updateFull(); + } + }, + minLines: { + set: function(val) { + this.updateFull(); + } + }, + scrollPastEnd: { + set: function(val) { + val = +val || 0; + if (this.$scrollPastEnd == val) + return; + this.$scrollPastEnd = val; + this.$loop.schedule(this.CHANGE_SCROLL); + }, + initialValue: 0, + handlesSet: true + }, + fixedWidthGutter: { + set: function(val) { + this.$gutterLayer.$fixedWidth = !!val; + this.$loop.schedule(this.CHANGE_GUTTER); + } + }, + theme: { + set: function(val) { this.setTheme(val) }, + get: function() { return this.$themeId || this.theme; }, + initialValue: "./theme/textmate", + handlesSet: true + } +}); + +exports.VirtualRenderer = VirtualRenderer; +}); + +ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var net = acequire("../lib/net"); +var EventEmitter = acequire("../lib/event_emitter").EventEmitter; +var config = acequire("../config"); + +var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { + this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); + this.changeListener = this.changeListener.bind(this); + this.onMessage = this.onMessage.bind(this); + if (acequire.nameToUrl && !acequire.toUrl) + acequire.toUrl = acequire.nameToUrl; + + if (config.get("packaged") || !acequire.toUrl) { + workerUrl = workerUrl || config.moduleUrl(mod.id, "worker") + } else { + var normalizePath = this.$normalizePath; + workerUrl = workerUrl || normalizePath(acequire.toUrl("ace/worker/worker.js", null, "_")); + + var tlns = {}; + topLevelNamespaces.forEach(function(ns) { + tlns[ns] = normalizePath(acequire.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); + }); + } + + try { + var workerSrc = mod.src; + var Blob = require('w3c-blob'); + var blob = new Blob([ workerSrc ], { type: 'application/javascript' }); + var blobUrl = (window.URL || window.webkitURL).createObjectURL(blob); + + this.$worker = new Worker(blobUrl); + + } catch(e) { + if (e instanceof window.DOMException) { + var blob = this.$workerBlob(workerUrl); + var URL = window.URL || window.webkitURL; + var blobURL = URL.createObjectURL(blob); + + this.$worker = new Worker(blobURL); + URL.revokeObjectURL(blobURL); + } else { + throw e; + } + } + this.$worker.postMessage({ + init : true, + tlns : tlns, + module : mod.id, + classname : classname + }); + + this.callbackId = 1; + this.callbacks = {}; + + this.$worker.onmessage = this.onMessage; +}; + +(function(){ + + oop.implement(this, EventEmitter); + + this.onMessage = function(e) { + var msg = e.data; + switch(msg.type) { + case "event": + this._signal(msg.name, {data: msg.data}); + break; + case "call": + var callback = this.callbacks[msg.id]; + if (callback) { + callback(msg.data); + delete this.callbacks[msg.id]; + } + break; + case "error": + this.reportError(msg.data); + break; + case "log": + window.console && console.log && console.log.apply(console, msg.data); + break; + } + }; + + this.reportError = function(err) { + window.console && console.error && console.error(err); + }; + + this.$normalizePath = function(path) { + return net.qualifyURL(path); + }; + + this.terminate = function() { + this._signal("terminate", {}); + this.deltaQueue = null; + this.$worker.terminate(); + this.$worker = null; + if (this.$doc) + this.$doc.off("change", this.changeListener); + this.$doc = null; + }; + + this.send = function(cmd, args) { + this.$worker.postMessage({command: cmd, args: args}); + }; + + this.call = function(cmd, args, callback) { + if (callback) { + var id = this.callbackId++; + this.callbacks[id] = callback; + args.push(id); + } + this.send(cmd, args); + }; + + this.emit = function(event, data) { + try { + this.$worker.postMessage({event: event, data: {data: data.data}}); + } + catch(ex) { + console.error(ex.stack); + } + }; + + this.attachToDocument = function(doc) { + if(this.$doc) + this.terminate(); + + this.$doc = doc; + this.call("setValue", [doc.getValue()]); + doc.on("change", this.changeListener); + }; + + this.changeListener = function(delta) { + if (!this.deltaQueue) { + this.deltaQueue = []; + setTimeout(this.$sendDeltaQueue, 0); + } + if (delta.action == "insert") + this.deltaQueue.push(delta.start, delta.lines); + else + this.deltaQueue.push(delta.start, delta.end); + }; + + this.$sendDeltaQueue = function() { + var q = this.deltaQueue; + if (!q) return; + this.deltaQueue = null; + if (q.length > 50 && q.length > this.$doc.getLength() >> 1) { + this.call("setValue", [this.$doc.getValue()]); + } else + this.emit("change", {data: q}); + }; + + this.$workerBlob = function(workerUrl) { + var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; + try { + return new Blob([script], {"type": "application/javascript"}); + } catch (e) { // Backwards-compatibility + var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; + var blobBuilder = new BlobBuilder(); + blobBuilder.append(script); + return blobBuilder.getBlob("application/javascript"); + } + }; + +}).call(WorkerClient.prototype); + + +var UIWorkerClient = function(topLevelNamespaces, mod, classname) { + this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); + this.changeListener = this.changeListener.bind(this); + this.callbackId = 1; + this.callbacks = {}; + this.messageBuffer = []; + + var main = null; + var emitSync = false; + var sender = Object.create(EventEmitter); + var _self = this; + + this.$worker = {}; + this.$worker.terminate = function() {}; + this.$worker.postMessage = function(e) { + _self.messageBuffer.push(e); + if (main) { + if (emitSync) + setTimeout(processNext); + else + processNext(); + } + }; + this.setEmitSync = function(val) { emitSync = val }; + + var processNext = function() { + var msg = _self.messageBuffer.shift(); + if (msg.command) + main[msg.command].apply(main, msg.args); + else if (msg.event) + sender._signal(msg.event, msg.data); + }; + + sender.postMessage = function(msg) { + _self.onMessage({data: msg}); + }; + sender.callback = function(data, callbackId) { + this.postMessage({type: "call", id: callbackId, data: data}); + }; + sender.emit = function(name, data) { + this.postMessage({type: "event", name: name, data: data}); + }; + + config.loadModule(["worker", mod], function(Main) { + main = new Main[classname](sender); + while (_self.messageBuffer.length) + processNext(); + }); +}; + +UIWorkerClient.prototype = WorkerClient.prototype; + +exports.UIWorkerClient = UIWorkerClient; +exports.WorkerClient = WorkerClient; + +}); + +ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("./range").Range; +var EventEmitter = acequire("./lib/event_emitter").EventEmitter; +var oop = acequire("./lib/oop"); + +var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) { + var _self = this; + this.length = length; + this.session = session; + this.doc = session.getDocument(); + this.mainClass = mainClass; + this.othersClass = othersClass; + this.$onUpdate = this.onUpdate.bind(this); + this.doc.on("change", this.$onUpdate); + this.$others = others; + + this.$onCursorChange = function() { + setTimeout(function() { + _self.onCursorChange(); + }); + }; + + this.$pos = pos; + var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1}; + this.$undoStackDepth = undoStack.length; + this.setup(); + + session.selection.on("changeCursor", this.$onCursorChange); +}; + +(function() { + + oop.implement(this, EventEmitter); + this.setup = function() { + var _self = this; + var doc = this.doc; + var session = this.session; + + this.selectionBefore = session.selection.toJSON(); + if (session.selection.inMultiSelectMode) + session.selection.toSingleRange(); + + this.pos = doc.createAnchor(this.$pos.row, this.$pos.column); + var pos = this.pos; + pos.$insertRight = true; + pos.detach(); + pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false); + this.others = []; + this.$others.forEach(function(other) { + var anchor = doc.createAnchor(other.row, other.column); + anchor.$insertRight = true; + anchor.detach(); + _self.others.push(anchor); + }); + session.setUndoSelect(false); + }; + this.showOtherMarkers = function() { + if (this.othersActive) return; + var session = this.session; + var _self = this; + this.othersActive = true; + this.others.forEach(function(anchor) { + anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false); + }); + }; + this.hideOtherMarkers = function() { + if (!this.othersActive) return; + this.othersActive = false; + for (var i = 0; i < this.others.length; i++) { + this.session.removeMarker(this.others[i].markerId); + } + }; + this.onUpdate = function(delta) { + if (this.$updating) + return this.updateAnchors(delta); + + var range = delta; + if (range.start.row !== range.end.row) return; + if (range.start.row !== this.pos.row) return; + this.$updating = true; + var lengthDiff = delta.action === "insert" ? range.end.column - range.start.column : range.start.column - range.end.column; + var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1; + var distanceFromStart = range.start.column - this.pos.column; + + this.updateAnchors(delta); + + if (inMainRange) + this.length += lengthDiff; + + if (inMainRange && !this.session.$fromUndo) { + if (delta.action === 'insert') { + for (var i = this.others.length - 1; i >= 0; i--) { + var otherPos = this.others[i]; + var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; + this.doc.insertMergedLines(newPos, delta.lines); + } + } else if (delta.action === 'remove') { + for (var i = this.others.length - 1; i >= 0; i--) { + var otherPos = this.others[i]; + var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; + this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff)); + } + } + } + + this.$updating = false; + this.updateMarkers(); + }; + + this.updateAnchors = function(delta) { + this.pos.onChange(delta); + for (var i = this.others.length; i--;) + this.others[i].onChange(delta); + this.updateMarkers(); + }; + + this.updateMarkers = function() { + if (this.$updating) + return; + var _self = this; + var session = this.session; + var updateMarker = function(pos, className) { + session.removeMarker(pos.markerId); + pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false); + }; + updateMarker(this.pos, this.mainClass); + for (var i = this.others.length; i--;) + updateMarker(this.others[i], this.othersClass); + }; + + this.onCursorChange = function(event) { + if (this.$updating || !this.session) return; + var pos = this.session.selection.getCursor(); + if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) { + this.showOtherMarkers(); + this._emit("cursorEnter", event); + } else { + this.hideOtherMarkers(); + this._emit("cursorLeave", event); + } + }; + this.detach = function() { + this.session.removeMarker(this.pos && this.pos.markerId); + this.hideOtherMarkers(); + this.doc.removeEventListener("change", this.$onUpdate); + this.session.selection.removeEventListener("changeCursor", this.$onCursorChange); + this.session.setUndoSelect(true); + this.session = null; + }; + this.cancel = function() { + if (this.$undoStackDepth === -1) + return; + var undoManager = this.session.getUndoManager(); + var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth; + for (var i = 0; i < undosRequired; i++) { + undoManager.undo(true); + } + if (this.selectionBefore) + this.session.selection.fromJSON(this.selectionBefore); + }; +}).call(PlaceHolder.prototype); + + +exports.PlaceHolder = PlaceHolder; +}); + +ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(acequire, exports, module) { + +var event = acequire("../lib/event"); +var useragent = acequire("../lib/useragent"); +function isSamePoint(p1, p2) { + return p1.row == p2.row && p1.column == p2.column; +} + +function onMouseDown(e) { + var ev = e.domEvent; + var alt = ev.altKey; + var shift = ev.shiftKey; + var ctrl = ev.ctrlKey; + var accel = e.getAccelKey(); + var button = e.getButton(); + + if (ctrl && useragent.isMac) + button = ev.button; + + if (e.editor.inMultiSelectMode && button == 2) { + e.editor.textInput.onContextMenu(e.domEvent); + return; + } + + if (!ctrl && !alt && !accel) { + if (button === 0 && e.editor.inMultiSelectMode) + e.editor.exitMultiSelectMode(); + return; + } + + if (button !== 0) + return; + + var editor = e.editor; + var selection = editor.selection; + var isMultiSelect = editor.inMultiSelectMode; + var pos = e.getDocumentPosition(); + var cursor = selection.getCursor(); + var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); + + var mouseX = e.x, mouseY = e.y; + var onMouseSelection = function(e) { + mouseX = e.clientX; + mouseY = e.clientY; + }; + + var session = editor.session; + var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); + var screenCursor = screenAnchor; + + var selectionMode; + if (editor.$mouseHandler.$enableJumpToDef) { + if (ctrl && alt || accel && alt) + selectionMode = shift ? "block" : "add"; + else if (alt && editor.$blockSelectEnabled) + selectionMode = "block"; + } else { + if (accel && !alt) { + selectionMode = "add"; + if (!isMultiSelect && shift) + return; + } else if (alt && editor.$blockSelectEnabled) { + selectionMode = "block"; + } + } + + if (selectionMode && useragent.isMac && ev.ctrlKey) { + editor.$mouseHandler.cancelContextMenu(); + } + + if (selectionMode == "add") { + if (!isMultiSelect && inSelection) + return; // dragging + + if (!isMultiSelect) { + var range = selection.toOrientedRange(); + editor.addSelectionMarker(range); + } + + var oldRange = selection.rangeList.rangeAtPoint(pos); + + + editor.$blockScrolling++; + editor.inVirtualSelectionMode = true; + + if (shift) { + oldRange = null; + range = selection.ranges[0] || range; + editor.removeSelectionMarker(range); + } + editor.once("mouseup", function() { + var tmpSel = selection.toOrientedRange(); + + if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) + selection.substractPoint(tmpSel.cursor); + else { + if (shift) { + selection.substractPoint(range.cursor); + } else if (range) { + editor.removeSelectionMarker(range); + selection.addRange(range); + } + selection.addRange(tmpSel); + } + editor.$blockScrolling--; + editor.inVirtualSelectionMode = false; + }); + + } else if (selectionMode == "block") { + e.stop(); + editor.inVirtualSelectionMode = true; + var initialRange; + var rectSel = []; + var blockSelect = function() { + var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); + var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column); + + if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) + return; + screenCursor = newCursor; + + editor.$blockScrolling++; + editor.selection.moveToPosition(cursor); + editor.renderer.scrollCursorIntoView(); + + editor.removeSelectionMarkers(rectSel); + rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor); + if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) + rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); + rectSel.forEach(editor.addSelectionMarker, editor); + editor.updateSelectionMarkers(); + editor.$blockScrolling--; + }; + editor.$blockScrolling++; + if (isMultiSelect && !accel) { + selection.toSingleRange(); + } else if (!isMultiSelect && accel) { + initialRange = selection.toOrientedRange(); + editor.addSelectionMarker(initialRange); + } + + if (shift) + screenAnchor = session.documentToScreenPosition(selection.lead); + else + selection.moveToPosition(pos); + editor.$blockScrolling--; + + screenCursor = {row: -1, column: -1}; + + var onMouseSelectionEnd = function(e) { + clearInterval(timerId); + editor.removeSelectionMarkers(rectSel); + if (!rectSel.length) + rectSel = [selection.toOrientedRange()]; + editor.$blockScrolling++; + if (initialRange) { + editor.removeSelectionMarker(initialRange); + selection.toSingleRange(initialRange); + } + for (var i = 0; i < rectSel.length; i++) + selection.addRange(rectSel[i]); + editor.inVirtualSelectionMode = false; + editor.$mouseHandler.$clickSelection = null; + editor.$blockScrolling--; + }; + + var onSelectionInterval = blockSelect; + + event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); + var timerId = setInterval(function() {onSelectionInterval();}, 20); + + return e.preventDefault(); + } +} + + +exports.onMouseDown = onMouseDown; + +}); + +ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(acequire, exports, module) { +exports.defaultCommands = [{ + name: "addCursorAbove", + exec: function(editor) { editor.selectMoreLines(-1); }, + bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "addCursorBelow", + exec: function(editor) { editor.selectMoreLines(1); }, + bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "addCursorAboveSkipCurrent", + exec: function(editor) { editor.selectMoreLines(-1, true); }, + bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "addCursorBelowSkipCurrent", + exec: function(editor) { editor.selectMoreLines(1, true); }, + bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectMoreBefore", + exec: function(editor) { editor.selectMore(-1); }, + bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectMoreAfter", + exec: function(editor) { editor.selectMore(1); }, + bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectNextBefore", + exec: function(editor) { editor.selectMore(-1, true); }, + bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectNextAfter", + exec: function(editor) { editor.selectMore(1, true); }, + bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, + scrollIntoView: "cursor", + readOnly: true +}, { + name: "splitIntoLines", + exec: function(editor) { editor.multiSelect.splitIntoLines(); }, + bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, + readOnly: true +}, { + name: "alignCursors", + exec: function(editor) { editor.alignCursors(); }, + bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}, + scrollIntoView: "cursor" +}, { + name: "findAll", + exec: function(editor) { editor.findAll(); }, + bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, + scrollIntoView: "cursor", + readOnly: true +}]; +exports.multiSelectCommands = [{ + name: "singleSelection", + bindKey: "esc", + exec: function(editor) { editor.exitMultiSelectMode(); }, + scrollIntoView: "cursor", + readOnly: true, + isAvailable: function(editor) {return editor && editor.inMultiSelectMode} +}]; + +var HashHandler = acequire("../keyboard/hash_handler").HashHandler; +exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); + +}); + +ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(acequire, exports, module) { + +var RangeList = acequire("./range_list").RangeList; +var Range = acequire("./range").Range; +var Selection = acequire("./selection").Selection; +var onMouseDown = acequire("./mouse/multi_select_handler").onMouseDown; +var event = acequire("./lib/event"); +var lang = acequire("./lib/lang"); +var commands = acequire("./commands/multi_select_commands"); +exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); +var Search = acequire("./search").Search; +var search = new Search(); + +function find(session, needle, dir) { + search.$options.wrap = true; + search.$options.needle = needle; + search.$options.backwards = dir == -1; + return search.find(session); +} +var EditSession = acequire("./edit_session").EditSession; +(function() { + this.getSelectionMarkers = function() { + return this.$selectionMarkers; + }; +}).call(EditSession.prototype); +(function() { + this.ranges = null; + this.rangeList = null; + this.addRange = function(range, $blockChangeEvents) { + if (!range) + return; + + if (!this.inMultiSelectMode && this.rangeCount === 0) { + var oldRange = this.toOrientedRange(); + this.rangeList.add(oldRange); + this.rangeList.add(range); + if (this.rangeList.ranges.length != 2) { + this.rangeList.removeAll(); + return $blockChangeEvents || this.fromOrientedRange(range); + } + this.rangeList.removeAll(); + this.rangeList.add(oldRange); + this.$onAddRange(oldRange); + } + + if (!range.cursor) + range.cursor = range.end; + + var removed = this.rangeList.add(range); + + this.$onAddRange(range); + + if (removed.length) + this.$onRemoveRange(removed); + + if (this.rangeCount > 1 && !this.inMultiSelectMode) { + this._signal("multiSelect"); + this.inMultiSelectMode = true; + this.session.$undoSelect = false; + this.rangeList.attach(this.session); + } + + return $blockChangeEvents || this.fromOrientedRange(range); + }; + + this.toSingleRange = function(range) { + range = range || this.ranges[0]; + var removed = this.rangeList.removeAll(); + if (removed.length) + this.$onRemoveRange(removed); + + range && this.fromOrientedRange(range); + }; + this.substractPoint = function(pos) { + var removed = this.rangeList.substractPoint(pos); + if (removed) { + this.$onRemoveRange(removed); + return removed[0]; + } + }; + this.mergeOverlappingRanges = function() { + var removed = this.rangeList.merge(); + if (removed.length) + this.$onRemoveRange(removed); + else if(this.ranges[0]) + this.fromOrientedRange(this.ranges[0]); + }; + + this.$onAddRange = function(range) { + this.rangeCount = this.rangeList.ranges.length; + this.ranges.unshift(range); + this._signal("addRange", {range: range}); + }; + + this.$onRemoveRange = function(removed) { + this.rangeCount = this.rangeList.ranges.length; + if (this.rangeCount == 1 && this.inMultiSelectMode) { + var lastRange = this.rangeList.ranges.pop(); + removed.push(lastRange); + this.rangeCount = 0; + } + + for (var i = removed.length; i--; ) { + var index = this.ranges.indexOf(removed[i]); + this.ranges.splice(index, 1); + } + + this._signal("removeRange", {ranges: removed}); + + if (this.rangeCount === 0 && this.inMultiSelectMode) { + this.inMultiSelectMode = false; + this._signal("singleSelect"); + this.session.$undoSelect = true; + this.rangeList.detach(this.session); + } + + lastRange = lastRange || this.ranges[0]; + if (lastRange && !lastRange.isEqual(this.getRange())) + this.fromOrientedRange(lastRange); + }; + this.$initRangeList = function() { + if (this.rangeList) + return; + + this.rangeList = new RangeList(); + this.ranges = []; + this.rangeCount = 0; + }; + this.getAllRanges = function() { + return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]; + }; + + this.splitIntoLines = function () { + if (this.rangeCount > 1) { + var ranges = this.rangeList.ranges; + var lastRange = ranges[ranges.length - 1]; + var range = Range.fromPoints(ranges[0].start, lastRange.end); + + this.toSingleRange(); + this.setSelectionRange(range, lastRange.cursor == lastRange.start); + } else { + var range = this.getRange(); + var isBackwards = this.isBackwards(); + var startRow = range.start.row; + var endRow = range.end.row; + if (startRow == endRow) { + if (isBackwards) + var start = range.end, end = range.start; + else + var start = range.start, end = range.end; + + this.addRange(Range.fromPoints(end, end)); + this.addRange(Range.fromPoints(start, start)); + return; + } + + var rectSel = []; + var r = this.getLineRange(startRow, true); + r.start.column = range.start.column; + rectSel.push(r); + + for (var i = startRow + 1; i < endRow; i++) + rectSel.push(this.getLineRange(i, true)); + + r = this.getLineRange(endRow, true); + r.end.column = range.end.column; + rectSel.push(r); + + rectSel.forEach(this.addRange, this); + } + }; + this.toggleBlockSelection = function () { + if (this.rangeCount > 1) { + var ranges = this.rangeList.ranges; + var lastRange = ranges[ranges.length - 1]; + var range = Range.fromPoints(ranges[0].start, lastRange.end); + + this.toSingleRange(); + this.setSelectionRange(range, lastRange.cursor == lastRange.start); + } else { + var cursor = this.session.documentToScreenPosition(this.selectionLead); + var anchor = this.session.documentToScreenPosition(this.selectionAnchor); + + var rectSel = this.rectangularRangeBlock(cursor, anchor); + rectSel.forEach(this.addRange, this); + } + }; + this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) { + var rectSel = []; + + var xBackwards = screenCursor.column < screenAnchor.column; + if (xBackwards) { + var startColumn = screenCursor.column; + var endColumn = screenAnchor.column; + } else { + var startColumn = screenAnchor.column; + var endColumn = screenCursor.column; + } + + var yBackwards = screenCursor.row < screenAnchor.row; + if (yBackwards) { + var startRow = screenCursor.row; + var endRow = screenAnchor.row; + } else { + var startRow = screenAnchor.row; + var endRow = screenCursor.row; + } + + if (startColumn < 0) + startColumn = 0; + if (startRow < 0) + startRow = 0; + + if (startRow == endRow) + includeEmptyLines = true; + + for (var row = startRow; row <= endRow; row++) { + var range = Range.fromPoints( + this.session.screenToDocumentPosition(row, startColumn), + this.session.screenToDocumentPosition(row, endColumn) + ); + if (range.isEmpty()) { + if (docEnd && isSamePoint(range.end, docEnd)) + break; + var docEnd = range.end; + } + range.cursor = xBackwards ? range.start : range.end; + rectSel.push(range); + } + + if (yBackwards) + rectSel.reverse(); + + if (!includeEmptyLines) { + var end = rectSel.length - 1; + while (rectSel[end].isEmpty() && end > 0) + end--; + if (end > 0) { + var start = 0; + while (rectSel[start].isEmpty()) + start++; + } + for (var i = end; i >= start; i--) { + if (rectSel[i].isEmpty()) + rectSel.splice(i, 1); + } + } + + return rectSel; + }; +}).call(Selection.prototype); +var Editor = acequire("./editor").Editor; +(function() { + this.updateSelectionMarkers = function() { + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + this.addSelectionMarker = function(orientedRange) { + if (!orientedRange.cursor) + orientedRange.cursor = orientedRange.end; + + var style = this.getSelectionStyle(); + orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style); + + this.session.$selectionMarkers.push(orientedRange); + this.session.selectionMarkerCount = this.session.$selectionMarkers.length; + return orientedRange; + }; + this.removeSelectionMarker = function(range) { + if (!range.marker) + return; + this.session.removeMarker(range.marker); + var index = this.session.$selectionMarkers.indexOf(range); + if (index != -1) + this.session.$selectionMarkers.splice(index, 1); + this.session.selectionMarkerCount = this.session.$selectionMarkers.length; + }; + + this.removeSelectionMarkers = function(ranges) { + var markerList = this.session.$selectionMarkers; + for (var i = ranges.length; i--; ) { + var range = ranges[i]; + if (!range.marker) + continue; + this.session.removeMarker(range.marker); + var index = markerList.indexOf(range); + if (index != -1) + markerList.splice(index, 1); + } + this.session.selectionMarkerCount = markerList.length; + }; + + this.$onAddRange = function(e) { + this.addSelectionMarker(e.range); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + + this.$onRemoveRange = function(e) { + this.removeSelectionMarkers(e.ranges); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + + this.$onMultiSelect = function(e) { + if (this.inMultiSelectMode) + return; + this.inMultiSelectMode = true; + + this.setStyle("ace_multiselect"); + this.keyBinding.addKeyboardHandler(commands.keyboardHandler); + this.commands.setDefaultHandler("exec", this.$onMultiSelectExec); + + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + }; + + this.$onSingleSelect = function(e) { + if (this.session.multiSelect.inVirtualMode) + return; + this.inMultiSelectMode = false; + + this.unsetStyle("ace_multiselect"); + this.keyBinding.removeKeyboardHandler(commands.keyboardHandler); + + this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + this._emit("changeSelection"); + }; + + this.$onMultiSelectExec = function(e) { + var command = e.command; + var editor = e.editor; + if (!editor.multiSelect) + return; + if (!command.multiSelectAction) { + var result = command.exec(editor, e.args || {}); + editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()); + editor.multiSelect.mergeOverlappingRanges(); + } else if (command.multiSelectAction == "forEach") { + result = editor.forEachSelection(command, e.args); + } else if (command.multiSelectAction == "forEachLine") { + result = editor.forEachSelection(command, e.args, true); + } else if (command.multiSelectAction == "single") { + editor.exitMultiSelectMode(); + result = command.exec(editor, e.args || {}); + } else { + result = command.multiSelectAction(editor, e.args || {}); + } + return result; + }; + this.forEachSelection = function(cmd, args, options) { + if (this.inVirtualSelectionMode) + return; + var keepOrder = options && options.keepOrder; + var $byLines = options == true || options && options.$byLines + var session = this.session; + var selection = this.selection; + var rangeList = selection.rangeList; + var ranges = (keepOrder ? selection : rangeList).ranges; + var result; + + if (!ranges.length) + return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); + + var reg = selection._eventRegistry; + selection._eventRegistry = {}; + + var tmpSel = new Selection(session); + this.inVirtualSelectionMode = true; + for (var i = ranges.length; i--;) { + if ($byLines) { + while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) + i--; + } + tmpSel.fromOrientedRange(ranges[i]); + tmpSel.index = i; + this.selection = session.selection = tmpSel; + var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); + if (!result && cmdResult !== undefined) + result = cmdResult; + tmpSel.toOrientedRange(ranges[i]); + } + tmpSel.detach(); + + this.selection = session.selection = selection; + this.inVirtualSelectionMode = false; + selection._eventRegistry = reg; + selection.mergeOverlappingRanges(); + + var anim = this.renderer.$scrollAnimation; + this.onCursorChange(); + this.onSelectionChange(); + if (anim && anim.from == anim.to) + this.renderer.animateScrolling(anim.from); + + return result; + }; + this.exitMultiSelectMode = function() { + if (!this.inMultiSelectMode || this.inVirtualSelectionMode) + return; + this.multiSelect.toSingleRange(); + }; + + this.getSelectedText = function() { + var text = ""; + if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { + var ranges = this.multiSelect.rangeList.ranges; + var buf = []; + for (var i = 0; i < ranges.length; i++) { + buf.push(this.session.getTextRange(ranges[i])); + } + var nl = this.session.getDocument().getNewLineCharacter(); + text = buf.join(nl); + if (text.length == (buf.length - 1) * nl.length) + text = ""; + } else if (!this.selection.isEmpty()) { + text = this.session.getTextRange(this.getSelectionRange()); + } + return text; + }; + + this.$checkMultiselectChange = function(e, anchor) { + if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { + var range = this.multiSelect.ranges[0]; + if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) + return; + var pos = anchor == this.multiSelect.anchor + ? range.cursor == range.start ? range.end : range.start + : range.cursor; + if (pos.row != anchor.row + || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) + this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); + } + }; + this.findAll = function(needle, options, additive) { + options = options || {}; + options.needle = needle || options.needle; + if (options.needle == undefined) { + var range = this.selection.isEmpty() + ? this.selection.getWordRange() + : this.selection.getRange(); + options.needle = this.session.getTextRange(range); + } + this.$search.set(options); + + var ranges = this.$search.findAll(this.session); + if (!ranges.length) + return 0; + + this.$blockScrolling += 1; + var selection = this.multiSelect; + + if (!additive) + selection.toSingleRange(ranges[0]); + + for (var i = ranges.length; i--; ) + selection.addRange(ranges[i], true); + if (range && selection.rangeList.rangeAtPoint(range.start)) + selection.addRange(range, true); + + this.$blockScrolling -= 1; + + return ranges.length; + }; + this.selectMoreLines = function(dir, skip) { + var range = this.selection.toOrientedRange(); + var isBackwards = range.cursor == range.end; + + var screenLead = this.session.documentToScreenPosition(range.cursor); + if (this.selection.$desiredColumn) + screenLead.column = this.selection.$desiredColumn; + + var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column); + + if (!range.isEmpty()) { + var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start); + var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column); + } else { + var anchor = lead; + } + + if (isBackwards) { + var newRange = Range.fromPoints(lead, anchor); + newRange.cursor = newRange.start; + } else { + var newRange = Range.fromPoints(anchor, lead); + newRange.cursor = newRange.end; + } + + newRange.desiredColumn = screenLead.column; + if (!this.selection.inMultiSelectMode) { + this.selection.addRange(range); + } else { + if (skip) + var toRemove = range.cursor; + } + + this.selection.addRange(newRange); + if (toRemove) + this.selection.substractPoint(toRemove); + }; + this.transposeSelections = function(dir) { + var session = this.session; + var sel = session.multiSelect; + var all = sel.ranges; + + for (var i = all.length; i--; ) { + var range = all[i]; + if (range.isEmpty()) { + var tmp = session.getWordRange(range.start.row, range.start.column); + range.start.row = tmp.start.row; + range.start.column = tmp.start.column; + range.end.row = tmp.end.row; + range.end.column = tmp.end.column; + } + } + sel.mergeOverlappingRanges(); + + var words = []; + for (var i = all.length; i--; ) { + var range = all[i]; + words.unshift(session.getTextRange(range)); + } + + if (dir < 0) + words.unshift(words.pop()); + else + words.push(words.shift()); + + for (var i = all.length; i--; ) { + var range = all[i]; + var tmp = range.clone(); + session.replace(range, words[i]); + range.start.row = tmp.start.row; + range.start.column = tmp.start.column; + } + }; + this.selectMore = function(dir, skip, stopAtFirst) { + var session = this.session; + var sel = session.multiSelect; + + var range = sel.toOrientedRange(); + if (range.isEmpty()) { + range = session.getWordRange(range.start.row, range.start.column); + range.cursor = dir == -1 ? range.start : range.end; + this.multiSelect.addRange(range); + if (stopAtFirst) + return; + } + var needle = session.getTextRange(range); + + var newRange = find(session, needle, dir); + if (newRange) { + newRange.cursor = dir == -1 ? newRange.start : newRange.end; + this.$blockScrolling += 1; + this.session.unfold(newRange); + this.multiSelect.addRange(newRange); + this.$blockScrolling -= 1; + this.renderer.scrollCursorIntoView(null, 0.5); + } + if (skip) + this.multiSelect.substractPoint(range.cursor); + }; + this.alignCursors = function() { + var session = this.session; + var sel = session.multiSelect; + var ranges = sel.ranges; + var row = -1; + var sameRowRanges = ranges.filter(function(r) { + if (r.cursor.row == row) + return true; + row = r.cursor.row; + }); + + if (!ranges.length || sameRowRanges.length == ranges.length - 1) { + var range = this.selection.getRange(); + var fr = range.start.row, lr = range.end.row; + var guessRange = fr == lr; + if (guessRange) { + var max = this.session.getLength(); + var line; + do { + line = this.session.getLine(lr); + } while (/[=:]/.test(line) && ++lr < max); + do { + line = this.session.getLine(fr); + } while (/[=:]/.test(line) && --fr > 0); + + if (fr < 0) fr = 0; + if (lr >= max) lr = max - 1; + } + var lines = this.session.removeFullLines(fr, lr); + lines = this.$reAlignText(lines, guessRange); + this.session.insert({row: fr, column: 0}, lines.join("\n") + "\n"); + if (!guessRange) { + range.start.column = 0; + range.end.column = lines[lines.length - 1].length; + } + this.selection.setRange(range); + } else { + sameRowRanges.forEach(function(r) { + sel.substractPoint(r.cursor); + }); + + var maxCol = 0; + var minSpace = Infinity; + var spaceOffsets = ranges.map(function(r) { + var p = r.cursor; + var line = session.getLine(p.row); + var spaceOffset = line.substr(p.column).search(/\S/g); + if (spaceOffset == -1) + spaceOffset = 0; + + if (p.column > maxCol) + maxCol = p.column; + if (spaceOffset < minSpace) + minSpace = spaceOffset; + return spaceOffset; + }); + ranges.forEach(function(r, i) { + var p = r.cursor; + var l = maxCol - p.column; + var d = spaceOffsets[i] - minSpace; + if (l > d) + session.insert(p, lang.stringRepeat(" ", l - d)); + else + session.remove(new Range(p.row, p.column, p.row, p.column - l + d)); + + r.start.column = r.end.column = maxCol; + r.start.row = r.end.row = p.row; + r.cursor = r.end; + }); + sel.fromOrientedRange(ranges[0]); + this.renderer.updateCursor(); + this.renderer.updateBackMarkers(); + } + }; + + this.$reAlignText = function(lines, forceLeft) { + var isLeftAligned = true, isRightAligned = true; + var startW, textW, endW; + + return lines.map(function(line) { + var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/); + if (!m) + return [line]; + + if (startW == null) { + startW = m[1].length; + textW = m[2].length; + endW = m[3].length; + return m; + } + + if (startW + textW + endW != m[1].length + m[2].length + m[3].length) + isRightAligned = false; + if (startW != m[1].length) + isLeftAligned = false; + + if (startW > m[1].length) + startW = m[1].length; + if (textW < m[2].length) + textW = m[2].length; + if (endW > m[3].length) + endW = m[3].length; + + return m; + }).map(forceLeft ? alignLeft : + isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign); + + function spaces(n) { + return lang.stringRepeat(" ", n); + } + + function alignLeft(m) { + return !m[2] ? m[0] : spaces(startW) + m[2] + + spaces(textW - m[2].length + endW) + + m[4].replace(/^([=:])\s+/, "$1 "); + } + function alignRight(m) { + return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] + + spaces(endW, " ") + + m[4].replace(/^([=:])\s+/, "$1 "); + } + function unAlign(m) { + return !m[2] ? m[0] : spaces(startW) + m[2] + + spaces(endW) + + m[4].replace(/^([=:])\s+/, "$1 "); + } + }; +}).call(Editor.prototype); + + +function isSamePoint(p1, p2) { + return p1.row == p2.row && p1.column == p2.column; +} +exports.onSessionChange = function(e) { + var session = e.session; + if (session && !session.multiSelect) { + session.$selectionMarkers = []; + session.selection.$initRangeList(); + session.multiSelect = session.selection; + } + this.multiSelect = session && session.multiSelect; + + var oldSession = e.oldSession; + if (oldSession) { + oldSession.multiSelect.off("addRange", this.$onAddRange); + oldSession.multiSelect.off("removeRange", this.$onRemoveRange); + oldSession.multiSelect.off("multiSelect", this.$onMultiSelect); + oldSession.multiSelect.off("singleSelect", this.$onSingleSelect); + oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange); + oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange); + } + + if (session) { + session.multiSelect.on("addRange", this.$onAddRange); + session.multiSelect.on("removeRange", this.$onRemoveRange); + session.multiSelect.on("multiSelect", this.$onMultiSelect); + session.multiSelect.on("singleSelect", this.$onSingleSelect); + session.multiSelect.lead.on("change", this.$checkMultiselectChange); + session.multiSelect.anchor.on("change", this.$checkMultiselectChange); + } + + if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) { + if (session.selection.inMultiSelectMode) + this.$onMultiSelect(); + else + this.$onSingleSelect(); + } +}; +function MultiSelect(editor) { + if (editor.$multiselectOnSessionChange) + return; + editor.$onAddRange = editor.$onAddRange.bind(editor); + editor.$onRemoveRange = editor.$onRemoveRange.bind(editor); + editor.$onMultiSelect = editor.$onMultiSelect.bind(editor); + editor.$onSingleSelect = editor.$onSingleSelect.bind(editor); + editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor); + editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor); + + editor.$multiselectOnSessionChange(editor); + editor.on("changeSession", editor.$multiselectOnSessionChange); + + editor.on("mousedown", onMouseDown); + editor.commands.addCommands(commands.defaultCommands); + + addAltCursorListeners(editor); +} + +function addAltCursorListeners(editor){ + var el = editor.textInput.getElement(); + var altCursor = false; + event.addListener(el, "keydown", function(e) { + var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey); + if (editor.$blockSelectEnabled && altDown) { + if (!altCursor) { + editor.renderer.setMouseCursor("crosshair"); + altCursor = true; + } + } else if (altCursor) { + reset(); + } + }); + + event.addListener(el, "keyup", reset); + event.addListener(el, "blur", reset); + function reset(e) { + if (altCursor) { + editor.renderer.setMouseCursor(""); + altCursor = false; + } + } +} + +exports.MultiSelect = MultiSelect; + + +acequire("./config").defineOptions(Editor.prototype, "editor", { + enableMultiselect: { + set: function(val) { + MultiSelect(this); + if (val) { + this.on("changeSession", this.$multiselectOnSessionChange); + this.on("mousedown", onMouseDown); + } else { + this.off("changeSession", this.$multiselectOnSessionChange); + this.off("mousedown", onMouseDown); + } + }, + value: true + }, + enableBlockSelect: { + set: function(val) { + this.$blockSelectEnabled = val; + }, + value: true + } +}); + + + +}); + +ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; + +(function() { + + this.foldingStartMarker = null; + this.foldingStopMarker = null; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + if (this.foldingStartMarker.test(line)) + return "start"; + if (foldStyle == "markbeginend" + && this.foldingStopMarker + && this.foldingStopMarker.test(line)) + return "end"; + return ""; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + return null; + }; + + this.indentationBlock = function(session, row, column) { + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1) + return; + + var startColumn = column || line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + var level = session.getLine(row).search(re); + + if (level == -1) + continue; + + if (level <= startLevel) + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + + this.openingBracketBlock = function(session, bracket, row, column, typeRe) { + var start = {row: row, column: column + 1}; + var end = session.$findClosingBracket(bracket, start, typeRe); + if (!end) + return; + + var fw = session.foldWidgets[end.row]; + if (fw == null) + fw = session.getFoldWidget(end.row); + + if (fw == "start" && end.row > start.row) { + end.row --; + end.column = session.getLine(end.row).length; + } + return Range.fromPoints(start, end); + }; + + this.closingBracketBlock = function(session, bracket, row, column, typeRe) { + var end = {row: row, column: column}; + var start = session.$findOpeningBracket(bracket, end); + + if (!start) + return; + + start.column++; + end.column--; + + return Range.fromPoints(start, end); + }; +}).call(FoldMode.prototype); + +}); + +ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { +"use strict"; + +exports.isDark = false; +exports.cssClass = "ace-tm"; +exports.cssText = ".ace-tm .ace_gutter {\ +background: #f0f0f0;\ +color: #333;\ +}\ +.ace-tm .ace_print-margin {\ +width: 1px;\ +background: #e8e8e8;\ +}\ +.ace-tm .ace_fold {\ +background-color: #6B72E6;\ +}\ +.ace-tm {\ +background-color: #FFFFFF;\ +color: black;\ +}\ +.ace-tm .ace_cursor {\ +color: black;\ +}\ +.ace-tm .ace_invisible {\ +color: rgb(191, 191, 191);\ +}\ +.ace-tm .ace_storage,\ +.ace-tm .ace_keyword {\ +color: blue;\ +}\ +.ace-tm .ace_constant {\ +color: rgb(197, 6, 11);\ +}\ +.ace-tm .ace_constant.ace_buildin {\ +color: rgb(88, 72, 246);\ +}\ +.ace-tm .ace_constant.ace_language {\ +color: rgb(88, 92, 246);\ +}\ +.ace-tm .ace_constant.ace_library {\ +color: rgb(6, 150, 14);\ +}\ +.ace-tm .ace_invalid {\ +background-color: rgba(255, 0, 0, 0.1);\ +color: red;\ +}\ +.ace-tm .ace_support.ace_function {\ +color: rgb(60, 76, 114);\ +}\ +.ace-tm .ace_support.ace_constant {\ +color: rgb(6, 150, 14);\ +}\ +.ace-tm .ace_support.ace_type,\ +.ace-tm .ace_support.ace_class {\ +color: rgb(109, 121, 222);\ +}\ +.ace-tm .ace_keyword.ace_operator {\ +color: rgb(104, 118, 135);\ +}\ +.ace-tm .ace_string {\ +color: rgb(3, 106, 7);\ +}\ +.ace-tm .ace_comment {\ +color: rgb(76, 136, 107);\ +}\ +.ace-tm .ace_comment.ace_doc {\ +color: rgb(0, 102, 255);\ +}\ +.ace-tm .ace_comment.ace_doc.ace_tag {\ +color: rgb(128, 159, 191);\ +}\ +.ace-tm .ace_constant.ace_numeric {\ +color: rgb(0, 0, 205);\ +}\ +.ace-tm .ace_variable {\ +color: rgb(49, 132, 149);\ +}\ +.ace-tm .ace_xml-pe {\ +color: rgb(104, 104, 91);\ +}\ +.ace-tm .ace_entity.ace_name.ace_function {\ +color: #0000A2;\ +}\ +.ace-tm .ace_heading {\ +color: rgb(12, 7, 255);\ +}\ +.ace-tm .ace_list {\ +color:rgb(185, 6, 144);\ +}\ +.ace-tm .ace_meta.ace_tag {\ +color:rgb(0, 22, 142);\ +}\ +.ace-tm .ace_string.ace_regex {\ +color: rgb(255, 0, 0)\ +}\ +.ace-tm .ace_marker-layer .ace_selection {\ +background: rgb(181, 213, 255);\ +}\ +.ace-tm.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px white;\ +}\ +.ace-tm .ace_marker-layer .ace_step {\ +background: rgb(252, 255, 0);\ +}\ +.ace-tm .ace_marker-layer .ace_stack {\ +background: rgb(164, 229, 101);\ +}\ +.ace-tm .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid rgb(192, 192, 192);\ +}\ +.ace-tm .ace_marker-layer .ace_active-line {\ +background: rgba(0, 0, 0, 0.07);\ +}\ +.ace-tm .ace_gutter-active-line {\ +background-color : #dcdcdc;\ +}\ +.ace-tm .ace_marker-layer .ace_selected-word {\ +background: rgb(250, 250, 255);\ +border: 1px solid rgb(200, 200, 250);\ +}\ +.ace-tm .ace_indent-guide {\ +background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ +}\ +"; + +var dom = acequire("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); + +ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("./lib/oop"); +var dom = acequire("./lib/dom"); +var Range = acequire("./range").Range; + + +function LineWidgets(session) { + this.session = session; + this.session.widgetManager = this; + this.session.getRowLength = this.getRowLength; + this.session.$getWidgetScreenLength = this.$getWidgetScreenLength; + this.updateOnChange = this.updateOnChange.bind(this); + this.renderWidgets = this.renderWidgets.bind(this); + this.measureWidgets = this.measureWidgets.bind(this); + this.session._changedWidgets = []; + this.$onChangeEditor = this.$onChangeEditor.bind(this); + + this.session.on("change", this.updateOnChange); + this.session.on("changeFold", this.updateOnFold); + this.session.on("changeEditor", this.$onChangeEditor); +} + +(function() { + this.getRowLength = function(row) { + var h; + if (this.lineWidgets) + h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; + else + h = 0; + if (!this.$useWrapMode || !this.$wrapData[row]) { + return 1 + h; + } else { + return this.$wrapData[row].length + 1 + h; + } + }; + + this.$getWidgetScreenLength = function() { + var screenRows = 0; + this.lineWidgets.forEach(function(w){ + if (w && w.rowCount && !w.hidden) + screenRows += w.rowCount; + }); + return screenRows; + }; + + this.$onChangeEditor = function(e) { + this.attach(e.editor); + }; + + this.attach = function(editor) { + if (editor && editor.widgetManager && editor.widgetManager != this) + editor.widgetManager.detach(); + + if (this.editor == editor) + return; + + this.detach(); + this.editor = editor; + + if (editor) { + editor.widgetManager = this; + editor.renderer.on("beforeRender", this.measureWidgets); + editor.renderer.on("afterRender", this.renderWidgets); + } + }; + this.detach = function(e) { + var editor = this.editor; + if (!editor) + return; + + this.editor = null; + editor.widgetManager = null; + + editor.renderer.off("beforeRender", this.measureWidgets); + editor.renderer.off("afterRender", this.renderWidgets); + var lineWidgets = this.session.lineWidgets; + lineWidgets && lineWidgets.forEach(function(w) { + if (w && w.el && w.el.parentNode) { + w._inDocument = false; + w.el.parentNode.removeChild(w.el); + } + }); + }; + + this.updateOnFold = function(e, session) { + var lineWidgets = session.lineWidgets; + if (!lineWidgets || !e.action) + return; + var fold = e.data; + var start = fold.start.row; + var end = fold.end.row; + var hide = e.action == "add"; + for (var i = start + 1; i < end; i++) { + if (lineWidgets[i]) + lineWidgets[i].hidden = hide; + } + if (lineWidgets[end]) { + if (hide) { + if (!lineWidgets[start]) + lineWidgets[start] = lineWidgets[end]; + else + lineWidgets[end].hidden = hide; + } else { + if (lineWidgets[start] == lineWidgets[end]) + lineWidgets[start] = undefined; + lineWidgets[end].hidden = hide; + } + } + }; + + this.updateOnChange = function(delta) { + var lineWidgets = this.session.lineWidgets; + if (!lineWidgets) return; + + var startRow = delta.start.row; + var len = delta.end.row - startRow; + + if (len === 0) { + } else if (delta.action == 'remove') { + var removed = lineWidgets.splice(startRow + 1, len); + removed.forEach(function(w) { + w && this.removeLineWidget(w); + }, this); + this.$updateRows(); + } else { + var args = new Array(len); + args.unshift(startRow, 0); + lineWidgets.splice.apply(lineWidgets, args); + this.$updateRows(); + } + }; + + this.$updateRows = function() { + var lineWidgets = this.session.lineWidgets; + if (!lineWidgets) return; + var noWidgets = true; + lineWidgets.forEach(function(w, i) { + if (w) { + noWidgets = false; + w.row = i; + while (w.$oldWidget) { + w.$oldWidget.row = i; + w = w.$oldWidget; + } + } + }); + if (noWidgets) + this.session.lineWidgets = null; + }; + + this.addLineWidget = function(w) { + if (!this.session.lineWidgets) + this.session.lineWidgets = new Array(this.session.getLength()); + + var old = this.session.lineWidgets[w.row]; + if (old) { + w.$oldWidget = old; + if (old.el && old.el.parentNode) { + old.el.parentNode.removeChild(old.el); + old._inDocument = false; + } + } + + this.session.lineWidgets[w.row] = w; + + w.session = this.session; + + var renderer = this.editor.renderer; + if (w.html && !w.el) { + w.el = dom.createElement("div"); + w.el.innerHTML = w.html; + } + if (w.el) { + dom.addCssClass(w.el, "ace_lineWidgetContainer"); + w.el.style.position = "absolute"; + w.el.style.zIndex = 5; + renderer.container.appendChild(w.el); + w._inDocument = true; + } + + if (!w.coverGutter) { + w.el.style.zIndex = 3; + } + if (!w.pixelHeight) { + w.pixelHeight = w.el.offsetHeight; + } + if (w.rowCount == null) { + w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight; + } + + var fold = this.session.getFoldAt(w.row, 0); + w.$fold = fold; + if (fold) { + var lineWidgets = this.session.lineWidgets; + if (w.row == fold.end.row && !lineWidgets[fold.start.row]) + lineWidgets[fold.start.row] = w; + else + w.hidden = true; + } + + this.session._emit("changeFold", {data:{start:{row: w.row}}}); + + this.$updateRows(); + this.renderWidgets(null, renderer); + this.onWidgetChanged(w); + return w; + }; + + this.removeLineWidget = function(w) { + w._inDocument = false; + w.session = null; + if (w.el && w.el.parentNode) + w.el.parentNode.removeChild(w.el); + if (w.editor && w.editor.destroy) try { + w.editor.destroy(); + } catch(e){} + if (this.session.lineWidgets) { + var w1 = this.session.lineWidgets[w.row] + if (w1 == w) { + this.session.lineWidgets[w.row] = w.$oldWidget; + if (w.$oldWidget) + this.onWidgetChanged(w.$oldWidget); + } else { + while (w1) { + if (w1.$oldWidget == w) { + w1.$oldWidget = w.$oldWidget; + break; + } + w1 = w1.$oldWidget; + } + } + } + this.session._emit("changeFold", {data:{start:{row: w.row}}}); + this.$updateRows(); + }; + + this.getWidgetsAtRow = function(row) { + var lineWidgets = this.session.lineWidgets; + var w = lineWidgets && lineWidgets[row]; + var list = []; + while (w) { + list.push(w); + w = w.$oldWidget; + } + return list; + }; + + this.onWidgetChanged = function(w) { + this.session._changedWidgets.push(w); + this.editor && this.editor.renderer.updateFull(); + }; + + this.measureWidgets = function(e, renderer) { + var changedWidgets = this.session._changedWidgets; + var config = renderer.layerConfig; + + if (!changedWidgets || !changedWidgets.length) return; + var min = Infinity; + for (var i = 0; i < changedWidgets.length; i++) { + var w = changedWidgets[i]; + if (!w || !w.el) continue; + if (w.session != this.session) continue; + if (!w._inDocument) { + if (this.session.lineWidgets[w.row] != w) + continue; + w._inDocument = true; + renderer.container.appendChild(w.el); + } + + w.h = w.el.offsetHeight; + + if (!w.fixedWidth) { + w.w = w.el.offsetWidth; + w.screenWidth = Math.ceil(w.w / config.characterWidth); + } + + var rowCount = w.h / config.lineHeight; + if (w.coverLine) { + rowCount -= this.session.getRowLineCount(w.row); + if (rowCount < 0) + rowCount = 0; + } + if (w.rowCount != rowCount) { + w.rowCount = rowCount; + if (w.row < min) + min = w.row; + } + } + if (min != Infinity) { + this.session._emit("changeFold", {data:{start:{row: min}}}); + this.session.lineWidgetWidth = null; + } + this.session._changedWidgets = []; + }; + + this.renderWidgets = function(e, renderer) { + var config = renderer.layerConfig; + var lineWidgets = this.session.lineWidgets; + if (!lineWidgets) + return; + var first = Math.min(this.firstRow, config.firstRow); + var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length); + + while (first > 0 && !lineWidgets[first]) + first--; + + this.firstRow = config.firstRow; + this.lastRow = config.lastRow; + + renderer.$cursorLayer.config = config; + for (var i = first; i <= last; i++) { + var w = lineWidgets[i]; + if (!w || !w.el) continue; + if (w.hidden) { + w.el.style.top = -100 - (w.pixelHeight || 0) + "px"; + continue; + } + if (!w._inDocument) { + w._inDocument = true; + renderer.container.appendChild(w.el); + } + var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top; + if (!w.coverLine) + top += config.lineHeight * this.session.getRowLineCount(w.row); + w.el.style.top = top - config.offset + "px"; + + var left = w.coverGutter ? 0 : renderer.gutterWidth; + if (!w.fixedWidth) + left -= renderer.scrollLeft; + w.el.style.left = left + "px"; + + if (w.fullWidth && w.screenWidth) { + w.el.style.minWidth = config.width + 2 * config.padding + "px"; + } + + if (w.fixedWidth) { + w.el.style.right = renderer.scrollBar.getWidth() + "px"; + } else { + w.el.style.right = ""; + } + } + }; + +}).call(LineWidgets.prototype); + + +exports.LineWidgets = LineWidgets; + +}); + +ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(acequire, exports, module) { +"use strict"; +var LineWidgets = acequire("../line_widgets").LineWidgets; +var dom = acequire("../lib/dom"); +var Range = acequire("../range").Range; + +function binarySearch(array, needle, comparator) { + var first = 0; + var last = array.length - 1; + + while (first <= last) { + var mid = (first + last) >> 1; + var c = comparator(needle, array[mid]); + if (c > 0) + first = mid + 1; + else if (c < 0) + last = mid - 1; + else + return mid; + } + return -(first + 1); +} + +function findAnnotations(session, row, dir) { + var annotations = session.getAnnotations().sort(Range.comparePoints); + if (!annotations.length) + return; + + var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints); + if (i < 0) + i = -i - 1; + + if (i >= annotations.length) + i = dir > 0 ? 0 : annotations.length - 1; + else if (i === 0 && dir < 0) + i = annotations.length - 1; + + var annotation = annotations[i]; + if (!annotation || !dir) + return; + + if (annotation.row === row) { + do { + annotation = annotations[i += dir]; + } while (annotation && annotation.row === row); + if (!annotation) + return annotations.slice(); + } + + + var matched = []; + row = annotation.row; + do { + matched[dir < 0 ? "unshift" : "push"](annotation); + annotation = annotations[i += dir]; + } while (annotation && annotation.row == row); + return matched.length && matched; +} + +exports.showErrorMarker = function(editor, dir) { + var session = editor.session; + if (!session.widgetManager) { + session.widgetManager = new LineWidgets(session); + session.widgetManager.attach(editor); + } + + var pos = editor.getCursorPosition(); + var row = pos.row; + var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) { + return w.type == "errorMarker"; + })[0]; + if (oldWidget) { + oldWidget.destroy(); + } else { + row -= dir; + } + var annotations = findAnnotations(session, row, dir); + var gutterAnno; + if (annotations) { + var annotation = annotations[0]; + pos.column = (annotation.pos && typeof annotation.column != "number" + ? annotation.pos.sc + : annotation.column) || 0; + pos.row = annotation.row; + gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row]; + } else if (oldWidget) { + return; + } else { + gutterAnno = { + text: ["Looks good!"], + className: "ace_ok" + }; + } + editor.session.unfold(pos.row); + editor.selection.moveToPosition(pos); + + var w = { + row: pos.row, + fixedWidth: true, + coverGutter: true, + el: dom.createElement("div"), + type: "errorMarker" + }; + var el = w.el.appendChild(dom.createElement("div")); + var arrow = w.el.appendChild(dom.createElement("div")); + arrow.className = "error_widget_arrow " + gutterAnno.className; + + var left = editor.renderer.$cursorLayer + .getPixelPosition(pos).left; + arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px"; + + w.el.className = "error_widget_wrapper"; + el.className = "error_widget " + gutterAnno.className; + el.innerHTML = gutterAnno.text.join("
"); + + el.appendChild(dom.createElement("div")); + + var kb = function(_, hashId, keyString) { + if (hashId === 0 && (keyString === "esc" || keyString === "return")) { + w.destroy(); + return {command: "null"}; + } + }; + + w.destroy = function() { + if (editor.$mouseHandler.isMousePressed) + return; + editor.keyBinding.removeKeyboardHandler(kb); + session.widgetManager.removeLineWidget(w); + editor.off("changeSelection", w.destroy); + editor.off("changeSession", w.destroy); + editor.off("mouseup", w.destroy); + editor.off("change", w.destroy); + }; + + editor.keyBinding.addKeyboardHandler(kb); + editor.on("changeSelection", w.destroy); + editor.on("changeSession", w.destroy); + editor.on("mouseup", w.destroy); + editor.on("change", w.destroy); + + editor.session.widgetManager.addLineWidget(w); + + w.el.onmousedown = editor.focus.bind(editor); + + editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight}); +}; + + +dom.importCssString("\ + .error_widget_wrapper {\ + background: inherit;\ + color: inherit;\ + border:none\ + }\ + .error_widget {\ + border-top: solid 2px;\ + border-bottom: solid 2px;\ + margin: 5px 0;\ + padding: 10px 40px;\ + white-space: pre-wrap;\ + }\ + .error_widget.ace_error, .error_widget_arrow.ace_error{\ + border-color: #ff5a5a\ + }\ + .error_widget.ace_warning, .error_widget_arrow.ace_warning{\ + border-color: #F1D817\ + }\ + .error_widget.ace_info, .error_widget_arrow.ace_info{\ + border-color: #5a5a5a\ + }\ + .error_widget.ace_ok, .error_widget_arrow.ace_ok{\ + border-color: #5aaa5a\ + }\ + .error_widget_arrow {\ + position: absolute;\ + border: solid 5px;\ + border-top-color: transparent!important;\ + border-right-color: transparent!important;\ + border-left-color: transparent!important;\ + top: -5px;\ + }\ +", ""); + +}); + +ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(acequire, exports, module) { +"use strict"; + +acequire("./lib/fixoldbrowsers"); + +var dom = acequire("./lib/dom"); +var event = acequire("./lib/event"); + +var Editor = acequire("./editor").Editor; +var EditSession = acequire("./edit_session").EditSession; +var UndoManager = acequire("./undomanager").UndoManager; +var Renderer = acequire("./virtual_renderer").VirtualRenderer; +acequire("./worker/worker_client"); +acequire("./keyboard/hash_handler"); +acequire("./placeholder"); +acequire("./multi_select"); +acequire("./mode/folding/fold_mode"); +acequire("./theme/textmate"); +acequire("./ext/error_marker"); + +exports.config = acequire("./config"); +exports.acequire = acequire; +exports.edit = function(el) { + if (typeof el == "string") { + var _id = el; + el = document.getElementById(_id); + if (!el) + throw new Error("ace.edit can't find div #" + _id); + } + + if (el && el.env && el.env.editor instanceof Editor) + return el.env.editor; + + var value = ""; + if (el && /input|textarea/i.test(el.tagName)) { + var oldNode = el; + value = oldNode.value; + el = dom.createElement("pre"); + oldNode.parentNode.replaceChild(el, oldNode); + } else if (el) { + value = dom.getInnerText(el); + el.innerHTML = ""; + } + + var doc = exports.createEditSession(value); + + var editor = new Editor(new Renderer(el)); + editor.setSession(doc); + + var env = { + document: doc, + editor: editor, + onResize: editor.resize.bind(editor, null) + }; + if (oldNode) env.textarea = oldNode; + event.addListener(window, "resize", env.onResize); + editor.on("destroy", function() { + event.removeListener(window, "resize", env.onResize); + env.editor.container.env = null; // prevent memory leak on old ie + }); + editor.container.env = editor.env = env; + return editor; +}; +exports.createEditSession = function(text, mode) { + var doc = new EditSession(text, mode); + doc.setUndoManager(new UndoManager()); + return doc; +} +exports.EditSession = EditSession; +exports.UndoManager = UndoManager; +exports.version = "1.2.3"; +}); + (function() { + ace.acequire(["ace/ace"], function(a) { + a && a.config.init(true); + if (!window.ace) + window.ace = a; + for (var key in a) if (a.hasOwnProperty(key)) + window.ace[key] = a[key]; + }); + })(); + +module.exports = window.ace.acequire("ace/ace"); +},{"w3c-blob":1442}],70:[function(require,module,exports){ +ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, + DocCommentHighlightRules.getTagRule(), + { + defaultToken : "comment.doc", + caseInsensitive: true + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getTagRule = function(start) { + return { + token : "comment.doc.tag.storage.type", + regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +} + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + +var JavaScriptHighlightRules = function(options) { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0(?:[xX][0-9a-fA-F]+|[bB][01]+)\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d[\d_]*(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["support.constant"], + regex : /that\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "punctuation.operator", + regex : /[.](?![.])/, + next : "property" + }, { + token : "keyword.operator", + regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, + next : "start" + }, { + token : "punctuation.operator", + regex : /[?:,;.]/, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token : "text", + regex : "\\s+" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", + next: "function_arguments" + }, { + token : "punctuation.operator", + regex : /[.](?![.])/ + }, { + token : "support.function", + regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : "support.function.dom", + regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : "support.constant", + regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : "identifier", + regex : identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token : "string.quasi.start", + regex : /`/, + push : [{ + token : "constant.language.escape", + regex : escapedRe + }, { + token : "paren.quasi.start", + regex : /\${/, + push : "start" + }, { + token : "string.quasi.end", + regex : /`/, + next : "pop" + }, { + defaultToken: "string.quasi" + }] + }); + + if (!options || !options.noJSX) + JSX.call(this); + } + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); + + this.normalizeRules(); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch : function(val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex : "", + onMatch : function(value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{type: this.token, value: value}]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + token : "text.tag-whitespace.xml", + regex : "\\s+" + }, { + token : "string.attribute-value.xml", + regex : "'", + stateName : "jsx_attr_q", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + stateName : "jsx_attr_qq", + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} + +function comments(next) { + return [ + { + token : "comment", // multi line comment + regex : /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "\\*\\/", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, { + token : "comment", + regex : "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "$|^", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + +var context; +var contextCache = {}; +var initContext = function(editor) { + var id = -1; + if (editor.multiSelect) { + id = editor.selection.index; + if (contextCache.rangeCount != editor.multiSelect.rangeCount) + contextCache = {rangeCount: editor.multiSelect.rangeCount}; + } + if (contextCache[id]) + return context = contextCache[id]; + context = contextCache[id] = { + autoInsertedBrackets: 0, + autoInsertedRow: -1, + autoInsertedLineEnd: "", + maybeInsertedBrackets: 0, + maybeInsertedRow: -1, + maybeInsertedLineStart: "", + maybeInsertedLineEnd: "" + }; +}; + +var getWrapped = function(selection, selected, opening, closing) { + var rowDiff = selection.end.row - selection.start.row; + return { + text: opening + selected + closing, + selection: [ + 0, + selection.start.column + 1, + rowDiff, + selection.end.column + (rowDiff ? 0 : 1) + ] + }; +}; + +var CstyleBehaviour = function() { + this.add("braces", "insertion", function(state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '{', '}'); + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + initContext(editor); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + initContext(editor); + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", context.maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === '}') { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + var next_indent = this.$getIndent(session.getLine(openBracePos.row)); + } else if (closing) { + var next_indent = this.$getIndent(line); + } else { + CstyleBehaviour.clearMaybeInsertedClosing(); + return; + } + var indent = next_indent + session.getTabString(); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } else { + CstyleBehaviour.clearMaybeInsertedClosing(); + } + }); + + this.add("braces", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + context.maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function(state, action, editor, session, text) { + if (text == '(') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '(', ')'); + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function(state, action, editor, session, text) { + if (text == '[') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '[', ']'); + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { + if (text == '"' || text == "'") { + initContext(editor); + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, quote, quote); + } else if (!selected) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + var rightChar = line.substring(cursor.column, cursor.column + 1); + + var token = session.getTokenAt(cursor.row, cursor.column); + var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); + if (leftChar == "\\" && token && /escape/.test(token.type)) + return null; + + var stringBefore = token && /string|escape/.test(token.type); + var stringAfter = !rightToken || /string|escape/.test(rightToken.type); + + var pair; + if (rightChar == quote) { + pair = stringBefore !== stringAfter; + } else { + if (stringBefore && !stringAfter) + return null; // wrap string with different quote + if (stringBefore && stringAfter) + return null; // do not pair quotes inside strings + var wordRe = session.$mode.tokenRe; + wordRe.lastIndex = 0; + var isWordBefore = wordRe.test(leftChar); + wordRe.lastIndex = 0; + var isWordAfter = wordRe.test(leftChar); + if (isWordBefore || isWordAfter) + return null; // before or after alphanumeric + if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) + return null; // there is rightChar and it isn't closing + pair = true; + } + return { + text: pair ? quote + quote : "", + selection: [1,1] + }; + } + } + }); + + this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + + +CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); +}; + +CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; +}; + +CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) + context.autoInsertedBrackets = 0; + context.autoInsertedRow = cursor.row; + context.autoInsertedLineEnd = bracket + line.substr(cursor.column); + context.autoInsertedBrackets++; +}; + +CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = cursor.row; + context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + context.maybeInsertedLineEnd = line.substr(cursor.column); + context.maybeInsertedBrackets++; +}; + +CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return context.autoInsertedBrackets > 0 && + cursor.row === context.autoInsertedRow && + bracket === context.autoInsertedLineEnd[0] && + line.substr(cursor.column) === context.autoInsertedLineEnd; +}; + +CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return context.maybeInsertedBrackets > 0 && + cursor.row === context.maybeInsertedRow && + line.substr(cursor.column) === context.maybeInsertedLineEnd && + line.substr(0, cursor.column) == context.maybeInsertedLineStart; +}; + +CstyleBehaviour.popAutoInsertedClosing = function() { + context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); + context.autoInsertedBrackets--; +}; + +CstyleBehaviour.clearMaybeInsertedClosing = function() { + if (context) { + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = -1; + } +}; + + + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/javascript"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +},{"../worker/javascript":74}],71:[function(require,module,exports){ +ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JsonHighlightRules = function() { + this.$rules = { + "start" : [ + { + token : "variable", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token : "string", // single line + regex : '"', + next : "string" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : "invalid.illegal", // single quoted strings are not allowed + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "invalid.illegal", // comments are not allowed + regex : "\\/\\/.*$" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "string" : [ + { + token : "constant.language.escape", + regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token : "string", + regex : '[^"\\\\]+' + }, { + token : "string", + regex : '"', + next : "start" + }, { + token : "string", + regex : "", + next : "start" + } + ] + }; + +}; + +oop.inherits(JsonHighlightRules, TextHighlightRules); + +exports.JsonHighlightRules = JsonHighlightRules; +}); + +ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(acequire, exports, module) { +"use strict"; + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + +var context; +var contextCache = {}; +var initContext = function(editor) { + var id = -1; + if (editor.multiSelect) { + id = editor.selection.index; + if (contextCache.rangeCount != editor.multiSelect.rangeCount) + contextCache = {rangeCount: editor.multiSelect.rangeCount}; + } + if (contextCache[id]) + return context = contextCache[id]; + context = contextCache[id] = { + autoInsertedBrackets: 0, + autoInsertedRow: -1, + autoInsertedLineEnd: "", + maybeInsertedBrackets: 0, + maybeInsertedRow: -1, + maybeInsertedLineStart: "", + maybeInsertedLineEnd: "" + }; +}; + +var getWrapped = function(selection, selected, opening, closing) { + var rowDiff = selection.end.row - selection.start.row; + return { + text: opening + selected + closing, + selection: [ + 0, + selection.start.column + 1, + rowDiff, + selection.end.column + (rowDiff ? 0 : 1) + ] + }; +}; + +var CstyleBehaviour = function() { + this.add("braces", "insertion", function(state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '{', '}'); + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + initContext(editor); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + initContext(editor); + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", context.maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === '}') { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + var next_indent = this.$getIndent(session.getLine(openBracePos.row)); + } else if (closing) { + var next_indent = this.$getIndent(line); + } else { + CstyleBehaviour.clearMaybeInsertedClosing(); + return; + } + var indent = next_indent + session.getTabString(); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } else { + CstyleBehaviour.clearMaybeInsertedClosing(); + } + }); + + this.add("braces", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + context.maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function(state, action, editor, session, text) { + if (text == '(') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '(', ')'); + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function(state, action, editor, session, text) { + if (text == '[') { + initContext(editor); + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, '[', ']'); + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + initContext(editor); + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { + if (text == '"' || text == "'") { + initContext(editor); + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return getWrapped(selection, selected, quote, quote); + } else if (!selected) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + var rightChar = line.substring(cursor.column, cursor.column + 1); + + var token = session.getTokenAt(cursor.row, cursor.column); + var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); + if (leftChar == "\\" && token && /escape/.test(token.type)) + return null; + + var stringBefore = token && /string|escape/.test(token.type); + var stringAfter = !rightToken || /string|escape/.test(rightToken.type); + + var pair; + if (rightChar == quote) { + pair = stringBefore !== stringAfter; + } else { + if (stringBefore && !stringAfter) + return null; // wrap string with different quote + if (stringBefore && stringAfter) + return null; // do not pair quotes inside strings + var wordRe = session.$mode.tokenRe; + wordRe.lastIndex = 0; + var isWordBefore = wordRe.test(leftChar); + wordRe.lastIndex = 0; + var isWordAfter = wordRe.test(leftChar); + if (isWordBefore || isWordAfter) + return null; // before or after alphanumeric + if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) + return null; // there is rightChar and it isn't closing + pair = true; + } + return { + text: pair ? quote + quote : "", + selection: [1,1] + }; + } + } + }); + + this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + initContext(editor); + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + + +CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); +}; + +CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; +}; + +CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) + context.autoInsertedBrackets = 0; + context.autoInsertedRow = cursor.row; + context.autoInsertedLineEnd = bracket + line.substr(cursor.column); + context.autoInsertedBrackets++; +}; + +CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = cursor.row; + context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + context.maybeInsertedLineEnd = line.substr(cursor.column); + context.maybeInsertedBrackets++; +}; + +CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return context.autoInsertedBrackets > 0 && + cursor.row === context.autoInsertedRow && + bracket === context.autoInsertedLineEnd[0] && + line.substr(cursor.column) === context.autoInsertedLineEnd; +}; + +CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return context.maybeInsertedBrackets > 0 && + cursor.row === context.maybeInsertedRow && + line.substr(cursor.column) === context.maybeInsertedLineEnd && + line.substr(0, cursor.column) == context.maybeInsertedLineStart; +}; + +CstyleBehaviour.popAutoInsertedClosing = function() { + context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); + context.autoInsertedBrackets--; +}; + +CstyleBehaviour.clearMaybeInsertedClosing = function() { + if (context) { + context.maybeInsertedBrackets = 0; + context.maybeInsertedRow = -1; + } +}; + + + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var HighlightRules = acequire("./json_highlight_rules").JsonHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; + +var Mode = function() { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/json"), "JsonWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + + this.$id = "ace/mode/json"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +},{"../worker/json":75}],72:[function(require,module,exports){ +ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PythonHighlightRules = function() { + + var keywords = ( + "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield" + ); + + var builtinConstants = ( + "True|False|None|NotImplemented|Ellipsis|__debug__" + ); + + var builtinFunctions = ( + "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + + this.$rules = { + "start" : [ { + token : "comment", + regex : "#.*$" + }, { + token : "string", // multi line """ string start + regex : strPre + '"{3}', + next : "qqstring3" + }, { + token : "string", // " string + regex : strPre + '"(?=.)', + next : "qqstring" + }, { + token : "string", // multi line ''' string start + regex : strPre + "'{3}", + next : "qstring3" + }, { + token : "string", // ' string + regex : strPre + "'(?=.)", + next : "qstring" + }, { + token : "constant.numeric", // imaginary + regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // long integer + regex : integer + "[lL]\\b" + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+" + } ], + "qqstring3" : [ { + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", // multi line """ string end + regex : '"{3}', + next : "start" + }, { + defaultToken : "string" + } ], + "qstring3" : [ { + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", // multi line ''' string end + regex : "'{3}", + next : "start" + }, { + defaultToken : "string" + } ], + "qqstring" : [{ + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "start" + }, { + defaultToken: "string" + }], + "qstring" : [{ + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "start" + }, { + defaultToken: "string" + }] + }; +}; + +oop.inherits(PythonHighlightRules, TextHighlightRules); + +exports.PythonHighlightRules = PythonHighlightRules; +}); + +ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(markers) { + this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + if (match[1]) + return this.openingBracketBlock(session, match[1], row, match.index); + if (match[2]) + return this.indentationBlock(session, row, match.index + match[2].length); + return this.indentationBlock(session, row); + } + } + +}).call(FoldMode.prototype); + +}); + +ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(acequire, exports, module) { +"use strict"; + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var PythonHighlightRules = acequire("./python_highlight_rules").PythonHighlightRules; +var PythonFoldMode = acequire("./folding/pythonic").FoldMode; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = PythonHighlightRules; + this.foldingRules = new PythonFoldMode("\\:"); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[\:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + + this.checkOutdent = function(state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + + if (!last) + return false; + + return (last.type == "keyword" && outdents[last.value]); + }; + + this.autoOutdent = function(state, doc, row) { + + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + + this.$id = "ace/mode/python"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +},{}],73:[function(require,module,exports){ +ace.define("ace/theme/tomorrow_night_blue",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-tomorrow-night-blue"; +exports.cssText = ".ace-tomorrow-night-blue .ace_gutter {\ +background: #00204b;\ +color: #7388b5\ +}\ +.ace-tomorrow-night-blue .ace_print-margin {\ +width: 1px;\ +background: #00204b\ +}\ +.ace-tomorrow-night-blue {\ +background-color: #002451;\ +color: #FFFFFF\ +}\ +.ace-tomorrow-night-blue .ace_constant.ace_other,\ +.ace-tomorrow-night-blue .ace_cursor {\ +color: #FFFFFF\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {\ +background: #003F8E\ +}\ +.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #002451;\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_step {\ +background: rgb(127, 111, 19)\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #404F7D\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {\ +background: #00346E\ +}\ +.ace-tomorrow-night-blue .ace_gutter-active-line {\ +background-color: #022040\ +}\ +.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {\ +border: 1px solid #003F8E\ +}\ +.ace-tomorrow-night-blue .ace_invisible {\ +color: #404F7D\ +}\ +.ace-tomorrow-night-blue .ace_keyword,\ +.ace-tomorrow-night-blue .ace_meta,\ +.ace-tomorrow-night-blue .ace_storage,\ +.ace-tomorrow-night-blue .ace_storage.ace_type,\ +.ace-tomorrow-night-blue .ace_support.ace_type {\ +color: #EBBBFF\ +}\ +.ace-tomorrow-night-blue .ace_keyword.ace_operator {\ +color: #99FFFF\ +}\ +.ace-tomorrow-night-blue .ace_constant.ace_character,\ +.ace-tomorrow-night-blue .ace_constant.ace_language,\ +.ace-tomorrow-night-blue .ace_constant.ace_numeric,\ +.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,\ +.ace-tomorrow-night-blue .ace_support.ace_constant,\ +.ace-tomorrow-night-blue .ace_variable.ace_parameter {\ +color: #FFC58F\ +}\ +.ace-tomorrow-night-blue .ace_invalid {\ +color: #FFFFFF;\ +background-color: #F99DA5\ +}\ +.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {\ +color: #FFFFFF;\ +background-color: #EBBBFF\ +}\ +.ace-tomorrow-night-blue .ace_fold {\ +background-color: #BBDAFF;\ +border-color: #FFFFFF\ +}\ +.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,\ +.ace-tomorrow-night-blue .ace_support.ace_function,\ +.ace-tomorrow-night-blue .ace_variable {\ +color: #BBDAFF\ +}\ +.ace-tomorrow-night-blue .ace_support.ace_class,\ +.ace-tomorrow-night-blue .ace_support.ace_type {\ +color: #FFEEAD\ +}\ +.ace-tomorrow-night-blue .ace_heading,\ +.ace-tomorrow-night-blue .ace_markup.ace_heading,\ +.ace-tomorrow-night-blue .ace_string {\ +color: #D1F1A9\ +}\ +.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,\ +.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,\ +.ace-tomorrow-night-blue .ace_meta.ace_tag,\ +.ace-tomorrow-night-blue .ace_string.ace_regexp,\ +.ace-tomorrow-night-blue .ace_variable {\ +color: #FF9DA4\ +}\ +.ace-tomorrow-night-blue .ace_comment {\ +color: #7285B7\ +}\ +.ace-tomorrow-night-blue .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\ +}"; + +var dom = acequire("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); + +},{}],74:[function(require,module,exports){ +module.exports.id = 'ace/mode/javascript_worker'; +module.exports.src = "\"no use strict\";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\"\";testPath;){var alias=paths[testPath];if(\"string\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,\"/\")+(tail||alias.main||alias.name);if(alias===!1)return\"\";var i=testPath.lastIndexOf(\"/\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\"error\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\"!\")){var chunks=moduleName.split(\"!\");return window.normalizeModule(parentId,chunks[0])+\"!\"+window.normalizeModule(parentId,chunks[1])}if(\".\"==moduleName.charAt(0)){var base=parentId.split(\"/\").slice(0,-1).join(\"/\");for(moduleName=(base?base+\"/\":\"\")+moduleName;-1!==moduleName.indexOf(\".\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,\"\").replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\"worker.js acequire() accepts only (parentId, id) as arguments\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\"unable to load \"+id);var path=resolveModuleId(id,window.acequire.tlns);return\".js\"!=path.slice(-3)&&(path+=\".js\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\"string\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\"function\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\"require\",\"exports\",\"module\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\"require\":return req;case\"exports\":return module.exports;case\"module\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\"ace/lib/event_emitter\").EventEmitter,oop=window.acequire(\"ace/lib/oop\"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:\"call\",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:\"event\",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\"Unknown command:\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\"ace/lib/es5-shim\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\"object\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){\"object\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\"\";switch(delta.action){case\"insert\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\"remove\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\"object\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\"unshift\":\"push\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.columnthis.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal(\"change\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\"change\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),applyDelta=acequire(\"./apply_delta\").applyDelta,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Anchor=acequire(\"./anchor\").Anchor,Document=function(textOrLines){this.$lines=[\"\"],0===textOrLines.length?this.$lines=[\"\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0===\"aaa\".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:\"\\n\",this._signal(\"changeNewLineMode\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine||\"\\n\"}},this.$autoNewLine=\"\",this.$newLineMode=\"auto\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\"changeNewLineMode\"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\"\\r\\n\"==text||\"\\r\"==text||\"\\n\"==text},this.getLine=function(row){return this.$lines[row]||\"\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\"\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\"),this.insertMergedLines(position,[\"\",\"\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\"insert\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\"\"]),column=0):(lines=[\"\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\"insert\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\"remove\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\"remove\",lines:[\"\",\"\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\"insert\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\"change\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\"\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\"insert\"==delta.action?\"remove\":\"insert\",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split(\"\").reverse().join(\"\")},exports.stringRepeat=function(string,count){for(var result=\"\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\"\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\"\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\"object\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if(\"object\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}var cons=obj.constructor;if(cons===RegExp)return obj;copy=cons();for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},exports.escapeHTML=function(str){return str.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/'/g,\"'\").replace(/i;i+=2){if(Array.isArray(data[i+1]))var d={action:\"insert\",start:data[i],lines:data[i+1]};else var d={action:\"remove\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\"ace/mode/javascript/jshint\",[\"require\",\"exports\",\"module\"],function(acequire,exports,module){module.exports=function outer(modules,cache,entry){function newRequire(name,jumped){if(!cache[name]){if(!modules[name]){var currentRequire=\"function\"==typeof acequire&&acequire;if(!jumped&¤tRequire)return currentRequire(name,!0);if(previousRequire)return previousRequire(name,!0);var err=Error(\"Cannot find module '\"+name+\"'\");throw err.code=\"MODULE_NOT_FOUND\",err}var m=cache[name]={exports:{}};modules[name][0].call(m.exports,function(x){var id=modules[name][1][x];return newRequire(id?id:x)},m,m.exports,outer,modules,cache,entry)}return cache[name].exports}for(var previousRequire=\"function\"==typeof acequire&&acequire,i=0;entry.length>i;i++)newRequire(entry[i]);return newRequire(entry[0])}({\"/node_modules/browserify/node_modules/events/events.js\":[function(_dereq_,module){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return\"function\"==typeof arg}function isNumber(arg){return\"number\"==typeof arg}function isObject(arg){return\"object\"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||0>n||isNaN(n))throw TypeError(\"n must be a positive number\");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),\"error\"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError('Uncaught, unspecified \"error\" event.')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];handler.apply(this,args)}else if(isObject(handler)){for(len=arguments.length,args=Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];for(listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args)}return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError(\"listener must be a function\");if(this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned){var m;m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[type].length),\"function\"==typeof console.trace&&console.trace())}return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError(\"listener must be a function\");var fired=!1;return g.listener=listener,this.on(type,g),this},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;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],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(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit(\"removeListener\",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)\"removeListener\"!==key&&this.removeAllListeners(key);return this.removeAllListeners(\"removeListener\"),this._events={},this\n}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.listenerCount=function(emitter,type){var ret;return ret=emitter._events&&emitter._events[type]?isFunction(emitter._events[type])?1:emitter._events[type].length:0}},{}],\"/node_modules/jshint/data/ascii-identifier-data.js\":[function(_dereq_,module){for(var identifierStartTable=[],i=0;128>i;i++)identifierStartTable[i]=36===i||i>=65&&90>=i||95===i||i>=97&&122>=i;for(var identifierPartTable=[],i=0;128>i;i++)identifierPartTable[i]=identifierStartTable[i]||i>=48&&57>=i;module.exports={asciiIdentifierStartTable:identifierStartTable,asciiIdentifierPartTable:identifierPartTable}},{}],\"/node_modules/jshint/lodash.js\":[function(_dereq_,module,exports){(function(global){(function(){function baseFindIndex(array,predicate,fromRight){for(var length=array.length,index=fromRight?length:-1;fromRight?index--:length>++index;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){if(value!==value)return indexOfNaN(array,fromIndex);for(var index=fromIndex-1,length=array.length;length>++index;)if(array[index]===value)return index;return-1}function baseIsFunction(value){return\"function\"==typeof value||!1}function baseToString(value){return\"string\"==typeof value?value:null==value?\"\":value+\"\"}function indexOfNaN(array,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?0:-1);fromRight?index--:length>++index;){var other=array[index];if(other!==other)return index}return-1}function isObjectLike(value){return!!value&&\"object\"==typeof value}function lodash(){}function arrayCopy(source,array){var index=-1,length=source.length;for(array||(array=Array(length));length>++index;)array[index]=source[index];return array}function arrayEach(array,iteratee){for(var index=-1,length=array.length;length>++index&&iteratee(array[index],index,array)!==!1;);return array}function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];length>++index;){var value=array[index];predicate(value,index,array)&&(result[++resIndex]=value)}return result}function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);length>++index;)result[index]=iteratee(array[index],index,array);return result}function arrayMax(array){for(var index=-1,length=array.length,result=NEGATIVE_INFINITY;length>++index;){var value=array[index];value>result&&(result=value)}return result}function arraySome(array,predicate){for(var index=-1,length=array.length;length>++index;)if(predicate(array[index],index,array))return!0;return!1}function assignWith(object,source,customizer){var props=keys(source);push.apply(props,getSymbols(source));for(var index=-1,length=props.length;length>++index;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(value!==undefined||key in object)||(object[key]=result)}return object}function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;length>++index;){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;return\"function\"==type?thisArg===undefined?func:bindCallback(func,thisArg,argCount):null==func?identity:\"object\"==type?baseMatches(func):thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer&&(result=object?customizer(value,key,object):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=initCloneArray(value),!isDeep)return arrayCopy(value,result)}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag!=objectTag&&tag!=argsTag&&(!isFunc||object))return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{};if(result=initCloneObject(isFunc?{}:value),!isDeep)return baseAssign(result,value)}stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];return stackA.push(value),stackB.push(result),(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)}),result}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseGet(object,path,pathKey){if(null!=object){pathKey!==undefined&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=-1,length=path.length;null!=object&&length>++index;)var result=object=object[path[index]];return result}}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other)return 0!==value||1/value==1/other;var valType=typeof value,othType=typeof other;return\"function\"!=valType&&\"object\"!=valType&&\"function\"!=othType&&\"object\"!=othType||null==value||null==other?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var valWrapped=objIsObj&&hasOwnProperty.call(object,\"__wrapped__\"),othWrapped=othIsObj&&hasOwnProperty.call(other,\"__wrapped__\");if(valWrapped||othWrapped)return equalFunc(valWrapped?object.value():object,othWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}function baseIsMatch(object,props,values,strictCompareFlags,customizer){for(var index=-1,length=props.length,noCustomizer=!customizer;length>++index;)if(noCustomizer&&strictCompareFlags[index]?values[index]!==object[props[index]]:!(props[index]in object))return!1;for(index=-1;length>++index;){var key=props[index],objValue=object[key],srcValue=values[index];if(noCustomizer&&strictCompareFlags[index])var result=objValue!==undefined||key in object;else result=customizer?customizer(objValue,srcValue,key):undefined,result===undefined&&(result=baseIsEqual(srcValue,objValue,customizer,!0));if(!result)return!1}return!0}function baseMatches(source){var props=keys(source),length=props.length;if(!length)return constant(!0);if(1==length){var key=props[0],value=source[key];if(isStrictComparable(value))return function(object){return null==object?!1:object[key]===value&&(value!==undefined||key in toObject(object))}}for(var values=Array(length),strictCompareFlags=Array(length);length--;)value=source[props[length]],values[length]=value,strictCompareFlags[length]=isStrictComparable(value);return function(object){return null!=object&&baseIsMatch(toObject(object),props,values,strictCompareFlags)}}function baseMatchesProperty(path,value){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(value),pathKey=path+\"\";return path=toPath(path),function(object){if(null==object)return!1;var key=pathKey;if(object=toObject(object),!(!isArr&&isCommon||key in object)){if(object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;key=last(path),object=toObject(object)}return object[key]===value?value!==undefined||key in object:baseIsEqual(value,object[key],null,!0)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object))return object;var isSrcArr=isLength(source.length)&&(isArray(source)||isTypedArray(source));if(!isSrcArr){var props=keys(source);push.apply(props,getSymbols(source))}return arrayEach(props||source,function(srcValue,key){if(props&&(key=srcValue,srcValue=source[key]),isObjectLike(srcValue))stackA||(stackA=[]),stackB||(stackB=[]),baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB);else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue),!isSrcArr&&result===undefined||!isCommon&&(result===result?result===value:value!==value)||(object[key]=result)}}),object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){for(var length=stackA.length,srcValue=source[key];length--;)if(stackA[length]==srcValue)return object[key]=stackB[length],undefined;var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue,isLength(srcValue.length)&&(isArray(srcValue)||isTypedArray(srcValue))?result=isArray(value)?value:getLength(value)?arrayCopy(value):[]:isPlainObject(srcValue)||isArguments(srcValue)?result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}:isCommon=!1),stackA.push(srcValue),stackB.push(result),isCommon?object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB):(result===result?result!==value:value===value)&&(object[key]=result)}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+\"\";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function baseSlice(array,start,end){var index=-1,length=array.length;start=null==start?0:+start||0,0>start&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);length>++index;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseValues(object,props){for(var index=-1,length=props.length,result=Array(length);length>++index;)result[index]=object[props[index]];return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if(\"number\"==typeof value&&value===value&&HALF_MAX_ARRAY_LENGTH>=high){for(;high>low;){var mid=low+high>>>1,computed=array[mid];(retHighest?value>=computed:value>computed)?low=mid+1:high=mid}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsUndef=value===undefined;high>low;){var mid=floor((low+high)/2),computed=iteratee(array[mid]),isReflexive=computed===computed;if(valIsNaN)var setLow=isReflexive||retHighest;else setLow=valIsUndef?isReflexive&&(retHighest||computed!==undefined):retHighest?value>=computed:value>computed;setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if(\"function\"!=typeof func)return identity;if(thisArg===undefined)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){return bufferSlice.call(buffer,0)}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2&&sources[length-2],guard=length>2&&sources[2],thisArg=length>1&&sources[length-1];for(\"function\"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer=\"function\"==typeof thisArg?thisArg:null,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?null:customizer,length=1);length>++index;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length))return eachFunc(collection,iteratee);for(var index=fromRight?length:-1,iterable=toObject(collection);(fromRight?index--:length>++index)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;fromRight?index--:length>++index;){var key=props[index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createFindIndex(fromRight){return function(array,predicate,thisArg){return array&&array.length?(predicate=getCallback(predicate,thisArg,3),baseFindIndex(array,predicate,fromRight)):-1}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return\"function\"==typeof iteratee&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length,result=!0;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength))return!1;for(;result&&arrLength>++index;){var arrValue=array[index],othValue=other[index];if(result=undefined,customizer&&(result=isLoose?customizer(othValue,arrValue,index):customizer(arrValue,othValue,index)),result===undefined)if(isLoose)for(var othIndex=othLength;othIndex--&&(othValue=other[othIndex],!(result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))););else result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}return!!result}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:0==object?1/object==1/other:object==+other;case regexpTag:case stringTag:return object==other+\"\"}return!1}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose)return!1;for(var skipCtor=isLoose,index=-1;objLength>++index;){var key=objProps[index],result=isLoose?key in other:hasOwnProperty.call(other,key);if(result){var objValue=object[key],othValue=other[key];result=undefined,customizer&&(result=isLoose?customizer(othValue,objValue,key):customizer(objValue,othValue,key)),result===undefined&&(result=objValue&&objValue===othValue||equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB))}if(!result)return!1;skipCtor||(skipCtor=\"constructor\"==key)}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&\"constructor\"in object&&\"constructor\"in other&&!(\"function\"==typeof objCtor&&objCtor instanceof objCtor&&\"function\"==typeof othCtor&&othCtor instanceof othCtor))return!1}return!0}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;return result=result===callback?baseCallback:result,argCount?result(func,thisArg,argCount):result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;return result=result===indexOf?baseIndexOf:result,collection?result(collection,target,fromIndex):result}function initCloneArray(array){var length=array.length,result=new array.constructor(length);return length&&\"string\"==typeof array[0]&&hasOwnProperty.call(array,\"index\")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){var Ctor=object.constructor;return\"function\"==typeof Ctor&&Ctor instanceof Ctor||(Ctor=Object),new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function isIndex(value,length){return value=+value,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&0==value%1&&length>value}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if(\"number\"==type)var length=getLength(object),prereq=isLength(length)&&isIndex(index,length);else prereq=\"string\"==type&&index in object;if(prereq){var other=object[index];return value===value?value===other:other!==other}return!1}function isKey(value,object){var type=typeof value;if(\"string\"==type&&reIsPlainProp.test(value)||\"number\"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function isLength(value){return\"number\"==typeof value&&value>-1&&0==value%1&&MAX_SAFE_INTEGER>=value}function isStrictComparable(value){return value===value&&(0===value?1/value>0:!isObject(value))}function shimIsPlainObject(value){var Ctor;if(lodash.support,!isObjectLike(value)||objToString.call(value)!=objectTag||!hasOwnProperty.call(value,\"constructor\")&&(Ctor=value.constructor,\"function\"==typeof Ctor&&!(Ctor instanceof Ctor)))return!1;var result;return baseForIn(value,function(subValue,key){result=key}),result===undefined||hasOwnProperty.call(value,result)}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,support=lodash.support,allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object)),index=-1,result=[];propsLength>++index;){var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,\"$1\"):number||match)}),result}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;if(\"number\"==typeof fromIndex)fromIndex=0>fromIndex?nativeMax(length+fromIndex,0):fromIndex;else if(fromIndex){var index=binaryIndex(array,value),other=array[index];return(value===value?value===other:other!==other)?index:-1}return baseIndexOf(array,value,fromIndex||0)}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function slice(array,start,end){var length=array?array.length:0;return length?(end&&\"number\"!=typeof end&&isIterateeCall(array,start,end)&&(start=0,end=length),baseSlice(array,start,end)):[]}function unzip(array){for(var index=-1,length=(array&&array.length&&arrayMax(arrayMap(array,getLength)))>>>0,result=Array(length);length>++index;)result[index]=arrayMap(array,baseProperty(index));return result}function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;return isLength(length)||(collection=values(collection),length=collection.length),length?(fromIndex=\"number\"!=typeof fromIndex||guard&&isIterateeCall(target,fromIndex,guard)?0:0>fromIndex?nativeMax(length+fromIndex,0):fromIndex||0,\"string\"==typeof collection||!isArray(collection)&&isString(collection)?length>fromIndex&&collection.indexOf(target,fromIndex)>-1:getIndexOf(collection,target,fromIndex)>-1):!1}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;return thisArg&&isIterateeCall(collection,predicate,thisArg)&&(predicate=null),(\"function\"!=typeof predicate||thisArg!==undefined)&&(predicate=getCallback(predicate,thisArg,3)),func(collection,predicate)}function restParam(func,start){if(\"function\"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(start===undefined?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);length>++index;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;start>++index;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}function clone(value,isDeep,customizer,thisArg){return isDeep&&\"boolean\"!=typeof isDeep&&isIterateeCall(value,isDeep,customizer)?isDeep=!1:\"function\"==typeof isDeep&&(thisArg=customizer,customizer=isDeep,isDeep=!1),customizer=\"function\"==typeof customizer&&bindCallback(customizer,thisArg,1),baseClone(value,isDeep,customizer)}function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag}function isEmpty(value){if(null==value)return!0;var length=getLength(value);return isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))?!length:!keys(value).length}function isObject(value){var type=typeof value;return\"function\"==type||!!value&&\"object\"==type}function isNative(value){return null==value?!1:objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}function isNumber(value){return\"number\"==typeof value||isObjectLike(value)&&objToString.call(value)==numberTag}function isString(value){return\"string\"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function toPlainObject(value){return baseCopy(value,keysIn(value))}function has(object,path){if(null==object)return!1;var result=hasOwnProperty.call(object,path);return result||isKey(path)||(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),path=last(path),result=null!=object&&hasOwnProperty.call(object,path)),result}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto=\"function\"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;length>++index;)result[index]=index+\"\";for(var key in object)skipIndexes&&isIndex(key,length)||\"constructor\"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}function values(object){return baseValues(object,keys(object))}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,\"\\\\$&\"):string}function callback(func,thisArg,guard){return guard&&isIterateeCall(func,thisArg,guard)&&(thisArg=null),baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}var undefined,VERSION=\"3.7.0\",FUNC_ERROR_TEXT=\"Expected a function\",argsTag=\"[object Arguments]\",arrayTag=\"[object Array]\",boolTag=\"[object Boolean]\",dateTag=\"[object Date]\",errorTag=\"[object Error]\",funcTag=\"[object Function]\",mapTag=\"[object Map]\",numberTag=\"[object Number]\",objectTag=\"[object Object]\",regexpTag=\"[object RegExp]\",setTag=\"[object Set]\",stringTag=\"[object String]\",weakMapTag=\"[object WeakMap]\",arrayBufferTag=\"[object ArrayBuffer]\",float32Tag=\"[object Float32Array]\",float64Tag=\"[object Float64Array]\",int8Tag=\"[object Int8Array]\",int16Tag=\"[object Int16Array]\",int32Tag=\"[object Int32Array]\",uint8Tag=\"[object Uint8Array]\",uint8ClampedTag=\"[object Uint8ClampedArray]\",uint16Tag=\"[object Uint16Array]\",uint32Tag=\"[object Uint32Array]\",reIsDeepProp=/\\.|\\[(?:[^[\\]]+|([\"'])(?:(?!\\1)[^\\n\\\\]|\\\\.)*?)\\1\\]/,reIsPlainProp=/^\\w*$/,rePropName=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\n\\\\]|\\\\.)*?)\\2)\\]/g,reRegExpChars=/[.*+?^${}()|[\\]\\/\\\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reEscapeChar=/\\\\(\\\\)?/g,reFlags=/\\w*$/,reIsHostCtor=/^\\[object .+?Constructor\\]$/,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=!1;var objectTypes={\"function\":!0,object:!0},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&\"object\"==typeof global&&global&&global.Object&&global,freeSelf=objectTypes[typeof self]&&self&&self.Object&&self,freeWindow=objectTypes[typeof window]&&window&&window.Object&&window,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this,arrayProto=Array.prototype,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp(\"^\"+escapeRegExp(objToString).replace(/toString|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),ArrayBuffer=isNative(ArrayBuffer=root.ArrayBuffer)&&ArrayBuffer,bufferSlice=isNative(bufferSlice=ArrayBuffer&&new ArrayBuffer(0).slice)&&bufferSlice,floor=Math.floor,getOwnPropertySymbols=isNative(getOwnPropertySymbols=Object.getOwnPropertySymbols)&&getOwnPropertySymbols,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,push=arrayProto.push,preventExtensions=isNative(Object.preventExtensions=Object.preventExtensions)&&preventExtensions,propertyIsEnumerable=objectProto.propertyIsEnumerable,Uint8Array=isNative(Uint8Array=root.Uint8Array)&&Uint8Array,Float64Array=function(){try{var func=isNative(func=root.Float64Array)&&func,result=new func(new ArrayBuffer(10),0,1)&&func}catch(e){}return result}(),nativeAssign=function(){var object={1:0},func=preventExtensions&&isNative(func=Object.assign)&&func;try{func(preventExtensions(object),\"xo\")}catch(e){}return!object[1]&&func}(),nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,MAX_ARRAY_LENGTH=Math.pow(2,32)-1,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0,MAX_SAFE_INTEGER=Math.pow(2,53)-1,support=lodash.support={};(function(x){var Ctor=function(){this.x=x},props=[];Ctor.prototype={valueOf:x,y:x};for(var key in new Ctor)props.push(key);support.funcDecomp=/\\bthis\\b/.test(function(){return this}),support.funcNames=\"string\"==typeof Function.name;try{support.nonEnumArgs=!propertyIsEnumerable.call(arguments,1)}catch(e){support.nonEnumArgs=!0}})(1,0);var baseAssign=nativeAssign||function(object,source){return null==source?object:baseCopy(source,getSymbols(source),baseCopy(source,keys(source),object))},baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor();bufferSlice||(bufferClone=ArrayBuffer&&Uint8Array?function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}return byteLength!=offset&&(view=new Uint8Array(result,offset),view.set(new Uint8Array(buffer,offset))),result}:constant(null));var getLength=baseProperty(\"length\"),getSymbols=getOwnPropertySymbols?function(object){return getOwnPropertySymbols(toObject(object))}:constant([]),findLastIndex=createFindIndex(!0),zip=restParam(unzip),forEach=createForEach(arrayEach,baseEach),isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag},isFunction=baseIsFunction(/x/)||Uint8Array&&!baseIsFunction(Uint8Array)?function(value){return objToString.call(value)==funcTag}:baseIsFunction,isPlainObject=getPrototypeOf?function(value){if(!value||objToString.call(value)!=objectTag)return!1;var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)}:shimIsPlainObject,assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)}),keys=nativeKeys?function(object){if(object)var Ctor=object.constructor,length=object.length;return\"function\"==typeof Ctor&&Ctor.prototype===object||\"function\"!=typeof object&&isLength(length)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys,merge=createAssigner(baseMerge);lodash.assign=assign,lodash.callback=callback,lodash.constant=constant,lodash.forEach=forEach,lodash.keys=keys,lodash.keysIn=keysIn,lodash.merge=merge,lodash.property=property,lodash.reject=reject,lodash.restParam=restParam,lodash.slice=slice,lodash.toPlainObject=toPlainObject,lodash.unzip=unzip,lodash.values=values,lodash.zip=zip,lodash.each=forEach,lodash.extend=assign,lodash.iteratee=callback,lodash.clone=clone,lodash.escapeRegExp=escapeRegExp,lodash.findLastIndex=findLastIndex,lodash.has=has,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isEmpty=isEmpty,lodash.isFunction=isFunction,lodash.isNative=isNative,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isString=isString,lodash.isTypedArray=isTypedArray,lodash.last=last,lodash.some=some,lodash.any=some,lodash.contains=includes,lodash.include=includes,lodash.VERSION=VERSION,freeExports&&freeModule?moduleExports?(freeModule.exports=lodash)._=lodash:freeExports._=lodash:root._=lodash\n}).call(this)}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],\"/node_modules/jshint/src/jshint.js\":[function(_dereq_,module,exports){var _=_dereq_(\"../lodash\"),events=_dereq_(\"events\"),vars=_dereq_(\"./vars.js\"),messages=_dereq_(\"./messages.js\"),Lexer=_dereq_(\"./lex.js\").Lexer,reg=_dereq_(\"./reg.js\"),state=_dereq_(\"./state.js\").state,style=_dereq_(\"./style.js\"),options=_dereq_(\"./options.js\"),scopeManager=_dereq_(\"./scope-manager.js\"),JSHINT=function(){\"use strict\";function checkOption(name,t){return name=name.trim(),/^[+-]W\\d{3}$/g.test(name)?!0:-1!==options.validNames.indexOf(name)||\"jslint\"===t.type||_.has(options.removed,name)?!0:(error(\"E001\",t,name),!1)}function isString(obj){return\"[object String]\"===Object.prototype.toString.call(obj)}function isIdentifier(tkn,value){return tkn?tkn.identifier&&tkn.value===value?!0:!1:!1}function isReserved(token){if(!token.reserved)return!1;var meta=token.meta;if(meta&&meta.isFutureReservedWord&&state.inES5()){if(!meta.es5)return!1;if(meta.strictOnly&&!state.option.strict&&!state.isStrict())return!1;if(token.isProperty)return!1}return!0}function supplant(str,data){return str.replace(/\\{([^{}]*)\\}/g,function(a,b){var r=data[b];return\"string\"==typeof r||\"number\"==typeof r?r:a})}function combine(dest,src){Object.keys(src).forEach(function(name){_.has(JSHINT.blacklist,name)||(dest[name]=src[name])})}function processenforceall(){if(state.option.enforceall){for(var enforceopt in options.bool.enforcing)void 0!==state.option[enforceopt]||options.noenforceall[enforceopt]||(state.option[enforceopt]=!0);for(var relaxopt in options.bool.relaxing)void 0===state.option[relaxopt]&&(state.option[relaxopt]=!1)}}function assume(){processenforceall(),state.option.esversion||state.option.moz||(state.option.esversion=state.option.es3?3:state.option.esnext?6:5),state.inES5()&&combine(predefined,vars.ecmaIdentifiers[5]),state.inES6()&&combine(predefined,vars.ecmaIdentifiers[6]),state.option.module&&(state.option.strict===!0&&(state.option.strict=\"global\"),state.inES6()||warning(\"W134\",state.tokens.next,\"module\",6)),state.option.couch&&combine(predefined,vars.couch),state.option.qunit&&combine(predefined,vars.qunit),state.option.rhino&&combine(predefined,vars.rhino),state.option.shelljs&&(combine(predefined,vars.shelljs),combine(predefined,vars.node)),state.option.typed&&combine(predefined,vars.typed),state.option.phantom&&(combine(predefined,vars.phantom),state.option.strict===!0&&(state.option.strict=\"global\")),state.option.prototypejs&&combine(predefined,vars.prototypejs),state.option.node&&(combine(predefined,vars.node),combine(predefined,vars.typed),state.option.strict===!0&&(state.option.strict=\"global\")),state.option.devel&&combine(predefined,vars.devel),state.option.dojo&&combine(predefined,vars.dojo),state.option.browser&&(combine(predefined,vars.browser),combine(predefined,vars.typed)),state.option.browserify&&(combine(predefined,vars.browser),combine(predefined,vars.typed),combine(predefined,vars.browserify),state.option.strict===!0&&(state.option.strict=\"global\")),state.option.nonstandard&&combine(predefined,vars.nonstandard),state.option.jasmine&&combine(predefined,vars.jasmine),state.option.jquery&&combine(predefined,vars.jquery),state.option.mootools&&combine(predefined,vars.mootools),state.option.worker&&combine(predefined,vars.worker),state.option.wsh&&combine(predefined,vars.wsh),state.option.globalstrict&&state.option.strict!==!1&&(state.option.strict=\"global\"),state.option.yui&&combine(predefined,vars.yui),state.option.mocha&&combine(predefined,vars.mocha)}function quit(code,line,chr){var percentage=Math.floor(100*(line/state.lines.length)),message=messages.errors[code].desc;throw{name:\"JSHintError\",line:line,character:chr,message:message+\" (\"+percentage+\"% scanned).\",raw:message,code:code}}function removeIgnoredMessages(){var ignored=state.ignoredLines;_.isEmpty(ignored)||(JSHINT.errors=_.reject(JSHINT.errors,function(err){return ignored[err.line]}))}function warning(code,t,a,b,c,d){var ch,l,w,msg;if(/^W\\d{3}$/.test(code)){if(state.ignored[code])return;msg=messages.warnings[code]}else/E\\d{3}/.test(code)?msg=messages.errors[code]:/I\\d{3}/.test(code)&&(msg=messages.info[code]);return t=t||state.tokens.next||{},\"(end)\"===t.id&&(t=state.tokens.curr),l=t.line||0,ch=t.from||0,w={id:\"(error)\",raw:msg.desc,code:msg.code,evidence:state.lines[l-1]||\"\",line:l,character:ch,scope:JSHINT.scope,a:a,b:b,c:c,d:d},w.reason=supplant(msg.desc,w),JSHINT.errors.push(w),removeIgnoredMessages(),JSHINT.errors.length>=state.option.maxerr&&quit(\"E043\",l,ch),w}function warningAt(m,l,ch,a,b,c,d){return warning(m,{line:l,from:ch},a,b,c,d)}function error(m,t,a,b,c,d){warning(m,t,a,b,c,d)}function errorAt(m,l,ch,a,b,c,d){return error(m,{line:l,from:ch},a,b,c,d)}function addInternalSrc(elem,src){var i;return i={id:\"(internal)\",elem:elem,value:src},JSHINT.internals.push(i),i}function doOption(){var nt=state.tokens.next,body=nt.body.match(/(-\\s+)?[^\\s,:]+(?:\\s*:\\s*(-\\s+)?[^\\s,]+)?/g)||[],predef={};if(\"globals\"===nt.type){body.forEach(function(g,idx){g=g.split(\":\");var key=(g[0]||\"\").trim(),val=(g[1]||\"\").trim();if(\"-\"===key||!key.length){if(idx>0&&idx===body.length-1)return;return error(\"E002\",nt),void 0}\"-\"===key.charAt(0)?(key=key.slice(1),val=!1,JSHINT.blacklist[key]=key,delete predefined[key]):predef[key]=\"true\"===val}),combine(predefined,predef);for(var key in predef)_.has(predef,key)&&(declared[key]=nt)}\"exported\"===nt.type&&body.forEach(function(e,idx){if(!e.length){if(idx>0&&idx===body.length-1)return;return error(\"E002\",nt),void 0}state.funct[\"(scope)\"].addExported(e)}),\"members\"===nt.type&&(membersOnly=membersOnly||{},body.forEach(function(m){var ch1=m.charAt(0),ch2=m.charAt(m.length-1);ch1!==ch2||'\"'!==ch1&&\"'\"!==ch1||(m=m.substr(1,m.length-2).replace('\\\\\"','\"')),membersOnly[m]=!1}));var numvals=[\"maxstatements\",\"maxparams\",\"maxdepth\",\"maxcomplexity\",\"maxerr\",\"maxlen\",\"indent\"];(\"jshint\"===nt.type||\"jslint\"===nt.type)&&(body.forEach(function(g){g=g.split(\":\");var key=(g[0]||\"\").trim(),val=(g[1]||\"\").trim();if(checkOption(key,nt))if(numvals.indexOf(key)>=0)if(\"false\"!==val){if(val=+val,\"number\"!=typeof val||!isFinite(val)||0>=val||Math.floor(val)!==val)return error(\"E032\",nt,g[1].trim()),void 0;state.option[key]=val}else state.option[key]=\"indent\"===key?4:!1;else{if(\"validthis\"===key)return state.funct[\"(global)\"]?void error(\"E009\"):\"true\"!==val&&\"false\"!==val?void error(\"E002\",nt):(state.option.validthis=\"true\"===val,void 0);if(\"quotmark\"!==key)if(\"shadow\"!==key)if(\"unused\"!==key)if(\"latedef\"!==key)if(\"ignore\"!==key)if(\"strict\"!==key){\"module\"===key&&(hasParsedCode(state.funct)||error(\"E055\",state.tokens.next,\"module\"));var esversions={es3:3,es5:5,esnext:6};if(!_.has(esversions,key)){if(\"esversion\"===key){switch(val){case\"5\":state.inES5(!0)&&warning(\"I003\");case\"3\":case\"6\":state.option.moz=!1,state.option.esversion=+val;break;case\"2015\":state.option.moz=!1,state.option.esversion=6;break;default:error(\"E002\",nt)}return hasParsedCode(state.funct)||error(\"E055\",state.tokens.next,\"esversion\"),void 0}var match=/^([+-])(W\\d{3})$/g.exec(key);if(match)return state.ignored[match[2]]=\"-\"===match[1],void 0;var tn;return\"true\"===val||\"false\"===val?(\"jslint\"===nt.type?(tn=options.renamed[key]||key,state.option[tn]=\"true\"===val,void 0!==options.inverted[tn]&&(state.option[tn]=!state.option[tn])):state.option[key]=\"true\"===val,\"newcap\"===key&&(state.option[\"(explicitNewcap)\"]=!0),void 0):(error(\"E002\",nt),void 0)}switch(val){case\"true\":state.option.moz=!1,state.option.esversion=esversions[key];break;case\"false\":state.option.moz||(state.option.esversion=5);break;default:error(\"E002\",nt)}}else switch(val){case\"true\":state.option.strict=!0;break;case\"false\":state.option.strict=!1;break;case\"func\":case\"global\":case\"implied\":state.option.strict=val;break;default:error(\"E002\",nt)}else switch(val){case\"line\":state.ignoredLines[nt.line]=!0,removeIgnoredMessages();break;default:error(\"E002\",nt)}else switch(val){case\"true\":state.option.latedef=!0;break;case\"false\":state.option.latedef=!1;break;case\"nofunc\":state.option.latedef=\"nofunc\";break;default:error(\"E002\",nt)}else switch(val){case\"true\":state.option.unused=!0;break;case\"false\":state.option.unused=!1;break;case\"vars\":case\"strict\":state.option.unused=val;break;default:error(\"E002\",nt)}else switch(val){case\"true\":state.option.shadow=!0;break;case\"outer\":state.option.shadow=\"outer\";break;case\"false\":case\"inner\":state.option.shadow=\"inner\";break;default:error(\"E002\",nt)}else switch(val){case\"true\":case\"false\":state.option.quotmark=\"true\"===val;break;case\"double\":case\"single\":state.option.quotmark=val;break;default:error(\"E002\",nt)}}}),assume())}function peek(p){var t,i=p||0,j=lookahead.length;if(j>i)return lookahead[i];for(;i>=j;)t=lookahead[j],t||(t=lookahead[j]=lex.token()),j+=1;return t||\"(end)\"!==state.tokens.next.id?t:state.tokens.next}function peekIgnoreEOL(){var t,i=0;do t=peek(i++);while(\"(endline)\"===t.id);return t}function advance(id,t){switch(state.tokens.curr.id){case\"(number)\":\".\"===state.tokens.next.id&&warning(\"W005\",state.tokens.curr);break;case\"-\":(\"-\"===state.tokens.next.id||\"--\"===state.tokens.next.id)&&warning(\"W006\");break;case\"+\":(\"+\"===state.tokens.next.id||\"++\"===state.tokens.next.id)&&warning(\"W007\")}for(id&&state.tokens.next.id!==id&&(t?\"(end)\"===state.tokens.next.id?error(\"E019\",t,t.id):error(\"E020\",state.tokens.next,id,t.id,t.line,state.tokens.next.value):(\"(identifier)\"!==state.tokens.next.type||state.tokens.next.value!==id)&&warning(\"W116\",state.tokens.next,id,state.tokens.next.value)),state.tokens.prev=state.tokens.curr,state.tokens.curr=state.tokens.next;;){if(state.tokens.next=lookahead.shift()||lex.token(),state.tokens.next||quit(\"E041\",state.tokens.curr.line),\"(end)\"===state.tokens.next.id||\"(error)\"===state.tokens.next.id)return;if(state.tokens.next.check&&state.tokens.next.check(),state.tokens.next.isSpecial)\"falls through\"===state.tokens.next.type?state.tokens.curr.caseFallsThrough=!0:doOption();else if(\"(endline)\"!==state.tokens.next.id)break}}function isInfix(token){return token.infix||!token.identifier&&!token.template&&!!token.led}function isEndOfExpr(){var curr=state.tokens.curr,next=state.tokens.next;return\";\"===next.id||\"}\"===next.id||\":\"===next.id?!0:isInfix(next)===isInfix(curr)||\"yield\"===curr.id&&state.inMoz()?curr.line!==startLine(next):!1}function isBeginOfExpr(prev){return!prev.left&&\"unary\"!==prev.arity}function expression(rbp,initial){var left,isArray=!1,isObject=!1,isLetExpr=!1;state.nameStack.push(),initial||\"let\"!==state.tokens.next.value||\"(\"!==peek(0).value||(state.inMoz()||warning(\"W118\",state.tokens.next,\"let expressions\"),isLetExpr=!0,state.funct[\"(scope)\"].stack(),advance(\"let\"),advance(\"(\"),state.tokens.prev.fud(),advance(\")\")),\"(end)\"===state.tokens.next.id&&error(\"E006\",state.tokens.curr);var isDangerous=state.option.asi&&state.tokens.prev.line!==startLine(state.tokens.curr)&&_.contains([\"]\",\")\"],state.tokens.prev.id)&&_.contains([\"[\",\"(\"],state.tokens.curr.id);if(isDangerous&&warning(\"W014\",state.tokens.curr,state.tokens.curr.id),advance(),initial&&(state.funct[\"(verb)\"]=state.tokens.curr.value,state.tokens.curr.beginsStmt=!0),initial===!0&&state.tokens.curr.fud)left=state.tokens.curr.fud();else for(state.tokens.curr.nud?left=state.tokens.curr.nud():error(\"E030\",state.tokens.curr,state.tokens.curr.id);(state.tokens.next.lbp>rbp||\"(template)\"===state.tokens.next.type)&&!isEndOfExpr();)isArray=\"Array\"===state.tokens.curr.value,isObject=\"Object\"===state.tokens.curr.value,left&&(left.value||left.first&&left.first.value)&&(\"new\"!==left.value||left.first&&left.first.value&&\".\"===left.first.value)&&(isArray=!1,left.value!==state.tokens.curr.value&&(isObject=!1)),advance(),isArray&&\"(\"===state.tokens.curr.id&&\")\"===state.tokens.next.id&&warning(\"W009\",state.tokens.curr),isObject&&\"(\"===state.tokens.curr.id&&\")\"===state.tokens.next.id&&warning(\"W010\",state.tokens.curr),left&&state.tokens.curr.led?left=state.tokens.curr.led(left):error(\"E033\",state.tokens.curr,state.tokens.curr.id);return isLetExpr&&state.funct[\"(scope)\"].unstack(),state.nameStack.pop(),left}function startLine(token){return token.startLine||token.line}function nobreaknonadjacent(left,right){left=left||state.tokens.curr,right=right||state.tokens.next,state.option.laxbreak||left.line===startLine(right)||warning(\"W014\",right,right.value)}function nolinebreak(t){t=t||state.tokens.curr,t.line!==startLine(state.tokens.next)&&warning(\"E022\",t,t.value)}function nobreakcomma(left,right){left.line!==startLine(right)&&(state.option.laxcomma||(comma.first&&(warning(\"I001\"),comma.first=!1),warning(\"W014\",left,right.value)))}function comma(opts){if(opts=opts||{},opts.peek?nobreakcomma(state.tokens.prev,state.tokens.curr):(nobreakcomma(state.tokens.curr,state.tokens.next),advance(\",\")),state.tokens.next.identifier&&(!opts.property||!state.inES5()))switch(state.tokens.next.value){case\"break\":case\"case\":case\"catch\":case\"continue\":case\"default\":case\"do\":case\"else\":case\"finally\":case\"for\":case\"if\":case\"in\":case\"instanceof\":case\"return\":case\"switch\":case\"throw\":case\"try\":case\"var\":case\"let\":case\"while\":case\"with\":return error(\"E024\",state.tokens.next,state.tokens.next.value),!1}if(\"(punctuator)\"===state.tokens.next.type)switch(state.tokens.next.value){case\"}\":case\"]\":case\",\":if(opts.allowTrailing)return!0;case\")\":return error(\"E024\",state.tokens.next,state.tokens.next.value),!1}return!0}function symbol(s,p){var x=state.syntax[s];return x&&\"object\"==typeof x||(state.syntax[s]=x={id:s,lbp:p,value:s}),x}function delim(s){var x=symbol(s,0);return x.delim=!0,x}function stmt(s,f){var x=delim(s);return x.identifier=x.reserved=!0,x.fud=f,x}function blockstmt(s,f){var x=stmt(s,f);return x.block=!0,x}function reserveName(x){var c=x.id.charAt(0);return(c>=\"a\"&&\"z\">=c||c>=\"A\"&&\"Z\">=c)&&(x.identifier=x.reserved=!0),x}function prefix(s,f){var x=symbol(s,150);return reserveName(x),x.nud=\"function\"==typeof f?f:function(){return this.arity=\"unary\",this.right=expression(150),(\"++\"===this.id||\"--\"===this.id)&&(state.option.plusplus?warning(\"W016\",this,this.id):!this.right||this.right.identifier&&!isReserved(this.right)||\".\"===this.right.id||\"[\"===this.right.id||warning(\"W017\",this),this.right&&this.right.isMetaProperty?error(\"E031\",this):this.right&&this.right.identifier&&state.funct[\"(scope)\"].block.modify(this.right.value,this)),this},x}function type(s,f){var x=delim(s);return x.type=s,x.nud=f,x}function reserve(name,func){var x=type(name,func);return x.identifier=!0,x.reserved=!0,x}function FutureReservedWord(name,meta){var x=type(name,meta&&meta.nud||function(){return this});return meta=meta||{},meta.isFutureReservedWord=!0,x.value=name,x.identifier=!0,x.reserved=!0,x.meta=meta,x}function reservevar(s,v){return reserve(s,function(){return\"function\"==typeof v&&v(this),this})}function infix(s,f,p,w){var x=symbol(s,p);return reserveName(x),x.infix=!0,x.led=function(left){return w||nobreaknonadjacent(state.tokens.prev,state.tokens.curr),\"in\"!==s&&\"instanceof\"!==s||\"!\"!==left.id||warning(\"W018\",left,\"!\"),\"function\"==typeof f?f(left,this):(this.left=left,this.right=expression(p),this)},x}function application(s){var x=symbol(s,42);return x.led=function(left){return nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left,this.right=doFunction({type:\"arrow\",loneArg:left}),this},x}function relation(s,f){var x=symbol(s,100);return x.led=function(left){nobreaknonadjacent(state.tokens.prev,state.tokens.curr),this.left=left;var right=this.right=expression(100);return isIdentifier(left,\"NaN\")||isIdentifier(right,\"NaN\")?warning(\"W019\",this):f&&f.apply(this,[left,right]),left&&right||quit(\"E041\",state.tokens.curr.line),\"!\"===left.id&&warning(\"W018\",left,\"!\"),\"!\"===right.id&&warning(\"W018\",right,\"!\"),this},x}function isPoorRelation(node){return node&&(\"(number)\"===node.type&&0===+node.value||\"(string)\"===node.type&&\"\"===node.value||\"null\"===node.type&&!state.option.eqnull||\"true\"===node.type||\"false\"===node.type||\"undefined\"===node.type)}function isTypoTypeof(left,right,state){var values;return state.option.notypeof?!1:left&&right?(values=state.inES6()?typeofValues.es6:typeofValues.es3,\"(identifier)\"===right.type&&\"typeof\"===right.value&&\"(string)\"===left.type?!_.contains(values,left.value):!1):!1}function isGlobalEval(left,state){var isGlobal=!1;return\"this\"===left.type&&null===state.funct[\"(context)\"]?isGlobal=!0:\"(identifier)\"===left.type&&(state.option.node&&\"global\"===left.value?isGlobal=!0:!state.option.browser||\"window\"!==left.value&&\"document\"!==left.value||(isGlobal=!0)),isGlobal}function findNativePrototype(left){function walkPrototype(obj){return\"object\"==typeof obj?\"prototype\"===obj.right?obj:walkPrototype(obj.left):void 0}function walkNative(obj){for(;!obj.identifier&&\"object\"==typeof obj.left;)obj=obj.left;return obj.identifier&&natives.indexOf(obj.value)>=0?obj.value:void 0}var natives=[\"Array\",\"ArrayBuffer\",\"Boolean\",\"Collator\",\"DataView\",\"Date\",\"DateTimeFormat\",\"Error\",\"EvalError\",\"Float32Array\",\"Float64Array\",\"Function\",\"Infinity\",\"Intl\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Iterator\",\"Number\",\"NumberFormat\",\"Object\",\"RangeError\",\"ReferenceError\",\"RegExp\",\"StopIteration\",\"String\",\"SyntaxError\",\"TypeError\",\"Uint16Array\",\"Uint32Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"URIError\"],prototype=walkPrototype(left);return prototype?walkNative(prototype):void 0}function checkLeftSideAssign(left,assignToken,options){var allowDestructuring=options&&options.allowDestructuring;if(assignToken=assignToken||left,state.option.freeze){var nativeObject=findNativePrototype(left);nativeObject&&warning(\"W121\",left,nativeObject)}return left.identifier&&!left.isMetaProperty&&state.funct[\"(scope)\"].block.reassign(left.value,left),\".\"===left.id?((!left.left||\"arguments\"===left.left.value&&!state.isStrict())&&warning(\"E031\",assignToken),state.nameStack.set(state.tokens.prev),!0):\"{\"===left.id||\"[\"===left.id?(allowDestructuring&&state.tokens.curr.left.destructAssign?state.tokens.curr.left.destructAssign.forEach(function(t){t.id&&state.funct[\"(scope)\"].block.modify(t.id,t.token)}):\"{\"!==left.id&&left.left?\"arguments\"!==left.left.value||state.isStrict()||warning(\"E031\",assignToken):warning(\"E031\",assignToken),\"[\"===left.id&&state.nameStack.set(left.right),!0):left.isMetaProperty?(error(\"E031\",assignToken),!0):left.identifier&&!isReserved(left)?(\"exception\"===state.funct[\"(scope)\"].labeltype(left.value)&&warning(\"W022\",left),state.nameStack.set(left),!0):(left===state.syntax[\"function\"]&&warning(\"W023\",state.tokens.curr),!1)}function assignop(s,f,p){var x=infix(s,\"function\"==typeof f?f:function(left,that){return that.left=left,left&&checkLeftSideAssign(left,that,{allowDestructuring:!0})?(that.right=expression(10),that):(error(\"E031\",that),void 0)},p);return x.exps=!0,x.assign=!0,x}function bitwise(s,f,p){var x=symbol(s,p);return reserveName(x),x.led=\"function\"==typeof f?f:function(left){return state.option.bitwise&&warning(\"W016\",this,this.id),this.left=left,this.right=expression(p),this},x}function bitwiseassignop(s){return assignop(s,function(left,that){return state.option.bitwise&&warning(\"W016\",that,that.id),left&&checkLeftSideAssign(left,that)?(that.right=expression(10),that):(error(\"E031\",that),void 0)},20)}function suffix(s){var x=symbol(s,150);return x.led=function(left){return state.option.plusplus?warning(\"W016\",this,this.id):left.identifier&&!isReserved(left)||\".\"===left.id||\"[\"===left.id||warning(\"W017\",this),left.isMetaProperty?error(\"E031\",this):left&&left.identifier&&state.funct[\"(scope)\"].block.modify(left.value,left),this.left=left,this},x}function optionalidentifier(fnparam,prop,preserve){if(state.tokens.next.identifier){preserve||advance();var curr=state.tokens.curr,val=state.tokens.curr.value;return isReserved(curr)?prop&&state.inES5()?val:fnparam&&\"undefined\"===val?val:(warning(\"W024\",state.tokens.curr,state.tokens.curr.id),val):val}}function identifier(fnparam,prop){var i=optionalidentifier(fnparam,prop,!1);if(i)return i;if(\"...\"===state.tokens.next.value){if(state.inES6(!0)||warning(\"W119\",state.tokens.next,\"spread/rest operator\",\"6\"),advance(),checkPunctuator(state.tokens.next,\"...\"))for(warning(\"E024\",state.tokens.next,\"...\");checkPunctuator(state.tokens.next,\"...\");)advance();return state.tokens.next.identifier?identifier(fnparam,prop):(warning(\"E024\",state.tokens.curr,\"...\"),void 0)}error(\"E030\",state.tokens.next,state.tokens.next.value),\";\"!==state.tokens.next.id&&advance()}function reachable(controlToken){var t,i=0;if(\";\"===state.tokens.next.id&&!controlToken.inBracelessBlock)for(;;){do t=peek(i),i+=1;while(\"(end)\"!==t.id&&\"(comment)\"===t.id);if(t.reach)return;if(\"(endline)\"!==t.id){if(\"function\"===t.id){state.option.latedef===!0&&warning(\"W026\",t);break}warning(\"W027\",t,t.value,controlToken.value);break}}}function parseFinalSemicolon(){if(\";\"!==state.tokens.next.id){if(state.tokens.next.isUnclosed)return advance();var sameLine=startLine(state.tokens.next)===state.tokens.curr.line&&\"(end)\"!==state.tokens.next.id,blockEnd=checkPunctuator(state.tokens.next,\"}\");sameLine&&!blockEnd?errorAt(\"E058\",state.tokens.curr.line,state.tokens.curr.character):state.option.asi||(blockEnd&&!state.option.lastsemic||!sameLine)&&warningAt(\"W033\",state.tokens.curr.line,state.tokens.curr.character)}else advance(\";\")}function statement(){var r,i=indent,t=state.tokens.next,hasOwnScope=!1;if(\";\"===t.id)return advance(\";\"),void 0;var res=isReserved(t);if(res&&t.meta&&t.meta.isFutureReservedWord&&\":\"===peek().id&&(warning(\"W024\",t,t.id),res=!1),t.identifier&&!res&&\":\"===peek().id&&(advance(),advance(\":\"),hasOwnScope=!0,state.funct[\"(scope)\"].stack(),state.funct[\"(scope)\"].block.addBreakLabel(t.value,{token:state.tokens.curr}),state.tokens.next.labelled||\"{\"===state.tokens.next.value||warning(\"W028\",state.tokens.next,t.value,state.tokens.next.value),state.tokens.next.label=t.value,t=state.tokens.next),\"{\"===t.id){var iscase=\"case\"===state.funct[\"(verb)\"]&&\":\"===state.tokens.curr.value;return block(!0,!0,!1,!1,iscase),void 0}return r=expression(0,!0),!r||r.identifier&&\"function\"===r.value||\"(punctuator)\"===r.type&&r.left&&r.left.identifier&&\"function\"===r.left.value||state.isStrict()||\"global\"!==state.option.strict||warning(\"E007\"),t.block||(state.option.expr||r&&r.exps?state.option.nonew&&r&&r.left&&\"(\"===r.id&&\"new\"===r.left.id&&warning(\"W031\",t):warning(\"W030\",state.tokens.curr),parseFinalSemicolon()),indent=i,hasOwnScope&&state.funct[\"(scope)\"].unstack(),r}function statements(){for(var p,a=[];!state.tokens.next.reach&&\"(end)\"!==state.tokens.next.id;)\";\"===state.tokens.next.id?(p=peek(),(!p||\"(\"!==p.id&&\"[\"!==p.id)&&warning(\"W032\"),advance(\";\")):a.push(statement());return a}function directives(){for(var i,p,pn;\"(string)\"===state.tokens.next.id;){if(p=peek(0),\"(endline)\"===p.id){i=1;do pn=peek(i++);while(\"(endline)\"===pn.id);if(\";\"===pn.id)p=pn;else{if(\"[\"===pn.value||\".\"===pn.value)break;state.option.asi&&\"(\"!==pn.value||warning(\"W033\",state.tokens.next)}}else{if(\".\"===p.id||\"[\"===p.id)break;\";\"!==p.id&&warning(\"W033\",p)}advance();var directive=state.tokens.curr.value;(state.directive[directive]||\"use strict\"===directive&&\"implied\"===state.option.strict)&&warning(\"W034\",state.tokens.curr,directive),state.directive[directive]=!0,\";\"===p.id&&advance(\";\")}state.isStrict()&&(state.option[\"(explicitNewcap)\"]||(state.option.newcap=!0),state.option.undef=!0)}function block(ordinary,stmt,isfunc,isfatarrow,iscase){var a,m,t,line,d,b=inblock,old_indent=indent;inblock=ordinary,t=state.tokens.next;var metrics=state.funct[\"(metrics)\"];if(metrics.nestedBlockDepth+=1,metrics.verifyMaxNestedBlockDepthPerFunction(),\"{\"===state.tokens.next.id){if(advance(\"{\"),state.funct[\"(scope)\"].stack(),line=state.tokens.curr.line,\"}\"!==state.tokens.next.id){for(indent+=state.option.indent;!ordinary&&state.tokens.next.from>indent;)indent+=state.option.indent;if(isfunc){m={};for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);directives(),state.option.strict&&state.funct[\"(context)\"][\"(global)\"]&&(m[\"use strict\"]||state.isStrict()||warning(\"E007\"))}a=statements(),metrics.statementCount+=a.length,indent-=state.option.indent}advance(\"}\",t),isfunc&&(state.funct[\"(scope)\"].validateParams(),m&&(state.directive=m)),state.funct[\"(scope)\"].unstack(),indent=old_indent}else if(ordinary)state.funct[\"(noblockscopedvar)\"]=\"for\"!==state.tokens.next.id,state.funct[\"(scope)\"].stack(),(!stmt||state.option.curly)&&warning(\"W116\",state.tokens.next,\"{\",state.tokens.next.value),state.tokens.next.inBracelessBlock=!0,indent+=state.option.indent,a=[statement()],indent-=state.option.indent,state.funct[\"(scope)\"].unstack(),delete state.funct[\"(noblockscopedvar)\"];else if(isfunc){if(state.funct[\"(scope)\"].stack(),m={},!stmt||isfatarrow||state.inMoz()||error(\"W118\",state.tokens.curr,\"function closure expressions\"),!stmt)for(d in state.directive)_.has(state.directive,d)&&(m[d]=state.directive[d]);expression(10),state.option.strict&&state.funct[\"(context)\"][\"(global)\"]&&(m[\"use strict\"]||state.isStrict()||warning(\"E007\")),state.funct[\"(scope)\"].unstack()}else error(\"E021\",state.tokens.next,\"{\",state.tokens.next.value);switch(state.funct[\"(verb)\"]){case\"break\":case\"continue\":case\"return\":case\"throw\":if(iscase)break;default:state.funct[\"(verb)\"]=null}return inblock=b,!ordinary||!state.option.noempty||a&&0!==a.length||warning(\"W035\",state.tokens.prev),metrics.nestedBlockDepth-=1,a}function countMember(m){membersOnly&&\"boolean\"!=typeof membersOnly[m]&&warning(\"W036\",state.tokens.curr,m),\"number\"==typeof member[m]?member[m]+=1:member[m]=1}function comprehensiveArrayExpression(){var res={};res.exps=!0,state.funct[\"(comparray)\"].stack();var reversed=!1;return\"for\"!==state.tokens.next.value&&(reversed=!0,state.inMoz()||warning(\"W116\",state.tokens.next,\"for\",state.tokens.next.value),state.funct[\"(comparray)\"].setState(\"use\"),res.right=expression(10)),advance(\"for\"),\"each\"===state.tokens.next.value&&(advance(\"each\"),state.inMoz()||warning(\"W118\",state.tokens.curr,\"for each\")),advance(\"(\"),state.funct[\"(comparray)\"].setState(\"define\"),res.left=expression(130),_.contains([\"in\",\"of\"],state.tokens.next.value)?advance():error(\"E045\",state.tokens.curr),state.funct[\"(comparray)\"].setState(\"generate\"),expression(10),advance(\")\"),\"if\"===state.tokens.next.value&&(advance(\"if\"),advance(\"(\"),state.funct[\"(comparray)\"].setState(\"filter\"),res.filter=expression(10),advance(\")\")),reversed||(state.funct[\"(comparray)\"].setState(\"use\"),res.right=expression(10)),advance(\"]\"),state.funct[\"(comparray)\"].unstack(),res}function isMethod(){return state.funct[\"(statement)\"]&&\"class\"===state.funct[\"(statement)\"].type||state.funct[\"(context)\"]&&\"class\"===state.funct[\"(context)\"][\"(verb)\"]}function isPropertyName(token){return token.identifier||\"(string)\"===token.id||\"(number)\"===token.id}function propertyName(preserveOrToken){var id,preserve=!0;return\"object\"==typeof preserveOrToken?id=preserveOrToken:(preserve=preserveOrToken,id=optionalidentifier(!1,!0,preserve)),id?\"object\"==typeof id&&(\"(string)\"===id.id||\"(identifier)\"===id.id?id=id.value:\"(number)\"===id.id&&(id=\"\"+id.value)):\"(string)\"===state.tokens.next.id?(id=state.tokens.next.value,preserve||advance()):\"(number)\"===state.tokens.next.id&&(id=\"\"+state.tokens.next.value,preserve||advance()),\"hasOwnProperty\"===id&&warning(\"W001\"),id}function functionparams(options){function addParam(addParamArgs){state.funct[\"(scope)\"].addParam.apply(state.funct[\"(scope)\"],addParamArgs)}var next,ident,t,paramsIds=[],tokens=[],pastDefault=!1,pastRest=!1,arity=0,loneArg=options&&options.loneArg;if(loneArg&&loneArg.identifier===!0)return state.funct[\"(scope)\"].addParam(loneArg.value,loneArg),{arity:1,params:[loneArg.value]};if(next=state.tokens.next,options&&options.parsedOpening||advance(\"(\"),\")\"===state.tokens.next.id)return advance(\")\"),void 0;for(;;){arity++;var currentParams=[];if(_.contains([\"{\",\"[\"],state.tokens.next.id)){tokens=destructuringPattern();for(t in tokens)t=tokens[t],t.id&&(paramsIds.push(t.id),currentParams.push([t.id,t.token]))}else if(checkPunctuator(state.tokens.next,\"...\")&&(pastRest=!0),ident=identifier(!0))paramsIds.push(ident),currentParams.push([ident,state.tokens.curr]);else for(;!checkPunctuators(state.tokens.next,[\",\",\")\"]);)advance();if(pastDefault&&\"=\"!==state.tokens.next.id&&error(\"W138\",state.tokens.current),\"=\"===state.tokens.next.id&&(state.inES6()||warning(\"W119\",state.tokens.next,\"default parameters\",\"6\"),advance(\"=\"),pastDefault=!0,expression(10)),currentParams.forEach(addParam),\",\"!==state.tokens.next.id)return advance(\")\",next),{arity:arity,params:paramsIds};pastRest&&warning(\"W131\",state.tokens.next),comma()}}function functor(name,token,overwrites){var funct={\"(name)\":name,\"(breakage)\":0,\"(loopage)\":0,\"(tokens)\":{},\"(properties)\":{},\"(catch)\":!1,\"(global)\":!1,\"(line)\":null,\"(character)\":null,\"(metrics)\":null,\"(statement)\":null,\"(context)\":null,\"(scope)\":null,\"(comparray)\":null,\"(generator)\":null,\"(arrow)\":null,\"(params)\":null};return token&&_.extend(funct,{\"(line)\":token.line,\"(character)\":token.character,\"(metrics)\":createMetrics(token)}),_.extend(funct,overwrites),funct[\"(context)\"]&&(funct[\"(scope)\"]=funct[\"(context)\"][\"(scope)\"],funct[\"(comparray)\"]=funct[\"(context)\"][\"(comparray)\"]),funct}function isFunctor(token){return\"(scope)\"in token}function hasParsedCode(funct){return funct[\"(global)\"]&&!funct[\"(verb)\"]}function doTemplateLiteral(left){function end(){if(state.tokens.curr.template&&state.tokens.curr.tail&&state.tokens.curr.context===ctx)return!0;var complete=state.tokens.next.template&&state.tokens.next.tail&&state.tokens.next.context===ctx;return complete&&advance(),complete||state.tokens.next.isUnclosed}var ctx=this.context,noSubst=this.noSubst,depth=this.depth;if(!noSubst)for(;!end();)!state.tokens.next.template||state.tokens.next.depth>depth?expression(0):advance();return{id:\"(template)\",type:\"(template)\",tag:left}}function doFunction(options){var f,token,name,statement,classExprBinding,isGenerator,isArrow,ignoreLoopFunc,oldOption=state.option,oldIgnored=state.ignored;options&&(name=options.name,statement=options.statement,classExprBinding=options.classExprBinding,isGenerator=\"generator\"===options.type,isArrow=\"arrow\"===options.type,ignoreLoopFunc=options.ignoreLoopFunc),state.option=Object.create(state.option),state.ignored=Object.create(state.ignored),state.funct=functor(name||state.nameStack.infer(),state.tokens.next,{\"(statement)\":statement,\"(context)\":state.funct,\"(arrow)\":isArrow,\"(generator)\":isGenerator}),f=state.funct,token=state.tokens.curr,token.funct=state.funct,functions.push(state.funct),state.funct[\"(scope)\"].stack(\"functionouter\");var internallyAccessibleName=name||classExprBinding;internallyAccessibleName&&state.funct[\"(scope)\"].block.add(internallyAccessibleName,classExprBinding?\"class\":\"function\",state.tokens.curr,!1),state.funct[\"(scope)\"].stack(\"functionparams\");var paramsInfo=functionparams(options);return paramsInfo?(state.funct[\"(params)\"]=paramsInfo.params,state.funct[\"(metrics)\"].arity=paramsInfo.arity,state.funct[\"(metrics)\"].verifyMaxParametersPerFunction()):state.funct[\"(metrics)\"].arity=0,isArrow&&(state.inES6(!0)||warning(\"W119\",state.tokens.curr,\"arrow function syntax (=>)\",\"6\"),options.loneArg||advance(\"=>\")),block(!1,!0,!0,isArrow),!state.option.noyield&&isGenerator&&\"yielded\"!==state.funct[\"(generator)\"]&&warning(\"W124\",state.tokens.curr),state.funct[\"(metrics)\"].verifyMaxStatementsPerFunction(),state.funct[\"(metrics)\"].verifyMaxComplexityPerFunction(),state.funct[\"(unusedOption)\"]=state.option.unused,state.option=oldOption,state.ignored=oldIgnored,state.funct[\"(last)\"]=state.tokens.curr.line,state.funct[\"(lastcharacter)\"]=state.tokens.curr.character,state.funct[\"(scope)\"].unstack(),state.funct[\"(scope)\"].unstack(),state.funct=state.funct[\"(context)\"],ignoreLoopFunc||state.option.loopfunc||!state.funct[\"(loopage)\"]||f[\"(isCapturing)\"]&&warning(\"W083\",token),f}function createMetrics(functionStartToken){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,arity:0,verifyMaxStatementsPerFunction:function(){state.option.maxstatements&&this.statementCount>state.option.maxstatements&&warning(\"W071\",functionStartToken,this.statementCount)\n},verifyMaxParametersPerFunction:function(){_.isNumber(state.option.maxparams)&&this.arity>state.option.maxparams&&warning(\"W072\",functionStartToken,this.arity)},verifyMaxNestedBlockDepthPerFunction:function(){state.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===state.option.maxdepth+1&&warning(\"W073\",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var max=state.option.maxcomplexity,cc=this.ComplexityCount;max&&cc>max&&warning(\"W074\",functionStartToken,cc)}}}function increaseComplexityCount(){state.funct[\"(metrics)\"].ComplexityCount+=1}function checkCondAssignment(expr){var id,paren;switch(expr&&(id=expr.id,paren=expr.paren,\",\"===id&&(expr=expr.exprs[expr.exprs.length-1])&&(id=expr.id,paren=paren||expr.paren)),id){case\"=\":case\"+=\":case\"-=\":case\"*=\":case\"%=\":case\"&=\":case\"|=\":case\"^=\":case\"/=\":paren||state.option.boss||warning(\"W084\")}}function checkProperties(props){if(state.inES5())for(var name in props)props[name]&&props[name].setterToken&&!props[name].getterToken&&warning(\"W078\",props[name].setterToken)}function metaProperty(name,c){if(checkPunctuator(state.tokens.next,\".\")){var left=state.tokens.curr.id;advance(\".\");var id=identifier();return state.tokens.curr.isMetaProperty=!0,name!==id?error(\"E057\",state.tokens.prev,left,id):c(),state.tokens.curr}}function destructuringPattern(options){var isAssignment=options&&options.assignment;return state.inES6()||warning(\"W104\",state.tokens.curr,isAssignment?\"destructuring assignment\":\"destructuring binding\",\"6\"),destructuringPatternRecursive(options)}function destructuringPatternRecursive(options){var ids,identifiers=[],openingParsed=options&&options.openingParsed,isAssignment=options&&options.assignment,recursiveOptions=isAssignment?{assignment:isAssignment}:null,firstToken=openingParsed?state.tokens.curr:state.tokens.next,nextInnerDE=function(){var ident;if(checkPunctuators(state.tokens.next,[\"[\",\"{\"])){ids=destructuringPatternRecursive(recursiveOptions);for(var id in ids)id=ids[id],identifiers.push({id:id.id,token:id.token})}else if(checkPunctuator(state.tokens.next,\",\"))identifiers.push({id:null,token:state.tokens.curr});else{if(!checkPunctuator(state.tokens.next,\"(\")){var is_rest=checkPunctuator(state.tokens.next,\"...\");if(isAssignment){var identifierToken=is_rest?peek(0):state.tokens.next;identifierToken.identifier||warning(\"E030\",identifierToken,identifierToken.value);var assignTarget=expression(155);assignTarget&&(checkLeftSideAssign(assignTarget),assignTarget.identifier&&(ident=assignTarget.value))}else ident=identifier();return ident&&identifiers.push({id:ident,token:state.tokens.curr}),is_rest}advance(\"(\"),nextInnerDE(),advance(\")\")}return!1},assignmentProperty=function(){var id;checkPunctuator(state.tokens.next,\"[\")?(advance(\"[\"),expression(10),advance(\"]\"),advance(\":\"),nextInnerDE()):\"(string)\"===state.tokens.next.id||\"(number)\"===state.tokens.next.id?(advance(),advance(\":\"),nextInnerDE()):(id=identifier(),checkPunctuator(state.tokens.next,\":\")?(advance(\":\"),nextInnerDE()):id&&(isAssignment&&checkLeftSideAssign(state.tokens.curr),identifiers.push({id:id,token:state.tokens.curr})))};if(checkPunctuator(firstToken,\"[\")){openingParsed||advance(\"[\"),checkPunctuator(state.tokens.next,\"]\")&&warning(\"W137\",state.tokens.curr);for(var element_after_rest=!1;!checkPunctuator(state.tokens.next,\"]\");)nextInnerDE()&&!element_after_rest&&checkPunctuator(state.tokens.next,\",\")&&(warning(\"W130\",state.tokens.next),element_after_rest=!0),checkPunctuator(state.tokens.next,\"=\")&&(checkPunctuator(state.tokens.prev,\"...\")?advance(\"]\"):advance(\"=\"),\"undefined\"===state.tokens.next.id&&warning(\"W080\",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,\"]\")||advance(\",\");advance(\"]\")}else if(checkPunctuator(firstToken,\"{\")){for(openingParsed||advance(\"{\"),checkPunctuator(state.tokens.next,\"}\")&&warning(\"W137\",state.tokens.curr);!checkPunctuator(state.tokens.next,\"}\")&&(assignmentProperty(),checkPunctuator(state.tokens.next,\"=\")&&(advance(\"=\"),\"undefined\"===state.tokens.next.id&&warning(\"W080\",state.tokens.prev,state.tokens.prev.value),expression(10)),checkPunctuator(state.tokens.next,\"}\")||(advance(\",\"),!checkPunctuator(state.tokens.next,\"}\"))););advance(\"}\")}return identifiers}function destructuringPatternMatch(tokens,value){var first=value.first;first&&_.zip(tokens,Array.isArray(first)?first:[first]).forEach(function(val){var token=val[0],value=val[1];token&&value?token.first=value:token&&token.first&&!value&&warning(\"W080\",token.first,token.first.value)})}function blockVariableStatement(type,statement,context){var tokens,lone,value,letblock,prefix=context&&context.prefix,inexport=context&&context.inexport,isLet=\"let\"===type,isConst=\"const\"===type;for(state.inES6()||warning(\"W104\",state.tokens.curr,type,\"6\"),isLet&&\"(\"===state.tokens.next.value?(state.inMoz()||warning(\"W118\",state.tokens.next,\"let block\"),advance(\"(\"),state.funct[\"(scope)\"].stack(),letblock=!0):state.funct[\"(noblockscopedvar)\"]&&error(\"E048\",state.tokens.curr,isConst?\"Const\":\"Let\"),statement.first=[];;){var names=[];_.contains([\"{\",\"[\"],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),!prefix&&isConst&&\"=\"!==state.tokens.next.id&&warning(\"E012\",state.tokens.curr,state.tokens.curr.value);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],state.funct[\"(scope)\"].block.isGlobal()&&predefined[t.id]===!1&&warning(\"W079\",t.token,t.id),t.id&&!state.funct[\"(noblockscopedvar)\"]&&(state.funct[\"(scope)\"].addlabel(t.id,{type:type,token:t.token}),names.push(t.token),lone&&inexport&&state.funct[\"(scope)\"].setExported(t.token.value,t.token)));if(\"=\"===state.tokens.next.id&&(advance(\"=\"),prefix||\"undefined\"!==state.tokens.next.id||warning(\"W080\",state.tokens.prev,state.tokens.prev.value),!prefix&&\"=\"===peek(0).id&&state.tokens.next.identifier&&warning(\"W120\",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),statement.first=statement.first.concat(names),\",\"!==state.tokens.next.id)break;comma()}return letblock&&(advance(\")\"),block(!0,!0),statement.block=!0,state.funct[\"(scope)\"].unstack()),statement}function classdef(isStatement){return state.inES6()||warning(\"W104\",state.tokens.curr,\"class\",\"6\"),isStatement?(this.name=identifier(),state.funct[\"(scope)\"].addlabel(this.name,{type:\"class\",token:state.tokens.curr})):state.tokens.next.identifier&&\"extends\"!==state.tokens.next.value?(this.name=identifier(),this.namedExpr=!0):this.name=state.nameStack.infer(),classtail(this),this}function classtail(c){var wasInClassBody=state.inClassBody;\"extends\"===state.tokens.next.value&&(advance(\"extends\"),c.heritage=expression(10)),state.inClassBody=!0,advance(\"{\"),c.body=classbody(c),advance(\"}\"),state.inClassBody=wasInClassBody}function classbody(c){for(var name,isStatic,isGenerator,getset,computed,props=Object.create(null),staticProps=Object.create(null),i=0;\"}\"!==state.tokens.next.id;++i)if(name=state.tokens.next,isStatic=!1,isGenerator=!1,getset=null,\";\"!==name.id){if(\"*\"===name.id&&(isGenerator=!0,advance(\"*\"),name=state.tokens.next),\"[\"===name.id)name=computedPropertyName(),computed=!0;else{if(!isPropertyName(name)){warning(\"W052\",state.tokens.next,state.tokens.next.value||state.tokens.next.type),advance();continue}advance(),computed=!1,name.identifier&&\"static\"===name.value&&(checkPunctuator(state.tokens.next,\"*\")&&(isGenerator=!0,advance(\"*\")),(isPropertyName(state.tokens.next)||\"[\"===state.tokens.next.id)&&(computed=\"[\"===state.tokens.next.id,isStatic=!0,name=state.tokens.next,\"[\"===state.tokens.next.id?name=computedPropertyName():advance())),!name.identifier||\"get\"!==name.value&&\"set\"!==name.value||(isPropertyName(state.tokens.next)||\"[\"===state.tokens.next.id)&&(computed=\"[\"===state.tokens.next.id,getset=name,name=state.tokens.next,\"[\"===state.tokens.next.id?name=computedPropertyName():advance())}if(!checkPunctuator(state.tokens.next,\"(\")){for(error(\"E054\",state.tokens.next,state.tokens.next.value);\"}\"!==state.tokens.next.id&&!checkPunctuator(state.tokens.next,\"(\");)advance();\"(\"!==state.tokens.next.value&&doFunction({statement:c})}if(computed||(getset?saveAccessor(getset.value,isStatic?staticProps:props,name.value,name,!0,isStatic):(\"constructor\"===name.value?state.nameStack.set(c):state.nameStack.set(name),saveProperty(isStatic?staticProps:props,name.value,name,!0,isStatic))),getset&&\"constructor\"===name.value){var propDesc=\"get\"===getset.value?\"class getter method\":\"class setter method\";error(\"E049\",name,propDesc,\"constructor\")}else\"prototype\"===name.value&&error(\"E049\",name,\"class method\",\"prototype\");propertyName(name),doFunction({statement:c,type:isGenerator?\"generator\":null,classExprBinding:c.namedExpr?c.name:null})}else warning(\"W032\"),advance(\";\");checkProperties(props)}function saveProperty(props,name,tkn,isClass,isStatic){var msg=[\"key\",\"class method\",\"static class method\"];msg=msg[(isClass||!1)+(isStatic||!1)],tkn.identifier&&(name=tkn.value),props[name]&&\"__proto__\"!==name?warning(\"W075\",state.tokens.next,msg,name):props[name]=Object.create(null),props[name].basic=!0,props[name].basictkn=tkn}function saveAccessor(accessorType,props,name,tkn,isClass,isStatic){var flagName=\"get\"===accessorType?\"getterToken\":\"setterToken\",msg=\"\";isClass?(isStatic&&(msg+=\"static \"),msg+=accessorType+\"ter method\"):msg=\"key\",state.tokens.curr.accessorType=accessorType,state.nameStack.set(tkn),props[name]?(props[name].basic||props[name][flagName])&&\"__proto__\"!==name&&warning(\"W075\",state.tokens.next,msg,name):props[name]=Object.create(null),props[name][flagName]=tkn}function computedPropertyName(){advance(\"[\"),state.inES6()||warning(\"W119\",state.tokens.curr,\"computed property names\",\"6\");var value=expression(10);return advance(\"]\"),value}function checkPunctuators(token,values){return\"(punctuator)\"===token.type?_.contains(values,token.value):!1}function checkPunctuator(token,value){return\"(punctuator)\"===token.type&&token.value===value}function destructuringAssignOrJsonValue(){var block=lookupBlockType();block.notJson?(!state.inES6()&&block.isDestAssign&&warning(\"W104\",state.tokens.curr,\"destructuring assignment\",\"6\"),statements()):(state.option.laxbreak=!0,state.jsonMode=!0,jsonValue())}function jsonValue(){function jsonObject(){var o={},t=state.tokens.next;if(advance(\"{\"),\"}\"!==state.tokens.next.id)for(;;){if(\"(end)\"===state.tokens.next.id)error(\"E026\",state.tokens.next,t.line);else{if(\"}\"===state.tokens.next.id){warning(\"W094\",state.tokens.curr);break}\",\"===state.tokens.next.id?error(\"E028\",state.tokens.next):\"(string)\"!==state.tokens.next.id&&warning(\"W095\",state.tokens.next,state.tokens.next.value)}if(o[state.tokens.next.value]===!0?warning(\"W075\",state.tokens.next,\"key\",state.tokens.next.value):\"__proto__\"===state.tokens.next.value&&!state.option.proto||\"__iterator__\"===state.tokens.next.value&&!state.option.iterator?warning(\"W096\",state.tokens.next,state.tokens.next.value):o[state.tokens.next.value]=!0,advance(),advance(\":\"),jsonValue(),\",\"!==state.tokens.next.id)break;advance(\",\")}advance(\"}\")}function jsonArray(){var t=state.tokens.next;if(advance(\"[\"),\"]\"!==state.tokens.next.id)for(;;){if(\"(end)\"===state.tokens.next.id)error(\"E027\",state.tokens.next,t.line);else{if(\"]\"===state.tokens.next.id){warning(\"W094\",state.tokens.curr);break}\",\"===state.tokens.next.id&&error(\"E028\",state.tokens.next)}if(jsonValue(),\",\"!==state.tokens.next.id)break;advance(\",\")}advance(\"]\")}switch(state.tokens.next.id){case\"{\":jsonObject();break;case\"[\":jsonArray();break;case\"true\":case\"false\":case\"null\":case\"(number)\":case\"(string)\":advance();break;case\"-\":advance(\"-\"),advance(\"(number)\");break;default:error(\"E003\",state.tokens.next)}}var api,declared,functions,inblock,indent,lookahead,lex,member,membersOnly,predefined,stack,urls,bang={\"<\":!0,\"<=\":!0,\"==\":!0,\"===\":!0,\"!==\":!0,\"!=\":!0,\">\":!0,\">=\":!0,\"+\":!0,\"-\":!0,\"*\":!0,\"/\":!0,\"%\":!0},functionicity=[\"closure\",\"exception\",\"global\",\"label\",\"outer\",\"unused\",\"var\"],extraModules=[],emitter=new events.EventEmitter,typeofValues={};typeofValues.legacy=[\"xml\",\"unknown\"],typeofValues.es3=[\"undefined\",\"boolean\",\"number\",\"string\",\"function\",\"object\"],typeofValues.es3=typeofValues.es3.concat(typeofValues.legacy),typeofValues.es6=typeofValues.es3.concat(\"symbol\"),type(\"(number)\",function(){return this}),type(\"(string)\",function(){return this}),state.syntax[\"(identifier)\"]={type:\"(identifier)\",lbp:0,identifier:!0,nud:function(){var v=this.value;return\"=>\"===state.tokens.next.id?this:(state.funct[\"(comparray)\"].check(v)||state.funct[\"(scope)\"].block.use(v,state.tokens.curr),this)},led:function(){error(\"E033\",state.tokens.next,state.tokens.next.value)}};var baseTemplateSyntax={lbp:0,identifier:!1,template:!0};state.syntax[\"(template)\"]=_.extend({type:\"(template)\",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!1},baseTemplateSyntax),state.syntax[\"(template middle)\"]=_.extend({type:\"(template middle)\",middle:!0,noSubst:!1},baseTemplateSyntax),state.syntax[\"(template tail)\"]=_.extend({type:\"(template tail)\",tail:!0,noSubst:!1},baseTemplateSyntax),state.syntax[\"(no subst template)\"]=_.extend({type:\"(template)\",nud:doTemplateLiteral,led:doTemplateLiteral,noSubst:!0,tail:!0},baseTemplateSyntax),type(\"(regexp)\",function(){return this}),delim(\"(endline)\"),delim(\"(begin)\"),delim(\"(end)\").reach=!0,delim(\"(error)\").reach=!0,delim(\"}\").reach=!0,delim(\")\"),delim(\"]\"),delim('\"').reach=!0,delim(\"'\").reach=!0,delim(\";\"),delim(\":\").reach=!0,delim(\"#\"),reserve(\"else\"),reserve(\"case\").reach=!0,reserve(\"catch\"),reserve(\"default\").reach=!0,reserve(\"finally\"),reservevar(\"arguments\",function(x){state.isStrict()&&state.funct[\"(global)\"]&&warning(\"E008\",x)}),reservevar(\"eval\"),reservevar(\"false\"),reservevar(\"Infinity\"),reservevar(\"null\"),reservevar(\"this\",function(x){state.isStrict()&&!isMethod()&&!state.option.validthis&&(state.funct[\"(statement)\"]&&state.funct[\"(name)\"].charAt(0)>\"Z\"||state.funct[\"(global)\"])&&warning(\"W040\",x)}),reservevar(\"true\"),reservevar(\"undefined\"),assignop(\"=\",\"assign\",20),assignop(\"+=\",\"assignadd\",20),assignop(\"-=\",\"assignsub\",20),assignop(\"*=\",\"assignmult\",20),assignop(\"/=\",\"assigndiv\",20).nud=function(){error(\"E014\")},assignop(\"%=\",\"assignmod\",20),bitwiseassignop(\"&=\"),bitwiseassignop(\"|=\"),bitwiseassignop(\"^=\"),bitwiseassignop(\"<<=\"),bitwiseassignop(\">>=\"),bitwiseassignop(\">>>=\"),infix(\",\",function(left,that){var expr;if(that.exprs=[left],state.option.nocomma&&warning(\"W127\"),!comma({peek:!0}))return that;for(;;){if(!(expr=expression(10)))break;if(that.exprs.push(expr),\",\"!==state.tokens.next.value||!comma())break}return that},10,!0),infix(\"?\",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(10),advance(\":\"),that[\"else\"]=expression(10),that},30);var orPrecendence=40;infix(\"||\",function(left,that){return increaseComplexityCount(),that.left=left,that.right=expression(orPrecendence),that},orPrecendence),infix(\"&&\",\"and\",50),bitwise(\"|\",\"bitor\",70),bitwise(\"^\",\"bitxor\",80),bitwise(\"&\",\"bitand\",90),relation(\"==\",function(left,right){var eqnull=state.option.eqnull&&(\"null\"===(left&&left.value)||\"null\"===(right&&right.value));switch(!0){case!eqnull&&state.option.eqeqeq:this.from=this.character,warning(\"W116\",this,\"===\",\"==\");break;case isPoorRelation(left):warning(\"W041\",this,\"===\",left.value);break;case isPoorRelation(right):warning(\"W041\",this,\"===\",right.value);break;case isTypoTypeof(right,left,state):warning(\"W122\",this,right.value);break;case isTypoTypeof(left,right,state):warning(\"W122\",this,left.value)}return this}),relation(\"===\",function(left,right){return isTypoTypeof(right,left,state)?warning(\"W122\",this,right.value):isTypoTypeof(left,right,state)&&warning(\"W122\",this,left.value),this}),relation(\"!=\",function(left,right){var eqnull=state.option.eqnull&&(\"null\"===(left&&left.value)||\"null\"===(right&&right.value));return!eqnull&&state.option.eqeqeq?(this.from=this.character,warning(\"W116\",this,\"!==\",\"!=\")):isPoorRelation(left)?warning(\"W041\",this,\"!==\",left.value):isPoorRelation(right)?warning(\"W041\",this,\"!==\",right.value):isTypoTypeof(right,left,state)?warning(\"W122\",this,right.value):isTypoTypeof(left,right,state)&&warning(\"W122\",this,left.value),this}),relation(\"!==\",function(left,right){return isTypoTypeof(right,left,state)?warning(\"W122\",this,right.value):isTypoTypeof(left,right,state)&&warning(\"W122\",this,left.value),this}),relation(\"<\"),relation(\">\"),relation(\"<=\"),relation(\">=\"),bitwise(\"<<\",\"shiftleft\",120),bitwise(\">>\",\"shiftright\",120),bitwise(\">>>\",\"shiftrightunsigned\",120),infix(\"in\",\"in\",120),infix(\"instanceof\",\"instanceof\",120),infix(\"+\",function(left,that){var right;return that.left=left,that.right=right=expression(130),left&&right&&\"(string)\"===left.id&&\"(string)\"===right.id?(left.value+=right.value,left.character=right.character,!state.option.scripturl&®.javascriptURL.test(left.value)&&warning(\"W050\",left),left):that},130),prefix(\"+\",\"num\"),prefix(\"+++\",function(){return warning(\"W007\"),this.arity=\"unary\",this.right=expression(150),this}),infix(\"+++\",function(left){return warning(\"W007\"),this.left=left,this.right=expression(130),this},130),infix(\"-\",\"sub\",130),prefix(\"-\",\"neg\"),prefix(\"---\",function(){return warning(\"W006\"),this.arity=\"unary\",this.right=expression(150),this}),infix(\"---\",function(left){return warning(\"W006\"),this.left=left,this.right=expression(130),this},130),infix(\"*\",\"mult\",140),infix(\"/\",\"div\",140),infix(\"%\",\"mod\",140),suffix(\"++\"),prefix(\"++\",\"preinc\"),state.syntax[\"++\"].exps=!0,suffix(\"--\"),prefix(\"--\",\"predec\"),state.syntax[\"--\"].exps=!0,prefix(\"delete\",function(){var p=expression(10);return p?(\".\"!==p.id&&\"[\"!==p.id&&warning(\"W051\"),this.first=p,p.identifier&&!state.isStrict()&&(p.forgiveUndef=!0),this):this}).exps=!0,prefix(\"~\",function(){return state.option.bitwise&&warning(\"W016\",this,\"~\"),this.arity=\"unary\",this.right=expression(150),this}),prefix(\"...\",function(){return state.inES6(!0)||warning(\"W119\",this,\"spread/rest operator\",\"6\"),state.tokens.next.identifier||\"(string)\"===state.tokens.next.type||checkPunctuators(state.tokens.next,[\"[\",\"(\"])||error(\"E030\",state.tokens.next,state.tokens.next.value),expression(150),this}),prefix(\"!\",function(){return this.arity=\"unary\",this.right=expression(150),this.right||quit(\"E041\",this.line||0),bang[this.right.id]===!0&&warning(\"W018\",this,\"!\"),this}),prefix(\"typeof\",function(){var p=expression(150);return this.first=this.right=p,p||quit(\"E041\",this.line||0,this.character||0),p.identifier&&(p.forgiveUndef=!0),this}),prefix(\"new\",function(){var mp=metaProperty(\"target\",function(){state.inES6(!0)||warning(\"W119\",state.tokens.prev,\"new.target\",\"6\");for(var inFunction,c=state.funct;c&&(inFunction=!c[\"(global)\"],c[\"(arrow)\"]);)c=c[\"(context)\"];inFunction||warning(\"W136\",state.tokens.prev,\"new.target\")});if(mp)return mp;var i,c=expression(155);if(c&&\"function\"!==c.id)if(c.identifier)switch(c[\"new\"]=!0,c.value){case\"Number\":case\"String\":case\"Boolean\":case\"Math\":case\"JSON\":warning(\"W053\",state.tokens.prev,c.value);break;case\"Symbol\":state.inES6()&&warning(\"W053\",state.tokens.prev,c.value);break;case\"Function\":state.option.evil||warning(\"W054\");break;case\"Date\":case\"RegExp\":case\"this\":break;default:\"function\"!==c.id&&(i=c.value.substr(0,1),state.option.newcap&&(\"A\">i||i>\"Z\")&&!state.funct[\"(scope)\"].isPredefined(c.value)&&warning(\"W055\",state.tokens.curr))}else\".\"!==c.id&&\"[\"!==c.id&&\"(\"!==c.id&&warning(\"W056\",state.tokens.curr);else state.option.supernew||warning(\"W057\",this);return\"(\"===state.tokens.next.id||state.option.supernew||warning(\"W058\",state.tokens.curr,state.tokens.curr.value),this.first=this.right=c,this}),state.syntax[\"new\"].exps=!0,prefix(\"void\").exps=!0,infix(\".\",function(left,that){var m=identifier(!1,!0);return\"string\"==typeof m&&countMember(m),that.left=left,that.right=m,m&&\"hasOwnProperty\"===m&&\"=\"===state.tokens.next.value&&warning(\"W001\"),!left||\"arguments\"!==left.value||\"callee\"!==m&&\"caller\"!==m?state.option.evil||!left||\"document\"!==left.value||\"write\"!==m&&\"writeln\"!==m||warning(\"W060\",left):state.option.noarg?warning(\"W059\",left,m):state.isStrict()&&error(\"E008\"),state.option.evil||\"eval\"!==m&&\"execScript\"!==m||isGlobalEval(left,state)&&warning(\"W061\"),that},160,!0),infix(\"(\",function(left,that){state.option.immed&&left&&!left.immed&&\"function\"===left.id&&warning(\"W062\");var n=0,p=[];if(left&&\"(identifier)\"===left.type&&left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&-1===\"Array Number String Boolean Date Object Error Symbol\".indexOf(left.value)&&(\"Math\"===left.value?warning(\"W063\",left):state.option.newcap&&warning(\"W064\",left)),\")\"!==state.tokens.next.id)for(;p[p.length]=expression(10),n+=1,\",\"===state.tokens.next.id;)comma();return advance(\")\"),\"object\"==typeof left&&(state.inES5()||\"parseInt\"!==left.value||1!==n||warning(\"W065\",state.tokens.curr),state.option.evil||(\"eval\"===left.value||\"Function\"===left.value||\"execScript\"===left.value?(warning(\"W061\",left),p[0]&&\"(string)\"===[0].id&&addInternalSrc(left,p[0].value)):!p[0]||\"(string)\"!==p[0].id||\"setTimeout\"!==left.value&&\"setInterval\"!==left.value?!p[0]||\"(string)\"!==p[0].id||\".\"!==left.value||\"window\"!==left.left.value||\"setTimeout\"!==left.right&&\"setInterval\"!==left.right||(warning(\"W066\",left),addInternalSrc(left,p[0].value)):(warning(\"W066\",left),addInternalSrc(left,p[0].value))),left.identifier||\".\"===left.id||\"[\"===left.id||\"=>\"===left.id||\"(\"===left.id||\"&&\"===left.id||\"||\"===left.id||\"?\"===left.id||state.inES6()&&left[\"(name)\"]||warning(\"W067\",that)),that.left=left,that},155,!0).exps=!0,prefix(\"(\",function(){var pn1,ret,triggerFnExpr,first,last,pn=state.tokens.next,i=-1,parens=1,opening=state.tokens.curr,preceeding=state.tokens.prev,isNecessary=!state.option.singleGroups;do\"(\"===pn.value?parens+=1:\")\"===pn.value&&(parens-=1),i+=1,pn1=pn,pn=peek(i);while((0!==parens||\")\"!==pn1.value)&&\";\"!==pn.value&&\"(end)\"!==pn.type);if(\"function\"===state.tokens.next.id&&(triggerFnExpr=state.tokens.next.immed=!0),\"=>\"===pn.value)return doFunction({type:\"arrow\",parsedOpening:!0});var exprs=[];if(\")\"!==state.tokens.next.id)for(;exprs.push(expression(10)),\",\"===state.tokens.next.id;)state.option.nocomma&&warning(\"W127\"),comma();return advance(\")\",this),state.option.immed&&exprs[0]&&\"function\"===exprs[0].id&&\"(\"!==state.tokens.next.id&&\".\"!==state.tokens.next.id&&\"[\"!==state.tokens.next.id&&warning(\"W068\",this),exprs.length?(exprs.length>1?(ret=Object.create(state.syntax[\",\"]),ret.exprs=exprs,first=exprs[0],last=exprs[exprs.length-1],isNecessary||(isNecessary=preceeding.assign||preceeding.delim)):(ret=first=last=exprs[0],isNecessary||(isNecessary=opening.beginsStmt&&(\"{\"===ret.id||triggerFnExpr||isFunctor(ret))||triggerFnExpr&&(!isEndOfExpr()||\"}\"!==state.tokens.prev.id)||isFunctor(ret)&&!isEndOfExpr()||\"{\"===ret.id&&\"=>\"===preceeding.id||\"(number)\"===ret.type&&checkPunctuator(pn,\".\")&&/^\\d+$/.test(ret.value))),ret&&(!isNecessary&&(first.left||first.right||ret.exprs)&&(isNecessary=!isBeginOfExpr(preceeding)&&first.lbp<=preceeding.lbp||!isEndOfExpr()&&last.lbp\"),infix(\"[\",function(left,that){var s,e=expression(10);return e&&\"(string)\"===e.type&&(state.option.evil||\"eval\"!==e.value&&\"execScript\"!==e.value||isGlobalEval(left,state)&&warning(\"W061\"),countMember(e.value),!state.option.sub&®.identifier.test(e.value)&&(s=state.syntax[e.value],s&&isReserved(s)||warning(\"W069\",state.tokens.prev,e.value))),advance(\"]\",that),e&&\"hasOwnProperty\"===e.value&&\"=\"===state.tokens.next.value&&warning(\"W001\"),that.left=left,that.right=e,that},160,!0),prefix(\"[\",function(){var blocktype=lookupBlockType();if(blocktype.isCompArray)return state.option.esnext||state.inMoz()||warning(\"W118\",state.tokens.curr,\"array comprehension\"),comprehensiveArrayExpression();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;var b=state.tokens.curr.line!==startLine(state.tokens.next);for(this.first=[],b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));\"(end)\"!==state.tokens.next.id;){for(;\",\"===state.tokens.next.id;){if(!state.option.elision){if(state.inES5()){warning(\"W128\");do advance(\",\");while(\",\"===state.tokens.next.id);continue}warning(\"W070\")}advance(\",\")}if(\"]\"===state.tokens.next.id)break;if(this.first.push(expression(10)),\",\"!==state.tokens.next.id)break;if(comma({allowTrailing:!0}),\"]\"===state.tokens.next.id&&!state.inES5()){warning(\"W070\",state.tokens.curr);break}}return b&&(indent-=state.option.indent),advance(\"]\",this),this}),function(x){x.nud=function(){var b,f,i,p,t,nextVal,isGeneratorMethod=!1,props=Object.create(null);b=state.tokens.curr.line!==startLine(state.tokens.next),b&&(indent+=state.option.indent,state.tokens.next.from===indent+state.option.indent&&(indent+=state.option.indent));var blocktype=lookupBlockType();if(blocktype.isDestAssign)return this.destructAssign=destructuringPattern({openingParsed:!0,assignment:!0}),this;for(;\"}\"!==state.tokens.next.id;){if(nextVal=state.tokens.next.value,!state.tokens.next.identifier||\",\"!==peekIgnoreEOL().id&&\"}\"!==peekIgnoreEOL().id)if(\":\"===peek().id||\"get\"!==nextVal&&\"set\"!==nextVal){if(\"*\"===state.tokens.next.value&&\"(punctuator)\"===state.tokens.next.type?(state.inES6()||warning(\"W104\",state.tokens.next,\"generator functions\",\"6\"),advance(\"*\"),isGeneratorMethod=!0):isGeneratorMethod=!1,\"[\"===state.tokens.next.id)i=computedPropertyName(),state.nameStack.set(i);else if(state.nameStack.set(state.tokens.next),i=propertyName(),saveProperty(props,i,state.tokens.next),\"string\"!=typeof i)break;\"(\"===state.tokens.next.value?(state.inES6()||warning(\"W104\",state.tokens.curr,\"concise methods\",\"6\"),doFunction({type:isGeneratorMethod?\"generator\":null})):(advance(\":\"),expression(10))}else advance(nextVal),state.inES5()||error(\"E034\"),i=propertyName(),i||state.inES6()||error(\"E035\"),i&&saveAccessor(nextVal,props,i,state.tokens.curr),t=state.tokens.next,f=doFunction(),p=f[\"(params)\"],\"get\"===nextVal&&i&&p?warning(\"W076\",t,p[0],i):\"set\"!==nextVal||!i||p&&1===p.length||warning(\"W077\",t,i);else state.inES6()||warning(\"W104\",state.tokens.next,\"object short notation\",\"6\"),i=propertyName(!0),saveProperty(props,i,state.tokens.next),expression(10);if(countMember(i),\",\"!==state.tokens.next.id)break;comma({allowTrailing:!0,property:!0}),\",\"===state.tokens.next.id?warning(\"W070\",state.tokens.curr):\"}\"!==state.tokens.next.id||state.inES5()||warning(\"W070\",state.tokens.curr)}return b&&(indent-=state.option.indent),advance(\"}\",this),checkProperties(props),this},x.fud=function(){error(\"E036\",state.tokens.curr)}}(delim(\"{\"));var conststatement=stmt(\"const\",function(context){return blockVariableStatement(\"const\",this,context)});conststatement.exps=!0;var letstatement=stmt(\"let\",function(context){return blockVariableStatement(\"let\",this,context)});letstatement.exps=!0;var varstatement=stmt(\"var\",function(context){var tokens,lone,value,prefix=context&&context.prefix,inexport=context&&context.inexport,implied=context&&context.implied,report=!(context&&context.ignore);for(this.first=[];;){var names=[];_.contains([\"{\",\"[\"],state.tokens.next.value)?(tokens=destructuringPattern(),lone=!1):(tokens=[{id:identifier(),token:state.tokens.curr}],lone=!0),prefix&&implied||!report||!state.option.varstmt||warning(\"W132\",this),this.first=this.first.concat(names);for(var t in tokens)tokens.hasOwnProperty(t)&&(t=tokens[t],!implied&&state.funct[\"(global)\"]&&(predefined[t.id]===!1?warning(\"W079\",t.token,t.id):state.option.futurehostile===!1&&(!state.inES5()&&vars.ecmaIdentifiers[5][t.id]===!1||!state.inES6()&&vars.ecmaIdentifiers[6][t.id]===!1)&&warning(\"W129\",t.token,t.id)),t.id&&(\"for\"===implied?(state.funct[\"(scope)\"].has(t.id)||report&&warning(\"W088\",t.token,t.id),state.funct[\"(scope)\"].block.use(t.id,t.token)):(state.funct[\"(scope)\"].addlabel(t.id,{type:\"var\",token:t.token}),lone&&inexport&&state.funct[\"(scope)\"].setExported(t.id,t.token)),names.push(t.token)));if(\"=\"===state.tokens.next.id&&(state.nameStack.set(state.tokens.curr),advance(\"=\"),prefix||!report||state.funct[\"(loopage)\"]||\"undefined\"!==state.tokens.next.id||warning(\"W080\",state.tokens.prev,state.tokens.prev.value),\"=\"===peek(0).id&&state.tokens.next.identifier&&(!prefix&&report&&!state.funct[\"(params)\"]||-1===state.funct[\"(params)\"].indexOf(state.tokens.next.value))&&warning(\"W120\",state.tokens.next,state.tokens.next.value),value=expression(prefix?120:10),lone?tokens[0].first=value:destructuringPatternMatch(names,value)),\",\"!==state.tokens.next.id)break;comma()}return this});varstatement.exps=!0,blockstmt(\"class\",function(){return classdef.call(this,!0)}),blockstmt(\"function\",function(context){var inexport=context&&context.inexport,generator=!1;\"*\"===state.tokens.next.value&&(advance(\"*\"),state.inES6({strict:!0})?generator=!0:warning(\"W119\",state.tokens.curr,\"function*\",\"6\")),inblock&&warning(\"W082\",state.tokens.curr);var i=optionalidentifier();return state.funct[\"(scope)\"].addlabel(i,{type:\"function\",token:state.tokens.curr}),void 0===i?warning(\"W025\"):inexport&&state.funct[\"(scope)\"].setExported(i,state.tokens.prev),doFunction({name:i,statement:this,type:generator?\"generator\":null,ignoreLoopFunc:inblock}),\"(\"===state.tokens.next.id&&state.tokens.next.line===state.tokens.curr.line&&error(\"E039\"),this}),prefix(\"function\",function(){var generator=!1;\"*\"===state.tokens.next.value&&(state.inES6()||warning(\"W119\",state.tokens.curr,\"function*\",\"6\"),advance(\"*\"),generator=!0);var i=optionalidentifier();return doFunction({name:i,type:generator?\"generator\":null}),this}),blockstmt(\"if\",function(){var t=state.tokens.next;increaseComplexityCount(),state.condition=!0,advance(\"(\");var expr=expression(0);checkCondAssignment(expr);var forinifcheck=null;state.option.forin&&state.forinifcheckneeded&&(state.forinifcheckneeded=!1,forinifcheck=state.forinifchecks[state.forinifchecks.length-1],forinifcheck.type=\"(punctuator)\"===expr.type&&\"!\"===expr.value?\"(negative)\":\"(positive)\"),advance(\")\",t),state.condition=!1;var s=block(!0,!0);return forinifcheck&&\"(negative)\"===forinifcheck.type&&s&&s[0]&&\"(identifier)\"===s[0].type&&\"continue\"===s[0].value&&(forinifcheck.type=\"(negative-with-continue)\"),\"else\"===state.tokens.next.id&&(advance(\"else\"),\"if\"===state.tokens.next.id||\"switch\"===state.tokens.next.id?statement():block(!0,!0)),this}),blockstmt(\"try\",function(){function doCatch(){if(advance(\"catch\"),advance(\"(\"),state.funct[\"(scope)\"].stack(\"catchparams\"),checkPunctuators(state.tokens.next,[\"[\",\"{\"])){var tokens=destructuringPattern();_.each(tokens,function(token){token.id&&state.funct[\"(scope)\"].addParam(token.id,token,\"exception\")})}else\"(identifier)\"!==state.tokens.next.type?warning(\"E030\",state.tokens.next,state.tokens.next.value):state.funct[\"(scope)\"].addParam(identifier(),state.tokens.curr,\"exception\");\"if\"===state.tokens.next.value&&(state.inMoz()||warning(\"W118\",state.tokens.curr,\"catch filter\"),advance(\"if\"),expression(0)),advance(\")\"),block(!1),state.funct[\"(scope)\"].unstack()}var b;for(block(!0);\"catch\"===state.tokens.next.id;)increaseComplexityCount(),b&&!state.inMoz()&&warning(\"W118\",state.tokens.next,\"multiple catch blocks\"),doCatch(),b=!0;return\"finally\"===state.tokens.next.id?(advance(\"finally\"),block(!0),void 0):(b||error(\"E021\",state.tokens.next,\"catch\",state.tokens.next.value),this)}),blockstmt(\"while\",function(){var t=state.tokens.next;return state.funct[\"(breakage)\"]+=1,state.funct[\"(loopage)\"]+=1,increaseComplexityCount(),advance(\"(\"),checkCondAssignment(expression(0)),advance(\")\",t),block(!0,!0),state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1,this}).labelled=!0,blockstmt(\"with\",function(){var t=state.tokens.next;return state.isStrict()?error(\"E010\",state.tokens.curr):state.option.withstmt||warning(\"W085\",state.tokens.curr),advance(\"(\"),expression(0),advance(\")\",t),block(!0,!0),this}),blockstmt(\"switch\",function(){var t=state.tokens.next,g=!1,noindent=!1;\nfor(state.funct[\"(breakage)\"]+=1,advance(\"(\"),checkCondAssignment(expression(0)),advance(\")\",t),t=state.tokens.next,advance(\"{\"),state.tokens.next.from===indent&&(noindent=!0),noindent||(indent+=state.option.indent),this.cases=[];;)switch(state.tokens.next.id){case\"case\":switch(state.funct[\"(verb)\"]){case\"yield\":case\"break\":case\"case\":case\"continue\":case\"return\":case\"switch\":case\"throw\":break;default:state.tokens.curr.caseFallsThrough||warning(\"W086\",state.tokens.curr,\"case\")}advance(\"case\"),this.cases.push(expression(0)),increaseComplexityCount(),g=!0,advance(\":\"),state.funct[\"(verb)\"]=\"case\";break;case\"default\":switch(state.funct[\"(verb)\"]){case\"yield\":case\"break\":case\"continue\":case\"return\":case\"throw\":break;default:this.cases.length&&(state.tokens.curr.caseFallsThrough||warning(\"W086\",state.tokens.curr,\"default\"))}advance(\"default\"),g=!0,advance(\":\");break;case\"}\":return noindent||(indent-=state.option.indent),advance(\"}\",t),state.funct[\"(breakage)\"]-=1,state.funct[\"(verb)\"]=void 0,void 0;case\"(end)\":return error(\"E023\",state.tokens.next,\"}\"),void 0;default:if(indent+=state.option.indent,g)switch(state.tokens.curr.id){case\",\":return error(\"E040\"),void 0;case\":\":g=!1,statements();break;default:return error(\"E025\",state.tokens.curr),void 0}else{if(\":\"!==state.tokens.curr.id)return error(\"E021\",state.tokens.next,\"case\",state.tokens.next.value),void 0;advance(\":\"),error(\"E024\",state.tokens.curr,\":\"),statements()}indent-=state.option.indent}return this}).labelled=!0,stmt(\"debugger\",function(){return state.option.debug||warning(\"W087\",this),this}).exps=!0,function(){var x=stmt(\"do\",function(){state.funct[\"(breakage)\"]+=1,state.funct[\"(loopage)\"]+=1,increaseComplexityCount(),this.first=block(!0,!0),advance(\"while\");var t=state.tokens.next;return advance(\"(\"),checkCondAssignment(expression(0)),advance(\")\",t),state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1,this});x.labelled=!0,x.exps=!0}(),blockstmt(\"for\",function(){var s,t=state.tokens.next,letscope=!1,foreachtok=null;\"each\"===t.value&&(foreachtok=t,advance(\"each\"),state.inMoz()||warning(\"W118\",state.tokens.curr,\"for each\")),increaseComplexityCount(),advance(\"(\");var nextop,comma,initializer,i=0,inof=[\"in\",\"of\"],level=0;checkPunctuators(state.tokens.next,[\"{\",\"[\"])&&++level;do{if(nextop=peek(i),++i,checkPunctuators(nextop,[\"{\",\"[\"])?++level:checkPunctuators(nextop,[\"}\",\"]\"])&&--level,0>level)break;0===level&&(!comma&&checkPunctuator(nextop,\",\")?comma=nextop:!initializer&&checkPunctuator(nextop,\"=\")&&(initializer=nextop))}while(level>0||!_.contains(inof,nextop.value)&&\";\"!==nextop.value&&\"(end)\"!==nextop.type);if(_.contains(inof,nextop.value)){state.inES6()||\"of\"!==nextop.value||warning(\"W104\",nextop,\"for of\",\"6\");var ok=!(initializer||comma);if(initializer&&error(\"W133\",comma,nextop.value,\"initializer is forbidden\"),comma&&error(\"W133\",comma,nextop.value,\"more than one ForBinding\"),\"var\"===state.tokens.next.id?(advance(\"var\"),state.tokens.curr.fud({prefix:!0})):\"let\"===state.tokens.next.id||\"const\"===state.tokens.next.id?(advance(state.tokens.next.id),letscope=!0,state.funct[\"(scope)\"].stack(),state.tokens.curr.fud({prefix:!0})):Object.create(varstatement).fud({prefix:!0,implied:\"for\",ignore:!ok}),advance(nextop.value),expression(20),advance(\")\",t),\"in\"===nextop.value&&state.option.forin&&(state.forinifcheckneeded=!0,void 0===state.forinifchecks&&(state.forinifchecks=[]),state.forinifchecks.push({type:\"(none)\"})),state.funct[\"(breakage)\"]+=1,state.funct[\"(loopage)\"]+=1,s=block(!0,!0),\"in\"===nextop.value&&state.option.forin){if(state.forinifchecks&&state.forinifchecks.length>0){var check=state.forinifchecks.pop();(s&&s.length>0&&(\"object\"!=typeof s[0]||\"if\"!==s[0].value)||\"(positive)\"===check.type&&s.length>1||\"(negative)\"===check.type)&&warning(\"W089\",this)}state.forinifcheckneeded=!1}state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1}else{if(foreachtok&&error(\"E045\",foreachtok),\";\"!==state.tokens.next.id)if(\"var\"===state.tokens.next.id)advance(\"var\"),state.tokens.curr.fud();else if(\"let\"===state.tokens.next.id)advance(\"let\"),letscope=!0,state.funct[\"(scope)\"].stack(),state.tokens.curr.fud();else for(;expression(0,\"for\"),\",\"===state.tokens.next.id;)comma();if(nolinebreak(state.tokens.curr),advance(\";\"),state.funct[\"(loopage)\"]+=1,\";\"!==state.tokens.next.id&&checkCondAssignment(expression(0)),nolinebreak(state.tokens.curr),advance(\";\"),\";\"===state.tokens.next.id&&error(\"E021\",state.tokens.next,\")\",\";\"),\")\"!==state.tokens.next.id)for(;expression(0,\"for\"),\",\"===state.tokens.next.id;)comma();advance(\")\",t),state.funct[\"(breakage)\"]+=1,block(!0,!0),state.funct[\"(breakage)\"]-=1,state.funct[\"(loopage)\"]-=1}return letscope&&state.funct[\"(scope)\"].unstack(),this}).labelled=!0,stmt(\"break\",function(){var v=state.tokens.next.value;return state.option.asi||nolinebreak(this),\";\"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line!==startLine(state.tokens.next)?0===state.funct[\"(breakage)\"]&&warning(\"W052\",state.tokens.next,this.value):(state.funct[\"(scope)\"].funct.hasBreakLabel(v)||warning(\"W090\",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt(\"continue\",function(){var v=state.tokens.next.value;return 0===state.funct[\"(breakage)\"]&&warning(\"W052\",state.tokens.next,this.value),state.funct[\"(loopage)\"]||warning(\"W052\",state.tokens.next,this.value),state.option.asi||nolinebreak(this),\";\"===state.tokens.next.id||state.tokens.next.reach||state.tokens.curr.line===startLine(state.tokens.next)&&(state.funct[\"(scope)\"].funct.hasBreakLabel(v)||warning(\"W090\",state.tokens.next,v),this.first=state.tokens.next,advance()),reachable(this),this}).exps=!0,stmt(\"return\",function(){return this.line===startLine(state.tokens.next)?\";\"===state.tokens.next.id||state.tokens.next.reach||(this.first=expression(0),!this.first||\"(punctuator)\"!==this.first.type||\"=\"!==this.first.value||this.first.paren||state.option.boss||warningAt(\"W093\",this.first.line,this.first.character)):\"(punctuator)\"===state.tokens.next.type&&[\"[\",\"{\",\"+\",\"-\"].indexOf(state.tokens.next.value)>-1&&nolinebreak(this),reachable(this),this}).exps=!0,function(x){x.exps=!0,x.lbp=25}(prefix(\"yield\",function(){var prev=state.tokens.prev;state.inES6(!0)&&!state.funct[\"(generator)\"]?\"(catch)\"===state.funct[\"(name)\"]&&state.funct[\"(context)\"][\"(generator)\"]||error(\"E046\",state.tokens.curr,\"yield\"):state.inES6()||warning(\"W104\",state.tokens.curr,\"yield\",\"6\"),state.funct[\"(generator)\"]=\"yielded\";var delegatingYield=!1;return\"*\"===state.tokens.next.value&&(delegatingYield=!0,advance(\"*\")),this.line!==startLine(state.tokens.next)&&state.inMoz()?state.option.asi||nolinebreak(this):((delegatingYield||\";\"!==state.tokens.next.id&&!state.option.asi&&!state.tokens.next.reach&&state.tokens.next.nud)&&(nobreaknonadjacent(state.tokens.curr,state.tokens.next),this.first=expression(10),\"(punctuator)\"!==this.first.type||\"=\"!==this.first.value||this.first.paren||state.option.boss||warningAt(\"W093\",this.first.line,this.first.character)),state.inMoz()&&\")\"!==state.tokens.next.id&&(prev.lbp>30||!prev.assign&&!isEndOfExpr()||\"yield\"===prev.id)&&error(\"E050\",this)),this})),stmt(\"throw\",function(){return nolinebreak(this),this.first=expression(20),reachable(this),this}).exps=!0,stmt(\"import\",function(){if(state.inES6()||warning(\"W119\",state.tokens.curr,\"import\",\"6\"),\"(string)\"===state.tokens.next.type)return advance(\"(string)\"),this;if(state.tokens.next.identifier){if(this.name=identifier(),state.funct[\"(scope)\"].addlabel(this.name,{type:\"const\",token:state.tokens.curr}),\",\"!==state.tokens.next.value)return advance(\"from\"),advance(\"(string)\"),this;advance(\",\")}if(\"*\"===state.tokens.next.id)advance(\"*\"),advance(\"as\"),state.tokens.next.identifier&&(this.name=identifier(),state.funct[\"(scope)\"].addlabel(this.name,{type:\"const\",token:state.tokens.curr}));else for(advance(\"{\");;){if(\"}\"===state.tokens.next.value){advance(\"}\");break}var importName;if(\"default\"===state.tokens.next.type?(importName=\"default\",advance(\"default\")):importName=identifier(),\"as\"===state.tokens.next.value&&(advance(\"as\"),importName=identifier()),state.funct[\"(scope)\"].addlabel(importName,{type:\"const\",token:state.tokens.curr}),\",\"!==state.tokens.next.value){if(\"}\"===state.tokens.next.value){advance(\"}\");break}error(\"E024\",state.tokens.next,state.tokens.next.value);break}advance(\",\")}return advance(\"from\"),advance(\"(string)\"),this}).exps=!0,stmt(\"export\",function(){var token,identifier,ok=!0;if(state.inES6()||(warning(\"W119\",state.tokens.curr,\"export\",\"6\"),ok=!1),state.funct[\"(scope)\"].block.isGlobal()||(error(\"E053\",state.tokens.curr),ok=!1),\"*\"===state.tokens.next.value)return advance(\"*\"),advance(\"from\"),advance(\"(string)\"),this;if(\"default\"===state.tokens.next.type){state.nameStack.set(state.tokens.next),advance(\"default\");var exportType=state.tokens.next.id;return(\"function\"===exportType||\"class\"===exportType)&&(this.block=!0),token=peek(),expression(10),identifier=token.value,this.block&&(state.funct[\"(scope)\"].addlabel(identifier,{type:exportType,token:token}),state.funct[\"(scope)\"].setExported(identifier,token)),this}if(\"{\"===state.tokens.next.value){advance(\"{\");for(var exportedTokens=[];;){if(state.tokens.next.identifier||error(\"E030\",state.tokens.next,state.tokens.next.value),advance(),exportedTokens.push(state.tokens.curr),\"as\"===state.tokens.next.value&&(advance(\"as\"),state.tokens.next.identifier||error(\"E030\",state.tokens.next,state.tokens.next.value),advance()),\",\"!==state.tokens.next.value){if(\"}\"===state.tokens.next.value){advance(\"}\");break}error(\"E024\",state.tokens.next,state.tokens.next.value);break}advance(\",\")}return\"from\"===state.tokens.next.value?(advance(\"from\"),advance(\"(string)\")):ok&&exportedTokens.forEach(function(token){state.funct[\"(scope)\"].setExported(token.value,token)}),this}if(\"var\"===state.tokens.next.id)advance(\"var\"),state.tokens.curr.fud({inexport:!0});else if(\"let\"===state.tokens.next.id)advance(\"let\"),state.tokens.curr.fud({inexport:!0});else if(\"const\"===state.tokens.next.id)advance(\"const\"),state.tokens.curr.fud({inexport:!0});else if(\"function\"===state.tokens.next.id)this.block=!0,advance(\"function\"),state.syntax[\"function\"].fud({inexport:!0});else if(\"class\"===state.tokens.next.id){this.block=!0,advance(\"class\");var classNameToken=state.tokens.next;state.syntax[\"class\"].fud(),state.funct[\"(scope)\"].setExported(classNameToken.value,classNameToken)}else error(\"E024\",state.tokens.next,state.tokens.next.value);return this}).exps=!0,FutureReservedWord(\"abstract\"),FutureReservedWord(\"boolean\"),FutureReservedWord(\"byte\"),FutureReservedWord(\"char\"),FutureReservedWord(\"class\",{es5:!0,nud:classdef}),FutureReservedWord(\"double\"),FutureReservedWord(\"enum\",{es5:!0}),FutureReservedWord(\"export\",{es5:!0}),FutureReservedWord(\"extends\",{es5:!0}),FutureReservedWord(\"final\"),FutureReservedWord(\"float\"),FutureReservedWord(\"goto\"),FutureReservedWord(\"implements\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"import\",{es5:!0}),FutureReservedWord(\"int\"),FutureReservedWord(\"interface\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"long\"),FutureReservedWord(\"native\"),FutureReservedWord(\"package\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"private\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"protected\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"public\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"short\"),FutureReservedWord(\"static\",{es5:!0,strictOnly:!0}),FutureReservedWord(\"super\",{es5:!0}),FutureReservedWord(\"synchronized\"),FutureReservedWord(\"transient\"),FutureReservedWord(\"volatile\");var lookupBlockType=function(){var pn,pn1,prev,i=-1,bracketStack=0,ret={};checkPunctuators(state.tokens.curr,[\"[\",\"{\"])&&(bracketStack+=1);do{if(prev=-1===i?state.tokens.curr:pn,pn=-1===i?state.tokens.next:peek(i),pn1=peek(i+1),i+=1,checkPunctuators(pn,[\"[\",\"{\"])?bracketStack+=1:checkPunctuators(pn,[\"]\",\"}\"])&&(bracketStack-=1),1===bracketStack&&pn.identifier&&\"for\"===pn.value&&!checkPunctuator(prev,\".\")){ret.isCompArray=!0,ret.notJson=!0;break}if(0===bracketStack&&checkPunctuators(pn,[\"}\",\"]\"])){if(\"=\"===pn1.value){ret.isDestAssign=!0,ret.notJson=!0;break}if(\".\"===pn1.value){ret.notJson=!0;break}}checkPunctuator(pn,\";\")&&(ret.isBlock=!0,ret.notJson=!0)}while(bracketStack>0&&\"(end)\"!==pn.id);return ret},arrayComprehension=function(){function declare(v){var l=_current.variables.filter(function(elt){return elt.value===v?(elt.undef=!1,v):void 0}).length;return 0!==l}function use(v){var l=_current.variables.filter(function(elt){return elt.value!==v||elt.undef?void 0:(elt.unused===!0&&(elt.unused=!1),v)}).length;return 0===l}var _current,CompArray=function(){this.mode=\"use\",this.variables=[]},_carrays=[];return{stack:function(){_current=new CompArray,_carrays.push(_current)},unstack:function(){_current.variables.filter(function(v){v.unused&&warning(\"W098\",v.token,v.raw_text||v.value),v.undef&&state.funct[\"(scope)\"].block.use(v.value,v.token)}),_carrays.splice(-1,1),_current=_carrays[_carrays.length-1]},setState:function(s){_.contains([\"use\",\"define\",\"generate\",\"filter\"],s)&&(_current.mode=s)},check:function(v){return _current?_current&&\"use\"===_current.mode?(use(v)&&_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!0,unused:!1}),!0):_current&&\"define\"===_current.mode?(declare(v)||_current.variables.push({funct:state.funct,token:state.tokens.curr,value:v,undef:!1,unused:!0}),!0):_current&&\"generate\"===_current.mode?(state.funct[\"(scope)\"].block.use(v,state.tokens.curr),!0):_current&&\"filter\"===_current.mode?(use(v)&&state.funct[\"(scope)\"].block.use(v,state.tokens.curr),!0):!1:void 0}}},escapeRegex=function(str){return str.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")},itself=function(s,o,g){function each(obj,cb){obj&&(Array.isArray(obj)||\"object\"!=typeof obj||(obj=Object.keys(obj)),obj.forEach(cb))}var i,k,x,reIgnoreStr,reIgnore,optionKeys,newOptionObj={},newIgnoredObj={};o=_.clone(o),state.reset(),o&&o.scope?JSHINT.scope=o.scope:(JSHINT.errors=[],JSHINT.undefs=[],JSHINT.internals=[],JSHINT.blacklist={},JSHINT.scope=\"(main)\"),predefined=Object.create(null),combine(predefined,vars.ecmaIdentifiers[3]),combine(predefined,vars.reservedVars),combine(predefined,g||{}),declared=Object.create(null);var exported=Object.create(null);if(o)for(each(o.predef||null,function(item){var slice,prop;\"-\"===item[0]?(slice=item.slice(1),JSHINT.blacklist[slice]=slice,delete predefined[slice]):(prop=Object.getOwnPropertyDescriptor(o.predef,item),predefined[item]=prop?prop.value:!1)}),each(o.exported||null,function(item){exported[item]=!0}),delete o.predef,delete o.exported,optionKeys=Object.keys(o),x=0;optionKeys.length>x;x++)if(/^-W\\d{3}$/g.test(optionKeys[x]))newIgnoredObj[optionKeys[x].slice(1)]=!0;else{var optionKey=optionKeys[x];newOptionObj[optionKey]=o[optionKey],(\"esversion\"===optionKey&&5===o[optionKey]||\"es5\"===optionKey&&o[optionKey])&&warning(\"I003\"),\"newcap\"===optionKeys[x]&&o[optionKey]===!1&&(newOptionObj[\"(explicitNewcap)\"]=!0)}state.option=newOptionObj,state.ignored=newIgnoredObj,state.option.indent=state.option.indent||4,state.option.maxerr=state.option.maxerr||50,indent=1;var scopeManagerInst=scopeManager(state,predefined,exported,declared);if(scopeManagerInst.on(\"warning\",function(ev){warning.apply(null,[ev.code,ev.token].concat(ev.data))}),scopeManagerInst.on(\"error\",function(ev){error.apply(null,[ev.code,ev.token].concat(ev.data))}),state.funct=functor(\"(global)\",null,{\"(global)\":!0,\"(scope)\":scopeManagerInst,\"(comparray)\":arrayComprehension(),\"(metrics)\":createMetrics(state.tokens.next)}),functions=[state.funct],urls=[],stack=null,member={},membersOnly=null,inblock=!1,lookahead=[],!isString(s)&&!Array.isArray(s))return errorAt(\"E004\",0),!1;api={get isJSON(){return state.jsonMode},getOption:function(name){return state.option[name]||null},getCache:function(name){return state.cache[name]},setCache:function(name,value){state.cache[name]=value},warn:function(code,data){warningAt.apply(null,[code,data.line,data.char].concat(data.data))},on:function(names,listener){names.split(\" \").forEach(function(name){emitter.on(name,listener)}.bind(this))}},emitter.removeAllListeners(),(extraModules||[]).forEach(function(func){func(api)}),state.tokens.prev=state.tokens.curr=state.tokens.next=state.syntax[\"(begin)\"],o&&o.ignoreDelimiters&&(Array.isArray(o.ignoreDelimiters)||(o.ignoreDelimiters=[o.ignoreDelimiters]),o.ignoreDelimiters.forEach(function(delimiterPair){delimiterPair.start&&delimiterPair.end&&(reIgnoreStr=escapeRegex(delimiterPair.start)+\"[\\\\s\\\\S]*?\"+escapeRegex(delimiterPair.end),reIgnore=RegExp(reIgnoreStr,\"ig\"),s=s.replace(reIgnore,function(match){return match.replace(/./g,\" \")}))})),lex=new Lexer(s),lex.on(\"warning\",function(ev){warningAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on(\"error\",function(ev){errorAt.apply(null,[ev.code,ev.line,ev.character].concat(ev.data))}),lex.on(\"fatal\",function(ev){quit(\"E041\",ev.line,ev.from)}),lex.on(\"Identifier\",function(ev){emitter.emit(\"Identifier\",ev)}),lex.on(\"String\",function(ev){emitter.emit(\"String\",ev)}),lex.on(\"Number\",function(ev){emitter.emit(\"Number\",ev)}),lex.start();for(var name in o)_.has(o,name)&&checkOption(name,state.tokens.curr);assume(),combine(predefined,g||{}),comma.first=!0;try{switch(advance(),state.tokens.next.id){case\"{\":case\"[\":destructuringAssignOrJsonValue();break;default:directives(),state.directive[\"use strict\"]&&\"global\"!==state.option.strict&&warning(\"W097\",state.tokens.prev),statements()}\"(end)\"!==state.tokens.next.id&&quit(\"E041\",state.tokens.curr.line),state.funct[\"(scope)\"].unstack()}catch(err){if(!err||\"JSHintError\"!==err.name)throw err;var nt=state.tokens.next||{};JSHINT.errors.push({scope:\"(main)\",raw:err.raw,code:err.code,reason:err.message,line:err.line||nt.line,character:err.character||nt.from},null)}if(\"(main)\"===JSHINT.scope)for(o=o||{},i=0;JSHINT.internals.length>i;i+=1)k=JSHINT.internals[i],o.scope=k.elem,itself(k.value,o,g);return 0===JSHINT.errors.length};return itself.addModule=function(func){extraModules.push(func)},itself.addModule(style.register),itself.data=function(){var fu,f,i,j,n,globals,data={functions:[],options:state.option};itself.errors.length&&(data.errors=itself.errors),state.jsonMode&&(data.json=!0);var impliedGlobals=state.funct[\"(scope)\"].getImpliedGlobals();for(impliedGlobals.length>0&&(data.implieds=impliedGlobals),urls.length>0&&(data.urls=urls),globals=state.funct[\"(scope)\"].getUsedOrDefinedGlobals(),globals.length>0&&(data.globals=globals),i=1;functions.length>i;i+=1){for(f=functions[i],fu={},j=0;functionicity.length>j;j+=1)fu[functionicity[j]]=[];for(j=0;functionicity.length>j;j+=1)0===fu[functionicity[j]].length&&delete fu[functionicity[j]];fu.name=f[\"(name)\"],fu.param=f[\"(params)\"],fu.line=f[\"(line)\"],fu.character=f[\"(character)\"],fu.last=f[\"(last)\"],fu.lastcharacter=f[\"(lastcharacter)\"],fu.metrics={complexity:f[\"(metrics)\"].ComplexityCount,parameters:f[\"(metrics)\"].arity,statements:f[\"(metrics)\"].statementCount},data.functions.push(fu)}var unuseds=state.funct[\"(scope)\"].getUnuseds();unuseds.length>0&&(data.unused=unuseds);for(n in member)if(\"number\"==typeof member[n]){data.member=member;break}return data},itself.jshint=itself,itself}();\"object\"==typeof exports&&exports&&(exports.JSHINT=JSHINT)},{\"../lodash\":\"/node_modules/jshint/lodash.js\",\"./lex.js\":\"/node_modules/jshint/src/lex.js\",\"./messages.js\":\"/node_modules/jshint/src/messages.js\",\"./options.js\":\"/node_modules/jshint/src/options.js\",\"./reg.js\":\"/node_modules/jshint/src/reg.js\",\"./scope-manager.js\":\"/node_modules/jshint/src/scope-manager.js\",\"./state.js\":\"/node_modules/jshint/src/state.js\",\"./style.js\":\"/node_modules/jshint/src/style.js\",\"./vars.js\":\"/node_modules/jshint/src/vars.js\",events:\"/node_modules/browserify/node_modules/events/events.js\"}],\"/node_modules/jshint/src/lex.js\":[function(_dereq_,module,exports){\"use strict\";function asyncTrigger(){var _checks=[];return{push:function(fn){_checks.push(fn)},check:function(){for(var check=0;_checks.length>check;++check)_checks[check]();_checks.splice(0,_checks.length)}}}function Lexer(source){var lines=source;\"string\"==typeof lines&&(lines=lines.replace(/\\r\\n/g,\"\\n\").replace(/\\r/g,\"\\n\").split(\"\\n\")),lines[0]&&\"#!\"===lines[0].substr(0,2)&&(-1!==lines[0].indexOf(\"node\")&&(state.option.node=!0),lines[0]=\"\"),this.emitter=new events.EventEmitter,this.source=source,this.setLines(lines),this.prereg=!0,this.line=0,this.char=1,this.from=1,this.input=\"\",this.inComment=!1,this.context=[],this.templateStarts=[];for(var i=0;state.option.indent>i;i+=1)state.tab+=\" \";this.ignoreLinterErrors=!1}var _=_dereq_(\"../lodash\"),events=_dereq_(\"events\"),reg=_dereq_(\"./reg.js\"),state=_dereq_(\"./state.js\").state,unicodeData=_dereq_(\"../data/ascii-identifier-data.js\"),asciiIdentifierStartTable=unicodeData.asciiIdentifierStartTable,asciiIdentifierPartTable=unicodeData.asciiIdentifierPartTable,Token={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,NullLiteral:7,BooleanLiteral:8,RegExp:9,TemplateHead:10,TemplateMiddle:11,TemplateTail:12,NoSubstTemplate:13},Context={Block:1,Template:2};Lexer.prototype={_lines:[],inContext:function(ctxType){return this.context.length>0&&this.context[this.context.length-1].type===ctxType},pushContext:function(ctxType){this.context.push({type:ctxType})},popContext:function(){return this.context.pop()},isContext:function(context){return this.context.length>0&&this.context[this.context.length-1]===context},currentContext:function(){return this.context.length>0&&this.context[this.context.length-1]},getLines:function(){return this._lines=state.lines,this._lines},setLines:function(val){this._lines=val,state.lines=this._lines},peek:function(i){return this.input.charAt(i||0)},skip:function(i){i=i||1,this.char+=i,this.input=this.input.slice(i)},on:function(names,listener){names.split(\" \").forEach(function(name){this.emitter.on(name,listener)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(type,args,checks,fn){checks.push(function(){fn()&&this.trigger(type,args)}.bind(this))},scanPunctuator:function(){var ch2,ch3,ch4,ch1=this.peek();switch(ch1){case\".\":if(/^[0-9]$/.test(this.peek(1)))return null;if(\".\"===this.peek(1)&&\".\"===this.peek(2))return{type:Token.Punctuator,value:\"...\"};case\"(\":case\")\":case\";\":case\",\":case\"[\":case\"]\":case\":\":case\"~\":case\"?\":return{type:Token.Punctuator,value:ch1};case\"{\":return this.pushContext(Context.Block),{type:Token.Punctuator,value:ch1};case\"}\":return this.inContext(Context.Block)&&this.popContext(),{type:Token.Punctuator,value:ch1};case\"#\":return{type:Token.Punctuator,value:ch1};case\"\":return null}return ch2=this.peek(1),ch3=this.peek(2),ch4=this.peek(3),\">\"===ch1&&\">\"===ch2&&\">\"===ch3&&\"=\"===ch4?{type:Token.Punctuator,value:\">>>=\"}:\"=\"===ch1&&\"=\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\"===\"}:\"!\"===ch1&&\"=\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\"!==\"}:\">\"===ch1&&\">\"===ch2&&\">\"===ch3?{type:Token.Punctuator,value:\">>>\"}:\"<\"===ch1&&\"<\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\"<<=\"}:\">\"===ch1&&\">\"===ch2&&\"=\"===ch3?{type:Token.Punctuator,value:\">>=\"}:\"=\"===ch1&&\">\"===ch2?{type:Token.Punctuator,value:ch1+ch2}:ch1===ch2&&\"+-<>&|\".indexOf(ch1)>=0?{type:Token.Punctuator,value:ch1+ch2}:\"<>=!+-*%&|^\".indexOf(ch1)>=0?\"=\"===ch2?{type:Token.Punctuator,value:ch1+ch2}:{type:Token.Punctuator,value:ch1}:\"/\"===ch1?\"=\"===ch2?{type:Token.Punctuator,value:\"/=\"}:{type:Token.Punctuator,value:\"/\"}:null},scanComments:function(){function commentToken(label,body,opt){var special=[\"jshint\",\"jslint\",\"members\",\"member\",\"globals\",\"global\",\"exported\"],isSpecial=!1,value=label+body,commentType=\"plain\";return opt=opt||{},opt.isMultiline&&(value+=\"*/\"),body=body.replace(/\\n/g,\" \"),\"/*\"===label&®.fallsThrough.test(body)&&(isSpecial=!0,commentType=\"falls through\"),special.forEach(function(str){if(!isSpecial&&(\"//\"!==label||\"jshint\"===str)&&(\" \"===body.charAt(str.length)&&body.substr(0,str.length)===str&&(isSpecial=!0,label+=str,body=body.substr(str.length)),isSpecial||\" \"!==body.charAt(0)||\" \"!==body.charAt(str.length+1)||body.substr(1,str.length)!==str||(isSpecial=!0,label=label+\" \"+str,body=body.substr(str.length+1)),isSpecial))switch(str){case\"member\":commentType=\"members\";break;case\"global\":commentType=\"globals\";break;default:var options=body.split(\":\").map(function(v){return v.replace(/^\\s+/,\"\").replace(/\\s+$/,\"\")});if(2===options.length)switch(options[0]){case\"ignore\":switch(options[1]){case\"start\":self.ignoringLinterErrors=!0,isSpecial=!1;break;case\"end\":self.ignoringLinterErrors=!1,isSpecial=!1}}commentType=str}}),{type:Token.Comment,commentType:commentType,value:value,body:body,isSpecial:isSpecial,isMultiline:opt.isMultiline||!1,isMalformed:opt.isMalformed||!1}}var ch1=this.peek(),ch2=this.peek(1),rest=this.input.substr(2),startLine=this.line,startChar=this.char,self=this;if(\"*\"===ch1&&\"/\"===ch2)return this.trigger(\"error\",{code:\"E018\",line:startLine,character:startChar}),this.skip(2),null;if(\"/\"!==ch1||\"*\"!==ch2&&\"/\"!==ch2)return null;if(\"/\"===ch2)return this.skip(this.input.length),commentToken(\"//\",rest);var body=\"\";if(\"*\"===ch2){for(this.inComment=!0,this.skip(2);\"*\"!==this.peek()||\"/\"!==this.peek(1);)if(\"\"===this.peek()){if(body+=\"\\n\",!this.nextLine())return this.trigger(\"error\",{code:\"E017\",line:startLine,character:startChar}),this.inComment=!1,commentToken(\"/*\",body,{isMultiline:!0,isMalformed:!0})}else body+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,commentToken(\"/*\",body,{isMultiline:!0})}},scanKeyword:function(){var result=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),keywords=[\"if\",\"in\",\"do\",\"var\",\"for\",\"new\",\"try\",\"let\",\"this\",\"else\",\"case\",\"void\",\"with\",\"enum\",\"while\",\"break\",\"catch\",\"throw\",\"const\",\"yield\",\"class\",\"super\",\"return\",\"typeof\",\"delete\",\"switch\",\"export\",\"import\",\"default\",\"finally\",\"extends\",\"function\",\"continue\",\"debugger\",\"instanceof\"];return result&&keywords.indexOf(result[0])>=0?{type:Token.Keyword,value:result[0]}:null},scanIdentifier:function(){function isNonAsciiIdentifierStart(code){return code>256}function isNonAsciiIdentifierPart(code){return code>256}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function removeEscapeSequences(id){return id.replace(/\\\\u([0-9a-fA-F]{4})/g,function(m0,codepoint){return String.fromCharCode(parseInt(codepoint,16))})}var type,char,id=\"\",index=0,readUnicodeEscapeSequence=function(){if(index+=1,\"u\"!==this.peek(index))return null;var code,ch1=this.peek(index+1),ch2=this.peek(index+2),ch3=this.peek(index+3),ch4=this.peek(index+4);return isHexDigit(ch1)&&isHexDigit(ch2)&&isHexDigit(ch3)&&isHexDigit(ch4)?(code=parseInt(ch1+ch2+ch3+ch4,16),asciiIdentifierPartTable[code]||isNonAsciiIdentifierPart(code)?(index+=5,\"\\\\u\"+ch1+ch2+ch3+ch4):null):null}.bind(this),getIdentifierStart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierStartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierStart(code)?(index+=1,chr):null}.bind(this),getIdentifierPart=function(){var chr=this.peek(index),code=chr.charCodeAt(0);return 92===code?readUnicodeEscapeSequence():128>code?asciiIdentifierPartTable[code]?(index+=1,chr):null:isNonAsciiIdentifierPart(code)?(index+=1,chr):null}.bind(this);if(char=getIdentifierStart(),null===char)return null;for(id=char;char=getIdentifierPart(),null!==char;)id+=char;switch(id){case\"true\":case\"false\":type=Token.BooleanLiteral;break;case\"null\":type=Token.NullLiteral;break;default:type=Token.Identifier}return{type:type,value:removeEscapeSequences(id),text:id,tokenLength:id.length}},scanNumericLiteral:function(){function isDecimalDigit(str){return/^[0-9]$/.test(str)}function isOctalDigit(str){return/^[0-7]$/.test(str)}function isBinaryDigit(str){return/^[01]$/.test(str)}function isHexDigit(str){return/^[0-9a-fA-F]$/.test(str)}function isIdentifierStart(ch){return\"$\"===ch||\"_\"===ch||\"\\\\\"===ch||ch>=\"a\"&&\"z\">=ch||ch>=\"A\"&&\"Z\">=ch}var bad,index=0,value=\"\",length=this.input.length,char=this.peek(index),isAllowedDigit=isDecimalDigit,base=10,isLegacy=!1;if(\".\"!==char&&!isDecimalDigit(char))return null;if(\".\"!==char){for(value=this.peek(index),index+=1,char=this.peek(index),\"0\"===value&&((\"x\"===char||\"X\"===char)&&(isAllowedDigit=isHexDigit,base=16,index+=1,value+=char),(\"o\"===char||\"O\"===char)&&(isAllowedDigit=isOctalDigit,base=8,state.inES6(!0)||this.trigger(\"warning\",{code:\"W119\",line:this.line,character:this.char,data:[\"Octal integer literal\",\"6\"]}),index+=1,value+=char),(\"b\"===char||\"B\"===char)&&(isAllowedDigit=isBinaryDigit,base=2,state.inES6(!0)||this.trigger(\"warning\",{code:\"W119\",line:this.line,character:this.char,data:[\"Binary integer literal\",\"6\"]}),index+=1,value+=char),isOctalDigit(char)&&(isAllowedDigit=isOctalDigit,base=8,isLegacy=!0,bad=!1,index+=1,value+=char),!isOctalDigit(char)&&isDecimalDigit(char)&&(index+=1,value+=char));length>index;){if(char=this.peek(index),isLegacy&&isDecimalDigit(char))bad=!0;else if(!isAllowedDigit(char))break;value+=char,index+=1}if(isAllowedDigit!==isDecimalDigit)return!isLegacy&&2>=value.length?{type:Token.NumericLiteral,value:value,isMalformed:!0}:length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isLegacy:isLegacy,isMalformed:!1}}if(\".\"===char)for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1;if(\"e\"===char||\"E\"===char){if(value+=char,index+=1,char=this.peek(index),(\"+\"===char||\"-\"===char)&&(value+=this.peek(index),index+=1),char=this.peek(index),!isDecimalDigit(char))return null;for(value+=char,index+=1;length>index&&(char=this.peek(index),isDecimalDigit(char));)value+=char,index+=1}return length>index&&(char=this.peek(index),isIdentifierStart(char))?null:{type:Token.NumericLiteral,value:value,base:base,isMalformed:!isFinite(value)}},scanEscapeSequence:function(checks){var allowNewLine=!1,jump=1;this.skip();var char=this.peek();switch(char){case\"'\":this.triggerAsync(\"warning\",{code:\"W114\",line:this.line,character:this.char,data:[\"\\\\'\"]},checks,function(){return state.jsonMode});break;case\"b\":char=\"\\\\b\";break;case\"f\":char=\"\\\\f\";break;case\"n\":char=\"\\\\n\";break;case\"r\":char=\"\\\\r\";break;case\"t\":char=\"\\\\t\";break;case\"0\":char=\"\\\\0\";var n=parseInt(this.peek(1),10);this.triggerAsync(\"warning\",{code:\"W115\",line:this.line,character:this.char},checks,function(){return n>=0&&7>=n&&state.isStrict()});break;case\"u\":var hexCode=this.input.substr(1,4),code=parseInt(hexCode,16);isNaN(code)&&this.trigger(\"warning\",{code:\"W052\",line:this.line,character:this.char,data:[\"u\"+hexCode]}),char=String.fromCharCode(code),jump=5;break;case\"v\":this.triggerAsync(\"warning\",{code:\"W114\",line:this.line,character:this.char,data:[\"\\\\v\"]},checks,function(){return state.jsonMode}),char=\"\u000b\";break;case\"x\":var x=parseInt(this.input.substr(1,2),16);this.triggerAsync(\"warning\",{code:\"W114\",line:this.line,character:this.char,data:[\"\\\\x-\"]},checks,function(){return state.jsonMode}),char=String.fromCharCode(x),jump=3;break;case\"\\\\\":char=\"\\\\\\\\\";break;case'\"':char='\\\\\"';break;case\"/\":break;case\"\":allowNewLine=!0,char=\"\"}return{\"char\":char,jump:jump,allowNewLine:allowNewLine}},scanTemplateLiteral:function(checks){var tokenType,ch,value=\"\",startLine=this.line,startChar=this.char,depth=this.templateStarts.length;if(!state.inES6(!0))return null;if(\"`\"===this.peek())tokenType=Token.TemplateHead,this.templateStarts.push({line:this.line,\"char\":this.char}),depth=this.templateStarts.length,this.skip(1),this.pushContext(Context.Template);else{if(!this.inContext(Context.Template)||\"}\"!==this.peek())return null;tokenType=Token.TemplateMiddle}for(;\"`\"!==this.peek();){for(;\"\"===(ch=this.peek());)if(value+=\"\\n\",!this.nextLine()){var startPos=this.templateStarts.pop();return this.trigger(\"error\",{code:\"E052\",line:startPos.line,character:startPos.char}),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,depth:depth,context:this.popContext()}}if(\"$\"===ch&&\"{\"===this.peek(1))return value+=\"${\",this.skip(2),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.currentContext()};\nif(\"\\\\\"===ch){var escape=this.scanEscapeSequence(checks);value+=escape.char,this.skip(escape.jump)}else\"`\"!==ch&&(value+=ch,this.skip(1))}return tokenType=tokenType===Token.TemplateHead?Token.NoSubstTemplate:Token.TemplateTail,this.skip(1),this.templateStarts.pop(),{type:tokenType,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,depth:depth,context:this.popContext()}},scanStringLiteral:function(checks){var quote=this.peek();if('\"'!==quote&&\"'\"!==quote)return null;this.triggerAsync(\"warning\",{code:\"W108\",line:this.line,character:this.char},checks,function(){return state.jsonMode&&'\"'!==quote});var value=\"\",startLine=this.line,startChar=this.char,allowNewLine=!1;for(this.skip();this.peek()!==quote;)if(\"\"===this.peek()){if(allowNewLine?(allowNewLine=!1,this.triggerAsync(\"warning\",{code:\"W043\",line:this.line,character:this.char},checks,function(){return!state.option.multistr}),this.triggerAsync(\"warning\",{code:\"W042\",line:this.line,character:this.char},checks,function(){return state.jsonMode&&state.option.multistr})):this.trigger(\"warning\",{code:\"W112\",line:this.line,character:this.char}),!this.nextLine())return this.trigger(\"error\",{code:\"E029\",line:startLine,character:startChar}),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!0,quote:quote}}else{allowNewLine=!1;var char=this.peek(),jump=1;if(\" \">char&&this.trigger(\"warning\",{code:\"W113\",line:this.line,character:this.char,data:[\"\"]}),\"\\\\\"===char){var parsed=this.scanEscapeSequence(checks);char=parsed.char,jump=parsed.jump,allowNewLine=parsed.allowNewLine}value+=char,this.skip(jump)}return this.skip(),{type:Token.StringLiteral,value:value,startLine:startLine,startChar:startChar,isUnclosed:!1,quote:quote}},scanRegExp:function(){var terminated,index=0,length=this.input.length,char=this.peek(),value=char,body=\"\",flags=[],malformed=!1,isCharSet=!1,scanUnexpectedChars=function(){\" \">char&&(malformed=!0,this.trigger(\"warning\",{code:\"W048\",line:this.line,character:this.char})),\"<\"===char&&(malformed=!0,this.trigger(\"warning\",{code:\"W049\",line:this.line,character:this.char,data:[char]}))}.bind(this);if(!this.prereg||\"/\"!==char)return null;for(index+=1,terminated=!1;length>index;)if(char=this.peek(index),value+=char,body+=char,isCharSet)\"]\"===char&&(\"\\\\\"!==this.peek(index-1)||\"\\\\\"===this.peek(index-2))&&(isCharSet=!1),\"\\\\\"===char&&(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars()),index+=1;else{if(\"\\\\\"===char){if(index+=1,char=this.peek(index),body+=char,value+=char,scanUnexpectedChars(),\"/\"===char){index+=1;continue}if(\"[\"===char){index+=1;continue}}if(\"[\"!==char){if(\"/\"===char){body=body.substr(0,body.length-1),terminated=!0,index+=1;break}index+=1}else isCharSet=!0,index+=1}if(!terminated)return this.trigger(\"error\",{code:\"E015\",line:this.line,character:this.from}),void this.trigger(\"fatal\",{line:this.line,from:this.from});for(;length>index&&(char=this.peek(index),/[gim]/.test(char));)flags.push(char),value+=char,index+=1;try{RegExp(body,flags.join(\"\"))}catch(err){malformed=!0,this.trigger(\"error\",{code:\"E016\",line:this.line,character:this.char,data:[err.message]})}return{type:Token.RegExp,value:value,flags:flags,isMalformed:malformed}},scanNonBreakingSpaces:function(){return state.option.nonbsp?this.input.search(/(\\u00A0)/):-1},scanUnsafeChars:function(){return this.input.search(reg.unsafeChars)},next:function(checks){this.from=this.char;var start;if(/\\s/.test(this.peek()))for(start=this.char;/\\s/.test(this.peek());)this.from+=1,this.skip();var match=this.scanComments()||this.scanStringLiteral(checks)||this.scanTemplateLiteral(checks);return match?match:(match=this.scanRegExp()||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(),match?(this.skip(match.tokenLength||match.value.length),match):null)},nextLine:function(){var char;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var inputTrimmed=this.input.trim(),startsWith=function(){return _.some(arguments,function(prefix){return 0===inputTrimmed.indexOf(prefix)})},endsWith=function(){return _.some(arguments,function(suffix){return-1!==inputTrimmed.indexOf(suffix,inputTrimmed.length-suffix.length)})};if(this.ignoringLinterErrors===!0&&(startsWith(\"/*\",\"//\")||this.inComment&&endsWith(\"*/\")||(this.input=\"\")),char=this.scanNonBreakingSpaces(),char>=0&&this.trigger(\"warning\",{code:\"W125\",line:this.line,character:char+1}),this.input=this.input.replace(/\\t/g,state.tab),char=this.scanUnsafeChars(),char>=0&&this.trigger(\"warning\",{code:\"W100\",line:this.line,character:char}),!this.ignoringLinterErrors&&state.option.maxlen&&state.option.maxlen=0;--i){var scopeLabels=_scopeStack[i][\"(labels)\"];if(scopeLabels[labelName])return scopeLabels}}function usedSoFarInCurrentFunction(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current[\"(usages)\"][labelName])return current[\"(usages)\"][labelName];if(current===_currentFunctBody)break}return!1}function _checkOuterShadow(labelName,token){if(\"outer\"===state.option.shadow)for(var isGlobal=\"global\"===_currentFunctBody[\"(type)\"],isNewFunction=\"functionparams\"===_current[\"(type)\"],outsideCurrentFunction=!isGlobal,i=0;_scopeStack.length>i;i++){var stackItem=_scopeStack[i];isNewFunction||_scopeStack[i+1]!==_currentFunctBody||(outsideCurrentFunction=!1),outsideCurrentFunction&&stackItem[\"(labels)\"][labelName]&&warning(\"W123\",token,labelName),stackItem[\"(breakLabels)\"][labelName]&&warning(\"W123\",token,labelName)}}function _latedefWarning(type,labelName,token){state.option.latedef&&(state.option.latedef===!0&&\"function\"===type||\"function\"!==type)&&warning(\"W003\",token,labelName)}var _current,_scopeStack=[];_newScope(\"global\"),_current[\"(predefined)\"]=predefined;var _currentFunctBody=_current,usedPredefinedAndGlobals=Object.create(null),impliedGlobals=Object.create(null),unuseds=[],emitter=new events.EventEmitter,_getUnusedOption=function(unused_opt){return void 0===unused_opt&&(unused_opt=state.option.unused),unused_opt===!0&&(unused_opt=\"last-param\"),unused_opt},_warnUnused=function(name,tkn,type,unused_opt){var line=tkn.line,chr=tkn.from,raw_name=tkn.raw_text||name;unused_opt=_getUnusedOption(unused_opt);var warnable_types={vars:[\"var\"],\"last-param\":[\"var\",\"param\"],strict:[\"var\",\"param\",\"last-param\"]};unused_opt&&warnable_types[unused_opt]&&-1!==warnable_types[unused_opt].indexOf(type)&&warning(\"W098\",{line:line,from:chr},raw_name),(unused_opt||\"var\"===type)&&unuseds.push({name:name,line:line,character:chr})},scopeManagerInst={on:function(names,listener){names.split(\" \").forEach(function(name){emitter.on(name,listener)})},isPredefined:function(labelName){return!this.has(labelName)&&_.has(_scopeStack[0][\"(predefined)\"],labelName)},stack:function(type){var previousScope=_current;_newScope(type),type||\"functionparams\"!==previousScope[\"(type)\"]||(_current[\"(isFuncBody)\"]=!0,_current[\"(context)\"]=_currentFunctBody,_currentFunctBody=_current)},unstack:function(){var i,j,subScope=_scopeStack.length>1?_scopeStack[_scopeStack.length-2]:null,isUnstackingFunctionBody=_current===_currentFunctBody,isUnstackingFunctionParams=\"functionparams\"===_current[\"(type)\"],isUnstackingFunctionOuter=\"functionouter\"===_current[\"(type)\"],currentUsages=_current[\"(usages)\"],currentLabels=_current[\"(labels)\"],usedLabelNameList=Object.keys(currentUsages);for(currentUsages.__proto__&&-1===usedLabelNameList.indexOf(\"__proto__\")&&usedLabelNameList.push(\"__proto__\"),i=0;usedLabelNameList.length>i;i++){var usedLabelName=usedLabelNameList[i],usage=currentUsages[usedLabelName],usedLabel=currentLabels[usedLabelName];if(usedLabel){var usedLabelType=usedLabel[\"(type)\"];if(usedLabel[\"(useOutsideOfScope)\"]&&!state.option.funcscope){var usedTokens=usage[\"(tokens)\"];if(usedTokens)for(j=0;usedTokens.length>j;j++)usedLabel[\"(function)\"]===usedTokens[j][\"(function)\"]&&error(\"W038\",usedTokens[j],usedLabelName)}if(_current[\"(labels)\"][usedLabelName][\"(unused)\"]=!1,\"const\"===usedLabelType&&usage[\"(modified)\"])for(j=0;usage[\"(modified)\"].length>j;j++)error(\"E013\",usage[\"(modified)\"][j],usedLabelName);if((\"function\"===usedLabelType||\"class\"===usedLabelType)&&usage[\"(reassigned)\"])for(j=0;usage[\"(reassigned)\"].length>j;j++)error(\"W021\",usage[\"(reassigned)\"][j],usedLabelName,usedLabelType)}else if(isUnstackingFunctionOuter&&(state.funct[\"(isCapturing)\"]=!0),subScope)if(subScope[\"(usages)\"][usedLabelName]){var subScopeUsage=subScope[\"(usages)\"][usedLabelName];subScopeUsage[\"(modified)\"]=subScopeUsage[\"(modified)\"].concat(usage[\"(modified)\"]),subScopeUsage[\"(tokens)\"]=subScopeUsage[\"(tokens)\"].concat(usage[\"(tokens)\"]),subScopeUsage[\"(reassigned)\"]=subScopeUsage[\"(reassigned)\"].concat(usage[\"(reassigned)\"]),subScopeUsage[\"(onlyUsedSubFunction)\"]=!1}else subScope[\"(usages)\"][usedLabelName]=usage,isUnstackingFunctionBody&&(subScope[\"(usages)\"][usedLabelName][\"(onlyUsedSubFunction)\"]=!0);else if(\"boolean\"==typeof _current[\"(predefined)\"][usedLabelName]){if(delete declared[usedLabelName],usedPredefinedAndGlobals[usedLabelName]=marker,_current[\"(predefined)\"][usedLabelName]===!1&&usage[\"(reassigned)\"])for(j=0;usage[\"(reassigned)\"].length>j;j++)warning(\"W020\",usage[\"(reassigned)\"][j])}else if(usage[\"(tokens)\"])for(j=0;usage[\"(tokens)\"].length>j;j++){var undefinedToken=usage[\"(tokens)\"][j];undefinedToken.forgiveUndef||(state.option.undef&&!undefinedToken.ignoreUndef&&warning(\"W117\",undefinedToken,usedLabelName),impliedGlobals[usedLabelName]?impliedGlobals[usedLabelName].line.push(undefinedToken.line):impliedGlobals[usedLabelName]={name:usedLabelName,line:[undefinedToken.line]})}}if(subScope||Object.keys(declared).forEach(function(labelNotUsed){_warnUnused(labelNotUsed,declared[labelNotUsed],\"var\")}),subScope&&!isUnstackingFunctionBody&&!isUnstackingFunctionParams&&!isUnstackingFunctionOuter){var labelNames=Object.keys(currentLabels);for(i=0;labelNames.length>i;i++){var defLabelName=labelNames[i];currentLabels[defLabelName][\"(blockscoped)\"]||\"exception\"===currentLabels[defLabelName][\"(type)\"]||this.funct.has(defLabelName,{excludeCurrent:!0})||(subScope[\"(labels)\"][defLabelName]=currentLabels[defLabelName],\"global\"!==_currentFunctBody[\"(type)\"]&&(subScope[\"(labels)\"][defLabelName][\"(useOutsideOfScope)\"]=!0),delete currentLabels[defLabelName])}}_checkForUnused(),_scopeStack.pop(),isUnstackingFunctionBody&&(_currentFunctBody=_scopeStack[_.findLastIndex(_scopeStack,function(scope){return scope[\"(isFuncBody)\"]||\"global\"===scope[\"(type)\"]})]),_current=subScope},addParam:function(labelName,token,type){if(type=type||\"param\",\"exception\"===type){var previouslyDefinedLabelType=this.funct.labeltype(labelName);previouslyDefinedLabelType&&\"exception\"!==previouslyDefinedLabelType&&(state.option.node||warning(\"W002\",state.tokens.next,labelName))}if(_.has(_current[\"(labels)\"],labelName)?_current[\"(labels)\"][labelName].duplicated=!0:(_checkOuterShadow(labelName,token,type),_current[\"(labels)\"][labelName]={\"(type)\":type,\"(token)\":token,\"(unused)\":!0},_current[\"(params)\"].push(labelName)),_.has(_current[\"(usages)\"],labelName)){var usage=_current[\"(usages)\"][labelName];usage[\"(onlyUsedSubFunction)\"]?_latedefWarning(type,labelName,token):warning(\"E056\",token,labelName,type)}},validateParams:function(){if(\"global\"!==_currentFunctBody[\"(type)\"]){var isStrict=state.isStrict(),currentFunctParamScope=_currentFunctBody[\"(parent)\"];currentFunctParamScope[\"(params)\"]&¤tFunctParamScope[\"(params)\"].forEach(function(labelName){var label=currentFunctParamScope[\"(labels)\"][labelName];label&&label.duplicated&&(isStrict?warning(\"E011\",label[\"(token)\"],labelName):state.option.shadow!==!0&&warning(\"W004\",label[\"(token)\"],labelName))})}},getUsedOrDefinedGlobals:function(){var list=Object.keys(usedPredefinedAndGlobals);return usedPredefinedAndGlobals.__proto__===marker&&-1===list.indexOf(\"__proto__\")&&list.push(\"__proto__\"),list},getImpliedGlobals:function(){var values=_.values(impliedGlobals),hasProto=!1;return impliedGlobals.__proto__&&(hasProto=values.some(function(value){return\"__proto__\"===value.name}),hasProto||values.push(impliedGlobals.__proto__)),values},getUnuseds:function(){return unuseds},has:function(labelName){return Boolean(_getLabel(labelName))},labeltype:function(labelName){var scopeLabels=_getLabel(labelName);return scopeLabels?scopeLabels[labelName][\"(type)\"]:null},addExported:function(labelName){var globalLabels=_scopeStack[0][\"(labels)\"];if(_.has(declared,labelName))delete declared[labelName];else if(_.has(globalLabels,labelName))globalLabels[labelName][\"(unused)\"]=!1;else{for(var i=1;_scopeStack.length>i;i++){var scope=_scopeStack[i];if(scope[\"(type)\"])break;if(_.has(scope[\"(labels)\"],labelName)&&!scope[\"(labels)\"][labelName][\"(blockscoped)\"])return scope[\"(labels)\"][labelName][\"(unused)\"]=!1,void 0}exported[labelName]=!0}},setExported:function(labelName,token){this.block.use(labelName,token)\n},addlabel:function(labelName,opts){var type=opts.type,token=opts.token,isblockscoped=\"let\"===type||\"const\"===type||\"class\"===type,isexported=\"global\"===(isblockscoped?_current:_currentFunctBody)[\"(type)\"]&&_.has(exported,labelName);if(_checkOuterShadow(labelName,token,type),isblockscoped){var declaredInCurrentScope=_current[\"(labels)\"][labelName];if(declaredInCurrentScope||_current!==_currentFunctBody||\"global\"===_current[\"(type)\"]||(declaredInCurrentScope=!!_currentFunctBody[\"(parent)\"][\"(labels)\"][labelName]),!declaredInCurrentScope&&_current[\"(usages)\"][labelName]){var usage=_current[\"(usages)\"][labelName];usage[\"(onlyUsedSubFunction)\"]?_latedefWarning(type,labelName,token):warning(\"E056\",token,labelName,type)}declaredInCurrentScope?warning(\"E011\",token,labelName):\"outer\"===state.option.shadow&&scopeManagerInst.funct.has(labelName)&&warning(\"W004\",token,labelName),scopeManagerInst.block.add(labelName,type,token,!isexported)}else{var declaredInCurrentFunctionScope=scopeManagerInst.funct.has(labelName);!declaredInCurrentFunctionScope&&usedSoFarInCurrentFunction(labelName)&&_latedefWarning(type,labelName,token),scopeManagerInst.funct.has(labelName,{onlyBlockscoped:!0})?warning(\"E011\",token,labelName):state.option.shadow!==!0&&declaredInCurrentFunctionScope&&\"__proto__\"!==labelName&&\"global\"!==_currentFunctBody[\"(type)\"]&&warning(\"W004\",token,labelName),scopeManagerInst.funct.add(labelName,type,token,!isexported),\"global\"===_currentFunctBody[\"(type)\"]&&(usedPredefinedAndGlobals[labelName]=marker)}},funct:{labeltype:function(labelName,options){for(var onlyBlockscoped=options&&options.onlyBlockscoped,excludeParams=options&&options.excludeParams,currentScopeIndex=_scopeStack.length-(options&&options.excludeCurrent?2:1),i=currentScopeIndex;i>=0;i--){var current=_scopeStack[i];if(current[\"(labels)\"][labelName]&&(!onlyBlockscoped||current[\"(labels)\"][labelName][\"(blockscoped)\"]))return current[\"(labels)\"][labelName][\"(type)\"];var scopeCheck=excludeParams?_scopeStack[i-1]:current;if(scopeCheck&&\"functionparams\"===scopeCheck[\"(type)\"])return null}return null},hasBreakLabel:function(labelName){for(var i=_scopeStack.length-1;i>=0;i--){var current=_scopeStack[i];if(current[\"(breakLabels)\"][labelName])return!0;if(\"functionparams\"===current[\"(type)\"])return!1}return!1},has:function(labelName,options){return Boolean(this.labeltype(labelName,options))},add:function(labelName,type,tok,unused){_current[\"(labels)\"][labelName]={\"(type)\":type,\"(token)\":tok,\"(blockscoped)\":!1,\"(function)\":_currentFunctBody,\"(unused)\":unused}}},block:{isGlobal:function(){return\"global\"===_current[\"(type)\"]},use:function(labelName,token){var paramScope=_currentFunctBody[\"(parent)\"];paramScope&¶mScope[\"(labels)\"][labelName]&&\"param\"===paramScope[\"(labels)\"][labelName][\"(type)\"]&&(scopeManagerInst.funct.has(labelName,{excludeParams:!0,onlyBlockscoped:!0})||(paramScope[\"(labels)\"][labelName][\"(unused)\"]=!1)),token&&(state.ignored.W117||state.option.undef===!1)&&(token.ignoreUndef=!0),_setupUsages(labelName),token&&(token[\"(function)\"]=_currentFunctBody,_current[\"(usages)\"][labelName][\"(tokens)\"].push(token))},reassign:function(labelName,token){this.modify(labelName,token),_current[\"(usages)\"][labelName][\"(reassigned)\"].push(token)},modify:function(labelName,token){_setupUsages(labelName),_current[\"(usages)\"][labelName][\"(modified)\"].push(token)},add:function(labelName,type,tok,unused){_current[\"(labels)\"][labelName]={\"(type)\":type,\"(token)\":tok,\"(blockscoped)\":!0,\"(unused)\":unused}},addBreakLabel:function(labelName,opts){var token=opts.token;scopeManagerInst.funct.hasBreakLabel(labelName)?warning(\"E011\",token,labelName):\"outer\"===state.option.shadow&&(scopeManagerInst.funct.has(labelName)?warning(\"W004\",token,labelName):_checkOuterShadow(labelName,token)),_current[\"(breakLabels)\"][labelName]=token}}};return scopeManagerInst};module.exports=scopeManager},{\"../lodash\":\"/node_modules/jshint/lodash.js\",events:\"/node_modules/browserify/node_modules/events/events.js\"}],\"/node_modules/jshint/src/state.js\":[function(_dereq_,module,exports){\"use strict\";var NameStack=_dereq_(\"./name-stack.js\"),state={syntax:{},isStrict:function(){return this.directive[\"use strict\"]||this.inClassBody||this.option.module||\"implied\"===this.option.strict},inMoz:function(){return this.option.moz},inES6:function(){return this.option.moz||this.option.esversion>=6},inES5:function(strict){return strict?!(this.option.esversion&&5!==this.option.esversion||this.option.moz):!this.option.esversion||this.option.esversion>=5||this.option.moz},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.funct=null,this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab=\"\",this.cache={},this.ignoredLines={},this.forinifcheckneeded=!1,this.nameStack=new NameStack,this.inClassBody=!1}};exports.state=state},{\"./name-stack.js\":\"/node_modules/jshint/src/name-stack.js\"}],\"/node_modules/jshint/src/style.js\":[function(_dereq_,module,exports){\"use strict\";exports.register=function(linter){linter.on(\"Identifier\",function(data){linter.getOption(\"proto\")||\"__proto__\"===data.name&&linter.warn(\"W103\",{line:data.line,\"char\":data.char,data:[data.name,\"6\"]})}),linter.on(\"Identifier\",function(data){linter.getOption(\"iterator\")||\"__iterator__\"===data.name&&linter.warn(\"W103\",{line:data.line,\"char\":data.char,data:[data.name]})}),linter.on(\"Identifier\",function(data){linter.getOption(\"camelcase\")&&data.name.replace(/^_+|_+$/g,\"\").indexOf(\"_\")>-1&&!data.name.match(/^[A-Z0-9_]*$/)&&linter.warn(\"W106\",{line:data.line,\"char\":data.from,data:[data.name]})}),linter.on(\"String\",function(data){var code,quotmark=linter.getOption(\"quotmark\");quotmark&&(\"single\"===quotmark&&\"'\"!==data.quote&&(code=\"W109\"),\"double\"===quotmark&&'\"'!==data.quote&&(code=\"W108\"),quotmark===!0&&(linter.getCache(\"quotmark\")||linter.setCache(\"quotmark\",data.quote),linter.getCache(\"quotmark\")!==data.quote&&(code=\"W110\")),code&&linter.warn(code,{line:data.line,\"char\":data.char}))}),linter.on(\"Number\",function(data){\".\"===data.value.charAt(0)&&linter.warn(\"W008\",{line:data.line,\"char\":data.char,data:[data.value]}),\".\"===data.value.substr(data.value.length-1)&&linter.warn(\"W047\",{line:data.line,\"char\":data.char,data:[data.value]}),/^00+/.test(data.value)&&linter.warn(\"W046\",{line:data.line,\"char\":data.char,data:[data.value]})}),linter.on(\"String\",function(data){var re=/^(?:javascript|jscript|ecmascript|vbscript|livescript)\\s*:/i;linter.getOption(\"scripturl\")||re.test(data.value)&&linter.warn(\"W107\",{line:data.line,\"char\":data.char})})}},{}],\"/node_modules/jshint/src/vars.js\":[function(_dereq_,module,exports){\"use strict\";exports.reservedVars={arguments:!1,NaN:!1},exports.ecmaIdentifiers={3:{Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},5:{JSON:!1},6:{Map:!1,Promise:!1,Proxy:!1,Reflect:!1,Set:!1,Symbol:!1,WeakMap:!1,WeakSet:!1}},exports.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CSS:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,Comment:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,Document:!1,document:!1,DocumentFragment:!1,Element:!1,ElementTimeControl:!1,Event:!1,event:!1,fetch:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,Intl:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,performance:!1,print:!1,Range:!1,requestAnimationFrame:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},exports.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},exports.worker={importScripts:!0,postMessage:!0,self:!0,FileReaderSync:!0},exports.nonstandard={escape:!1,unescape:!1},exports.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},exports.node={__filename:!1,__dirname:!1,GLOBAL:!1,global:!1,module:!1,acequire:!1,Buffer:!0,console:!0,exports:!0,process:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0,setImmediate:!0,clearImmediate:!0},exports.browserify={__filename:!1,__dirname:!1,global:!1,module:!1,acequire:!1,Buffer:!0,exports:!0,process:!0},exports.phantom={phantom:!0,acequire:!0,WebPage:!0,console:!0,exports:!0},exports.qunit={asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,\"throws\":!1},exports.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},exports.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},exports.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},exports.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},exports.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},exports.jquery={$:!1,jQuery:!1},exports.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,IFrame:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},exports.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},exports.yui={YUI:!1,Y:!1,YUI_config:!1},exports.mocha={mocha:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,context:!1,xcontext:!1,before:!1,after:!1,beforeEach:!1,afterEach:!1,suite:!1,test:!1,setup:!1,teardown:!1,suiteSetup:!1,suiteTeardown:!1},exports.jasmine={jasmine:!1,describe:!1,xdescribe:!1,it:!1,xit:!1,beforeEach:!1,afterEach:!1,setFixtures:!1,loadFixtures:!1,spyOn:!1,expect:!1,runs:!1,waitsFor:!1,waits:!1,beforeAll:!1,afterAll:!1,fail:!1,fdescribe:!1,fit:!1,pending:!1}},{}]},{},[\"/node_modules/jshint/src/jshint.js\"])}),ace.define(\"ace/mode/javascript_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/javascript/jshint\"],function(acequire,exports,module){\"use strict\";function startRegex(arr){return RegExp(\"^(\"+arr.join(\"|\")+\")\")}var oop=acequire(\"../lib/oop\"),Mirror=acequire(\"../worker/mirror\").Mirror,lint=acequire(\"./javascript/jshint\").JSHINT,disabledWarningsRe=startRegex([\"Bad for in variable '(.+)'.\",'Missing \"use strict\"']),errorsRe=startRegex([\"Unexpected\",\"Expected \",\"Confusing (plus|minus)\",\"\\\\{a\\\\} unterminated regular expression\",\"Unclosed \",\"Unmatched \",\"Unbegun comment\",\"Bad invocation\",\"Missing space after\",\"Missing operator at\"]),infoRe=startRegex([\"Expected an assignment\",\"Bad escapement of EOL\",\"Unexpected comma\",\"Unexpected space\",\"Missing radix parameter.\",\"A leading decimal point can\",\"\\\\['{a}'\\\\] is better written in dot notation.\",\"'{a}' used out of scope\"]),JavaScriptWorker=exports.JavaScriptWorker=function(sender){Mirror.call(this,sender),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(options){this.options=options||{esnext:!0,moz:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(newOptions){oop.mixin(this.options,newOptions),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval(\"throw 0;\"+str)}catch(e){if(0===e)return!0}return!1},this.onUpdate=function(){var value=this.doc.getValue();if(value=value.replace(/^#!.*\\n/,\"\\n\"),!value)return this.sender.emit(\"annotate\",[]);var errors=[],maxErrorLevel=this.isValidJS(value)?\"warning\":\"error\";lint(value,this.options);for(var results=lint.errors,errorAdded=!1,i=0;results.length>i;i++){var error=results[i];if(error){var raw=error.raw,type=\"warning\";if(\"Missing semicolon.\"==raw){var str=error.evidence.substr(error.character);str=str.charAt(str.search(/\\S/)),\"error\"==maxErrorLevel&&str&&/[\\w\\d{(['\"]/.test(str)?(error.reason='Missing \";\" before statement',type=\"error\"):type=\"info\"}else{if(disabledWarningsRe.test(raw))continue;infoRe.test(raw)?type=\"info\":errorsRe.test(raw)?(errorAdded=!0,type=maxErrorLevel):\"'{a}' is not defined.\"==raw?type=\"warning\":\"'{a}' is defined but never used.\"==raw&&(type=\"info\")}errors.push({row:error.line-1,column:error.character-1,text:error.reason,type:type,raw:raw})}}this.sender.emit(\"annotate\",errors)}}.call(JavaScriptWorker.prototype)}),ace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\"sentinel\",{}),\"sentinel\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\"function\"!=typeof target)throw new TypeError(\"Function.prototype.bind called on incompatible \"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\"__defineGetter__\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\"XXX\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\"[object Array]\"==_toString(obj)});var boxedString=Object(\"a\"),splitString=\"a\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduce of empty array with no initial value\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\"reduce of empty array with no initial value\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduceRight of empty array with no initial value\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\"reduceRight of empty array with no initial value\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(object,property){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\"undefined\"==typeof document||doesDefinePropertyWork(document.createElement(\"div\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\"Property description must be an object: \",ERR_NON_OBJECT_TARGET=\"Object.defineProperty called on non-object: \",ERR_ACCESSORS_NOT_SUPPORTED=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(object,property,descriptor){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\"object\"!=typeof descriptor&&\"function\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\"value\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\"get\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\"set\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\"function\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\"\";owns(object,name);)name+=\"?\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(\"Object.keys called on a non-object\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\"\t\\n\u000b\\f\\r   ᠎              \\u2028\\u2029\";if(!String.prototype.trim||ws.trim()){ws=\"[\"+ws+\"]\";var trimBeginRegexp=RegExp(\"^\"+ws+ws+\"*\"),trimEndRegexp=RegExp(ws+ws+\"*$\");String.prototype.trim=function(){return(this+\"\").replace(trimBeginRegexp,\"\").replace(trimEndRegexp,\"\")}}var toObject=function(o){if(null==o)throw new TypeError(\"can't convert \"+o+\" to object\");return Object(o)}});"; +},{}],75:[function(require,module,exports){ +module.exports.id = 'ace/mode/json_worker'; +module.exports.src = "\"no use strict\";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\"\";testPath;){var alias=paths[testPath];if(\"string\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,\"/\")+(tail||alias.main||alias.name);if(alias===!1)return\"\";var i=testPath.lastIndexOf(\"/\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\"log\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\"error\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\"!\")){var chunks=moduleName.split(\"!\");return window.normalizeModule(parentId,chunks[0])+\"!\"+window.normalizeModule(parentId,chunks[1])}if(\".\"==moduleName.charAt(0)){var base=parentId.split(\"/\").slice(0,-1).join(\"/\");for(moduleName=(base?base+\"/\":\"\")+moduleName;-1!==moduleName.indexOf(\".\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,\"\").replace(/\\/\\.\\//,\"/\").replace(/[^\\/]+\\/\\.\\.\\//,\"\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\"worker.js acequire() accepts only (parentId, id) as arguments\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\"unable to load \"+id);var path=resolveModuleId(id,window.acequire.tlns);return\".js\"!=path.slice(-3)&&(path+=\".js\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\"string\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\"function\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\"require\",\"exports\",\"module\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\"require\":return req;case\"exports\":return module.exports;case\"module\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\"ace/lib/event_emitter\").EventEmitter,oop=window.acequire(\"ace/lib/oop\"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:\"call\",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:\"event\",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\"Unknown command:\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\"ace/lib/es5-shim\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define(\"ace/range\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return\"Range: [\"+this.start.row+\"/\"+this.start.column+\"] -> [\"+this.end.row+\"/\"+this.end.column+\"]\"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){\"object\"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){\"object\"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\"\";switch(delta.action){case\"insert\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\"remove\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){\"object\"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?\"unshift\":\"push\"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.columnthis.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal(\"change\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\"change\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\"change\",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"],function(acequire,exports){\"use strict\";var oop=acequire(\"./lib/oop\"),applyDelta=acequire(\"./apply_delta\").applyDelta,EventEmitter=acequire(\"./lib/event_emitter\").EventEmitter,Range=acequire(\"./range\").Range,Anchor=acequire(\"./anchor\").Anchor,Document=function(textOrLines){this.$lines=[\"\"],0===textOrLines.length?this.$lines=[\"\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0===\"aaa\".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,\"\\n\").split(\"\\n\")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:\"\\n\",this._signal(\"changeNewLineMode\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\"windows\":return\"\\r\\n\";case\"unix\":return\"\\n\";default:return this.$autoNewLine||\"\\n\"}},this.$autoNewLine=\"\",this.$newLineMode=\"auto\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\"changeNewLineMode\"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return\"\\r\\n\"==text||\"\\r\"==text||\"\\n\"==text},this.getLine=function(row){return this.$lines[row]||\"\"},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\"\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\"),this.insertMergedLines(position,[\"\",\"\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\"insert\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\"\"]),column=0):(lines=[\"\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\"insert\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\"remove\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\"remove\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\"remove\",lines:[\"\",\"\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\"insert\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\"change\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\"\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\"insert\"==delta.action?\"remove\":\"insert\",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"],function(acequire,exports){\"use strict\";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split(\"\").reverse().join(\"\")},exports.stringRepeat=function(string,count){for(var result=\"\";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,\"\")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,\"\")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&\"object\"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if(\"object\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}var cons=obj.constructor;if(cons===RegExp)return obj;copy=cons();for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,\"\\\\$1\")},exports.escapeHTML=function(str){return str.replace(/&/g,\"&\").replace(/\"/g,\""\").replace(/'/g,\"'\").replace(/i;i+=2){if(Array.isArray(data[i+1]))var d={action:\"insert\",start:data[i],lines:data[i+1]};else var d={action:\"remove\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\"ace/mode/json/json_parse\",[\"require\",\"exports\",\"module\"],function(){\"use strict\";var at,ch,text,value,escapee={'\"':'\"',\"\\\\\":\"\\\\\",\"/\":\"/\",b:\"\\b\",f:\"\\f\",n:\"\\n\",r:\"\\r\",t:\"\t\"},error=function(m){throw{name:\"SyntaxError\",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error(\"Expected '\"+c+\"' instead of '\"+ch+\"'\"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string=\"\";for(\"-\"===ch&&(string=\"-\",next(\"-\"));ch>=\"0\"&&\"9\">=ch;)string+=ch,next();if(\".\"===ch)for(string+=\".\";next()&&ch>=\"0\"&&\"9\">=ch;)string+=ch;if(\"e\"===ch||\"E\"===ch)for(string+=ch,next(),(\"-\"===ch||\"+\"===ch)&&(string+=ch,next());ch>=\"0\"&&\"9\">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error(\"Bad number\"),void 0):number},string=function(){var hex,i,uffff,string=\"\";if('\"'===ch)for(;next();){if('\"'===ch)return next(),string;if(\"\\\\\"===ch)if(next(),\"u\"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if(\"string\"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error(\"Bad string\")},white=function(){for(;ch&&\" \">=ch;)next()},word=function(){switch(ch){case\"t\":return next(\"t\"),next(\"r\"),next(\"u\"),next(\"e\"),!0;case\"f\":return next(\"f\"),next(\"a\"),next(\"l\"),next(\"s\"),next(\"e\"),!1;case\"n\":return next(\"n\"),next(\"u\"),next(\"l\"),next(\"l\"),null}error(\"Unexpected '\"+ch+\"'\")},array=function(){var array=[];if(\"[\"===ch){if(next(\"[\"),white(),\"]\"===ch)return next(\"]\"),array;for(;ch;){if(array.push(value()),white(),\"]\"===ch)return next(\"]\"),array;next(\",\"),white()}}error(\"Bad array\")},object=function(){var key,object={};if(\"{\"===ch){if(next(\"{\"),white(),\"}\"===ch)return next(\"}\"),object;for(;ch;){if(key=string(),white(),next(\":\"),Object.hasOwnProperty.call(object,key)&&error('Duplicate key \"'+key+'\"'),object[key]=value(),white(),\"}\"===ch)return next(\"}\"),object;next(\",\"),white()}}error(\"Bad object\")};return value=function(){switch(white(),ch){case\"{\":return object();case\"[\":return array();case'\"':return string();case\"-\":return number();default:return ch>=\"0\"&&\"9\">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=\" \",result=value(),white(),ch&&error(\"Syntax error\"),\"function\"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&\"object\"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({\"\":result},\"\"):result}}),ace.define(\"ace/mode/json_worker\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/worker/mirror\",\"ace/mode/json/json_parse\"],function(acequire,exports){\"use strict\";var oop=acequire(\"../lib/oop\"),Mirror=acequire(\"../worker/mirror\").Mirror,parse=acequire(\"./json/json_parse\"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:\"error\"})}this.sender.emit(\"annotate\",errors)}}.call(JsonWorker.prototype)}),ace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,\"sentinel\",{}),\"sentinel\"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if(\"function\"!=typeof target)throw new TypeError(\"Function.prototype.bind called on incompatible \"+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,\"__defineGetter__\"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,\"XXX\"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0\n}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return\"[object Array]\"==_toString(obj)});var boxedString=Object(\"a\"),splitString=\"a\"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,result=[],thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0,thisp=arguments[1];if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduce of empty array with no initial value\");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError(\"reduce of empty array with no initial value\")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):object,length=self.length>>>0;if(\"[object Function]\"!=_toString(fun))throw new TypeError(fun+\" is not a function\");if(!length&&1==arguments.length)throw new TypeError(\"reduceRight of empty array with no initial value\");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError(\"reduceRight of empty array with no initial value\")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&\"[object String]\"==_toString(this)?this.split(\"\"):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT=\"Object.getOwnPropertyDescriptor called on a non-object: \";Object.getOwnPropertyDescriptor=function(object,property){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if(\"object\"!=typeof prototype)throw new TypeError(\"typeof prototype[\"+typeof prototype+\"] != 'object'\");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom=\"undefined\"==typeof document||doesDefinePropertyWork(document.createElement(\"div\"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR=\"Property description must be an object: \",ERR_NON_OBJECT_TARGET=\"Object.defineProperty called on non-object: \",ERR_ACCESSORS_NOT_SUPPORTED=\"getters & setters can not be defined on this javascript engine\";Object.defineProperty=function(object,property,descriptor){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if(\"object\"!=typeof descriptor&&\"function\"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,\"value\"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,\"get\")&&defineGetter(object,property,descriptor.get),owns(descriptor,\"set\")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return\"function\"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name=\"\";owns(object,name);)name+=\"?\";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=[\"toString\",\"toLocaleString\",\"valueOf\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"constructor\"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if(\"object\"!=typeof object&&\"function\"!=typeof object||null===object)throw new TypeError(\"Object.keys called on a non-object\");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=\"\t\\n\u000b\\f\\r   ᠎              \\u2028\\u2029\";if(!String.prototype.trim||ws.trim()){ws=\"[\"+ws+\"]\";var trimBeginRegexp=RegExp(\"^\"+ws+ws+\"*\"),trimEndRegexp=RegExp(ws+ws+\"*$\");String.prototype.trim=function(){return(this+\"\").replace(trimBeginRegexp,\"\").replace(trimEndRegexp,\"\")}}var toObject=function(o){if(null==o)throw new TypeError(\"can't convert \"+o+\" to object\");return Object(o)}});"; +},{}],76:[function(require,module,exports){ +var r; + +module.exports = function rand(len) { + if (!r) + r = new Rand(null); + + return r.generate(len); +}; + +function Rand(rand) { + this.rand = rand; +} +module.exports.Rand = Rand; + +Rand.prototype.generate = function generate(len) { + return this._rand(len); +}; + +// Emulate crypto API using randy +Rand.prototype._rand = function _rand(n) { + if (this.rand.getBytes) + return this.rand.getBytes(n); + + var res = new Uint8Array(n); + for (var i = 0; i < res.length; i++) + res[i] = this.rand.getByte(); + return res; +}; + +if (typeof self === 'object') { + if (self.crypto && self.crypto.getRandomValues) { + // Modern browsers + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.crypto.getRandomValues(arr); + return arr; + }; + } else if (self.msCrypto && self.msCrypto.getRandomValues) { + // IE + Rand.prototype._rand = function _rand(n) { + var arr = new Uint8Array(n); + self.msCrypto.getRandomValues(arr); + return arr; + }; + + // Safari's WebWorkers do not have `crypto` + } else if (typeof window === 'object') { + // Old junk + Rand.prototype._rand = function() { + throw new Error('Not implemented yet'); + }; + } +} else { + // Node.js or Web worker with no crypto support + try { + var crypto = require('crypto'); + if (typeof crypto.randomBytes !== 'function') + throw new Error('Not supported'); + + Rand.prototype._rand = function _rand(n) { + return crypto.randomBytes(n); + }; + } catch (e) { + } +} + +},{"crypto":77}],77:[function(require,module,exports){ + +},{}],78:[function(require,module,exports){ +// based on the aes implimentation in triple sec +// https://github.com/keybase/triplesec +// which is in turn based on the one from crypto-js +// https://code.google.com/p/crypto-js/ + +var Buffer = require('safe-buffer').Buffer + +function asUInt32Array (buf) { + if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf) + + var len = (buf.length / 4) | 0 + var out = new Array(len) + + for (var i = 0; i < len; i++) { + out[i] = buf.readUInt32BE(i * 4) + } + + return out +} + +function scrubVec (v) { + for (var i = 0; i < v.length; v++) { + v[i] = 0 + } +} + +function cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) { + var SUB_MIX0 = SUB_MIX[0] + var SUB_MIX1 = SUB_MIX[1] + var SUB_MIX2 = SUB_MIX[2] + var SUB_MIX3 = SUB_MIX[3] + + var s0 = M[0] ^ keySchedule[0] + var s1 = M[1] ^ keySchedule[1] + var s2 = M[2] ^ keySchedule[2] + var s3 = M[3] ^ keySchedule[3] + var t0, t1, t2, t3 + var ksRow = 4 + + for (var round = 1; round < nRounds; round++) { + t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++] + t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++] + t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++] + t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++] + s0 = t0 + s1 = t1 + s2 = t2 + s3 = t3 + } + + t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++] + t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++] + t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++] + t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++] + t0 = t0 >>> 0 + t1 = t1 >>> 0 + t2 = t2 >>> 0 + t3 = t3 >>> 0 + + return [t0, t1, t2, t3] +} + +// AES constants +var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36] +var G = (function () { + // Compute double table + var d = new Array(256) + for (var j = 0; j < 256; j++) { + if (j < 128) { + d[j] = j << 1 + } else { + d[j] = (j << 1) ^ 0x11b + } + } + + var SBOX = [] + var INV_SBOX = [] + var SUB_MIX = [[], [], [], []] + var INV_SUB_MIX = [[], [], [], []] + + // Walk GF(2^8) + var x = 0 + var xi = 0 + for (var i = 0; i < 256; ++i) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4) + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63 + SBOX[x] = sx + INV_SBOX[sx] = x + + // Compute multiplication + var x2 = d[x] + var x4 = d[x2] + var x8 = d[x4] + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100) + SUB_MIX[0][x] = (t << 24) | (t >>> 8) + SUB_MIX[1][x] = (t << 16) | (t >>> 16) + SUB_MIX[2][x] = (t << 8) | (t >>> 24) + SUB_MIX[3][x] = t + + // Compute inv sub bytes, inv mix columns tables + t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100) + INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8) + INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16) + INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24) + INV_SUB_MIX[3][sx] = t + + if (x === 0) { + x = xi = 1 + } else { + x = x2 ^ d[d[d[x8 ^ x2]]] + xi ^= d[d[xi]] + } + } + + return { + SBOX: SBOX, + INV_SBOX: INV_SBOX, + SUB_MIX: SUB_MIX, + INV_SUB_MIX: INV_SUB_MIX + } +})() + +function AES (key) { + this._key = asUInt32Array(key) + this._reset() +} + +AES.blockSize = 4 * 4 +AES.keySize = 256 / 8 +AES.prototype.blockSize = AES.blockSize +AES.prototype.keySize = AES.keySize +AES.prototype._reset = function () { + var keyWords = this._key + var keySize = keyWords.length + var nRounds = keySize + 6 + var ksRows = (nRounds + 1) * 4 + + var keySchedule = [] + for (var k = 0; k < keySize; k++) { + keySchedule[k] = keyWords[k] + } + + for (k = keySize; k < ksRows; k++) { + var t = keySchedule[k - 1] + + if (k % keySize === 0) { + t = (t << 8) | (t >>> 24) + t = + (G.SBOX[t >>> 24] << 24) | + (G.SBOX[(t >>> 16) & 0xff] << 16) | + (G.SBOX[(t >>> 8) & 0xff] << 8) | + (G.SBOX[t & 0xff]) + + t ^= RCON[(k / keySize) | 0] << 24 + } else if (keySize > 6 && k % keySize === 4) { + t = + (G.SBOX[t >>> 24] << 24) | + (G.SBOX[(t >>> 16) & 0xff] << 16) | + (G.SBOX[(t >>> 8) & 0xff] << 8) | + (G.SBOX[t & 0xff]) + } + + keySchedule[k] = keySchedule[k - keySize] ^ t + } + + var invKeySchedule = [] + for (var ik = 0; ik < ksRows; ik++) { + var ksR = ksRows - ik + var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)] + + if (ik < 4 || ksR <= 4) { + invKeySchedule[ik] = tt + } else { + invKeySchedule[ik] = + G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^ + G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^ + G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^ + G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]] + } + } + + this._nRounds = nRounds + this._keySchedule = keySchedule + this._invKeySchedule = invKeySchedule +} + +AES.prototype.encryptBlockRaw = function (M) { + M = asUInt32Array(M) + return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds) +} + +AES.prototype.encryptBlock = function (M) { + var out = this.encryptBlockRaw(M) + var buf = Buffer.allocUnsafe(16) + buf.writeUInt32BE(out[0], 0) + buf.writeUInt32BE(out[1], 4) + buf.writeUInt32BE(out[2], 8) + buf.writeUInt32BE(out[3], 12) + return buf +} + +AES.prototype.decryptBlock = function (M) { + M = asUInt32Array(M) + + // swap + var m1 = M[1] + M[1] = M[3] + M[3] = m1 + + var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds) + var buf = Buffer.allocUnsafe(16) + buf.writeUInt32BE(out[0], 0) + buf.writeUInt32BE(out[3], 4) + buf.writeUInt32BE(out[2], 8) + buf.writeUInt32BE(out[1], 12) + return buf +} + +AES.prototype.scrub = function () { + scrubVec(this._keySchedule) + scrubVec(this._invKeySchedule) + scrubVec(this._key) +} + +module.exports.AES = AES + +},{"safe-buffer":1334}],79:[function(require,module,exports){ +var aes = require('./aes') +var Buffer = require('safe-buffer').Buffer +var Transform = require('cipher-base') +var inherits = require('inherits') +var GHASH = require('./ghash') +var xor = require('buffer-xor') +var incr32 = require('./incr32') + +function xorTest (a, b) { + var out = 0 + if (a.length !== b.length) out++ + + var len = Math.min(a.length, b.length) + for (var i = 0; i < len; ++i) { + out += (a[i] ^ b[i]) + } + + return out +} + +function calcIv (self, iv, ck) { + if (iv.length === 12) { + self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])]) + return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])]) + } + var ghash = new GHASH(ck) + var len = iv.length + var toPad = len % 16 + ghash.update(iv) + if (toPad) { + toPad = 16 - toPad + ghash.update(Buffer.alloc(toPad, 0)) + } + ghash.update(Buffer.alloc(8, 0)) + var ivBits = len * 8 + var tail = Buffer.alloc(8) + tail.writeUIntBE(ivBits, 0, 8) + ghash.update(tail) + self._finID = ghash.state + var out = Buffer.from(self._finID) + incr32(out) + return out +} +function StreamCipher (mode, key, iv, decrypt) { + Transform.call(this) + + var h = Buffer.alloc(4, 0) + + this._cipher = new aes.AES(key) + var ck = this._cipher.encryptBlock(h) + this._ghash = new GHASH(ck) + iv = calcIv(this, iv, ck) + + this._prev = Buffer.from(iv) + this._cache = Buffer.allocUnsafe(0) + this._secCache = Buffer.allocUnsafe(0) + this._decrypt = decrypt + this._alen = 0 + this._len = 0 + this._mode = mode + + this._authTag = null + this._called = false +} + +inherits(StreamCipher, Transform) + +StreamCipher.prototype._update = function (chunk) { + if (!this._called && this._alen) { + var rump = 16 - (this._alen % 16) + if (rump < 16) { + rump = Buffer.alloc(rump, 0) + this._ghash.update(rump) + } + } + + this._called = true + var out = this._mode.encrypt(this, chunk) + if (this._decrypt) { + this._ghash.update(chunk) + } else { + this._ghash.update(out) + } + this._len += chunk.length + return out +} + +StreamCipher.prototype._final = function () { + if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data') + + var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID)) + if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data') + + this._authTag = tag + this._cipher.scrub() +} + +StreamCipher.prototype.getAuthTag = function getAuthTag () { + if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state') + + return this._authTag +} + +StreamCipher.prototype.setAuthTag = function setAuthTag (tag) { + if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state') + + this._authTag = tag +} + +StreamCipher.prototype.setAAD = function setAAD (buf) { + if (this._called) throw new Error('Attempting to set AAD in unsupported state') + + this._ghash.update(buf) + this._alen += buf.length +} + +module.exports = StreamCipher + +},{"./aes":78,"./ghash":83,"./incr32":84,"buffer-xor":112,"cipher-base":120,"inherits":834,"safe-buffer":1334}],80:[function(require,module,exports){ +var ciphers = require('./encrypter') +var deciphers = require('./decrypter') +var modes = require('./modes/list.json') + +function getCiphers () { + return Object.keys(modes) +} + +exports.createCipher = exports.Cipher = ciphers.createCipher +exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv +exports.createDecipher = exports.Decipher = deciphers.createDecipher +exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv +exports.listCiphers = exports.getCiphers = getCiphers + +},{"./decrypter":81,"./encrypter":82,"./modes/list.json":92}],81:[function(require,module,exports){ +var AuthCipher = require('./authCipher') +var Buffer = require('safe-buffer').Buffer +var MODES = require('./modes') +var StreamCipher = require('./streamCipher') +var Transform = require('cipher-base') +var aes = require('./aes') +var ebtk = require('evp_bytestokey') +var inherits = require('inherits') + +function Decipher (mode, key, iv) { + Transform.call(this) + + this._cache = new Splitter() + this._last = void 0 + this._cipher = new aes.AES(key) + this._prev = Buffer.from(iv) + this._mode = mode + this._autopadding = true +} + +inherits(Decipher, Transform) + +Decipher.prototype._update = function (data) { + this._cache.add(data) + var chunk + var thing + var out = [] + while ((chunk = this._cache.get(this._autopadding))) { + thing = this._mode.decrypt(this, chunk) + out.push(thing) + } + return Buffer.concat(out) +} + +Decipher.prototype._final = function () { + var chunk = this._cache.flush() + if (this._autopadding) { + return unpad(this._mode.decrypt(this, chunk)) + } else if (chunk) { + throw new Error('data not multiple of block length') + } +} + +Decipher.prototype.setAutoPadding = function (setTo) { + this._autopadding = !!setTo + return this +} + +function Splitter () { + this.cache = Buffer.allocUnsafe(0) +} + +Splitter.prototype.add = function (data) { + this.cache = Buffer.concat([this.cache, data]) +} + +Splitter.prototype.get = function (autoPadding) { + var out + if (autoPadding) { + if (this.cache.length > 16) { + out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + } else { + if (this.cache.length >= 16) { + out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + } + + return null +} + +Splitter.prototype.flush = function () { + if (this.cache.length) return this.cache +} + +function unpad (last) { + var padded = last[15] + if (padded < 1 || padded > 16) { + throw new Error('unable to decrypt data') + } + var i = -1 + while (++i < padded) { + if (last[(i + (16 - padded))] !== padded) { + throw new Error('unable to decrypt data') + } + } + if (padded === 16) return + + return last.slice(0, 16 - padded) +} + +function createDecipheriv (suite, password, iv) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + if (typeof iv === 'string') iv = Buffer.from(iv) + if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length) + + if (typeof password === 'string') password = Buffer.from(password) + if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length) + + if (config.type === 'stream') { + return new StreamCipher(config.module, password, iv, true) + } else if (config.type === 'auth') { + return new AuthCipher(config.module, password, iv, true) + } + + return new Decipher(config.module, password, iv) +} + +function createDecipher (suite, password) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + var keys = ebtk(password, false, config.key, config.iv) + return createDecipheriv(suite, keys.key, keys.iv) +} + +exports.createDecipher = createDecipher +exports.createDecipheriv = createDecipheriv + +},{"./aes":78,"./authCipher":79,"./modes":91,"./streamCipher":94,"cipher-base":120,"evp_bytestokey":709,"inherits":834,"safe-buffer":1334}],82:[function(require,module,exports){ +var MODES = require('./modes') +var AuthCipher = require('./authCipher') +var Buffer = require('safe-buffer').Buffer +var StreamCipher = require('./streamCipher') +var Transform = require('cipher-base') +var aes = require('./aes') +var ebtk = require('evp_bytestokey') +var inherits = require('inherits') + +function Cipher (mode, key, iv) { + Transform.call(this) + + this._cache = new Splitter() + this._cipher = new aes.AES(key) + this._prev = Buffer.from(iv) + this._mode = mode + this._autopadding = true +} + +inherits(Cipher, Transform) + +Cipher.prototype._update = function (data) { + this._cache.add(data) + var chunk + var thing + var out = [] + + while ((chunk = this._cache.get())) { + thing = this._mode.encrypt(this, chunk) + out.push(thing) + } + + return Buffer.concat(out) +} + +var PADDING = Buffer.alloc(16, 0x10) + +Cipher.prototype._final = function () { + var chunk = this._cache.flush() + if (this._autopadding) { + chunk = this._mode.encrypt(this, chunk) + this._cipher.scrub() + return chunk + } + + if (!chunk.equals(PADDING)) { + this._cipher.scrub() + throw new Error('data not multiple of block length') + } +} + +Cipher.prototype.setAutoPadding = function (setTo) { + this._autopadding = !!setTo + return this +} + +function Splitter () { + this.cache = Buffer.allocUnsafe(0) +} + +Splitter.prototype.add = function (data) { + this.cache = Buffer.concat([this.cache, data]) +} + +Splitter.prototype.get = function () { + if (this.cache.length > 15) { + var out = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + return out + } + return null +} + +Splitter.prototype.flush = function () { + var len = 16 - this.cache.length + var padBuff = Buffer.allocUnsafe(len) + + var i = -1 + while (++i < len) { + padBuff.writeUInt8(len, i) + } + + return Buffer.concat([this.cache, padBuff]) +} + +function createCipheriv (suite, password, iv) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + if (typeof password === 'string') password = Buffer.from(password) + if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length) + + if (typeof iv === 'string') iv = Buffer.from(iv) + if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length) + + if (config.type === 'stream') { + return new StreamCipher(config.module, password, iv) + } else if (config.type === 'auth') { + return new AuthCipher(config.module, password, iv) + } + + return new Cipher(config.module, password, iv) +} + +function createCipher (suite, password) { + var config = MODES[suite.toLowerCase()] + if (!config) throw new TypeError('invalid suite type') + + var keys = ebtk(password, false, config.key, config.iv) + return createCipheriv(suite, keys.key, keys.iv) +} + +exports.createCipheriv = createCipheriv +exports.createCipher = createCipher + +},{"./aes":78,"./authCipher":79,"./modes":91,"./streamCipher":94,"cipher-base":120,"evp_bytestokey":709,"inherits":834,"safe-buffer":1334}],83:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer +var ZEROES = Buffer.alloc(16, 0) + +function toArray (buf) { + return [ + buf.readUInt32BE(0), + buf.readUInt32BE(4), + buf.readUInt32BE(8), + buf.readUInt32BE(12) + ] +} + +function fromArray (out) { + var buf = Buffer.allocUnsafe(16) + buf.writeUInt32BE(out[0] >>> 0, 0) + buf.writeUInt32BE(out[1] >>> 0, 4) + buf.writeUInt32BE(out[2] >>> 0, 8) + buf.writeUInt32BE(out[3] >>> 0, 12) + return buf +} + +function GHASH (key) { + this.h = key + this.state = Buffer.alloc(16, 0) + this.cache = Buffer.allocUnsafe(0) +} + +// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html +// by Juho Vähä-Herttua +GHASH.prototype.ghash = function (block) { + var i = -1 + while (++i < block.length) { + this.state[i] ^= block[i] + } + this._multiply() +} + +GHASH.prototype._multiply = function () { + var Vi = toArray(this.h) + var Zi = [0, 0, 0, 0] + var j, xi, lsbVi + var i = -1 + while (++i < 128) { + xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0 + if (xi) { + // Z_i+1 = Z_i ^ V_i + Zi[0] ^= Vi[0] + Zi[1] ^= Vi[1] + Zi[2] ^= Vi[2] + Zi[3] ^= Vi[3] + } + + // Store the value of LSB(V_i) + lsbVi = (Vi[3] & 1) !== 0 + + // V_i+1 = V_i >> 1 + for (j = 3; j > 0; j--) { + Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31) + } + Vi[0] = Vi[0] >>> 1 + + // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R + if (lsbVi) { + Vi[0] = Vi[0] ^ (0xe1 << 24) + } + } + this.state = fromArray(Zi) +} + +GHASH.prototype.update = function (buf) { + this.cache = Buffer.concat([this.cache, buf]) + var chunk + while (this.cache.length >= 16) { + chunk = this.cache.slice(0, 16) + this.cache = this.cache.slice(16) + this.ghash(chunk) + } +} + +GHASH.prototype.final = function (abl, bl) { + if (this.cache.length) { + this.ghash(Buffer.concat([this.cache, ZEROES], 16)) + } + + this.ghash(fromArray([0, abl, 0, bl])) + return this.state +} + +module.exports = GHASH + +},{"safe-buffer":1334}],84:[function(require,module,exports){ +function incr32 (iv) { + var len = iv.length + var item + while (len--) { + item = iv.readUInt8(len) + if (item === 255) { + iv.writeUInt8(0, len) + } else { + item++ + iv.writeUInt8(item, len) + break + } + } +} +module.exports = incr32 + +},{}],85:[function(require,module,exports){ +var xor = require('buffer-xor') + +exports.encrypt = function (self, block) { + var data = xor(block, self._prev) + + self._prev = self._cipher.encryptBlock(data) + return self._prev +} + +exports.decrypt = function (self, block) { + var pad = self._prev + + self._prev = block + var out = self._cipher.decryptBlock(block) + + return xor(out, pad) +} + +},{"buffer-xor":112}],86:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer +var xor = require('buffer-xor') + +function encryptStart (self, data, decrypt) { + var len = data.length + var out = xor(data, self._cache) + self._cache = self._cache.slice(len) + self._prev = Buffer.concat([self._prev, decrypt ? data : out]) + return out +} + +exports.encrypt = function (self, data, decrypt) { + var out = Buffer.allocUnsafe(0) + var len + + while (data.length) { + if (self._cache.length === 0) { + self._cache = self._cipher.encryptBlock(self._prev) + self._prev = Buffer.allocUnsafe(0) + } + + if (self._cache.length <= data.length) { + len = self._cache.length + out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)]) + data = data.slice(len) + } else { + out = Buffer.concat([out, encryptStart(self, data, decrypt)]) + break + } + } + + return out +} + +},{"buffer-xor":112,"safe-buffer":1334}],87:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer + +function encryptByte (self, byteParam, decrypt) { + var pad + var i = -1 + var len = 8 + var out = 0 + var bit, value + while (++i < len) { + pad = self._cipher.encryptBlock(self._prev) + bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0 + value = pad[0] ^ bit + out += ((value & 0x80) >> (i % 8)) + self._prev = shiftIn(self._prev, decrypt ? bit : value) + } + return out +} + +function shiftIn (buffer, value) { + var len = buffer.length + var i = -1 + var out = Buffer.allocUnsafe(buffer.length) + buffer = Buffer.concat([buffer, Buffer.from([value])]) + + while (++i < len) { + out[i] = buffer[i] << 1 | buffer[i + 1] >> (7) + } + + return out +} + +exports.encrypt = function (self, chunk, decrypt) { + var len = chunk.length + var out = Buffer.allocUnsafe(len) + var i = -1 + + while (++i < len) { + out[i] = encryptByte(self, chunk[i], decrypt) + } + + return out +} + +},{"safe-buffer":1334}],88:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer + +function encryptByte (self, byteParam, decrypt) { + var pad = self._cipher.encryptBlock(self._prev) + var out = pad[0] ^ byteParam + + self._prev = Buffer.concat([ + self._prev.slice(1), + Buffer.from([decrypt ? byteParam : out]) + ]) + + return out +} + +exports.encrypt = function (self, chunk, decrypt) { + var len = chunk.length + var out = Buffer.allocUnsafe(len) + var i = -1 + + while (++i < len) { + out[i] = encryptByte(self, chunk[i], decrypt) + } + + return out +} + +},{"safe-buffer":1334}],89:[function(require,module,exports){ +var xor = require('buffer-xor') +var Buffer = require('safe-buffer').Buffer +var incr32 = require('../incr32') + +function getBlock (self) { + var out = self._cipher.encryptBlockRaw(self._prev) + incr32(self._prev) + return out +} + +var blockSize = 16 +exports.encrypt = function (self, chunk) { + var chunkNum = Math.ceil(chunk.length / blockSize) + var start = self._cache.length + self._cache = Buffer.concat([ + self._cache, + Buffer.allocUnsafe(chunkNum * blockSize) + ]) + for (var i = 0; i < chunkNum; i++) { + var out = getBlock(self) + var offset = start + i * blockSize + self._cache.writeUInt32BE(out[0], offset + 0) + self._cache.writeUInt32BE(out[1], offset + 4) + self._cache.writeUInt32BE(out[2], offset + 8) + self._cache.writeUInt32BE(out[3], offset + 12) + } + var pad = self._cache.slice(0, chunk.length) + self._cache = self._cache.slice(chunk.length) + return xor(chunk, pad) +} + +},{"../incr32":84,"buffer-xor":112,"safe-buffer":1334}],90:[function(require,module,exports){ +exports.encrypt = function (self, block) { + return self._cipher.encryptBlock(block) +} + +exports.decrypt = function (self, block) { + return self._cipher.decryptBlock(block) +} + +},{}],91:[function(require,module,exports){ +var modeModules = { + ECB: require('./ecb'), + CBC: require('./cbc'), + CFB: require('./cfb'), + CFB8: require('./cfb8'), + CFB1: require('./cfb1'), + OFB: require('./ofb'), + CTR: require('./ctr'), + GCM: require('./ctr') +} + +var modes = require('./list.json') + +for (var key in modes) { + modes[key].module = modeModules[modes[key].mode] +} + +module.exports = modes + +},{"./cbc":85,"./cfb":86,"./cfb1":87,"./cfb8":88,"./ctr":89,"./ecb":90,"./list.json":92,"./ofb":93}],92:[function(require,module,exports){ +module.exports={ + "aes-128-ecb": { + "cipher": "AES", + "key": 128, + "iv": 0, + "mode": "ECB", + "type": "block" + }, + "aes-192-ecb": { + "cipher": "AES", + "key": 192, + "iv": 0, + "mode": "ECB", + "type": "block" + }, + "aes-256-ecb": { + "cipher": "AES", + "key": 256, + "iv": 0, + "mode": "ECB", + "type": "block" + }, + "aes-128-cbc": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes-192-cbc": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes-256-cbc": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes128": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes192": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes256": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CBC", + "type": "block" + }, + "aes-128-cfb": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CFB", + "type": "stream" + }, + "aes-192-cfb": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CFB", + "type": "stream" + }, + "aes-256-cfb": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CFB", + "type": "stream" + }, + "aes-128-cfb8": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CFB8", + "type": "stream" + }, + "aes-192-cfb8": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CFB8", + "type": "stream" + }, + "aes-256-cfb8": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CFB8", + "type": "stream" + }, + "aes-128-cfb1": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CFB1", + "type": "stream" + }, + "aes-192-cfb1": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CFB1", + "type": "stream" + }, + "aes-256-cfb1": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CFB1", + "type": "stream" + }, + "aes-128-ofb": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "OFB", + "type": "stream" + }, + "aes-192-ofb": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "OFB", + "type": "stream" + }, + "aes-256-ofb": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "OFB", + "type": "stream" + }, + "aes-128-ctr": { + "cipher": "AES", + "key": 128, + "iv": 16, + "mode": "CTR", + "type": "stream" + }, + "aes-192-ctr": { + "cipher": "AES", + "key": 192, + "iv": 16, + "mode": "CTR", + "type": "stream" + }, + "aes-256-ctr": { + "cipher": "AES", + "key": 256, + "iv": 16, + "mode": "CTR", + "type": "stream" + }, + "aes-128-gcm": { + "cipher": "AES", + "key": 128, + "iv": 12, + "mode": "GCM", + "type": "auth" + }, + "aes-192-gcm": { + "cipher": "AES", + "key": 192, + "iv": 12, + "mode": "GCM", + "type": "auth" + }, + "aes-256-gcm": { + "cipher": "AES", + "key": 256, + "iv": 12, + "mode": "GCM", + "type": "auth" + } +} + +},{}],93:[function(require,module,exports){ +(function (Buffer){ +var xor = require('buffer-xor') + +function getBlock (self) { + self._prev = self._cipher.encryptBlock(self._prev) + return self._prev +} + +exports.encrypt = function (self, chunk) { + while (self._cache.length < chunk.length) { + self._cache = Buffer.concat([self._cache, getBlock(self)]) + } + + var pad = self._cache.slice(0, chunk.length) + self._cache = self._cache.slice(chunk.length) + return xor(chunk, pad) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":113,"buffer-xor":112}],94:[function(require,module,exports){ +var aes = require('./aes') +var Buffer = require('safe-buffer').Buffer +var Transform = require('cipher-base') +var inherits = require('inherits') + +function StreamCipher (mode, key, iv, decrypt) { + Transform.call(this) + + this._cipher = new aes.AES(key) + this._prev = Buffer.from(iv) + this._cache = Buffer.allocUnsafe(0) + this._secCache = Buffer.allocUnsafe(0) + this._decrypt = decrypt + this._mode = mode +} + +inherits(StreamCipher, Transform) + +StreamCipher.prototype._update = function (chunk) { + return this._mode.encrypt(this, chunk, this._decrypt) +} + +StreamCipher.prototype._final = function () { + this._cipher.scrub() +} + +module.exports = StreamCipher + +},{"./aes":78,"cipher-base":120,"inherits":834,"safe-buffer":1334}],95:[function(require,module,exports){ +var DES = require('browserify-des') +var aes = require('browserify-aes/browser') +var aesModes = require('browserify-aes/modes') +var desModes = require('browserify-des/modes') +var ebtk = require('evp_bytestokey') + +function createCipher (suite, password) { + suite = suite.toLowerCase() + + var keyLen, ivLen + if (aesModes[suite]) { + keyLen = aesModes[suite].key + ivLen = aesModes[suite].iv + } else if (desModes[suite]) { + keyLen = desModes[suite].key * 8 + ivLen = desModes[suite].iv + } else { + throw new TypeError('invalid suite type') + } + + var keys = ebtk(password, false, keyLen, ivLen) + return createCipheriv(suite, keys.key, keys.iv) +} + +function createDecipher (suite, password) { + suite = suite.toLowerCase() + + var keyLen, ivLen + if (aesModes[suite]) { + keyLen = aesModes[suite].key + ivLen = aesModes[suite].iv + } else if (desModes[suite]) { + keyLen = desModes[suite].key * 8 + ivLen = desModes[suite].iv + } else { + throw new TypeError('invalid suite type') + } + + var keys = ebtk(password, false, keyLen, ivLen) + return createDecipheriv(suite, keys.key, keys.iv) +} + +function createCipheriv (suite, key, iv) { + suite = suite.toLowerCase() + if (aesModes[suite]) return aes.createCipheriv(suite, key, iv) + if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite }) + + throw new TypeError('invalid suite type') +} + +function createDecipheriv (suite, key, iv) { + suite = suite.toLowerCase() + if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv) + if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true }) + + throw new TypeError('invalid suite type') +} + +function getCiphers () { + return Object.keys(desModes).concat(aes.getCiphers()) +} + +exports.createCipher = exports.Cipher = createCipher +exports.createCipheriv = exports.Cipheriv = createCipheriv +exports.createDecipher = exports.Decipher = createDecipher +exports.createDecipheriv = exports.Decipheriv = createDecipheriv +exports.listCiphers = exports.getCiphers = getCiphers + +},{"browserify-aes/browser":80,"browserify-aes/modes":91,"browserify-des":96,"browserify-des/modes":97,"evp_bytestokey":709}],96:[function(require,module,exports){ +var CipherBase = require('cipher-base') +var des = require('des.js') +var inherits = require('inherits') +var Buffer = require('safe-buffer').Buffer + +var modes = { + 'des-ede3-cbc': des.CBC.instantiate(des.EDE), + 'des-ede3': des.EDE, + 'des-ede-cbc': des.CBC.instantiate(des.EDE), + 'des-ede': des.EDE, + 'des-cbc': des.CBC.instantiate(des.DES), + 'des-ecb': des.DES +} +modes.des = modes['des-cbc'] +modes.des3 = modes['des-ede3-cbc'] +module.exports = DES +inherits(DES, CipherBase) +function DES (opts) { + CipherBase.call(this) + var modeName = opts.mode.toLowerCase() + var mode = modes[modeName] + var type + if (opts.decrypt) { + type = 'decrypt' + } else { + type = 'encrypt' + } + var key = opts.key + if (!Buffer.isBuffer(key)) { + key = Buffer.from(key) + } + if (modeName === 'des-ede' || modeName === 'des-ede-cbc') { + key = Buffer.concat([key, key.slice(0, 8)]) + } + var iv = opts.iv + if (!Buffer.isBuffer(iv)) { + iv = Buffer.from(iv) + } + this._des = mode.create({ + key: key, + iv: iv, + type: type + }) +} +DES.prototype._update = function (data) { + return Buffer.from(this._des.update(data)) +} +DES.prototype._final = function () { + return Buffer.from(this._des.final()) +} + +},{"cipher-base":120,"des.js":533,"inherits":834,"safe-buffer":1334}],97:[function(require,module,exports){ +exports['des-ecb'] = { + key: 8, + iv: 0 +} +exports['des-cbc'] = exports.des = { + key: 8, + iv: 8 +} +exports['des-ede3-cbc'] = exports.des3 = { + key: 24, + iv: 8 +} +exports['des-ede3'] = { + key: 24, + iv: 0 +} +exports['des-ede-cbc'] = { + key: 16, + iv: 8 +} +exports['des-ede'] = { + key: 16, + iv: 0 +} + +},{}],98:[function(require,module,exports){ +(function (Buffer){ +var bn = require('bn.js'); +var randomBytes = require('randombytes'); +module.exports = crt; +function blind(priv) { + var r = getr(priv); + var blinder = r.toRed(bn.mont(priv.modulus)) + .redPow(new bn(priv.publicExponent)).fromRed(); + return { + blinder: blinder, + unblinder:r.invm(priv.modulus) + }; +} +function crt(msg, priv) { + var blinds = blind(priv); + var len = priv.modulus.byteLength(); + var mod = bn.mont(priv.modulus); + var blinded = new bn(msg).mul(blinds.blinder).umod(priv.modulus); + var c1 = blinded.toRed(bn.mont(priv.prime1)); + var c2 = blinded.toRed(bn.mont(priv.prime2)); + var qinv = priv.coefficient; + var p = priv.prime1; + var q = priv.prime2; + var m1 = c1.redPow(priv.exponent1); + var m2 = c2.redPow(priv.exponent2); + m1 = m1.fromRed(); + m2 = m2.fromRed(); + var h = m1.isub(m2).imul(qinv).umod(p); + h.imul(q); + m2.iadd(h); + return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len)); +} +crt.getr = getr; +function getr(priv) { + var len = priv.modulus.byteLength(); + var r = new bn(randomBytes(len)); + while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) { + r = new bn(randomBytes(len)); + } + return r; +} + +}).call(this,require("buffer").Buffer) +},{"bn.js":66,"buffer":113,"randombytes":1036}],99:[function(require,module,exports){ +const Sha3 = require('js-sha3') +const Buffer = require('safe-buffer').Buffer + +const hashLengths = [ 224, 256, 384, 512 ] + +const hash = function (bitcount) { + if (bitcount !== undefined && hashLengths.indexOf(bitcount) === -1) { + throw new Error('Unsupported hash length') + } + this.content = [] + this.bitcount = bitcount ? 'keccak_' + bitcount : 'keccak_512' +} + +hash.prototype.update = function (i) { + if (Buffer.isBuffer(i)) { + this.content.push(i) + } else if (typeof i === 'string') { + this.content.push(new Buffer(i)) + } else { + throw new Error('Unsupported argument to update') + } + return this +} + +hash.prototype.digest = function (encoding) { + const result = Sha3[this.bitcount](Buffer.concat(this.content)) + if (encoding === 'hex') { + return result + } else if (encoding === 'binary' || encoding === undefined) { + return new Buffer(result, 'hex').toString('binary') + } else { + throw new Error('Unsupported encoding for digest: ' + encoding) + } +} + +module.exports = { + SHA3Hash: hash +} + +},{"js-sha3":862,"safe-buffer":1334}],100:[function(require,module,exports){ +module.exports = require('./browser/algorithms.json') + +},{"./browser/algorithms.json":101}],101:[function(require,module,exports){ +module.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" + } +} + +},{}],102:[function(require,module,exports){ +module.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" +} + +},{}],103:[function(require,module,exports){ +(function (Buffer){ +var createHash = require('create-hash') +var stream = require('stream') +var inherits = require('inherits') +var sign = require('./sign') +var verify = require('./verify') + +var algorithms = require('./algorithms.json') +Object.keys(algorithms).forEach(function (key) { + algorithms[key].id = new Buffer(algorithms[key].id, 'hex') + algorithms[key.toLowerCase()] = algorithms[key] +}) + +function Sign (algorithm) { + stream.Writable.call(this) + + var data = algorithms[algorithm] + if (!data) throw new Error('Unknown message digest') + + this._hashType = data.hash + this._hash = createHash(data.hash) + this._tag = data.id + this._signType = data.sign +} +inherits(Sign, stream.Writable) + +Sign.prototype._write = function _write (data, _, done) { + this._hash.update(data) + done() +} + +Sign.prototype.update = function update (data, enc) { + if (typeof data === 'string') data = new Buffer(data, enc) + + this._hash.update(data) + return this +} + +Sign.prototype.sign = function signMethod (key, enc) { + this.end() + var hash = this._hash.digest() + var sig = sign(hash, key, this._hashType, this._signType, this._tag) + + return enc ? sig.toString(enc) : sig +} + +function Verify (algorithm) { + stream.Writable.call(this) + + var data = algorithms[algorithm] + if (!data) throw new Error('Unknown message digest') + + this._hash = createHash(data.hash) + this._tag = data.id + this._signType = data.sign +} +inherits(Verify, stream.Writable) + +Verify.prototype._write = function _write (data, _, done) { + this._hash.update(data) + done() +} + +Verify.prototype.update = function update (data, enc) { + if (typeof data === 'string') data = new Buffer(data, enc) + + this._hash.update(data) + return this +} + +Verify.prototype.verify = function verifyMethod (key, sig, enc) { + if (typeof sig === 'string') sig = new Buffer(sig, enc) + + this.end() + var hash = this._hash.digest() + return verify(sig, hash, key, this._signType, this._tag) +} + +function createSign (algorithm) { + return new Sign(algorithm) +} + +function createVerify (algorithm) { + return new Verify(algorithm) +} + +module.exports = { + Sign: createSign, + Verify: createVerify, + createSign: createSign, + createVerify: createVerify +} + +}).call(this,require("buffer").Buffer) +},{"./algorithms.json":101,"./sign":104,"./verify":105,"buffer":113,"create-hash":466,"inherits":834,"stream":1394}],104:[function(require,module,exports){ +(function (Buffer){ +// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js +var createHmac = require('create-hmac') +var crt = require('browserify-rsa') +var EC = require('elliptic').ec +var BN = require('bn.js') +var parseKeys = require('parse-asn1') +var curves = require('./curves.json') + +function sign (hash, key, hashType, signType, tag) { + var priv = parseKeys(key) + if (priv.curve) { + // rsa keys can be interpreted as ecdsa ones in openssl + if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type') + return ecSign(hash, priv) + } else if (priv.type === 'dsa') { + if (signType !== 'dsa') throw new Error('wrong private key type') + return dsaSign(hash, priv, hashType) + } else { + if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type') + } + hash = Buffer.concat([tag, hash]) + var len = priv.modulus.byteLength() + var pad = [ 0, 1 ] + while (hash.length + pad.length + 1 < len) pad.push(0xff) + pad.push(0x00) + var i = -1 + while (++i < hash.length) pad.push(hash[i]) + + var out = crt(pad, priv) + return out +} + +function ecSign (hash, priv) { + var curveId = curves[priv.curve.join('.')] + if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.')) + + var curve = new EC(curveId) + var key = curve.keyFromPrivate(priv.privateKey) + var out = key.sign(hash) + + return new Buffer(out.toDER()) +} + +function dsaSign (hash, priv, algo) { + var x = priv.params.priv_key + var p = priv.params.p + var q = priv.params.q + var g = priv.params.g + var r = new BN(0) + var k + var H = bits2int(hash, q).mod(q) + var s = false + var kv = getKey(x, q, hash, algo) + while (s === false) { + k = makeKey(q, kv, algo) + r = makeR(g, k, p, q) + s = k.invm(q).imul(H.add(x.mul(r))).mod(q) + if (s.cmpn(0) === 0) { + s = false + r = new BN(0) + } + } + return toDER(r, s) +} + +function toDER (r, s) { + r = r.toArray() + s = s.toArray() + + // Pad values + if (r[0] & 0x80) r = [ 0 ].concat(r) + if (s[0] & 0x80) s = [ 0 ].concat(s) + + var total = r.length + s.length + 4 + var res = [ 0x30, total, 0x02, r.length ] + res = res.concat(r, [ 0x02, s.length ], s) + return new Buffer(res) +} + +function getKey (x, q, hash, algo) { + x = new Buffer(x.toArray()) + if (x.length < q.byteLength()) { + var zeros = new Buffer(q.byteLength() - x.length) + zeros.fill(0) + x = Buffer.concat([ zeros, x ]) + } + var hlen = hash.length + var hbits = bits2octets(hash, q) + var v = new Buffer(hlen) + v.fill(1) + var k = new Buffer(hlen) + k.fill(0) + k = createHmac(algo, k).update(v).update(new Buffer([ 0 ])).update(x).update(hbits).digest() + v = createHmac(algo, k).update(v).digest() + k = createHmac(algo, k).update(v).update(new Buffer([ 1 ])).update(x).update(hbits).digest() + v = createHmac(algo, k).update(v).digest() + return { k: k, v: v } +} + +function bits2int (obits, q) { + var bits = new BN(obits) + var shift = (obits.length << 3) - q.bitLength() + if (shift > 0) bits.ishrn(shift) + return bits +} + +function bits2octets (bits, q) { + bits = bits2int(bits, q) + bits = bits.mod(q) + var out = new Buffer(bits.toArray()) + if (out.length < q.byteLength()) { + var zeros = new Buffer(q.byteLength() - out.length) + zeros.fill(0) + out = Buffer.concat([ zeros, out ]) + } + return out +} + +function makeKey (q, kv, algo) { + var t + var k + + do { + t = new Buffer(0) + + while (t.length * 8 < q.bitLength()) { + kv.v = createHmac(algo, kv.k).update(kv.v).digest() + t = Buffer.concat([ t, kv.v ]) + } + + k = bits2int(t, q) + kv.k = createHmac(algo, kv.k).update(kv.v).update(new Buffer([ 0 ])).digest() + kv.v = createHmac(algo, kv.k).update(kv.v).digest() + } while (k.cmp(q) !== -1) + + return k +} + +function makeR (g, k, p, q) { + return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q) +} + +module.exports = sign +module.exports.getKey = getKey +module.exports.makeKey = makeKey + +}).call(this,require("buffer").Buffer) +},{"./curves.json":102,"bn.js":66,"browserify-rsa":98,"buffer":113,"create-hmac":468,"elliptic":548,"parse-asn1":1006}],105:[function(require,module,exports){ +(function (Buffer){ +// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js +var BN = require('bn.js') +var EC = require('elliptic').ec +var parseKeys = require('parse-asn1') +var curves = require('./curves.json') + +function verify (sig, hash, key, signType, tag) { + var pub = parseKeys(key) + if (pub.type === 'ec') { + // rsa keys can be interpreted as ecdsa ones in openssl + if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type') + return ecVerify(sig, hash, pub) + } else if (pub.type === 'dsa') { + if (signType !== 'dsa') throw new Error('wrong public key type') + return dsaVerify(sig, hash, pub) + } else { + if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type') + } + hash = Buffer.concat([tag, hash]) + var len = pub.modulus.byteLength() + var pad = [ 1 ] + var padNum = 0 + while (hash.length + pad.length + 2 < len) { + pad.push(0xff) + padNum++ + } + pad.push(0x00) + var i = -1 + while (++i < hash.length) { + pad.push(hash[i]) + } + pad = new Buffer(pad) + var red = BN.mont(pub.modulus) + sig = new BN(sig).toRed(red) + + sig = sig.redPow(new BN(pub.publicExponent)) + sig = new Buffer(sig.fromRed().toArray()) + var out = padNum < 8 ? 1 : 0 + len = Math.min(sig.length, pad.length) + if (sig.length !== pad.length) out = 1 + + i = -1 + while (++i < len) out |= sig[i] ^ pad[i] + return out === 0 +} + +function ecVerify (sig, hash, pub) { + var curveId = curves[pub.data.algorithm.curve.join('.')] + if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.')) + + var curve = new EC(curveId) + var pubkey = pub.data.subjectPrivateKey.data + + return curve.verify(hash, sig, pubkey) +} + +function dsaVerify (sig, hash, pub) { + var p = pub.data.p + var q = pub.data.q + var g = pub.data.g + var y = pub.data.pub_key + var unpacked = parseKeys.signature.decode(sig, 'der') + var s = unpacked.s + var r = unpacked.r + checkValue(s, q) + checkValue(r, q) + var montp = BN.mont(p) + var w = s.invm(q) + var v = g.toRed(montp) + .redPow(new BN(hash).mul(w).mod(q)) + .fromRed() + .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed()) + .mod(p) + .mod(q) + return v.cmp(r) === 0 +} + +function checkValue (b, q) { + if (b.cmpn(0) <= 0) throw new Error('invalid sig') + if (b.cmp(q) >= q) throw new Error('invalid sig') +} + +module.exports = verify + +}).call(this,require("buffer").Buffer) +},{"./curves.json":102,"bn.js":66,"buffer":113,"elliptic":548,"parse-asn1":1006}],106:[function(require,module,exports){ +(function (process,Buffer){ +'use strict'; +/* eslint camelcase: "off" */ + +var assert = require('assert'); + +var Zstream = require('pako/lib/zlib/zstream'); +var zlib_deflate = require('pako/lib/zlib/deflate.js'); +var zlib_inflate = require('pako/lib/zlib/inflate.js'); +var constants = require('pako/lib/zlib/constants'); + +for (var key in constants) { + exports[key] = constants[key]; +} + +// zlib modes +exports.NONE = 0; +exports.DEFLATE = 1; +exports.INFLATE = 2; +exports.GZIP = 3; +exports.GUNZIP = 4; +exports.DEFLATERAW = 5; +exports.INFLATERAW = 6; +exports.UNZIP = 7; + +var GZIP_HEADER_ID1 = 0x1f; +var GZIP_HEADER_ID2 = 0x8b; + +/** + * Emulate Node's zlib C++ layer for use by the JS layer in index.js + */ +function Zlib(mode) { + if (typeof mode !== 'number' || mode < exports.DEFLATE || mode > exports.UNZIP) { + throw new TypeError('Bad argument'); + } + + this.dictionary = null; + this.err = 0; + this.flush = 0; + this.init_done = false; + this.level = 0; + this.memLevel = 0; + this.mode = mode; + this.strategy = 0; + this.windowBits = 0; + this.write_in_progress = false; + this.pending_close = false; + this.gzip_id_bytes_read = 0; +} + +Zlib.prototype.close = function () { + if (this.write_in_progress) { + this.pending_close = true; + return; + } + + this.pending_close = false; + + assert(this.init_done, 'close before init'); + assert(this.mode <= exports.UNZIP); + + if (this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW) { + zlib_deflate.deflateEnd(this.strm); + } else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP) { + zlib_inflate.inflateEnd(this.strm); + } + + this.mode = exports.NONE; + + this.dictionary = null; +}; + +Zlib.prototype.write = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(true, flush, input, in_off, in_len, out, out_off, out_len); +}; + +Zlib.prototype.writeSync = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(false, flush, input, in_off, in_len, out, out_off, out_len); +}; + +Zlib.prototype._write = function (async, flush, input, in_off, in_len, out, out_off, out_len) { + assert.equal(arguments.length, 8); + + assert(this.init_done, 'write before init'); + assert(this.mode !== exports.NONE, 'already finalized'); + assert.equal(false, this.write_in_progress, 'write already in progress'); + assert.equal(false, this.pending_close, 'close is pending'); + + this.write_in_progress = true; + + assert.equal(false, flush === undefined, 'must provide flush value'); + + this.write_in_progress = true; + + if (flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK) { + throw new Error('Invalid flush value'); + } + + if (input == null) { + input = Buffer.alloc(0); + in_len = 0; + in_off = 0; + } + + this.strm.avail_in = in_len; + this.strm.input = input; + this.strm.next_in = in_off; + this.strm.avail_out = out_len; + this.strm.output = out; + this.strm.next_out = out_off; + this.flush = flush; + + if (!async) { + // sync version + this._process(); + + if (this._checkError()) { + return this._afterSync(); + } + return; + } + + // async version + var self = this; + process.nextTick(function () { + self._process(); + self._after(); + }); + + return this; +}; + +Zlib.prototype._afterSync = function () { + var avail_out = this.strm.avail_out; + var avail_in = this.strm.avail_in; + + this.write_in_progress = false; + + return [avail_in, avail_out]; +}; + +Zlib.prototype._process = function () { + var next_expected_header_byte = null; + + // If the avail_out is left at 0, then it means that it ran out + // of room. If there was avail_out left over, then it means + // that all of the input was consumed. + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflate(this.strm, this.flush); + break; + case exports.UNZIP: + if (this.strm.avail_in > 0) { + next_expected_header_byte = this.strm.next_in; + } + + switch (this.gzip_id_bytes_read) { + case 0: + if (next_expected_header_byte === null) { + break; + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) { + this.gzip_id_bytes_read = 1; + next_expected_header_byte++; + + if (this.strm.avail_in === 1) { + // The only available byte was already read. + break; + } + } else { + this.mode = exports.INFLATE; + break; + } + + // fallthrough + case 1: + if (next_expected_header_byte === null) { + break; + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2) { + this.gzip_id_bytes_read = 2; + this.mode = exports.GUNZIP; + } else { + // There is no actual difference between INFLATE and INFLATERAW + // (after initialization). + this.mode = exports.INFLATE; + } + + break; + default: + throw new Error('invalid number of gzip magic number bytes read'); + } + + // fallthrough + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + this.err = zlib_inflate.inflate(this.strm, this.flush + + // If data was encoded with dictionary + );if (this.err === exports.Z_NEED_DICT && this.dictionary) { + // Load it + this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary); + if (this.err === exports.Z_OK) { + // And try to decode again + this.err = zlib_inflate.inflate(this.strm, this.flush); + } else if (this.err === exports.Z_DATA_ERROR) { + // Both inflateSetDictionary() and inflate() return Z_DATA_ERROR. + // Make it possible for After() to tell a bad dictionary from bad + // input. + this.err = exports.Z_NEED_DICT; + } + } + while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0x00) { + // Bytes remain in input buffer. Perhaps this is another compressed + // member in the same archive, or just trailing garbage. + // Trailing zero bytes are okay, though, since they are frequently + // used for padding. + + this.reset(); + this.err = zlib_inflate.inflate(this.strm, this.flush); + } + break; + default: + throw new Error('Unknown mode ' + this.mode); + } +}; + +Zlib.prototype._checkError = function () { + // Acceptable error states depend on the type of zlib stream. + switch (this.err) { + case exports.Z_OK: + case exports.Z_BUF_ERROR: + if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH) { + this._error('unexpected end of file'); + return false; + } + break; + case exports.Z_STREAM_END: + // normal statuses, not fatal + break; + case exports.Z_NEED_DICT: + if (this.dictionary == null) { + this._error('Missing dictionary'); + } else { + this._error('Bad dictionary'); + } + return false; + default: + // something else. + this._error('Zlib error'); + return false; + } + + return true; +}; + +Zlib.prototype._after = function () { + if (!this._checkError()) { + return; + } + + var avail_out = this.strm.avail_out; + var avail_in = this.strm.avail_in; + + this.write_in_progress = false; + + // call the write() cb + this.callback(avail_in, avail_out); + + if (this.pending_close) { + this.close(); + } +}; + +Zlib.prototype._error = function (message) { + if (this.strm.msg) { + message = this.strm.msg; + } + this.onerror(message, this.err + + // no hope of rescue. + );this.write_in_progress = false; + if (this.pending_close) { + this.close(); + } +}; + +Zlib.prototype.init = function (windowBits, level, memLevel, strategy, dictionary) { + assert(arguments.length === 4 || arguments.length === 5, 'init(windowBits, level, memLevel, strategy, [dictionary])'); + + assert(windowBits >= 8 && windowBits <= 15, 'invalid windowBits'); + assert(level >= -1 && level <= 9, 'invalid compression level'); + + assert(memLevel >= 1 && memLevel <= 9, 'invalid memlevel'); + + assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, 'invalid strategy'); + + this._init(level, windowBits, memLevel, strategy, dictionary); + this._setDictionary(); +}; + +Zlib.prototype.params = function () { + throw new Error('deflateParams Not supported'); +}; + +Zlib.prototype.reset = function () { + this._reset(); + this._setDictionary(); +}; + +Zlib.prototype._init = function (level, windowBits, memLevel, strategy, dictionary) { + this.level = level; + this.windowBits = windowBits; + this.memLevel = memLevel; + this.strategy = strategy; + + this.flush = exports.Z_NO_FLUSH; + + this.err = exports.Z_OK; + + if (this.mode === exports.GZIP || this.mode === exports.GUNZIP) { + this.windowBits += 16; + } + + if (this.mode === exports.UNZIP) { + this.windowBits += 32; + } + + if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW) { + this.windowBits = -1 * this.windowBits; + } + + this.strm = new Zstream(); + + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy); + break; + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + case exports.UNZIP: + this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits); + break; + default: + throw new Error('Unknown mode ' + this.mode); + } + + if (this.err !== exports.Z_OK) { + this._error('Init error'); + } + + this.dictionary = dictionary; + + this.write_in_progress = false; + this.init_done = true; +}; + +Zlib.prototype._setDictionary = function () { + if (this.dictionary == null) { + return; + } + + this.err = exports.Z_OK; + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary); + break; + default: + break; + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to set dictionary'); + } +}; + +Zlib.prototype._reset = function () { + this.err = exports.Z_OK; + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + case exports.GZIP: + this.err = zlib_deflate.deflateReset(this.strm); + break; + case exports.INFLATE: + case exports.INFLATERAW: + case exports.GUNZIP: + this.err = zlib_inflate.inflateReset(this.strm); + break; + default: + break; + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to reset stream'); + } +}; + +exports.Zlib = Zlib; +}).call(this,require('_process'),require("buffer").Buffer) +},{"_process":109,"assert":35,"buffer":113,"pako/lib/zlib/constants":992,"pako/lib/zlib/deflate.js":994,"pako/lib/zlib/inflate.js":996,"pako/lib/zlib/zstream":1000}],107:[function(require,module,exports){ +(function (process){ +'use strict'; + +var Buffer = require('buffer').Buffer; +var Transform = require('stream').Transform; +var binding = require('./binding'); +var util = require('util'); +var assert = require('assert').ok; +var kMaxLength = require('buffer').kMaxLength; +var kRangeErrorMessage = 'Cannot create final Buffer. It would be larger ' + 'than 0x' + kMaxLength.toString(16) + ' bytes'; + +// zlib doesn't provide these, so kludge them in following the same +// const naming scheme zlib uses. +binding.Z_MIN_WINDOWBITS = 8; +binding.Z_MAX_WINDOWBITS = 15; +binding.Z_DEFAULT_WINDOWBITS = 15; + +// fewer than 64 bytes per chunk is stupid. +// technically it could work with as few as 8, but even 64 bytes +// is absurdly low. Usually a MB or more is best. +binding.Z_MIN_CHUNK = 64; +binding.Z_MAX_CHUNK = Infinity; +binding.Z_DEFAULT_CHUNK = 16 * 1024; + +binding.Z_MIN_MEMLEVEL = 1; +binding.Z_MAX_MEMLEVEL = 9; +binding.Z_DEFAULT_MEMLEVEL = 8; + +binding.Z_MIN_LEVEL = -1; +binding.Z_MAX_LEVEL = 9; +binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; + +// expose all the zlib constants +var bkeys = Object.keys(binding); +for (var bk = 0; bk < bkeys.length; bk++) { + var bkey = bkeys[bk]; + if (bkey.match(/^Z/)) { + Object.defineProperty(exports, bkey, { + enumerable: true, value: binding[bkey], writable: false + }); + } +} + +// translation table for return codes. +var codes = { + Z_OK: binding.Z_OK, + Z_STREAM_END: binding.Z_STREAM_END, + Z_NEED_DICT: binding.Z_NEED_DICT, + Z_ERRNO: binding.Z_ERRNO, + Z_STREAM_ERROR: binding.Z_STREAM_ERROR, + Z_DATA_ERROR: binding.Z_DATA_ERROR, + Z_MEM_ERROR: binding.Z_MEM_ERROR, + Z_BUF_ERROR: binding.Z_BUF_ERROR, + Z_VERSION_ERROR: binding.Z_VERSION_ERROR +}; + +var ckeys = Object.keys(codes); +for (var ck = 0; ck < ckeys.length; ck++) { + var ckey = ckeys[ck]; + codes[codes[ckey]] = ckey; +} + +Object.defineProperty(exports, 'codes', { + enumerable: true, value: Object.freeze(codes), writable: false +}); + +exports.Deflate = Deflate; +exports.Inflate = Inflate; +exports.Gzip = Gzip; +exports.Gunzip = Gunzip; +exports.DeflateRaw = DeflateRaw; +exports.InflateRaw = InflateRaw; +exports.Unzip = Unzip; + +exports.createDeflate = function (o) { + return new Deflate(o); +}; + +exports.createInflate = function (o) { + return new Inflate(o); +}; + +exports.createDeflateRaw = function (o) { + return new DeflateRaw(o); +}; + +exports.createInflateRaw = function (o) { + return new InflateRaw(o); +}; + +exports.createGzip = function (o) { + return new Gzip(o); +}; + +exports.createGunzip = function (o) { + return new Gunzip(o); +}; + +exports.createUnzip = function (o) { + return new Unzip(o); +}; + +// Convenience methods. +// compress/decompress a string or buffer in one step. +exports.deflate = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Deflate(opts), buffer, callback); +}; + +exports.deflateSync = function (buffer, opts) { + return zlibBufferSync(new Deflate(opts), buffer); +}; + +exports.gzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gzip(opts), buffer, callback); +}; + +exports.gzipSync = function (buffer, opts) { + return zlibBufferSync(new Gzip(opts), buffer); +}; + +exports.deflateRaw = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new DeflateRaw(opts), buffer, callback); +}; + +exports.deflateRawSync = function (buffer, opts) { + return zlibBufferSync(new DeflateRaw(opts), buffer); +}; + +exports.unzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Unzip(opts), buffer, callback); +}; + +exports.unzipSync = function (buffer, opts) { + return zlibBufferSync(new Unzip(opts), buffer); +}; + +exports.inflate = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Inflate(opts), buffer, callback); +}; + +exports.inflateSync = function (buffer, opts) { + return zlibBufferSync(new Inflate(opts), buffer); +}; + +exports.gunzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gunzip(opts), buffer, callback); +}; + +exports.gunzipSync = function (buffer, opts) { + return zlibBufferSync(new Gunzip(opts), buffer); +}; + +exports.inflateRaw = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new InflateRaw(opts), buffer, callback); +}; + +exports.inflateRawSync = function (buffer, opts) { + return zlibBufferSync(new InflateRaw(opts), buffer); +}; + +function zlibBuffer(engine, buffer, callback) { + var buffers = []; + var nread = 0; + + engine.on('error', onError); + engine.on('end', onEnd); + + engine.end(buffer); + flow(); + + function flow() { + var chunk; + while (null !== (chunk = engine.read())) { + buffers.push(chunk); + nread += chunk.length; + } + engine.once('readable', flow); + } + + function onError(err) { + engine.removeListener('end', onEnd); + engine.removeListener('readable', flow); + callback(err); + } + + function onEnd() { + var buf; + var err = null; + + if (nread >= kMaxLength) { + err = new RangeError(kRangeErrorMessage); + } else { + buf = Buffer.concat(buffers, nread); + } + + buffers = []; + engine.close(); + callback(err, buf); + } +} + +function zlibBufferSync(engine, buffer) { + if (typeof buffer === 'string') buffer = Buffer.from(buffer); + + if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer'); + + var flushFlag = engine._finishFlushFlag; + + return engine._processChunk(buffer, flushFlag); +} + +// generic zlib +// minimal 2-byte header +function Deflate(opts) { + if (!(this instanceof Deflate)) return new Deflate(opts); + Zlib.call(this, opts, binding.DEFLATE); +} + +function Inflate(opts) { + if (!(this instanceof Inflate)) return new Inflate(opts); + Zlib.call(this, opts, binding.INFLATE); +} + +// gzip - bigger header, same deflate compression +function Gzip(opts) { + if (!(this instanceof Gzip)) return new Gzip(opts); + Zlib.call(this, opts, binding.GZIP); +} + +function Gunzip(opts) { + if (!(this instanceof Gunzip)) return new Gunzip(opts); + Zlib.call(this, opts, binding.GUNZIP); +} + +// raw - no header +function DeflateRaw(opts) { + if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); + Zlib.call(this, opts, binding.DEFLATERAW); +} + +function InflateRaw(opts) { + if (!(this instanceof InflateRaw)) return new InflateRaw(opts); + Zlib.call(this, opts, binding.INFLATERAW); +} + +// auto-detect header. +function Unzip(opts) { + if (!(this instanceof Unzip)) return new Unzip(opts); + Zlib.call(this, opts, binding.UNZIP); +} + +function isValidFlushFlag(flag) { + return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK; +} + +// the Zlib class they all inherit from +// This thing manages the queue of requests, and returns +// true or false if there is anything in the queue when +// you call the .write() method. + +function Zlib(opts, mode) { + var _this = this; + + this._opts = opts = opts || {}; + this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; + + Transform.call(this, opts); + + if (opts.flush && !isValidFlushFlag(opts.flush)) { + throw new Error('Invalid flush flag: ' + opts.flush); + } + if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) { + throw new Error('Invalid flush flag: ' + opts.finishFlush); + } + + this._flushFlag = opts.flush || binding.Z_NO_FLUSH; + this._finishFlushFlag = typeof opts.finishFlush !== 'undefined' ? opts.finishFlush : binding.Z_FINISH; + + if (opts.chunkSize) { + if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK) { + throw new Error('Invalid chunk size: ' + opts.chunkSize); + } + } + + if (opts.windowBits) { + if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS) { + throw new Error('Invalid windowBits: ' + opts.windowBits); + } + } + + if (opts.level) { + if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL) { + throw new Error('Invalid compression level: ' + opts.level); + } + } + + if (opts.memLevel) { + if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL) { + throw new Error('Invalid memLevel: ' + opts.memLevel); + } + } + + if (opts.strategy) { + if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY) { + throw new Error('Invalid strategy: ' + opts.strategy); + } + } + + if (opts.dictionary) { + if (!Buffer.isBuffer(opts.dictionary)) { + throw new Error('Invalid dictionary: it should be a Buffer instance'); + } + } + + this._handle = new binding.Zlib(mode); + + var self = this; + this._hadError = false; + this._handle.onerror = function (message, errno) { + // there is no way to cleanly recover. + // continuing only obscures problems. + _close(self); + self._hadError = true; + + var error = new Error(message); + error.errno = errno; + error.code = exports.codes[errno]; + self.emit('error', error); + }; + + var level = exports.Z_DEFAULT_COMPRESSION; + if (typeof opts.level === 'number') level = opts.level; + + var strategy = exports.Z_DEFAULT_STRATEGY; + if (typeof opts.strategy === 'number') strategy = opts.strategy; + + this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary); + + this._buffer = Buffer.allocUnsafe(this._chunkSize); + this._offset = 0; + this._level = level; + this._strategy = strategy; + + this.once('end', this.close); + + Object.defineProperty(this, '_closed', { + get: function () { + return !_this._handle; + }, + configurable: true, + enumerable: true + }); +} + +util.inherits(Zlib, Transform); + +Zlib.prototype.params = function (level, strategy, callback) { + if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL) { + throw new RangeError('Invalid compression level: ' + level); + } + if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY) { + throw new TypeError('Invalid strategy: ' + strategy); + } + + if (this._level !== level || this._strategy !== strategy) { + var self = this; + this.flush(binding.Z_SYNC_FLUSH, function () { + assert(self._handle, 'zlib binding closed'); + self._handle.params(level, strategy); + if (!self._hadError) { + self._level = level; + self._strategy = strategy; + if (callback) callback(); + } + }); + } else { + process.nextTick(callback); + } +}; + +Zlib.prototype.reset = function () { + assert(this._handle, 'zlib binding closed'); + return this._handle.reset(); +}; + +// This is the _flush function called by the transform class, +// internally, when the last chunk has been written. +Zlib.prototype._flush = function (callback) { + this._transform(Buffer.alloc(0), '', callback); +}; + +Zlib.prototype.flush = function (kind, callback) { + var _this2 = this; + + var ws = this._writableState; + + if (typeof kind === 'function' || kind === undefined && !callback) { + callback = kind; + kind = binding.Z_FULL_FLUSH; + } + + if (ws.ended) { + if (callback) process.nextTick(callback); + } else if (ws.ending) { + if (callback) this.once('end', callback); + } else if (ws.needDrain) { + if (callback) { + this.once('drain', function () { + return _this2.flush(kind, callback); + }); + } + } else { + this._flushFlag = kind; + this.write(Buffer.alloc(0), '', callback); + } +}; + +Zlib.prototype.close = function (callback) { + _close(this, callback); + process.nextTick(emitCloseNT, this); +}; + +function _close(engine, callback) { + if (callback) process.nextTick(callback); + + // Caller may invoke .close after a zlib error (which will null _handle). + if (!engine._handle) return; + + engine._handle.close(); + engine._handle = null; +} + +function emitCloseNT(self) { + self.emit('close'); +} + +Zlib.prototype._transform = function (chunk, encoding, cb) { + var flushFlag; + var ws = this._writableState; + var ending = ws.ending || ws.ended; + var last = ending && (!chunk || ws.length === chunk.length); + + if (chunk !== null && !Buffer.isBuffer(chunk)) return cb(new Error('invalid input')); + + if (!this._handle) return cb(new Error('zlib binding closed')); + + // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag + // (or whatever flag was provided using opts.finishFlush). + // If it's explicitly flushing at some other time, then we use + // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression + // goodness. + if (last) flushFlag = this._finishFlushFlag;else { + flushFlag = this._flushFlag; + // once we've flushed the last of the queue, stop flushing and + // go back to the normal behavior. + if (chunk.length >= ws.length) { + this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH; + } + } + + this._processChunk(chunk, flushFlag, cb); +}; + +Zlib.prototype._processChunk = function (chunk, flushFlag, cb) { + var availInBefore = chunk && chunk.length; + var availOutBefore = this._chunkSize - this._offset; + var inOff = 0; + + var self = this; + + var async = typeof cb === 'function'; + + if (!async) { + var buffers = []; + var nread = 0; + + var error; + this.on('error', function (er) { + error = er; + }); + + assert(this._handle, 'zlib binding closed'); + do { + var res = this._handle.writeSync(flushFlag, chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + } while (!this._hadError && callback(res[0], res[1])); + + if (this._hadError) { + throw error; + } + + if (nread >= kMaxLength) { + _close(this); + throw new RangeError(kRangeErrorMessage); + } + + var buf = Buffer.concat(buffers, nread); + _close(this); + + return buf; + } + + assert(this._handle, 'zlib binding closed'); + var req = this._handle.write(flushFlag, chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + + req.buffer = chunk; + req.callback = callback; + + function callback(availInAfter, availOutAfter) { + // When the callback is used in an async write, the callback's + // context is the `req` object that was created. The req object + // is === this._handle, and that's why it's important to null + // out the values after they are done being used. `this._handle` + // can stay in memory longer than the callback and buffer are needed. + if (this) { + this.buffer = null; + this.callback = null; + } + + if (self._hadError) return; + + var have = availOutBefore - availOutAfter; + assert(have >= 0, 'have should not go down'); + + if (have > 0) { + var out = self._buffer.slice(self._offset, self._offset + have); + self._offset += have; + // serve some output to the consumer. + if (async) { + self.push(out); + } else { + buffers.push(out); + nread += out.length; + } + } + + // exhausted the output buffer, or used all the input create a new one. + if (availOutAfter === 0 || self._offset >= self._chunkSize) { + availOutBefore = self._chunkSize; + self._offset = 0; + self._buffer = Buffer.allocUnsafe(self._chunkSize); + } + + if (availOutAfter === 0) { + // Not actually done. Need to reprocess. + // Also, update the availInBefore to the availInAfter value, + // so that if we have to hit it a third (fourth, etc.) time, + // it'll have the correct byte counts. + inOff += availInBefore - availInAfter; + availInBefore = availInAfter; + + if (!async) return true; + + var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize); + newReq.callback = callback; // this same function + newReq.buffer = chunk; + return; + } + + if (!async) return false; + + // finished with the chunk. + cb(); + } +}; + +util.inherits(Deflate, Zlib); +util.inherits(Inflate, Zlib); +util.inherits(Gzip, Zlib); +util.inherits(Gunzip, Zlib); +util.inherits(DeflateRaw, Zlib); +util.inherits(InflateRaw, Zlib); +util.inherits(Unzip, Zlib); +}).call(this,require('_process')) +},{"./binding":106,"_process":109,"assert":35,"buffer":113,"stream":1394,"util":1439}],108:[function(require,module,exports){ +arguments[4][77][0].apply(exports,arguments) +},{"dup":77}],109:[function(require,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 defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +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 = runTimeout(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; + runClearTimeout(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) { + runTimeout(drainQueue); + } +}; + +// 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.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +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; }; + +},{}],110:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],111:[function(require,module,exports){ +var indexOf = function (xs, item) { + if (xs.indexOf) return xs.indexOf(item); + else for (var i = 0; i < xs.length; i++) { + if (xs[i] === item) return i; + } + return -1; +}; +var Object_keys = function (obj) { + if (Object.keys) return Object.keys(obj) + else { + var res = []; + for (var key in obj) res.push(key) + return res; + } +}; + +var forEach = function (xs, fn) { + if (xs.forEach) return xs.forEach(fn) + else for (var i = 0; i < xs.length; i++) { + fn(xs[i], i, xs); + } +}; + +var defineProp = (function() { + try { + Object.defineProperty({}, '_', {}); + return function(obj, name, value) { + Object.defineProperty(obj, name, { + writable: true, + enumerable: false, + configurable: true, + value: value + }) + }; + } catch(e) { + return function(obj, name, value) { + obj[name] = value; + }; + } +}()); + +var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function', +'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError', +'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError', +'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', +'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape']; + +function Context() {} +Context.prototype = {}; + +var Script = exports.Script = function NodeScript (code) { + if (!(this instanceof Script)) return new Script(code); + this.code = code; +}; + +Script.prototype.runInContext = function (context) { + if (!(context instanceof Context)) { + throw new TypeError("needs a 'context' argument."); + } + + var iframe = document.createElement('iframe'); + if (!iframe.style) iframe.style = {}; + iframe.style.display = 'none'; + + document.body.appendChild(iframe); + + var win = iframe.contentWindow; + var wEval = win.eval, wExecScript = win.execScript; + + if (!wEval && wExecScript) { + // win.eval() magically appears when this is called in IE: + wExecScript.call(win, 'null'); + wEval = win.eval; + } + + forEach(Object_keys(context), function (key) { + win[key] = context[key]; + }); + forEach(globals, function (key) { + if (context[key]) { + win[key] = context[key]; + } + }); + + var winKeys = Object_keys(win); + + var res = wEval.call(win, this.code); + + forEach(Object_keys(win), function (key) { + // Avoid copying circular objects like `top` and `window` by only + // updating existing context properties or new properties in the `win` + // that was only introduced after the eval. + if (key in context || indexOf(winKeys, key) === -1) { + context[key] = win[key]; + } + }); + + forEach(globals, function (key) { + if (!(key in context)) { + defineProp(context, key, win[key]); + } + }); + + document.body.removeChild(iframe); + + return res; +}; + +Script.prototype.runInThisContext = function () { + return eval(this.code); // maybe... +}; + +Script.prototype.runInNewContext = function (context) { + var ctx = Script.createContext(context); + var res = this.runInContext(ctx); + + if (context) { + forEach(Object_keys(ctx), function (key) { + context[key] = ctx[key]; + }); + } + + return res; +}; + +forEach(Object_keys(Script.prototype), function (name) { + exports[name] = Script[name] = function (code) { + var s = Script(code); + return s[name].apply(s, [].slice.call(arguments, 1)); + }; +}); + +exports.isContext = function (context) { + return context instanceof Context; +}; + +exports.createScript = function (code) { + return exports.Script(code); +}; + +exports.createContext = Script.createContext = function (context) { + var copy = new Context(); + if(typeof context === 'object') { + forEach(Object_keys(context), function (key) { + copy[key] = context[key]; + }); + } + return copy; +}; + +},{}],112:[function(require,module,exports){ +(function (Buffer){ +module.exports = function xor (a, b) { + var length = Math.min(a.length, b.length) + var buffer = new Buffer(length) + + for (var i = 0; i < length; ++i) { + buffer[i] = a[i] ^ b[i] + } + + return buffer +} + +}).call(this,require("buffer").Buffer) +},{"buffer":113}],113:[function(require,module,exports){ +(function (Buffer){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an 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+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + 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.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * 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) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof 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(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(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(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.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 === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + 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 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.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 (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + 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 (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + 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 mustMatch ? -1 : 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 'latin1': + case 'binary': + return latin1Slice(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 + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +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.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +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 + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + 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 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + 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 i + if (dir) { + var foundIndex = -1 + for (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 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +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 + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(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 latin1Write (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 + } + } 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 'latin1': + case 'binary': + return latin1Write(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 latin1Slice (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 = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + 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) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + 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) { + offset = offset >>> 0 + 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) { + offset = offset >>> 0 + 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) { + offset = offset >>> 0 + 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) { + offset = offset >>> 0 + 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) { + offset = offset >>> 0 + 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) { + offset = offset >>> 0 + 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) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + 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) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + 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) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + 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) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + 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 (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) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + 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) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + 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) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + 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 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + 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) { + value = +value + offset = offset >>> 0 + 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) { + value = +value + offset = offset >>> 0 + 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 (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + 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('Index out of range') + 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 + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + 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 (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) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } 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 + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + 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 takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().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 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 +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this,require("buffer").Buffer) +},{"base64-js":62,"buffer":113,"ieee754":827}],114:[function(require,module,exports){ +module.exports = { + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} + +},{}],115:[function(require,module,exports){ +var upperCase = require('upper-case') +var noCase = require('no-case') + +/** + * Camel case a string. + * + * @param {string} value + * @param {string} [locale] + * @return {string} + */ +module.exports = function (value, locale, mergeNumbers) { + var result = noCase(value, locale) + + // Replace periods between numeric entities with an underscore. + if (!mergeNumbers) { + result = result.replace(/ (?=\d)/g, '_') + } + + // Replace spaces between words with an upper cased character. + return result.replace(/ (.)/g, function (m, $1) { + return upperCase($1, locale) + }) +} + +},{"no-case":967,"upper-case":1430}],116:[function(require,module,exports){ +function Caseless (dict) { + this.dict = dict || {} +} +Caseless.prototype.set = function (name, value, clobber) { + if (typeof name === 'object') { + for (var i in name) { + this.set(i, name[i], value) + } + } else { + if (typeof clobber === 'undefined') clobber = true + var has = this.has(name) + + if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value + else this.dict[has || name] = value + return has + } +} +Caseless.prototype.has = function (name) { + var keys = Object.keys(this.dict) + , name = name.toLowerCase() + ; + for (var i=0;i 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript + +}).call(this,require('_process')) +},{"./templates.js":118,"_process":109,"ansi-styles":9,"escape-string-regexp":578,"supports-color":1407}],118:[function(require,module,exports){ +'use strict'; +const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; +const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; +const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; +const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + +const ESCAPES = new Map([ + ['n', '\n'], + ['r', '\r'], + ['t', '\t'], + ['b', '\b'], + ['f', '\f'], + ['v', '\v'], + ['0', '\0'], + ['\\', '\\'], + ['e', '\u001B'], + ['a', '\u0007'] +]); + +function unescape(c) { + if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) { + return String.fromCharCode(parseInt(c.slice(1), 16)); + } + + return ESCAPES.get(c) || c; +} + +function parseArguments(name, args) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if ((matches = chunk.match(STRING_REGEX))) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + + return results; +} + +function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + + const results = []; + let matches; + + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } + } + + return results; +} + +function buildStyle(chalk, styles) { + const enabled = {}; + + for (const layer of styles) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } + } + + let current = chalk; + for (const styleName of Object.keys(enabled)) { + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + + return current; +} + +module.exports = (chalk, tmp) => { + const styles = []; + const chunks = []; + let chunk = []; + + // eslint-disable-next-line max-params + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const str = chunk.join(''); + chunk = []; + chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); + styles.push({inverse, styles: parseStyle(style)}); + } else if (close) { + if (styles.length === 0) { + throw new Error('Found extraneous } in Chalk template literal'); + } + + chunks.push(buildStyle(chalk, styles)(chunk.join(''))); + chunk = []; + styles.pop(); + } else { + chunk.push(chr); + } + }); + + chunks.push(chunk.join('')); + + if (styles.length > 0) { + const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`; + throw new Error(errMsg); + } + + return chunks.join(''); +}; + +},{}],119:[function(require,module,exports){ +exports.no = exports.noCase = require('no-case') +exports.dot = exports.dotCase = require('dot-case') +exports.swap = exports.swapCase = require('swap-case') +exports.path = exports.pathCase = require('path-case') +exports.upper = exports.upperCase = require('upper-case') +exports.lower = exports.lowerCase = require('lower-case') +exports.camel = exports.camelCase = require('camel-case') +exports.snake = exports.snakeCase = require('snake-case') +exports.title = exports.titleCase = require('title-case') +exports.param = exports.paramCase = require('param-case') +exports.kebab = exports.kebabCase = exports.paramCase +exports.hyphen = exports.hyphenCase = exports.paramCase +exports.header = exports.headerCase = require('header-case') +exports.pascal = exports.pascalCase = require('pascal-case') +exports.constant = exports.constantCase = require('constant-case') +exports.sentence = exports.sentenceCase = require('sentence-case') +exports.isUpper = exports.isUpperCase = require('is-upper-case') +exports.isLower = exports.isLowerCase = require('is-lower-case') +exports.ucFirst = exports.upperCaseFirst = require('upper-case-first') +exports.lcFirst = exports.lowerCaseFirst = require('lower-case-first') + +},{"camel-case":115,"constant-case":130,"dot-case":544,"header-case":815,"is-lower-case":848,"is-upper-case":851,"lower-case":933,"lower-case-first":932,"no-case":967,"param-case":1001,"pascal-case":1010,"path-case":1012,"sentence-case":1347,"snake-case":1362,"swap-case":1408,"title-case":1417,"upper-case":1430,"upper-case-first":1429}],120:[function(require,module,exports){ +var Buffer = require('safe-buffer').Buffer +var Transform = require('stream').Transform +var StringDecoder = require('string_decoder').StringDecoder +var inherits = require('inherits') + +function CipherBase (hashMode) { + Transform.call(this) + this.hashMode = typeof hashMode === 'string' + if (this.hashMode) { + this[hashMode] = this._finalOrDigest + } else { + this.final = this._finalOrDigest + } + if (this._final) { + this.__final = this._final + this._final = null + } + this._decoder = null + this._encoding = null +} +inherits(CipherBase, Transform) + +CipherBase.prototype.update = function (data, inputEnc, outputEnc) { + if (typeof data === 'string') { + data = Buffer.from(data, inputEnc) + } + + var outData = this._update(data) + if (this.hashMode) return this + + if (outputEnc) { + outData = this._toString(outData, outputEnc) + } + + return outData +} + +CipherBase.prototype.setAutoPadding = function () {} +CipherBase.prototype.getAuthTag = function () { + throw new Error('trying to get auth tag in unsupported state') +} + +CipherBase.prototype.setAuthTag = function () { + throw new Error('trying to set auth tag in unsupported state') +} + +CipherBase.prototype.setAAD = function () { + throw new Error('trying to set aad in unsupported state') +} + +CipherBase.prototype._transform = function (data, _, next) { + var err + try { + if (this.hashMode) { + this._update(data) + } else { + this.push(this._update(data)) + } + } catch (e) { + err = e + } finally { + next(err) + } +} +CipherBase.prototype._flush = function (done) { + var err + try { + this.push(this.__final()) + } catch (e) { + err = e + } + + done(err) +} +CipherBase.prototype._finalOrDigest = function (outputEnc) { + var outData = this.__final() || Buffer.alloc(0) + if (outputEnc) { + outData = this._toString(outData, outputEnc, true) + } + return outData +} + +CipherBase.prototype._toString = function (value, enc, fin) { + if (!this._decoder) { + this._decoder = new StringDecoder(enc) + this._encoding = enc + } + + if (this._encoding !== enc) throw new Error('can\'t switch encodings') + + var out = this._decoder.write(value) + if (fin) { + out += this._decoder.end() + } + + return out +} + +module.exports = CipherBase + +},{"inherits":834,"safe-buffer":1334,"stream":1394,"string_decoder":1404}],121:[function(require,module,exports){ +/*! +Copyright (C) 2013 by WebReflection + +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 + // should be a not so common char + // possibly one JSON does not encode + // possibly one encodeURIComponent does not encode + // right now this char is '~' but this might change in the future + specialChar = '~', + safeSpecialChar = '\\x' + ( + '0' + specialChar.charCodeAt(0).toString(16) + ).slice(-2), + escapedSafeSpecialChar = '\\' + safeSpecialChar, + specialCharRG = new RegExp(safeSpecialChar, 'g'), + safeSpecialCharRG = new RegExp(escapedSafeSpecialChar, 'g'), + + safeStartWithSpecialCharRG = new RegExp('(?:^|([^\\\\]))' + escapedSafeSpecialChar), + + indexOf = [].indexOf || function(v){ + for(var i=this.length;i--&&this[i]!==v;); + return i; + }, + $String = String // there's no way to drop warnings in JSHint + // about new String ... well, I need that here! + // faked, and happy linter! +; + +function generateReplacer(value, replacer, resolve) { + var + path = [], + all = [value], + seen = [value], + mapp = [resolve ? specialChar : '[Circular]'], + last = value, + lvl = 1, + i + ; + return function(key, value) { + // the replacer has rights to decide + // if a new object should be returned + // or if there's some key to drop + // let's call it here rather than "too late" + if (replacer) value = replacer.call(this, key, value); + + // did you know ? Safari passes keys as integers for arrays + // which means if (key) when key === 0 won't pass the check + if (key !== '') { + if (last !== this) { + i = lvl - indexOf.call(all, this) - 1; + lvl -= i; + all.splice(lvl, all.length); + path.splice(lvl - 1, path.length); + last = this; + } + // console.log(lvl, key, path); + if (typeof value === 'object' && value) { + // if object isn't referring to parent object, add to the + // object path stack. Otherwise it is already there. + if (indexOf.call(all, value) < 0) { + all.push(last = value); + } + lvl = all.length; + i = indexOf.call(seen, value); + if (i < 0) { + i = seen.push(value) - 1; + if (resolve) { + // key cannot contain specialChar but could be not a string + path.push(('' + key).replace(specialCharRG, safeSpecialChar)); + mapp[i] = specialChar + path.join(specialChar); + } else { + mapp[i] = mapp[0]; + } + } else { + value = mapp[i]; + } + } else { + if (typeof value === 'string' && resolve) { + // ensure no special char involved on deserialization + // in this case only first char is important + // no need to replace all value (better performance) + value = value .replace(safeSpecialChar, escapedSafeSpecialChar) + .replace(specialChar, safeSpecialChar); + } + } + } + return value; + }; +} + +function retrieveFromPath(current, keys) { + for(var i = 0, length = keys.length; i < length; current = current[ + // keys should be normalized back here + keys[i++].replace(safeSpecialCharRG, specialChar) + ]); + return current; +} + +function generateReviver(reviver) { + return function(key, value) { + var isString = typeof value === 'string'; + if (isString && value.charAt(0) === specialChar) { + return new $String(value.slice(1)); + } + if (key === '') value = regenerate(value, value, {}); + // again, only one needed, do not use the RegExp for this replacement + // only keys need the RegExp + if (isString) value = value .replace(safeStartWithSpecialCharRG, '$1' + specialChar) + .replace(escapedSafeSpecialChar, safeSpecialChar); + return reviver ? reviver.call(this, key, value) : value; + }; +} + +function regenerateArray(root, current, retrieve) { + for (var i = 0, length = current.length; i < length; i++) { + current[i] = regenerate(root, current[i], retrieve); + } + return current; +} + +function regenerateObject(root, current, retrieve) { + for (var key in current) { + if (current.hasOwnProperty(key)) { + current[key] = regenerate(root, current[key], retrieve); + } + } + return current; +} + +function regenerate(root, current, retrieve) { + return current instanceof Array ? + // fast Array reconstruction + regenerateArray(root, current, retrieve) : + ( + current instanceof $String ? + ( + // root is an empty string + current.length ? + ( + retrieve.hasOwnProperty(current) ? + retrieve[current] : + retrieve[current] = retrieveFromPath( + root, current.split(specialChar) + ) + ) : + root + ) : + ( + current instanceof Object ? + // dedicated Object parser + regenerateObject(root, current, retrieve) : + // value as it is + current + ) + ) + ; +} + +function stringifyRecursion(value, replacer, space, doNotResolve) { + return JSON.stringify(value, generateReplacer(value, replacer, !doNotResolve), space); +} + +function parseRecursion(text, reviver) { + return JSON.parse(text, generateReviver(reviver)); +} +this.stringify = stringifyRecursion; +this.parse = parseRecursion; +},{}],122:[function(require,module,exports){ +/* MIT license */ +var cssKeywords = require('color-name'); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +var reverseKeywords = {}; +for (var key in cssKeywords) { + if (cssKeywords.hasOwnProperty(key)) { + reverseKeywords[cssKeywords[key]] = key; + } +} + +var convert = module.exports = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +// hide .channels and .labels properties +for (var model in convert) { + if (convert.hasOwnProperty(model)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + var channels = convert[model].channels; + var labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); + } +} + +convert.rgb.hsl = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c; + var m; + var y; + var k; + + k = Math.min(1 - r, 1 - g, 1 - b); + c = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +/** + * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + * */ +function comparativeDistance(x, y) { + return ( + Math.pow(x[0] - y[0], 2) + + Math.pow(x[1] - y[1], 2) + + Math.pow(x[2] - y[2], 2) + ); +} + +convert.rgb.keyword = function (rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + var currentClosestDistance = Infinity; + var currentClosestKeyword; + + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + + // Compute comparative distance + var distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + + // assume sRGB + r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); + g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); + b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); + + var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - (s * f)); + var t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + + // wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + n = wh + f * (v - wh); // linear interpolation + + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + var c = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + + r = 1 - Math.min(1, c * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // assume sRGB + r = r > 0.0031308 + ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); + + l = (116 * y) - 16; + a = 500 * (x - y); + b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c; + + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + var l = lch[0]; + var c = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + + hr = h / 360 * 2 * Math.PI; + a = c * Math.cos(hr); + b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + var ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + + // we use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + var ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + var color = args % 10; + + // handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + var mult = (~~(args > 50) + 1) * 0.5; + var r = ((color & 1) * mult) * 255; + var g = (((color >> 1) & 1) * mult) * 255; + var b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // handle greyscale + if (args >= 232) { + var c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + var integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + var colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(function (char) { + return char + char; + }).join(''); + } + + var integer = parseInt(colorString, 16); + var r = (integer >> 16) & 0xFF; + var g = (integer >> 8) & 0xFF; + var b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = (max - min); + var grayscale; + var hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c = 1; + var f = 0; + + if (l < 0.5) { + c = 2.0 * s * l; + } else { + c = 2.0 * s * (1.0 - l); + } + + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + + var c = s * v; + var f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + var h = hcg[0] / 360; + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + var pure = [0, 0, 0]; + var hi = (h % 1) * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var v = c + g * (1.0 - c); + var f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + + var l = g * (1.0 - c) + 0.5 * c; + var s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + var c = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c = v - w; + var g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = convert.gray.hsv = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + var val = Math.round(gray[0] / 100 * 255) & 0xFF; + var integer = (val << 16) + (val << 8) + val; + + var string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; + +},{"color-name":125}],123:[function(require,module,exports){ +var conversions = require('./conversions'); +var route = require('./route'); + +var convert = {}; + +var models = Object.keys(conversions); + +function wrapRaw(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + return fn(args); + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + var wrappedFn = function (args) { + if (args === undefined || args === null) { + return args; + } + + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + + var result = fn(args); + + // we're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(function (fromModel) { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + var routes = route(fromModel); + var routeModels = Object.keys(routes); + + routeModels.forEach(function (toModel) { + var fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; + +},{"./conversions":122,"./route":124}],124:[function(require,module,exports){ +var conversions = require('./conversions'); + +/* + this function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + var graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + var models = Object.keys(conversions); + + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; // unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + var path = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + + if (node.parent === null) { + // no possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + + +},{"./conversions":122}],125:[function(require,module,exports){ +'use strict' + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + +},{}],126:[function(require,module,exports){ +module.exports = colorSupport({ alwaysReturn: true }, colorSupport) + +function colorSupport(options, obj) { + obj = obj || {} + options = options || {} + obj.level = 0 + obj.hasBasic = false + obj.has256 = false + obj.has16m = false + if (!options.alwaysReturn) { + return false + } + return obj +} + +},{}],127:[function(require,module,exports){ +(function (Buffer){ +var util = require('util'); +var Stream = require('stream').Stream; +var DelayedStream = require('delayed-stream'); +var defer = require('./defer.js'); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; +}; + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); + } + } + + this._streams.push(stream); + return this; +}; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + var stream = this._streams.shift(); + + + if (typeof stream == 'undefined') { + this.end(); + return; + } + + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + defer(this._pipeNext.bind(this, stream)); + }.bind(this)); +}; + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); +}; + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; + } + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; + +}).call(this,{"isBuffer":require("../../is-buffer/index.js")}) +},{"../../is-buffer/index.js":839,"./defer.js":128,"delayed-stream":532,"stream":1394,"util":1439}],128:[function(require,module,exports){ +(function (process,setImmediate){ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} + +}).call(this,require('_process'),require("timers").setImmediate) +},{"_process":109,"timers":1415}],129:[function(require,module,exports){ +/** + * toString ref. + */ + +var toString = Object.prototype.toString; + +/** + * Return the type of `val`. + * + * @param {Mixed} val + * @return {String} + * @api public + */ + +module.exports = function(val){ + switch (toString.call(val)) { + case '[object Date]': return 'date'; + case '[object RegExp]': return 'regexp'; + case '[object Arguments]': return 'arguments'; + case '[object Array]': return 'array'; + case '[object Error]': return 'error'; + } + + if (val === null) return 'null'; + if (val === undefined) return 'undefined'; + if (val !== val) return 'nan'; + if (val && val.nodeType === 1) return 'element'; + + if (isBuffer(val)) return 'buffer'; + + val = val.valueOf + ? val.valueOf() + : Object.prototype.valueOf.apply(val); + + return typeof val; +}; + +// code borrowed from https://github.com/feross/is-buffer/blob/master/index.js +function isBuffer(obj) { + return !!(obj != null && + (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) + (obj.constructor && + typeof obj.constructor.isBuffer === 'function' && + obj.constructor.isBuffer(obj)) + )) +} + +},{}],130:[function(require,module,exports){ +var upperCase = require('upper-case') +var snakeCase = require('snake-case') + +/** + * Constant case a string. + * + * @param {string} value + * @param {string} [locale] + * @return {string} + */ +module.exports = function (value, locale) { + return upperCase(snakeCase(value, locale), locale) +} + +},{"snake-case":1362,"upper-case":1430}],131:[function(require,module,exports){ +module.exports={ + "O_RDONLY": 0, + "O_WRONLY": 1, + "O_RDWR": 2, + "S_IFMT": 61440, + "S_IFREG": 32768, + "S_IFDIR": 16384, + "S_IFCHR": 8192, + "S_IFBLK": 24576, + "S_IFIFO": 4096, + "S_IFLNK": 40960, + "S_IFSOCK": 49152, + "O_CREAT": 512, + "O_EXCL": 2048, + "O_NOCTTY": 131072, + "O_TRUNC": 1024, + "O_APPEND": 8, + "O_DIRECTORY": 1048576, + "O_NOFOLLOW": 256, + "O_SYNC": 128, + "O_SYMLINK": 2097152, + "O_NONBLOCK": 4, + "S_IRWXU": 448, + "S_IRUSR": 256, + "S_IWUSR": 128, + "S_IXUSR": 64, + "S_IRWXG": 56, + "S_IRGRP": 32, + "S_IWGRP": 16, + "S_IXGRP": 8, + "S_IRWXO": 7, + "S_IROTH": 4, + "S_IWOTH": 2, + "S_IXOTH": 1, + "E2BIG": 7, + "EACCES": 13, + "EADDRINUSE": 48, + "EADDRNOTAVAIL": 49, + "EAFNOSUPPORT": 47, + "EAGAIN": 35, + "EALREADY": 37, + "EBADF": 9, + "EBADMSG": 94, + "EBUSY": 16, + "ECANCELED": 89, + "ECHILD": 10, + "ECONNABORTED": 53, + "ECONNREFUSED": 61, + "ECONNRESET": 54, + "EDEADLK": 11, + "EDESTADDRREQ": 39, + "EDOM": 33, + "EDQUOT": 69, + "EEXIST": 17, + "EFAULT": 14, + "EFBIG": 27, + "EHOSTUNREACH": 65, + "EIDRM": 90, + "EILSEQ": 92, + "EINPROGRESS": 36, + "EINTR": 4, + "EINVAL": 22, + "EIO": 5, + "EISCONN": 56, + "EISDIR": 21, + "ELOOP": 62, + "EMFILE": 24, + "EMLINK": 31, + "EMSGSIZE": 40, + "EMULTIHOP": 95, + "ENAMETOOLONG": 63, + "ENETDOWN": 50, + "ENETRESET": 52, + "ENETUNREACH": 51, + "ENFILE": 23, + "ENOBUFS": 55, + "ENODATA": 96, + "ENODEV": 19, + "ENOENT": 2, + "ENOEXEC": 8, + "ENOLCK": 77, + "ENOLINK": 97, + "ENOMEM": 12, + "ENOMSG": 91, + "ENOPROTOOPT": 42, + "ENOSPC": 28, + "ENOSR": 98, + "ENOSTR": 99, + "ENOSYS": 78, + "ENOTCONN": 57, + "ENOTDIR": 20, + "ENOTEMPTY": 66, + "ENOTSOCK": 38, + "ENOTSUP": 45, + "ENOTTY": 25, + "ENXIO": 6, + "EOPNOTSUPP": 102, + "EOVERFLOW": 84, + "EPERM": 1, + "EPIPE": 32, + "EPROTO": 100, + "EPROTONOSUPPORT": 43, + "EPROTOTYPE": 41, + "ERANGE": 34, + "EROFS": 30, + "ESPIPE": 29, + "ESRCH": 3, + "ESTALE": 70, + "ETIME": 101, + "ETIMEDOUT": 60, + "ETXTBSY": 26, + "EWOULDBLOCK": 35, + "EXDEV": 18, + "SIGHUP": 1, + "SIGINT": 2, + "SIGQUIT": 3, + "SIGILL": 4, + "SIGTRAP": 5, + "SIGABRT": 6, + "SIGIOT": 6, + "SIGBUS": 10, + "SIGFPE": 8, + "SIGKILL": 9, + "SIGUSR1": 30, + "SIGSEGV": 11, + "SIGUSR2": 31, + "SIGPIPE": 13, + "SIGALRM": 14, + "SIGTERM": 15, + "SIGCHLD": 20, + "SIGCONT": 19, + "SIGSTOP": 17, + "SIGTSTP": 18, + "SIGTTIN": 21, + "SIGTTOU": 22, + "SIGURG": 16, + "SIGXCPU": 24, + "SIGXFSZ": 25, + "SIGVTALRM": 26, + "SIGPROF": 27, + "SIGWINCH": 28, + "SIGIO": 23, + "SIGSYS": 12, + "SSL_OP_ALL": 2147486719, + "SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION": 262144, + "SSL_OP_CIPHER_SERVER_PREFERENCE": 4194304, + "SSL_OP_CISCO_ANYCONNECT": 32768, + "SSL_OP_COOKIE_EXCHANGE": 8192, + "SSL_OP_CRYPTOPRO_TLSEXT_BUG": 2147483648, + "SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS": 2048, + "SSL_OP_EPHEMERAL_RSA": 0, + "SSL_OP_LEGACY_SERVER_CONNECT": 4, + "SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER": 32, + "SSL_OP_MICROSOFT_SESS_ID_BUG": 1, + "SSL_OP_MSIE_SSLV2_RSA_PADDING": 0, + "SSL_OP_NETSCAPE_CA_DN_BUG": 536870912, + "SSL_OP_NETSCAPE_CHALLENGE_BUG": 2, + "SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG": 1073741824, + "SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG": 8, + "SSL_OP_NO_COMPRESSION": 131072, + "SSL_OP_NO_QUERY_MTU": 4096, + "SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION": 65536, + "SSL_OP_NO_SSLv2": 16777216, + "SSL_OP_NO_SSLv3": 33554432, + "SSL_OP_NO_TICKET": 16384, + "SSL_OP_NO_TLSv1": 67108864, + "SSL_OP_NO_TLSv1_1": 268435456, + "SSL_OP_NO_TLSv1_2": 134217728, + "SSL_OP_PKCS1_CHECK_1": 0, + "SSL_OP_PKCS1_CHECK_2": 0, + "SSL_OP_SINGLE_DH_USE": 1048576, + "SSL_OP_SINGLE_ECDH_USE": 524288, + "SSL_OP_SSLEAY_080_CLIENT_DH_BUG": 128, + "SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG": 0, + "SSL_OP_TLS_BLOCK_PADDING_BUG": 512, + "SSL_OP_TLS_D5_BUG": 256, + "SSL_OP_TLS_ROLLBACK_BUG": 8388608, + "ENGINE_METHOD_DSA": 2, + "ENGINE_METHOD_DH": 4, + "ENGINE_METHOD_RAND": 8, + "ENGINE_METHOD_ECDH": 16, + "ENGINE_METHOD_ECDSA": 32, + "ENGINE_METHOD_CIPHERS": 64, + "ENGINE_METHOD_DIGESTS": 128, + "ENGINE_METHOD_STORE": 256, + "ENGINE_METHOD_PKEY_METHS": 512, + "ENGINE_METHOD_PKEY_ASN1_METHS": 1024, + "ENGINE_METHOD_ALL": 65535, + "ENGINE_METHOD_NONE": 0, + "DH_CHECK_P_NOT_SAFE_PRIME": 2, + "DH_CHECK_P_NOT_PRIME": 1, + "DH_UNABLE_TO_CHECK_GENERATOR": 4, + "DH_NOT_SUITABLE_GENERATOR": 8, + "NPN_ENABLED": 1, + "RSA_PKCS1_PADDING": 1, + "RSA_SSLV23_PADDING": 2, + "RSA_NO_PADDING": 3, + "RSA_PKCS1_OAEP_PADDING": 4, + "RSA_X931_PADDING": 5, + "RSA_PKCS1_PSS_PADDING": 6, + "POINT_CONVERSION_COMPRESSED": 2, + "POINT_CONVERSION_UNCOMPRESSED": 4, + "POINT_CONVERSION_HYBRID": 6, + "F_OK": 0, + "R_OK": 4, + "W_OK": 2, + "X_OK": 1, + "UV_UDP_REUSEADDR": 4 +} + +},{}],132:[function(require,module,exports){ +/* jshint node: true */ +(function () { + "use strict"; + + function CookieAccessInfo(domain, path, secure, script) { + if (this instanceof CookieAccessInfo) { + this.domain = domain || undefined; + this.path = path || "/"; + this.secure = !!secure; + this.script = !!script; + return this; + } + return new CookieAccessInfo(domain, path, secure, script); + } + CookieAccessInfo.All = Object.freeze(Object.create(null)); + exports.CookieAccessInfo = CookieAccessInfo; + + function Cookie(cookiestr, request_domain, request_path) { + if (cookiestr instanceof Cookie) { + return cookiestr; + } + if (this instanceof Cookie) { + this.name = null; + this.value = null; + this.expiration_date = Infinity; + this.path = String(request_path || "/"); + this.explicit_path = false; + this.domain = request_domain || null; + this.explicit_domain = false; + this.secure = false; //how to define default? + this.noscript = false; //httponly + if (cookiestr) { + this.parse(cookiestr, request_domain, request_path); + } + return this; + } + return new Cookie(cookiestr, request_domain, request_path); + } + exports.Cookie = Cookie; + + Cookie.prototype.toString = function toString() { + var str = [this.name + "=" + this.value]; + if (this.expiration_date !== Infinity) { + str.push("expires=" + (new Date(this.expiration_date)).toGMTString()); + } + if (this.domain) { + str.push("domain=" + this.domain); + } + if (this.path) { + str.push("path=" + this.path); + } + if (this.secure) { + str.push("secure"); + } + if (this.noscript) { + str.push("httponly"); + } + return str.join("; "); + }; + + Cookie.prototype.toValueString = function toValueString() { + return this.name + "=" + this.value; + }; + + var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g; + Cookie.prototype.parse = function parse(str, request_domain, request_path) { + if (this instanceof Cookie) { + var parts = str.split(";").filter(function (value) { + return !!value; + }); + var i; + + var pair = parts[0].match(/([^=]+)=([\s\S]*)/); + if (!pair) { + console.warn("Invalid cookie header encountered. Header: '"+str+"'"); + return; + } + + var key = pair[1]; + var value = pair[2]; + if ( typeof key !== 'string' || key.length === 0 || typeof value !== 'string' ) { + console.warn("Unable to extract values from cookie header. Cookie: '"+str+"'"); + return; + } + + this.name = key; + this.value = value; + + for (i = 1; i < parts.length; i += 1) { + pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/); + key = pair[1].trim().toLowerCase(); + value = pair[2]; + switch (key) { + case "httponly": + this.noscript = true; + break; + case "expires": + this.expiration_date = value ? + Number(Date.parse(value)) : + Infinity; + break; + case "path": + this.path = value ? + value.trim() : + ""; + this.explicit_path = true; + break; + case "domain": + this.domain = value ? + value.trim() : + ""; + this.explicit_domain = !!this.domain; + break; + case "secure": + this.secure = true; + break; + } + } + + if (!this.explicit_path) { + this.path = request_path || "/"; + } + if (!this.explicit_domain) { + this.domain = request_domain; + } + + return this; + } + return new Cookie().parse(str, request_domain, request_path); + }; + + Cookie.prototype.matches = function matches(access_info) { + if (access_info === CookieAccessInfo.All) { + return true; + } + if (this.noscript && access_info.script || + this.secure && !access_info.secure || + !this.collidesWith(access_info)) { + return false; + } + return true; + }; + + Cookie.prototype.collidesWith = function collidesWith(access_info) { + if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) { + return false; + } + if (this.path && access_info.path.indexOf(this.path) !== 0) { + return false; + } + if (this.explicit_path && access_info.path.indexOf( this.path ) !== 0) { + return false; + } + var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,''); + var cookie_domain = this.domain && this.domain.replace(/^[\.]/,''); + if (cookie_domain === access_domain) { + return true; + } + if (cookie_domain) { + if (!this.explicit_domain) { + return false; // we already checked if the domains were exactly the same + } + var wildcard = access_domain.indexOf(cookie_domain); + if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) { + return false; + } + return true; + } + return true; + }; + + function CookieJar() { + var cookies, cookies_list, collidable_cookie; + if (this instanceof CookieJar) { + cookies = Object.create(null); //name: [Cookie] + + this.setCookie = function setCookie(cookie, request_domain, request_path) { + var remove, i; + cookie = new Cookie(cookie, request_domain, request_path); + //Delete the cookie if the set is past the current time + remove = cookie.expiration_date <= Date.now(); + if (cookies[cookie.name] !== undefined) { + cookies_list = cookies[cookie.name]; + for (i = 0; i < cookies_list.length; i += 1) { + collidable_cookie = cookies_list[i]; + if (collidable_cookie.collidesWith(cookie)) { + if (remove) { + cookies_list.splice(i, 1); + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + return false; + } + cookies_list[i] = cookie; + return cookie; + } + } + if (remove) { + return false; + } + cookies_list.push(cookie); + return cookie; + } + if (remove) { + return false; + } + cookies[cookie.name] = [cookie]; + return cookies[cookie.name]; + }; + //returns a cookie + this.getCookie = function getCookie(cookie_name, access_info) { + var cookie, i; + cookies_list = cookies[cookie_name]; + if (!cookies_list) { + return; + } + for (i = 0; i < cookies_list.length; i += 1) { + cookie = cookies_list[i]; + if (cookie.expiration_date <= Date.now()) { + if (cookies_list.length === 0) { + delete cookies[cookie.name]; + } + continue; + } + + if (cookie.matches(access_info)) { + return cookie; + } + } + }; + //returns a list of cookies + this.getCookies = function getCookies(access_info) { + var matches = [], cookie_name, cookie; + for (cookie_name in cookies) { + cookie = this.getCookie(cookie_name, access_info); + if (cookie) { + matches.push(cookie); + } + } + matches.toString = function toString() { + return matches.join(":"); + }; + matches.toValueString = function toValueString() { + return matches.map(function (c) { + return c.toValueString(); + }).join(';'); + }; + return matches; + }; + + return this; + } + return new CookieJar(); + } + exports.CookieJar = CookieJar; + + //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned. + CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) { + cookies = Array.isArray(cookies) ? + cookies : + cookies.split(cookie_str_splitter); + var successful = [], + i, + cookie; + cookies = cookies.map(function(item){ + return new Cookie(item, request_domain, request_path); + }); + for (i = 0; i < cookies.length; i += 1) { + cookie = cookies[i]; + if (this.setCookie(cookie, request_domain, request_path)) { + successful.push(cookie); + } + } + return successful; + }; +}()); + +},{}],133:[function(require,module,exports){ +/*! + * copy-descriptor + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +/** + * Copy a descriptor from one object to another. + * + * ```js + * function App() { + * this.cache = {}; + * } + * App.prototype.set = function(key, val) { + * this.cache[key] = val; + * return this; + * }; + * Object.defineProperty(App.prototype, 'count', { + * get: function() { + * return Object.keys(this.cache).length; + * } + * }); + * + * copy(App.prototype, 'count', 'len'); + * + * // create an instance + * var app = new App(); + * + * app.set('a', true); + * app.set('b', true); + * app.set('c', true); + * + * console.log(app.count); + * //=> 3 + * console.log(app.len); + * //=> 3 + * ``` + * @name copy + * @param {Object} `receiver` The target object + * @param {Object} `provider` The provider object + * @param {String} `from` The key to copy on provider. + * @param {String} `to` Optionally specify a new key name to use. + * @return {Object} + * @api public + */ + +module.exports = function copyDescriptor(receiver, provider, from, to) { + if (!isObject(provider) && typeof provider !== 'function') { + to = from; + from = provider; + provider = receiver; + } + if (!isObject(receiver) && typeof receiver !== 'function') { + throw new TypeError('expected the first argument to be an object'); + } + if (!isObject(provider) && typeof provider !== 'function') { + throw new TypeError('expected provider to be an object'); + } + + if (typeof to !== 'string') { + to = from; + } + if (typeof from !== 'string') { + throw new TypeError('expected key to be a string'); + } + + if (!(from in provider)) { + throw new Error('property "' + from + '" does not exist'); + } + + var val = Object.getOwnPropertyDescriptor(provider, from); + if (val) Object.defineProperty(receiver, to, val); +}; + +function isObject(val) { + return {}.toString.call(val) === '[object Object]'; +} + + +},{}],134:[function(require,module,exports){ +'use strict'; +module.exports = input => { + const el = document.createElement('textarea'); + + el.value = input; + + // Prevent keyboard from showing on mobile + el.setAttribute('readonly', ''); + + el.style.contain = 'strict'; + el.style.position = 'absolute'; + el.style.left = '-9999px'; + el.style.fontSize = '12pt'; // Prevent zooming on iOS + + const selection = document.getSelection(); + let originalRange = false; + if (selection.rangeCount > 0) { + originalRange = selection.getRangeAt(0); + } + + document.body.appendChild(el); + el.select(); + + // Explicit selection workaround for iOS + el.selectionStart = 0; + el.selectionEnd = input.length; + + let success = false; + try { + success = document.execCommand('copy'); + } catch (err) {} + + document.body.removeChild(el); + + if (originalRange) { + selection.removeAllRanges(); + selection.addRange(originalRange); + } + + return success; +}; + +},{}],135:[function(require,module,exports){ +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp.escape; + +},{"../../modules/_core":157,"../../modules/core.regexp.escape":265}],136:[function(require,module,exports){ +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + +},{}],137:[function(require,module,exports){ +var cof = require('./_cof'); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + +},{"./_cof":152}],138:[function(require,module,exports){ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./_wks')('unscopables'); +var ArrayProto = Array.prototype; +if (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {}); +module.exports = function (key) { + ArrayProto[UNSCOPABLES][key] = true; +}; + +},{"./_hide":177,"./_wks":263}],139:[function(require,module,exports){ +'use strict'; +var at = require('./_string-at')(true); + + // `AdvanceStringIndex` abstract operation +// https://tc39.github.io/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? at(S, index).length : 1); +}; + +},{"./_string-at":240}],140:[function(require,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; +}; + +},{}],141:[function(require,module,exports){ +var isObject = require('./_is-object'); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + +},{"./_is-object":186}],142:[function(require,module,exports){ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + +},{"./_to-absolute-index":248,"./_to-length":252,"./_to-object":253}],143:[function(require,module,exports){ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + +},{"./_to-absolute-index":248,"./_to-length":252,"./_to-object":253}],144:[function(require,module,exports){ +var forOf = require('./_for-of'); + +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; + +},{"./_for-of":173}],145:[function(require,module,exports){ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); +var toAbsoluteIndex = require('./_to-absolute-index'); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +},{"./_to-absolute-index":248,"./_to-iobject":251,"./_to-length":252}],146:[function(require,module,exports){ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = require('./_ctx'); +var IObject = require('./_iobject'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var asc = require('./_array-species-create'); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var 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; + }; +}; + +},{"./_array-species-create":149,"./_ctx":159,"./_iobject":182,"./_to-length":252,"./_to-object":253}],147:[function(require,module,exports){ +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var toLength = require('./_to-length'); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + +},{"./_a-function":136,"./_iobject":182,"./_to-length":252,"./_to-object":253}],148:[function(require,module,exports){ +var isObject = require('./_is-object'); +var isArray = require('./_is-array'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + +},{"./_is-array":184,"./_is-object":186,"./_wks":263}],149:[function(require,module,exports){ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + +},{"./_array-species-constructor":148}],150:[function(require,module,exports){ +'use strict'; +var aFunction = require('./_a-function'); +var isObject = require('./_is-object'); +var invoke = require('./_invoke'); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + +},{"./_a-function":136,"./_invoke":181,"./_is-object":186}],151:[function(require,module,exports){ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof'); +var TAG = require('./_wks')('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + +},{"./_cof":152,"./_wks":263}],152:[function(require,module,exports){ +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + +},{}],153:[function(require,module,exports){ +'use strict'; +var dP = require('./_object-dp').f; +var create = require('./_object-create'); +var redefineAll = require('./_redefine-all'); +var ctx = require('./_ctx'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var $iterDefine = require('./_iter-define'); +var step = require('./_iter-step'); +var setSpecies = require('./_set-species'); +var DESCRIPTORS = require('./_descriptors'); +var fastKey = require('./_meta').fastKey; +var validate = require('./_validate-collection'); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + +},{"./_an-instance":140,"./_ctx":159,"./_descriptors":163,"./_for-of":173,"./_iter-define":190,"./_iter-step":192,"./_meta":200,"./_object-create":205,"./_object-dp":206,"./_redefine-all":225,"./_set-species":234,"./_validate-collection":260}],154:[function(require,module,exports){ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof'); +var from = require('./_array-from-iterable'); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; + +},{"./_array-from-iterable":144,"./_classof":151}],155:[function(require,module,exports){ +'use strict'; +var redefineAll = require('./_redefine-all'); +var getWeak = require('./_meta').getWeak; +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var createArrayMethod = require('./_array-methods'); +var $has = require('./_has'); +var validate = require('./_validate-collection'); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + +},{"./_an-instance":140,"./_an-object":141,"./_array-methods":146,"./_for-of":173,"./_has":176,"./_is-object":186,"./_meta":200,"./_redefine-all":225,"./_validate-collection":260}],156:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var redefineAll = require('./_redefine-all'); +var meta = require('./_meta'); +var forOf = require('./_for-of'); +var anInstance = require('./_an-instance'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var $iterDetect = require('./_iter-detect'); +var setToStringTag = require('./_set-to-string-tag'); +var inheritIfRequired = require('./_inherit-if-required'); + +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + var fixMethod = function (KEY) { + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function (a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a) { + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a) { + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + if (!ACCEPT_ITERABLES) { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base(), target, C); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + // weak collections should not contains .clear method + if (IS_WEAK && proto.clear) delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + + return C; +}; + +},{"./_an-instance":140,"./_export":167,"./_fails":169,"./_for-of":173,"./_global":175,"./_inherit-if-required":180,"./_is-object":186,"./_iter-detect":191,"./_meta":200,"./_redefine":226,"./_redefine-all":225,"./_set-to-string-tag":235}],157:[function(require,module,exports){ +var core = module.exports = { version: '2.6.5' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + +},{}],158:[function(require,module,exports){ +'use strict'; +var $defineProperty = require('./_object-dp'); +var createDesc = require('./_property-desc'); + +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; + +},{"./_object-dp":206,"./_property-desc":224}],159:[function(require,module,exports){ +// optional / simple context binding +var aFunction = require('./_a-function'); +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); + }; +}; + +},{"./_a-function":136}],160:[function(require,module,exports){ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var fails = require('./_fails'); +var getTime = Date.prototype.getTime; +var $toISOString = Date.prototype.toISOString; + +var lz = function (num) { + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +module.exports = (fails(function () { + return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; +}) || !fails(function () { + $toISOString.call(new Date(NaN)); +})) ? function toISOString() { + if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); + var d = this; + var y = d.getUTCFullYear(); + var m = d.getUTCMilliseconds(); + var s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; +} : $toISOString; + +},{"./_fails":169}],161:[function(require,module,exports){ +'use strict'; +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); +var NUMBER = 'number'; + +module.exports = function (hint) { + if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; + +},{"./_an-object":141,"./_to-primitive":254}],162:[function(require,module,exports){ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + +},{}],163:[function(require,module,exports){ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + +},{"./_fails":169}],164:[function(require,module,exports){ +var isObject = require('./_is-object'); +var document = require('./_global').document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + +},{"./_global":175,"./_is-object":186}],165:[function(require,module,exports){ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + +},{}],166:[function(require,module,exports){ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + +},{"./_object-gops":212,"./_object-keys":215,"./_object-pie":216}],167:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var hide = require('./_hide'); +var redefine = require('./_redefine'); +var ctx = require('./_ctx'); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var 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; + +},{"./_core":157,"./_ctx":159,"./_global":175,"./_hide":177,"./_redefine":226}],168:[function(require,module,exports){ +var MATCH = require('./_wks')('match'); +module.exports = function (KEY) { + var re = /./; + try { + '/./'[KEY](re); + } catch (e) { + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch (f) { /* empty */ } + } return true; +}; + +},{"./_wks":263}],169:[function(require,module,exports){ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + +},{}],170:[function(require,module,exports){ +'use strict'; +require('./es6.regexp.exec'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var wks = require('./_wks'); +var regexpExec = require('./_regexp-exec'); + +var SPECIES = wks('species'); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + // #replace needs built-in support for named groups. + // #match works fine because it just return the exec results, even if it has + // a "grops" property. + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + return ''.replace(re, '$') !== '7'; +}); + +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; +})(); + +module.exports = function (KEY, length, exec) { + var SYMBOL = wks(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + re.exec = function () { execCalled = true; return null; }; + if (KEY === 'split') { + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + } + re[SYMBOL](''); + return !execCalled; + }) : undefined; + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) + ) { + var nativeRegExpMethod = /./[SYMBOL]; + var fns = exec( + defined, + SYMBOL, + ''[KEY], + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { + if (regexp.exec === regexpExec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; + } + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; + } + return { done: false }; + } + ); + var strfn = fns[0]; + var rxfn = fns[1]; + + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function (string, arg) { return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function (string) { return rxfn.call(string, this); } + ); + } +}; + +},{"./_defined":162,"./_fails":169,"./_hide":177,"./_redefine":226,"./_regexp-exec":228,"./_wks":263,"./es6.regexp.exec":360}],171:[function(require,module,exports){ +'use strict'; +// 21.2.5.3 get RegExp.prototype.flags +var anObject = require('./_an-object'); +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + +},{"./_an-object":141}],172:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray +var isArray = require('./_is-array'); +var isObject = require('./_is-object'); +var toLength = require('./_to-length'); +var ctx = require('./_ctx'); +var IS_CONCAT_SPREADABLE = require('./_wks')('isConcatSpreadable'); + +function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) { + var targetIndex = start; + var sourceIndex = 0; + var mapFn = mapper ? ctx(mapper, thisArg, 3) : false; + var element, spreadable; + + while (sourceIndex < sourceLen) { + if (sourceIndex in source) { + element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex]; + + spreadable = false; + if (isObject(element)) { + spreadable = element[IS_CONCAT_SPREADABLE]; + spreadable = spreadable !== undefined ? !!spreadable : isArray(element); + } + + if (spreadable && depth > 0) { + targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1; + } else { + if (targetIndex >= 0x1fffffffffffff) throw TypeError(); + target[targetIndex] = element; + } + + targetIndex++; + } + sourceIndex++; + } + return targetIndex; +} + +module.exports = flattenIntoArray; + +},{"./_ctx":159,"./_is-array":184,"./_is-object":186,"./_to-length":252,"./_wks":263}],173:[function(require,module,exports){ +var ctx = require('./_ctx'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var getIterFn = require('./core.get-iterator-method'); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + +},{"./_an-object":141,"./_ctx":159,"./_is-array-iter":183,"./_iter-call":188,"./_to-length":252,"./core.get-iterator-method":264}],174:[function(require,module,exports){ +module.exports = require('./_shared')('native-function-to-string', Function.toString); + +},{"./_shared":237}],175:[function(require,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 + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + +},{}],176:[function(require,module,exports){ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + +},{}],177:[function(require,module,exports){ +var dP = require('./_object-dp'); +var createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + +},{"./_descriptors":163,"./_object-dp":206,"./_property-desc":224}],178:[function(require,module,exports){ +var document = require('./_global').document; +module.exports = document && document.documentElement; + +},{"./_global":175}],179:[function(require,module,exports){ +module.exports = !require('./_descriptors') && !require('./_fails')(function () { + return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + +},{"./_descriptors":163,"./_dom-create":164,"./_fails":169}],180:[function(require,module,exports){ +var isObject = require('./_is-object'); +var setPrototypeOf = require('./_set-proto').set; +module.exports = function (that, target, C) { + var S = target.constructor; + var P; + if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { + setPrototypeOf(that, P); + } return that; +}; + +},{"./_is-object":186,"./_set-proto":233}],181:[function(require,module,exports){ +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; + +},{}],182:[function(require,module,exports){ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + +},{"./_cof":152}],183:[function(require,module,exports){ +// check on default Array iterator +var Iterators = require('./_iterators'); +var ITERATOR = require('./_wks')('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + +},{"./_iterators":193,"./_wks":263}],184:[function(require,module,exports){ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + +},{"./_cof":152}],185:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object'); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + +},{"./_is-object":186}],186:[function(require,module,exports){ +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +},{}],187:[function(require,module,exports){ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object'); +var cof = require('./_cof'); +var MATCH = require('./_wks')('match'); +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; + +},{"./_cof":152,"./_is-object":186,"./_wks":263}],188:[function(require,module,exports){ +// call something on iterator step with safe closing on error +var anObject = require('./_an-object'); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; + +},{"./_an-object":141}],189:[function(require,module,exports){ +'use strict'; +var create = require('./_object-create'); +var descriptor = require('./_property-desc'); +var setToStringTag = require('./_set-to-string-tag'); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + +},{"./_hide":177,"./_object-create":205,"./_property-desc":224,"./_set-to-string-tag":235,"./_wks":263}],190:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var $iterCreate = require('./_iter-create'); +var setToStringTag = require('./_set-to-string-tag'); +var getPrototypeOf = require('./_object-gpo'); +var ITERATOR = require('./_wks')('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + +},{"./_export":167,"./_hide":177,"./_iter-create":189,"./_iterators":193,"./_library":194,"./_object-gpo":213,"./_redefine":226,"./_set-to-string-tag":235,"./_wks":263}],191:[function(require,module,exports){ +var ITERATOR = require('./_wks')('iterator'); +var SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } + +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; + +},{"./_wks":263}],192:[function(require,module,exports){ +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + +},{}],193:[function(require,module,exports){ +module.exports = {}; + +},{}],194:[function(require,module,exports){ +module.exports = false; + +},{}],195:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x) { + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; + +},{}],196:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var sign = require('./_math-sign'); +var pow = Math.pow; +var EPSILON = pow(2, -52); +var EPSILON32 = pow(2, -23); +var MAX32 = pow(2, 127) * (2 - EPSILON32); +var MIN32 = pow(2, -126); + +var roundTiesToEven = function (n) { + return n + 1 / EPSILON - 1 / EPSILON; +}; + +module.exports = Math.fround || function fround(x) { + var $abs = Math.abs(x); + var $sign = sign(x); + var a, result; + if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + // eslint-disable-next-line no-self-compare + if (result > MAX32 || result != result) return $sign * Infinity; + return $sign * result; +}; + +},{"./_math-sign":199}],197:[function(require,module,exports){ +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + +},{}],198:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) { + if ( + arguments.length === 0 + // eslint-disable-next-line no-self-compare + || x != x + // eslint-disable-next-line no-self-compare + || inLow != inLow + // eslint-disable-next-line no-self-compare + || inHigh != inHigh + // eslint-disable-next-line no-self-compare + || outLow != outLow + // eslint-disable-next-line no-self-compare + || outHigh != outHigh + ) return NaN; + if (x === Infinity || x === -Infinity) return x; + return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; +}; + +},{}],199:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; + +},{}],200:[function(require,module,exports){ +var META = require('./_uid')('meta'); +var isObject = require('./_is-object'); +var has = require('./_has'); +var setDesc = require('./_object-dp').f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !require('./_fails')(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 +}; + +},{"./_fails":169,"./_has":176,"./_is-object":186,"./_object-dp":206,"./_uid":258}],201:[function(require,module,exports){ +var Map = require('./es6.map'); +var $export = require('./_export'); +var shared = require('./_shared')('metadata'); +var store = shared.store || (shared.store = new (require('./es6.weak-map'))()); + +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); + var 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 +}; + +},{"./_export":167,"./_shared":237,"./es6.map":295,"./es6.weak-map":402}],202:[function(require,module,exports){ +var global = require('./_global'); +var macrotask = require('./_task').set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = require('./_cof')(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; + +},{"./_cof":152,"./_global":175,"./_task":247}],203:[function(require,module,exports){ +'use strict'; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = require('./_a-function'); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + +},{"./_a-function":136}],204:[function(require,module,exports){ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = require('./_object-keys'); +var gOPS = require('./_object-gops'); +var pIE = require('./_object-pie'); +var toObject = require('./_to-object'); +var IObject = require('./_iobject'); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + +},{"./_fails":169,"./_iobject":182,"./_object-gops":212,"./_object-keys":215,"./_object-pie":216,"./_to-object":253}],205:[function(require,module,exports){ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object'); +var dPs = require('./_object-dps'); +var enumBugKeys = require('./_enum-bug-keys'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var Empty = function () { /* empty */ }; +var 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 = require('./_dom-create')('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + require('./_html').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(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + +},{"./_an-object":141,"./_dom-create":164,"./_enum-bug-keys":165,"./_html":178,"./_object-dps":207,"./_shared-key":236}],206:[function(require,module,exports){ +var anObject = require('./_an-object'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var toPrimitive = require('./_to-primitive'); +var dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? 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; +}; + +},{"./_an-object":141,"./_descriptors":163,"./_ie8-dom-define":179,"./_to-primitive":254}],207:[function(require,module,exports){ +var dP = require('./_object-dp'); +var anObject = require('./_an-object'); +var getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + +},{"./_an-object":141,"./_descriptors":163,"./_object-dp":206,"./_object-keys":215}],208:[function(require,module,exports){ +'use strict'; +// Forced replacement prototype accessors methods +module.exports = require('./_library') || !require('./_fails')(function () { + var K = Math.random(); + // In FF throws only define methods + // eslint-disable-next-line no-undef, no-useless-call + __defineSetter__.call(null, K, function () { /* empty */ }); + delete require('./_global')[K]; +}); + +},{"./_fails":169,"./_global":175,"./_library":194}],209:[function(require,module,exports){ +var pIE = require('./_object-pie'); +var createDesc = require('./_property-desc'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var has = require('./_has'); +var IE8_DOM_DEFINE = require('./_ie8-dom-define'); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = require('./_descriptors') ? 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]); +}; + +},{"./_descriptors":163,"./_has":176,"./_ie8-dom-define":179,"./_object-pie":216,"./_property-desc":224,"./_to-iobject":251,"./_to-primitive":254}],210:[function(require,module,exports){ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject'); +var gOPN = require('./_object-gopn').f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + +},{"./_object-gopn":211,"./_to-iobject":251}],211:[function(require,module,exports){ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal'); +var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + +},{"./_enum-bug-keys":165,"./_object-keys-internal":214}],212:[function(require,module,exports){ +exports.f = Object.getOwnPropertySymbols; + +},{}],213:[function(require,module,exports){ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has'); +var toObject = require('./_to-object'); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); +var 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; +}; + +},{"./_has":176,"./_shared-key":236,"./_to-object":253}],214:[function(require,module,exports){ +var has = require('./_has'); +var toIObject = require('./_to-iobject'); +var arrayIndexOf = require('./_array-includes')(false); +var IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + +},{"./_array-includes":145,"./_has":176,"./_shared-key":236,"./_to-iobject":251}],215:[function(require,module,exports){ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal'); +var enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + +},{"./_enum-bug-keys":165,"./_object-keys-internal":214}],216:[function(require,module,exports){ +exports.f = {}.propertyIsEnumerable; + +},{}],217:[function(require,module,exports){ +// most Object methods by ES6 should accept primitives +var $export = require('./_export'); +var core = require('./_core'); +var fails = require('./_fails'); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + +},{"./_core":157,"./_export":167,"./_fails":169}],218:[function(require,module,exports){ +var getKeys = require('./_object-keys'); +var toIObject = require('./_to-iobject'); +var isEnum = require('./_object-pie').f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) if (isEnum.call(O, key = keys[i++])) { + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; + +},{"./_object-keys":215,"./_object-pie":216,"./_to-iobject":251}],219:[function(require,module,exports){ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn'); +var gOPS = require('./_object-gops'); +var anObject = require('./_an-object'); +var Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + +},{"./_an-object":141,"./_global":175,"./_object-gopn":211,"./_object-gops":212}],220:[function(require,module,exports){ +var $parseFloat = require('./_global').parseFloat; +var $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + +},{"./_global":175,"./_string-trim":245,"./_string-ws":246}],221:[function(require,module,exports){ +var $parseInt = require('./_global').parseInt; +var $trim = require('./_string-trim').trim; +var ws = require('./_string-ws'); +var hex = /^[-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; + +},{"./_global":175,"./_string-trim":245,"./_string-ws":246}],222:[function(require,module,exports){ +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + +},{}],223:[function(require,module,exports){ +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var newPromiseCapability = require('./_new-promise-capability'); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + +},{"./_an-object":141,"./_is-object":186,"./_new-promise-capability":203}],224:[function(require,module,exports){ +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +},{}],225:[function(require,module,exports){ +var redefine = require('./_redefine'); +module.exports = function (target, src, safe) { + for (var key in src) redefine(target, key, src[key], safe); + return target; +}; + +},{"./_redefine":226}],226:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var has = require('./_has'); +var SRC = require('./_uid')('src'); +var $toString = require('./_function-to-string'); +var TO_STRING = 'toString'; +var TPL = ('' + $toString).split(TO_STRING); + +require('./_core').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); +}); + +},{"./_core":157,"./_function-to-string":174,"./_global":175,"./_has":176,"./_hide":177,"./_uid":258}],227:[function(require,module,exports){ +'use strict'; + +var classof = require('./_classof'); +var builtinExec = RegExp.prototype.exec; + + // `RegExpExec` abstract operation +// https://tc39.github.io/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (typeof exec === 'function') { + var result = exec.call(R, S); + if (typeof result !== 'object') { + throw new TypeError('RegExp exec method returned something other than an Object or null'); + } + return result; + } + if (classof(R) !== 'RegExp') { + throw new TypeError('RegExp#exec called on incompatible receiver'); + } + return builtinExec.call(R, S); +}; + +},{"./_classof":151}],228:[function(require,module,exports){ +'use strict'; + +var regexpFlags = require('./_flags'); + +var nativeExec = RegExp.prototype.exec; +// This always refers to the native implementation, because the +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, +// which loads this file before patching the method. +var nativeReplace = String.prototype.replace; + +var patchedExec = nativeExec; + +var LAST_INDEX = 'lastIndex'; + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/, + re2 = /b*/g; + nativeExec.call(re1, 'a'); + nativeExec.call(re2, 'a'); + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; +})(); + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; + +if (PATCH) { + patchedExec = function exec(str) { + var re = this; + var lastIndex, reCopy, match, i; + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; + + match = nativeExec.call(re, str); + + if (UPDATES_LAST_INDEX_WRONG && match) { + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + // eslint-disable-next-line no-loop-func + nativeReplace.call(match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + return match; + }; +} + +module.exports = patchedExec; + +},{"./_flags":171}],229:[function(require,module,exports){ +module.exports = function (regExp, replace) { + var replacer = replace === Object(replace) ? function (part) { + return replace[part]; + } : replace; + return function (it) { + return String(it).replace(regExp, replacer); + }; +}; + +},{}],230:[function(require,module,exports){ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + +},{}],231:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var ctx = require('./_ctx'); +var forOf = require('./_for-of'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + +},{"./_a-function":136,"./_ctx":159,"./_export":167,"./_for-of":173}],232:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = require('./_export'); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + +},{"./_export":167}],233:[function(require,module,exports){ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + +},{"./_an-object":141,"./_ctx":159,"./_is-object":186,"./_object-gopd":209}],234:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var dP = require('./_object-dp'); +var DESCRIPTORS = require('./_descriptors'); +var SPECIES = require('./_wks')('species'); + +module.exports = function (KEY) { + var C = global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; + +},{"./_descriptors":163,"./_global":175,"./_object-dp":206,"./_wks":263}],235:[function(require,module,exports){ +var def = require('./_object-dp').f; +var has = require('./_has'); +var TAG = require('./_wks')('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + +},{"./_has":176,"./_object-dp":206,"./_wks":263}],236:[function(require,module,exports){ +var shared = require('./_shared')('keys'); +var uid = require('./_uid'); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + +},{"./_shared":237,"./_uid":258}],237:[function(require,module,exports){ +var core = require('./_core'); +var global = require('./_global'); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: require('./_library') ? 'pure' : 'global', + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' +}); + +},{"./_core":157,"./_global":175,"./_library":194}],238:[function(require,module,exports){ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var SPECIES = require('./_wks')('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + +},{"./_a-function":136,"./_an-object":141,"./_wks":263}],239:[function(require,module,exports){ +'use strict'; +var fails = require('./_fails'); + +module.exports = function (method, arg) { + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call + arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null); + }); +}; + +},{"./_fails":169}],240:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + +},{"./_defined":162,"./_to-integer":250}],241:[function(require,module,exports){ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp'); +var defined = require('./_defined'); + +module.exports = function (that, searchString, NAME) { + if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; + +},{"./_defined":162,"./_is-regexp":187}],242:[function(require,module,exports){ +var $export = require('./_export'); +var fails = require('./_fails'); +var defined = require('./_defined'); +var quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function (string, tag, attribute, value) { + var S = String(defined(string)); + var 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); +}; + +},{"./_defined":162,"./_export":167,"./_fails":169}],243:[function(require,module,exports){ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length'); +var repeat = require('./_string-repeat'); +var defined = require('./_defined'); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + +},{"./_defined":162,"./_string-repeat":244,"./_to-length":252}],244:[function(require,module,exports){ +'use strict'; +var toInteger = require('./_to-integer'); +var defined = require('./_defined'); + +module.exports = function repeat(count) { + var str = String(defined(this)); + var res = ''; + var n = toInteger(count); + if (n < 0 || n == Infinity) throw RangeError("Count can't be negative"); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str; + return res; +}; + +},{"./_defined":162,"./_to-integer":250}],245:[function(require,module,exports){ +var $export = require('./_export'); +var defined = require('./_defined'); +var fails = require('./_fails'); +var spaces = require('./_string-ws'); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); + +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + +},{"./_defined":162,"./_export":167,"./_fails":169,"./_string-ws":246}],246:[function(require,module,exports){ +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + +},{}],247:[function(require,module,exports){ +var ctx = require('./_ctx'); +var invoke = require('./_invoke'); +var html = require('./_html'); +var cel = require('./_dom-create'); +var global = require('./_global'); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (require('./_cof')(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; + +},{"./_cof":152,"./_ctx":159,"./_dom-create":164,"./_global":175,"./_html":178,"./_invoke":181}],248:[function(require,module,exports){ +var toInteger = require('./_to-integer'); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + +},{"./_to-integer":250}],249:[function(require,module,exports){ +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + +},{"./_to-integer":250,"./_to-length":252}],250:[function(require,module,exports){ +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + +},{}],251:[function(require,module,exports){ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject'); +var defined = require('./_defined'); +module.exports = function (it) { + return IObject(defined(it)); +}; + +},{"./_defined":162,"./_iobject":182}],252:[function(require,module,exports){ +// 7.1.15 ToLength +var toInteger = require('./_to-integer'); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + +},{"./_to-integer":250}],253:[function(require,module,exports){ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function (it) { + return Object(defined(it)); +}; + +},{"./_defined":162}],254:[function(require,module,exports){ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// 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"); +}; + +},{"./_is-object":186}],255:[function(require,module,exports){ +'use strict'; +if (require('./_descriptors')) { + var LIBRARY = require('./_library'); + var global = require('./_global'); + var fails = require('./_fails'); + var $export = require('./_export'); + var $typed = require('./_typed'); + var $buffer = require('./_typed-buffer'); + var ctx = require('./_ctx'); + var anInstance = require('./_an-instance'); + var propertyDesc = require('./_property-desc'); + var hide = require('./_hide'); + var redefineAll = require('./_redefine-all'); + var toInteger = require('./_to-integer'); + var toLength = require('./_to-length'); + var toIndex = require('./_to-index'); + var toAbsoluteIndex = require('./_to-absolute-index'); + var toPrimitive = require('./_to-primitive'); + var has = require('./_has'); + var classof = require('./_classof'); + var isObject = require('./_is-object'); + var toObject = require('./_to-object'); + var isArrayIter = require('./_is-array-iter'); + var create = require('./_object-create'); + var getPrototypeOf = require('./_object-gpo'); + var gOPN = require('./_object-gopn').f; + var getIterFn = require('./core.get-iterator-method'); + var uid = require('./_uid'); + var wks = require('./_wks'); + var createArrayMethod = require('./_array-methods'); + var createArrayIncludes = require('./_array-includes'); + var speciesConstructor = require('./_species-constructor'); + var ArrayIterators = require('./es6.array.iterator'); + var Iterators = require('./_iterators'); + var $iterDetect = require('./_iter-detect'); + var setSpecies = require('./_set-species'); + var arrayFill = require('./_array-fill'); + var arrayCopyWithin = require('./_array-copy-within'); + var $DP = require('./_object-dp'); + var $GOPD = require('./_object-gopd'); + var dP = $DP.f; + var gOPD = $GOPD.f; + var RangeError = global.RangeError; + var TypeError = global.TypeError; + var Uint8Array = global.Uint8Array; + var ARRAY_BUFFER = 'ArrayBuffer'; + var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER; + var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; + var PROTOTYPE = 'prototype'; + var ArrayProto = Array[PROTOTYPE]; + var $ArrayBuffer = $buffer.ArrayBuffer; + var $DataView = $buffer.DataView; + var arrayForEach = createArrayMethod(0); + var arrayFilter = createArrayMethod(2); + var arraySome = createArrayMethod(3); + var arrayEvery = createArrayMethod(4); + var arrayFind = createArrayMethod(5); + var arrayFindIndex = createArrayMethod(6); + var arrayIncludes = createArrayIncludes(true); + var arrayIndexOf = createArrayIncludes(false); + var arrayValues = ArrayIterators.values; + var arrayKeys = ArrayIterators.keys; + var arrayEntries = ArrayIterators.entries; + var arrayLastIndexOf = ArrayProto.lastIndexOf; + var arrayReduce = ArrayProto.reduce; + var arrayReduceRight = ArrayProto.reduceRight; + var arrayJoin = ArrayProto.join; + var arraySort = ArrayProto.sort; + var arraySlice = ArrayProto.slice; + var arrayToString = ArrayProto.toString; + var arrayToLocaleString = ArrayProto.toLocaleString; + var ITERATOR = wks('iterator'); + var TAG = wks('toStringTag'); + var TYPED_CONSTRUCTOR = uid('typed_constructor'); + var DEF_CONSTRUCTOR = uid('def_constructor'); + var ALL_CONSTRUCTORS = $typed.CONSTR; + var TYPED_ARRAY = $typed.TYPED; + var VIEW = $typed.VIEW; + var WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function (O, length) { + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function () { + // eslint-disable-next-line no-undef + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () { + new Uint8Array(1).set({}); + }); + + 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; + var length = list.length; + var 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); + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iterFn = getIterFn(O); + var 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; + var length = arguments.length; + var 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; + var length = validate(that).length; + var middle = Math.floor(length / 2); + var index = 0; + var 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); + var length = O.length; + var $begin = toAbsoluteIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(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); + var length = this.length; + var src = toObject(arrayLike); + var len = toLength(src.length); + var 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; + } 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]; } + }); + + // eslint-disable-next-line max-statements + module.exports = function (KEY, BYTES, wrapper, CLAMPED) { + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + KEY; + var SETTER = 'set' + KEY; + var TypedArray = global[NAME]; + var Base = TypedArray || {}; + var TAC = TypedArray && getPrototypeOf(TypedArray); + var FORCED = !TypedArray || !$typed.ABV; + var O = {}; + var 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; + var offset = 0; + var buffer, byteLength, length, klass; + if (!isObject(data)) { + length = toIndex(data); + 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 (!fails(function () { + TypedArray(1); + }) || !fails(function () { + new TypedArray(-1); // eslint-disable-line no-new + }) || !$iterDetect(function (iter) { + new TypedArray(); // eslint-disable-line no-new + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(1.5); // 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(toIndex(data)); + 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]; + var CORRECT_ITER_NAME = !!$nativeIterator + && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined); + var $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 + }); + + $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, { + 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); + + if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.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 */ }; + +},{"./_an-instance":140,"./_array-copy-within":142,"./_array-fill":143,"./_array-includes":145,"./_array-methods":146,"./_classof":151,"./_ctx":159,"./_descriptors":163,"./_export":167,"./_fails":169,"./_global":175,"./_has":176,"./_hide":177,"./_is-array-iter":183,"./_is-object":186,"./_iter-detect":191,"./_iterators":193,"./_library":194,"./_object-create":205,"./_object-dp":206,"./_object-gopd":209,"./_object-gopn":211,"./_object-gpo":213,"./_property-desc":224,"./_redefine-all":225,"./_set-species":234,"./_species-constructor":238,"./_to-absolute-index":248,"./_to-index":249,"./_to-integer":250,"./_to-length":252,"./_to-object":253,"./_to-primitive":254,"./_typed":257,"./_typed-buffer":256,"./_uid":258,"./_wks":263,"./core.get-iterator-method":264,"./es6.array.iterator":276}],256:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var DESCRIPTORS = require('./_descriptors'); +var LIBRARY = require('./_library'); +var $typed = require('./_typed'); +var hide = require('./_hide'); +var redefineAll = require('./_redefine-all'); +var fails = require('./_fails'); +var anInstance = require('./_an-instance'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var toIndex = require('./_to-index'); +var gOPN = require('./_object-gopn').f; +var dP = require('./_object-dp').f; +var arrayFill = require('./_array-fill'); +var setToStringTag = require('./_set-to-string-tag'); +var ARRAY_BUFFER = 'ArrayBuffer'; +var DATA_VIEW = 'DataView'; +var PROTOTYPE = 'prototype'; +var WRONG_LENGTH = 'Wrong length!'; +var WRONG_INDEX = 'Wrong index!'; +var $ArrayBuffer = global[ARRAY_BUFFER]; +var $DataView = global[DATA_VIEW]; +var Math = global.Math; +var RangeError = global.RangeError; +// eslint-disable-next-line no-shadow-restricted-names +var Infinity = global.Infinity; +var BaseBuffer = $ArrayBuffer; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; +var BUFFER = 'buffer'; +var BYTE_LENGTH = 'byteLength'; +var BYTE_OFFSET = 'byteOffset'; +var $BUFFER = DESCRIPTORS ? '_b' : BUFFER; +var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH; +var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +function packIEEE754(value, mLen, nBytes) { + var buffer = new Array(nBytes); + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0; + var i = 0; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + var e, m, c; + value = abs(value); + // eslint-disable-next-line no-self-compare + if (value != value || value === Infinity) { + // eslint-disable-next-line no-self-compare + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if (value * (c = pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +} +function unpackIEEE754(buffer, mLen, nBytes) { + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = eLen - 7; + var i = nBytes - 1; + var s = buffer[i--]; + var e = s & 127; + var m; + s >>= 7; + for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +} + +function unpackI32(bytes) { + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +} +function packI8(it) { + return [it & 0xff]; +} +function packI16(it) { + return [it & 0xff, it >> 8 & 0xff]; +} +function packI32(it) { + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +} +function packF64(it) { + return packIEEE754(it, 52, 8); +} +function packF32(it) { + return packIEEE754(it, 23, 4); +} + +function addGetter(C, key, internal) { + dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } }); +} + +function get(view, bytes, index, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +} +function set(view, bytes, index, conversion, value, isLittleEndian) { + var numIndex = +index; + var intIndex = toIndex(numIndex); + if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b; + var start = intIndex + view[$OFFSET]; + var pack = conversion(+value); + for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +} + +if (!$typed.ABV) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer, ARRAY_BUFFER); + var byteLength = toIndex(length); + this._b = arrayFill.call(new Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength) { + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH]; + var offset = toInteger(byteOffset); + if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if (DESCRIPTORS) { + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset) { + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset) { + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /* , littleEndian */) { + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /* , littleEndian */) { + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /* , littleEndian */) { + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value) { + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /* , littleEndian */) { + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) { + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) { + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if (!fails(function () { + $ArrayBuffer(1); + }) || !fails(function () { + new $ArrayBuffer(-1); // eslint-disable-line no-new + }) || fails(function () { + new $ArrayBuffer(); // eslint-disable-line no-new + new $ArrayBuffer(1.5); // eslint-disable-line no-new + new $ArrayBuffer(NaN); // eslint-disable-line no-new + return $ArrayBuffer.name != ARRAY_BUFFER; + })) { + $ArrayBuffer = function ArrayBuffer(length) { + anInstance(this, $ArrayBuffer); + return new BaseBuffer(toIndex(length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) { + if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]); + } + if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)); + var $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value) { + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; + +},{"./_an-instance":140,"./_array-fill":143,"./_descriptors":163,"./_fails":169,"./_global":175,"./_hide":177,"./_library":194,"./_object-dp":206,"./_object-gopn":211,"./_redefine-all":225,"./_set-to-string-tag":235,"./_to-index":249,"./_to-integer":250,"./_to-length":252,"./_typed":257}],257:[function(require,module,exports){ +var global = require('./_global'); +var hide = require('./_hide'); +var uid = require('./_uid'); +var TYPED = uid('typed_array'); +var VIEW = uid('view'); +var ABV = !!(global.ArrayBuffer && global.DataView); +var CONSTR = ABV; +var i = 0; +var l = 9; +var Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while (i < l) { + if (Typed = global[TypedArrayConstructors[i++]]) { + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; + +},{"./_global":175,"./_hide":177,"./_uid":258}],258:[function(require,module,exports){ +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + +},{}],259:[function(require,module,exports){ +var global = require('./_global'); +var navigator = global.navigator; + +module.exports = navigator && navigator.userAgent || ''; + +},{"./_global":175}],260:[function(require,module,exports){ +var isObject = require('./_is-object'); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + +},{"./_is-object":186}],261:[function(require,module,exports){ +var global = require('./_global'); +var core = require('./_core'); +var LIBRARY = require('./_library'); +var wksExt = require('./_wks-ext'); +var defineProperty = require('./_object-dp').f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + +},{"./_core":157,"./_global":175,"./_library":194,"./_object-dp":206,"./_wks-ext":262}],262:[function(require,module,exports){ +exports.f = require('./_wks'); + +},{"./_wks":263}],263:[function(require,module,exports){ +var store = require('./_shared')('wks'); +var uid = require('./_uid'); +var Symbol = require('./_global').Symbol; +var 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; + +},{"./_global":175,"./_shared":237,"./_uid":258}],264:[function(require,module,exports){ +var classof = require('./_classof'); +var ITERATOR = require('./_wks')('iterator'); +var Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + +},{"./_classof":151,"./_core":157,"./_iterators":193,"./_wks":263}],265:[function(require,module,exports){ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export'); +var $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } }); + +},{"./_export":167,"./_replacer":229}],266:[function(require,module,exports){ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { copyWithin: require('./_array-copy-within') }); + +require('./_add-to-unscopables')('copyWithin'); + +},{"./_add-to-unscopables":138,"./_array-copy-within":142,"./_export":167}],267:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $every = require('./_array-methods')(4); + +$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */) { + return $every(this, callbackfn, arguments[1]); + } +}); + +},{"./_array-methods":146,"./_export":167,"./_strict-method":239}],268:[function(require,module,exports){ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', { fill: require('./_array-fill') }); + +require('./_add-to-unscopables')('fill'); + +},{"./_add-to-unscopables":138,"./_array-fill":143,"./_export":167}],269:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $filter = require('./_array-methods')(2); + +$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments[1]); + } +}); + +},{"./_array-methods":146,"./_export":167,"./_strict-method":239}],270:[function(require,module,exports){ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(6); +var KEY = 'findIndex'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); + +},{"./_add-to-unscopables":138,"./_array-methods":146,"./_export":167}],271:[function(require,module,exports){ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export'); +var $find = require('./_array-methods')(5); +var KEY = 'find'; +var forced = true; +// Shouldn't skip holes +if (KEY in []) Array(1)[KEY](function () { forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn /* , that = undefined */) { + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); + +},{"./_add-to-unscopables":138,"./_array-methods":146,"./_export":167}],272:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $forEach = require('./_array-methods')(0); +var STRICT = require('./_strict-method')([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments[1]); + } +}); + +},{"./_array-methods":146,"./_export":167,"./_strict-method":239}],273:[function(require,module,exports){ +'use strict'; +var ctx = require('./_ctx'); +var $export = require('./_export'); +var toObject = require('./_to-object'); +var call = require('./_iter-call'); +var isArrayIter = require('./_is-array-iter'); +var toLength = require('./_to-length'); +var createProperty = require('./_create-property'); +var getIterFn = require('./core.get-iterator-method'); + +$export($export.S + $export.F * !require('./_iter-detect')(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); + +},{"./_create-property":158,"./_ctx":159,"./_export":167,"./_is-array-iter":183,"./_iter-call":188,"./_iter-detect":191,"./_to-length":252,"./_to-object":253,"./core.get-iterator-method":264}],274:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $indexOf = require('./_array-includes')(false); +var $native = [].indexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /* , fromIndex = 0 */) { + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); + +},{"./_array-includes":145,"./_export":167,"./_strict-method":239}],275:[function(require,module,exports){ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', { isArray: require('./_is-array') }); + +},{"./_export":167,"./_is-array":184}],276:[function(require,module,exports){ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables'); +var step = require('./_iter-step'); +var Iterators = require('./_iterators'); +var toIObject = require('./_to-iobject'); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +},{"./_add-to-unscopables":138,"./_iter-define":190,"./_iter-step":192,"./_iterators":193,"./_to-iobject":251}],277:[function(require,module,exports){ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { + join: function join(separator) { + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); + +},{"./_export":167,"./_iobject":182,"./_strict-method":239,"./_to-iobject":251}],278:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toInteger = require('./_to-integer'); +var toLength = require('./_to-length'); +var $native = [].lastIndexOf; +var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0; + var O = toIObject(this); + var length = toLength(O.length); + var index = length - 1; + if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0; + return -1; + } +}); + +},{"./_export":167,"./_strict-method":239,"./_to-integer":250,"./_to-iobject":251,"./_to-length":252}],279:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $map = require('./_array-methods')(1); + +$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments[1]); + } +}); + +},{"./_array-methods":146,"./_export":167,"./_strict-method":239}],280:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function () { + function F() { /* empty */ } + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */) { + var index = 0; + var aLen = arguments.length; + var result = new (typeof this == 'function' ? this : Array)(aLen); + while (aLen > index) createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); + +},{"./_create-property":158,"./_export":167,"./_fails":169}],281:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); + +},{"./_array-reduce":147,"./_export":167,"./_strict-method":239}],282:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */) { + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); + +},{"./_array-reduce":147,"./_export":167,"./_strict-method":239}],283:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var html = require('./_html'); +var cof = require('./_cof'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * require('./_fails')(function () { + if (html) arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end) { + var len = toLength(this.length); + var klass = cof(this); + end = end === undefined ? len : end; + if (klass == 'Array') return arraySlice.call(this, begin, end); + var start = toAbsoluteIndex(begin, len); + var upTo = toAbsoluteIndex(end, len); + var size = toLength(upTo - start); + var cloned = new Array(size); + var i = 0; + for (; i < size; i++) cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); + +},{"./_cof":152,"./_export":167,"./_fails":169,"./_html":178,"./_to-absolute-index":248,"./_to-length":252}],284:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $some = require('./_array-methods')(3); + +$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */) { + return $some(this, callbackfn, arguments[1]); + } +}); + +},{"./_array-methods":146,"./_export":167,"./_strict-method":239}],285:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var toObject = require('./_to-object'); +var fails = require('./_fails'); +var $sort = [].sort; +var test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function () { + // IE8- + test.sort(undefined); +}) || !fails(function () { + // V8 bug + test.sort(null); + // Old WebKit +}) || !require('./_strict-method')($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn) { + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); + +},{"./_a-function":136,"./_export":167,"./_fails":169,"./_strict-method":239,"./_to-object":253}],286:[function(require,module,exports){ +require('./_set-species')('Array'); + +},{"./_set-species":234}],287:[function(require,module,exports){ +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = require('./_export'); + +$export($export.S, 'Date', { now: function () { return new Date().getTime(); } }); + +},{"./_export":167}],288:[function(require,module,exports){ +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export'); +var toISOString = require('./_date-to-iso-string'); + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', { + toISOString: toISOString +}); + +},{"./_date-to-iso-string":160,"./_export":167}],289:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); + +$export($export.P + $export.F * require('./_fails')(function () { + return new Date(NaN).toJSON() !== null + || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1; +}), 'Date', { + // eslint-disable-next-line no-unused-vars + toJSON: function toJSON(key) { + var O = toObject(this); + var pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); + +},{"./_export":167,"./_fails":169,"./_to-object":253,"./_to-primitive":254}],290:[function(require,module,exports){ +var TO_PRIMITIVE = require('./_wks')('toPrimitive'); +var proto = Date.prototype; + +if (!(TO_PRIMITIVE in proto)) require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); + +},{"./_date-to-primitive":161,"./_hide":177,"./_wks":263}],291:[function(require,module,exports){ +var DateProto = Date.prototype; +var INVALID_DATE = 'Invalid Date'; +var TO_STRING = 'toString'; +var $toString = DateProto[TO_STRING]; +var getTime = DateProto.getTime; +if (new Date(NaN) + '' != INVALID_DATE) { + require('./_redefine')(DateProto, TO_STRING, function toString() { + var value = getTime.call(this); + // eslint-disable-next-line no-self-compare + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} + +},{"./_redefine":226}],292:[function(require,module,exports){ +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = require('./_export'); + +$export($export.P, 'Function', { bind: require('./_bind') }); + +},{"./_bind":150,"./_export":167}],293:[function(require,module,exports){ +'use strict'; +var isObject = require('./_is-object'); +var getPrototypeOf = require('./_object-gpo'); +var HAS_INSTANCE = require('./_wks')('hasInstance'); +var FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if (!(HAS_INSTANCE in FunctionProto)) require('./_object-dp').f(FunctionProto, HAS_INSTANCE, { value: function (O) { + if (typeof this != 'function' || !isObject(O)) return false; + if (!isObject(this.prototype)) return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while (O = getPrototypeOf(O)) if (this.prototype === O) return true; + return false; +} }); + +},{"./_is-object":186,"./_object-dp":206,"./_object-gpo":213,"./_wks":263}],294:[function(require,module,exports){ +var dP = require('./_object-dp').f; +var FProto = Function.prototype; +var nameRE = /^\s*function ([^ (]*)/; +var NAME = 'name'; + +// 19.2.4.2 name +NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { + configurable: true, + get: function () { + try { + return ('' + this).match(nameRE)[1]; + } catch (e) { + return ''; + } + } +}); + +},{"./_descriptors":163,"./_object-dp":206}],295:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var MAP = 'Map'; + +// 23.1 Map Objects +module.exports = require('./_collection')(MAP, function (get) { + return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key) { + var entry = strong.getEntry(validate(this, MAP), key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value) { + return strong.def(validate(this, MAP), key === 0 ? 0 : key, value); + } +}, strong, true); + +},{"./_collection":156,"./_collection-strong":153,"./_validate-collection":260}],296:[function(require,module,exports){ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export'); +var log1p = require('./_math-log1p'); +var sqrt = Math.sqrt; +var $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x) { + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); + +},{"./_export":167,"./_math-log1p":197}],297:[function(require,module,exports){ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export'); +var $asinh = Math.asinh; + +function asinh(x) { + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh }); + +},{"./_export":167}],298:[function(require,module,exports){ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export'); +var $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x) { + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); + +},{"./_export":167}],299:[function(require,module,exports){ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export'); +var sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x) { + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); + +},{"./_export":167,"./_math-sign":199}],300:[function(require,module,exports){ +// 20.2.2.11 Math.clz32(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + clz32: function clz32(x) { + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); + +},{"./_export":167}],301:[function(require,module,exports){ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export'); +var exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x) { + return (exp(x = +x) + exp(-x)) / 2; + } +}); + +},{"./_export":167}],302:[function(require,module,exports){ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export'); +var $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 }); + +},{"./_export":167,"./_math-expm1":195}],303:[function(require,module,exports){ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { fround: require('./_math-fround') }); + +},{"./_export":167,"./_math-fround":196}],304:[function(require,module,exports){ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export'); +var abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars + var sum = 0; + var i = 0; + var aLen = arguments.length; + var larg = 0; + var arg, div; + while (i < aLen) { + arg = abs(arguments[i++]); + if (larg < arg) { + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if (arg > 0) { + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); + +},{"./_export":167}],305:[function(require,module,exports){ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export'); +var $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * require('./_fails')(function () { + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y) { + var UINT16 = 0xffff; + var xn = +x; + var yn = +y; + var xl = UINT16 & xn; + var yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); + +},{"./_export":167,"./_fails":169}],306:[function(require,module,exports){ +// 20.2.2.21 Math.log10(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log10: function log10(x) { + return Math.log(x) * Math.LOG10E; + } +}); + +},{"./_export":167}],307:[function(require,module,exports){ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { log1p: require('./_math-log1p') }); + +},{"./_export":167,"./_math-log1p":197}],308:[function(require,module,exports){ +// 20.2.2.22 Math.log2(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log2: function log2(x) { + return Math.log(x) / Math.LN2; + } +}); + +},{"./_export":167}],309:[function(require,module,exports){ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { sign: require('./_math-sign') }); + +},{"./_export":167,"./_math-sign":199}],310:[function(require,module,exports){ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * require('./_fails')(function () { + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x) { + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); + +},{"./_export":167,"./_fails":169,"./_math-expm1":195}],311:[function(require,module,exports){ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export'); +var expm1 = require('./_math-expm1'); +var exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x) { + var a = expm1(x = +x); + var b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); + +},{"./_export":167,"./_math-expm1":195}],312:[function(require,module,exports){ +// 20.2.2.34 Math.trunc(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + trunc: function trunc(it) { + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); + +},{"./_export":167}],313:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var has = require('./_has'); +var cof = require('./_cof'); +var inheritIfRequired = require('./_inherit-if-required'); +var toPrimitive = require('./_to-primitive'); +var fails = require('./_fails'); +var gOPN = require('./_object-gopn').f; +var gOPD = require('./_object-gopd').f; +var dP = require('./_object-dp').f; +var $trim = require('./_string-trim').trim; +var NUMBER = 'Number'; +var $Number = global[NUMBER]; +var Base = $Number; +var proto = $Number.prototype; +// Opera ~12 has broken Object#toString +var BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER; +var TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function (argument) { + var it = toPrimitive(argument, false); + if (typeof it == 'string' && it.length > 2) { + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0); + var third, radix, maxCode; + if (first === 43 || first === 45) { + third = it.charCodeAt(2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (it.charCodeAt(1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default: return +it; + } + for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) { + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { + $Number = function Number(value) { + var it = arguments.length < 1 ? 0 : value; + var that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for (var keys = require('./_descriptors') ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++) { + if (has(Base, key = keys[j]) && !has($Number, key)) { + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + require('./_redefine')(global, NUMBER, $Number); +} + +},{"./_cof":152,"./_descriptors":163,"./_fails":169,"./_global":175,"./_has":176,"./_inherit-if-required":180,"./_object-create":205,"./_object-dp":206,"./_object-gopd":209,"./_object-gopn":211,"./_redefine":226,"./_string-trim":245,"./_to-primitive":254}],314:[function(require,module,exports){ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) }); + +},{"./_export":167}],315:[function(require,module,exports){ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export'); +var _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it) { + return typeof it == 'number' && _isFinite(it); + } +}); + +},{"./_export":167,"./_global":175}],316:[function(require,module,exports){ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { isInteger: require('./_is-integer') }); + +},{"./_export":167,"./_is-integer":185}],317:[function(require,module,exports){ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; + } +}); + +},{"./_export":167}],318:[function(require,module,exports){ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export'); +var isInteger = require('./_is-integer'); +var abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number) { + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); + +},{"./_export":167,"./_is-integer":185}],319:[function(require,module,exports){ +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff }); + +},{"./_export":167}],320:[function(require,module,exports){ +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff }); + +},{"./_export":167}],321:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat }); + +},{"./_export":167,"./_parse-float":220}],322:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt }); + +},{"./_export":167,"./_parse-int":221}],323:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toInteger = require('./_to-integer'); +var aNumberValue = require('./_a-number-value'); +var repeat = require('./_string-repeat'); +var $toFixed = 1.0.toFixed; +var floor = Math.floor; +var data = [0, 0, 0, 0, 0, 0]; +var ERROR = 'Number.toFixed: incorrect invocation!'; +var ZERO = '0'; + +var multiply = function (n, c) { + var i = -1; + var c2 = c; + while (++i < 6) { + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function (n) { + var i = 6; + var c = 0; + while (--i >= 0) { + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function () { + var i = 6; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || data[i] !== 0) { + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128.0.toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function () { + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits) { + var x = aNumberValue(this, ERROR); + var f = toInteger(fractionDigits); + var s = ''; + var m = ZERO; + var e, z, j, k; + if (f < 0 || f > 20) throw RangeError(ERROR); + // eslint-disable-next-line no-self-compare + if (x != x) return 'NaN'; + if (x <= -1e21 || x >= 1e21) return String(x); + if (x < 0) { + s = '-'; + x = -x; + } + if (x > 1e-21) { + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(0, z); + j = f; + while (j >= 7) { + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if (f > 0) { + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); + +},{"./_a-number-value":137,"./_export":167,"./_fails":169,"./_string-repeat":244,"./_to-integer":250}],324:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $fails = require('./_fails'); +var aNumberValue = require('./_a-number-value'); +var $toPrecision = 1.0.toPrecision; + +$export($export.P + $export.F * ($fails(function () { + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function () { + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision) { + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); + +},{"./_a-number-value":137,"./_export":167,"./_fails":169}],325:[function(require,module,exports){ +// 19.1.3.1 Object.assign(target, source) +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') }); + +},{"./_export":167,"./_object-assign":204}],326:[function(require,module,exports){ +var $export = require('./_export'); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: require('./_object-create') }); + +},{"./_export":167,"./_object-create":205}],327:[function(require,module,exports){ +var $export = require('./_export'); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperties: require('./_object-dps') }); + +},{"./_descriptors":163,"./_export":167,"./_object-dps":207}],328:[function(require,module,exports){ +var $export = require('./_export'); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f }); + +},{"./_descriptors":163,"./_export":167,"./_object-dp":206}],329:[function(require,module,exports){ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function ($freeze) { + return function freeze(it) { + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); + +},{"./_is-object":186,"./_meta":200,"./_object-sap":217}],330:[function(require,module,exports){ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject'); +var $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); + +},{"./_object-gopd":209,"./_object-sap":217,"./_to-iobject":251}],331:[function(require,module,exports){ +// 19.1.2.7 Object.getOwnPropertyNames(O) +require('./_object-sap')('getOwnPropertyNames', function () { + return require('./_object-gopn-ext').f; +}); + +},{"./_object-gopn-ext":210,"./_object-sap":217}],332:[function(require,module,exports){ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object'); +var $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + +},{"./_object-gpo":213,"./_object-sap":217,"./_to-object":253}],333:[function(require,module,exports){ +// 19.1.2.11 Object.isExtensible(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isExtensible', function ($isExtensible) { + return function isExtensible(it) { + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); + +},{"./_is-object":186,"./_object-sap":217}],334:[function(require,module,exports){ +// 19.1.2.12 Object.isFrozen(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isFrozen', function ($isFrozen) { + return function isFrozen(it) { + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); + +},{"./_is-object":186,"./_object-sap":217}],335:[function(require,module,exports){ +// 19.1.2.13 Object.isSealed(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isSealed', function ($isSealed) { + return function isSealed(it) { + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); + +},{"./_is-object":186,"./_object-sap":217}],336:[function(require,module,exports){ +// 19.1.3.10 Object.is(value1, value2) +var $export = require('./_export'); +$export($export.S, 'Object', { is: require('./_same-value') }); + +},{"./_export":167,"./_same-value":230}],337:[function(require,module,exports){ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object'); +var $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); + +},{"./_object-keys":215,"./_object-sap":217,"./_to-object":253}],338:[function(require,module,exports){ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function ($preventExtensions) { + return function preventExtensions(it) { + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); + +},{"./_is-object":186,"./_meta":200,"./_object-sap":217}],339:[function(require,module,exports){ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object'); +var meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function ($seal) { + return function seal(it) { + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); + +},{"./_is-object":186,"./_meta":200,"./_object-sap":217}],340:[function(require,module,exports){ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = require('./_export'); +$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set }); + +},{"./_export":167,"./_set-proto":233}],341:[function(require,module,exports){ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var classof = require('./_classof'); +var test = {}; +test[require('./_wks')('toStringTag')] = 'z'; +if (test + '' != '[object z]') { + require('./_redefine')(Object.prototype, 'toString', function toString() { + return '[object ' + classof(this) + ']'; + }, true); +} + +},{"./_classof":151,"./_redefine":226,"./_wks":263}],342:[function(require,module,exports){ +var $export = require('./_export'); +var $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat }); + +},{"./_export":167,"./_parse-float":220}],343:[function(require,module,exports){ +var $export = require('./_export'); +var $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); + +},{"./_export":167,"./_parse-int":221}],344:[function(require,module,exports){ +'use strict'; +var LIBRARY = require('./_library'); +var global = require('./_global'); +var ctx = require('./_ctx'); +var classof = require('./_classof'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var aFunction = require('./_a-function'); +var anInstance = require('./_an-instance'); +var forOf = require('./_for-of'); +var speciesConstructor = require('./_species-constructor'); +var task = require('./_task').set; +var microtask = require('./_microtask')(); +var newPromiseCapabilityModule = require('./_new-promise-capability'); +var perform = require('./_perform'); +var userAgent = require('./_user-agent'); +var promiseResolve = require('./_promise-resolve'); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = require('./_redefine-all')($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +require('./_set-to-string-tag')($Promise, PROMISE); +require('./_set-species')(PROMISE); +Wrapper = require('./_core')[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); + +},{"./_a-function":136,"./_an-instance":140,"./_classof":151,"./_core":157,"./_ctx":159,"./_export":167,"./_for-of":173,"./_global":175,"./_is-object":186,"./_iter-detect":191,"./_library":194,"./_microtask":202,"./_new-promise-capability":203,"./_perform":222,"./_promise-resolve":223,"./_redefine-all":225,"./_set-species":234,"./_set-to-string-tag":235,"./_species-constructor":238,"./_task":247,"./_user-agent":259,"./_wks":263}],345:[function(require,module,exports){ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var rApply = (require('./_global').Reflect || {}).apply; +var fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function () { + rApply(function () { /* empty */ }); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList) { + var T = aFunction(target); + var L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); + +},{"./_a-function":136,"./_an-object":141,"./_export":167,"./_fails":169,"./_global":175}],346:[function(require,module,exports){ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export'); +var create = require('./_object-create'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var fails = require('./_fails'); +var bind = require('./_bind'); +var rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(rConstruct(function () { /* empty */ }, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function () { + rConstruct(function () { /* empty */ }); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /* , newTarget */) { + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : Object.prototype); + var result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + +},{"./_a-function":136,"./_an-object":141,"./_bind":150,"./_export":167,"./_fails":169,"./_global":175,"./_is-object":186,"./_object-create":205}],347:[function(require,module,exports){ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp'); +var $export = require('./_export'); +var anObject = require('./_an-object'); +var toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function () { + // eslint-disable-next-line no-undef + Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 }); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes) { + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch (e) { + return false; + } + } +}); + +},{"./_an-object":141,"./_export":167,"./_fails":169,"./_object-dp":206,"./_to-primitive":254}],348:[function(require,module,exports){ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export'); +var gOPD = require('./_object-gopd').f; +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey) { + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); + +},{"./_an-object":141,"./_export":167,"./_object-gopd":209}],349:[function(require,module,exports){ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var Enumerate = function (iterated) { + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = []; // keys + var key; + for (key in iterated) keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function () { + var that = this; + var keys = that._k; + var key; + do { + if (that._i >= keys.length) return { value: undefined, done: true }; + } while (!((key = keys[that._i++]) in that._t)); + return { value: key, done: false }; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target) { + return new Enumerate(target); + } +}); + +},{"./_an-object":141,"./_export":167,"./_iter-create":189}],350:[function(require,module,exports){ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd'); +var $export = require('./_export'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) { + return gOPD.f(anObject(target), propertyKey); + } +}); + +},{"./_an-object":141,"./_export":167,"./_object-gopd":209}],351:[function(require,module,exports){ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export'); +var getProto = require('./_object-gpo'); +var anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target) { + return getProto(anObject(target)); + } +}); + +},{"./_an-object":141,"./_export":167,"./_object-gpo":213}],352:[function(require,module,exports){ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var isObject = require('./_is-object'); +var anObject = require('./_an-object'); + +function get(target, propertyKey /* , receiver */) { + var receiver = arguments.length < 3 ? target : arguments[2]; + var desc, proto; + if (anObject(target) === receiver) return target[propertyKey]; + if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', { get: get }); + +},{"./_an-object":141,"./_export":167,"./_has":176,"./_is-object":186,"./_object-gopd":209,"./_object-gpo":213}],353:[function(require,module,exports){ +// 26.1.9 Reflect.has(target, propertyKey) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + +},{"./_export":167}],354:[function(require,module,exports){ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target) { + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); + +},{"./_an-object":141,"./_export":167}],355:[function(require,module,exports){ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { ownKeys: require('./_own-keys') }); + +},{"./_export":167,"./_own-keys":219}],356:[function(require,module,exports){ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export'); +var anObject = require('./_an-object'); +var $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target) { + anObject(target); + try { + if ($preventExtensions) $preventExtensions(target); + return true; + } catch (e) { + return false; + } + } +}); + +},{"./_an-object":141,"./_export":167}],357:[function(require,module,exports){ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export'); +var setProto = require('./_set-proto'); + +if (setProto) $export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto) { + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch (e) { + return false; + } + } +}); + +},{"./_export":167,"./_set-proto":233}],358:[function(require,module,exports){ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp'); +var gOPD = require('./_object-gopd'); +var getPrototypeOf = require('./_object-gpo'); +var has = require('./_has'); +var $export = require('./_export'); +var createDesc = require('./_property-desc'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); + +function set(target, propertyKey, V /* , receiver */) { + var receiver = arguments.length < 4 ? target : arguments[3]; + var ownDesc = gOPD.f(anObject(target), propertyKey); + var existingDescriptor, proto; + if (!ownDesc) { + if (isObject(proto = getPrototypeOf(target))) { + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if (has(ownDesc, 'value')) { + if (ownDesc.writable === false || !isObject(receiver)) return false; + if (existingDescriptor = gOPD.f(receiver, propertyKey)) { + if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false; + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + } else dP.f(receiver, propertyKey, createDesc(0, V)); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', { set: set }); + +},{"./_an-object":141,"./_export":167,"./_has":176,"./_is-object":186,"./_object-dp":206,"./_object-gopd":209,"./_object-gpo":213,"./_property-desc":224}],359:[function(require,module,exports){ +var global = require('./_global'); +var inheritIfRequired = require('./_inherit-if-required'); +var dP = require('./_object-dp').f; +var gOPN = require('./_object-gopn').f; +var isRegExp = require('./_is-regexp'); +var $flags = require('./_flags'); +var $RegExp = global.RegExp; +var Base = $RegExp; +var proto = $RegExp.prototype; +var re1 = /a/g; +var re2 = /a/g; +// "new" creates a new object, old webkit buggy here +var CORRECT_NEW = new $RegExp(re1) !== re1; + +if (require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function () { + re2[require('./_wks')('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))) { + $RegExp = function RegExp(p, f) { + var tiRE = this instanceof $RegExp; + var piRE = isRegExp(p); + var fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function (key) { + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function () { return Base[key]; }, + set: function (it) { Base[key] = it; } + }); + }; + for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + require('./_redefine')(global, 'RegExp', $RegExp); +} + +require('./_set-species')('RegExp'); + +},{"./_descriptors":163,"./_fails":169,"./_flags":171,"./_global":175,"./_inherit-if-required":180,"./_is-regexp":187,"./_object-dp":206,"./_object-gopn":211,"./_redefine":226,"./_set-species":234,"./_wks":263}],360:[function(require,module,exports){ +'use strict'; +var regexpExec = require('./_regexp-exec'); +require('./_export')({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); + +},{"./_export":167,"./_regexp-exec":228}],361:[function(require,module,exports){ +// 21.2.5.3 get RegExp.prototype.flags() +if (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', { + configurable: true, + get: require('./_flags') +}); + +},{"./_descriptors":163,"./_flags":171,"./_object-dp":206}],362:[function(require,module,exports){ +'use strict'; + +var anObject = require('./_an-object'); +var toLength = require('./_to-length'); +var advanceStringIndex = require('./_advance-string-index'); +var regExpExec = require('./_regexp-exec-abstract'); + +// @@match logic +require('./_fix-re-wks')('match', 1, function (defined, MATCH, $match, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.github.io/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match + function (regexp) { + var res = maybeCallNative($match, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + if (!rx.global) return regExpExec(rx, S); + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = String(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); + +},{"./_advance-string-index":139,"./_an-object":141,"./_fix-re-wks":170,"./_regexp-exec-abstract":227,"./_to-length":252}],363:[function(require,module,exports){ +'use strict'; + +var anObject = require('./_an-object'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var advanceStringIndex = require('./_advance-string-index'); +var regExpExec = require('./_regexp-exec-abstract'); +var max = Math.max; +var min = Math.min; +var floor = Math.floor; +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// @@replace logic +require('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { + return [ + // `String.prototype.replace` method + // https://tc39.github.io/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = defined(this); + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace + function (regexp, replaceValue) { + var res = maybeCallNative($replace, regexp, this, replaceValue); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var functionalReplace = typeof replaceValue === 'function'; + if (!functionalReplace) replaceValue = String(replaceValue); + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + results.push(result); + if (!global) break; + var matchStr = String(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + var matched = String(result[0]); + var position = max(min(toInteger(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = [matched].concat(captures, position, S); + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); + var replacement = String(replaceValue.apply(undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + S.slice(nextSourcePosition); + } + ]; + + // https://tc39.github.io/ecma262/#sec-getsubstitution + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return $replace.call(replacement, symbols, function (match, ch) { + var capture; + switch (ch.charAt(0)) { + case '$': return '$'; + case '&': return matched; + case '`': return str.slice(0, position); + case "'": return str.slice(tailPos); + case '<': + capture = namedCaptures[ch.slice(1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); + } +}); + +},{"./_advance-string-index":139,"./_an-object":141,"./_fix-re-wks":170,"./_regexp-exec-abstract":227,"./_to-integer":250,"./_to-length":252,"./_to-object":253}],364:[function(require,module,exports){ +'use strict'; + +var anObject = require('./_an-object'); +var sameValue = require('./_same-value'); +var regExpExec = require('./_regexp-exec-abstract'); + +// @@search logic +require('./_fix-re-wks')('search', 1, function (defined, SEARCH, $search, maybeCallNative) { + return [ + // `String.prototype.search` method + // https://tc39.github.io/ecma262/#sec-string.prototype.search + function search(regexp) { + var O = defined(this); + var fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, + // `RegExp.prototype[@@search]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search + function (regexp) { + var res = maybeCallNative($search, regexp, this); + if (res.done) return res.value; + var rx = anObject(regexp); + var S = String(this); + var previousLastIndex = rx.lastIndex; + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; + var result = regExpExec(rx, S); + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; + return result === null ? -1 : result.index; + } + ]; +}); + +},{"./_an-object":141,"./_fix-re-wks":170,"./_regexp-exec-abstract":227,"./_same-value":230}],365:[function(require,module,exports){ +'use strict'; + +var isRegExp = require('./_is-regexp'); +var anObject = require('./_an-object'); +var speciesConstructor = require('./_species-constructor'); +var advanceStringIndex = require('./_advance-string-index'); +var toLength = require('./_to-length'); +var callRegExpExec = require('./_regexp-exec-abstract'); +var regexpExec = require('./_regexp-exec'); +var fails = require('./_fails'); +var $min = Math.min; +var $push = [].push; +var $SPLIT = 'split'; +var LENGTH = 'length'; +var LAST_INDEX = 'lastIndex'; +var MAX_UINT32 = 0xffffffff; + +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); + +// @@split logic +require('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split, maybeCallNative) { + var internalSplit; + if ( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = String(this); + if (separator === undefined && limit === 0) return []; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) return $split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = regexpExec.call(separatorCopy, string)) { + lastIndex = separatorCopy[LAST_INDEX]; + if (lastIndex > lastLastIndex) { + output.push(string.slice(lastLastIndex, match.index)); + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if (output[LENGTH] >= splitLimit) break; + } + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if (lastLastIndex === string[LENGTH]) { + if (lastLength || !separatorCopy.test('')) output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); + }; + } else { + internalSplit = $split; + } + + return [ + // `String.prototype.split` method + // https://tc39.github.io/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = defined(this); + var splitter = separator == undefined ? undefined : separator[SPLIT]; + return splitter !== undefined + ? splitter.call(separator, O, limit) + : internalSplit.call(String(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (regexp, limit) { + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); + if (res.done) return res.value; + + var rx = anObject(regexp); + var S = String(this); + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (SUPPORTS_Y ? 'y' : 'g'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = SUPPORTS_Y ? q : 0; + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); + var e; + if ( + z === null || + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + A.push(S.slice(p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + A.push(z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + A.push(S.slice(p)); + return A; + } + ]; +}); + +},{"./_advance-string-index":139,"./_an-object":141,"./_fails":169,"./_fix-re-wks":170,"./_is-regexp":187,"./_regexp-exec":228,"./_regexp-exec-abstract":227,"./_species-constructor":238,"./_to-length":252}],366:[function(require,module,exports){ +'use strict'; +require('./es6.regexp.flags'); +var anObject = require('./_an-object'); +var $flags = require('./_flags'); +var DESCRIPTORS = require('./_descriptors'); +var TO_STRING = 'toString'; +var $toString = /./[TO_STRING]; + +var define = function (fn) { + require('./_redefine')(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) { + define(function toString() { + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if ($toString.name != TO_STRING) { + define(function toString() { + return $toString.call(this); + }); +} + +},{"./_an-object":141,"./_descriptors":163,"./_fails":169,"./_flags":171,"./_redefine":226,"./es6.regexp.flags":361}],367:[function(require,module,exports){ +'use strict'; +var strong = require('./_collection-strong'); +var validate = require('./_validate-collection'); +var SET = 'Set'; + +// 23.2 Set Objects +module.exports = require('./_collection')(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); + +},{"./_collection":156,"./_collection-strong":153,"./_validate-collection":260}],368:[function(require,module,exports){ +'use strict'; +// B.2.3.2 String.prototype.anchor(name) +require('./_string-html')('anchor', function (createHTML) { + return function anchor(name) { + return createHTML(this, 'a', 'name', name); + }; +}); + +},{"./_string-html":242}],369:[function(require,module,exports){ +'use strict'; +// B.2.3.3 String.prototype.big() +require('./_string-html')('big', function (createHTML) { + return function big() { + return createHTML(this, 'big', '', ''); + }; +}); + +},{"./_string-html":242}],370:[function(require,module,exports){ +'use strict'; +// B.2.3.4 String.prototype.blink() +require('./_string-html')('blink', function (createHTML) { + return function blink() { + return createHTML(this, 'blink', '', ''); + }; +}); + +},{"./_string-html":242}],371:[function(require,module,exports){ +'use strict'; +// B.2.3.5 String.prototype.bold() +require('./_string-html')('bold', function (createHTML) { + return function bold() { + return createHTML(this, 'b', '', ''); + }; +}); + +},{"./_string-html":242}],372:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $at = require('./_string-at')(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos) { + return $at(this, pos); + } +}); + +},{"./_export":167,"./_string-at":240}],373:[function(require,module,exports){ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var ENDS_WITH = 'endsWith'; +var $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /* , endPosition = @length */) { + var that = context(this, searchString, ENDS_WITH); + var endPosition = arguments.length > 1 ? arguments[1] : undefined; + var len = toLength(that.length); + var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); + var search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); + +},{"./_export":167,"./_fails-is-regexp":168,"./_string-context":241,"./_to-length":252}],374:[function(require,module,exports){ +'use strict'; +// B.2.3.6 String.prototype.fixed() +require('./_string-html')('fixed', function (createHTML) { + return function fixed() { + return createHTML(this, 'tt', '', ''); + }; +}); + +},{"./_string-html":242}],375:[function(require,module,exports){ +'use strict'; +// B.2.3.7 String.prototype.fontcolor(color) +require('./_string-html')('fontcolor', function (createHTML) { + return function fontcolor(color) { + return createHTML(this, 'font', 'color', color); + }; +}); + +},{"./_string-html":242}],376:[function(require,module,exports){ +'use strict'; +// B.2.3.8 String.prototype.fontsize(size) +require('./_string-html')('fontsize', function (createHTML) { + return function fontsize(size) { + return createHTML(this, 'font', 'size', size); + }; +}); + +},{"./_string-html":242}],377:[function(require,module,exports){ +var $export = require('./_export'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var fromCharCode = String.fromCharCode; +var $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars + var res = []; + var aLen = arguments.length; + var i = 0; + var code; + while (aLen > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); + +},{"./_export":167,"./_to-absolute-index":248}],378:[function(require,module,exports){ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export'); +var context = require('./_string-context'); +var INCLUDES = 'includes'; + +$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { + includes: function includes(searchString /* , position = 0 */) { + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +},{"./_export":167,"./_fails-is-regexp":168,"./_string-context":241}],379:[function(require,module,exports){ +'use strict'; +// B.2.3.9 String.prototype.italics() +require('./_string-html')('italics', function (createHTML) { + return function italics() { + return createHTML(this, 'i', '', ''); + }; +}); + +},{"./_string-html":242}],380:[function(require,module,exports){ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + +},{"./_iter-define":190,"./_string-at":240}],381:[function(require,module,exports){ +'use strict'; +// B.2.3.10 String.prototype.link(url) +require('./_string-html')('link', function (createHTML) { + return function link(url) { + return createHTML(this, 'a', 'href', url); + }; +}); + +},{"./_string-html":242}],382:[function(require,module,exports){ +var $export = require('./_export'); +var toIObject = require('./_to-iobject'); +var toLength = require('./_to-length'); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite) { + var tpl = toIObject(callSite.raw); + var len = toLength(tpl.length); + var aLen = arguments.length; + var res = []; + var i = 0; + while (len > i) { + res.push(String(tpl[i++])); + if (i < aLen) res.push(String(arguments[i])); + } return res.join(''); + } +}); + +},{"./_export":167,"./_to-iobject":251,"./_to-length":252}],383:[function(require,module,exports){ +var $export = require('./_export'); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: require('./_string-repeat') +}); + +},{"./_export":167,"./_string-repeat":244}],384:[function(require,module,exports){ +'use strict'; +// B.2.3.11 String.prototype.small() +require('./_string-html')('small', function (createHTML) { + return function small() { + return createHTML(this, 'small', '', ''); + }; +}); + +},{"./_string-html":242}],385:[function(require,module,exports){ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export'); +var toLength = require('./_to-length'); +var context = require('./_string-context'); +var STARTS_WITH = 'startsWith'; +var $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /* , position = 0 */) { + var that = context(this, searchString, STARTS_WITH); + var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)); + var search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); + +},{"./_export":167,"./_fails-is-regexp":168,"./_string-context":241,"./_to-length":252}],386:[function(require,module,exports){ +'use strict'; +// B.2.3.12 String.prototype.strike() +require('./_string-html')('strike', function (createHTML) { + return function strike() { + return createHTML(this, 'strike', '', ''); + }; +}); + +},{"./_string-html":242}],387:[function(require,module,exports){ +'use strict'; +// B.2.3.13 String.prototype.sub() +require('./_string-html')('sub', function (createHTML) { + return function sub() { + return createHTML(this, 'sub', '', ''); + }; +}); + +},{"./_string-html":242}],388:[function(require,module,exports){ +'use strict'; +// B.2.3.14 String.prototype.sup() +require('./_string-html')('sup', function (createHTML) { + return function sup() { + return createHTML(this, 'sup', '', ''); + }; +}); + +},{"./_string-html":242}],389:[function(require,module,exports){ +'use strict'; +// 21.1.3.25 String.prototype.trim() +require('./_string-trim')('trim', function ($trim) { + return function trim() { + return $trim(this, 3); + }; +}); + +},{"./_string-trim":245}],390:[function(require,module,exports){ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global'); +var has = require('./_has'); +var DESCRIPTORS = require('./_descriptors'); +var $export = require('./_export'); +var redefine = require('./_redefine'); +var META = require('./_meta').KEY; +var $fails = require('./_fails'); +var shared = require('./_shared'); +var setToStringTag = require('./_set-to-string-tag'); +var uid = require('./_uid'); +var wks = require('./_wks'); +var wksExt = require('./_wks-ext'); +var wksDefine = require('./_wks-define'); +var enumKeys = require('./_enum-keys'); +var isArray = require('./_is-array'); +var anObject = require('./_an-object'); +var isObject = require('./_is-object'); +var toIObject = require('./_to-iobject'); +var toPrimitive = require('./_to-primitive'); +var createDesc = require('./_property-desc'); +var _create = require('./_object-create'); +var gOPNExt = require('./_object-gopn-ext'); +var $GOPD = require('./_object-gopd'); +var $DP = require('./_object-dp'); +var $keys = require('./_object-keys'); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; + require('./_object-pie').f = $propertyIsEnumerable; + require('./_object-gops').f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !require('./_library')) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + +},{"./_an-object":141,"./_descriptors":163,"./_enum-keys":166,"./_export":167,"./_fails":169,"./_global":175,"./_has":176,"./_hide":177,"./_is-array":184,"./_is-object":186,"./_library":194,"./_meta":200,"./_object-create":205,"./_object-dp":206,"./_object-gopd":209,"./_object-gopn":211,"./_object-gopn-ext":210,"./_object-gops":212,"./_object-keys":215,"./_object-pie":216,"./_property-desc":224,"./_redefine":226,"./_set-to-string-tag":235,"./_shared":237,"./_to-iobject":251,"./_to-primitive":254,"./_uid":258,"./_wks":263,"./_wks-define":261,"./_wks-ext":262}],391:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var $typed = require('./_typed'); +var buffer = require('./_typed-buffer'); +var anObject = require('./_an-object'); +var toAbsoluteIndex = require('./_to-absolute-index'); +var toLength = require('./_to-length'); +var isObject = require('./_is-object'); +var ArrayBuffer = require('./_global').ArrayBuffer; +var speciesConstructor = require('./_species-constructor'); +var $ArrayBuffer = buffer.ArrayBuffer; +var $DataView = buffer.DataView; +var $isView = $typed.ABV && ArrayBuffer.isView; +var $slice = $ArrayBuffer.prototype.slice; +var VIEW = $typed.VIEW; +var ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer }); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it) { + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * require('./_fails')(function () { + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end) { + if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength; + var first = toAbsoluteIndex(start, len); + var fin = toAbsoluteIndex(end === undefined ? len : end, len); + var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first)); + var viewS = new $DataView(this); + var viewT = new $DataView(result); + var index = 0; + while (first < fin) { + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); + +},{"./_an-object":141,"./_export":167,"./_fails":169,"./_global":175,"./_is-object":186,"./_set-species":234,"./_species-constructor":238,"./_to-absolute-index":248,"./_to-length":252,"./_typed":257,"./_typed-buffer":256}],392:[function(require,module,exports){ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); + +},{"./_export":167,"./_typed":257,"./_typed-buffer":256}],393:[function(require,module,exports){ +require('./_typed-array')('Float32', 4, function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],394:[function(require,module,exports){ +require('./_typed-array')('Float64', 8, function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],395:[function(require,module,exports){ +require('./_typed-array')('Int16', 2, function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],396:[function(require,module,exports){ +require('./_typed-array')('Int32', 4, function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],397:[function(require,module,exports){ +require('./_typed-array')('Int8', 1, function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],398:[function(require,module,exports){ +require('./_typed-array')('Uint16', 2, function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],399:[function(require,module,exports){ +require('./_typed-array')('Uint32', 4, function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],400:[function(require,module,exports){ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + +},{"./_typed-array":255}],401:[function(require,module,exports){ +require('./_typed-array')('Uint8', 1, function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + +},{"./_typed-array":255}],402:[function(require,module,exports){ +'use strict'; +var global = require('./_global'); +var each = require('./_array-methods')(0); +var redefine = require('./_redefine'); +var meta = require('./_meta'); +var assign = require('./_object-assign'); +var weak = require('./_collection-weak'); +var isObject = require('./_is-object'); +var validate = require('./_validate-collection'); +var NATIVE_WEAK_MAP = require('./_validate-collection'); +var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global; +var WEAK_MAP = 'WeakMap'; +var getWeak = meta.getWeak; +var isExtensible = Object.isExtensible; +var uncaughtFrozenStore = weak.ufstore; +var InternalMap; + +var wrapper = function (get) { + return function WeakMap() { + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key) { + if (isObject(key)) { + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value) { + return weak.def(validate(this, WEAK_MAP), key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')(WEAK_MAP, wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if (NATIVE_WEAK_MAP && IS_IE11) { + InternalMap = weak.getConstructor(wrapper, WEAK_MAP); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function (key) { + var proto = $WeakMap.prototype; + var method = proto[key]; + redefine(proto, key, function (a, b) { + // store frozen objects on internal weakmap shim + if (isObject(a) && !isExtensible(a)) { + if (!this._f) this._f = new InternalMap(); + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} + +},{"./_array-methods":146,"./_collection":156,"./_collection-weak":155,"./_global":175,"./_is-object":186,"./_meta":200,"./_object-assign":204,"./_redefine":226,"./_validate-collection":260}],403:[function(require,module,exports){ +'use strict'; +var weak = require('./_collection-weak'); +var validate = require('./_validate-collection'); +var WEAK_SET = 'WeakSet'; + +// 23.4 WeakSet Objects +require('./_collection')(WEAK_SET, function (get) { + return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value) { + return weak.def(validate(this, WEAK_SET), value, true); + } +}, weak, false, true); + +},{"./_collection":156,"./_collection-weak":155,"./_validate-collection":260}],404:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var aFunction = require('./_a-function'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatMap: function flatMap(callbackfn /* , thisArg */) { + var O = toObject(this); + var sourceLen, A; + aFunction(callbackfn); + sourceLen = toLength(O.length); + A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]); + return A; + } +}); + +require('./_add-to-unscopables')('flatMap'); + +},{"./_a-function":136,"./_add-to-unscopables":138,"./_array-species-create":149,"./_export":167,"./_flatten-into-array":172,"./_to-length":252,"./_to-object":253}],405:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten +var $export = require('./_export'); +var flattenIntoArray = require('./_flatten-into-array'); +var toObject = require('./_to-object'); +var toLength = require('./_to-length'); +var toInteger = require('./_to-integer'); +var arraySpeciesCreate = require('./_array-species-create'); + +$export($export.P, 'Array', { + flatten: function flatten(/* depthArg = 1 */) { + var depthArg = arguments[0]; + var O = toObject(this); + var sourceLen = toLength(O.length); + var A = arraySpeciesCreate(O, 0); + flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg)); + return A; + } +}); + +require('./_add-to-unscopables')('flatten'); + +},{"./_add-to-unscopables":138,"./_array-species-create":149,"./_export":167,"./_flatten-into-array":172,"./_to-integer":250,"./_to-length":252,"./_to-object":253}],406:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export'); +var $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); + +},{"./_add-to-unscopables":138,"./_array-includes":145,"./_export":167}],407:[function(require,module,exports){ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export'); +var microtask = require('./_microtask')(); +var process = require('./_global').process; +var isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn) { + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); + +},{"./_cof":152,"./_export":167,"./_global":175,"./_microtask":202}],408:[function(require,module,exports){ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export'); +var cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it) { + return cof(it) === 'Error'; + } +}); + +},{"./_cof":152,"./_export":167}],409:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.G, { global: require('./_global') }); + +},{"./_export":167,"./_global":175}],410:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from +require('./_set-collection-from')('Map'); + +},{"./_set-collection-from":231}],411:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +require('./_set-collection-of')('Map'); + +},{"./_set-collection-of":232}],412:[function(require,module,exports){ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Map', { toJSON: require('./_collection-to-json')('Map') }); + +},{"./_collection-to-json":154,"./_export":167}],413:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { + clamp: function clamp(x, lower, upper) { + return Math.min(upper, Math.max(lower, x)); + } +}); + +},{"./_export":167}],414:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 }); + +},{"./_export":167}],415:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var RAD_PER_DEG = 180 / Math.PI; + +$export($export.S, 'Math', { + degrees: function degrees(radians) { + return radians * RAD_PER_DEG; + } +}); + +},{"./_export":167}],416:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var scale = require('./_math-scale'); +var fround = require('./_math-fround'); + +$export($export.S, 'Math', { + fscale: function fscale(x, inLow, inHigh, outLow, outHigh) { + return fround(scale(x, inLow, inHigh, outLow, outHigh)); + } +}); + +},{"./_export":167,"./_math-fround":196,"./_math-scale":198}],417:[function(require,module,exports){ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); + +},{"./_export":167}],418:[function(require,module,exports){ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + imulh: function imulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >> 16; + var v1 = $v >> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); + +},{"./_export":167}],419:[function(require,module,exports){ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1) { + var $x0 = x0 >>> 0; + var $x1 = x1 >>> 0; + var $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); + +},{"./_export":167}],420:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI }); + +},{"./_export":167}],421:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); +var DEG_PER_RAD = Math.PI / 180; + +$export($export.S, 'Math', { + radians: function radians(degrees) { + return degrees * DEG_PER_RAD; + } +}); + +},{"./_export":167}],422:[function(require,module,exports){ +// https://rwaldron.github.io/proposal-math-extensions/ +var $export = require('./_export'); + +$export($export.S, 'Math', { scale: require('./_math-scale') }); + +},{"./_export":167,"./_math-scale":198}],423:[function(require,module,exports){ +// http://jfbastien.github.io/papers/Math.signbit.html +var $export = require('./_export'); + +$export($export.S, 'Math', { signbit: function signbit(x) { + // eslint-disable-next-line no-self-compare + return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0; +} }); + +},{"./_export":167}],424:[function(require,module,exports){ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + umulh: function umulh(u, v) { + var UINT16 = 0xffff; + var $u = +u; + var $v = +v; + var u0 = $u & UINT16; + var v0 = $v & UINT16; + var u1 = $u >>> 16; + var v1 = $v >>> 16; + var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); + +},{"./_export":167}],425:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter) { + $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":136,"./_descriptors":163,"./_export":167,"./_object-dp":206,"./_object-forced-pam":208,"./_to-object":253}],426:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var aFunction = require('./_a-function'); +var $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter) { + $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true }); + } +}); + +},{"./_a-function":136,"./_descriptors":163,"./_export":167,"./_object-dp":206,"./_object-forced-pam":208,"./_to-object":253}],427:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it) { + return $entries(it); + } +}); + +},{"./_export":167,"./_object-to-array":218}],428:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export'); +var ownKeys = require('./_own-keys'); +var toIObject = require('./_to-iobject'); +var gOPD = require('./_object-gopd'); +var createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIObject(object); + var getDesc = gOPD.f; + var keys = ownKeys(O); + var result = {}; + var i = 0; + var key, desc; + while (keys.length > i) { + desc = getDesc(O, key = keys[i++]); + if (desc !== undefined) createProperty(result, key, desc); + } + return result; + } +}); + +},{"./_create-property":158,"./_export":167,"./_object-gopd":209,"./_own-keys":219,"./_to-iobject":251}],429:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.get; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":163,"./_export":167,"./_object-forced-pam":208,"./_object-gopd":209,"./_object-gpo":213,"./_to-object":253,"./_to-primitive":254}],430:[function(require,module,exports){ +'use strict'; +var $export = require('./_export'); +var toObject = require('./_to-object'); +var toPrimitive = require('./_to-primitive'); +var getPrototypeOf = require('./_object-gpo'); +var getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P) { + var O = toObject(this); + var K = toPrimitive(P, true); + var D; + do { + if (D = getOwnPropertyDescriptor(O, K)) return D.set; + } while (O = getPrototypeOf(O)); + } +}); + +},{"./_descriptors":163,"./_export":167,"./_object-forced-pam":208,"./_object-gopd":209,"./_object-gpo":213,"./_to-object":253,"./_to-primitive":254}],431:[function(require,module,exports){ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export'); +var $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it) { + return $values(it); + } +}); + +},{"./_export":167,"./_object-to-array":218}],432:[function(require,module,exports){ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export'); +var global = require('./_global'); +var core = require('./_core'); +var microtask = require('./_microtask')(); +var OBSERVABLE = require('./_wks')('observable'); +var aFunction = require('./_a-function'); +var anObject = require('./_an-object'); +var anInstance = require('./_an-instance'); +var redefineAll = require('./_redefine-all'); +var hide = require('./_hide'); +var forOf = require('./_for-of'); +var RETURN = forOf.RETURN; + +var getMethod = function (fn) { + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function (subscription) { + var cleanup = subscription._c; + if (cleanup) { + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function (subscription) { + return subscription._o === undefined; +}; + +var closeSubscription = function (subscription) { + if (!subscriptionClosed(subscription)) { + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function (observer, subscriber) { + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer); + var subscription = cleanup; + if (cleanup != null) { + if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch (e) { + observer.error(e); + return; + } if (subscriptionClosed(this)) cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe() { closeSubscription(this); } +}); + +var SubscriptionObserver = function (subscription) { + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if (m) return m.call(observer, value); + } catch (e) { + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value) { + var subscription = this._s; + if (subscriptionClosed(subscription)) throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if (!m) throw value; + value = m.call(observer, value); + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value) { + var subscription = this._s; + if (!subscriptionClosed(subscription)) { + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch (e) { + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber) { + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer) { + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn) { + var that = this; + return new (core.Promise || global.Promise)(function (resolve, reject) { + aFunction(fn); + var subscription = that.subscribe({ + next: function (value) { + try { + return fn(value); + } catch (e) { + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x) { + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if (method) { + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function (observer) { + return observable.subscribe(observer); + }); + } + return new C(function (observer) { + var done = false; + microtask(function () { + if (!done) { + try { + if (forOf(x, false, function (it) { + observer.next(it); + if (done) return RETURN; + }) === RETURN) return; + } catch (e) { + if (done) throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + }, + of: function of() { + for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function (observer) { + var done = false; + microtask(function () { + if (!done) { + for (var j = 0; j < items.length; ++j) { + observer.next(items[j]); + if (done) return; + } observer.complete(); + } + }); + return function () { done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function () { return this; }); + +$export($export.G, { Observable: $Observable }); + +require('./_set-species')('Observable'); + +},{"./_a-function":136,"./_an-instance":140,"./_an-object":141,"./_core":157,"./_export":167,"./_for-of":173,"./_global":175,"./_hide":177,"./_microtask":202,"./_redefine-all":225,"./_set-species":234,"./_wks":263}],433:[function(require,module,exports){ +// https://github.com/tc39/proposal-promise-finally +'use strict'; +var $export = require('./_export'); +var core = require('./_core'); +var global = require('./_global'); +var speciesConstructor = require('./_species-constructor'); +var promiseResolve = require('./_promise-resolve'); + +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); + +},{"./_core":157,"./_export":167,"./_global":175,"./_promise-resolve":223,"./_species-constructor":238}],434:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-promise-try +var $export = require('./_export'); +var newPromiseCapability = require('./_new-promise-capability'); +var perform = require('./_perform'); + +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); + +},{"./_export":167,"./_new-promise-capability":203,"./_perform":222}],435:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +} }); + +},{"./_an-object":141,"./_metadata":201}],436:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var toMetaKey = metadata.key; +var getOrCreateMetadataMap = metadata.map; +var store = metadata.store; + +metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +} }); + +},{"./_an-object":141,"./_metadata":201}],437:[function(require,module,exports){ +var Set = require('./es6.set'); +var from = require('./_array-from-iterable'); +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + +},{"./_an-object":141,"./_array-from-iterable":144,"./_metadata":201,"./_object-gpo":213,"./es6.set":367}],438:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + +},{"./_an-object":141,"./_metadata":201,"./_object-gpo":213}],439:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryOwnMetadataKeys = metadata.keys; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +} }); + +},{"./_an-object":141,"./_metadata":201}],440:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryGetOwnMetadata = metadata.get; +var toMetaKey = metadata.key; + +metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + +},{"./_an-object":141,"./_metadata":201}],441:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var getPrototypeOf = require('./_object-gpo'); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + +},{"./_an-object":141,"./_metadata":201,"./_object-gpo":213}],442:[function(require,module,exports){ +var metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var ordinaryHasOwnMetadata = metadata.has; +var toMetaKey = metadata.key; + +metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +} }); + +},{"./_an-object":141,"./_metadata":201}],443:[function(require,module,exports){ +var $metadata = require('./_metadata'); +var anObject = require('./_an-object'); +var aFunction = require('./_a-function'); +var toMetaKey = $metadata.key; +var ordinaryDefineOwnMetadata = $metadata.set; + +$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, targetKey) { + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +} }); + +},{"./_a-function":136,"./_an-object":141,"./_metadata":201}],444:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +require('./_set-collection-from')('Set'); + +},{"./_set-collection-from":231}],445:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +require('./_set-collection-of')('Set'); + +},{"./_set-collection-of":232}],446:[function(require,module,exports){ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Set', { toJSON: require('./_collection-to-json')('Set') }); + +},{"./_collection-to-json":154,"./_export":167}],447:[function(require,module,exports){ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export'); +var $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos) { + return $at(this, pos); + } +}); + +},{"./_export":167,"./_string-at":240}],448:[function(require,module,exports){ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export'); +var defined = require('./_defined'); +var toLength = require('./_to-length'); +var isRegExp = require('./_is-regexp'); +var getFlags = require('./_flags'); +var RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function (regexp, string) { + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next() { + var match = this._r.exec(this._s); + return { value: match, done: match === null }; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp) { + defined(this); + if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!'); + var S = String(this); + var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp); + var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); + +},{"./_defined":162,"./_export":167,"./_flags":171,"./_is-regexp":187,"./_iter-create":189,"./_to-length":252}],449:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padEnd: function padEnd(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); + +},{"./_export":167,"./_string-pad":243,"./_user-agent":259}],450:[function(require,module,exports){ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export'); +var $pad = require('./_string-pad'); +var userAgent = require('./_user-agent'); + +// https://github.com/zloirock/core-js/issues/280 +var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent); + +$export($export.P + $export.F * WEBKIT_BUG, 'String', { + padStart: function padStart(maxLength /* , fillString = ' ' */) { + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); + +},{"./_export":167,"./_string-pad":243,"./_user-agent":259}],451:[function(require,module,exports){ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimLeft', function ($trim) { + return function trimLeft() { + return $trim(this, 1); + }; +}, 'trimStart'); + +},{"./_string-trim":245}],452:[function(require,module,exports){ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimRight', function ($trim) { + return function trimRight() { + return $trim(this, 2); + }; +}, 'trimEnd'); + +},{"./_string-trim":245}],453:[function(require,module,exports){ +require('./_wks-define')('asyncIterator'); + +},{"./_wks-define":261}],454:[function(require,module,exports){ +require('./_wks-define')('observable'); + +},{"./_wks-define":261}],455:[function(require,module,exports){ +// https://github.com/tc39/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', { global: require('./_global') }); + +},{"./_export":167,"./_global":175}],456:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from +require('./_set-collection-from')('WeakMap'); + +},{"./_set-collection-from":231}],457:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of +require('./_set-collection-of')('WeakMap'); + +},{"./_set-collection-of":232}],458:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from +require('./_set-collection-from')('WeakSet'); + +},{"./_set-collection-from":231}],459:[function(require,module,exports){ +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +require('./_set-collection-of')('WeakSet'); + +},{"./_set-collection-of":232}],460:[function(require,module,exports){ +var $iterators = require('./es6.array.iterator'); +var getKeys = require('./_object-keys'); +var redefine = require('./_redefine'); +var global = require('./_global'); +var hide = require('./_hide'); +var Iterators = require('./_iterators'); +var wks = require('./_wks'); +var ITERATOR = wks('iterator'); +var TO_STRING_TAG = wks('toStringTag'); +var ArrayValues = Iterators.Array; + +var DOMIterables = { + CSSRuleList: true, // TODO: Not spec compliant, should be false. + CSSStyleDeclaration: false, + CSSValueList: false, + ClientRectList: false, + DOMRectList: false, + DOMStringList: false, + DOMTokenList: true, + DataTransferItemList: false, + FileList: false, + HTMLAllCollection: false, + HTMLCollection: false, + HTMLFormElement: false, + HTMLSelectElement: false, + MediaList: true, // TODO: Not spec compliant, should be false. + MimeTypeArray: false, + NamedNodeMap: false, + NodeList: true, + PaintRequestList: false, + Plugin: false, + PluginArray: false, + SVGLengthList: false, + SVGNumberList: false, + SVGPathSegList: false, + SVGPointList: false, + SVGStringList: false, + SVGTransformList: false, + SourceBufferList: false, + StyleSheetList: true, // TODO: Not spec compliant, should be false. + TextTrackCueList: false, + TextTrackList: false, + TouchList: false +}; + +for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { + var NAME = collections[i]; + var explicit = DOMIterables[NAME]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + var key; + if (proto) { + if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); + if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); + } +} + +},{"./_global":175,"./_hide":177,"./_iterators":193,"./_object-keys":215,"./_redefine":226,"./_wks":263,"./es6.array.iterator":276}],461:[function(require,module,exports){ +var $export = require('./_export'); +var $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); + +},{"./_export":167,"./_task":247}],462:[function(require,module,exports){ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global'); +var $export = require('./_export'); +var userAgent = require('./_user-agent'); +var slice = [].slice; +var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check +var wrap = function (set) { + return function (fn, time /* , ...args */) { + var boundArgs = arguments.length > 2; + var args = boundArgs ? slice.call(arguments, 2) : false; + return set(boundArgs ? function () { + // eslint-disable-next-line no-new-func + (typeof fn == 'function' ? fn : Function(fn)).apply(this, args); + } : fn, time); + }; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); + +},{"./_export":167,"./_global":175,"./_user-agent":259}],463:[function(require,module,exports){ +require('./modules/es6.symbol'); +require('./modules/es6.object.create'); +require('./modules/es6.object.define-property'); +require('./modules/es6.object.define-properties'); +require('./modules/es6.object.get-own-property-descriptor'); +require('./modules/es6.object.get-prototype-of'); +require('./modules/es6.object.keys'); +require('./modules/es6.object.get-own-property-names'); +require('./modules/es6.object.freeze'); +require('./modules/es6.object.seal'); +require('./modules/es6.object.prevent-extensions'); +require('./modules/es6.object.is-frozen'); +require('./modules/es6.object.is-sealed'); +require('./modules/es6.object.is-extensible'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.function.bind'); +require('./modules/es6.function.name'); +require('./modules/es6.function.has-instance'); +require('./modules/es6.parse-int'); +require('./modules/es6.parse-float'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.to-fixed'); +require('./modules/es6.number.to-precision'); +require('./modules/es6.number.epsilon'); +require('./modules/es6.number.is-finite'); +require('./modules/es6.number.is-integer'); +require('./modules/es6.number.is-nan'); +require('./modules/es6.number.is-safe-integer'); +require('./modules/es6.number.max-safe-integer'); +require('./modules/es6.number.min-safe-integer'); +require('./modules/es6.number.parse-float'); +require('./modules/es6.number.parse-int'); +require('./modules/es6.math.acosh'); +require('./modules/es6.math.asinh'); +require('./modules/es6.math.atanh'); +require('./modules/es6.math.cbrt'); +require('./modules/es6.math.clz32'); +require('./modules/es6.math.cosh'); +require('./modules/es6.math.expm1'); +require('./modules/es6.math.fround'); +require('./modules/es6.math.hypot'); +require('./modules/es6.math.imul'); +require('./modules/es6.math.log10'); +require('./modules/es6.math.log1p'); +require('./modules/es6.math.log2'); +require('./modules/es6.math.sign'); +require('./modules/es6.math.sinh'); +require('./modules/es6.math.tanh'); +require('./modules/es6.math.trunc'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.trim'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.string.anchor'); +require('./modules/es6.string.big'); +require('./modules/es6.string.blink'); +require('./modules/es6.string.bold'); +require('./modules/es6.string.fixed'); +require('./modules/es6.string.fontcolor'); +require('./modules/es6.string.fontsize'); +require('./modules/es6.string.italics'); +require('./modules/es6.string.link'); +require('./modules/es6.string.small'); +require('./modules/es6.string.strike'); +require('./modules/es6.string.sub'); +require('./modules/es6.string.sup'); +require('./modules/es6.date.now'); +require('./modules/es6.date.to-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +require('./modules/es6.array.is-array'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.join'); +require('./modules/es6.array.slice'); +require('./modules/es6.array.sort'); +require('./modules/es6.array.for-each'); +require('./modules/es6.array.map'); +require('./modules/es6.array.filter'); +require('./modules/es6.array.some'); +require('./modules/es6.array.every'); +require('./modules/es6.array.reduce'); +require('./modules/es6.array.reduce-right'); +require('./modules/es6.array.index-of'); +require('./modules/es6.array.last-index-of'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.array.species'); +require('./modules/es6.array.iterator'); +require('./modules/es6.regexp.constructor'); +require('./modules/es6.regexp.exec'); +require('./modules/es6.regexp.to-string'); +require('./modules/es6.regexp.flags'); +require('./modules/es6.regexp.match'); +require('./modules/es6.regexp.replace'); +require('./modules/es6.regexp.search'); +require('./modules/es6.regexp.split'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.typed.array-buffer'); +require('./modules/es6.typed.data-view'); +require('./modules/es6.typed.int8-array'); +require('./modules/es6.typed.uint8-array'); +require('./modules/es6.typed.uint8-clamped-array'); +require('./modules/es6.typed.int16-array'); +require('./modules/es6.typed.uint16-array'); +require('./modules/es6.typed.int32-array'); +require('./modules/es6.typed.uint32-array'); +require('./modules/es6.typed.float32-array'); +require('./modules/es6.typed.float64-array'); +require('./modules/es6.reflect.apply'); +require('./modules/es6.reflect.construct'); +require('./modules/es6.reflect.define-property'); +require('./modules/es6.reflect.delete-property'); +require('./modules/es6.reflect.enumerate'); +require('./modules/es6.reflect.get'); +require('./modules/es6.reflect.get-own-property-descriptor'); +require('./modules/es6.reflect.get-prototype-of'); +require('./modules/es6.reflect.has'); +require('./modules/es6.reflect.is-extensible'); +require('./modules/es6.reflect.own-keys'); +require('./modules/es6.reflect.prevent-extensions'); +require('./modules/es6.reflect.set'); +require('./modules/es6.reflect.set-prototype-of'); +require('./modules/es7.array.includes'); +require('./modules/es7.array.flat-map'); +require('./modules/es7.array.flatten'); +require('./modules/es7.string.at'); +require('./modules/es7.string.pad-start'); +require('./modules/es7.string.pad-end'); +require('./modules/es7.string.trim-left'); +require('./modules/es7.string.trim-right'); +require('./modules/es7.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.map.of'); +require('./modules/es7.set.of'); +require('./modules/es7.weak-map.of'); +require('./modules/es7.weak-set.of'); +require('./modules/es7.map.from'); +require('./modules/es7.set.from'); +require('./modules/es7.weak-map.from'); +require('./modules/es7.weak-set.from'); +require('./modules/es7.global'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.clamp'); +require('./modules/es7.math.deg-per-rad'); +require('./modules/es7.math.degrees'); +require('./modules/es7.math.fscale'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.rad-per-deg'); +require('./modules/es7.math.radians'); +require('./modules/es7.math.scale'); +require('./modules/es7.math.umulh'); +require('./modules/es7.math.signbit'); +require('./modules/es7.promise.finally'); +require('./modules/es7.promise.try'); +require('./modules/es7.reflect.define-metadata'); +require('./modules/es7.reflect.delete-metadata'); +require('./modules/es7.reflect.get-metadata'); +require('./modules/es7.reflect.get-metadata-keys'); +require('./modules/es7.reflect.get-own-metadata'); +require('./modules/es7.reflect.get-own-metadata-keys'); +require('./modules/es7.reflect.has-metadata'); +require('./modules/es7.reflect.has-own-metadata'); +require('./modules/es7.reflect.metadata'); +require('./modules/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); + +},{"./modules/_core":157,"./modules/es6.array.copy-within":266,"./modules/es6.array.every":267,"./modules/es6.array.fill":268,"./modules/es6.array.filter":269,"./modules/es6.array.find":271,"./modules/es6.array.find-index":270,"./modules/es6.array.for-each":272,"./modules/es6.array.from":273,"./modules/es6.array.index-of":274,"./modules/es6.array.is-array":275,"./modules/es6.array.iterator":276,"./modules/es6.array.join":277,"./modules/es6.array.last-index-of":278,"./modules/es6.array.map":279,"./modules/es6.array.of":280,"./modules/es6.array.reduce":282,"./modules/es6.array.reduce-right":281,"./modules/es6.array.slice":283,"./modules/es6.array.some":284,"./modules/es6.array.sort":285,"./modules/es6.array.species":286,"./modules/es6.date.now":287,"./modules/es6.date.to-iso-string":288,"./modules/es6.date.to-json":289,"./modules/es6.date.to-primitive":290,"./modules/es6.date.to-string":291,"./modules/es6.function.bind":292,"./modules/es6.function.has-instance":293,"./modules/es6.function.name":294,"./modules/es6.map":295,"./modules/es6.math.acosh":296,"./modules/es6.math.asinh":297,"./modules/es6.math.atanh":298,"./modules/es6.math.cbrt":299,"./modules/es6.math.clz32":300,"./modules/es6.math.cosh":301,"./modules/es6.math.expm1":302,"./modules/es6.math.fround":303,"./modules/es6.math.hypot":304,"./modules/es6.math.imul":305,"./modules/es6.math.log10":306,"./modules/es6.math.log1p":307,"./modules/es6.math.log2":308,"./modules/es6.math.sign":309,"./modules/es6.math.sinh":310,"./modules/es6.math.tanh":311,"./modules/es6.math.trunc":312,"./modules/es6.number.constructor":313,"./modules/es6.number.epsilon":314,"./modules/es6.number.is-finite":315,"./modules/es6.number.is-integer":316,"./modules/es6.number.is-nan":317,"./modules/es6.number.is-safe-integer":318,"./modules/es6.number.max-safe-integer":319,"./modules/es6.number.min-safe-integer":320,"./modules/es6.number.parse-float":321,"./modules/es6.number.parse-int":322,"./modules/es6.number.to-fixed":323,"./modules/es6.number.to-precision":324,"./modules/es6.object.assign":325,"./modules/es6.object.create":326,"./modules/es6.object.define-properties":327,"./modules/es6.object.define-property":328,"./modules/es6.object.freeze":329,"./modules/es6.object.get-own-property-descriptor":330,"./modules/es6.object.get-own-property-names":331,"./modules/es6.object.get-prototype-of":332,"./modules/es6.object.is":336,"./modules/es6.object.is-extensible":333,"./modules/es6.object.is-frozen":334,"./modules/es6.object.is-sealed":335,"./modules/es6.object.keys":337,"./modules/es6.object.prevent-extensions":338,"./modules/es6.object.seal":339,"./modules/es6.object.set-prototype-of":340,"./modules/es6.object.to-string":341,"./modules/es6.parse-float":342,"./modules/es6.parse-int":343,"./modules/es6.promise":344,"./modules/es6.reflect.apply":345,"./modules/es6.reflect.construct":346,"./modules/es6.reflect.define-property":347,"./modules/es6.reflect.delete-property":348,"./modules/es6.reflect.enumerate":349,"./modules/es6.reflect.get":352,"./modules/es6.reflect.get-own-property-descriptor":350,"./modules/es6.reflect.get-prototype-of":351,"./modules/es6.reflect.has":353,"./modules/es6.reflect.is-extensible":354,"./modules/es6.reflect.own-keys":355,"./modules/es6.reflect.prevent-extensions":356,"./modules/es6.reflect.set":358,"./modules/es6.reflect.set-prototype-of":357,"./modules/es6.regexp.constructor":359,"./modules/es6.regexp.exec":360,"./modules/es6.regexp.flags":361,"./modules/es6.regexp.match":362,"./modules/es6.regexp.replace":363,"./modules/es6.regexp.search":364,"./modules/es6.regexp.split":365,"./modules/es6.regexp.to-string":366,"./modules/es6.set":367,"./modules/es6.string.anchor":368,"./modules/es6.string.big":369,"./modules/es6.string.blink":370,"./modules/es6.string.bold":371,"./modules/es6.string.code-point-at":372,"./modules/es6.string.ends-with":373,"./modules/es6.string.fixed":374,"./modules/es6.string.fontcolor":375,"./modules/es6.string.fontsize":376,"./modules/es6.string.from-code-point":377,"./modules/es6.string.includes":378,"./modules/es6.string.italics":379,"./modules/es6.string.iterator":380,"./modules/es6.string.link":381,"./modules/es6.string.raw":382,"./modules/es6.string.repeat":383,"./modules/es6.string.small":384,"./modules/es6.string.starts-with":385,"./modules/es6.string.strike":386,"./modules/es6.string.sub":387,"./modules/es6.string.sup":388,"./modules/es6.string.trim":389,"./modules/es6.symbol":390,"./modules/es6.typed.array-buffer":391,"./modules/es6.typed.data-view":392,"./modules/es6.typed.float32-array":393,"./modules/es6.typed.float64-array":394,"./modules/es6.typed.int16-array":395,"./modules/es6.typed.int32-array":396,"./modules/es6.typed.int8-array":397,"./modules/es6.typed.uint16-array":398,"./modules/es6.typed.uint32-array":399,"./modules/es6.typed.uint8-array":400,"./modules/es6.typed.uint8-clamped-array":401,"./modules/es6.weak-map":402,"./modules/es6.weak-set":403,"./modules/es7.array.flat-map":404,"./modules/es7.array.flatten":405,"./modules/es7.array.includes":406,"./modules/es7.asap":407,"./modules/es7.error.is-error":408,"./modules/es7.global":409,"./modules/es7.map.from":410,"./modules/es7.map.of":411,"./modules/es7.map.to-json":412,"./modules/es7.math.clamp":413,"./modules/es7.math.deg-per-rad":414,"./modules/es7.math.degrees":415,"./modules/es7.math.fscale":416,"./modules/es7.math.iaddh":417,"./modules/es7.math.imulh":418,"./modules/es7.math.isubh":419,"./modules/es7.math.rad-per-deg":420,"./modules/es7.math.radians":421,"./modules/es7.math.scale":422,"./modules/es7.math.signbit":423,"./modules/es7.math.umulh":424,"./modules/es7.object.define-getter":425,"./modules/es7.object.define-setter":426,"./modules/es7.object.entries":427,"./modules/es7.object.get-own-property-descriptors":428,"./modules/es7.object.lookup-getter":429,"./modules/es7.object.lookup-setter":430,"./modules/es7.object.values":431,"./modules/es7.observable":432,"./modules/es7.promise.finally":433,"./modules/es7.promise.try":434,"./modules/es7.reflect.define-metadata":435,"./modules/es7.reflect.delete-metadata":436,"./modules/es7.reflect.get-metadata":438,"./modules/es7.reflect.get-metadata-keys":437,"./modules/es7.reflect.get-own-metadata":440,"./modules/es7.reflect.get-own-metadata-keys":439,"./modules/es7.reflect.has-metadata":441,"./modules/es7.reflect.has-own-metadata":442,"./modules/es7.reflect.metadata":443,"./modules/es7.set.from":444,"./modules/es7.set.of":445,"./modules/es7.set.to-json":446,"./modules/es7.string.at":447,"./modules/es7.string.match-all":448,"./modules/es7.string.pad-end":449,"./modules/es7.string.pad-start":450,"./modules/es7.string.trim-left":451,"./modules/es7.string.trim-right":452,"./modules/es7.symbol.async-iterator":453,"./modules/es7.symbol.observable":454,"./modules/es7.system.global":455,"./modules/es7.weak-map.from":456,"./modules/es7.weak-map.of":457,"./modules/es7.weak-set.from":458,"./modules/es7.weak-set.of":459,"./modules/web.dom.iterable":460,"./modules/web.immediate":461,"./modules/web.timers":462}],464:[function(require,module,exports){ +(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); +} + +}).call(this,{"isBuffer":require("../../is-buffer/index.js")}) +},{"../../is-buffer/index.js":839}],465:[function(require,module,exports){ +(function (Buffer){ +var elliptic = require('elliptic') +var BN = require('bn.js') + +module.exports = function createECDH (curve) { + return new ECDH(curve) +} + +var aliases = { + secp256k1: { + name: 'secp256k1', + byteLength: 32 + }, + secp224r1: { + name: 'p224', + byteLength: 28 + }, + prime256v1: { + name: 'p256', + byteLength: 32 + }, + prime192v1: { + name: 'p192', + byteLength: 24 + }, + ed25519: { + name: 'ed25519', + byteLength: 32 + }, + secp384r1: { + name: 'p384', + byteLength: 48 + }, + secp521r1: { + name: 'p521', + byteLength: 66 + } +} + +aliases.p224 = aliases.secp224r1 +aliases.p256 = aliases.secp256r1 = aliases.prime256v1 +aliases.p192 = aliases.secp192r1 = aliases.prime192v1 +aliases.p384 = aliases.secp384r1 +aliases.p521 = aliases.secp521r1 + +function ECDH (curve) { + this.curveType = aliases[curve] + if (!this.curveType) { + this.curveType = { + name: curve + } + } + this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap + this.keys = void 0 +} + +ECDH.prototype.generateKeys = function (enc, format) { + this.keys = this.curve.genKeyPair() + return this.getPublicKey(enc, format) +} + +ECDH.prototype.computeSecret = function (other, inenc, enc) { + inenc = inenc || 'utf8' + if (!Buffer.isBuffer(other)) { + other = new Buffer(other, inenc) + } + var otherPub = this.curve.keyFromPublic(other).getPublic() + var out = otherPub.mul(this.keys.getPrivate()).getX() + return formatReturnValue(out, enc, this.curveType.byteLength) +} + +ECDH.prototype.getPublicKey = function (enc, format) { + var key = this.keys.getPublic(format === 'compressed', true) + if (format === 'hybrid') { + if (key[key.length - 1] % 2) { + key[0] = 7 + } else { + key[0] = 6 + } + } + return formatReturnValue(key, enc) +} + +ECDH.prototype.getPrivateKey = function (enc) { + return formatReturnValue(this.keys.getPrivate(), enc) +} + +ECDH.prototype.setPublicKey = function (pub, enc) { + enc = enc || 'utf8' + if (!Buffer.isBuffer(pub)) { + pub = new Buffer(pub, enc) + } + this.keys._importPublic(pub) + return this +} + +ECDH.prototype.setPrivateKey = function (priv, enc) { + enc = enc || 'utf8' + if (!Buffer.isBuffer(priv)) { + priv = new Buffer(priv, enc) + } + + var _priv = new BN(priv) + _priv = _priv.toString(16) + this.keys = this.curve.genKeyPair() + this.keys._importPrivate(_priv) + return this +} + +function formatReturnValue (bn, enc, len) { + if (!Array.isArray(bn)) { + bn = bn.toArray() + } + var buf = new Buffer(bn) + if (len && buf.length < len) { + var zeros = new Buffer(len - buf.length) + zeros.fill(0) + buf = Buffer.concat([zeros, buf]) + } + if (!enc) { + return buf + } else { + return buf.toString(enc) + } +} + +}).call(this,require("buffer").Buffer) +},{"bn.js":66,"buffer":113,"elliptic":548}],466:[function(require,module,exports){ +'use strict' +var inherits = require('inherits') +var MD5 = require('md5.js') +var RIPEMD160 = require('ripemd160') +var sha = require('sha.js') +var Base = require('cipher-base') + +function Hash (hash) { + Base.call(this, 'digest') + + this._hash = hash +} + +inherits(Hash, Base) + +Hash.prototype._update = function (data) { + this._hash.update(data) +} + +Hash.prototype._final = function () { + return this._hash.digest() +} + +module.exports = function createHash (alg) { + alg = alg.toLowerCase() + if (alg === 'md5') return new MD5() + if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160() + + return new Hash(sha(alg)) +} + +},{"cipher-base":120,"inherits":834,"md5.js":935,"ripemd160":1330,"sha.js":1349}],467:[function(require,module,exports){ +var MD5 = require('md5.js') + +module.exports = function (buffer) { + return new MD5().update(buffer).digest() +} + +},{"md5.js":935}],468:[function(require,module,exports){ +'use strict' +var inherits = require('inherits') +var Legacy = require('./legacy') +var Base = require('cipher-base') +var Buffer = require('safe-buffer').Buffer +var md5 = require('create-hash/md5') +var RIPEMD160 = require('ripemd160') + +var sha = require('sha.js') + +var ZEROS = Buffer.alloc(128) + +function Hmac (alg, key) { + Base.call(this, 'digest') + if (typeof key === 'string') { + key = Buffer.from(key) + } + + var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64 + + this._alg = alg + this._key = key + if (key.length > blocksize) { + var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg) + key = hash.update(key).digest() + } else if (key.length < blocksize) { + key = Buffer.concat([key, ZEROS], blocksize) + } + + var ipad = this._ipad = Buffer.allocUnsafe(blocksize) + var opad = this._opad = Buffer.allocUnsafe(blocksize) + + for (var i = 0; i < blocksize; i++) { + ipad[i] = key[i] ^ 0x36 + opad[i] = key[i] ^ 0x5C + } + this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg) + this._hash.update(ipad) +} + +inherits(Hmac, Base) + +Hmac.prototype._update = function (data) { + this._hash.update(data) +} + +Hmac.prototype._final = function () { + var h = this._hash.digest() + var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg) + return hash.update(this._opad).update(h).digest() +} + +module.exports = function createHmac (alg, key) { + alg = alg.toLowerCase() + if (alg === 'rmd160' || alg === 'ripemd160') { + return new Hmac('rmd160', key) + } + if (alg === 'md5') { + return new Legacy(md5, key) + } + return new Hmac(alg, key) +} + +},{"./legacy":469,"cipher-base":120,"create-hash/md5":467,"inherits":834,"ripemd160":1330,"safe-buffer":1334,"sha.js":1349}],469:[function(require,module,exports){ +'use strict' +var inherits = require('inherits') +var Buffer = require('safe-buffer').Buffer + +var Base = require('cipher-base') + +var ZEROS = Buffer.alloc(128) +var blocksize = 64 + +function Hmac (alg, key) { + Base.call(this, 'digest') + if (typeof key === 'string') { + key = Buffer.from(key) + } + + this._alg = alg + this._key = key + + if (key.length > blocksize) { + key = alg(key) + } else if (key.length < blocksize) { + key = Buffer.concat([key, ZEROS], blocksize) + } + + var ipad = this._ipad = Buffer.allocUnsafe(blocksize) + var opad = this._opad = Buffer.allocUnsafe(blocksize) + + for (var i = 0; i < blocksize; i++) { + ipad[i] = key[i] ^ 0x36 + opad[i] = key[i] ^ 0x5C + } + + this._hash = [ipad] +} + +inherits(Hmac, Base) + +Hmac.prototype._update = function (data) { + this._hash.push(data) +} + +Hmac.prototype._final = function () { + var h = this._alg(Buffer.concat(this._hash)) + return this._alg(Buffer.concat([this._opad, h])) +} +module.exports = Hmac + +},{"cipher-base":120,"inherits":834,"safe-buffer":1334}],470:[function(require,module,exports){ +'use strict' + +exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes') +exports.createHash = exports.Hash = require('create-hash') +exports.createHmac = exports.Hmac = require('create-hmac') + +var algos = require('browserify-sign/algos') +var algoKeys = Object.keys(algos) +var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys) +exports.getHashes = function () { + return hashes +} + +var p = require('pbkdf2') +exports.pbkdf2 = p.pbkdf2 +exports.pbkdf2Sync = p.pbkdf2Sync + +var aes = require('browserify-cipher') + +exports.Cipher = aes.Cipher +exports.createCipher = aes.createCipher +exports.Cipheriv = aes.Cipheriv +exports.createCipheriv = aes.createCipheriv +exports.Decipher = aes.Decipher +exports.createDecipher = aes.createDecipher +exports.Decipheriv = aes.Decipheriv +exports.createDecipheriv = aes.createDecipheriv +exports.getCiphers = aes.getCiphers +exports.listCiphers = aes.listCiphers + +var dh = require('diffie-hellman') + +exports.DiffieHellmanGroup = dh.DiffieHellmanGroup +exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup +exports.getDiffieHellman = dh.getDiffieHellman +exports.createDiffieHellman = dh.createDiffieHellman +exports.DiffieHellman = dh.DiffieHellman + +var sign = require('browserify-sign') + +exports.createSign = sign.createSign +exports.Sign = sign.Sign +exports.createVerify = sign.createVerify +exports.Verify = sign.Verify + +exports.createECDH = require('create-ecdh') + +var publicEncrypt = require('public-encrypt') + +exports.publicEncrypt = publicEncrypt.publicEncrypt +exports.privateEncrypt = publicEncrypt.privateEncrypt +exports.publicDecrypt = publicEncrypt.publicDecrypt +exports.privateDecrypt = publicEncrypt.privateDecrypt + +// the least I can do is make error messages for the rest of the node.js/crypto api. +// ;[ +// 'createCredentials' +// ].forEach(function (name) { +// exports[name] = function () { +// throw new Error([ +// 'sorry, ' + name + ' is not implemented yet', +// 'we accept pull requests', +// 'https://github.com/crypto-browserify/crypto-browserify' +// ].join('\n')) +// } +// }) + +var rf = require('randomfill') + +exports.randomFill = rf.randomFill +exports.randomFillSync = rf.randomFillSync + +exports.createCredentials = function () { + throw new Error([ + 'sorry, createCredentials is not implemented yet', + 'we accept pull requests', + 'https://github.com/crypto-browserify/crypto-browserify' + ].join('\n')) +} + +exports.constants = { + 'DH_CHECK_P_NOT_SAFE_PRIME': 2, + 'DH_CHECK_P_NOT_PRIME': 1, + 'DH_UNABLE_TO_CHECK_GENERATOR': 4, + 'DH_NOT_SUITABLE_GENERATOR': 8, + 'NPN_ENABLED': 1, + 'ALPN_ENABLED': 1, + 'RSA_PKCS1_PADDING': 1, + 'RSA_SSLV23_PADDING': 2, + 'RSA_NO_PADDING': 3, + 'RSA_PKCS1_OAEP_PADDING': 4, + 'RSA_X931_PADDING': 5, + 'RSA_PKCS1_PSS_PADDING': 6, + 'POINT_CONVERSION_COMPRESSED': 2, + 'POINT_CONVERSION_UNCOMPRESSED': 4, + 'POINT_CONVERSION_HYBRID': 6 +} + +},{"browserify-cipher":95,"browserify-sign":103,"browserify-sign/algos":100,"create-ecdh":465,"create-hash":466,"create-hmac":468,"diffie-hellman":539,"pbkdf2":1014,"public-encrypt":1026,"randombytes":1036,"randomfill":1037}],471:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + return CryptoJS.AES; + +})); +},{"./cipher-core":472,"./core":473,"./enc-base64":474,"./evpkdf":476,"./md5":481}],472:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + this._mode = modeCreator.call(mode, this, iv && iv.words); + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + +})); +},{"./core":473}],473:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); +},{}],474:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64; + +})); +},{"./core":473}],475:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + return CryptoJS.enc.Utf16; + +})); +},{"./core":473}],476:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.EvpKDF; + +})); +},{"./core":473,"./hmac":478,"./sha1":497}],477:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + return CryptoJS.format.Hex; + +})); +},{"./cipher-core":472,"./core":473}],478:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + +})); +},{"./core":473}],479:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS; + +})); +},{"./aes":471,"./cipher-core":472,"./core":473,"./enc-base64":474,"./enc-utf16":475,"./evpkdf":476,"./format-hex":477,"./hmac":478,"./lib-typedarrays":480,"./md5":481,"./mode-cfb":482,"./mode-ctr":484,"./mode-ctr-gladman":483,"./mode-ecb":485,"./mode-ofb":486,"./pad-ansix923":487,"./pad-iso10126":488,"./pad-iso97971":489,"./pad-nopadding":490,"./pad-zeropadding":491,"./pbkdf2":492,"./rabbit":494,"./rabbit-legacy":493,"./rc4":495,"./ripemd160":496,"./sha1":497,"./sha224":498,"./sha256":499,"./sha3":500,"./sha384":501,"./sha512":502,"./tripledes":503,"./x64-core":504}],480:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + return CryptoJS.lib.WordArray; + +})); +},{"./core":473}],481:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + return CryptoJS.MD5; + +})); +},{"./core":473}],482:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + return CryptoJS.mode.CFB; + +})); +},{"./cipher-core":472,"./core":473}],483:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + return CryptoJS.mode.CTRGladman; + +})); +},{"./cipher-core":472,"./core":473}],484:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + return CryptoJS.mode.CTR; + +})); +},{"./cipher-core":472,"./core":473}],485:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + return CryptoJS.mode.ECB; + +})); +},{"./cipher-core":472,"./core":473}],486:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + return CryptoJS.mode.OFB; + +})); +},{"./cipher-core":472,"./core":473}],487:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Ansix923; + +})); +},{"./cipher-core":472,"./core":473}],488:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Iso10126; + +})); +},{"./cipher-core":472,"./core":473}],489:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + return CryptoJS.pad.Iso97971; + +})); +},{"./cipher-core":472,"./core":473}],490:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + return CryptoJS.pad.NoPadding; + +})); +},{"./cipher-core":472,"./core":473}],491:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; + + + return CryptoJS.pad.ZeroPadding; + +})); +},{"./cipher-core":472,"./core":473}],492:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.PBKDF2; + +})); +},{"./core":473,"./hmac":478,"./sha1":497}],493:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + return CryptoJS.RabbitLegacy; + +})); +},{"./cipher-core":472,"./core":473,"./enc-base64":474,"./evpkdf":476,"./md5":481}],494:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + return CryptoJS.Rabbit; + +})); +},{"./cipher-core":472,"./core":473,"./enc-base64":474,"./evpkdf":476,"./md5":481}],495:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + return CryptoJS.RC4; + +})); +},{"./cipher-core":472,"./core":473,"./enc-base64":474,"./evpkdf":476,"./md5":481}],496:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + return CryptoJS.RIPEMD160; + +})); +},{"./core":473}],497:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + return CryptoJS.SHA1; + +})); +},{"./core":473}],498:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + return CryptoJS.SHA224; + +})); +},{"./core":473,"./sha256":499}],499:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); +},{"./core":473}],500:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + return CryptoJS.SHA3; + +})); +},{"./core":473,"./x64-core":504}],501:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + return CryptoJS.SHA384; + +})); +},{"./core":473,"./sha512":502,"./x64-core":504}],502:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + return CryptoJS.SHA512; + +})); +},{"./core":473,"./x64-core":504}],503:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + return CryptoJS.TripleDES; + +})); +},{"./cipher-core":472,"./core":473,"./enc-base64":474,"./evpkdf":476,"./md5":481}],504:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + return CryptoJS; + +})); +},{"./core":473}],505:[function(require,module,exports){ +(function (global){ +'use strict'; + +var csjs = require('csjs'); +var insertCss = require('insert-css'); + +function csjsInserter() { + var args = Array.prototype.slice.call(arguments); + var result = csjs.apply(null, args); + if (global.document) { + insertCss(csjs.getCss(result)); + } + return result; +} + +module.exports = csjsInserter; + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"csjs":510,"insert-css":835}],506:[function(require,module,exports){ +'use strict'; + +module.exports = require('csjs/get-css'); + +},{"csjs/get-css":509}],507:[function(require,module,exports){ +'use strict'; + +var csjs = require('./csjs'); + +module.exports = csjs; +module.exports.csjs = csjs; +module.exports.getCss = require('./get-css'); + +},{"./csjs":505,"./get-css":506}],508:[function(require,module,exports){ +'use strict'; + +module.exports = require('./lib/csjs'); + +},{"./lib/csjs":514}],509:[function(require,module,exports){ +'use strict'; + +module.exports = require('./lib/get-css'); + +},{"./lib/get-css":518}],510:[function(require,module,exports){ +'use strict'; + +var csjs = require('./csjs'); + +module.exports = csjs(); +module.exports.csjs = csjs; +module.exports.noScope = csjs({ noscope: true }); +module.exports.getCss = require('./get-css'); + +},{"./csjs":508,"./get-css":509}],511:[function(require,module,exports){ +'use strict'; + +/** + * base62 encode implementation based on base62 module: + * https://github.com/andrew/base62.js + */ + +var CHARS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + +module.exports = function encode(integer) { + if (integer === 0) { + return '0'; + } + var str = ''; + while (integer > 0) { + str = CHARS[integer % 62] + str; + integer = Math.floor(integer / 62); + } + return str; +}; + +},{}],512:[function(require,module,exports){ +'use strict'; + +var makeComposition = require('./composition').makeComposition; + +module.exports = function createExports(classes, keyframes, compositions) { + var keyframesObj = Object.keys(keyframes).reduce(function(acc, key) { + var val = keyframes[key]; + acc[val] = makeComposition([key], [val], true); + return acc; + }, {}); + + var exports = Object.keys(classes).reduce(function(acc, key) { + var val = classes[key]; + var composition = compositions[key]; + var extended = composition ? getClassChain(composition) : []; + var allClasses = [key].concat(extended); + var unscoped = allClasses.map(function(name) { + return classes[name] ? classes[name] : name; + }); + acc[val] = makeComposition(allClasses, unscoped); + return acc; + }, keyframesObj); + + return exports; +} + +function getClassChain(obj) { + var visited = {}, acc = []; + + function traverse(obj) { + return Object.keys(obj).forEach(function(key) { + if (!visited[key]) { + visited[key] = true; + acc.push(key); + traverse(obj[key]); + } + }); + } + + traverse(obj); + return acc; +} + +},{"./composition":513}],513:[function(require,module,exports){ +'use strict'; + +module.exports = { + makeComposition: makeComposition, + isComposition: isComposition, + ignoreComposition: ignoreComposition +}; + +/** + * Returns an immutable composition object containing the given class names + * @param {array} classNames - The input array of class names + * @return {Composition} - An immutable object that holds multiple + * representations of the class composition + */ +function makeComposition(classNames, unscoped, isAnimation) { + var classString = classNames.join(' '); + return Object.create(Composition.prototype, { + classNames: { // the original array of class names + value: Object.freeze(classNames), + configurable: false, + writable: false, + enumerable: true + }, + unscoped: { // the original array of class names + value: Object.freeze(unscoped), + configurable: false, + writable: false, + enumerable: true + }, + className: { // space-separated class string for use in HTML + value: classString, + configurable: false, + writable: false, + enumerable: true + }, + selector: { // comma-separated, period-prefixed string for use in CSS + value: classNames.map(function(name) { + return isAnimation ? name : '.' + name; + }).join(', '), + configurable: false, + writable: false, + enumerable: true + }, + toString: { // toString() method, returns class string for use in HTML + value: function() { + return classString; + }, + configurable: false, + writeable: false, + enumerable: false + } + }); +} + +/** + * Returns whether the input value is a Composition + * @param value - value to check + * @return {boolean} - whether value is a Composition or not + */ +function isComposition(value) { + return value instanceof Composition; +} + +function ignoreComposition(values) { + return values.reduce(function(acc, val) { + if (isComposition(val)) { + val.classNames.forEach(function(name, i) { + acc[name] = val.unscoped[i]; + }); + } + return acc; + }, {}); +} + +/** + * Private constructor for use in `instanceof` checks + */ +function Composition() {} + +},{}],514:[function(require,module,exports){ +'use strict'; + +var extractExtends = require('./css-extract-extends'); +var composition = require('./composition'); +var isComposition = composition.isComposition; +var ignoreComposition = composition.ignoreComposition; +var buildExports = require('./build-exports'); +var scopify = require('./scopeify'); +var cssKey = require('./css-key'); +var extractExports = require('./extract-exports'); + +module.exports = function csjsTemplate(opts) { + opts = (typeof opts === 'undefined') ? {} : opts; + var noscope = (typeof opts.noscope === 'undefined') ? false : opts.noscope; + + return function csjsHandler(strings, values) { + // Fast path to prevent arguments deopt + var values = Array(arguments.length - 1); + for (var i = 1; i < arguments.length; i++) { + values[i - 1] = arguments[i]; + } + var css = joiner(strings, values.map(selectorize)); + var ignores = ignoreComposition(values); + + var scope = noscope ? extractExports(css) : scopify(css, ignores); + var extracted = extractExtends(scope.css); + var localClasses = without(scope.classes, ignores); + var localKeyframes = without(scope.keyframes, ignores); + var compositions = extracted.compositions; + + var exports = buildExports(localClasses, localKeyframes, compositions); + + return Object.defineProperty(exports, cssKey, { + enumerable: false, + configurable: false, + writeable: false, + value: extracted.css + }); + } +} + +/** + * Replaces class compositions with comma seperated class selectors + * @param value - the potential class composition + * @return - the original value or the selectorized class composition + */ +function selectorize(value) { + return isComposition(value) ? value.selector : value; +} + +/** + * Joins template string literals and values + * @param {array} strings - array of strings + * @param {array} values - array of values + * @return {string} - strings and values joined + */ +function joiner(strings, values) { + return strings.map(function(str, i) { + return (i !== values.length) ? str + values[i] : str; + }).join(''); +} + +/** + * Returns first object without keys of second + * @param {object} obj - source object + * @param {object} unwanted - object with unwanted keys + * @return {object} - first object without unwanted keys + */ +function without(obj, unwanted) { + return Object.keys(obj).reduce(function(acc, key) { + if (!unwanted[key]) { + acc[key] = obj[key]; + } + return acc; + }, {}); +} + +},{"./build-exports":512,"./composition":513,"./css-extract-extends":515,"./css-key":516,"./extract-exports":517,"./scopeify":523}],515:[function(require,module,exports){ +'use strict'; + +var makeComposition = require('./composition').makeComposition; + +var regex = /\.([^\s]+)(\s+)(extends\s+)(\.[^{]+)/g; + +module.exports = function extractExtends(css) { + var found, matches = []; + while (found = regex.exec(css)) { + matches.unshift(found); + } + + function extractCompositions(acc, match) { + var extendee = getClassName(match[1]); + var keyword = match[3]; + var extended = match[4]; + + // remove from output css + var index = match.index + match[1].length + match[2].length; + var len = keyword.length + extended.length; + acc.css = acc.css.slice(0, index) + " " + acc.css.slice(index + len + 1); + + var extendedClasses = splitter(extended); + + extendedClasses.forEach(function(className) { + if (!acc.compositions[extendee]) { + acc.compositions[extendee] = {}; + } + if (!acc.compositions[className]) { + acc.compositions[className] = {}; + } + acc.compositions[extendee][className] = acc.compositions[className]; + }); + return acc; + } + + return matches.reduce(extractCompositions, { + css: css, + compositions: {} + }); + +}; + +function splitter(match) { + return match.split(',').map(getClassName); +} + +function getClassName(str) { + var trimmed = str.trim(); + return trimmed[0] === '.' ? trimmed.substr(1) : trimmed; +} + +},{"./composition":513}],516:[function(require,module,exports){ +'use strict'; + +/** + * CSS identifiers with whitespace are invalid + * Hence this key will not cause a collision + */ + +module.exports = ' css '; + +},{}],517:[function(require,module,exports){ +'use strict'; + +var regex = require('./regex'); +var classRegex = regex.classRegex; +var keyframesRegex = regex.keyframesRegex; + +module.exports = extractExports; + +function extractExports(css) { + return { + css: css, + keyframes: getExport(css, keyframesRegex), + classes: getExport(css, classRegex) + }; +} + +function getExport(css, regex) { + var prop = {}; + var match; + while((match = regex.exec(css)) !== null) { + var name = match[2]; + prop[name] = name; + } + return prop; +} + +},{"./regex":520}],518:[function(require,module,exports){ +'use strict'; + +var cssKey = require('./css-key'); + +module.exports = function getCss(csjs) { + return csjs[cssKey]; +}; + +},{"./css-key":516}],519:[function(require,module,exports){ +'use strict'; + +/** + * djb2 string hash implementation based on string-hash module: + * https://github.com/darkskyapp/string-hash + */ + +module.exports = function hashStr(str) { + var hash = 5381; + var i = str.length; + + while (i) { + hash = (hash * 33) ^ str.charCodeAt(--i) + } + return hash >>> 0; +}; + +},{}],520:[function(require,module,exports){ +'use strict'; + +var findClasses = /(\.)(?!\d)([^\s\.,{\[>+~#:)]*)(?![^{]*})/.source; +var findKeyframes = /(@\S*keyframes\s*)([^{\s]*)/.source; +var ignoreComments = /(?!(?:[^*/]|\*[^/]|\/[^*])*\*+\/)/.source; + +var classRegex = new RegExp(findClasses + ignoreComments, 'g'); +var keyframesRegex = new RegExp(findKeyframes + ignoreComments, 'g'); + +module.exports = { + classRegex: classRegex, + keyframesRegex: keyframesRegex, + ignoreComments: ignoreComments, +}; + +},{}],521:[function(require,module,exports){ +var ignoreComments = require('./regex').ignoreComments; + +module.exports = replaceAnimations; + +function replaceAnimations(result) { + var animations = Object.keys(result.keyframes).reduce(function(acc, key) { + acc[result.keyframes[key]] = key; + return acc; + }, {}); + var unscoped = Object.keys(animations); + + if (unscoped.length) { + var regexStr = '((?:animation|animation-name)\\s*:[^};]*)(' + + unscoped.join('|') + ')([;\\s])' + ignoreComments; + var regex = new RegExp(regexStr, 'g'); + + var replaced = result.css.replace(regex, function(match, preamble, name, ending) { + return preamble + animations[name] + ending; + }); + + return { + css: replaced, + keyframes: result.keyframes, + classes: result.classes + } + } + + return result; +} + +},{"./regex":520}],522:[function(require,module,exports){ +'use strict'; + +var encode = require('./base62-encode'); +var hash = require('./hash-string'); + +module.exports = function fileScoper(fileSrc) { + var suffix = encode(hash(fileSrc)); + + return function scopedName(name) { + return name + '_' + suffix; + } +}; + +},{"./base62-encode":511,"./hash-string":519}],523:[function(require,module,exports){ +'use strict'; + +var fileScoper = require('./scoped-name'); +var replaceAnimations = require('./replace-animations'); +var regex = require('./regex'); +var classRegex = regex.classRegex; +var keyframesRegex = regex.keyframesRegex; + +module.exports = scopify; + +function scopify(css, ignores) { + var makeScopedName = fileScoper(css); + var replacers = { + classes: classRegex, + keyframes: keyframesRegex + }; + + function scopeCss(result, key) { + var replacer = replacers[key]; + function replaceFn(fullMatch, prefix, name) { + var scopedName = ignores[name] ? name : makeScopedName(name); + result[key][scopedName] = name; + return prefix + scopedName; + } + return { + css: result.css.replace(replacer, replaceFn), + keyframes: result.keyframes, + classes: result.classes + }; + } + + var result = Object.keys(replacers).reduce(scopeCss, { + css: css, + keyframes: {}, + classes: {} + }); + + return replaceAnimations(result); +} + +},{"./regex":520,"./replace-animations":521,"./scoped-name":522}],524:[function(require,module,exports){ +(function (global){ + +var NativeCustomEvent = global.CustomEvent; + +function useNative () { + try { + var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } }); + return 'cat' === p.type && 'bar' === p.detail.foo; + } catch (e) { + } + return false; +} + +/** + * Cross-browser `CustomEvent` constructor. + * + * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent + * + * @public + */ + +module.exports = useNative() ? NativeCustomEvent : + +// IE >= 9 +'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) { + var e = document.createEvent('CustomEvent'); + if (params) { + e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail); + } else { + e.initCustomEvent(type, false, false, void 0); + } + return e; +} : + +// IE <= 8 +function CustomEvent (type, params) { + var e = document.createEventObject(); + e.type = type; + if (params) { + e.bubbles = Boolean(params.bubbles); + e.cancelable = Boolean(params.cancelable); + e.detail = params.detail; + } else { + e.bubbles = false; + e.cancelable = false; + e.detail = void 0; + } + return e; +} + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],525:[function(require,module,exports){ +'use strict'; +var token = '%[a-f0-9]{2}'; +var singleMatcher = new RegExp(token, 'gi'); +var multiMatcher = new RegExp('(' + token + ')+', 'gi'); + +function decodeComponents(components, split) { + try { + // Try to decode the entire string first + return decodeURIComponent(components.join('')); + } catch (err) { + // Do nothing + } + + if (components.length === 1) { + return components; + } + + split = split || 1; + + // Split the array in 2 parts + var left = components.slice(0, split); + var right = components.slice(split); + + return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right)); +} + +function decode(input) { + try { + return decodeURIComponent(input); + } catch (err) { + var tokens = input.match(singleMatcher); + + for (var i = 1; i < tokens.length; i++) { + input = decodeComponents(tokens, i).join(''); + + tokens = input.match(singleMatcher); + } + + return input; + } +} + +function customDecodeURIComponent(input) { + // Keep track of all the replacements and prefill the map with the `BOM` + var replaceMap = { + '%FE%FF': '\uFFFD\uFFFD', + '%FF%FE': '\uFFFD\uFFFD' + }; + + var match = multiMatcher.exec(input); + while (match) { + try { + // Decode as big chunks as possible + replaceMap[match[0]] = decodeURIComponent(match[0]); + } catch (err) { + var result = decode(match[0]); + + if (result !== match[0]) { + replaceMap[match[0]] = result; + } + } + + match = multiMatcher.exec(input); + } + + // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else + replaceMap['%C2'] = '\uFFFD'; + + var entries = Object.keys(replaceMap); + + for (var i = 0; i < entries.length; i++) { + // Replace all decoded components + var key = entries[i]; + input = input.replace(new RegExp(key, 'g'), replaceMap[key]); + } + + return input; +} + +module.exports = function (encodedURI) { + if (typeof encodedURI !== 'string') { + throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`'); + } + + try { + encodedURI = encodedURI.replace(/\+/g, ' '); + + // Try the built in decoder first + return decodeURIComponent(encodedURI); + } catch (err) { + // Fallback to a more advanced decoder + return customDecodeURIComponent(encodedURI); + } +}; + +},{}],526:[function(require,module,exports){ +var util = require('util') + , AbstractIterator = require('abstract-leveldown').AbstractIterator + + +function DeferredIterator (options) { + AbstractIterator.call(this, options) + + this._options = options + this._iterator = null + this._operations = [] +} + +util.inherits(DeferredIterator, AbstractIterator) + +DeferredIterator.prototype.setDb = function (db) { + var it = this._iterator = db.iterator(this._options) + this._operations.forEach(function (op) { + it[op.method].apply(it, op.args) + }) +} + +DeferredIterator.prototype._operation = function (method, args) { + if (this._iterator) + return this._iterator[method].apply(this._iterator, args) + this._operations.push({ method: method, args: args }) +} + +'next end'.split(' ').forEach(function (m) { + DeferredIterator.prototype['_' + m] = function () { + this._operation(m, arguments) + } +}) + +module.exports = DeferredIterator; + +},{"abstract-leveldown":4,"util":1439}],527:[function(require,module,exports){ +(function (Buffer,process){ +var util = require('util') + , AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN + , DeferredIterator = require('./deferred-iterator') + +function DeferredLevelDOWN (location) { + AbstractLevelDOWN.call(this, typeof location == 'string' ? location : '') // optional location, who cares? + this._db = undefined + this._operations = [] + this._iterators = [] +} + +util.inherits(DeferredLevelDOWN, AbstractLevelDOWN) + +// called by LevelUP when we have a real DB to take its place +DeferredLevelDOWN.prototype.setDb = function (db) { + this._db = db + this._operations.forEach(function (op) { + db[op.method].apply(db, op.args) + }) + this._iterators.forEach(function (it) { + it.setDb(db) + }) +} + +DeferredLevelDOWN.prototype._open = function (options, callback) { + return process.nextTick(callback) +} + +// queue a new deferred operation +DeferredLevelDOWN.prototype._operation = function (method, args) { + if (this._db) + return this._db[method].apply(this._db, args) + this._operations.push({ method: method, args: args }) +} + +// deferrables +'put get del batch approximateSize'.split(' ').forEach(function (m) { + DeferredLevelDOWN.prototype['_' + m] = function () { + this._operation(m, arguments) + } +}) + +DeferredLevelDOWN.prototype._isBuffer = function (obj) { + return Buffer.isBuffer(obj) +} + +DeferredLevelDOWN.prototype._iterator = function (options) { + if (this._db) + return this._db.iterator.apply(this._db, arguments) + var it = new DeferredIterator(options) + this._iterators.push(it) + return it +} + +module.exports = DeferredLevelDOWN +module.exports.DeferredIterator = DeferredIterator + +}).call(this,{"isBuffer":require("../is-buffer/index.js")},require('_process')) +},{"../is-buffer/index.js":839,"./deferred-iterator":526,"_process":109,"abstract-leveldown":4,"util":1439}],528:[function(require,module,exports){ +'use strict'; + +var keys = require('object-keys'); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var origDefineProperty = Object.defineProperty; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var arePropertyDescriptorsSupported = function () { + var obj = {}; + try { + origDefineProperty(obj, 'x', { enumerable: false, value: obj }); + // eslint-disable-next-line no-unused-vars, no-restricted-syntax + for (var _ in obj) { // jscs:ignore disallowUnusedVariables + return false; + } + return obj.x === obj; + } catch (e) { /* this is IE 8. */ + return false; + } +}; +var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + +},{"object-keys":530}],529:[function(require,module,exports){ +'use strict'; + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = require('./isArguments'); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + +},{"./isArguments":531}],530:[function(require,module,exports){ +'use strict'; + +var slice = Array.prototype.slice; +var isArgs = require('./isArguments'); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation'); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + +},{"./implementation":529,"./isArguments":531}],531:[function(require,module,exports){ +'use strict'; + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + +},{}],532:[function(require,module,exports){ +var Stream = require('stream').Stream; +var util = require('util'); + +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); + +DelayedStream.create = function(source, options) { + var delayedStream = new this(); + + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + + delayedStream.source = source; + + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } + + return delayedStream; +}; + +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); + +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; + +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + + this.source.resume(); +}; + +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; + +DelayedStream.prototype.release = function() { + this._released = true; + + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; + +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; + +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } + + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } + + this._bufferedEvents.push(args); +}; + +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + + if (this.dataSize <= this.maxDataSize) { + return; + } + + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; + +},{"stream":1394,"util":1439}],533:[function(require,module,exports){ +'use strict'; + +exports.utils = require('./des/utils'); +exports.Cipher = require('./des/cipher'); +exports.DES = require('./des/des'); +exports.CBC = require('./des/cbc'); +exports.EDE = require('./des/ede'); + +},{"./des/cbc":534,"./des/cipher":535,"./des/des":536,"./des/ede":537,"./des/utils":538}],534:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var proto = {}; + +function CBCState(iv) { + assert.equal(iv.length, 8, 'Invalid IV length'); + + this.iv = new Array(8); + for (var i = 0; i < this.iv.length; i++) + this.iv[i] = iv[i]; +} + +function instantiate(Base) { + function CBC(options) { + Base.call(this, options); + this._cbcInit(); + } + inherits(CBC, Base); + + var keys = Object.keys(proto); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + CBC.prototype[key] = proto[key]; + } + + CBC.create = function create(options) { + return new CBC(options); + }; + + return CBC; +} + +exports.instantiate = instantiate; + +proto._cbcInit = function _cbcInit() { + var state = new CBCState(this.options.iv); + this._cbcState = state; +}; + +proto._update = function _update(inp, inOff, out, outOff) { + var state = this._cbcState; + var superProto = this.constructor.super_.prototype; + + var iv = state.iv; + if (this.type === 'encrypt') { + for (var i = 0; i < this.blockSize; i++) + iv[i] ^= inp[inOff + i]; + + superProto._update.call(this, iv, 0, out, outOff); + + for (var i = 0; i < this.blockSize; i++) + iv[i] = out[outOff + i]; + } else { + superProto._update.call(this, inp, inOff, out, outOff); + + for (var i = 0; i < this.blockSize; i++) + out[outOff + i] ^= iv[i]; + + for (var i = 0; i < this.blockSize; i++) + iv[i] = inp[inOff + i]; + } +}; + +},{"inherits":834,"minimalistic-assert":960}],535:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); + +function Cipher(options) { + this.options = options; + + this.type = this.options.type; + this.blockSize = 8; + this._init(); + + this.buffer = new Array(this.blockSize); + this.bufferOff = 0; +} +module.exports = Cipher; + +Cipher.prototype._init = function _init() { + // Might be overrided +}; + +Cipher.prototype.update = function update(data) { + if (data.length === 0) + return []; + + if (this.type === 'decrypt') + return this._updateDecrypt(data); + else + return this._updateEncrypt(data); +}; + +Cipher.prototype._buffer = function _buffer(data, off) { + // Append data to buffer + var min = Math.min(this.buffer.length - this.bufferOff, data.length - off); + for (var i = 0; i < min; i++) + this.buffer[this.bufferOff + i] = data[off + i]; + this.bufferOff += min; + + // Shift next + return min; +}; + +Cipher.prototype._flushBuffer = function _flushBuffer(out, off) { + this._update(this.buffer, 0, out, off); + this.bufferOff = 0; + return this.blockSize; +}; + +Cipher.prototype._updateEncrypt = function _updateEncrypt(data) { + var inputOff = 0; + var outputOff = 0; + + var count = ((this.bufferOff + data.length) / this.blockSize) | 0; + var out = new Array(count * this.blockSize); + + if (this.bufferOff !== 0) { + inputOff += this._buffer(data, inputOff); + + if (this.bufferOff === this.buffer.length) + outputOff += this._flushBuffer(out, outputOff); + } + + // Write blocks + var max = data.length - ((data.length - inputOff) % this.blockSize); + for (; inputOff < max; inputOff += this.blockSize) { + this._update(data, inputOff, out, outputOff); + outputOff += this.blockSize; + } + + // Queue rest + for (; inputOff < data.length; inputOff++, this.bufferOff++) + this.buffer[this.bufferOff] = data[inputOff]; + + return out; +}; + +Cipher.prototype._updateDecrypt = function _updateDecrypt(data) { + var inputOff = 0; + var outputOff = 0; + + var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1; + var out = new Array(count * this.blockSize); + + // TODO(indutny): optimize it, this is far from optimal + for (; count > 0; count--) { + inputOff += this._buffer(data, inputOff); + outputOff += this._flushBuffer(out, outputOff); + } + + // Buffer rest of the input + inputOff += this._buffer(data, inputOff); + + return out; +}; + +Cipher.prototype.final = function final(buffer) { + var first; + if (buffer) + first = this.update(buffer); + + var last; + if (this.type === 'encrypt') + last = this._finalEncrypt(); + else + last = this._finalDecrypt(); + + if (first) + return first.concat(last); + else + return last; +}; + +Cipher.prototype._pad = function _pad(buffer, off) { + if (off === 0) + return false; + + while (off < buffer.length) + buffer[off++] = 0; + + return true; +}; + +Cipher.prototype._finalEncrypt = function _finalEncrypt() { + if (!this._pad(this.buffer, this.bufferOff)) + return []; + + var out = new Array(this.blockSize); + this._update(this.buffer, 0, out, 0); + return out; +}; + +Cipher.prototype._unpad = function _unpad(buffer) { + return buffer; +}; + +Cipher.prototype._finalDecrypt = function _finalDecrypt() { + assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt'); + var out = new Array(this.blockSize); + this._flushBuffer(out, 0); + + return this._unpad(out); +}; + +},{"minimalistic-assert":960}],536:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var des = require('../des'); +var utils = des.utils; +var Cipher = des.Cipher; + +function DESState() { + this.tmp = new Array(2); + this.keys = null; +} + +function DES(options) { + Cipher.call(this, options); + + var state = new DESState(); + this._desState = state; + + this.deriveKeys(state, options.key); +} +inherits(DES, Cipher); +module.exports = DES; + +DES.create = function create(options) { + return new DES(options); +}; + +var shiftTable = [ + 1, 1, 2, 2, 2, 2, 2, 2, + 1, 2, 2, 2, 2, 2, 2, 1 +]; + +DES.prototype.deriveKeys = function deriveKeys(state, key) { + state.keys = new Array(16 * 2); + + assert.equal(key.length, this.blockSize, 'Invalid key length'); + + var kL = utils.readUInt32BE(key, 0); + var kR = utils.readUInt32BE(key, 4); + + utils.pc1(kL, kR, state.tmp, 0); + kL = state.tmp[0]; + kR = state.tmp[1]; + for (var i = 0; i < state.keys.length; i += 2) { + var shift = shiftTable[i >>> 1]; + kL = utils.r28shl(kL, shift); + kR = utils.r28shl(kR, shift); + utils.pc2(kL, kR, state.keys, i); + } +}; + +DES.prototype._update = function _update(inp, inOff, out, outOff) { + var state = this._desState; + + var l = utils.readUInt32BE(inp, inOff); + var r = utils.readUInt32BE(inp, inOff + 4); + + // Initial Permutation + utils.ip(l, r, state.tmp, 0); + l = state.tmp[0]; + r = state.tmp[1]; + + if (this.type === 'encrypt') + this._encrypt(state, l, r, state.tmp, 0); + else + this._decrypt(state, l, r, state.tmp, 0); + + l = state.tmp[0]; + r = state.tmp[1]; + + utils.writeUInt32BE(out, l, outOff); + utils.writeUInt32BE(out, r, outOff + 4); +}; + +DES.prototype._pad = function _pad(buffer, off) { + var value = buffer.length - off; + for (var i = off; i < buffer.length; i++) + buffer[i] = value; + + return true; +}; + +DES.prototype._unpad = function _unpad(buffer) { + var pad = buffer[buffer.length - 1]; + for (var i = buffer.length - pad; i < buffer.length; i++) + assert.equal(buffer[i], pad); + + return buffer.slice(0, buffer.length - pad); +}; + +DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) { + var l = lStart; + var r = rStart; + + // Apply f() x16 times + for (var i = 0; i < state.keys.length; i += 2) { + var keyL = state.keys[i]; + var keyR = state.keys[i + 1]; + + // f(r, k) + utils.expand(r, state.tmp, 0); + + keyL ^= state.tmp[0]; + keyR ^= state.tmp[1]; + var s = utils.substitute(keyL, keyR); + var f = utils.permute(s); + + var t = r; + r = (l ^ f) >>> 0; + l = t; + } + + // Reverse Initial Permutation + utils.rip(r, l, out, off); +}; + +DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) { + var l = rStart; + var r = lStart; + + // Apply f() x16 times + for (var i = state.keys.length - 2; i >= 0; i -= 2) { + var keyL = state.keys[i]; + var keyR = state.keys[i + 1]; + + // f(r, k) + utils.expand(l, state.tmp, 0); + + keyL ^= state.tmp[0]; + keyR ^= state.tmp[1]; + var s = utils.substitute(keyL, keyR); + var f = utils.permute(s); + + var t = l; + l = (r ^ f) >>> 0; + r = t; + } + + // Reverse Initial Permutation + utils.rip(l, r, out, off); +}; + +},{"../des":533,"inherits":834,"minimalistic-assert":960}],537:[function(require,module,exports){ +'use strict'; + +var assert = require('minimalistic-assert'); +var inherits = require('inherits'); + +var des = require('../des'); +var Cipher = des.Cipher; +var DES = des.DES; + +function EDEState(type, key) { + assert.equal(key.length, 24, 'Invalid key length'); + + var k1 = key.slice(0, 8); + var k2 = key.slice(8, 16); + var k3 = key.slice(16, 24); + + if (type === 'encrypt') { + this.ciphers = [ + DES.create({ type: 'encrypt', key: k1 }), + DES.create({ type: 'decrypt', key: k2 }), + DES.create({ type: 'encrypt', key: k3 }) + ]; + } else { + this.ciphers = [ + DES.create({ type: 'decrypt', key: k3 }), + DES.create({ type: 'encrypt', key: k2 }), + DES.create({ type: 'decrypt', key: k1 }) + ]; + } +} + +function EDE(options) { + Cipher.call(this, options); + + var state = new EDEState(this.type, this.options.key); + this._edeState = state; +} +inherits(EDE, Cipher); + +module.exports = EDE; + +EDE.create = function create(options) { + return new EDE(options); +}; + +EDE.prototype._update = function _update(inp, inOff, out, outOff) { + var state = this._edeState; + + state.ciphers[0]._update(inp, inOff, out, outOff); + state.ciphers[1]._update(out, outOff, out, outOff); + state.ciphers[2]._update(out, outOff, out, outOff); +}; + +EDE.prototype._pad = DES.prototype._pad; +EDE.prototype._unpad = DES.prototype._unpad; + +},{"../des":533,"inherits":834,"minimalistic-assert":960}],538:[function(require,module,exports){ +'use strict'; + +exports.readUInt32BE = function readUInt32BE(bytes, off) { + var res = (bytes[0 + off] << 24) | + (bytes[1 + off] << 16) | + (bytes[2 + off] << 8) | + bytes[3 + off]; + return res >>> 0; +}; + +exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) { + bytes[0 + off] = value >>> 24; + bytes[1 + off] = (value >>> 16) & 0xff; + bytes[2 + off] = (value >>> 8) & 0xff; + bytes[3 + off] = value & 0xff; +}; + +exports.ip = function ip(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + for (var i = 6; i >= 0; i -= 2) { + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >>> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inL >>> (j + i)) & 1; + } + } + + for (var i = 6; i >= 0; i -= 2) { + for (var j = 1; j <= 25; j += 8) { + outR <<= 1; + outR |= (inR >>> (j + i)) & 1; + } + for (var j = 1; j <= 25; j += 8) { + outR <<= 1; + outR |= (inL >>> (j + i)) & 1; + } + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.rip = function rip(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + for (var i = 0; i < 4; i++) { + for (var j = 24; j >= 0; j -= 8) { + outL <<= 1; + outL |= (inR >>> (j + i)) & 1; + outL <<= 1; + outL |= (inL >>> (j + i)) & 1; + } + } + for (var i = 4; i < 8; i++) { + for (var j = 24; j >= 0; j -= 8) { + outR <<= 1; + outR |= (inR >>> (j + i)) & 1; + outR <<= 1; + outR |= (inL >>> (j + i)) & 1; + } + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.pc1 = function pc1(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + // 7, 15, 23, 31, 39, 47, 55, 63 + // 6, 14, 22, 30, 39, 47, 55, 63 + // 5, 13, 21, 29, 39, 47, 55, 63 + // 4, 12, 20, 28 + for (var i = 7; i >= 5; i--) { + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inL >> (j + i)) & 1; + } + } + for (var j = 0; j <= 24; j += 8) { + outL <<= 1; + outL |= (inR >> (j + i)) & 1; + } + + // 1, 9, 17, 25, 33, 41, 49, 57 + // 2, 10, 18, 26, 34, 42, 50, 58 + // 3, 11, 19, 27, 35, 43, 51, 59 + // 36, 44, 52, 60 + for (var i = 1; i <= 3; i++) { + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inR >> (j + i)) & 1; + } + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inL >> (j + i)) & 1; + } + } + for (var j = 0; j <= 24; j += 8) { + outR <<= 1; + outR |= (inL >> (j + i)) & 1; + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.r28shl = function r28shl(num, shift) { + return ((num << shift) & 0xfffffff) | (num >>> (28 - shift)); +}; + +var pc2table = [ + // inL => outL + 14, 11, 17, 4, 27, 23, 25, 0, + 13, 22, 7, 18, 5, 9, 16, 24, + 2, 20, 12, 21, 1, 8, 15, 26, + + // inR => outR + 15, 4, 25, 19, 9, 1, 26, 16, + 5, 11, 23, 8, 12, 7, 17, 0, + 22, 3, 10, 14, 6, 20, 27, 24 +]; + +exports.pc2 = function pc2(inL, inR, out, off) { + var outL = 0; + var outR = 0; + + var len = pc2table.length >>> 1; + for (var i = 0; i < len; i++) { + outL <<= 1; + outL |= (inL >>> pc2table[i]) & 0x1; + } + for (var i = len; i < pc2table.length; i++) { + outR <<= 1; + outR |= (inR >>> pc2table[i]) & 0x1; + } + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +exports.expand = function expand(r, out, off) { + var outL = 0; + var outR = 0; + + outL = ((r & 1) << 5) | (r >>> 27); + for (var i = 23; i >= 15; i -= 4) { + outL <<= 6; + outL |= (r >>> i) & 0x3f; + } + for (var i = 11; i >= 3; i -= 4) { + outR |= (r >>> i) & 0x3f; + outR <<= 6; + } + outR |= ((r & 0x1f) << 1) | (r >>> 31); + + out[off + 0] = outL >>> 0; + out[off + 1] = outR >>> 0; +}; + +var sTable = [ + 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 +]; + +exports.substitute = function substitute(inL, inR) { + var out = 0; + for (var i = 0; i < 4; i++) { + var b = (inL >>> (18 - i * 6)) & 0x3f; + var sb = sTable[i * 0x40 + b]; + + out <<= 4; + out |= sb; + } + for (var i = 0; i < 4; i++) { + var b = (inR >>> (18 - i * 6)) & 0x3f; + var sb = sTable[4 * 0x40 + i * 0x40 + b]; + + out <<= 4; + out |= sb; + } + return out >>> 0; +}; + +var permuteTable = [ + 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 +]; + +exports.permute = function permute(num) { + var out = 0; + for (var i = 0; i < permuteTable.length; i++) { + out <<= 1; + out |= (num >>> permuteTable[i]) & 0x1; + } + return out >>> 0; +}; + +exports.padSplit = function padSplit(num, size, group) { + var str = num.toString(2); + while (str.length < size) + str = '0' + str; + + var out = []; + for (var i = 0; i < size; i += group) + out.push(str.slice(i, i + group)); + return out.join(' '); +}; + +},{}],539:[function(require,module,exports){ +(function (Buffer){ +var generatePrime = require('./lib/generatePrime') +var primes = require('./lib/primes.json') + +var DH = require('./lib/dh') + +function getDiffieHellman (mod) { + var prime = new Buffer(primes[mod].prime, 'hex') + var gen = new Buffer(primes[mod].gen, 'hex') + + return new DH(prime, gen) +} + +var ENCODINGS = { + 'binary': true, 'hex': true, 'base64': true +} + +function createDiffieHellman (prime, enc, generator, genc) { + if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) { + return createDiffieHellman(prime, 'binary', enc, generator) + } + + enc = enc || 'binary' + genc = genc || 'binary' + generator = generator || new Buffer([2]) + + if (!Buffer.isBuffer(generator)) { + generator = new Buffer(generator, genc) + } + + if (typeof prime === 'number') { + return new DH(generatePrime(prime, generator), generator, true) + } + + if (!Buffer.isBuffer(prime)) { + prime = new Buffer(prime, enc) + } + + return new DH(prime, generator, true) +} + +exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman +exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman + +}).call(this,require("buffer").Buffer) +},{"./lib/dh":540,"./lib/generatePrime":541,"./lib/primes.json":542,"buffer":113}],540:[function(require,module,exports){ +(function (Buffer){ +var BN = require('bn.js'); +var MillerRabin = require('miller-rabin'); +var millerRabin = new MillerRabin(); +var TWENTYFOUR = new BN(24); +var ELEVEN = new BN(11); +var TEN = new BN(10); +var THREE = new BN(3); +var SEVEN = new BN(7); +var primes = require('./generatePrime'); +var randomBytes = require('randombytes'); +module.exports = DH; + +function setPublicKey(pub, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(pub)) { + pub = new Buffer(pub, enc); + } + this._pub = new BN(pub); + return this; +} + +function setPrivateKey(priv, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(priv)) { + priv = new Buffer(priv, enc); + } + this._priv = new BN(priv); + return this; +} + +var primeCache = {}; +function checkPrime(prime, generator) { + var gen = generator.toString('hex'); + var hex = [gen, prime.toString(16)].join('_'); + if (hex in primeCache) { + return primeCache[hex]; + } + var error = 0; + + if (prime.isEven() || + !primes.simpleSieve || + !primes.fermatTest(prime) || + !millerRabin.test(prime)) { + //not a prime so +1 + error += 1; + + if (gen === '02' || gen === '05') { + // we'd be able to check the generator + // it would fail so +8 + error += 8; + } else { + //we wouldn't be able to test the generator + // so +4 + error += 4; + } + primeCache[hex] = error; + return error; + } + if (!millerRabin.test(prime.shrn(1))) { + //not a safe prime + error += 2; + } + var rem; + switch (gen) { + case '02': + if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) { + // unsuidable generator + error += 8; + } + break; + case '05': + rem = prime.mod(TEN); + if (rem.cmp(THREE) && rem.cmp(SEVEN)) { + // prime mod 10 needs to equal 3 or 7 + error += 8; + } + break; + default: + error += 4; + } + primeCache[hex] = error; + return error; +} + +function DH(prime, generator, malleable) { + this.setGenerator(generator); + this.__prime = new BN(prime); + this._prime = BN.mont(this.__prime); + this._primeLen = prime.length; + this._pub = undefined; + this._priv = undefined; + this._primeCode = undefined; + if (malleable) { + this.setPublicKey = setPublicKey; + this.setPrivateKey = setPrivateKey; + } else { + this._primeCode = 8; + } +} +Object.defineProperty(DH.prototype, 'verifyError', { + enumerable: true, + get: function () { + if (typeof this._primeCode !== 'number') { + this._primeCode = checkPrime(this.__prime, this.__gen); + } + return this._primeCode; + } +}); +DH.prototype.generateKeys = function () { + if (!this._priv) { + this._priv = new BN(randomBytes(this._primeLen)); + } + this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed(); + return this.getPublicKey(); +}; + +DH.prototype.computeSecret = function (other) { + other = new BN(other); + other = other.toRed(this._prime); + var secret = other.redPow(this._priv).fromRed(); + var out = new Buffer(secret.toArray()); + var prime = this.getPrime(); + if (out.length < prime.length) { + var front = new Buffer(prime.length - out.length); + front.fill(0); + out = Buffer.concat([front, out]); + } + return out; +}; + +DH.prototype.getPublicKey = function getPublicKey(enc) { + return formatReturnValue(this._pub, enc); +}; + +DH.prototype.getPrivateKey = function getPrivateKey(enc) { + return formatReturnValue(this._priv, enc); +}; + +DH.prototype.getPrime = function (enc) { + return formatReturnValue(this.__prime, enc); +}; + +DH.prototype.getGenerator = function (enc) { + return formatReturnValue(this._gen, enc); +}; + +DH.prototype.setGenerator = function (gen, enc) { + enc = enc || 'utf8'; + if (!Buffer.isBuffer(gen)) { + gen = new Buffer(gen, enc); + } + this.__gen = gen; + this._gen = new BN(gen); + return this; +}; + +function formatReturnValue(bn, enc) { + var buf = new Buffer(bn.toArray()); + if (!enc) { + return buf; + } else { + return buf.toString(enc); + } +} + +}).call(this,require("buffer").Buffer) +},{"./generatePrime":541,"bn.js":66,"buffer":113,"miller-rabin":956,"randombytes":1036}],541:[function(require,module,exports){ +var randomBytes = require('randombytes'); +module.exports = findPrime; +findPrime.simpleSieve = simpleSieve; +findPrime.fermatTest = fermatTest; +var BN = require('bn.js'); +var TWENTYFOUR = new BN(24); +var MillerRabin = require('miller-rabin'); +var millerRabin = new MillerRabin(); +var ONE = new BN(1); +var TWO = new BN(2); +var FIVE = new BN(5); +var SIXTEEN = new BN(16); +var EIGHT = new BN(8); +var TEN = new BN(10); +var THREE = new BN(3); +var SEVEN = new BN(7); +var ELEVEN = new BN(11); +var FOUR = new BN(4); +var TWELVE = new BN(12); +var primes = null; + +function _getPrimes() { + if (primes !== null) + return primes; + + var limit = 0x100000; + var res = []; + res[0] = 2; + for (var i = 1, k = 3; k < limit; k += 2) { + var sqrt = Math.ceil(Math.sqrt(k)); + for (var j = 0; j < i && res[j] <= sqrt; j++) + if (k % res[j] === 0) + break; + + if (i !== j && res[j] <= sqrt) + continue; + + res[i++] = k; + } + primes = res; + return res; +} + +function simpleSieve(p) { + var primes = _getPrimes(); + + for (var i = 0; i < primes.length; i++) + if (p.modn(primes[i]) === 0) { + if (p.cmpn(primes[i]) === 0) { + return true; + } else { + return false; + } + } + + return true; +} + +function fermatTest(p) { + var red = BN.mont(p); + return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0; +} + +function findPrime(bits, gen) { + if (bits < 16) { + // this is what openssl does + if (gen === 2 || gen === 5) { + return new BN([0x8c, 0x7b]); + } else { + return new BN([0x8c, 0x27]); + } + } + gen = new BN(gen); + + var num, n2; + + while (true) { + num = new BN(randomBytes(Math.ceil(bits / 8))); + while (num.bitLength() > bits) { + num.ishrn(1); + } + if (num.isEven()) { + num.iadd(ONE); + } + if (!num.testn(1)) { + num.iadd(TWO); + } + if (!gen.cmp(TWO)) { + while (num.mod(TWENTYFOUR).cmp(ELEVEN)) { + num.iadd(FOUR); + } + } else if (!gen.cmp(FIVE)) { + while (num.mod(TEN).cmp(THREE)) { + num.iadd(FOUR); + } + } + n2 = num.shrn(1); + if (simpleSieve(n2) && simpleSieve(num) && + fermatTest(n2) && fermatTest(num) && + millerRabin.test(n2) && millerRabin.test(num)) { + return num; + } + } + +} + +},{"bn.js":66,"miller-rabin":956,"randombytes":1036}],542:[function(require,module,exports){ +module.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" + } +} +},{}],543:[function(require,module,exports){ + +/** + * Module dependencies. + */ + +var extend = require('extend'); +var encode = require('ent/encode'); +var CustomEvent = require('custom-event'); +var voidElements = require('void-elements'); + +/** + * Module exports. + */ + +exports = module.exports = serialize; +exports.serializeElement = serializeElement; +exports.serializeAttribute = serializeAttribute; +exports.serializeText = serializeText; +exports.serializeComment = serializeComment; +exports.serializeDocument = serializeDocument; +exports.serializeDoctype = serializeDoctype; +exports.serializeDocumentFragment = serializeDocumentFragment; +exports.serializeNodeList = serializeNodeList; + +/** + * Serializes any DOM node. Returns a string. + * + * @param {Node} node - DOM Node to serialize + * @param {String} [context] - optional arbitrary "context" string to use (useful for event listeners) + * @param {Function} [fn] - optional callback function to use in the "serialize" event for this call + * @param {EventTarget} [eventTarget] - optional EventTarget instance to emit the "serialize" event on (defaults to `node`) + * return {String} + * @public + */ + +function serialize (node, context, fn, eventTarget) { + if (!node) return ''; + if ('function' === typeof context) { + fn = context; + context = null; + } + if (!context) context = null; + + var rtn; + var nodeType = node.nodeType; + + if (!nodeType && 'number' === typeof node.length) { + // assume it's a NodeList or Array of Nodes + rtn = exports.serializeNodeList(node, context, fn); + } else { + + if ('function' === typeof fn) { + // one-time "serialize" event listener + node.addEventListener('serialize', fn, false); + } + + // emit a custom "serialize" event on `node`, in case there + // are event listeners for custom serialization of this node + var e = new CustomEvent('serialize', { + bubbles: true, + cancelable: true, + detail: { + serialize: null, + context: context + } + }); + + e.serializeTarget = node; + + var target = eventTarget || node; + var cancelled = !target.dispatchEvent(e); + + // `e.detail.serialize` can be set to a: + // String - returned directly + // Node - goes through serializer logic instead of `node` + // Anything else - get Stringified first, and then returned directly + var s = e.detail.serialize; + if (s != null) { + if ('string' === typeof s) { + rtn = s; + } else if ('number' === typeof s.nodeType) { + // make it go through the serialization logic + rtn = serialize(s, context, null, target); + } else { + rtn = String(s); + } + } else if (!cancelled) { + // default serialization logic + switch (nodeType) { + case 1 /* element */: + rtn = exports.serializeElement(node, context, eventTarget); + break; + case 2 /* attribute */: + rtn = exports.serializeAttribute(node); + break; + case 3 /* text */: + rtn = exports.serializeText(node); + break; + case 8 /* comment */: + rtn = exports.serializeComment(node); + break; + case 9 /* document */: + rtn = exports.serializeDocument(node, context, eventTarget); + break; + case 10 /* doctype */: + rtn = exports.serializeDoctype(node); + break; + case 11 /* document fragment */: + rtn = exports.serializeDocumentFragment(node, context, eventTarget); + break; + } + } + + if ('function' === typeof fn) { + node.removeEventListener('serialize', fn, false); + } + } + + return rtn || ''; +} + +/** + * Serialize an Attribute node. + */ + +function serializeAttribute (node, opts) { + return node.name + '="' + encode(node.value, extend({ + named: true + }, opts)) + '"'; +} + +/** + * Serialize a DOM element. + */ + +function serializeElement (node, context, eventTarget) { + var c, i, l; + var name = node.nodeName.toLowerCase(); + + // opening tag + var r = '<' + name; + + // attributes + for (i = 0, c = node.attributes, l = c.length; i < l; i++) { + r += ' ' + exports.serializeAttribute(c[i]); + } + + r += '>'; + + // child nodes + r += exports.serializeNodeList(node.childNodes, context, null, eventTarget); + + // closing tag, only for non-void elements + if (!voidElements[name]) { + r += ''; + } + + return r; +} + +/** + * Serialize a text node. + */ + +function serializeText (node, opts) { + return encode(node.nodeValue, extend({ + named: true, + special: { '<': true, '>': true, '&': true } + }, opts)); +} + +/** + * Serialize a comment node. + */ + +function serializeComment (node) { + return ''; +} + +/** + * Serialize a Document node. + */ + +function serializeDocument (node, context, eventTarget) { + return exports.serializeNodeList(node.childNodes, context, null, eventTarget); +} + +/** + * Serialize a DOCTYPE node. + * See: http://stackoverflow.com/a/10162353 + */ + +function serializeDoctype (node) { + var r = ''; + return r; +} + +/** + * Serialize a DocumentFragment instance. + */ + +function serializeDocumentFragment (node, context, eventTarget) { + return exports.serializeNodeList(node.childNodes, context, null, eventTarget); +} + +/** + * Serialize a NodeList/Array of nodes. + */ + +function serializeNodeList (list, context, fn, eventTarget) { + var r = ''; + for (var i = 0, l = list.length; i < l; i++) { + r += serialize(list[i], context, fn, eventTarget); + } + return r; +} + +},{"custom-event":524,"ent/encode":564,"extend":710,"void-elements":1441}],544:[function(require,module,exports){ +var noCase = require('no-case') + +/** + * Dot case a string. + * + * @param {string} value + * @param {string} [locale] + * @return {string} + */ +module.exports = function (value, locale) { + return noCase(value, locale, '.') +} + +},{"no-case":967}],545:[function(require,module,exports){ +var crypto = require("crypto"); +var BigInteger = require("jsbn").BigInteger; +var ECPointFp = require("./lib/ec.js").ECPointFp; +var Buffer = require("safer-buffer").Buffer; +exports.ECCurves = require("./lib/sec.js"); + +// zero prepad +function unstupid(hex,len) +{ + return (hex.length >= len) ? hex : unstupid("0"+hex,len); +} + +exports.ECKey = function(curve, key, isPublic) +{ + var priv; + var c = curve(); + var n = c.getN(); + var bytes = Math.floor(n.bitLength()/8); + + if(key) + { + if(isPublic) + { + var curve = c.getCurve(); +// var x = key.slice(1,bytes+1); // skip the 04 for uncompressed format +// var y = key.slice(bytes+1); +// this.P = new ECPointFp(curve, +// curve.fromBigInteger(new BigInteger(x.toString("hex"), 16)), +// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16))); + this.P = curve.decodePointHex(key.toString("hex")); + }else{ + if(key.length != bytes) return false; + priv = new BigInteger(key.toString("hex"), 16); + } + }else{ + var n1 = n.subtract(BigInteger.ONE); + var r = new BigInteger(crypto.randomBytes(n.bitLength())); + priv = r.mod(n1).add(BigInteger.ONE); + this.P = c.getG().multiply(priv); + } + if(this.P) + { +// var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2); +// this.PublicKey = Buffer.from("04"+pubhex,"hex"); + this.PublicKey = Buffer.from(c.getCurve().encodeCompressedPointHex(this.P),"hex"); + } + if(priv) + { + this.PrivateKey = Buffer.from(unstupid(priv.toString(16),bytes*2),"hex"); + this.deriveSharedSecret = function(key) + { + if(!key || !key.P) return false; + var S = key.P.multiply(priv); + return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex"); + } + } +} + + +},{"./lib/ec.js":546,"./lib/sec.js":547,"crypto":470,"jsbn":863,"safer-buffer":1335}],546:[function(require,module,exports){ +// Basic Javascript Elliptic Curve implementation +// Ported loosely from BouncyCastle's Java EC code +// Only Fp curves implemented for now + +// Requires jsbn.js and jsbn2.js +var BigInteger = require('jsbn').BigInteger +var Barrett = BigInteger.prototype.Barrett + +// ---------------- +// ECFieldElementFp + +// constructor +function ECFieldElementFp(q,x) { + this.x = x; + // TODO if(x.compareTo(q) >= 0) error + this.q = q; +} + +function feFpEquals(other) { + if(other == this) return true; + return (this.q.equals(other.q) && this.x.equals(other.x)); +} + +function feFpToBigInteger() { + return this.x; +} + +function feFpNegate() { + return new ECFieldElementFp(this.q, this.x.negate().mod(this.q)); +} + +function feFpAdd(b) { + return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q)); +} + +function feFpSubtract(b) { + return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q)); +} + +function feFpMultiply(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q)); +} + +function feFpSquare() { + return new ECFieldElementFp(this.q, this.x.square().mod(this.q)); +} + +function feFpDivide(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q)); +} + +ECFieldElementFp.prototype.equals = feFpEquals; +ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger; +ECFieldElementFp.prototype.negate = feFpNegate; +ECFieldElementFp.prototype.add = feFpAdd; +ECFieldElementFp.prototype.subtract = feFpSubtract; +ECFieldElementFp.prototype.multiply = feFpMultiply; +ECFieldElementFp.prototype.square = feFpSquare; +ECFieldElementFp.prototype.divide = feFpDivide; + +// ---------------- +// ECPointFp + +// constructor +function ECPointFp(curve,x,y,z) { + this.curve = curve; + this.x = x; + this.y = y; + // Projective coordinates: either zinv == null or z * zinv == 1 + // z and zinv are just BigIntegers, not fieldElements + if(z == null) { + this.z = BigInteger.ONE; + } + else { + this.z = z; + } + this.zinv = null; + //TODO: compression flag +} + +function pointFpGetX() { + if(this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.x.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); +} + +function pointFpGetY() { + if(this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.y.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); +} + +function pointFpEquals(other) { + if(other == this) return true; + if(this.isInfinity()) return other.isInfinity(); + if(other.isInfinity()) return this.isInfinity(); + var u, v; + // u = Y2 * Z1 - Y1 * Z2 + u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q); + if(!u.equals(BigInteger.ZERO)) return false; + // v = X2 * Z1 - X1 * Z2 + v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q); + return v.equals(BigInteger.ZERO); +} + +function pointFpIsInfinity() { + if((this.x == null) && (this.y == null)) return true; + return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO); +} + +function pointFpNegate() { + return new ECPointFp(this.curve, this.x, this.y.negate(), this.z); +} + +function pointFpAdd(b) { + if(this.isInfinity()) return b; + if(b.isInfinity()) return this; + + // u = Y2 * Z1 - Y1 * Z2 + var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q); + // v = X2 * Z1 - X1 * Z2 + var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q); + + if(BigInteger.ZERO.equals(v)) { + if(BigInteger.ZERO.equals(u)) { + return this.twice(); // this == b, so double + } + return this.curve.getInfinity(); // this = -b, so infinity + } + + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + var x2 = b.x.toBigInteger(); + var y2 = b.y.toBigInteger(); + + var v2 = v.square(); + var v3 = v2.multiply(v); + var x1v2 = x1.multiply(v2); + var zu2 = u.square().multiply(this.z); + + // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3) + var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q); + // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3 + var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q); + // z3 = v^3 * z1 * z2 + var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q); + + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); +} + +function pointFpTwice() { + if(this.isInfinity()) return this; + if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity(); + + // TODO: optimized handling of constants + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + + var y1z1 = y1.multiply(this.z); + var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q); + var a = this.curve.a.toBigInteger(); + + // w = 3 * x1^2 + a * z1^2 + var w = x1.square().multiply(THREE); + if(!BigInteger.ZERO.equals(a)) { + w = w.add(this.z.square().multiply(a)); + } + w = w.mod(this.curve.q); + //this.curve.reduce(w); + // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1) + var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q); + // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3 + var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q); + // z3 = 8 * (y1 * z1)^3 + var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q); + + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); +} + +// Simple NAF (Non-Adjacent Form) multiplication algorithm +// TODO: modularize the multiplication algorithm +function pointFpMultiply(k) { + if(this.isInfinity()) return this; + if(k.signum() == 0) return this.curve.getInfinity(); + + var e = k; + var h = e.multiply(new BigInteger("3")); + + var neg = this.negate(); + var R = this; + + var i; + for(i = h.bitLength() - 2; i > 0; --i) { + R = R.twice(); + + var hBit = h.testBit(i); + var eBit = e.testBit(i); + + if (hBit != eBit) { + R = R.add(hBit ? this : neg); + } + } + + return R; +} + +// Compute this*j + x*k (simultaneous multiplication) +function pointFpMultiplyTwo(j,x,k) { + var i; + if(j.bitLength() > k.bitLength()) + i = j.bitLength() - 1; + else + i = k.bitLength() - 1; + + var R = this.curve.getInfinity(); + var both = this.add(x); + while(i >= 0) { + R = R.twice(); + if(j.testBit(i)) { + if(k.testBit(i)) { + R = R.add(both); + } + else { + R = R.add(this); + } + } + else { + if(k.testBit(i)) { + R = R.add(x); + } + } + --i; + } + + return R; +} + +ECPointFp.prototype.getX = pointFpGetX; +ECPointFp.prototype.getY = pointFpGetY; +ECPointFp.prototype.equals = pointFpEquals; +ECPointFp.prototype.isInfinity = pointFpIsInfinity; +ECPointFp.prototype.negate = pointFpNegate; +ECPointFp.prototype.add = pointFpAdd; +ECPointFp.prototype.twice = pointFpTwice; +ECPointFp.prototype.multiply = pointFpMultiply; +ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo; + +// ---------------- +// ECCurveFp + +// constructor +function ECCurveFp(q,a,b) { + this.q = q; + this.a = this.fromBigInteger(a); + this.b = this.fromBigInteger(b); + this.infinity = new ECPointFp(this, null, null); + this.reducer = new Barrett(this.q); +} + +function curveFpGetQ() { + return this.q; +} + +function curveFpGetA() { + return this.a; +} + +function curveFpGetB() { + return this.b; +} + +function curveFpEquals(other) { + if(other == this) return true; + return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b)); +} + +function curveFpGetInfinity() { + return this.infinity; +} + +function curveFpFromBigInteger(x) { + return new ECFieldElementFp(this.q, x); +} + +function curveReduce(x) { + this.reducer.reduce(x); +} + +// for now, work with hex strings because they're easier in JS +function curveFpDecodePointHex(s) { + switch(parseInt(s.substr(0,2), 16)) { // first byte + case 0: + return this.infinity; + case 2: + case 3: + // point compression not supported yet + return null; + case 4: + case 6: + case 7: + var len = (s.length - 2) / 2; + var xHex = s.substr(2, len); + var yHex = s.substr(len+2, len); + + return new ECPointFp(this, + this.fromBigInteger(new BigInteger(xHex, 16)), + this.fromBigInteger(new BigInteger(yHex, 16))); + + default: // unsupported + return null; + } +} + +function curveFpEncodePointHex(p) { + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var yHex = p.getY().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if ((oLen % 2) != 0) oLen++; + while (xHex.length < oLen) { + xHex = "0" + xHex; + } + while (yHex.length < oLen) { + yHex = "0" + yHex; + } + return "04" + xHex + yHex; +} + +ECCurveFp.prototype.getQ = curveFpGetQ; +ECCurveFp.prototype.getA = curveFpGetA; +ECCurveFp.prototype.getB = curveFpGetB; +ECCurveFp.prototype.equals = curveFpEquals; +ECCurveFp.prototype.getInfinity = curveFpGetInfinity; +ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger; +ECCurveFp.prototype.reduce = curveReduce; +//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex; +ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex; + +// from: https://github.com/kaielvin/jsbn-ec-point-compression +ECCurveFp.prototype.decodePointHex = function(s) +{ + var yIsEven; + switch(parseInt(s.substr(0,2), 16)) { // first byte + case 0: + return this.infinity; + case 2: + yIsEven = false; + case 3: + if(yIsEven == undefined) yIsEven = true; + var len = s.length - 2; + var xHex = s.substr(2, len); + var x = this.fromBigInteger(new BigInteger(xHex,16)); + var alpha = x.multiply(x.square().add(this.getA())).add(this.getB()); + var beta = alpha.sqrt(); + + if (beta == null) throw "Invalid point compression"; + + var betaValue = beta.toBigInteger(); + if (betaValue.testBit(0) != yIsEven) + { + // Use the other root + beta = this.fromBigInteger(this.getQ().subtract(betaValue)); + } + return new ECPointFp(this,x,beta); + case 4: + case 6: + case 7: + var len = (s.length - 2) / 2; + var xHex = s.substr(2, len); + var yHex = s.substr(len+2, len); + + return new ECPointFp(this, + this.fromBigInteger(new BigInteger(xHex, 16)), + this.fromBigInteger(new BigInteger(yHex, 16))); + + default: // unsupported + return null; + } +} +ECCurveFp.prototype.encodeCompressedPointHex = function(p) +{ + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if ((oLen % 2) != 0) oLen++; + while (xHex.length < oLen) + xHex = "0" + xHex; + var yPrefix; + if(p.getY().toBigInteger().isEven()) yPrefix = "02"; + else yPrefix = "03"; + + return yPrefix + xHex; +} + + +ECFieldElementFp.prototype.getR = function() +{ + if(this.r != undefined) return this.r; + + this.r = null; + var bitLength = this.q.bitLength(); + if (bitLength > 128) + { + var firstWord = this.q.shiftRight(bitLength - 64); + if (firstWord.intValue() == -1) + { + this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q); + } + } + return this.r; +} +ECFieldElementFp.prototype.modMult = function(x1,x2) +{ + return this.modReduce(x1.multiply(x2)); +} +ECFieldElementFp.prototype.modReduce = function(x) +{ + if (this.getR() != null) + { + var qLen = q.bitLength(); + while (x.bitLength() > (qLen + 1)) + { + var u = x.shiftRight(qLen); + var v = x.subtract(u.shiftLeft(qLen)); + if (!this.getR().equals(BigInteger.ONE)) + { + u = u.multiply(this.getR()); + } + x = u.add(v); + } + while (x.compareTo(q) >= 0) + { + x = x.subtract(q); + } + } + else + { + x = x.mod(q); + } + return x; +} +ECFieldElementFp.prototype.sqrt = function() +{ + if (!this.q.testBit(0)) throw "unsupported"; + + // p mod 4 == 3 + if (this.q.testBit(1)) + { + var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q)); + return z.square().equals(this) ? z : null; + } + + // p mod 4 == 1 + var qMinusOne = this.q.subtract(BigInteger.ONE); + + var legendreExponent = qMinusOne.shiftRight(1); + if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE))) + { + return null; + } + + var u = qMinusOne.shiftRight(2); + var k = u.shiftLeft(1).add(BigInteger.ONE); + + var Q = this.x; + var fourQ = modDouble(modDouble(Q)); + + var U, V; + do + { + var P; + do + { + P = new BigInteger(this.q.bitLength(), new SecureRandom()); + } + while (P.compareTo(this.q) >= 0 + || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne))); + + var result = this.lucasSequence(P, Q, k); + U = result[0]; + V = result[1]; + + if (this.modMult(V, V).equals(fourQ)) + { + // Integer division by 2, mod q + if (V.testBit(0)) + { + V = V.add(q); + } + + V = V.shiftRight(1); + + return new ECFieldElementFp(q,V); + } + } + while (U.equals(BigInteger.ONE) || U.equals(qMinusOne)); + + return null; +} +ECFieldElementFp.prototype.lucasSequence = function(P,Q,k) +{ + var n = k.bitLength(); + var s = k.getLowestSetBit(); + + var Uh = BigInteger.ONE; + var Vl = BigInteger.TWO; + var Vh = P; + var Ql = BigInteger.ONE; + var Qh = BigInteger.ONE; + + for (var j = n - 1; j >= s + 1; --j) + { + Ql = this.modMult(Ql, Qh); + + if (k.testBit(j)) + { + Qh = this.modMult(Ql, Q); + Uh = this.modMult(Uh, Vh); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1))); + } + else + { + Qh = Ql; + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + } + } + + Ql = this.modMult(Ql, Qh); + Qh = this.modMult(Ql, Q); + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Ql = this.modMult(Ql, Qh); + + for (var j = 1; j <= s; ++j) + { + Uh = this.modMult(Uh, Vl); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + Ql = this.modMult(Ql, Ql); + } + + return [ Uh, Vl ]; +} + +var exports = { + ECCurveFp: ECCurveFp, + ECPointFp: ECPointFp, + ECFieldElementFp: ECFieldElementFp +} + +module.exports = exports + +},{"jsbn":863}],547:[function(require,module,exports){ +// Named EC curves + +// Requires ec.js, jsbn.js, and jsbn2.js +var BigInteger = require('jsbn').BigInteger +var ECCurveFp = require('./ec.js').ECCurveFp + + +// ---------------- +// X9ECParameters + +// constructor +function X9ECParameters(curve,g,n,h) { + this.curve = curve; + this.g = g; + this.n = n; + this.h = h; +} + +function x9getCurve() { + return this.curve; +} + +function x9getG() { + return this.g; +} + +function x9getN() { + return this.n; +} + +function x9getH() { + return this.h; +} + +X9ECParameters.prototype.getCurve = x9getCurve; +X9ECParameters.prototype.getG = x9getG; +X9ECParameters.prototype.getN = x9getN; +X9ECParameters.prototype.getH = x9getH; + +// ---------------- +// SECNamedCurves + +function fromHex(s) { return new BigInteger(s, 16); } + +function secp128r1() { + // p = 2^128 - 2^97 - 1 + var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"); + var b = fromHex("E87579C11079F43DD824993C2CEE5ED3"); + //byte[] S = Hex.decode("000E0D4D696E6768756151750CC03A4473D03679"); + var n = fromHex("FFFFFFFE0000000075A30D1B9038A115"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "161FF7528B899B2D0C28607CA52C5B86" + + "CF5AC8395BAFEB13C02DA292DDED7A83"); + return new X9ECParameters(curve, G, n, h); +} + +function secp160k1() { + // p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"); + var a = BigInteger.ZERO; + var b = fromHex("7"); + //byte[] S = null; + var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB" + + "938CF935318FDCED6BC28286531733C3F03C4FEE"); + return new X9ECParameters(curve, G, n, h); +} + +function secp160r1() { + // p = 2^160 - 2^31 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"); + var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"); + //byte[] S = Hex.decode("1053CDE42C14D696E67687561517533BF3F83345"); + var n = fromHex("0100000000000000000001F4C8F927AED3CA752257"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "4A96B5688EF573284664698968C38BB913CBFC82" + + "23A628553168947D59DCC912042351377AC5FB32"); + return new X9ECParameters(curve, G, n, h); +} + +function secp192k1() { + // p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"); + var a = BigInteger.ZERO; + var b = fromHex("3"); + //byte[] S = null; + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D" + + "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D"); + return new X9ECParameters(curve, G, n, h); +} + +function secp192r1() { + // p = 2^192 - 2^64 - 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"); + var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"); + //byte[] S = Hex.decode("3045AE6FC8422F64ED579528D38120EAE12196D5"); + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012" + + "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811"); + return new X9ECParameters(curve, G, n, h); +} + +function secp224r1() { + // p = 2^224 - 2^96 + 1 + var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"); + var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"); + var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"); + //byte[] S = Hex.decode("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5"); + var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21" + + "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34"); + return new X9ECParameters(curve, G, n, h); +} + +function secp256r1() { + // p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1 + var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"); + var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"); + var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"); + //byte[] S = Hex.decode("C49D360886E704936A6678E1139D26B7819F7E90"); + var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"); + var h = BigInteger.ONE; + var curve = new ECCurveFp(p, a, b); + var G = curve.decodePointHex("04" + + "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296" + + "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"); + return new X9ECParameters(curve, G, n, h); +} + +// TODO: make this into a proper hashtable +function getSECCurveByName(name) { + if(name == "secp128r1") return secp128r1(); + if(name == "secp160k1") return secp160k1(); + if(name == "secp160r1") return secp160r1(); + if(name == "secp192k1") return secp192k1(); + if(name == "secp192r1") return secp192r1(); + if(name == "secp224r1") return secp224r1(); + if(name == "secp256r1") return secp256r1(); + return null; +} + +module.exports = { + "secp128r1":secp128r1, + "secp160k1":secp160k1, + "secp160r1":secp160r1, + "secp192k1":secp192k1, + "secp192r1":secp192r1, + "secp224r1":secp224r1, + "secp256r1":secp256r1 +} + +},{"./ec.js":546,"jsbn":863}],548:[function(require,module,exports){ +'use strict'; + +var elliptic = exports; + +elliptic.version = require('../package.json').version; +elliptic.utils = require('./elliptic/utils'); +elliptic.rand = require('brorand'); +elliptic.curve = require('./elliptic/curve'); +elliptic.curves = require('./elliptic/curves'); + +// Protocols +elliptic.ec = require('./elliptic/ec'); +elliptic.eddsa = require('./elliptic/eddsa'); + +},{"../package.json":563,"./elliptic/curve":551,"./elliptic/curves":554,"./elliptic/ec":555,"./elliptic/eddsa":558,"./elliptic/utils":562,"brorand":76}],549:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var getNAF = utils.getNAF; +var getJSF = utils.getJSF; +var assert = utils.assert; + +function BaseCurve(type, conf) { + this.type = type; + this.p = new BN(conf.p, 16); + + // Use Montgomery, when there is no fast reduction for the prime + this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p); + + // Useful for many curves + this.zero = new BN(0).toRed(this.red); + this.one = new BN(1).toRed(this.red); + this.two = new BN(2).toRed(this.red); + + // Curve configuration, optional + this.n = conf.n && new BN(conf.n, 16); + this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed); + + // Temporary arrays + this._wnafT1 = new Array(4); + this._wnafT2 = new Array(4); + this._wnafT3 = new Array(4); + this._wnafT4 = new Array(4); + + // Generalized Greg Maxwell's trick + var adjustCount = this.n && this.p.div(this.n); + if (!adjustCount || adjustCount.cmpn(100) > 0) { + this.redN = null; + } else { + this._maxwellTrick = true; + this.redN = this.n.toRed(this.red); + } +} +module.exports = BaseCurve; + +BaseCurve.prototype.point = function point() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype.validate = function validate() { + throw new Error('Not implemented'); +}; + +BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) { + assert(p.precomputed); + var doubles = p._getDoubles(); + + var naf = getNAF(k, 1); + var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1); + I /= 3; + + // Translate into more windowed form + var repr = []; + for (var j = 0; j < naf.length; j += doubles.step) { + var nafW = 0; + for (var k = j + doubles.step - 1; k >= j; k--) + nafW = (nafW << 1) + naf[k]; + repr.push(nafW); + } + + var a = this.jpoint(null, null, null); + var b = this.jpoint(null, null, null); + for (var i = I; i > 0; i--) { + for (var j = 0; j < repr.length; j++) { + var nafW = repr[j]; + if (nafW === i) + b = b.mixedAdd(doubles.points[j]); + else if (nafW === -i) + b = b.mixedAdd(doubles.points[j].neg()); + } + a = a.add(b); + } + return a.toP(); +}; + +BaseCurve.prototype._wnafMul = function _wnafMul(p, k) { + var w = 4; + + // Precompute window + var nafPoints = p._getNAFPoints(w); + w = nafPoints.wnd; + var wnd = nafPoints.points; + + // Get NAF form + var naf = getNAF(k, w); + + // Add `this`*(N+1) for every w-NAF index + var acc = this.jpoint(null, null, null); + for (var i = naf.length - 1; i >= 0; i--) { + // Count zeroes + for (var k = 0; i >= 0 && naf[i] === 0; i--) + k++; + if (i >= 0) + k++; + acc = acc.dblp(k); + + if (i < 0) + break; + var z = naf[i]; + assert(z !== 0); + if (p.type === 'affine') { + // J +- P + if (z > 0) + acc = acc.mixedAdd(wnd[(z - 1) >> 1]); + else + acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg()); + } else { + // J +- J + if (z > 0) + acc = acc.add(wnd[(z - 1) >> 1]); + else + acc = acc.add(wnd[(-z - 1) >> 1].neg()); + } + } + return p.type === 'affine' ? acc.toP() : acc; +}; + +BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW, + points, + coeffs, + len, + jacobianResult) { + var wndWidth = this._wnafT1; + var wnd = this._wnafT2; + var naf = this._wnafT3; + + // Fill all arrays + var max = 0; + for (var i = 0; i < len; i++) { + var p = points[i]; + var nafPoints = p._getNAFPoints(defW); + wndWidth[i] = nafPoints.wnd; + wnd[i] = nafPoints.points; + } + + // Comb small window NAFs + for (var i = len - 1; i >= 1; i -= 2) { + var a = i - 1; + var b = i; + if (wndWidth[a] !== 1 || wndWidth[b] !== 1) { + naf[a] = getNAF(coeffs[a], wndWidth[a]); + naf[b] = getNAF(coeffs[b], wndWidth[b]); + max = Math.max(naf[a].length, max); + max = Math.max(naf[b].length, max); + continue; + } + + var comb = [ + points[a], /* 1 */ + null, /* 3 */ + null, /* 5 */ + points[b] /* 7 */ + ]; + + // Try to avoid Projective points, if possible + if (points[a].y.cmp(points[b].y) === 0) { + comb[1] = points[a].add(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].add(points[b].neg()); + } else { + comb[1] = points[a].toJ().mixedAdd(points[b]); + comb[2] = points[a].toJ().mixedAdd(points[b].neg()); + } + + var index = [ + -3, /* -1 -1 */ + -1, /* -1 0 */ + -5, /* -1 1 */ + -7, /* 0 -1 */ + 0, /* 0 0 */ + 7, /* 0 1 */ + 5, /* 1 -1 */ + 1, /* 1 0 */ + 3 /* 1 1 */ + ]; + + var jsf = getJSF(coeffs[a], coeffs[b]); + max = Math.max(jsf[0].length, max); + naf[a] = new Array(max); + naf[b] = new Array(max); + for (var j = 0; j < max; j++) { + var ja = jsf[0][j] | 0; + var jb = jsf[1][j] | 0; + + naf[a][j] = index[(ja + 1) * 3 + (jb + 1)]; + naf[b][j] = 0; + wnd[a] = comb; + } + } + + var acc = this.jpoint(null, null, null); + var tmp = this._wnafT4; + for (var i = max; i >= 0; i--) { + var k = 0; + + while (i >= 0) { + var zero = true; + for (var j = 0; j < len; j++) { + tmp[j] = naf[j][i] | 0; + if (tmp[j] !== 0) + zero = false; + } + if (!zero) + break; + k++; + i--; + } + if (i >= 0) + k++; + acc = acc.dblp(k); + if (i < 0) + break; + + for (var j = 0; j < len; j++) { + var z = tmp[j]; + var p; + if (z === 0) + continue; + else if (z > 0) + p = wnd[j][(z - 1) >> 1]; + else if (z < 0) + p = wnd[j][(-z - 1) >> 1].neg(); + + if (p.type === 'affine') + acc = acc.mixedAdd(p); + else + acc = acc.add(p); + } + } + // Zeroify references + for (var i = 0; i < len; i++) + wnd[i] = null; + + if (jacobianResult) + return acc; + else + return acc.toP(); +}; + +function BasePoint(curve, type) { + this.curve = curve; + this.type = type; + this.precomputed = null; +} +BaseCurve.BasePoint = BasePoint; + +BasePoint.prototype.eq = function eq(/*other*/) { + throw new Error('Not implemented'); +}; + +BasePoint.prototype.validate = function validate() { + return this.curve.validate(this); +}; + +BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + bytes = utils.toArray(bytes, enc); + + var len = this.p.byteLength(); + + // uncompressed, hybrid-odd, hybrid-even + if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) && + bytes.length - 1 === 2 * len) { + if (bytes[0] === 0x06) + assert(bytes[bytes.length - 1] % 2 === 0); + else if (bytes[0] === 0x07) + assert(bytes[bytes.length - 1] % 2 === 1); + + var res = this.point(bytes.slice(1, 1 + len), + bytes.slice(1 + len, 1 + 2 * len)); + + return res; + } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) && + bytes.length - 1 === len) { + return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03); + } + throw new Error('Unknown point format'); +}; + +BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) { + return this.encode(enc, true); +}; + +BasePoint.prototype._encode = function _encode(compact) { + var len = this.curve.p.byteLength(); + var x = this.getX().toArray('be', len); + + if (compact) + return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x); + + return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ; +}; + +BasePoint.prototype.encode = function encode(enc, compact) { + return utils.encode(this._encode(compact), enc); +}; + +BasePoint.prototype.precompute = function precompute(power) { + if (this.precomputed) + return this; + + var precomputed = { + doubles: null, + naf: null, + beta: null + }; + precomputed.naf = this._getNAFPoints(8); + precomputed.doubles = this._getDoubles(4, power); + precomputed.beta = this._getBeta(); + this.precomputed = precomputed; + + return this; +}; + +BasePoint.prototype._hasDoubles = function _hasDoubles(k) { + if (!this.precomputed) + return false; + + var doubles = this.precomputed.doubles; + if (!doubles) + return false; + + return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step); +}; + +BasePoint.prototype._getDoubles = function _getDoubles(step, power) { + if (this.precomputed && this.precomputed.doubles) + return this.precomputed.doubles; + + var doubles = [ this ]; + var acc = this; + for (var i = 0; i < power; i += step) { + for (var j = 0; j < step; j++) + acc = acc.dbl(); + doubles.push(acc); + } + return { + step: step, + points: doubles + }; +}; + +BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) { + if (this.precomputed && this.precomputed.naf) + return this.precomputed.naf; + + var res = [ this ]; + var max = (1 << wnd) - 1; + var dbl = max === 1 ? null : this.dbl(); + for (var i = 1; i < max; i++) + res[i] = res[i - 1].add(dbl); + return { + wnd: wnd, + points: res + }; +}; + +BasePoint.prototype._getBeta = function _getBeta() { + return null; +}; + +BasePoint.prototype.dblp = function dblp(k) { + var r = this; + for (var i = 0; i < k; i++) + r = r.dbl(); + return r; +}; + +},{"../../elliptic":548,"bn.js":66}],550:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function EdwardsCurve(conf) { + // NOTE: Important as we are creating point in Base.call() + this.twisted = (conf.a | 0) !== 1; + this.mOneA = this.twisted && (conf.a | 0) === -1; + this.extended = this.mOneA; + + Base.call(this, 'edwards', conf); + + this.a = new BN(conf.a, 16).umod(this.red.m); + this.a = this.a.toRed(this.red); + this.c = new BN(conf.c, 16).toRed(this.red); + this.c2 = this.c.redSqr(); + this.d = new BN(conf.d, 16).toRed(this.red); + this.dd = this.d.redAdd(this.d); + + assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); + this.oneC = (conf.c | 0) === 1; +} +inherits(EdwardsCurve, Base); +module.exports = EdwardsCurve; + +EdwardsCurve.prototype._mulA = function _mulA(num) { + if (this.mOneA) + return num.redNeg(); + else + return this.a.redMul(num); +}; + +EdwardsCurve.prototype._mulC = function _mulC(num) { + if (this.oneC) + return num; + else + return this.c.redMul(num); +}; + +// Just for compatibility with Short curve +EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { + return this.point(x, y, z, t); +}; + +EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var x2 = x.redSqr(); + var rhs = this.c2.redSub(this.a.redMul(x2)); + var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); + + var y2 = rhs.redMul(lhs.redInvm()); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { + y = new BN(y, 16); + if (!y.red) + y = y.toRed(this.red); + + // x^2 = (y^2 - c^2) / (c^2 d y^2 - a) + var y2 = y.redSqr(); + var lhs = y2.redSub(this.c2); + var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a); + var x2 = lhs.redMul(rhs.redInvm()); + + if (x2.cmp(this.zero) === 0) { + if (odd) + throw new Error('invalid point'); + else + return this.point(this.zero, y); + } + + var x = x2.redSqrt(); + if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + if (x.fromRed().isOdd() !== odd) + x = x.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.validate = function validate(point) { + if (point.isInfinity()) + return true; + + // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) + point.normalize(); + + var x2 = point.x.redSqr(); + var y2 = point.y.redSqr(); + var lhs = x2.redMul(this.a).redAdd(y2); + var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); + + return lhs.cmp(rhs) === 0; +}; + +function Point(curve, x, y, z, t) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && y === null && z === null) { + this.x = this.curve.zero; + this.y = this.curve.one; + this.z = this.curve.one; + this.t = this.curve.zero; + this.zOne = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = z ? new BN(z, 16) : this.curve.one; + this.t = t && new BN(t, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + if (this.t && !this.t.red) + this.t = this.t.toRed(this.curve.red); + this.zOne = this.z === this.curve.one; + + // Use extended coordinates + if (this.curve.extended && !this.t) { + this.t = this.x.redMul(this.y); + if (!this.zOne) + this.t = this.t.redMul(this.z.redInvm()); + } + } +} +inherits(Point, Base.BasePoint); + +EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +EdwardsCurve.prototype.point = function point(x, y, z, t) { + return new Point(this, x, y, z, t); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1], obj[2]); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.x.cmpn(0) === 0 && + (this.y.cmp(this.z) === 0 || + (this.zOne && this.y.cmp(this.curve.c) === 0)); +}; + +Point.prototype._extDbl = function _extDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #doubling-dbl-2008-hwcd + // 4M + 4S + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = 2 * Z1^2 + var c = this.z.redSqr(); + c = c.redIAdd(c); + // D = a * A + var d = this.curve._mulA(a); + // E = (X1 + Y1)^2 - A - B + var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); + // G = D + B + var g = d.redAdd(b); + // F = G - C + var f = g.redSub(c); + // H = D - B + var h = d.redSub(b); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projDbl = function _projDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #doubling-dbl-2008-bbjlp + // #doubling-dbl-2007-bl + // and others + // Generally 3M + 4S or 2M + 4S + + // B = (X1 + Y1)^2 + var b = this.x.redAdd(this.y).redSqr(); + // C = X1^2 + var c = this.x.redSqr(); + // D = Y1^2 + var d = this.y.redSqr(); + + var nx; + var ny; + var nz; + if (this.curve.twisted) { + // E = a * C + var e = this.curve._mulA(c); + // F = E + D + var f = e.redAdd(d); + if (this.zOne) { + // X3 = (B - C - D) * (F - 2) + nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F^2 - 2 * F + nz = f.redSqr().redSub(f).redSub(f); + } else { + // H = Z1^2 + var h = this.z.redSqr(); + // J = F - 2 * H + var j = f.redSub(h).redISub(h); + // X3 = (B-C-D)*J + nx = b.redSub(c).redISub(d).redMul(j); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F * J + nz = f.redMul(j); + } + } else { + // E = C + D + var e = c.redAdd(d); + // H = (c * Z1)^2 + var h = this.curve._mulC(this.z).redSqr(); + // J = E - 2 * H + var j = e.redSub(h).redSub(h); + // X3 = c * (B - E) * J + nx = this.curve._mulC(b.redISub(e)).redMul(j); + // Y3 = c * E * (C - D) + ny = this.curve._mulC(e).redMul(c.redISub(d)); + // Z3 = E * J + nz = e.redMul(j); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + // Double in extended coordinates + if (this.curve.extended) + return this._extDbl(); + else + return this._projDbl(); +}; + +Point.prototype._extAdd = function _extAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #addition-add-2008-hwcd-3 + // 8M + + // A = (Y1 - X1) * (Y2 - X2) + var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); + // B = (Y1 + X1) * (Y2 + X2) + var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); + // C = T1 * k * T2 + var c = this.t.redMul(this.curve.dd).redMul(p.t); + // D = Z1 * 2 * Z2 + var d = this.z.redMul(p.z.redAdd(p.z)); + // E = B - A + var e = b.redSub(a); + // F = D - C + var f = d.redSub(c); + // G = D + C + var g = d.redAdd(c); + // H = B + A + var h = b.redAdd(a); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projAdd = function _projAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #addition-add-2008-bbjlp + // #addition-add-2007-bl + // 10M + 1S + + // A = Z1 * Z2 + var a = this.z.redMul(p.z); + // B = A^2 + var b = a.redSqr(); + // C = X1 * X2 + var c = this.x.redMul(p.x); + // D = Y1 * Y2 + var d = this.y.redMul(p.y); + // E = d * C * D + var e = this.curve.d.redMul(c).redMul(d); + // F = B - E + var f = b.redSub(e); + // G = B + E + var g = b.redAdd(e); + // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) + var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); + var nx = a.redMul(f).redMul(tmp); + var ny; + var nz; + if (this.curve.twisted) { + // Y3 = A * G * (D - a * C) + ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); + // Z3 = F * G + nz = f.redMul(g); + } else { + // Y3 = A * G * (D - C) + ny = a.redMul(g).redMul(d.redSub(c)); + // Z3 = c * F * G + nz = this.curve._mulC(f).redMul(g); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.add = function add(p) { + if (this.isInfinity()) + return p; + if (p.isInfinity()) + return this; + + if (this.curve.extended) + return this._extAdd(p); + else + return this._projAdd(p); +}; + +Point.prototype.mul = function mul(k) { + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); +}; + +Point.prototype.normalize = function normalize() { + if (this.zOne) + return this; + + // Normalize coordinates + var zi = this.z.redInvm(); + this.x = this.x.redMul(zi); + this.y = this.y.redMul(zi); + if (this.t) + this.t = this.t.redMul(zi); + this.z = this.curve.one; + this.zOne = true; + return this; +}; + +Point.prototype.neg = function neg() { + return this.curve.point(this.x.redNeg(), + this.y, + this.z, + this.t && this.t.redNeg()); +}; + +Point.prototype.getX = function getX() { + this.normalize(); + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + this.normalize(); + return this.y.fromRed(); +}; + +Point.prototype.eq = function eq(other) { + return this === other || + this.getX().cmp(other.getX()) === 0 && + this.getY().cmp(other.getY()) === 0; +}; + +Point.prototype.eqXToP = function eqXToP(x) { + var rx = x.toRed(this.curve.red).redMul(this.z); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(this.z); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } +}; + +// Compatibility with BaseCurve +Point.prototype.toP = Point.prototype.normalize; +Point.prototype.mixedAdd = Point.prototype.add; + +},{"../../elliptic":548,"../curve":551,"bn.js":66,"inherits":834}],551:[function(require,module,exports){ +'use strict'; + +var curve = exports; + +curve.base = require('./base'); +curve.short = require('./short'); +curve.mont = require('./mont'); +curve.edwards = require('./edwards'); + +},{"./base":549,"./edwards":550,"./mont":552,"./short":553}],552:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; + +function MontCurve(conf) { + Base.call(this, 'mont', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.i4 = new BN(4).toRed(this.red).redInvm(); + this.two = new BN(2).toRed(this.red); + this.a24 = this.i4.redMul(this.a.redAdd(this.two)); +} +inherits(MontCurve, Base); +module.exports = MontCurve; + +MontCurve.prototype.validate = function validate(point) { + var x = point.normalize().x; + var x2 = x.redSqr(); + var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x); + var y = rhs.redSqrt(); + + return y.redSqr().cmp(rhs) === 0; +}; + +function Point(curve, x, z) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && z === null) { + this.x = this.curve.one; + this.z = this.curve.zero; + } else { + this.x = new BN(x, 16); + this.z = new BN(z, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + } +} +inherits(Point, Base.BasePoint); + +MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) { + return this.point(utils.toArray(bytes, enc), 1); +}; + +MontCurve.prototype.point = function point(x, z) { + return new Point(this, x, z); +}; + +MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +Point.prototype.precompute = function precompute() { + // No-op +}; + +Point.prototype._encode = function _encode() { + return this.getX().toArray('be', this.curve.p.byteLength()); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1] || curve.one); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +Point.prototype.dbl = function dbl() { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3 + // 2M + 2S + 4A + + // A = X1 + Z1 + var a = this.x.redAdd(this.z); + // AA = A^2 + var aa = a.redSqr(); + // B = X1 - Z1 + var b = this.x.redSub(this.z); + // BB = B^2 + var bb = b.redSqr(); + // C = AA - BB + var c = aa.redSub(bb); + // X3 = AA * BB + var nx = aa.redMul(bb); + // Z3 = C * (BB + A24 * C) + var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c))); + return this.curve.point(nx, nz); +}; + +Point.prototype.add = function add() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.diffAdd = function diffAdd(p, diff) { + // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3 + // 4M + 2S + 6A + + // A = X2 + Z2 + var a = this.x.redAdd(this.z); + // B = X2 - Z2 + var b = this.x.redSub(this.z); + // C = X3 + Z3 + var c = p.x.redAdd(p.z); + // D = X3 - Z3 + var d = p.x.redSub(p.z); + // DA = D * A + var da = d.redMul(a); + // CB = C * B + var cb = c.redMul(b); + // X5 = Z1 * (DA + CB)^2 + var nx = diff.z.redMul(da.redAdd(cb).redSqr()); + // Z5 = X1 * (DA - CB)^2 + var nz = diff.x.redMul(da.redISub(cb).redSqr()); + return this.curve.point(nx, nz); +}; + +Point.prototype.mul = function mul(k) { + var t = k.clone(); + var a = this; // (N / 2) * Q + Q + var b = this.curve.point(null, null); // (N / 2) * Q + var c = this; // Q + + for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1)) + bits.push(t.andln(1)); + + for (var i = bits.length - 1; i >= 0; i--) { + if (bits[i] === 0) { + // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q + a = a.diffAdd(b, c); + // N * Q = 2 * ((N / 2) * Q + Q)) + b = b.dbl(); + } else { + // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q) + b = a.diffAdd(b, c); + // N * Q + Q = 2 * ((N / 2) * Q + Q) + a = a.dbl(); + } + } + return b; +}; + +Point.prototype.mulAdd = function mulAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.jumlAdd = function jumlAdd() { + throw new Error('Not supported on Montgomery curve'); +}; + +Point.prototype.eq = function eq(other) { + return this.getX().cmp(other.getX()) === 0; +}; + +Point.prototype.normalize = function normalize() { + this.x = this.x.redMul(this.z.redInvm()); + this.z = this.curve.one; + return this; +}; + +Point.prototype.getX = function getX() { + // Normalize coordinates + this.normalize(); + + return this.x.fromRed(); +}; + +},{"../../elliptic":548,"../curve":551,"bn.js":66,"inherits":834}],553:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function ShortCurve(conf) { + Base.call(this, 'short', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); +} +inherits(ShortCurve, Base); +module.exports = ShortCurve; + +ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new BN(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new BN(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new BN(vec.a, 16), + b: new BN(vec.b, 16) + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis + }; +}; + +ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : BN.mont(num); + var tinv = new BN(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; +}; + +ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new BN(1); + var y1 = new BN(0); + var x2 = new BN(0); + var y2 = new BN(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 } + ]; +}; + +ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; +}; + +ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; +}; + +ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; +}; + +function Point(curve, x, y, isRed) { + Base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } +} +inherits(Point, Base.BasePoint); + +ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); +}; + +ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); +}; + +Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul) + } + }; + } + return beta; +}; + +Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1) + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1) + } + } ]; +}; + +Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)) + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)) + } + }; + return res; +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + return this.inf; +}; + +Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.getX = function getX() { + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + return this.y.fromRed(); +}; + +Point.prototype.mul = function mul(k) { + k = new BN(k, 16); + + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + +Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); +}; + +Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate) + } + }; + } + return res; +}; + +Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; +}; + +function JPoint(curve, x, y, z) { + Base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new BN(0); + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = new BN(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; +} +inherits(JPoint, Base.BasePoint); + +ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); +}; + +JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); +}; + +JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); +}; + +JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (var i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (var i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); +}; + +JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); +}; + +JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mul = function mul(k, kbase) { + k = new BN(k, kbase); + + return this.curve._wnafMul(this, k); +}; + +JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; +}; + +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } +}; + +JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +},{"../../elliptic":548,"../curve":551,"bn.js":66,"inherits":834}],554:[function(require,module,exports){ +'use strict'; + +var curves = exports; + +var hash = require('hash.js'); +var elliptic = require('../elliptic'); + +var assert = elliptic.utils.assert; + +function PresetCurve(options) { + if (options.type === 'short') + this.curve = new elliptic.curve.short(options); + else if (options.type === 'edwards') + this.curve = new elliptic.curve.edwards(options); + else + this.curve = new elliptic.curve.mont(options); + this.g = this.curve.g; + this.n = this.curve.n; + this.hash = options.hash; + + assert(this.g.validate(), 'Invalid curve'); + assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); +} +curves.PresetCurve = PresetCurve; + +function defineCurve(name, options) { + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + get: function() { + var curve = new PresetCurve(options); + Object.defineProperty(curves, name, { + configurable: true, + enumerable: true, + value: curve + }); + return curve; + } + }); +} + +defineCurve('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: hash.sha256, + gRed: false, + g: [ + '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', + '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811' + ] +}); + +defineCurve('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: hash.sha256, + gRed: false, + g: [ + 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', + 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34' + ] +}); + +defineCurve('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: hash.sha256, + gRed: false, + g: [ + '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5' + ] +}); + +defineCurve('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: hash.sha384, + gRed: false, + 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' + ] +}); + +defineCurve('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: hash.sha512, + gRed: false, + 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' + ] +}); + +defineCurve('curve25519', { + type: 'mont', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '76d06', + b: '1', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '9' + ] +}); + +defineCurve('ed25519', { + type: 'edwards', + prime: 'p25519', + p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', + a: '-1', + c: '1', + // -121665 * (121666^(-1)) (mod P) + d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', + n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', + hash: hash.sha256, + gRed: false, + g: [ + '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', + + // 4/5 + '6666666666666666666666666666666666666666666666666666666666666658' + ] +}); + +var pre; +try { + pre = require('./precomputed/secp256k1'); +} catch (e) { + pre = undefined; +} + +defineCurve('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: hash.sha256, + + // Precomputed endomorphism + beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', + lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', + basis: [ + { + a: '3086d221a7d46bcde86c90e49284eb15', + b: '-e4437ed6010e88286f547fa90abfe4c3' + }, + { + a: '114ca50f7a8e2f3f657c1108d9d44cfd8', + b: '3086d221a7d46bcde86c90e49284eb15' + } + ], + + gRed: false, + g: [ + '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', + '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', + pre + ] +}); + +},{"../elliptic":548,"./precomputed/secp256k1":561,"hash.js":803}],555:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var HmacDRBG = require('hmac-drbg'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options); + + options = elliptic.curves[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof elliptic.curves.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; +} +module.exports = EC; + +EC.prototype.keyPair = function keyPair(options) { + return new KeyPair(this, options); +}; + +EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return KeyPair.fromPrivate(this, priv, enc); +}; + +EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return KeyPair.fromPublic(this, pub, enc); +}; + +EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new HmacDRBG({ + hash: this.hash, + pers: options.pers, + persEnc: options.persEnc || 'utf8', + entropy: options.entropy || elliptic.rand(this.hash.hmacStrength), + entropyEnc: options.entropy && options.entropyEnc || 'utf8', + nonce: this.n.toArray() + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new BN(2)); + do { + var priv = new BN(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } while (true); +}; + +EC.prototype._truncateToN = function truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; +}; + +EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new BN(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new HmacDRBG({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc || 'utf8' + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new BN(1)); + + for (var iter = 0; true; iter++) { + var k = options.k ? + options.k(iter) : + new BN(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); + } +}; + +EC.prototype.verify = function verify(msg, signature, key, enc) { + msg = this._truncateToN(new BN(msg, 16)); + key = this.keyFromPublic(key, enc); + signature = new Signature(signature, 'hex'); + + // Perform primitive values validation + var r = signature.r; + var s = signature.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + + if (!this.curve._maxwellTrick) { + var p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + var p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); +}; + +EC.prototype.recoverPubKey = function(msg, signature, j, enc) { + assert((3 & j) === j, 'The recovery param is more than two bits'); + signature = new Signature(signature, enc); + + var n = this.n; + var e = new BN(msg); + var r = signature.r; + var s = signature.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); +}; + +EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { + signature = new Signature(signature, enc); + if (signature.recoveryParam !== null) + return signature.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); +}; + +},{"../../elliptic":548,"./key":556,"./signature":557,"bn.js":66,"hmac-drbg":816}],556:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +function KeyPair(ec, options) { + this.ec = ec; + this.priv = null; + this.pub = null; + + // KeyPair(ec, { priv: ..., pub: ... }) + if (options.priv) + this._importPrivate(options.priv, options.privEnc); + if (options.pub) + this._importPublic(options.pub, options.pubEnc); +} +module.exports = KeyPair; + +KeyPair.fromPublic = function fromPublic(ec, pub, enc) { + if (pub instanceof KeyPair) + return pub; + + return new KeyPair(ec, { + pub: pub, + pubEnc: enc + }); +}; + +KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) { + if (priv instanceof KeyPair) + return priv; + + return new KeyPair(ec, { + priv: priv, + privEnc: enc + }); +}; + +KeyPair.prototype.validate = function validate() { + var pub = this.getPublic(); + + if (pub.isInfinity()) + return { result: false, reason: 'Invalid public key' }; + if (!pub.validate()) + return { result: false, reason: 'Public key is not a point' }; + if (!pub.mul(this.ec.curve.n).isInfinity()) + return { result: false, reason: 'Public key * N != O' }; + + return { result: true, reason: null }; +}; + +KeyPair.prototype.getPublic = function getPublic(compact, enc) { + // compact is optional argument + if (typeof compact === 'string') { + enc = compact; + compact = null; + } + + if (!this.pub) + this.pub = this.ec.g.mul(this.priv); + + if (!enc) + return this.pub; + + return this.pub.encode(enc, compact); +}; + +KeyPair.prototype.getPrivate = function getPrivate(enc) { + if (enc === 'hex') + return this.priv.toString(16, 2); + else + return this.priv; +}; + +KeyPair.prototype._importPrivate = function _importPrivate(key, enc) { + this.priv = new BN(key, enc || 16); + + // Ensure that the priv won't be bigger than n, otherwise we may fail + // in fixed multiplication method + this.priv = this.priv.umod(this.ec.curve.n); +}; + +KeyPair.prototype._importPublic = function _importPublic(key, enc) { + if (key.x || key.y) { + // Montgomery points only have an `x` coordinate. + // Weierstrass/Edwards points on the other hand have both `x` and + // `y` coordinates. + if (this.ec.curve.type === 'mont') { + assert(key.x, 'Need x coordinate'); + } else if (this.ec.curve.type === 'short' || + this.ec.curve.type === 'edwards') { + assert(key.x && key.y, 'Need both x and y coordinate'); + } + this.pub = this.ec.curve.point(key.x, key.y); + return; + } + this.pub = this.ec.curve.decodePoint(key, enc); +}; + +// ECDH +KeyPair.prototype.derive = function derive(pub) { + return pub.mul(this.priv).getX(); +}; + +// ECDSA +KeyPair.prototype.sign = function sign(msg, enc, options) { + return this.ec.sign(msg, this, enc, options); +}; + +KeyPair.prototype.verify = function verify(msg, signature) { + return this.ec.verify(msg, signature, this); +}; + +KeyPair.prototype.inspect = function inspect() { + return ''; +}; + +},{"../../elliptic":548,"bn.js":66}],557:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +function Signature(options, enc) { + if (options instanceof Signature) + return options; + + if (this._importDER(options, enc)) + return; + + assert(options.r && options.s, 'Signature without r or s'); + this.r = new BN(options.r, 16); + this.s = new BN(options.s, 16); + if (options.recoveryParam === undefined) + this.recoveryParam = null; + else + this.recoveryParam = options.recoveryParam; +} +module.exports = Signature; + +function Position() { + this.place = 0; +} + +function getLength(buf, p) { + var initial = buf[p.place++]; + if (!(initial & 0x80)) { + return initial; + } + var octetLen = initial & 0xf; + var val = 0; + for (var i = 0, off = p.place; i < octetLen; i++, off++) { + val <<= 8; + val |= buf[off]; + } + p.place = off; + return val; +} + +function rmPadding(buf) { + var i = 0; + var len = buf.length - 1; + while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) { + i++; + } + if (i === 0) { + return buf; + } + return buf.slice(i); +} + +Signature.prototype._importDER = function _importDER(data, enc) { + data = utils.toArray(data, enc); + var p = new Position(); + if (data[p.place++] !== 0x30) { + return false; + } + var len = getLength(data, p); + if ((len + p.place) !== data.length) { + return false; + } + if (data[p.place++] !== 0x02) { + return false; + } + var rlen = getLength(data, p); + var r = data.slice(p.place, rlen + p.place); + p.place += rlen; + if (data[p.place++] !== 0x02) { + return false; + } + var slen = getLength(data, p); + if (data.length !== slen + p.place) { + return false; + } + var s = data.slice(p.place, slen + p.place); + if (r[0] === 0 && (r[1] & 0x80)) { + r = r.slice(1); + } + if (s[0] === 0 && (s[1] & 0x80)) { + s = s.slice(1); + } + + this.r = new BN(r); + this.s = new BN(s); + this.recoveryParam = null; + + return true; +}; + +function constructLength(arr, len) { + if (len < 0x80) { + arr.push(len); + return; + } + var octets = 1 + (Math.log(len) / Math.LN2 >>> 3); + arr.push(octets | 0x80); + while (--octets) { + arr.push((len >>> (octets << 3)) & 0xff); + } + arr.push(len); +} + +Signature.prototype.toDER = function toDER(enc) { + var r = this.r.toArray(); + var s = this.s.toArray(); + + // Pad values + if (r[0] & 0x80) + r = [ 0 ].concat(r); + // Pad values + if (s[0] & 0x80) + s = [ 0 ].concat(s); + + r = rmPadding(r); + s = rmPadding(s); + + while (!s[0] && !(s[1] & 0x80)) { + s = s.slice(1); + } + var arr = [ 0x02 ]; + constructLength(arr, r.length); + arr = arr.concat(r); + arr.push(0x02); + constructLength(arr, s.length); + var backHalf = arr.concat(s); + var res = [ 0x30 ]; + constructLength(res, backHalf.length); + res = res.concat(backHalf); + return utils.encode(res, enc); +}; + +},{"../../elliptic":548,"bn.js":66}],558:[function(require,module,exports){ +'use strict'; + +var hash = require('hash.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EDDSA(curve) { + assert(curve === 'ed25519', 'only tested with ed25519 so far'); + + if (!(this instanceof EDDSA)) + return new EDDSA(curve); + + var curve = elliptic.curves[curve].curve; + this.curve = curve; + this.g = curve.g; + this.g.precompute(curve.n.bitLength() + 1); + + this.pointClass = curve.point().constructor; + this.encodingLength = Math.ceil(curve.n.bitLength() / 8); + this.hash = hash.sha512; +} + +module.exports = EDDSA; + +/** +* @param {Array|String} message - message bytes +* @param {Array|String|KeyPair} secret - secret bytes or a keypair +* @returns {Signature} - signature +*/ +EDDSA.prototype.sign = function sign(message, secret) { + message = parseBytes(message); + var key = this.keyFromSecret(secret); + var r = this.hashInt(key.messagePrefix(), message); + var R = this.g.mul(r); + var Rencoded = this.encodePoint(R); + var s_ = this.hashInt(Rencoded, key.pubBytes(), message) + .mul(key.priv()); + var S = r.add(s_).umod(this.curve.n); + return this.makeSignature({ R: R, S: S, Rencoded: Rencoded }); +}; + +/** +* @param {Array} message - message bytes +* @param {Array|String|Signature} sig - sig bytes +* @param {Array|String|Point|KeyPair} pub - public key +* @returns {Boolean} - true if public key matches sig of message +*/ +EDDSA.prototype.verify = function verify(message, sig, pub) { + message = parseBytes(message); + sig = this.makeSignature(sig); + var key = this.keyFromPublic(pub); + var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message); + var SG = this.g.mul(sig.S()); + var RplusAh = sig.R().add(key.pub().mul(h)); + return RplusAh.eq(SG); +}; + +EDDSA.prototype.hashInt = function hashInt() { + var hash = this.hash(); + for (var i = 0; i < arguments.length; i++) + hash.update(arguments[i]); + return utils.intFromLE(hash.digest()).umod(this.curve.n); +}; + +EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) { + return KeyPair.fromPublic(this, pub); +}; + +EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) { + return KeyPair.fromSecret(this, secret); +}; + +EDDSA.prototype.makeSignature = function makeSignature(sig) { + if (sig instanceof Signature) + return sig; + return new Signature(this, sig); +}; + +/** +* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2 +* +* EDDSA defines methods for encoding and decoding points and integers. These are +* helper convenience methods, that pass along to utility functions implied +* parameters. +* +*/ +EDDSA.prototype.encodePoint = function encodePoint(point) { + var enc = point.getY().toArray('le', this.encodingLength); + enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0; + return enc; +}; + +EDDSA.prototype.decodePoint = function decodePoint(bytes) { + bytes = utils.parseBytes(bytes); + + var lastIx = bytes.length - 1; + var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80); + var xIsOdd = (bytes[lastIx] & 0x80) !== 0; + + var y = utils.intFromLE(normed); + return this.curve.pointFromY(y, xIsOdd); +}; + +EDDSA.prototype.encodeInt = function encodeInt(num) { + return num.toArray('le', this.encodingLength); +}; + +EDDSA.prototype.decodeInt = function decodeInt(bytes) { + return utils.intFromLE(bytes); +}; + +EDDSA.prototype.isPoint = function isPoint(val) { + return val instanceof this.pointClass; +}; + +},{"../../elliptic":548,"./key":559,"./signature":560,"hash.js":803}],559:[function(require,module,exports){ +'use strict'; + +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var parseBytes = utils.parseBytes; +var cachedProperty = utils.cachedProperty; + +/** +* @param {EDDSA} eddsa - instance +* @param {Object} params - public/private key parameters +* +* @param {Array} [params.secret] - secret seed bytes +* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms) +* @param {Array} [params.pub] - public key point encoded as bytes +* +*/ +function KeyPair(eddsa, params) { + this.eddsa = eddsa; + this._secret = parseBytes(params.secret); + if (eddsa.isPoint(params.pub)) + this._pub = params.pub; + else + this._pubBytes = parseBytes(params.pub); +} + +KeyPair.fromPublic = function fromPublic(eddsa, pub) { + if (pub instanceof KeyPair) + return pub; + return new KeyPair(eddsa, { pub: pub }); +}; + +KeyPair.fromSecret = function fromSecret(eddsa, secret) { + if (secret instanceof KeyPair) + return secret; + return new KeyPair(eddsa, { secret: secret }); +}; + +KeyPair.prototype.secret = function secret() { + return this._secret; +}; + +cachedProperty(KeyPair, 'pubBytes', function pubBytes() { + return this.eddsa.encodePoint(this.pub()); +}); + +cachedProperty(KeyPair, 'pub', function pub() { + if (this._pubBytes) + return this.eddsa.decodePoint(this._pubBytes); + return this.eddsa.g.mul(this.priv()); +}); + +cachedProperty(KeyPair, 'privBytes', function privBytes() { + var eddsa = this.eddsa; + var hash = this.hash(); + var lastIx = eddsa.encodingLength - 1; + + var a = hash.slice(0, eddsa.encodingLength); + a[0] &= 248; + a[lastIx] &= 127; + a[lastIx] |= 64; + + return a; +}); + +cachedProperty(KeyPair, 'priv', function priv() { + return this.eddsa.decodeInt(this.privBytes()); +}); + +cachedProperty(KeyPair, 'hash', function hash() { + return this.eddsa.hash().update(this.secret()).digest(); +}); + +cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() { + return this.hash().slice(this.eddsa.encodingLength); +}); + +KeyPair.prototype.sign = function sign(message) { + assert(this._secret, 'KeyPair can only verify'); + return this.eddsa.sign(message, this); +}; + +KeyPair.prototype.verify = function verify(message, sig) { + return this.eddsa.verify(message, sig, this); +}; + +KeyPair.prototype.getSecret = function getSecret(enc) { + assert(this._secret, 'KeyPair is public only'); + return utils.encode(this.secret(), enc); +}; + +KeyPair.prototype.getPublic = function getPublic(enc) { + return utils.encode(this.pubBytes(), enc); +}; + +module.exports = KeyPair; + +},{"../../elliptic":548}],560:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; +var cachedProperty = utils.cachedProperty; +var parseBytes = utils.parseBytes; + +/** +* @param {EDDSA} eddsa - eddsa instance +* @param {Array|Object} sig - +* @param {Array|Point} [sig.R] - R point as Point or bytes +* @param {Array|bn} [sig.S] - S scalar as bn or bytes +* @param {Array} [sig.Rencoded] - R point encoded +* @param {Array} [sig.Sencoded] - S scalar encoded +*/ +function Signature(eddsa, sig) { + this.eddsa = eddsa; + + if (typeof sig !== 'object') + sig = parseBytes(sig); + + if (Array.isArray(sig)) { + sig = { + R: sig.slice(0, eddsa.encodingLength), + S: sig.slice(eddsa.encodingLength) + }; + } + + assert(sig.R && sig.S, 'Signature without R or S'); + + if (eddsa.isPoint(sig.R)) + this._R = sig.R; + if (sig.S instanceof BN) + this._S = sig.S; + + this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded; + this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded; +} + +cachedProperty(Signature, 'S', function S() { + return this.eddsa.decodeInt(this.Sencoded()); +}); + +cachedProperty(Signature, 'R', function R() { + return this.eddsa.decodePoint(this.Rencoded()); +}); + +cachedProperty(Signature, 'Rencoded', function Rencoded() { + return this.eddsa.encodePoint(this.R()); +}); + +cachedProperty(Signature, 'Sencoded', function Sencoded() { + return this.eddsa.encodeInt(this.S()); +}); + +Signature.prototype.toBytes = function toBytes() { + return this.Rencoded().concat(this.Sencoded()); +}; + +Signature.prototype.toHex = function toHex() { + return utils.encode(this.toBytes(), 'hex').toUpperCase(); +}; + +module.exports = Signature; + +},{"../../elliptic":548,"bn.js":66}],561:[function(require,module,exports){ +module.exports = { + doubles: { + step: 4, + points: [ + [ + 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', + 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821' + ], + [ + '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', + '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf' + ], + [ + '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', + 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695' + ], + [ + '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', + '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9' + ], + [ + '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', + '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36' + ], + [ + '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', + '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f' + ], + [ + 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', + '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999' + ], + [ + '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', + 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09' + ], + [ + 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', + '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d' + ], + [ + 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', + 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088' + ], + [ + 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', + '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d' + ], + [ + '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', + '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8' + ], + [ + '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', + '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a' + ], + [ + '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', + '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453' + ], + [ + '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', + '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160' + ], + [ + '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', + '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0' + ], + [ + '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', + '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6' + ], + [ + '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', + '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589' + ], + [ + '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', + 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17' + ], + [ + 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', + '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda' + ], + [ + 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', + '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd' + ], + [ + '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', + '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2' + ], + [ + '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', + '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6' + ], + [ + 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', + '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f' + ], + [ + '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', + 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01' + ], + [ + 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', + '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3' + ], + [ + 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', + 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f' + ], + [ + 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', + '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7' + ], + [ + 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', + 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78' + ], + [ + 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', + '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1' + ], + [ + '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', + 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150' + ], + [ + '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', + '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82' + ], + [ + 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', + '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc' + ], + [ + '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', + 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b' + ], + [ + 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', + '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51' + ], + [ + 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', + '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45' + ], + [ + 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', + 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120' + ], + [ + '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', + '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84' + ], + [ + '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', + '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d' + ], + [ + '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', + 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d' + ], + [ + '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', + '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8' + ], + [ + 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', + '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8' + ], + [ + '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', + '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac' + ], + [ + '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', + 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f' + ], + [ + '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', + '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962' + ], + [ + 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', + '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907' + ], + [ + '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', + 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec' + ], + [ + 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', + 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d' + ], + [ + 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', + '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414' + ], + [ + '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', + 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd' + ], + [ + '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', + 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0' + ], + [ + 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', + '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811' + ], + [ + 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', + '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1' + ], + [ + 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', + '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c' + ], + [ + '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', + 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73' + ], + [ + '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', + '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd' + ], + [ + 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', + 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405' + ], + [ + '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', + 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589' + ], + [ + '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', + '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e' + ], + [ + '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', + '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27' + ], + [ + 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', + 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1' + ], + [ + '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', + '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482' + ], + [ + '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', + '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945' + ], + [ + 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', + '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573' + ], + [ + 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', + 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82' + ] + ] + }, + naf: { + wnd: 7, + points: [ + [ + 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', + '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672' + ], + [ + '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', + 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6' + ], + [ + '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', + '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da' + ], + [ + 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', + 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37' + ], + [ + '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', + 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b' + ], + [ + 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', + 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81' + ], + [ + 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', + '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58' + ], + [ + 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', + '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77' + ], + [ + '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', + '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a' + ], + [ + '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', + '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c' + ], + [ + '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', + '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67' + ], + [ + '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', + '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402' + ], + [ + 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', + 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55' + ], + [ + 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', + '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482' + ], + [ + '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', + 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82' + ], + [ + '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', + 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396' + ], + [ + '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', + '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49' + ], + [ + '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', + '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf' + ], + [ + '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', + '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a' + ], + [ + '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', + 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7' + ], + [ + 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', + 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933' + ], + [ + '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', + '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a' + ], + [ + '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', + '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6' + ], + [ + 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', + 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37' + ], + [ + '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', + '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e' + ], + [ + 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', + 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6' + ], + [ + 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', + 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476' + ], + [ + '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', + '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40' + ], + [ + '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', + '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61' + ], + [ + '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', + '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683' + ], + [ + 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', + '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5' + ], + [ + '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', + '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b' + ], + [ + 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', + '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417' + ], + [ + '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', + 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868' + ], + [ + '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', + 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a' + ], + [ + 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', + 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6' + ], + [ + '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', + '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996' + ], + [ + '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', + 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e' + ], + [ + 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', + 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d' + ], + [ + '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', + '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2' + ], + [ + '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', + 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e' + ], + [ + '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', + '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437' + ], + [ + '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', + 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311' + ], + [ + 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', + '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4' + ], + [ + '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', + '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575' + ], + [ + '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', + 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d' + ], + [ + '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', + 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d' + ], + [ + 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', + 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629' + ], + [ + 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', + 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06' + ], + [ + '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', + '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374' + ], + [ + '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', + '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee' + ], + [ + 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', + '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1' + ], + [ + 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', + 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b' + ], + [ + '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', + '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661' + ], + [ + '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', + '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6' + ], + [ + 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', + '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e' + ], + [ + '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', + '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d' + ], + [ + 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', + 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc' + ], + [ + '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', + 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4' + ], + [ + '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', + '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c' + ], + [ + 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', + '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b' + ], + [ + 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', + '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913' + ], + [ + '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', + '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154' + ], + [ + '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', + '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865' + ], + [ + '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', + 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc' + ], + [ + '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', + 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224' + ], + [ + '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', + '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e' + ], + [ + '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', + '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6' + ], + [ + '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', + '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511' + ], + [ + '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', + 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b' + ], + [ + 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', + 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2' + ], + [ + '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', + 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c' + ], + [ + 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', + '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3' + ], + [ + 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', + '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d' + ], + [ + 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', + '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700' + ], + [ + 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', + '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4' + ], + [ + '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', + 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196' + ], + [ + '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', + '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4' + ], + [ + '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', + 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257' + ], + [ + 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', + 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13' + ], + [ + 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', + '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096' + ], + [ + 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', + 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38' + ], + [ + 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', + '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f' + ], + [ + '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', + '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448' + ], + [ + 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', + '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a' + ], + [ + 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', + '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4' + ], + [ + '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', + '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437' + ], + [ + '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', + 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7' + ], + [ + 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', + '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d' + ], + [ + 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', + '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a' + ], + [ + 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', + '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54' + ], + [ + '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', + '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77' + ], + [ + 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', + 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517' + ], + [ + '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', + 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10' + ], + [ + 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', + 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125' + ], + [ + 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', + '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e' + ], + [ + '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', + 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1' + ], + [ + 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', + '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2' + ], + [ + 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', + '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423' + ], + [ + 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', + '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8' + ], + [ + '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', + 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758' + ], + [ + '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', + 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375' + ], + [ + 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', + '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d' + ], + [ + '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', + 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec' + ], + [ + '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', + '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0' + ], + [ + '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', + 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c' + ], + [ + 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', + 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4' + ], + [ + '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', + 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f' + ], + [ + '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', + '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649' + ], + [ + '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', + 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826' + ], + [ + '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', + '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5' + ], + [ + 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', + 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87' + ], + [ + '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', + '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b' + ], + [ + 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', + '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc' + ], + [ + '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', + '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c' + ], + [ + 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', + 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f' + ], + [ + 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', + '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a' + ], + [ + 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', + 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46' + ], + [ + '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', + 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f' + ], + [ + '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', + '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03' + ], + [ + '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', + 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08' + ], + [ + '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', + '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8' + ], + [ + '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', + '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373' + ], + [ + '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', + 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3' + ], + [ + '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', + '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8' + ], + [ + '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', + '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1' + ], + [ + '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', + '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9' + ] + ] + } +}; + +},{}],562:[function(require,module,exports){ +'use strict'; + +var utils = exports; +var BN = require('bn.js'); +var minAssert = require('minimalistic-assert'); +var minUtils = require('minimalistic-crypto-utils'); + +utils.assert = minAssert; +utils.toArray = minUtils.toArray; +utils.zero2 = minUtils.zero2; +utils.toHex = minUtils.toHex; +utils.encode = minUtils.encode; + +// Represent num in a w-NAF form +function getNAF(num, w) { + var naf = []; + var ws = 1 << (w + 1); + var k = num.clone(); + while (k.cmpn(1) >= 0) { + var z; + if (k.isOdd()) { + var mod = k.andln(ws - 1); + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + naf.push(z); + + // Optimization, shift by word if possible + var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1; + for (var i = 1; i < shift; i++) + naf.push(0); + k.iushrn(shift); + } + + return naf; +} +utils.getNAF = getNAF; + +// Represent k1, k2 in a Joint Sparse Form +function getJSF(k1, k2) { + var jsf = [ + [], + [] + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + var m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + var m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; +} +utils.getJSF = getJSF; + +function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; +} +utils.cachedProperty = cachedProperty; + +function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; +} +utils.parseBytes = parseBytes; + +function intFromLE(bytes) { + return new BN(bytes, 'hex', 'le'); +} +utils.intFromLE = intFromLE; + + +},{"bn.js":66,"minimalistic-assert":960,"minimalistic-crypto-utils":961}],563:[function(require,module,exports){ +module.exports={ + "_args": [ + [ + "elliptic@6.4.1", + "/home/yann/Remix/remix-ide" + ] + ], + "_development": true, + "_from": "elliptic@6.4.1", + "_id": "elliptic@6.4.1", + "_inBundle": false, + "_integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "_location": "/elliptic", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "elliptic@6.4.1", + "name": "elliptic", + "escapedName": "elliptic", + "rawSpec": "6.4.1", + "saveSpec": null, + "fetchSpec": "6.4.1" + }, + "_requiredBy": [ + "/browserify-sign", + "/create-ecdh", + "/eth-lib", + "/secp256k1", + "/web3-eth-accounts/eth-lib" + ], + "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "_spec": "6.4.1", + "_where": "/home/yann/Remix/remix-ide", + "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" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/indutny/elliptic", + "keywords": [ + "EC", + "Elliptic", + "curve", + "Cryptography" + ], + "license": "MIT", + "main": "lib/elliptic.js", + "name": "elliptic", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/indutny/elliptic.git" + }, + "scripts": { + "jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "lint": "npm run jscs && npm run jshint", + "test": "npm run lint && npm run unit", + "unit": "istanbul test _mocha --reporter=spec test/index.js", + "version": "grunt dist && git add dist/" + }, + "version": "6.4.1" +} + +},{}],564:[function(require,module,exports){ +var punycode = require('punycode'); +var revEntities = require('./reversed.json'); + +module.exports = encode; + +function encode (str, opts) { + if (typeof str !== 'string') { + throw new TypeError('Expected a String'); + } + if (!opts) opts = {}; + + var numeric = true; + if (opts.named) numeric = false; + if (opts.numeric !== undefined) numeric = opts.numeric; + + var special = opts.special || { + '"': true, "'": true, + '<': true, '>': true, + '&': true + }; + + var codePoints = punycode.ucs2.decode(str); + var chars = []; + for (var i = 0; i < codePoints.length; i++) { + var cc = codePoints[i]; + var c = punycode.ucs2.encode([ cc ]); + var e = revEntities[cc]; + if (e && (cc >= 127 || special[c]) && !numeric) { + chars.push('&' + (/;$/.test(e) ? e : e + ';')); + } + else if (cc < 32 || cc >= 127 || special[c]) { + chars.push('&#' + cc + ';'); + } + else { + chars.push(c); + } + } + return chars.join(''); +} + +},{"./reversed.json":565,"punycode":110}],565:[function(require,module,exports){ +module.exports={ + "9": "Tab;", + "10": "NewLine;", + "33": "excl;", + "34": "quot;", + "35": "num;", + "36": "dollar;", + "37": "percnt;", + "38": "amp;", + "39": "apos;", + "40": "lpar;", + "41": "rpar;", + "42": "midast;", + "43": "plus;", + "44": "comma;", + "46": "period;", + "47": "sol;", + "58": "colon;", + "59": "semi;", + "60": "lt;", + "61": "equals;", + "62": "gt;", + "63": "quest;", + "64": "commat;", + "91": "lsqb;", + "92": "bsol;", + "93": "rsqb;", + "94": "Hat;", + "95": "UnderBar;", + "96": "grave;", + "123": "lcub;", + "124": "VerticalLine;", + "125": "rcub;", + "160": "NonBreakingSpace;", + "161": "iexcl;", + "162": "cent;", + "163": "pound;", + "164": "curren;", + "165": "yen;", + "166": "brvbar;", + "167": "sect;", + "168": "uml;", + "169": "copy;", + "170": "ordf;", + "171": "laquo;", + "172": "not;", + "173": "shy;", + "174": "reg;", + "175": "strns;", + "176": "deg;", + "177": "pm;", + "178": "sup2;", + "179": "sup3;", + "180": "DiacriticalAcute;", + "181": "micro;", + "182": "para;", + "183": "middot;", + "184": "Cedilla;", + "185": "sup1;", + "186": "ordm;", + "187": "raquo;", + "188": "frac14;", + "189": "half;", + "190": "frac34;", + "191": "iquest;", + "192": "Agrave;", + "193": "Aacute;", + "194": "Acirc;", + "195": "Atilde;", + "196": "Auml;", + "197": "Aring;", + "198": "AElig;", + "199": "Ccedil;", + "200": "Egrave;", + "201": "Eacute;", + "202": "Ecirc;", + "203": "Euml;", + "204": "Igrave;", + "205": "Iacute;", + "206": "Icirc;", + "207": "Iuml;", + "208": "ETH;", + "209": "Ntilde;", + "210": "Ograve;", + "211": "Oacute;", + "212": "Ocirc;", + "213": "Otilde;", + "214": "Ouml;", + "215": "times;", + "216": "Oslash;", + "217": "Ugrave;", + "218": "Uacute;", + "219": "Ucirc;", + "220": "Uuml;", + "221": "Yacute;", + "222": "THORN;", + "223": "szlig;", + "224": "agrave;", + "225": "aacute;", + "226": "acirc;", + "227": "atilde;", + "228": "auml;", + "229": "aring;", + "230": "aelig;", + "231": "ccedil;", + "232": "egrave;", + "233": "eacute;", + "234": "ecirc;", + "235": "euml;", + "236": "igrave;", + "237": "iacute;", + "238": "icirc;", + "239": "iuml;", + "240": "eth;", + "241": "ntilde;", + "242": "ograve;", + "243": "oacute;", + "244": "ocirc;", + "245": "otilde;", + "246": "ouml;", + "247": "divide;", + "248": "oslash;", + "249": "ugrave;", + "250": "uacute;", + "251": "ucirc;", + "252": "uuml;", + "253": "yacute;", + "254": "thorn;", + "255": "yuml;", + "256": "Amacr;", + "257": "amacr;", + "258": "Abreve;", + "259": "abreve;", + "260": "Aogon;", + "261": "aogon;", + "262": "Cacute;", + "263": "cacute;", + "264": "Ccirc;", + "265": "ccirc;", + "266": "Cdot;", + "267": "cdot;", + "268": "Ccaron;", + "269": "ccaron;", + "270": "Dcaron;", + "271": "dcaron;", + "272": "Dstrok;", + "273": "dstrok;", + "274": "Emacr;", + "275": "emacr;", + "278": "Edot;", + "279": "edot;", + "280": "Eogon;", + "281": "eogon;", + "282": "Ecaron;", + "283": "ecaron;", + "284": "Gcirc;", + "285": "gcirc;", + "286": "Gbreve;", + "287": "gbreve;", + "288": "Gdot;", + "289": "gdot;", + "290": "Gcedil;", + "292": "Hcirc;", + "293": "hcirc;", + "294": "Hstrok;", + "295": "hstrok;", + "296": "Itilde;", + "297": "itilde;", + "298": "Imacr;", + "299": "imacr;", + "302": "Iogon;", + "303": "iogon;", + "304": "Idot;", + "305": "inodot;", + "306": "IJlig;", + "307": "ijlig;", + "308": "Jcirc;", + "309": "jcirc;", + "310": "Kcedil;", + "311": "kcedil;", + "312": "kgreen;", + "313": "Lacute;", + "314": "lacute;", + "315": "Lcedil;", + "316": "lcedil;", + "317": "Lcaron;", + "318": "lcaron;", + "319": "Lmidot;", + "320": "lmidot;", + "321": "Lstrok;", + "322": "lstrok;", + "323": "Nacute;", + "324": "nacute;", + "325": "Ncedil;", + "326": "ncedil;", + "327": "Ncaron;", + "328": "ncaron;", + "329": "napos;", + "330": "ENG;", + "331": "eng;", + "332": "Omacr;", + "333": "omacr;", + "336": "Odblac;", + "337": "odblac;", + "338": "OElig;", + "339": "oelig;", + "340": "Racute;", + "341": "racute;", + "342": "Rcedil;", + "343": "rcedil;", + "344": "Rcaron;", + "345": "rcaron;", + "346": "Sacute;", + "347": "sacute;", + "348": "Scirc;", + "349": "scirc;", + "350": "Scedil;", + "351": "scedil;", + "352": "Scaron;", + "353": "scaron;", + "354": "Tcedil;", + "355": "tcedil;", + "356": "Tcaron;", + "357": "tcaron;", + "358": "Tstrok;", + "359": "tstrok;", + "360": "Utilde;", + "361": "utilde;", + "362": "Umacr;", + "363": "umacr;", + "364": "Ubreve;", + "365": "ubreve;", + "366": "Uring;", + "367": "uring;", + "368": "Udblac;", + "369": "udblac;", + "370": "Uogon;", + "371": "uogon;", + "372": "Wcirc;", + "373": "wcirc;", + "374": "Ycirc;", + "375": "ycirc;", + "376": "Yuml;", + "377": "Zacute;", + "378": "zacute;", + "379": "Zdot;", + "380": "zdot;", + "381": "Zcaron;", + "382": "zcaron;", + "402": "fnof;", + "437": "imped;", + "501": "gacute;", + "567": "jmath;", + "710": "circ;", + "711": "Hacek;", + "728": "breve;", + "729": "dot;", + "730": "ring;", + "731": "ogon;", + "732": "tilde;", + "733": "DiacriticalDoubleAcute;", + "785": "DownBreve;", + "913": "Alpha;", + "914": "Beta;", + "915": "Gamma;", + "916": "Delta;", + "917": "Epsilon;", + "918": "Zeta;", + "919": "Eta;", + "920": "Theta;", + "921": "Iota;", + "922": "Kappa;", + "923": "Lambda;", + "924": "Mu;", + "925": "Nu;", + "926": "Xi;", + "927": "Omicron;", + "928": "Pi;", + "929": "Rho;", + "931": "Sigma;", + "932": "Tau;", + "933": "Upsilon;", + "934": "Phi;", + "935": "Chi;", + "936": "Psi;", + "937": "Omega;", + "945": "alpha;", + "946": "beta;", + "947": "gamma;", + "948": "delta;", + "949": "epsilon;", + "950": "zeta;", + "951": "eta;", + "952": "theta;", + "953": "iota;", + "954": "kappa;", + "955": "lambda;", + "956": "mu;", + "957": "nu;", + "958": "xi;", + "959": "omicron;", + "960": "pi;", + "961": "rho;", + "962": "varsigma;", + "963": "sigma;", + "964": "tau;", + "965": "upsilon;", + "966": "phi;", + "967": "chi;", + "968": "psi;", + "969": "omega;", + "977": "vartheta;", + "978": "upsih;", + "981": "varphi;", + "982": "varpi;", + "988": "Gammad;", + "989": "gammad;", + "1008": "varkappa;", + "1009": "varrho;", + "1013": "varepsilon;", + "1014": "bepsi;", + "1025": "IOcy;", + "1026": "DJcy;", + "1027": "GJcy;", + "1028": "Jukcy;", + "1029": "DScy;", + "1030": "Iukcy;", + "1031": "YIcy;", + "1032": "Jsercy;", + "1033": "LJcy;", + "1034": "NJcy;", + "1035": "TSHcy;", + "1036": "KJcy;", + "1038": "Ubrcy;", + "1039": "DZcy;", + "1040": "Acy;", + "1041": "Bcy;", + "1042": "Vcy;", + "1043": "Gcy;", + "1044": "Dcy;", + "1045": "IEcy;", + "1046": "ZHcy;", + "1047": "Zcy;", + "1048": "Icy;", + "1049": "Jcy;", + "1050": "Kcy;", + "1051": "Lcy;", + "1052": "Mcy;", + "1053": "Ncy;", + "1054": "Ocy;", + "1055": "Pcy;", + "1056": "Rcy;", + "1057": "Scy;", + "1058": "Tcy;", + "1059": "Ucy;", + "1060": "Fcy;", + "1061": "KHcy;", + "1062": "TScy;", + "1063": "CHcy;", + "1064": "SHcy;", + "1065": "SHCHcy;", + "1066": "HARDcy;", + "1067": "Ycy;", + "1068": "SOFTcy;", + "1069": "Ecy;", + "1070": "YUcy;", + "1071": "YAcy;", + "1072": "acy;", + "1073": "bcy;", + "1074": "vcy;", + "1075": "gcy;", + "1076": "dcy;", + "1077": "iecy;", + "1078": "zhcy;", + "1079": "zcy;", + "1080": "icy;", + "1081": "jcy;", + "1082": "kcy;", + "1083": "lcy;", + "1084": "mcy;", + "1085": "ncy;", + "1086": "ocy;", + "1087": "pcy;", + "1088": "rcy;", + "1089": "scy;", + "1090": "tcy;", + "1091": "ucy;", + "1092": "fcy;", + "1093": "khcy;", + "1094": "tscy;", + "1095": "chcy;", + "1096": "shcy;", + "1097": "shchcy;", + "1098": "hardcy;", + "1099": "ycy;", + "1100": "softcy;", + "1101": "ecy;", + "1102": "yucy;", + "1103": "yacy;", + "1105": "iocy;", + "1106": "djcy;", + "1107": "gjcy;", + "1108": "jukcy;", + "1109": "dscy;", + "1110": "iukcy;", + "1111": "yicy;", + "1112": "jsercy;", + "1113": "ljcy;", + "1114": "njcy;", + "1115": "tshcy;", + "1116": "kjcy;", + "1118": "ubrcy;", + "1119": "dzcy;", + "8194": "ensp;", + "8195": "emsp;", + "8196": "emsp13;", + "8197": "emsp14;", + "8199": "numsp;", + "8200": "puncsp;", + "8201": "ThinSpace;", + "8202": "VeryThinSpace;", + "8203": "ZeroWidthSpace;", + "8204": "zwnj;", + "8205": "zwj;", + "8206": "lrm;", + "8207": "rlm;", + "8208": "hyphen;", + "8211": "ndash;", + "8212": "mdash;", + "8213": "horbar;", + "8214": "Vert;", + "8216": "OpenCurlyQuote;", + "8217": "rsquor;", + "8218": "sbquo;", + "8220": "OpenCurlyDoubleQuote;", + "8221": "rdquor;", + "8222": "ldquor;", + "8224": "dagger;", + "8225": "ddagger;", + "8226": "bullet;", + "8229": "nldr;", + "8230": "mldr;", + "8240": "permil;", + "8241": "pertenk;", + "8242": "prime;", + "8243": "Prime;", + "8244": "tprime;", + "8245": "bprime;", + "8249": "lsaquo;", + "8250": "rsaquo;", + "8254": "OverBar;", + "8257": "caret;", + "8259": "hybull;", + "8260": "frasl;", + "8271": "bsemi;", + "8279": "qprime;", + "8287": "MediumSpace;", + "8288": "NoBreak;", + "8289": "ApplyFunction;", + "8290": "it;", + "8291": "InvisibleComma;", + "8364": "euro;", + "8411": "TripleDot;", + "8412": "DotDot;", + "8450": "Copf;", + "8453": "incare;", + "8458": "gscr;", + "8459": "Hscr;", + "8460": "Poincareplane;", + "8461": "quaternions;", + "8462": "planckh;", + "8463": "plankv;", + "8464": "Iscr;", + "8465": "imagpart;", + "8466": "Lscr;", + "8467": "ell;", + "8469": "Nopf;", + "8470": "numero;", + "8471": "copysr;", + "8472": "wp;", + "8473": "primes;", + "8474": "rationals;", + "8475": "Rscr;", + "8476": "Rfr;", + "8477": "Ropf;", + "8478": "rx;", + "8482": "trade;", + "8484": "Zopf;", + "8487": "mho;", + "8488": "Zfr;", + "8489": "iiota;", + "8492": "Bscr;", + "8493": "Cfr;", + "8495": "escr;", + "8496": "expectation;", + "8497": "Fscr;", + "8499": "phmmat;", + "8500": "oscr;", + "8501": "aleph;", + "8502": "beth;", + "8503": "gimel;", + "8504": "daleth;", + "8517": "DD;", + "8518": "DifferentialD;", + "8519": "exponentiale;", + "8520": "ImaginaryI;", + "8531": "frac13;", + "8532": "frac23;", + "8533": "frac15;", + "8534": "frac25;", + "8535": "frac35;", + "8536": "frac45;", + "8537": "frac16;", + "8538": "frac56;", + "8539": "frac18;", + "8540": "frac38;", + "8541": "frac58;", + "8542": "frac78;", + "8592": "slarr;", + "8593": "uparrow;", + "8594": "srarr;", + "8595": "ShortDownArrow;", + "8596": "leftrightarrow;", + "8597": "varr;", + "8598": "UpperLeftArrow;", + "8599": "UpperRightArrow;", + "8600": "searrow;", + "8601": "swarrow;", + "8602": "nleftarrow;", + "8603": "nrightarrow;", + "8605": "rightsquigarrow;", + "8606": "twoheadleftarrow;", + "8607": "Uarr;", + "8608": "twoheadrightarrow;", + "8609": "Darr;", + "8610": "leftarrowtail;", + "8611": "rightarrowtail;", + "8612": "mapstoleft;", + "8613": "UpTeeArrow;", + "8614": "RightTeeArrow;", + "8615": "mapstodown;", + "8617": "larrhk;", + "8618": "rarrhk;", + "8619": "looparrowleft;", + "8620": "rarrlp;", + "8621": "leftrightsquigarrow;", + "8622": "nleftrightarrow;", + "8624": "lsh;", + "8625": "rsh;", + "8626": "ldsh;", + "8627": "rdsh;", + "8629": "crarr;", + "8630": "curvearrowleft;", + "8631": "curvearrowright;", + "8634": "olarr;", + "8635": "orarr;", + "8636": "lharu;", + "8637": "lhard;", + "8638": "upharpoonright;", + "8639": "upharpoonleft;", + "8640": "RightVector;", + "8641": "rightharpoondown;", + "8642": "RightDownVector;", + "8643": "LeftDownVector;", + "8644": "rlarr;", + "8645": "UpArrowDownArrow;", + "8646": "lrarr;", + "8647": "llarr;", + "8648": "uuarr;", + "8649": "rrarr;", + "8650": "downdownarrows;", + "8651": "ReverseEquilibrium;", + "8652": "rlhar;", + "8653": "nLeftarrow;", + "8654": "nLeftrightarrow;", + "8655": "nRightarrow;", + "8656": "Leftarrow;", + "8657": "Uparrow;", + "8658": "Rightarrow;", + "8659": "Downarrow;", + "8660": "Leftrightarrow;", + "8661": "vArr;", + "8662": "nwArr;", + "8663": "neArr;", + "8664": "seArr;", + "8665": "swArr;", + "8666": "Lleftarrow;", + "8667": "Rrightarrow;", + "8669": "zigrarr;", + "8676": "LeftArrowBar;", + "8677": "RightArrowBar;", + "8693": "duarr;", + "8701": "loarr;", + "8702": "roarr;", + "8703": "hoarr;", + "8704": "forall;", + "8705": "complement;", + "8706": "PartialD;", + "8707": "Exists;", + "8708": "NotExists;", + "8709": "varnothing;", + "8711": "nabla;", + "8712": "isinv;", + "8713": "notinva;", + "8715": "SuchThat;", + "8716": "NotReverseElement;", + "8719": "Product;", + "8720": "Coproduct;", + "8721": "sum;", + "8722": "minus;", + "8723": "mp;", + "8724": "plusdo;", + "8726": "ssetmn;", + "8727": "lowast;", + "8728": "SmallCircle;", + "8730": "Sqrt;", + "8733": "vprop;", + "8734": "infin;", + "8735": "angrt;", + "8736": "angle;", + "8737": "measuredangle;", + "8738": "angsph;", + "8739": "VerticalBar;", + "8740": "nsmid;", + "8741": "spar;", + "8742": "nspar;", + "8743": "wedge;", + "8744": "vee;", + "8745": "cap;", + "8746": "cup;", + "8747": "Integral;", + "8748": "Int;", + "8749": "tint;", + "8750": "oint;", + "8751": "DoubleContourIntegral;", + "8752": "Cconint;", + "8753": "cwint;", + "8754": "cwconint;", + "8755": "CounterClockwiseContourIntegral;", + "8756": "therefore;", + "8757": "because;", + "8758": "ratio;", + "8759": "Proportion;", + "8760": "minusd;", + "8762": "mDDot;", + "8763": "homtht;", + "8764": "Tilde;", + "8765": "bsim;", + "8766": "mstpos;", + "8767": "acd;", + "8768": "wreath;", + "8769": "nsim;", + "8770": "esim;", + "8771": "TildeEqual;", + "8772": "nsimeq;", + "8773": "TildeFullEqual;", + "8774": "simne;", + "8775": "NotTildeFullEqual;", + "8776": "TildeTilde;", + "8777": "NotTildeTilde;", + "8778": "approxeq;", + "8779": "apid;", + "8780": "bcong;", + "8781": "CupCap;", + "8782": "HumpDownHump;", + "8783": "HumpEqual;", + "8784": "esdot;", + "8785": "eDot;", + "8786": "fallingdotseq;", + "8787": "risingdotseq;", + "8788": "coloneq;", + "8789": "eqcolon;", + "8790": "eqcirc;", + "8791": "cire;", + "8793": "wedgeq;", + "8794": "veeeq;", + "8796": "trie;", + "8799": "questeq;", + "8800": "NotEqual;", + "8801": "equiv;", + "8802": "NotCongruent;", + "8804": "leq;", + "8805": "GreaterEqual;", + "8806": "LessFullEqual;", + "8807": "GreaterFullEqual;", + "8808": "lneqq;", + "8809": "gneqq;", + "8810": "NestedLessLess;", + "8811": "NestedGreaterGreater;", + "8812": "twixt;", + "8813": "NotCupCap;", + "8814": "NotLess;", + "8815": "NotGreater;", + "8816": "NotLessEqual;", + "8817": "NotGreaterEqual;", + "8818": "lsim;", + "8819": "gtrsim;", + "8820": "NotLessTilde;", + "8821": "NotGreaterTilde;", + "8822": "lg;", + "8823": "gtrless;", + "8824": "ntlg;", + "8825": "ntgl;", + "8826": "Precedes;", + "8827": "Succeeds;", + "8828": "PrecedesSlantEqual;", + "8829": "SucceedsSlantEqual;", + "8830": "prsim;", + "8831": "succsim;", + "8832": "nprec;", + "8833": "nsucc;", + "8834": "subset;", + "8835": "supset;", + "8836": "nsub;", + "8837": "nsup;", + "8838": "SubsetEqual;", + "8839": "supseteq;", + "8840": "nsubseteq;", + "8841": "nsupseteq;", + "8842": "subsetneq;", + "8843": "supsetneq;", + "8845": "cupdot;", + "8846": "uplus;", + "8847": "SquareSubset;", + "8848": "SquareSuperset;", + "8849": "SquareSubsetEqual;", + "8850": "SquareSupersetEqual;", + "8851": "SquareIntersection;", + "8852": "SquareUnion;", + "8853": "oplus;", + "8854": "ominus;", + "8855": "otimes;", + "8856": "osol;", + "8857": "odot;", + "8858": "ocir;", + "8859": "oast;", + "8861": "odash;", + "8862": "plusb;", + "8863": "minusb;", + "8864": "timesb;", + "8865": "sdotb;", + "8866": "vdash;", + "8867": "LeftTee;", + "8868": "top;", + "8869": "UpTee;", + "8871": "models;", + "8872": "vDash;", + "8873": "Vdash;", + "8874": "Vvdash;", + "8875": "VDash;", + "8876": "nvdash;", + "8877": "nvDash;", + "8878": "nVdash;", + "8879": "nVDash;", + "8880": "prurel;", + "8882": "vltri;", + "8883": "vrtri;", + "8884": "trianglelefteq;", + "8885": "trianglerighteq;", + "8886": "origof;", + "8887": "imof;", + "8888": "mumap;", + "8889": "hercon;", + "8890": "intercal;", + "8891": "veebar;", + "8893": "barvee;", + "8894": "angrtvb;", + "8895": "lrtri;", + "8896": "xwedge;", + "8897": "xvee;", + "8898": "xcap;", + "8899": "xcup;", + "8900": "diamond;", + "8901": "sdot;", + "8902": "Star;", + "8903": "divonx;", + "8904": "bowtie;", + "8905": "ltimes;", + "8906": "rtimes;", + "8907": "lthree;", + "8908": "rthree;", + "8909": "bsime;", + "8910": "cuvee;", + "8911": "cuwed;", + "8912": "Subset;", + "8913": "Supset;", + "8914": "Cap;", + "8915": "Cup;", + "8916": "pitchfork;", + "8917": "epar;", + "8918": "ltdot;", + "8919": "gtrdot;", + "8920": "Ll;", + "8921": "ggg;", + "8922": "LessEqualGreater;", + "8923": "gtreqless;", + "8926": "curlyeqprec;", + "8927": "curlyeqsucc;", + "8928": "nprcue;", + "8929": "nsccue;", + "8930": "nsqsube;", + "8931": "nsqsupe;", + "8934": "lnsim;", + "8935": "gnsim;", + "8936": "prnsim;", + "8937": "succnsim;", + "8938": "ntriangleleft;", + "8939": "ntriangleright;", + "8940": "ntrianglelefteq;", + "8941": "ntrianglerighteq;", + "8942": "vellip;", + "8943": "ctdot;", + "8944": "utdot;", + "8945": "dtdot;", + "8946": "disin;", + "8947": "isinsv;", + "8948": "isins;", + "8949": "isindot;", + "8950": "notinvc;", + "8951": "notinvb;", + "8953": "isinE;", + "8954": "nisd;", + "8955": "xnis;", + "8956": "nis;", + "8957": "notnivc;", + "8958": "notnivb;", + "8965": "barwedge;", + "8966": "doublebarwedge;", + "8968": "LeftCeiling;", + "8969": "RightCeiling;", + "8970": "lfloor;", + "8971": "RightFloor;", + "8972": "drcrop;", + "8973": "dlcrop;", + "8974": "urcrop;", + "8975": "ulcrop;", + "8976": "bnot;", + "8978": "profline;", + "8979": "profsurf;", + "8981": "telrec;", + "8982": "target;", + "8988": "ulcorner;", + "8989": "urcorner;", + "8990": "llcorner;", + "8991": "lrcorner;", + "8994": "sfrown;", + "8995": "ssmile;", + "9005": "cylcty;", + "9006": "profalar;", + "9014": "topbot;", + "9021": "ovbar;", + "9023": "solbar;", + "9084": "angzarr;", + "9136": "lmoustache;", + "9137": "rmoustache;", + "9140": "tbrk;", + "9141": "UnderBracket;", + "9142": "bbrktbrk;", + "9180": "OverParenthesis;", + "9181": "UnderParenthesis;", + "9182": "OverBrace;", + "9183": "UnderBrace;", + "9186": "trpezium;", + "9191": "elinters;", + "9251": "blank;", + "9416": "oS;", + "9472": "HorizontalLine;", + "9474": "boxv;", + "9484": "boxdr;", + "9488": "boxdl;", + "9492": "boxur;", + "9496": "boxul;", + "9500": "boxvr;", + "9508": "boxvl;", + "9516": "boxhd;", + "9524": "boxhu;", + "9532": "boxvh;", + "9552": "boxH;", + "9553": "boxV;", + "9554": "boxdR;", + "9555": "boxDr;", + "9556": "boxDR;", + "9557": "boxdL;", + "9558": "boxDl;", + "9559": "boxDL;", + "9560": "boxuR;", + "9561": "boxUr;", + "9562": "boxUR;", + "9563": "boxuL;", + "9564": "boxUl;", + "9565": "boxUL;", + "9566": "boxvR;", + "9567": "boxVr;", + "9568": "boxVR;", + "9569": "boxvL;", + "9570": "boxVl;", + "9571": "boxVL;", + "9572": "boxHd;", + "9573": "boxhD;", + "9574": "boxHD;", + "9575": "boxHu;", + "9576": "boxhU;", + "9577": "boxHU;", + "9578": "boxvH;", + "9579": "boxVh;", + "9580": "boxVH;", + "9600": "uhblk;", + "9604": "lhblk;", + "9608": "block;", + "9617": "blk14;", + "9618": "blk12;", + "9619": "blk34;", + "9633": "square;", + "9642": "squf;", + "9643": "EmptyVerySmallSquare;", + "9645": "rect;", + "9646": "marker;", + "9649": "fltns;", + "9651": "xutri;", + "9652": "utrif;", + "9653": "utri;", + "9656": "rtrif;", + "9657": "triangleright;", + "9661": "xdtri;", + "9662": "dtrif;", + "9663": "triangledown;", + "9666": "ltrif;", + "9667": "triangleleft;", + "9674": "lozenge;", + "9675": "cir;", + "9708": "tridot;", + "9711": "xcirc;", + "9720": "ultri;", + "9721": "urtri;", + "9722": "lltri;", + "9723": "EmptySmallSquare;", + "9724": "FilledSmallSquare;", + "9733": "starf;", + "9734": "star;", + "9742": "phone;", + "9792": "female;", + "9794": "male;", + "9824": "spadesuit;", + "9827": "clubsuit;", + "9829": "heartsuit;", + "9830": "diams;", + "9834": "sung;", + "9837": "flat;", + "9838": "natural;", + "9839": "sharp;", + "10003": "checkmark;", + "10007": "cross;", + "10016": "maltese;", + "10038": "sext;", + "10072": "VerticalSeparator;", + "10098": "lbbrk;", + "10099": "rbbrk;", + "10184": "bsolhsub;", + "10185": "suphsol;", + "10214": "lobrk;", + "10215": "robrk;", + "10216": "LeftAngleBracket;", + "10217": "RightAngleBracket;", + "10218": "Lang;", + "10219": "Rang;", + "10220": "loang;", + "10221": "roang;", + "10229": "xlarr;", + "10230": "xrarr;", + "10231": "xharr;", + "10232": "xlArr;", + "10233": "xrArr;", + "10234": "xhArr;", + "10236": "xmap;", + "10239": "dzigrarr;", + "10498": "nvlArr;", + "10499": "nvrArr;", + "10500": "nvHarr;", + "10501": "Map;", + "10508": "lbarr;", + "10509": "rbarr;", + "10510": "lBarr;", + "10511": "rBarr;", + "10512": "RBarr;", + "10513": "DDotrahd;", + "10514": "UpArrowBar;", + "10515": "DownArrowBar;", + "10518": "Rarrtl;", + "10521": "latail;", + "10522": "ratail;", + "10523": "lAtail;", + "10524": "rAtail;", + "10525": "larrfs;", + "10526": "rarrfs;", + "10527": "larrbfs;", + "10528": "rarrbfs;", + "10531": "nwarhk;", + "10532": "nearhk;", + "10533": "searhk;", + "10534": "swarhk;", + "10535": "nwnear;", + "10536": "toea;", + "10537": "tosa;", + "10538": "swnwar;", + "10547": "rarrc;", + "10549": "cudarrr;", + "10550": "ldca;", + "10551": "rdca;", + "10552": "cudarrl;", + "10553": "larrpl;", + "10556": "curarrm;", + "10557": "cularrp;", + "10565": "rarrpl;", + "10568": "harrcir;", + "10569": "Uarrocir;", + "10570": "lurdshar;", + "10571": "ldrushar;", + "10574": "LeftRightVector;", + "10575": "RightUpDownVector;", + "10576": "DownLeftRightVector;", + "10577": "LeftUpDownVector;", + "10578": "LeftVectorBar;", + "10579": "RightVectorBar;", + "10580": "RightUpVectorBar;", + "10581": "RightDownVectorBar;", + "10582": "DownLeftVectorBar;", + "10583": "DownRightVectorBar;", + "10584": "LeftUpVectorBar;", + "10585": "LeftDownVectorBar;", + "10586": "LeftTeeVector;", + "10587": "RightTeeVector;", + "10588": "RightUpTeeVector;", + "10589": "RightDownTeeVector;", + "10590": "DownLeftTeeVector;", + "10591": "DownRightTeeVector;", + "10592": "LeftUpTeeVector;", + "10593": "LeftDownTeeVector;", + "10594": "lHar;", + "10595": "uHar;", + "10596": "rHar;", + "10597": "dHar;", + "10598": "luruhar;", + "10599": "ldrdhar;", + "10600": "ruluhar;", + "10601": "rdldhar;", + "10602": "lharul;", + "10603": "llhard;", + "10604": "rharul;", + "10605": "lrhard;", + "10606": "UpEquilibrium;", + "10607": "ReverseUpEquilibrium;", + "10608": "RoundImplies;", + "10609": "erarr;", + "10610": "simrarr;", + "10611": "larrsim;", + "10612": "rarrsim;", + "10613": "rarrap;", + "10614": "ltlarr;", + "10616": "gtrarr;", + "10617": "subrarr;", + "10619": "suplarr;", + "10620": "lfisht;", + "10621": "rfisht;", + "10622": "ufisht;", + "10623": "dfisht;", + "10629": "lopar;", + "10630": "ropar;", + "10635": "lbrke;", + "10636": "rbrke;", + "10637": "lbrkslu;", + "10638": "rbrksld;", + "10639": "lbrksld;", + "10640": "rbrkslu;", + "10641": "langd;", + "10642": "rangd;", + "10643": "lparlt;", + "10644": "rpargt;", + "10645": "gtlPar;", + "10646": "ltrPar;", + "10650": "vzigzag;", + "10652": "vangrt;", + "10653": "angrtvbd;", + "10660": "ange;", + "10661": "range;", + "10662": "dwangle;", + "10663": "uwangle;", + "10664": "angmsdaa;", + "10665": "angmsdab;", + "10666": "angmsdac;", + "10667": "angmsdad;", + "10668": "angmsdae;", + "10669": "angmsdaf;", + "10670": "angmsdag;", + "10671": "angmsdah;", + "10672": "bemptyv;", + "10673": "demptyv;", + "10674": "cemptyv;", + "10675": "raemptyv;", + "10676": "laemptyv;", + "10677": "ohbar;", + "10678": "omid;", + "10679": "opar;", + "10681": "operp;", + "10683": "olcross;", + "10684": "odsold;", + "10686": "olcir;", + "10687": "ofcir;", + "10688": "olt;", + "10689": "ogt;", + "10690": "cirscir;", + "10691": "cirE;", + "10692": "solb;", + "10693": "bsolb;", + "10697": "boxbox;", + "10701": "trisb;", + "10702": "rtriltri;", + "10703": "LeftTriangleBar;", + "10704": "RightTriangleBar;", + "10716": "iinfin;", + "10717": "infintie;", + "10718": "nvinfin;", + "10723": "eparsl;", + "10724": "smeparsl;", + "10725": "eqvparsl;", + "10731": "lozf;", + "10740": "RuleDelayed;", + "10742": "dsol;", + "10752": "xodot;", + "10753": "xoplus;", + "10754": "xotime;", + "10756": "xuplus;", + "10758": "xsqcup;", + "10764": "qint;", + "10765": "fpartint;", + "10768": "cirfnint;", + "10769": "awint;", + "10770": "rppolint;", + "10771": "scpolint;", + "10772": "npolint;", + "10773": "pointint;", + "10774": "quatint;", + "10775": "intlarhk;", + "10786": "pluscir;", + "10787": "plusacir;", + "10788": "simplus;", + "10789": "plusdu;", + "10790": "plussim;", + "10791": "plustwo;", + "10793": "mcomma;", + "10794": "minusdu;", + "10797": "loplus;", + "10798": "roplus;", + "10799": "Cross;", + "10800": "timesd;", + "10801": "timesbar;", + "10803": "smashp;", + "10804": "lotimes;", + "10805": "rotimes;", + "10806": "otimesas;", + "10807": "Otimes;", + "10808": "odiv;", + "10809": "triplus;", + "10810": "triminus;", + "10811": "tritime;", + "10812": "iprod;", + "10815": "amalg;", + "10816": "capdot;", + "10818": "ncup;", + "10819": "ncap;", + "10820": "capand;", + "10821": "cupor;", + "10822": "cupcap;", + "10823": "capcup;", + "10824": "cupbrcap;", + "10825": "capbrcup;", + "10826": "cupcup;", + "10827": "capcap;", + "10828": "ccups;", + "10829": "ccaps;", + "10832": "ccupssm;", + "10835": "And;", + "10836": "Or;", + "10837": "andand;", + "10838": "oror;", + "10839": "orslope;", + "10840": "andslope;", + "10842": "andv;", + "10843": "orv;", + "10844": "andd;", + "10845": "ord;", + "10847": "wedbar;", + "10854": "sdote;", + "10858": "simdot;", + "10861": "congdot;", + "10862": "easter;", + "10863": "apacir;", + "10864": "apE;", + "10865": "eplus;", + "10866": "pluse;", + "10867": "Esim;", + "10868": "Colone;", + "10869": "Equal;", + "10871": "eDDot;", + "10872": "equivDD;", + "10873": "ltcir;", + "10874": "gtcir;", + "10875": "ltquest;", + "10876": "gtquest;", + "10877": "LessSlantEqual;", + "10878": "GreaterSlantEqual;", + "10879": "lesdot;", + "10880": "gesdot;", + "10881": "lesdoto;", + "10882": "gesdoto;", + "10883": "lesdotor;", + "10884": "gesdotol;", + "10885": "lessapprox;", + "10886": "gtrapprox;", + "10887": "lneq;", + "10888": "gneq;", + "10889": "lnapprox;", + "10890": "gnapprox;", + "10891": "lesseqqgtr;", + "10892": "gtreqqless;", + "10893": "lsime;", + "10894": "gsime;", + "10895": "lsimg;", + "10896": "gsiml;", + "10897": "lgE;", + "10898": "glE;", + "10899": "lesges;", + "10900": "gesles;", + "10901": "eqslantless;", + "10902": "eqslantgtr;", + "10903": "elsdot;", + "10904": "egsdot;", + "10905": "el;", + "10906": "eg;", + "10909": "siml;", + "10910": "simg;", + "10911": "simlE;", + "10912": "simgE;", + "10913": "LessLess;", + "10914": "GreaterGreater;", + "10916": "glj;", + "10917": "gla;", + "10918": "ltcc;", + "10919": "gtcc;", + "10920": "lescc;", + "10921": "gescc;", + "10922": "smt;", + "10923": "lat;", + "10924": "smte;", + "10925": "late;", + "10926": "bumpE;", + "10927": "preceq;", + "10928": "succeq;", + "10931": "prE;", + "10932": "scE;", + "10933": "prnE;", + "10934": "succneqq;", + "10935": "precapprox;", + "10936": "succapprox;", + "10937": "prnap;", + "10938": "succnapprox;", + "10939": "Pr;", + "10940": "Sc;", + "10941": "subdot;", + "10942": "supdot;", + "10943": "subplus;", + "10944": "supplus;", + "10945": "submult;", + "10946": "supmult;", + "10947": "subedot;", + "10948": "supedot;", + "10949": "subseteqq;", + "10950": "supseteqq;", + "10951": "subsim;", + "10952": "supsim;", + "10955": "subsetneqq;", + "10956": "supsetneqq;", + "10959": "csub;", + "10960": "csup;", + "10961": "csube;", + "10962": "csupe;", + "10963": "subsup;", + "10964": "supsub;", + "10965": "subsub;", + "10966": "supsup;", + "10967": "suphsub;", + "10968": "supdsub;", + "10969": "forkv;", + "10970": "topfork;", + "10971": "mlcp;", + "10980": "DoubleLeftTee;", + "10982": "Vdashl;", + "10983": "Barv;", + "10984": "vBar;", + "10985": "vBarv;", + "10987": "Vbar;", + "10988": "Not;", + "10989": "bNot;", + "10990": "rnmid;", + "10991": "cirmid;", + "10992": "midcir;", + "10993": "topcir;", + "10994": "nhpar;", + "10995": "parsim;", + "11005": "parsl;", + "64256": "fflig;", + "64257": "filig;", + "64258": "fllig;", + "64259": "ffilig;", + "64260": "ffllig;" +} +},{}],566:[function(require,module,exports){ +var prr = require('prr') + +function init (type, message, cause) { + if (!!message && typeof message != 'string') { + message = message.message || message.name + } + prr(this, { + type : type + , name : type + // can be passed just a 'cause' + , cause : typeof message != 'string' ? message : cause + , message : message + }, 'ewr') +} + +// generic prototype, not intended to be actually used - helpful for `instanceof` +function CustomError (message, cause) { + Error.call(this) + if (Error.captureStackTrace) + Error.captureStackTrace(this, this.constructor) + init.call(this, 'CustomError', message, cause) +} + +CustomError.prototype = new Error() + +function createError (errno, type, proto) { + var err = function (message, cause) { + init.call(this, type, message, cause) + //TODO: the specificity here is stupid, errno should be available everywhere + if (type == 'FilesystemError') { + this.code = this.cause.code + this.path = this.cause.path + this.errno = this.cause.errno + this.message = + (errno.errno[this.cause.errno] + ? errno.errno[this.cause.errno].description + : this.cause.message) + + (this.cause.path ? ' [' + this.cause.path + ']' : '') + } + Error.call(this) + if (Error.captureStackTrace) + Error.captureStackTrace(this, err) + } + err.prototype = !!proto ? new proto() : new CustomError() + return err +} + +module.exports = function (errno) { + var ce = function (type, proto) { + return createError(errno, type, proto) + } + return { + CustomError : CustomError + , FilesystemError : ce('FilesystemError') + , createError : ce + } +} + +},{"prr":1023}],567:[function(require,module,exports){ +var all = module.exports.all = [ + { + errno: -2, + code: 'ENOENT', + description: 'no such file or directory' + }, + { + errno: -1, + code: 'UNKNOWN', + description: 'unknown error' + }, + { + errno: 0, + code: 'OK', + description: 'success' + }, + { + errno: 1, + code: 'EOF', + description: 'end of file' + }, + { + errno: 2, + code: 'EADDRINFO', + description: 'getaddrinfo error' + }, + { + errno: 3, + code: 'EACCES', + description: 'permission denied' + }, + { + errno: 4, + code: 'EAGAIN', + description: 'resource temporarily unavailable' + }, + { + errno: 5, + code: 'EADDRINUSE', + description: 'address already in use' + }, + { + errno: 6, + code: 'EADDRNOTAVAIL', + description: 'address not available' + }, + { + errno: 7, + code: 'EAFNOSUPPORT', + description: 'address family not supported' + }, + { + errno: 8, + code: 'EALREADY', + description: 'connection already in progress' + }, + { + errno: 9, + code: 'EBADF', + description: 'bad file descriptor' + }, + { + errno: 10, + code: 'EBUSY', + description: 'resource busy or locked' + }, + { + errno: 11, + code: 'ECONNABORTED', + description: 'software caused connection abort' + }, + { + errno: 12, + code: 'ECONNREFUSED', + description: 'connection refused' + }, + { + errno: 13, + code: 'ECONNRESET', + description: 'connection reset by peer' + }, + { + errno: 14, + code: 'EDESTADDRREQ', + description: 'destination address required' + }, + { + errno: 15, + code: 'EFAULT', + description: 'bad address in system call argument' + }, + { + errno: 16, + code: 'EHOSTUNREACH', + description: 'host is unreachable' + }, + { + errno: 17, + code: 'EINTR', + description: 'interrupted system call' + }, + { + errno: 18, + code: 'EINVAL', + description: 'invalid argument' + }, + { + errno: 19, + code: 'EISCONN', + description: 'socket is already connected' + }, + { + errno: 20, + code: 'EMFILE', + description: 'too many open files' + }, + { + errno: 21, + code: 'EMSGSIZE', + description: 'message too long' + }, + { + errno: 22, + code: 'ENETDOWN', + description: 'network is down' + }, + { + errno: 23, + code: 'ENETUNREACH', + description: 'network is unreachable' + }, + { + errno: 24, + code: 'ENFILE', + description: 'file table overflow' + }, + { + errno: 25, + code: 'ENOBUFS', + description: 'no buffer space available' + }, + { + errno: 26, + code: 'ENOMEM', + description: 'not enough memory' + }, + { + errno: 27, + code: 'ENOTDIR', + description: 'not a directory' + }, + { + errno: 28, + code: 'EISDIR', + description: 'illegal operation on a directory' + }, + { + errno: 29, + code: 'ENONET', + description: 'machine is not on the network' + }, + { + errno: 31, + code: 'ENOTCONN', + description: 'socket is not connected' + }, + { + errno: 32, + code: 'ENOTSOCK', + description: 'socket operation on non-socket' + }, + { + errno: 33, + code: 'ENOTSUP', + description: 'operation not supported on socket' + }, + { + errno: 34, + code: 'ENOENT', + description: 'no such file or directory' + }, + { + errno: 35, + code: 'ENOSYS', + description: 'function not implemented' + }, + { + errno: 36, + code: 'EPIPE', + description: 'broken pipe' + }, + { + errno: 37, + code: 'EPROTO', + description: 'protocol error' + }, + { + errno: 38, + code: 'EPROTONOSUPPORT', + description: 'protocol not supported' + }, + { + errno: 39, + code: 'EPROTOTYPE', + description: 'protocol wrong type for socket' + }, + { + errno: 40, + code: 'ETIMEDOUT', + description: 'connection timed out' + }, + { + errno: 41, + code: 'ECHARSET', + description: 'invalid Unicode character' + }, + { + errno: 42, + code: 'EAIFAMNOSUPPORT', + description: 'address family for hostname not supported' + }, + { + errno: 44, + code: 'EAISERVICE', + description: 'servname not supported for ai_socktype' + }, + { + errno: 45, + code: 'EAISOCKTYPE', + description: 'ai_socktype not supported' + }, + { + errno: 46, + code: 'ESHUTDOWN', + description: 'cannot send after transport endpoint shutdown' + }, + { + errno: 47, + code: 'EEXIST', + description: 'file already exists' + }, + { + errno: 48, + code: 'ESRCH', + description: 'no such process' + }, + { + errno: 49, + code: 'ENAMETOOLONG', + description: 'name too long' + }, + { + errno: 50, + code: 'EPERM', + description: 'operation not permitted' + }, + { + errno: 51, + code: 'ELOOP', + description: 'too many symbolic links encountered' + }, + { + errno: 52, + code: 'EXDEV', + description: 'cross-device link not permitted' + }, + { + errno: 53, + code: 'ENOTEMPTY', + description: 'directory not empty' + }, + { + errno: 54, + code: 'ENOSPC', + description: 'no space left on device' + }, + { + errno: 55, + code: 'EIO', + description: 'i/o error' + }, + { + errno: 56, + code: 'EROFS', + description: 'read-only file system' + }, + { + errno: 57, + code: 'ENODEV', + description: 'no such device' + }, + { + errno: 58, + code: 'ESPIPE', + description: 'invalid seek' + }, + { + errno: 59, + code: 'ECANCELED', + description: 'operation canceled' + } +] + +module.exports.errno = {} +module.exports.code = {} + +all.forEach(function (error) { + module.exports.errno[error.errno] = error + module.exports.code[error.code] = error +}) + +module.exports.custom = require('./custom')(module.exports) +module.exports.create = module.exports.custom.createError + +},{"./custom":566}],568:[function(require,module,exports){ +'use strict'; + +var util = require('util'); +var isArrayish = require('is-arrayish'); + +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + + message = message instanceof Error + ? message.message + : (message || this.message); + + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + + this.name = name; + + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function () { + var newMessage = message.split(/\r?\n/g); + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + + return newMessage.join('\n'); + }, + set: function (v) { + message = v; + } + }); + + var overwrittenStack = null; + + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.set = function (newstack) { + overwrittenStack = newstack; + }; + + stackDescriptor.get = function () { + var stack = (overwrittenStack || ((stackGetter) + ? stackGetter.call(this) + : stackValue)).split(/\r?\n+/g); + + // starting in Node 7, the stack builder caches the message. + // just replace it. + if (!overwrittenStack) { + stack[0] = this.name + ': ' + this.message; + } + + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('line' in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } + + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } + + return stack.join('\n'); + }; + + Object.defineProperty(this, 'stack', stackDescriptor); + }; + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + + return errorExError; +}; + +errorEx.append = function (str, def) { + return { + message: function (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +module.exports = errorEx; + +},{"is-arrayish":838,"util":1439}],569:[function(require,module,exports){ +'use strict'; + +/* globals + Set, + Map, + WeakSet, + WeakMap, + + Promise, + + Symbol, + Proxy, + + Atomics, + SharedArrayBuffer, + + ArrayBuffer, + DataView, + Uint8Array, + Float32Array, + Float64Array, + Int8Array, + Int16Array, + Int32Array, + Uint8ClampedArray, + Uint16Array, + Uint32Array, +*/ + +var undefined; // eslint-disable-line no-shadow-restricted-names + +var ThrowTypeError = Object.getOwnPropertyDescriptor + ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }()) + : function () { throw new TypeError(); }; + +var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var generator; // = function * () {}; +var generatorFunction = generator ? getProto(generator) : undefined; +var asyncFn; // async function() {}; +var asyncFunction = asyncFn ? asyncFn.constructor : undefined; +var asyncGen; // async function * () {}; +var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined; +var asyncGenIterator = asyncGen ? asyncGen() : undefined; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '$ %Array%': Array, + '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, + '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '$ %ArrayPrototype%': Array.prototype, + '$ %ArrayProto_entries%': Array.prototype.entries, + '$ %ArrayProto_forEach%': Array.prototype.forEach, + '$ %ArrayProto_keys%': Array.prototype.keys, + '$ %ArrayProto_values%': Array.prototype.values, + '$ %AsyncFromSyncIteratorPrototype%': undefined, + '$ %AsyncFunction%': asyncFunction, + '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, + '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined, + '$ %AsyncGeneratorFunction%': asyncGenFunction, + '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined, + '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined, + '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '$ %Boolean%': Boolean, + '$ %BooleanPrototype%': Boolean.prototype, + '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, + '$ %Date%': Date, + '$ %DatePrototype%': Date.prototype, + '$ %decodeURI%': decodeURI, + '$ %decodeURIComponent%': decodeURIComponent, + '$ %encodeURI%': encodeURI, + '$ %encodeURIComponent%': encodeURIComponent, + '$ %Error%': Error, + '$ %ErrorPrototype%': Error.prototype, + '$ %eval%': eval, // eslint-disable-line no-eval + '$ %EvalError%': EvalError, + '$ %EvalErrorPrototype%': EvalError.prototype, + '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, + '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, + '$ %Function%': Function, + '$ %FunctionPrototype%': Function.prototype, + '$ %Generator%': generator ? getProto(generator()) : undefined, + '$ %GeneratorFunction%': generatorFunction, + '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined, + '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, + '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, + '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, + '$ %isFinite%': isFinite, + '$ %isNaN%': isNaN, + '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '$ %JSON%': JSON, + '$ %JSONParse%': JSON.parse, + '$ %Map%': typeof Map === 'undefined' ? undefined : Map, + '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, + '$ %Math%': Math, + '$ %Number%': Number, + '$ %NumberPrototype%': Number.prototype, + '$ %Object%': Object, + '$ %ObjectPrototype%': Object.prototype, + '$ %ObjProto_toString%': Object.prototype.toString, + '$ %ObjProto_valueOf%': Object.prototype.valueOf, + '$ %parseFloat%': parseFloat, + '$ %parseInt%': parseInt, + '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, + '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, + '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, + '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, + '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, + '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '$ %RangeError%': RangeError, + '$ %RangeErrorPrototype%': RangeError.prototype, + '$ %ReferenceError%': ReferenceError, + '$ %ReferenceErrorPrototype%': ReferenceError.prototype, + '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '$ %RegExp%': RegExp, + '$ %RegExpPrototype%': RegExp.prototype, + '$ %Set%': typeof Set === 'undefined' ? undefined : Set, + '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, + '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, + '$ %String%': String, + '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '$ %StringPrototype%': String.prototype, + '$ %Symbol%': hasSymbols ? Symbol : undefined, + '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, + '$ %SyntaxError%': SyntaxError, + '$ %SyntaxErrorPrototype%': SyntaxError.prototype, + '$ %ThrowTypeError%': ThrowTypeError, + '$ %TypedArray%': TypedArray, + '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, + '$ %TypeError%': TypeError, + '$ %TypeErrorPrototype%': TypeError.prototype, + '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, + '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, + '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, + '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, + '$ %URIError%': URIError, + '$ %URIErrorPrototype%': URIError.prototype, + '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, + '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new TypeError('"allowMissing" argument must be a boolean'); + } + + var key = '$ ' + name; + if (!(key in INTRINSICS)) { + throw new SyntaxError('intrinsic ' + name + ' does not exist!'); + } + + // istanbul ignore if // hopefully this is impossible to test :-) + if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) { + throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + return INTRINSICS[key]; +}; + +},{}],570:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('./GetIntrinsic'); + +var $Object = GetIntrinsic('%Object%'); +var $TypeError = GetIntrinsic('%TypeError%'); +var $String = GetIntrinsic('%String%'); + +var assertRecord = require('./helpers/assertRecord'); +var $isNaN = require('./helpers/isNaN'); +var $isFinite = require('./helpers/isFinite'); + +var sign = require('./helpers/sign'); +var mod = require('./helpers/mod'); + +var IsCallable = require('is-callable'); +var toPrimitive = require('es-to-primitive/es5'); + +var has = require('has'); + +// https://es5.github.io/#x9 +var ES5 = { + ToPrimitive: toPrimitive, + + ToBoolean: function ToBoolean(value) { + return !!value; + }, + ToNumber: function ToNumber(value) { + return +value; // eslint-disable-line no-implicit-coercion + }, + ToInteger: function ToInteger(value) { + var number = this.ToNumber(value); + if ($isNaN(number)) { return 0; } + if (number === 0 || !$isFinite(number)) { return number; } + return sign(number) * Math.floor(Math.abs(number)); + }, + ToInt32: function ToInt32(x) { + return this.ToNumber(x) >> 0; + }, + ToUint32: function ToUint32(x) { + return this.ToNumber(x) >>> 0; + }, + ToUint16: function ToUint16(value) { + var number = this.ToNumber(value); + if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } + var posInt = sign(number) * Math.floor(Math.abs(number)); + return mod(posInt, 0x10000); + }, + ToString: function ToString(value) { + return $String(value); + }, + ToObject: function ToObject(value) { + this.CheckObjectCoercible(value); + return $Object(value); + }, + CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) { + /* jshint eqnull:true */ + if (value == null) { + throw new $TypeError(optMessage || 'Cannot call method on ' + value); + } + return value; + }, + IsCallable: IsCallable, + SameValue: function SameValue(x, y) { + if (x === y) { // 0 === -0, but they are not identical. + if (x === 0) { return 1 / x === 1 / y; } + return true; + } + return $isNaN(x) && $isNaN(y); + }, + + // https://www.ecma-international.org/ecma-262/5.1/#sec-8 + Type: function Type(x) { + if (x === null) { + return 'Null'; + } + if (typeof x === 'undefined') { + return 'Undefined'; + } + if (typeof x === 'function' || typeof x === 'object') { + return 'Object'; + } + if (typeof x === 'number') { + return 'Number'; + } + if (typeof x === 'boolean') { + return 'Boolean'; + } + if (typeof x === 'string') { + return 'String'; + } + }, + + // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type + IsPropertyDescriptor: function IsPropertyDescriptor(Desc) { + if (this.Type(Desc) !== 'Object') { + return false; + } + var allowed = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true + }; + + for (var key in Desc) { // eslint-disable-line + if (has(Desc, key) && !allowed[key]) { + return false; + } + } + + var isData = has(Desc, '[[Value]]'); + var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1 + IsAccessorDescriptor: function IsAccessorDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(this, 'Property Descriptor', 'Desc', Desc); + + if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { + return false; + } + + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2 + IsDataDescriptor: function IsDataDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(this, 'Property Descriptor', 'Desc', Desc); + + if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { + return false; + } + + return true; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3 + IsGenericDescriptor: function IsGenericDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return false; + } + + assertRecord(this, 'Property Descriptor', 'Desc', Desc); + + if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) { + return true; + } + + return false; + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4 + FromPropertyDescriptor: function FromPropertyDescriptor(Desc) { + if (typeof Desc === 'undefined') { + return Desc; + } + + assertRecord(this, 'Property Descriptor', 'Desc', Desc); + + if (this.IsDataDescriptor(Desc)) { + return { + value: Desc['[[Value]]'], + writable: !!Desc['[[Writable]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } else if (this.IsAccessorDescriptor(Desc)) { + return { + get: Desc['[[Get]]'], + set: Desc['[[Set]]'], + enumerable: !!Desc['[[Enumerable]]'], + configurable: !!Desc['[[Configurable]]'] + }; + } else { + throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); + } + }, + + // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5 + ToPropertyDescriptor: function ToPropertyDescriptor(Obj) { + if (this.Type(Obj) !== 'Object') { + throw new $TypeError('ToPropertyDescriptor requires an object'); + } + + var desc = {}; + if (has(Obj, 'enumerable')) { + desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable); + } + if (has(Obj, 'configurable')) { + desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable); + } + if (has(Obj, 'value')) { + desc['[[Value]]'] = Obj.value; + } + if (has(Obj, 'writable')) { + desc['[[Writable]]'] = this.ToBoolean(Obj.writable); + } + if (has(Obj, 'get')) { + var getter = Obj.get; + if (typeof getter !== 'undefined' && !this.IsCallable(getter)) { + throw new TypeError('getter must be a function'); + } + desc['[[Get]]'] = getter; + } + if (has(Obj, 'set')) { + var setter = Obj.set; + if (typeof setter !== 'undefined' && !this.IsCallable(setter)) { + throw new $TypeError('setter must be a function'); + } + desc['[[Set]]'] = setter; + } + + if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { + throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); + } + return desc; + } +}; + +module.exports = ES5; + +},{"./GetIntrinsic":569,"./helpers/assertRecord":571,"./helpers/isFinite":572,"./helpers/isNaN":573,"./helpers/mod":574,"./helpers/sign":575,"es-to-primitive/es5":576,"has":801,"is-callable":840}],571:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('../GetIntrinsic'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var has = require('has'); + +var predicates = { + // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type + 'Property Descriptor': function isPropertyDescriptor(ES, Desc) { + if (ES.Type(Desc) !== 'Object') { + return false; + } + var allowed = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true + }; + + for (var key in Desc) { // eslint-disable-line + if (has(Desc, key) && !allowed[key]) { + return false; + } + } + + var isData = has(Desc, '[[Value]]'); + var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; + } +}; + +module.exports = function assertRecord(ES, recordType, argumentName, value) { + var predicate = predicates[recordType]; + if (typeof predicate !== 'function') { + throw new $SyntaxError('unknown record type: ' + recordType); + } + if (!predicate(ES, value)) { + throw new $TypeError(argumentName + ' must be a ' + recordType); + } + console.log(predicate(ES, value), value); +}; + +},{"../GetIntrinsic":569,"has":801}],572:[function(require,module,exports){ +var $isNaN = Number.isNaN || function (a) { return a !== a; }; + +module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; + +},{}],573:[function(require,module,exports){ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + +},{}],574:[function(require,module,exports){ +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return Math.floor(remain >= 0 ? remain : remain + modulo); +}; + +},{}],575:[function(require,module,exports){ +module.exports = function sign(number) { + return number >= 0 ? 1 : -1; +}; + +},{}],576:[function(require,module,exports){ +'use strict'; + +var toStr = Object.prototype.toString; + +var isPrimitive = require('./helpers/isPrimitive'); + +var isCallable = require('is-callable'); + +// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8 +var ES5internalSlots = { + '[[DefaultValue]]': function (O) { + var actualHint; + if (arguments.length > 1) { + actualHint = arguments[1]; + } else { + actualHint = toStr.call(O) === '[object Date]' ? String : Number; + } + + if (actualHint === String || actualHint === Number) { + var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString']; + var value, i; + for (i = 0; i < methods.length; ++i) { + if (isCallable(O[methods[i]])) { + value = O[methods[i]](); + if (isPrimitive(value)) { + return value; + } + } + } + throw new TypeError('No default value'); + } + throw new TypeError('invalid [[DefaultValue]] hint supplied'); + } +}; + +// http://ecma-international.org/ecma-262/5.1/#sec-9.1 +module.exports = function ToPrimitive(input) { + if (isPrimitive(input)) { + return input; + } + if (arguments.length > 1) { + return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]); + } + return ES5internalSlots['[[DefaultValue]]'](input); +}; + +},{"./helpers/isPrimitive":577,"is-callable":840}],577:[function(require,module,exports){ +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + +},{}],578:[function(require,module,exports){ +'use strict'; + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +},{}],579:[function(require,module,exports){ +(function (Buffer){ +var sha3 = require('js-sha3').keccak_256 +var uts46 = require('idna-uts46-hx') + +function namehash (inputName) { + // Reject empty names: + var node = '' + for (var i = 0; i < 32; i++) { + node += '00' + } + + name = normalize(inputName) + + if (name) { + var labels = name.split('.') + + for(var i = labels.length - 1; i >= 0; i--) { + var labelSha = sha3(labels[i]) + node = sha3(new Buffer(node + labelSha, 'hex')) + } + } + + return '0x' + node +} + +function normalize(name) { + return name ? uts46.toUnicode(name, {useStd3ASCII: true, transitional: false}) : name +} + +exports.hash = namehash +exports.normalize = normalize + +}).call(this,require("buffer").Buffer) +},{"buffer":113,"idna-uts46-hx":826,"js-sha3":580}],580:[function(require,module,exports){ +(function (process,global){ +/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.5.7 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2016 + * @license MIT + */ +/*jslint bitwise: true */ +(function () { + 'use strict'; + + var root = typeof window === 'object' ? window : {}; + var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; + if (NODE_JS) { + root = global; + } + var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports; + var HEX_CHARS = '0123456789abcdef'.split(''); + var SHAKE_PADDING = [31, 7936, 2031616, 520093696]; + var KECCAK_PADDING = [1, 256, 65536, 16777216]; + var PADDING = [6, 1536, 393216, 100663296]; + var SHIFT = [0, 8, 16, 24]; + var RC = [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]; + var BITS = [224, 256, 384, 512]; + var SHAKE_BITS = [128, 256]; + var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array']; + + var createOutputMethod = function (bits, padding, outputType) { + return function (message) { + return new Keccak(bits, padding, bits).update(message)[outputType](); + }; + }; + + var createShakeOutputMethod = function (bits, padding, outputType) { + return function (message, outputBits) { + return new Keccak(bits, padding, outputBits).update(message)[outputType](); + }; + }; + + var createMethod = function (bits, padding) { + var method = createOutputMethod(bits, padding, 'hex'); + method.create = function () { + return new Keccak(bits, padding, bits); + }; + method.update = function (message) { + return method.create().update(message); + }; + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createOutputMethod(bits, padding, type); + } + return method; + }; + + var createShakeMethod = function (bits, padding) { + var method = createShakeOutputMethod(bits, padding, 'hex'); + method.create = function (outputBits) { + return new Keccak(bits, padding, outputBits); + }; + method.update = function (message, outputBits) { + return method.create(outputBits).update(message); + }; + for (var i = 0; i < OUTPUT_TYPES.length; ++i) { + var type = OUTPUT_TYPES[i]; + method[type] = createShakeOutputMethod(bits, padding, type); + } + return method; + }; + + var algorithms = [ + {name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod}, + {name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod}, + {name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod} + ]; + + var methods = {}, methodNames = []; + + for (var i = 0; i < algorithms.length; ++i) { + var algorithm = algorithms[i]; + var bits = algorithm.bits; + for (var j = 0; j < bits.length; ++j) { + var methodName = algorithm.name +'_' + bits[j]; + methodNames.push(methodName); + methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding); + } + } + + function Keccak(bits, padding, outputBits) { + this.blocks = []; + this.s = []; + this.padding = padding; + this.outputBits = outputBits; + this.reset = true; + this.block = 0; + this.start = 0; + this.blockCount = (1600 - (bits << 1)) >> 5; + this.byteCount = this.blockCount << 2; + this.outputBlocks = outputBits >> 5; + this.extraBytes = (outputBits & 31) >> 3; + + for (var i = 0; i < 50; ++i) { + this.s[i] = 0; + } + } + + Keccak.prototype.update = function (message) { + var notString = typeof message !== 'string'; + if (notString && message.constructor === ArrayBuffer) { + message = new Uint8Array(message); + } + var length = message.length, blocks = this.blocks, byteCount = this.byteCount, + blockCount = this.blockCount, index = 0, s = this.s, i, code; + + while (index < length) { + if (this.reset) { + this.reset = false; + blocks[0] = this.block; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + if (notString) { + for (i = this.start; index < length && i < byteCount; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = this.start; index < length && i < byteCount; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); + blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; + } + } + } + this.lastByteIndex = i; + if (i >= byteCount) { + this.start = i - byteCount; + this.block = blocks[blockCount]; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + this.reset = true; + } else { + this.start = i; + } + } + return this; + }; + + Keccak.prototype.finalize = function () { + var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s; + blocks[i >> 2] |= this.padding[i & 3]; + if (this.lastByteIndex === this.byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + }; + + Keccak.prototype.toString = Keccak.prototype.hex = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var hex = '', block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + block = s[i]; + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] + + HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] + + HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] + + HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F]; + } + if (j % blockCount === 0) { + f(s); + i = 0; + } + } + if (extraBytes) { + block = s[i]; + if (extraBytes > 0) { + hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F]; + } + if (extraBytes > 1) { + hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F]; + } + if (extraBytes > 2) { + hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F]; + } + } + return hex; + }; + + Keccak.prototype.arrayBuffer = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var bytes = this.outputBits >> 3; + var buffer; + if (extraBytes) { + buffer = new ArrayBuffer((outputBlocks + 1) << 2); + } else { + buffer = new ArrayBuffer(bytes); + } + var array = new Uint32Array(buffer); + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + array[j] = s[i]; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + array[i] = s[i]; + buffer = buffer.slice(0, bytes); + } + return buffer; + }; + + Keccak.prototype.buffer = Keccak.prototype.arrayBuffer; + + Keccak.prototype.digest = Keccak.prototype.array = function () { + this.finalize(); + + var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks, + extraBytes = this.extraBytes, i = 0, j = 0; + var array = [], offset, block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + offset = j << 2; + block = s[i]; + array[offset] = block & 0xFF; + array[offset + 1] = (block >> 8) & 0xFF; + array[offset + 2] = (block >> 16) & 0xFF; + array[offset + 3] = (block >> 24) & 0xFF; + } + if (j % blockCount === 0) { + f(s); + } + } + if (extraBytes) { + offset = j << 2; + block = s[i]; + if (extraBytes > 0) { + array[offset] = block & 0xFF; + } + if (extraBytes > 1) { + array[offset + 1] = (block >> 8) & 0xFF; + } + if (extraBytes > 2) { + array[offset + 2] = (block >> 16) & 0xFF; + } + } + return array; + }; + + var f = function (s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, + b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, + b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, + b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + for (n = 0; n < 48; n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; + + h = c8 ^ ((c2 << 1) | (c3 >>> 31)); + l = c9 ^ ((c3 << 1) | (c2 >>> 31)); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ ((c4 << 1) | (c5 >>> 31)); + l = c1 ^ ((c5 << 1) | (c4 >>> 31)); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ ((c6 << 1) | (c7 >>> 31)); + l = c3 ^ ((c7 << 1) | (c6 >>> 31)); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ ((c8 << 1) | (c9 >>> 31)); + l = c5 ^ ((c9 << 1) | (c8 >>> 31)); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ ((c0 << 1) | (c1 >>> 31)); + l = c7 ^ ((c1 << 1) | (c0 >>> 31)); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + + b0 = s[0]; + b1 = s[1]; + b32 = (s[11] << 4) | (s[10] >>> 28); + b33 = (s[10] << 4) | (s[11] >>> 28); + b14 = (s[20] << 3) | (s[21] >>> 29); + b15 = (s[21] << 3) | (s[20] >>> 29); + b46 = (s[31] << 9) | (s[30] >>> 23); + b47 = (s[30] << 9) | (s[31] >>> 23); + b28 = (s[40] << 18) | (s[41] >>> 14); + b29 = (s[41] << 18) | (s[40] >>> 14); + b20 = (s[2] << 1) | (s[3] >>> 31); + b21 = (s[3] << 1) | (s[2] >>> 31); + b2 = (s[13] << 12) | (s[12] >>> 20); + b3 = (s[12] << 12) | (s[13] >>> 20); + b34 = (s[22] << 10) | (s[23] >>> 22); + b35 = (s[23] << 10) | (s[22] >>> 22); + b16 = (s[33] << 13) | (s[32] >>> 19); + b17 = (s[32] << 13) | (s[33] >>> 19); + b48 = (s[42] << 2) | (s[43] >>> 30); + b49 = (s[43] << 2) | (s[42] >>> 30); + b40 = (s[5] << 30) | (s[4] >>> 2); + b41 = (s[4] << 30) | (s[5] >>> 2); + b22 = (s[14] << 6) | (s[15] >>> 26); + b23 = (s[15] << 6) | (s[14] >>> 26); + b4 = (s[25] << 11) | (s[24] >>> 21); + b5 = (s[24] << 11) | (s[25] >>> 21); + b36 = (s[34] << 15) | (s[35] >>> 17); + b37 = (s[35] << 15) | (s[34] >>> 17); + b18 = (s[45] << 29) | (s[44] >>> 3); + b19 = (s[44] << 29) | (s[45] >>> 3); + b10 = (s[6] << 28) | (s[7] >>> 4); + b11 = (s[7] << 28) | (s[6] >>> 4); + b42 = (s[17] << 23) | (s[16] >>> 9); + b43 = (s[16] << 23) | (s[17] >>> 9); + b24 = (s[26] << 25) | (s[27] >>> 7); + b25 = (s[27] << 25) | (s[26] >>> 7); + b6 = (s[36] << 21) | (s[37] >>> 11); + b7 = (s[37] << 21) | (s[36] >>> 11); + b38 = (s[47] << 24) | (s[46] >>> 8); + b39 = (s[46] << 24) | (s[47] >>> 8); + b30 = (s[8] << 27) | (s[9] >>> 5); + b31 = (s[9] << 27) | (s[8] >>> 5); + b12 = (s[18] << 20) | (s[19] >>> 12); + b13 = (s[19] << 20) | (s[18] >>> 12); + b44 = (s[29] << 7) | (s[28] >>> 25); + b45 = (s[28] << 7) | (s[29] >>> 25); + b26 = (s[38] << 8) | (s[39] >>> 24); + b27 = (s[39] << 8) | (s[38] >>> 24); + b8 = (s[48] << 14) | (s[49] >>> 18); + b9 = (s[49] << 14) | (s[48] >>> 18); + + s[0] = b0 ^ (~b2 & b4); + s[1] = b1 ^ (~b3 & b5); + s[10] = b10 ^ (~b12 & b14); + s[11] = b11 ^ (~b13 & b15); + s[20] = b20 ^ (~b22 & b24); + s[21] = b21 ^ (~b23 & b25); + s[30] = b30 ^ (~b32 & b34); + s[31] = b31 ^ (~b33 & b35); + s[40] = b40 ^ (~b42 & b44); + s[41] = b41 ^ (~b43 & b45); + s[2] = b2 ^ (~b4 & b6); + s[3] = b3 ^ (~b5 & b7); + s[12] = b12 ^ (~b14 & b16); + s[13] = b13 ^ (~b15 & b17); + s[22] = b22 ^ (~b24 & b26); + s[23] = b23 ^ (~b25 & b27); + s[32] = b32 ^ (~b34 & b36); + s[33] = b33 ^ (~b35 & b37); + s[42] = b42 ^ (~b44 & b46); + s[43] = b43 ^ (~b45 & b47); + s[4] = b4 ^ (~b6 & b8); + s[5] = b5 ^ (~b7 & b9); + s[14] = b14 ^ (~b16 & b18); + s[15] = b15 ^ (~b17 & b19); + s[24] = b24 ^ (~b26 & b28); + s[25] = b25 ^ (~b27 & b29); + s[34] = b34 ^ (~b36 & b38); + s[35] = b35 ^ (~b37 & b39); + s[44] = b44 ^ (~b46 & b48); + s[45] = b45 ^ (~b47 & b49); + s[6] = b6 ^ (~b8 & b0); + s[7] = b7 ^ (~b9 & b1); + s[16] = b16 ^ (~b18 & b10); + s[17] = b17 ^ (~b19 & b11); + s[26] = b26 ^ (~b28 & b20); + s[27] = b27 ^ (~b29 & b21); + s[36] = b36 ^ (~b38 & b30); + s[37] = b37 ^ (~b39 & b31); + s[46] = b46 ^ (~b48 & b40); + s[47] = b47 ^ (~b49 & b41); + s[8] = b8 ^ (~b0 & b2); + s[9] = b9 ^ (~b1 & b3); + s[18] = b18 ^ (~b10 & b12); + s[19] = b19 ^ (~b11 & b13); + s[28] = b28 ^ (~b20 & b22); + s[29] = b29 ^ (~b21 & b23); + s[38] = b38 ^ (~b30 & b32); + s[39] = b39 ^ (~b31 & b33); + s[48] = b48 ^ (~b40 & b42); + s[49] = b49 ^ (~b41 & b43); + + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } + }; + + if (COMMON_JS) { + module.exports = methods; + } else { + for (var i = 0; i < methodNames.length; ++i) { + root[methodNames[i]] = methods[methodNames[i]]; + } + } +})(); + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"_process":109}],581:[function(require,module,exports){ +var generate = function generate(num, fn) { + var a = []; + for (var i = 0; i < num; ++i) { + a.push(fn(i)); + }return a; +}; + +var replicate = function replicate(num, val) { + return generate(num, function () { + return val; + }); +}; + +var concat = function concat(a, b) { + return a.concat(b); +}; + +var flatten = function flatten(a) { + var r = []; + for (var j = 0, J = a.length; j < J; ++j) { + for (var i = 0, I = a[j].length; i < I; ++i) { + r.push(a[j][i]); + } + }return r; +}; + +var chunksOf = function chunksOf(n, a) { + var b = []; + for (var i = 0, l = a.length; i < l; i += n) { + b.push(a.slice(i, i + n)); + }return b; +}; + +module.exports = { + generate: generate, + replicate: replicate, + concat: concat, + flatten: flatten, + chunksOf: chunksOf +}; +},{}],582:[function(require,module,exports){ +var A = require("./array.js"); + +var at = function at(bytes, index) { + return parseInt(bytes.slice(index * 2 + 2, index * 2 + 4), 16); +}; + +var random = function random(bytes) { + var rnd = void 0; + if (typeof window !== "undefined" && window.crypto && window.crypto.getRandomValues) rnd = window.crypto.getRandomValues(new Uint8Array(bytes));else if (typeof require !== "undefined") rnd = require("c" + "rypto").randomBytes(bytes);else throw "Safe random numbers not available."; + var hex = "0x"; + for (var i = 0; i < bytes; ++i) { + hex += ("00" + rnd[i].toString(16)).slice(-2); + }return hex; +}; + +var length = function length(a) { + return (a.length - 2) / 2; +}; + +var flatten = function flatten(a) { + return "0x" + a.reduce(function (r, s) { + return r + s.slice(2); + }, ""); +}; + +var slice = function slice(i, j, bs) { + return "0x" + bs.slice(i * 2 + 2, j * 2 + 2); +}; + +var reverse = function reverse(hex) { + var rev = "0x"; + for (var i = 0, l = length(hex); i < l; ++i) { + rev += hex.slice((l - i) * 2, (l - i + 1) * 2); + } + return rev; +}; + +var pad = function pad(l, hex) { + return hex.length === l * 2 + 2 ? hex : pad(l, "0x" + "0" + hex.slice(2)); +}; + +var padRight = function padRight(l, hex) { + return hex.length === l * 2 + 2 ? hex : padRight(l, hex + "0"); +}; + +var toArray = function toArray(hex) { + var arr = []; + for (var i = 2, l = hex.length; i < l; i += 2) { + arr.push(parseInt(hex.slice(i, i + 2), 16)); + }return arr; +}; + +var fromArray = function fromArray(arr) { + var hex = "0x"; + for (var i = 0, l = arr.length; i < l; ++i) { + var b = arr[i]; + hex += (b < 16 ? "0" : "") + b.toString(16); + } + return hex; +}; + +var toUint8Array = function toUint8Array(hex) { + return new Uint8Array(toArray(hex)); +}; + +var fromUint8Array = function fromUint8Array(arr) { + return fromArray([].slice.call(arr, 0)); +}; + +var fromNumber = function fromNumber(num) { + var hex = num.toString(16); + return hex.length % 2 === 0 ? "0x" + hex : "0x0" + hex; +}; + +var toNumber = function toNumber(hex) { + return parseInt(hex.slice(2), 16); +}; + +var concat = function concat(a, b) { + return a.concat(b.slice(2)); +}; + +var fromNat = function fromNat(bn) { + return bn === "0x0" ? "0x" : bn.length % 2 === 0 ? bn : "0x0" + bn.slice(2); +}; + +var toNat = function toNat(bn) { + return bn[2] === "0" ? "0x" + bn.slice(3) : bn; +}; + +var fromAscii = function fromAscii(ascii) { + var hex = "0x"; + for (var i = 0; i < ascii.length; ++i) { + hex += ("00" + ascii.charCodeAt(i).toString(16)).slice(-2); + }return hex; +}; + +var toAscii = function toAscii(hex) { + var ascii = ""; + for (var i = 2; i < hex.length; i += 2) { + ascii += String.fromCharCode(parseInt(hex.slice(i, i + 2), 16)); + }return ascii; +}; + +// From https://gist.github.com/pascaldekloe/62546103a1576803dade9269ccf76330 +var fromString = function fromString(s) { + var makeByte = function makeByte(uint8) { + var b = uint8.toString(16); + return b.length < 2 ? "0" + b : b; + }; + var bytes = "0x"; + for (var ci = 0; ci != s.length; ci++) { + var c = s.charCodeAt(ci); + if (c < 128) { + bytes += makeByte(c); + continue; + } + if (c < 2048) { + bytes += makeByte(c >> 6 | 192); + } else { + if (c > 0xd7ff && c < 0xdc00) { + if (++ci == s.length) return null; + var c2 = s.charCodeAt(ci); + if (c2 < 0xdc00 || c2 > 0xdfff) return null; + c = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff); + bytes += makeByte(c >> 18 | 240); + bytes += makeByte(c >> 12 & 63 | 128); + } else { + // c <= 0xffff + bytes += makeByte(c >> 12 | 224); + } + bytes += makeByte(c >> 6 & 63 | 128); + } + bytes += makeByte(c & 63 | 128); + } + return bytes; +}; + +var toString = function toString(bytes) { + var s = ''; + var i = 0; + var l = length(bytes); + while (i < l) { + var c = at(bytes, i++); + if (c > 127) { + if (c > 191 && c < 224) { + if (i >= l) return null; + c = (c & 31) << 6 | at(bytes, i) & 63; + } else if (c > 223 && c < 240) { + if (i + 1 >= l) return null; + c = (c & 15) << 12 | (at(bytes, i) & 63) << 6 | at(bytes, ++i) & 63; + } else if (c > 239 && c < 248) { + if (i + 2 >= l) return null; + c = (c & 7) << 18 | (at(bytes, i) & 63) << 12 | (at(bytes, ++i) & 63) << 6 | at(bytes, ++i) & 63; + } else return null; + ++i; + } + if (c <= 0xffff) s += String.fromCharCode(c);else if (c <= 0x10ffff) { + c -= 0x10000; + s += String.fromCharCode(c >> 10 | 0xd800); + s += String.fromCharCode(c & 0x3FF | 0xdc00); + } else return null; + } + return s; +}; + +module.exports = { + random: random, + length: length, + concat: concat, + flatten: flatten, + slice: slice, + reverse: reverse, + pad: pad, + padRight: padRight, + fromAscii: fromAscii, + toAscii: toAscii, + fromString: fromString, + toString: toString, + fromNumber: fromNumber, + toNumber: toNumber, + fromNat: fromNat, + toNat: toNat, + fromArray: fromArray, + toArray: toArray, + fromUint8Array: fromUint8Array, + toUint8Array: toUint8Array +}; +},{"./array.js":581}],583:[function(require,module,exports){ +// This was ported from https://github.com/emn178/js-sha3, with some minor +// modifications and pruning. It is licensed under MIT: +// +// Copyright 2015-2016 Chen, Yi-Cyuan +// +// 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 HEX_CHARS = '0123456789abcdef'.split(''); +var KECCAK_PADDING = [1, 256, 65536, 16777216]; +var SHIFT = [0, 8, 16, 24]; +var RC = [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]; + +var Keccak = function Keccak(bits) { + return { + blocks: [], + reset: true, + block: 0, + start: 0, + blockCount: 1600 - (bits << 1) >> 5, + outputBlocks: bits >> 5, + s: function (s) { + return [].concat(s, s, s, s, s); + }([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + }; +}; + +var update = function update(state, message) { + var length = message.length, + blocks = state.blocks, + byteCount = state.blockCount << 2, + blockCount = state.blockCount, + outputBlocks = state.outputBlocks, + s = state.s, + index = 0, + i, + code; + + // update + while (index < length) { + if (state.reset) { + state.reset = false; + blocks[0] = state.block; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + if (typeof message !== "string") { + for (i = state.start; index < length && i < byteCount; ++index) { + blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; + } + } else { + for (i = state.start; index < length && i < byteCount; ++index) { + code = message.charCodeAt(index); + if (code < 0x80) { + blocks[i >> 2] |= code << SHIFT[i++ & 3]; + } else if (code < 0x800) { + blocks[i >> 2] |= (0xc0 | code >> 6) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3]; + } else if (code < 0xd800 || code >= 0xe000) { + blocks[i >> 2] |= (0xe0 | code >> 12) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3]; + } else { + code = 0x10000 + ((code & 0x3ff) << 10 | message.charCodeAt(++index) & 0x3ff); + blocks[i >> 2] |= (0xf0 | code >> 18) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code >> 12 & 0x3f) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code >> 6 & 0x3f) << SHIFT[i++ & 3]; + blocks[i >> 2] |= (0x80 | code & 0x3f) << SHIFT[i++ & 3]; + } + } + } + state.lastByteIndex = i; + if (i >= byteCount) { + state.start = i - byteCount; + state.block = blocks[blockCount]; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + state.reset = true; + } else { + state.start = i; + } + } + + // finalize + i = state.lastByteIndex; + blocks[i >> 2] |= KECCAK_PADDING[i & 3]; + if (state.lastByteIndex === byteCount) { + blocks[0] = blocks[blockCount]; + for (i = 1; i < blockCount + 1; ++i) { + blocks[i] = 0; + } + } + blocks[blockCount - 1] |= 0x80000000; + for (i = 0; i < blockCount; ++i) { + s[i] ^= blocks[i]; + } + f(s); + + // toString + var hex = '', + i = 0, + j = 0, + block; + while (j < outputBlocks) { + for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) { + block = s[i]; + hex += HEX_CHARS[block >> 4 & 0x0F] + HEX_CHARS[block & 0x0F] + HEX_CHARS[block >> 12 & 0x0F] + HEX_CHARS[block >> 8 & 0x0F] + HEX_CHARS[block >> 20 & 0x0F] + HEX_CHARS[block >> 16 & 0x0F] + HEX_CHARS[block >> 28 & 0x0F] + HEX_CHARS[block >> 24 & 0x0F]; + } + if (j % blockCount === 0) { + f(s); + i = 0; + } + } + return "0x" + hex; +}; + +var f = function f(s) { + var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49; + + for (n = 0; n < 48; n += 2) { + c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40]; + c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41]; + c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42]; + c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43]; + c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44]; + c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45]; + c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46]; + c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47]; + c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48]; + c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49]; + + h = c8 ^ (c2 << 1 | c3 >>> 31); + l = c9 ^ (c3 << 1 | c2 >>> 31); + s[0] ^= h; + s[1] ^= l; + s[10] ^= h; + s[11] ^= l; + s[20] ^= h; + s[21] ^= l; + s[30] ^= h; + s[31] ^= l; + s[40] ^= h; + s[41] ^= l; + h = c0 ^ (c4 << 1 | c5 >>> 31); + l = c1 ^ (c5 << 1 | c4 >>> 31); + s[2] ^= h; + s[3] ^= l; + s[12] ^= h; + s[13] ^= l; + s[22] ^= h; + s[23] ^= l; + s[32] ^= h; + s[33] ^= l; + s[42] ^= h; + s[43] ^= l; + h = c2 ^ (c6 << 1 | c7 >>> 31); + l = c3 ^ (c7 << 1 | c6 >>> 31); + s[4] ^= h; + s[5] ^= l; + s[14] ^= h; + s[15] ^= l; + s[24] ^= h; + s[25] ^= l; + s[34] ^= h; + s[35] ^= l; + s[44] ^= h; + s[45] ^= l; + h = c4 ^ (c8 << 1 | c9 >>> 31); + l = c5 ^ (c9 << 1 | c8 >>> 31); + s[6] ^= h; + s[7] ^= l; + s[16] ^= h; + s[17] ^= l; + s[26] ^= h; + s[27] ^= l; + s[36] ^= h; + s[37] ^= l; + s[46] ^= h; + s[47] ^= l; + h = c6 ^ (c0 << 1 | c1 >>> 31); + l = c7 ^ (c1 << 1 | c0 >>> 31); + s[8] ^= h; + s[9] ^= l; + s[18] ^= h; + s[19] ^= l; + s[28] ^= h; + s[29] ^= l; + s[38] ^= h; + s[39] ^= l; + s[48] ^= h; + s[49] ^= l; + + b0 = s[0]; + b1 = s[1]; + b32 = s[11] << 4 | s[10] >>> 28; + b33 = s[10] << 4 | s[11] >>> 28; + b14 = s[20] << 3 | s[21] >>> 29; + b15 = s[21] << 3 | s[20] >>> 29; + b46 = s[31] << 9 | s[30] >>> 23; + b47 = s[30] << 9 | s[31] >>> 23; + b28 = s[40] << 18 | s[41] >>> 14; + b29 = s[41] << 18 | s[40] >>> 14; + b20 = s[2] << 1 | s[3] >>> 31; + b21 = s[3] << 1 | s[2] >>> 31; + b2 = s[13] << 12 | s[12] >>> 20; + b3 = s[12] << 12 | s[13] >>> 20; + b34 = s[22] << 10 | s[23] >>> 22; + b35 = s[23] << 10 | s[22] >>> 22; + b16 = s[33] << 13 | s[32] >>> 19; + b17 = s[32] << 13 | s[33] >>> 19; + b48 = s[42] << 2 | s[43] >>> 30; + b49 = s[43] << 2 | s[42] >>> 30; + b40 = s[5] << 30 | s[4] >>> 2; + b41 = s[4] << 30 | s[5] >>> 2; + b22 = s[14] << 6 | s[15] >>> 26; + b23 = s[15] << 6 | s[14] >>> 26; + b4 = s[25] << 11 | s[24] >>> 21; + b5 = s[24] << 11 | s[25] >>> 21; + b36 = s[34] << 15 | s[35] >>> 17; + b37 = s[35] << 15 | s[34] >>> 17; + b18 = s[45] << 29 | s[44] >>> 3; + b19 = s[44] << 29 | s[45] >>> 3; + b10 = s[6] << 28 | s[7] >>> 4; + b11 = s[7] << 28 | s[6] >>> 4; + b42 = s[17] << 23 | s[16] >>> 9; + b43 = s[16] << 23 | s[17] >>> 9; + b24 = s[26] << 25 | s[27] >>> 7; + b25 = s[27] << 25 | s[26] >>> 7; + b6 = s[36] << 21 | s[37] >>> 11; + b7 = s[37] << 21 | s[36] >>> 11; + b38 = s[47] << 24 | s[46] >>> 8; + b39 = s[46] << 24 | s[47] >>> 8; + b30 = s[8] << 27 | s[9] >>> 5; + b31 = s[9] << 27 | s[8] >>> 5; + b12 = s[18] << 20 | s[19] >>> 12; + b13 = s[19] << 20 | s[18] >>> 12; + b44 = s[29] << 7 | s[28] >>> 25; + b45 = s[28] << 7 | s[29] >>> 25; + b26 = s[38] << 8 | s[39] >>> 24; + b27 = s[39] << 8 | s[38] >>> 24; + b8 = s[48] << 14 | s[49] >>> 18; + b9 = s[49] << 14 | s[48] >>> 18; + + s[0] = b0 ^ ~b2 & b4; + s[1] = b1 ^ ~b3 & b5; + s[10] = b10 ^ ~b12 & b14; + s[11] = b11 ^ ~b13 & b15; + s[20] = b20 ^ ~b22 & b24; + s[21] = b21 ^ ~b23 & b25; + s[30] = b30 ^ ~b32 & b34; + s[31] = b31 ^ ~b33 & b35; + s[40] = b40 ^ ~b42 & b44; + s[41] = b41 ^ ~b43 & b45; + s[2] = b2 ^ ~b4 & b6; + s[3] = b3 ^ ~b5 & b7; + s[12] = b12 ^ ~b14 & b16; + s[13] = b13 ^ ~b15 & b17; + s[22] = b22 ^ ~b24 & b26; + s[23] = b23 ^ ~b25 & b27; + s[32] = b32 ^ ~b34 & b36; + s[33] = b33 ^ ~b35 & b37; + s[42] = b42 ^ ~b44 & b46; + s[43] = b43 ^ ~b45 & b47; + s[4] = b4 ^ ~b6 & b8; + s[5] = b5 ^ ~b7 & b9; + s[14] = b14 ^ ~b16 & b18; + s[15] = b15 ^ ~b17 & b19; + s[24] = b24 ^ ~b26 & b28; + s[25] = b25 ^ ~b27 & b29; + s[34] = b34 ^ ~b36 & b38; + s[35] = b35 ^ ~b37 & b39; + s[44] = b44 ^ ~b46 & b48; + s[45] = b45 ^ ~b47 & b49; + s[6] = b6 ^ ~b8 & b0; + s[7] = b7 ^ ~b9 & b1; + s[16] = b16 ^ ~b18 & b10; + s[17] = b17 ^ ~b19 & b11; + s[26] = b26 ^ ~b28 & b20; + s[27] = b27 ^ ~b29 & b21; + s[36] = b36 ^ ~b38 & b30; + s[37] = b37 ^ ~b39 & b31; + s[46] = b46 ^ ~b48 & b40; + s[47] = b47 ^ ~b49 & b41; + s[8] = b8 ^ ~b0 & b2; + s[9] = b9 ^ ~b1 & b3; + s[18] = b18 ^ ~b10 & b12; + s[19] = b19 ^ ~b11 & b13; + s[28] = b28 ^ ~b20 & b22; + s[29] = b29 ^ ~b21 & b23; + s[38] = b38 ^ ~b30 & b32; + s[39] = b39 ^ ~b31 & b33; + s[48] = b48 ^ ~b40 & b42; + s[49] = b49 ^ ~b41 & b43; + + s[0] ^= RC[n]; + s[1] ^= RC[n + 1]; + } +}; + +var keccak = function keccak(bits) { + return function (str) { + var msg; + if (str.slice(0, 2) === "0x") { + msg = []; + for (var i = 2, l = str.length; i < l; i += 2) { + msg.push(parseInt(str.slice(i, i + 2), 16)); + } + } else { + msg = str; + } + return update(Keccak(bits, bits), msg); + }; +}; + +module.exports = { + keccak256: keccak(256), + keccak512: keccak(512), + keccak256s: keccak(256), + keccak512s: keccak(512) +}; +},{}],584:[function(require,module,exports){ +module.exports={ + "genesisGasLimit": { + "v": 5000, + "d": "Gas limit of the Genesis block." + }, + "genesisDifficulty": { + "v": 17179869184, + "d": "Difficulty of the Genesis block." + }, + "genesisNonce": { + "v": "0x0000000000000042", + "d": "the geneis nonce" + }, + "genesisExtraData": { + "v": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", + "d": "extra data " + }, + "genesisHash": { + "v": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "d": "genesis hash" + }, + "genesisStateRoot": { + "v": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544", + "d": "the genesis state root" + }, + "minGasLimit": { + "v": 5000, + "d": "Minimum the gas limit may ever be." + }, + "gasLimitBoundDivisor": { + "v": 1024, + "d": "The bound divisor of the gas limit, used in update calculations." + }, + "minimumDifficulty": { + "v": 131072, + "d": "The minimum that the difficulty may ever be." + }, + "difficultyBoundDivisor": { + "v": 2048, + "d": "The bound divisor of the difficulty, used in the update calculations." + }, + "durationLimit": { + "v": 13, + "d": "The decision boundary on the blocktime duration used to determine whether difficulty should go up or not." + }, + "maximumExtraDataSize": { + "v": 32, + "d": "Maximum size extra data may be after Genesis." + }, + "epochDuration": { + "v": 30000, + "d": "Duration between proof-of-work epochs." + }, + "stackLimit": { + "v": 1024, + "d": "Maximum size of VM stack allowed." + }, + "callCreateDepth": { + "v": 1024, + "d": "Maximum depth of call/create stack." + }, + + "tierStepGas": { + "v": [0, 2, 3, 5, 8, 10, 20], + "d": "Once per operation, for a selection of them." + }, + "expGas": { + "v": 10, + "d": "Once per EXP instuction." + }, + "expByteGas": { + "v": 50, + "d": "Times ceil(log256(exponent)) for the EXP instruction." + }, + + "sha3Gas": { + "v": 30, + "d": "Once per SHA3 operation." + }, + "sha3WordGas": { + "v": 6, + "d": "Once per word of the SHA3 operation's data." + }, + "sloadGas": { + "v": 50, + "d": "Once per SLOAD operation." + }, + "sstoreSetGas": { + "v": 20000, + "d": "Once per SSTORE operation if the zeroness changes from zero." + }, + "sstoreResetGas": { + "v": 5000, + "d": "Once per SSTORE operation if the zeroness does not change from zero." + }, + "sstoreRefundGas": { + "v": 15000, + "d": "Once per SSTORE operation if the zeroness changes to zero." + }, + "jumpdestGas": { + "v": 1, + "d": "Refunded gas, once per SSTORE operation if the zeroness changes to zero." + }, + + "logGas": { + "v": 375, + "d": "Per LOG* operation." + }, + "logDataGas": { + "v": 8, + "d": "Per byte in a LOG* operation's data." + }, + "logTopicGas": { + "v": 375, + "d": "Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas." + }, + + "createGas": { + "v": 32000, + "d": "Once per CREATE operation & contract-creation transaction." + }, + + "callGas": { + "v": 40, + "d": "Once per CALL operation & message call transaction." + }, + "callStipend": { + "v": 2300, + "d": "Free gas given at beginning of call." + }, + "callValueTransferGas": { + "v": 9000, + "d": "Paid for CALL when the value transfor is non-zero." + }, + "callNewAccountGas": { + "v": 25000, + "d": "Paid for CALL when the destination address didn't exist prior." + }, + + "suicideRefundGas": { + "v": 24000, + "d": "Refunded following a suicide operation." + }, + + "memoryGas": { + "v": 3, + "d": "Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL." + }, + "quadCoeffDiv": { + "v": 512, + "d": "Divisor for the quadratic particle of the memory cost equation." + }, + + "createDataGas": { + "v": 200, + "d": "" + }, + "txGas": { + "v": 21000, + "d": "Per transaction. NOTE: Not payable on data of calls between transactions." + }, + "txCreation": { + "v": 32000, + "d": "the cost of creating a contract via tx" + }, + "txDataZeroGas": { + "v": 4, + "d": "Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions." + }, + "txDataNonZeroGas": { + "v": 68, + "d": "Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions." + }, + + "copyGas": { + "v": 3, + "d": "Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added." + }, + + "ecrecoverGas": { + "v": 3000, + "d": "" + }, + "sha256Gas": { + "v": 60, + "d": "" + }, + "sha256WordGas": { + "v": 12, + "d": "" + }, + "ripemd160Gas": { + "v": 600, + "d": "" + }, + "ripemd160WordGas": { + "v": 120, + "d": "" + }, + "identityGas": { + "v": 15, + "d": "" + }, + "identityWordGas": { + "v": 3, + "d": "" + }, + "modexpGquaddivisor": { + "v": 20, + "d": "Gquaddivisor from modexp precompile for gas calculation." + }, + "ecAddGas": { + "v": 500, + "d": "Gas costs for curve addition precompile." + }, + "ecMulGas": { + "v": 40000, + "d": "Gas costs for curve multiplication precompile." + }, + "ecPairingGas": { + "v": 100000, + "d": "Base gas costs for curve pairing precompile." + }, + "ecPairingWordGas": { + "v": 80000, + "d": "Gas costs regarding curve pairing precompile input length." + }, + "minerReward": { + "v": "3000000000000000000", + "d": "the amount a miner get rewarded for mining a block" + }, + "homeSteadForkNumber": { + "v": 1150000, + "d": "the block that the Homestead fork started at" + }, + "homesteadRepriceForkNumber": { + "v": 2463000, + "d": "the block that the Homestead Reprice (EIP150) fork started at" + }, + "timebombPeriod": { + "v": 100000, + "d": "Exponential difficulty timebomb period" + }, + "freeBlockPeriod": { + "v": 2 + } +} + +},{}],585:[function(require,module,exports){ +const ethUtil = require('ethereumjs-util') +const rlp = require('rlp') +const Buffer = require('safe-buffer').Buffer + +var Account = module.exports = function (data) { + // Define Properties + var fields = [{ + name: 'nonce', + default: Buffer.alloc(0) + }, { + name: 'balance', + default: Buffer.alloc(0) + }, { + name: 'stateRoot', + length: 32, + default: ethUtil.SHA3_RLP + }, { + name: 'codeHash', + length: 32, + default: ethUtil.SHA3_NULL + }] + + ethUtil.defineProperties(this, fields, data) +} + +Account.prototype.serialize = function () { + return rlp.encode(this.raw) +} + +Account.prototype.isContract = function () { + return this.codeHash.toString('hex') !== ethUtil.SHA3_NULL_S +} + +Account.prototype.getCode = function (state, cb) { + if (!this.isContract()) { + cb(null, Buffer.alloc(0)) + return + } + + state.getRaw(this.codeHash, cb) +} + +Account.prototype.setCode = function (trie, code, cb) { + var self = this + + this.codeHash = ethUtil.sha3(code) + + if (this.codeHash.toString('hex') === ethUtil.SHA3_NULL_S) { + cb(null, Buffer.alloc(0)) + return + } + + trie.putRaw(this.codeHash, code, function (err) { + cb(err, self.codeHash) + }) +} + +Account.prototype.getStorage = function (trie, key, cb) { + var t = trie.copy() + t.root = this.stateRoot + t.get(key, cb) +} + +Account.prototype.setStorage = function (trie, key, val, cb) { + var self = this + var t = trie.copy() + t.root = self.stateRoot + t.put(key, val, function (err) { + if (err) return cb() + self.stateRoot = t.root + cb() + }) +} + +Account.prototype.isEmpty = function () { + return this.balance.toString('hex') === '' && + this.nonce.toString('hex') === '' && + this.stateRoot.toString('hex') === ethUtil.SHA3_RLP_S && + this.codeHash.toString('hex') === ethUtil.SHA3_NULL_S +} + +},{"ethereumjs-util":612,"rlp":1331,"safe-buffer":1334}],586:[function(require,module,exports){ +(function (Buffer){ +const utils = require('ethereumjs-util') +const params = require('ethereum-common/params.json') +const BN = utils.BN + /** + * An object that repersents the block header + * @constructor + * @param {Array} data raw data, deserialized + * @prop {Buffer} parentHash the blocks' parent's hash + * @prop {Buffer} uncleHash sha3(rlp_encode(uncle_list)) + * @prop {Buffer} coinbase the miner address + * @prop {Buffer} stateRoot The root of a Merkle Patricia tree + * @prop {Buffer} transactionTrie the root of a Trie containing the transactions + * @prop {Buffer} receiptTrie the root of a Trie containing the transaction Reciept + * @prop {Buffer} bloom + * @prop {Buffer} difficulty + * @prop {Buffer} number the block's height + * @prop {Buffer} gasLimit + * @prop {Buffer} gasUsed + * @prop {Buffer} timestamp + * @prop {Buffer} extraData + * @prop {Array.} raw an array of buffers containing the raw blocks. + */ +var BlockHeader = module.exports = function (data) { + var fields = [{ + name: 'parentHash', + length: 32, + default: utils.zeros(32) + }, { + name: 'uncleHash', + default: utils.SHA3_RLP_ARRAY + }, { + name: 'coinbase', + length: 20, + default: utils.zeros(20) + }, { + name: 'stateRoot', + length: 32, + default: utils.zeros(32) + }, { + name: 'transactionsTrie', + length: 32, + default: utils.SHA3_RLP + }, { + name: 'receiptTrie', + length: 32, + default: utils.SHA3_RLP + }, { + name: 'bloom', + default: utils.zeros(256) + }, { + name: 'difficulty', + default: new Buffer([]) + }, { + name: 'number', + default: utils.intToBuffer(params.homeSteadForkNumber.v) + }, { + name: 'gasLimit', + default: new Buffer('ffffffffffffff', 'hex') + }, { + name: 'gasUsed', + empty: true, + default: new Buffer([]) + }, { + name: 'timestamp', + default: new Buffer([]) + }, { + name: 'extraData', + allowZero: true, + empty: true, + default: new Buffer([]) + }, { + name: 'mixHash', + default: utils.zeros(32) + // length: 32 + }, { + name: 'nonce', + default: new Buffer([]) // sha3(42) + }] + utils.defineProperties(this, fields, data) +} + +/** + * Returns the canoncical difficulty of the block + * @method canonicalDifficulty + * @param {Block} parentBlock the parent `Block` of the this header + * @return {BN} + */ +BlockHeader.prototype.canonicalDifficulty = function (parentBlock) { + const blockTs = new BN(this.timestamp) + const parentTs = new BN(parentBlock.header.timestamp) + const parentDif = new BN(parentBlock.header.difficulty) + const minimumDifficulty = new BN(params.minimumDifficulty.v) + var offset = parentDif.div(new BN(params.difficultyBoundDivisor.v)) + var dif + + // Byzantium + // max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99) + var uncleAddend = parentBlock.header.uncleHash.equals(utils.SHA3_RLP_ARRAY) ? 1 : 2 + var a = blockTs.sub(parentTs).idivn(9).ineg().iaddn(uncleAddend) + var cutoff = new BN(-99) + // MAX(cutoff, a) + if (cutoff.cmp(a) === 1) { + a = cutoff + } + dif = parentDif.add(offset.mul(a)) + + // Byzantium difficulty bomb delay + var num = new BN(this.number).isubn(3000000) + if (num.ltn(0)) { + num = new BN(0) + } + + var exp = num.idivn(100000).isubn(2) + if (!exp.isNeg()) { + dif.iadd(new BN(2).pow(exp)) + } + + if (dif.cmp(minimumDifficulty) === -1) { + dif = minimumDifficulty + } + + return dif +} + +/** + * checks that the block's `difficuly` matches the canonical difficulty + * @method validateDifficulty + * @param {Block} parentBlock this block's parent + * @return {Boolean} + */ +BlockHeader.prototype.validateDifficulty = function (parentBlock) { + const dif = this.canonicalDifficulty(parentBlock) + return dif.cmp(new BN(this.difficulty)) === 0 +} + +/** + * Validates the gasLimit + * @method validateGasLimit + * @param {Block} parentBlock this block's parent + * @returns {Boolean} + */ +BlockHeader.prototype.validateGasLimit = function (parentBlock) { + const pGasLimit = new BN(parentBlock.header.gasLimit) + const gasLimit = new BN(this.gasLimit) + const a = pGasLimit.div(new BN(params.gasLimitBoundDivisor.v)) + const maxGasLimit = pGasLimit.add(a) + const minGasLimit = pGasLimit.sub(a) + + return gasLimit.lt(maxGasLimit) && gasLimit.gt(minGasLimit) && gasLimit.gte(params.minGasLimit.v) +} + +/** + * Validates the entire block header + * @method validate + * @param {Blockchain} blockChain the blockchain that this block is validating against + * @param {Bignum} [height] if this is an uncle header, this is the height of the block that is including it + * @param {Function} cb the callback function. The callback is given an `error` if the block is invalid + */ +BlockHeader.prototype.validate = function (blockchain, height, cb) { + var self = this + if (arguments.length === 2) { + cb = height + height = false + } + + if (this.isGenesis()) { + return cb() + } + + // find the blocks parent + blockchain.getBlock(self.parentHash, function (err, parentBlock) { + if (err) { + return cb('could not find parent block') + } + + self.parentBlock = parentBlock + + var number = new BN(self.number) + if (number.cmp(new BN(parentBlock.header.number).iaddn(1)) !== 0) { + return cb('invalid number') + } + + if (height) { + var dif = height.sub(new BN(parentBlock.header.number)) + if (!(dif.cmpn(8) === -1 && dif.cmpn(1) === 1)) { + return cb('uncle block has a parent that is too old or to young') + } + } + + if (!self.validateDifficulty(parentBlock)) { + return cb('invalid Difficulty') + } + + if (!self.validateGasLimit(parentBlock)) { + return cb('invalid gas limit') + } + + if (utils.bufferToInt(parentBlock.header.number) + 1 !== utils.bufferToInt(self.number)) { + return cb('invalid heigth') + } + + if (utils.bufferToInt(self.timestamp) <= utils.bufferToInt(parentBlock.header.timestamp)) { + return cb('invalid timestamp') + } + + if (self.extraData.length > params.maximumExtraDataSize.v) { + return cb('invalid amount of extra data') + } + + cb() + }) +} + +/** + * Returns the sha3 hash of the blockheader + * @method hash + * @return {Buffer} + */ +BlockHeader.prototype.hash = function () { + return utils.rlphash(this.raw) +} + +/** + * checks if the blockheader is a genesis header + * @method isGenesis + * @return {Boolean} + */ +BlockHeader.prototype.isGenesis = function () { + return this.number.toString('hex') === '' +} + + +}).call(this,require("buffer").Buffer) +},{"buffer":113,"ethereum-common/params.json":584,"ethereumjs-util":612}],587:[function(require,module,exports){ +(function (Buffer){ +const ethUtil = require('ethereumjs-util') +const Tx = require('ethereumjs-tx') +const Trie = require('merkle-patricia-tree') +const BN = ethUtil.BN +const rlp = ethUtil.rlp +const async = require('async') +const BlockHeader = require('./header') +const params = require('ethereum-common/params.json') + +/** + * Creates a new block object + * @constructor the raw serialized or the deserialized block. + * @param {Array|Buffer|Object} data + * @prop {Header} header the block's header + * @prop {Array.
} uncleList an array of uncle headers + * @prop {Array.} raw an array of buffers containing the raw blocks. + */ +var Block = module.exports = function (data) { + this.transactions = [] + this.uncleHeaders = [] + this._inBlockChain = false + this.txTrie = new Trie() + + Object.defineProperty(this, 'raw', { + get: function () { + return this.serialize(false) + } + }) + + var rawTransactions, rawUncleHeaders + + // defaults + if (!data) { + data = [[], [], []] + } + + if (Buffer.isBuffer(data)) { + data = rlp.decode(data) + } + + if (Array.isArray(data)) { + this.header = new BlockHeader(data[0]) + rawTransactions = data[1] + rawUncleHeaders = data[2] + } else { + this.header = new BlockHeader(data.header) + rawTransactions = data.transactions || [] + rawUncleHeaders = data.uncleHeaders || [] + } + + // parse uncle headers + for (var i = 0; i < rawUncleHeaders.length; i++) { + this.uncleHeaders.push(new BlockHeader(rawUncleHeaders[i])) + } + + // parse transactions + for (i = 0; i < rawTransactions.length; i++) { + var tx = new Tx(rawTransactions[i]) + tx._homestead = true + this.transactions.push(tx) + } +} + +Block.Header = BlockHeader + +/** + * Produces a hash the RLP of the block + * @method hash + */ +Block.prototype.hash = function () { + return this.header.hash() +} + +/** + * Determines if a given block is the genesis block + * @method isGenisis + * @return Boolean + */ +Block.prototype.isGenesis = function () { + return this.header.isGenesis() +} + +/** + * turns the block in to the canonical genesis block + * @method setGenesisParams + */ +Block.prototype.setGenesisParams = function () { + this.header.gasLimit = params.genesisGasLimit.v + this.header.difficulty = params.genesisDifficulty.v + this.header.extraData = params.genesisExtraData.v + this.header.nonce = params.genesisNonce.v + this.header.stateRoot = params.genesisStateRoot.v + this.header.number = new Buffer([]) +} + +/** + * Produces a serialization of the block. + * @method serialize + * @param {Boolean} rlpEncode whether to rlp encode the block or not + */ +Block.prototype.serialize = function (rlpEncode) { + var raw = [this.header.raw, [], + [] + ] + + // rlpEnode defaults to true + if (typeof rlpEncode === 'undefined') { + rlpEncode = true + } + + this.transactions.forEach(function (tx) { + raw[1].push(tx.raw) + }) + + this.uncleHeaders.forEach(function (uncle) { + raw[2].push(uncle.raw) + }) + + return rlpEncode ? rlp.encode(raw) : raw +} + +/** + * Generate transaction trie. The tx trie must be generated before the transaction trie can + * be validated with `validateTransactionTrie` + * @method genTxTrie + * @param {Function} cb the callback + */ +Block.prototype.genTxTrie = function (cb) { + var i = 0 + var self = this + + async.eachSeries(this.transactions, function (tx, done) { + self.txTrie.put(rlp.encode(i), tx.serialize(), done) + i++ + }, cb) +} + +/** + * Validates the transaction trie + * @method validateTransactionTrie + * @return {Boolean} + */ +Block.prototype.validateTransactionsTrie = function () { + var txT = this.header.transactionsTrie.toString('hex') + if (this.transactions.length) { + return txT === this.txTrie.root.toString('hex') + } else { + return txT === ethUtil.SHA3_RLP.toString('hex') + } +} + +/** + * Validates the transactions + * @method validateTransactions + * @param {Boolean} [stringError=false] whether to return a string with a dscription of why the validation failed or return a Bloolean + * @return {Boolean} + */ +Block.prototype.validateTransactions = function (stringError) { + var errors = [] + + this.transactions.forEach(function (tx, i) { + var error = tx.validate(true) + if (error) { + errors.push(error + ' at tx ' + i) + } + }) + + if (stringError === undefined || stringError === false) { + return errors.length === 0 + } else { + return arrayToString(errors) + } +} + +/** + * Validates the entire block. Returns a string to the callback if block is invalid + * @method validate + * @param {BlockChain} blockChain the blockchain that this block wants to be part of + * @param {Function} cb the callback which is given a `String` if the block is not valid + */ +Block.prototype.validate = function (blockChain, cb) { + var self = this + var errors = [] + + async.parallel([ + // validate uncles + self.validateUncles.bind(self, blockChain), + // validate block + self.header.validate.bind(self.header, blockChain), + // generate the transaction trie + self.genTxTrie.bind(self) + ], function (err) { + if (err) { + errors.push(err) + } + + if (!self.validateTransactionsTrie()) { + errors.push('invalid transaction true') + } + + var txErrors = self.validateTransactions(true) + if (txErrors !== '') { + errors.push(txErrors) + } + + if (!self.validateUnclesHash()) { + errors.push('invild uncle hash') + } + + cb(arrayToString(errors)) + }) +} + +/** + * Validates the uncle's hash + * @method validateUncleHash + * @return {Boolean} + */ +Block.prototype.validateUnclesHash = function () { + var raw = [] + this.uncleHeaders.forEach(function (uncle) { + raw.push(uncle.raw) + }) + + raw = rlp.encode(raw) + return ethUtil.sha3(raw).toString('hex') === this.header.uncleHash.toString('hex') +} + +/** + * Validates the uncles that are in the block if any. Returns a string to the callback if uncles are invalid + * @method validateUncles + * @param {Blockchain} blockChaina an instance of the Blockchain + * @param {Function} cb the callback + */ +Block.prototype.validateUncles = function (blockChain, cb) { + if (this.isGenesis()) { + return cb() + } + + var self = this + + if (self.uncleHeaders.length > 2) { + return cb('too many uncle headers') + } + + var uncleHashes = self.uncleHeaders.map(function (header) { + return header.hash().toString('hex') + }) + + if (!((new Set(uncleHashes)).size === uncleHashes.length)) { + return cb('dublicate unlces') + } + + async.each(self.uncleHeaders, function (uncle, cb2) { + var height = new BN(self.header.number) + async.parallel([ + uncle.validate.bind(uncle, blockChain, height), + // check to make sure the uncle is not already in the blockchain + function (cb3) { + blockChain.getDetails(uncle.hash(), function (err, blockInfo) { + // TODO: remove uncles from BC + if (blockInfo && blockInfo.isUncle) { + cb3(err || 'uncle already included') + } else { + cb3() + } + }) + } + ], cb2) + }, cb) +} + +/** + * Converts the block toJSON + * @method toJSON + * @param {Bool} labeled whether to create an labeled object or an array + * @return {Object} + */ +Block.prototype.toJSON = function (labeled) { + if (labeled) { + var obj = { + header: this.header.toJSON(true), + transactions: [], + uncleHeaders: [] + } + + this.transactions.forEach(function (tx) { + obj.transactions.push(tx.toJSON(labeled)) + }) + + this.uncleHeaders.forEach(function (uh) { + obj.uncleHeaders.push(uh.toJSON()) + }) + return obj + } else { + return ethUtil.baToJSON(this.raw) + } +} + +function arrayToString (array) { + try { + return array.reduce(function (str, err) { + if (str) { + str += ' ' + } + return str + err + }) + } catch (e) { + return '' + } +} + +}).call(this,require("buffer").Buffer) +},{"./header":586,"async":42,"buffer":113,"ethereum-common/params.json":584,"ethereumjs-tx":610,"ethereumjs-util":612,"merkle-patricia-tree":947}],588:[function(require,module,exports){ +module.exports={ + "name": "goerli", + "chainId": 5, + "networkId": 5, + "comment": "Cross-client PoA test network", + "url": "https://github.com/goerli/testnet", + "genesis": { + "hash": "0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a", + "timestamp": "0x5c51a607", + "gasLimit": 10485760, + "difficulty": 1, + "nonce": "0x0000000000000000", + "extraData": "0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "stateRoot": "0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008" + }, + "hardforks": [ + { + "name": "chainstart", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "homestead", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "dao", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "tangerineWhistle", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "spuriousDragon", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "byzantium", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "constantinople", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "petersburg", + "block": 0, + "consensus": "poa", + "finality": null + } + ], + "bootstrapNodes": [ + { + "ip": "51.141.78.53", + "port": 30303, + "id": "011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a", + "location": "", + "comment": "Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt" + }, + { + "ip": "13.93.54.137", + "port": 30303, + "id": "176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b", + "location": "", + "comment": "Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt" + }, + { + "ip": "94.237.54.114", + "port": 30313, + "id": "46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291", + "location": "", + "comment": "Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt" + }, + { + "ip": "52.64.155.147", + "port": 30303, + "id": "c1f8b7c2ac4453271fa07d8e9ecf9a2e8285aa0bd0c07df0131f47153306b0736fd3db8924e7a9bf0bed6b1d8d4f87362a71b033dc7c64547728d953e43e59b2", + "location": "", + "comment": "Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt" + }, + { + "ip": "213.186.16.82", + "port": 30303, + "id": "f4a9c6ee28586009fb5a96c8af13a58ed6d8315a9eee4772212c1d4d9cebe5a8b8a78ea4434f318726317d04a3f531a1ef0420cf9752605a562cfe858c46e263", + "location": "", + "comment": "Source: https://github.com/goerli/testnet/blob/master/bootnodes.txt" + } + ] +} + +},{}],589:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.chains = { + names: { + '1': 'mainnet', + '3': 'ropsten', + '4': 'rinkeby', + '42': 'kovan', + '6284': 'goerli', + }, + mainnet: require('./mainnet.json'), + ropsten: require('./ropsten.json'), + rinkeby: require('./rinkeby.json'), + kovan: require('./kovan.json'), + goerli: require('./goerli.json'), +}; + +},{"./goerli.json":588,"./kovan.json":590,"./mainnet.json":591,"./rinkeby.json":592,"./ropsten.json":593}],590:[function(require,module,exports){ +module.exports={ + "name": "kovan", + "chainId": 42, + "networkId": 42, + "comment": "Parity PoA test network", + "url": "https://kovan-testnet.github.io/website/", + "genesis": { + "hash": "0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9", + "timestamp": null, + "gasLimit": 6000000, + "difficulty": 131072, + "nonce": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "extraData": "0x", + "stateRoot": "0x2480155b48a1cea17d67dbfdfaafe821c1d19cdd478c5358e8ec56dec24502b2" + }, + "hardforks": [], + "bootstrapNodes": [ + { + "ip": "40.71.221.215", + "port": 30303, + "id": "56abaf065581a5985b8c5f4f88bd202526482761ba10be9bfdcd14846dd01f652ec33fde0f8c0fd1db19b59a4c04465681fcef50e11380ca88d25996191c52de", + "location": "", + "comment": "Parity Bootnode" + }, + { + "ip": "52.166.117.77", + "port": 30303, + "id": "d07827483dc47b368eaf88454fb04b41b7452cf454e194e2bd4c14f98a3278fed5d819dbecd0d010407fc7688d941ee1e58d4f9c6354d3da3be92f55c17d7ce3", + "location": "", + "comment": "Parity Bootnode" + }, + { + "ip": "52.165.239.18", + "port": 30303, + "id": "8fa162563a8e5a05eef3e1cd5abc5828c71344f7277bb788a395cce4a0e30baf2b34b92fe0b2dbbba2313ee40236bae2aab3c9811941b9f5a7e8e90aaa27ecba", + "location": "", + "comment": "Parity Bootnode" + }, + { + "ip": "52.243.47.56", + "port": 30303, + "id": "7e2e7f00784f516939f94e22bdc6cf96153603ca2b5df1c7cc0f90a38e7a2f218ffb1c05b156835e8b49086d11fdd1b3e2965be16baa55204167aa9bf536a4d9", + "location": "", + "comment": "Parity Bootnode" + }, + { + "ip": "40.68.248.100", + "port": 30303, + "id": "0518a3d35d4a7b3e8c433e7ffd2355d84a1304ceb5ef349787b556197f0c87fad09daed760635b97d52179d645d3e6d16a37d2cc0a9945c2ddf585684beb39ac", + "location": "", + "comment": "Parity Bootnode" + } + ] +} + +},{}],591:[function(require,module,exports){ +module.exports={ + "name": "mainnet", + "chainId": 1, + "networkId": 1, + "comment": "The Ethereum main chain", + "url": "https://ethstats.net/", + "genesis": { + "hash": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "timestamp": null, + "gasLimit": 5000, + "difficulty": 17179869184, + "nonce": "0x0000000000000042", + "extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", + "stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544" + }, + "hardforks": [ + { + "name": "chainstart", + "block": 0, + "consensus": "pow", + "finality": null + }, + { + "name": "homestead", + "block": 1150000, + "consensus": "pow", + "finality": null + }, + { + "name": "dao", + "block": 1920000, + "consensus": "pow", + "finality": null + }, + { + "name": "tangerineWhistle", + "block": 2463000, + "consensus": "pow", + "finality": null + }, + { + "name": "spuriousDragon", + "block": 2675000, + "consensus": "pow", + "finality": null + }, + { + "name": "byzantium", + "block": 4370000, + "consensus": "pow", + "finality": null + }, + { + "name": "constantinople", + "block": 7280000, + "consensus": "pow", + "finality": null + }, + { + "name": "petersburg", + "block": 7280000, + "consensus": "pow", + "finality": null + } + ], + "bootstrapNodes": [ + { + "ip": "13.93.211.84", + "port": 30303, + "id": "3f1d12044546b76342d59d4a05532c14b85aa669704bfe1f864fe079415aa2c02d743e03218e57a33fb94523adb54032871a6c51b2cc5514cb7c7e35b3ed0a99", + "location": "US-WEST", + "comment": "Go Bootnode" + }, + { + "ip": "191.235.84.50", + "port": 30303, + "id": "78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d", + "location": "BR", + "comment": "Go Bootnode" + }, + { + "ip": "13.75.154.138", + "port": 30303, + "id": "158f8aab45f6d19c6cbf4a089c2670541a8da11978a2f90dbf6a502a4a3bab80d288afdbeb7ec0ef6d92de563767f3b1ea9e8e334ca711e9f8e2df5a0385e8e6", + "location": "AU", + "comment": "Go Bootnode" + }, + { + "ip": "52.74.57.123", + "port": 30303, + "id": "1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082", + "location": "SG", + "comment": "Go Bootnode" + } + ] +} + +},{}],592:[function(require,module,exports){ +module.exports={ + "name": "rinkeby", + "chainId": 4, + "networkId": 4, + "comment": "PoA test network", + "url": "https://www.rinkeby.io", + "genesis": { + "hash": "0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177", + "timestamp": "0x58ee40ba", + "gasLimit": 4700000, + "difficulty": 1, + "nonce": "0x0000000000000000", + "extraData": "0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "stateRoot": "0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d" + }, + "hardforks": [ + { + "name": "chainstart", + "block": 0, + "consensus": "poa", + "finality": null + }, + { + "name": "homestead", + "block": 1, + "consensus": "poa", + "finality": null + }, + { + "name": "dao", + "block": null, + "consensus": "poa", + "finality": null + }, + { + "name": "tangerineWhistle", + "block": 2, + "consensus": "poa", + "finality": null + }, + { + "name": "spuriousDragon", + "block": 3, + "consensus": "poa", + "finality": null + }, + { + "name": "byzantium", + "block": 1035301, + "consensus": "poa", + "finality": null + }, + { + "name": "constantinople", + "block": null, + "consensus": "poa", + "finality": null + } + ], + "bootstrapNodes": [ + { + "ip": "52.169.42.101", + "port": 30303, + "id": "a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf", + "location": "IE", + "comment": "" + }, + { + "ip": "52.3.158.184", + "port": 30303, + "id": "343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8", + "location": "", + "comment": "INFURA" + } + ] +} + +},{}],593:[function(require,module,exports){ +module.exports={ + "name": "ropsten", + "chainId": 3, + "networkId": 3, + "comment": "PoW test network", + "url": "https://github.com/ethereum/ropsten", + "genesis": { + "hash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d", + "timestamp": null, + "gasLimit": 16777216, + "difficulty": 1048576, + "nonce": "0x0000000000000042", + "extraData": "0x3535353535353535353535353535353535353535353535353535353535353535", + "stateRoot": "0x217b0bbcfb72e2d57e28f33cb361b9983513177755dc3f33ce3e7022ed62b77b" + }, + "hardforks": [ + { + "name": "chainstart", + "block": 0, + "consensus": "pow", + "finality": null + }, + { + "name": "homestead", + "block": 0, + "consensus": "pow", + "finality": null + }, + { + "name": "dao", + "block": null, + "consensus": "pow", + "finality": null + }, + { + "name": "tangerineWhistle", + "block": 0, + "consensus": "pow", + "finality": null + }, + { + "name": "spuriousDragon", + "block": 10, + "consensus": "pow", + "finality": null + }, + { + "name": "byzantium", + "block": 1700000, + "consensus": "pow", + "finality": null + }, + { + "name": "constantinople", + "block": 4230000, + "consensus": "pow", + "finality": null + }, + { + "name": "petersburg", + "block": 4939394, + "consensus": "pow", + "finality": null + } + ], + "bootstrapNodes": [ + { + "ip": "52.176.7.10", + "port": "30303", + "id": "30b7ab30a01c124a6cceca36863ece12c4f5fa68e3ba9b0b51407ccc002eeed3b3102d20a88f1c1d3c3154e2449317b8ef95090e77b312d5cc39354f86d5d606", + "network": "Ropsten", + "chainId": 3, + "location": "US", + "comment": "US-Azure geth" + }, + { + "ip": "52.176.100.77", + "port": "30303", + "id": "865a63255b3bb68023b6bffd5095118fcc13e79dcf014fe4e47e065c350c7cc72af2e53eff895f11ba1bbb6a2b33271c1116ee870f266618eadfc2e78aa7349c", + "network": "Ropsten", + "chainId": 3, + "location": "US", + "comment": "US-Azure parity" + }, + { + "ip": "52.232.243.152", + "port": "30303", + "id": "6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f", + "network": "Ropsten", + "chainId": 3, + "location": "US", + "comment": "Parity" + }, + { + "ip": "192.81.208.223", + "port": "30303", + "id": "94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09", + "network": "Ropsten", + "chainId": 3, + "location": "US", + "comment": "@gpip" + } + ] +} + +},{}],594:[function(require,module,exports){ +module.exports={ + "0x0000000000000000000000000000000000000000": "0x1", + "0x0000000000000000000000000000000000000001": "0x1", + "0x0000000000000000000000000000000000000002": "0x1", + "0x0000000000000000000000000000000000000003": "0x1", + "0x0000000000000000000000000000000000000004": "0x1", + "0x0000000000000000000000000000000000000005": "0x1", + "0x0000000000000000000000000000000000000006": "0x1", + "0x0000000000000000000000000000000000000007": "0x1", + "0x0000000000000000000000000000000000000008": "0x1", + "0x0000000000000000000000000000000000000009": "0x1", + "0x000000000000000000000000000000000000000a": "0x1", + "0x000000000000000000000000000000000000000b": "0x1", + "0x000000000000000000000000000000000000000c": "0x1", + "0x000000000000000000000000000000000000000d": "0x1", + "0x000000000000000000000000000000000000000e": "0x1", + "0x000000000000000000000000000000000000000f": "0x1", + "0x0000000000000000000000000000000000000010": "0x1", + "0x0000000000000000000000000000000000000011": "0x1", + "0x0000000000000000000000000000000000000012": "0x1", + "0x0000000000000000000000000000000000000013": "0x1", + "0x0000000000000000000000000000000000000014": "0x1", + "0x0000000000000000000000000000000000000015": "0x1", + "0x0000000000000000000000000000000000000016": "0x1", + "0x0000000000000000000000000000000000000017": "0x1", + "0x0000000000000000000000000000000000000018": "0x1", + "0x0000000000000000000000000000000000000019": "0x1", + "0x000000000000000000000000000000000000001a": "0x1", + "0x000000000000000000000000000000000000001b": "0x1", + "0x000000000000000000000000000000000000001c": "0x1", + "0x000000000000000000000000000000000000001d": "0x1", + "0x000000000000000000000000000000000000001e": "0x1", + "0x000000000000000000000000000000000000001f": "0x1", + "0x0000000000000000000000000000000000000020": "0x1", + "0x0000000000000000000000000000000000000021": "0x1", + "0x0000000000000000000000000000000000000022": "0x1", + "0x0000000000000000000000000000000000000023": "0x1", + "0x0000000000000000000000000000000000000024": "0x1", + "0x0000000000000000000000000000000000000025": "0x1", + "0x0000000000000000000000000000000000000026": "0x1", + "0x0000000000000000000000000000000000000027": "0x1", + "0x0000000000000000000000000000000000000028": "0x1", + "0x0000000000000000000000000000000000000029": "0x1", + "0x000000000000000000000000000000000000002a": "0x1", + "0x000000000000000000000000000000000000002b": "0x1", + "0x000000000000000000000000000000000000002c": "0x1", + "0x000000000000000000000000000000000000002d": "0x1", + "0x000000000000000000000000000000000000002e": "0x1", + "0x000000000000000000000000000000000000002f": "0x1", + "0x0000000000000000000000000000000000000030": "0x1", + "0x0000000000000000000000000000000000000031": "0x1", + "0x0000000000000000000000000000000000000032": "0x1", + "0x0000000000000000000000000000000000000033": "0x1", + "0x0000000000000000000000000000000000000034": "0x1", + "0x0000000000000000000000000000000000000035": "0x1", + "0x0000000000000000000000000000000000000036": "0x1", + "0x0000000000000000000000000000000000000037": "0x1", + "0x0000000000000000000000000000000000000038": "0x1", + "0x0000000000000000000000000000000000000039": "0x1", + "0x000000000000000000000000000000000000003a": "0x1", + "0x000000000000000000000000000000000000003b": "0x1", + "0x000000000000000000000000000000000000003c": "0x1", + "0x000000000000000000000000000000000000003d": "0x1", + "0x000000000000000000000000000000000000003e": "0x1", + "0x000000000000000000000000000000000000003f": "0x1", + "0x0000000000000000000000000000000000000040": "0x1", + "0x0000000000000000000000000000000000000041": "0x1", + "0x0000000000000000000000000000000000000042": "0x1", + "0x0000000000000000000000000000000000000043": "0x1", + "0x0000000000000000000000000000000000000044": "0x1", + "0x0000000000000000000000000000000000000045": "0x1", + "0x0000000000000000000000000000000000000046": "0x1", + "0x0000000000000000000000000000000000000047": "0x1", + "0x0000000000000000000000000000000000000048": "0x1", + "0x0000000000000000000000000000000000000049": "0x1", + "0x000000000000000000000000000000000000004a": "0x1", + "0x000000000000000000000000000000000000004b": "0x1", + "0x000000000000000000000000000000000000004c": "0x1", + "0x000000000000000000000000000000000000004d": "0x1", + "0x000000000000000000000000000000000000004e": "0x1", + "0x000000000000000000000000000000000000004f": "0x1", + "0x0000000000000000000000000000000000000050": "0x1", + "0x0000000000000000000000000000000000000051": "0x1", + "0x0000000000000000000000000000000000000052": "0x1", + "0x0000000000000000000000000000000000000053": "0x1", + "0x0000000000000000000000000000000000000054": "0x1", + "0x0000000000000000000000000000000000000055": "0x1", + "0x0000000000000000000000000000000000000056": "0x1", + "0x0000000000000000000000000000000000000057": "0x1", + "0x0000000000000000000000000000000000000058": "0x1", + "0x0000000000000000000000000000000000000059": "0x1", + "0x000000000000000000000000000000000000005a": "0x1", + "0x000000000000000000000000000000000000005b": "0x1", + "0x000000000000000000000000000000000000005c": "0x1", + "0x000000000000000000000000000000000000005d": "0x1", + "0x000000000000000000000000000000000000005e": "0x1", + "0x000000000000000000000000000000000000005f": "0x1", + "0x0000000000000000000000000000000000000060": "0x1", + "0x0000000000000000000000000000000000000061": "0x1", + "0x0000000000000000000000000000000000000062": "0x1", + "0x0000000000000000000000000000000000000063": "0x1", + "0x0000000000000000000000000000000000000064": "0x1", + "0x0000000000000000000000000000000000000065": "0x1", + "0x0000000000000000000000000000000000000066": "0x1", + "0x0000000000000000000000000000000000000067": "0x1", + "0x0000000000000000000000000000000000000068": "0x1", + "0x0000000000000000000000000000000000000069": "0x1", + "0x000000000000000000000000000000000000006a": "0x1", + "0x000000000000000000000000000000000000006b": "0x1", + "0x000000000000000000000000000000000000006c": "0x1", + "0x000000000000000000000000000000000000006d": "0x1", + "0x000000000000000000000000000000000000006e": "0x1", + "0x000000000000000000000000000000000000006f": "0x1", + "0x0000000000000000000000000000000000000070": "0x1", + "0x0000000000000000000000000000000000000071": "0x1", + "0x0000000000000000000000000000000000000072": "0x1", + "0x0000000000000000000000000000000000000073": "0x1", + "0x0000000000000000000000000000000000000074": "0x1", + "0x0000000000000000000000000000000000000075": "0x1", + "0x0000000000000000000000000000000000000076": "0x1", + "0x0000000000000000000000000000000000000077": "0x1", + "0x0000000000000000000000000000000000000078": "0x1", + "0x0000000000000000000000000000000000000079": "0x1", + "0x000000000000000000000000000000000000007a": "0x1", + "0x000000000000000000000000000000000000007b": "0x1", + "0x000000000000000000000000000000000000007c": "0x1", + "0x000000000000000000000000000000000000007d": "0x1", + "0x000000000000000000000000000000000000007e": "0x1", + "0x000000000000000000000000000000000000007f": "0x1", + "0x0000000000000000000000000000000000000080": "0x1", + "0x0000000000000000000000000000000000000081": "0x1", + "0x0000000000000000000000000000000000000082": "0x1", + "0x0000000000000000000000000000000000000083": "0x1", + "0x0000000000000000000000000000000000000084": "0x1", + "0x0000000000000000000000000000000000000085": "0x1", + "0x0000000000000000000000000000000000000086": "0x1", + "0x0000000000000000000000000000000000000087": "0x1", + "0x0000000000000000000000000000000000000088": "0x1", + "0x0000000000000000000000000000000000000089": "0x1", + "0x000000000000000000000000000000000000008a": "0x1", + "0x000000000000000000000000000000000000008b": "0x1", + "0x000000000000000000000000000000000000008c": "0x1", + "0x000000000000000000000000000000000000008d": "0x1", + "0x000000000000000000000000000000000000008e": "0x1", + "0x000000000000000000000000000000000000008f": "0x1", + "0x0000000000000000000000000000000000000090": "0x1", + "0x0000000000000000000000000000000000000091": "0x1", + "0x0000000000000000000000000000000000000092": "0x1", + "0x0000000000000000000000000000000000000093": "0x1", + "0x0000000000000000000000000000000000000094": "0x1", + "0x0000000000000000000000000000000000000095": "0x1", + "0x0000000000000000000000000000000000000096": "0x1", + "0x0000000000000000000000000000000000000097": "0x1", + "0x0000000000000000000000000000000000000098": "0x1", + "0x0000000000000000000000000000000000000099": "0x1", + "0x000000000000000000000000000000000000009a": "0x1", + "0x000000000000000000000000000000000000009b": "0x1", + "0x000000000000000000000000000000000000009c": "0x1", + "0x000000000000000000000000000000000000009d": "0x1", + "0x000000000000000000000000000000000000009e": "0x1", + "0x000000000000000000000000000000000000009f": "0x1", + "0x00000000000000000000000000000000000000a0": "0x1", + "0x00000000000000000000000000000000000000a1": "0x1", + "0x00000000000000000000000000000000000000a2": "0x1", + "0x00000000000000000000000000000000000000a3": "0x1", + "0x00000000000000000000000000000000000000a4": "0x1", + "0x00000000000000000000000000000000000000a5": "0x1", + "0x00000000000000000000000000000000000000a6": "0x1", + "0x00000000000000000000000000000000000000a7": "0x1", + "0x00000000000000000000000000000000000000a8": "0x1", + "0x00000000000000000000000000000000000000a9": "0x1", + "0x00000000000000000000000000000000000000aa": "0x1", + "0x00000000000000000000000000000000000000ab": "0x1", + "0x00000000000000000000000000000000000000ac": "0x1", + "0x00000000000000000000000000000000000000ad": "0x1", + "0x00000000000000000000000000000000000000ae": "0x1", + "0x00000000000000000000000000000000000000af": "0x1", + "0x00000000000000000000000000000000000000b0": "0x1", + "0x00000000000000000000000000000000000000b1": "0x1", + "0x00000000000000000000000000000000000000b2": "0x1", + "0x00000000000000000000000000000000000000b3": "0x1", + "0x00000000000000000000000000000000000000b4": "0x1", + "0x00000000000000000000000000000000000000b5": "0x1", + "0x00000000000000000000000000000000000000b6": "0x1", + "0x00000000000000000000000000000000000000b7": "0x1", + "0x00000000000000000000000000000000000000b8": "0x1", + "0x00000000000000000000000000000000000000b9": "0x1", + "0x00000000000000000000000000000000000000ba": "0x1", + "0x00000000000000000000000000000000000000bb": "0x1", + "0x00000000000000000000000000000000000000bc": "0x1", + "0x00000000000000000000000000000000000000bd": "0x1", + "0x00000000000000000000000000000000000000be": "0x1", + "0x00000000000000000000000000000000000000bf": "0x1", + "0x00000000000000000000000000000000000000c0": "0x1", + "0x00000000000000000000000000000000000000c1": "0x1", + "0x00000000000000000000000000000000000000c2": "0x1", + "0x00000000000000000000000000000000000000c3": "0x1", + "0x00000000000000000000000000000000000000c4": "0x1", + "0x00000000000000000000000000000000000000c5": "0x1", + "0x00000000000000000000000000000000000000c6": "0x1", + "0x00000000000000000000000000000000000000c7": "0x1", + "0x00000000000000000000000000000000000000c8": "0x1", + "0x00000000000000000000000000000000000000c9": "0x1", + "0x00000000000000000000000000000000000000ca": "0x1", + "0x00000000000000000000000000000000000000cb": "0x1", + "0x00000000000000000000000000000000000000cc": "0x1", + "0x00000000000000000000000000000000000000cd": "0x1", + "0x00000000000000000000000000000000000000ce": "0x1", + "0x00000000000000000000000000000000000000cf": "0x1", + "0x00000000000000000000000000000000000000d0": "0x1", + "0x00000000000000000000000000000000000000d1": "0x1", + "0x00000000000000000000000000000000000000d2": "0x1", + "0x00000000000000000000000000000000000000d3": "0x1", + "0x00000000000000000000000000000000000000d4": "0x1", + "0x00000000000000000000000000000000000000d5": "0x1", + "0x00000000000000000000000000000000000000d6": "0x1", + "0x00000000000000000000000000000000000000d7": "0x1", + "0x00000000000000000000000000000000000000d8": "0x1", + "0x00000000000000000000000000000000000000d9": "0x1", + "0x00000000000000000000000000000000000000da": "0x1", + "0x00000000000000000000000000000000000000db": "0x1", + "0x00000000000000000000000000000000000000dc": "0x1", + "0x00000000000000000000000000000000000000dd": "0x1", + "0x00000000000000000000000000000000000000de": "0x1", + "0x00000000000000000000000000000000000000df": "0x1", + "0x00000000000000000000000000000000000000e0": "0x1", + "0x00000000000000000000000000000000000000e1": "0x1", + "0x00000000000000000000000000000000000000e2": "0x1", + "0x00000000000000000000000000000000000000e3": "0x1", + "0x00000000000000000000000000000000000000e4": "0x1", + "0x00000000000000000000000000000000000000e5": "0x1", + "0x00000000000000000000000000000000000000e6": "0x1", + "0x00000000000000000000000000000000000000e7": "0x1", + "0x00000000000000000000000000000000000000e8": "0x1", + "0x00000000000000000000000000000000000000e9": "0x1", + "0x00000000000000000000000000000000000000ea": "0x1", + "0x00000000000000000000000000000000000000eb": "0x1", + "0x00000000000000000000000000000000000000ec": "0x1", + "0x00000000000000000000000000000000000000ed": "0x1", + "0x00000000000000000000000000000000000000ee": "0x1", + "0x00000000000000000000000000000000000000ef": "0x1", + "0x00000000000000000000000000000000000000f0": "0x1", + "0x00000000000000000000000000000000000000f1": "0x1", + "0x00000000000000000000000000000000000000f2": "0x1", + "0x00000000000000000000000000000000000000f3": "0x1", + "0x00000000000000000000000000000000000000f4": "0x1", + "0x00000000000000000000000000000000000000f5": "0x1", + "0x00000000000000000000000000000000000000f6": "0x1", + "0x00000000000000000000000000000000000000f7": "0x1", + "0x00000000000000000000000000000000000000f8": "0x1", + "0x00000000000000000000000000000000000000f9": "0x1", + "0x00000000000000000000000000000000000000fa": "0x1", + "0x00000000000000000000000000000000000000fb": "0x1", + "0x00000000000000000000000000000000000000fc": "0x1", + "0x00000000000000000000000000000000000000fd": "0x1", + "0x00000000000000000000000000000000000000fe": "0x1", + "0x00000000000000000000000000000000000000ff": "0x1", + "0x4c2ae482593505f0163cdefc073e81c63cda4107": "0x152d02c7e14af6800000", + "0xa8e8f14732658e4b51e8711931053a8a69baf2b1": "0x152d02c7e14af6800000", + "0xd9a5179f091d85051d3c982785efd1455cec8699": "0x84595161401484a000000", + "0xe0a2bd4258d2768837baa26a28fe71dc079f84c7": "0x4a47e3c12448f4ad000000" +} + +},{}],595:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var genesisStates = { + names: { + '1': 'mainnet', + '3': 'ropsten', + '4': 'rinkeby', + '42': 'kovan', + '6284': 'goerli', + }, + mainnet: require('./mainnet.json'), + ropsten: require('./ropsten.json'), + rinkeby: require('./rinkeby.json'), + kovan: require('./kovan.json'), + goerli: require('./goerli.json'), +}; +/** + * Returns the genesis state by network ID + * @param id ID of the network (e.g. 1) + * @returns Dictionary with genesis accounts + */ +function genesisStateById(id) { + return genesisStates[genesisStates['names'][id]]; +} +exports.genesisStateById = genesisStateById; +/** + * Returns the genesis state by network name + * @param name Name of the network (e.g. 'mainnet') + * @returns Dictionary with genesis accounts + */ +function genesisStateByName(name) { + return genesisStates[name]; +} +exports.genesisStateByName = genesisStateByName; + +},{"./goerli.json":594,"./kovan.json":596,"./mainnet.json":597,"./rinkeby.json":598,"./ropsten.json":599}],596:[function(require,module,exports){ +module.exports={} + +},{}],597:[function(require,module,exports){ +module.exports={ + "0x3282791d6fd713f1e94f4bfd565eaa78b3a0599d": "1337000000000000000000", + "0x17961d633bcf20a7b029a7d94b7df4da2ec5427f": "229427000000000000000", + "0x493a67fe23decc63b10dda75f3287695a81bd5ab": "880000000000000000000", + "0x01fb8ec12425a04f813e46c54c05748ca6b29aa9": "259800000000000000000", + "0xd2a030ac8952325f9e1db378a71485a24e1b07b2": "2000000000000000000000", + "0x77a34907f305a54c85db09c363fde3c47e6ae21f": "985000000000000000000", + "0x391a77405c09a72b5e8436237aaaf95d68da1709": "49082000000000000000", + "0x00aada25ea2286709abb422d41923fd380cd04c7": "650100000000000000000", + "0xacc46a2a555c74ded4a2bd094e821b97843b40c0": "1940000000000000000000", + "0xde07fb5b7a464e3ba7fbe09e9acb271af5338c58": "50000000000000000000", + "0x4c696be99f3a690440c3436a59a7d7e937d6ba0d": "3460000000000000000000", + "0xfa33553285a973719a0d5f956ff861b2d89ed304": "20000000000000000000", + "0x67cfda6e70bf7657d39059b59790e5145afdbe61": "646000000000000000000", + "0xa321091d3018064279db399d2b2a88a6f440ae24": "3200000000000000000000", + "0xfb3fa1ac08aba9cc3bf0fe9d483820688f65b410": "30000000000000000000000", + "0x6715c14035fb57bb3d667f7b707498c41074b855": "700000000000000000000", + "0xd4344f7d5cad65d17e5c2d0e7323943d6f62fe92": "267400000000000000000", + "0xa3294626ec2984c43b43da4d5d8e4669b11d4b59": "1008000000000000000000", + "0x656018584130db83ab0591a8128d9381666a8d0e": "63960000000000000000", + "0x0fa010ce0c731d3b628e36b91f571300e49dbeab": "999800000000000000000", + "0x3098b65db93ecacaf7353c48808390a223d57684": "449965000000000000000", + "0xae635bf73831119d2d29c0d04ff8f8d8d0a57a46": "1337000000000000000000", + "0x0f7515ff0e808f695e0c20485ff96ed2f7b79310": "1000169000000000000000", + "0x8b30c04098d7a7e6420c357ea7bfa49bac9a8a18": "8000200000000000000000", + "0x64dba2d6615b8bd7571836dc75bc79d314f5ecee": "10000000000000000000000", + "0xe7912d4cf4562c573ddc5b71e37310e378ef86c9": "394000000000000000000", + "0xa4da34450d22ec0ffcede0004b02f7872ee0b73a": "93342000000000000000", + "0x34437d1465640b136cb5841c3f934f9ba0b7097d": "173000000000000000000", + "0xc652871d192422c6bc235fa063b44a7e1d43e385": "155000000000000000000", + "0xa8a708e84f82db86a35502193b4c6ee9a76ebe8f": "1015200000000000000000", + "0x5c3f567faff7bad1b5120022e8cbcaa82b4917b3": "2000000000000000000000", + "0xdbc1d0ee2bab531140de137722cd36bdb4e47194": "200000000000000000000", + "0xf59dab1bf8df11327e61f9b7a14b563a96ec3554": "6000000000000000000000", + "0x456f8d746682b224679349064d1b368c7c05b176": "3700000000000000000000", + "0x5f13154631466dcb1353c890932a7c97e0878e90": "6000000000000000000000", + "0xf4b1626e24f30bcad9273c527fcc714b5d007b8f": "200000000000000000000", + "0xa8db0b9b201453333c757f6ad9bcb555c02da93b": "2199970000000000000000", + "0xa0fc7e53c5ebd27a2abdac45261f84ab3b51aefb": "3008250000000000000000", + "0x1b636b7a496f044d7359596e353a104616436f6b": "360354000000000000000", + "0x74bce9ec38362d6c94ccac26d5c0e13a8b3b1d40": "999954000000000000000", + "0x9834682180b982d166badb9d9d1d9bbf016d87ee": "2000000000000000000000", + "0x1e6e0153fc161bc05e656bbb144c7187bf4fe84d": "2000000000000000000000", + "0x989c0ccff654da03aeb11af701054561d6297e1d": "4000000000000000000000", + "0x78a1e254409fb1b55a7cb4dd8eba3b30c8bad9ef": "100000000000000000000", + "0x9ef1896b007c32a15114fb89d73dbd47f9122b69": "4000000000000000000000", + "0x33320dd90f2baa110dd334872a998f148426453c": "999972000000000000000", + "0xe72e1d335cc29a96b9b1c02f003a16d971e90b9d": "1580000000000000000000", + "0x0921605f99164e3bcc28f31caece78973182561d": "793744000000000000000", + "0xfc00a420a36107dfd5f495128a5fe5abb2db0f34": "5960000000000000000000", + "0xdfcbdf09454e1a5e4a40d3eef7c5cf1cd3de9486": "4000000000000000000000", + "0x646e043d0597a664948fbb0dc15475a3a4f3a6ed": "20000000000000000000", + "0x79aeb34566b974c35a5881dec020927da7df5d25": "2000000000000000000000", + "0xdbadc61ed5f0460a7f18e51b2fb2614d9264a0e0": "40000000000000000000", + "0x97b91efe7350c2d57e7e406bab18f3617bcde14a": "9999980000000000000000", + "0x8398e07ebcb4f75ff2116de77c1c2a99f303a4cf": "500000000000000000000", + "0xf02796295101674288c1d93467053d042219b794": "740000000000000000000", + "0xf4ed848ec961739c2c7e352f435ba70a7cd5db38": "1970000000000000000000", + "0x82485728d0e281563758c75ab27ed9e882a0002d": "147000000000000000000", + "0x427ec668ac9404e895cc861511d1620a4912be98": "40000000000000000000000", + "0x1bbc199e586790be87afedc849c04726745c5d7b": "4000000000000000000000", + "0x10d945334ecde47beb9ca3816c173dfbbd0b5333": "1400000000000000000000", + "0x1dcebcb7656df5dcaa3368a055d22f9ed6cdd940": "499800000000000000000", + "0x2ac1f8d7bf721f3cfe74d20fea9b87a28aaa982c": "161000000000000000000", + "0x0a47ad9059a249fc936b2662353da6905f75c2b9": "2000000000000000000000", + "0x768498934e37e905f1d0e77b44b574bcf3ec4ae8": "20000000000000000000000", + "0xf46b6b9c7cb552829c1d3dfd8ffb11aabae782f6": "21000000000000000000", + "0x7aea25d42b2612286e99c53697c6bc4100e2dbbf": "2000000000000000000000", + "0xaf3615c789d0b1152ad4db25fe5dcf222804cf62": "1000000000000000000000", + "0x92e6581e1da1f9b846e09347333dc818e2d2ac66": "3640000000000000000000", + "0x240305727313d01e73542c775ff59d11cd35f819": "5931229000000000000000", + "0xb95cfda8465ba9c2661b249fc3ab661bdfa35ff0": "318949000000000000000", + "0x1b0d076817e8d68ee2df4e1da1c1142d198c4435": "1550000000000000000000", + "0x93c2e64e5de5589ed25006e843196ee9b1cf0b3e": "1670000000000000000000", + "0x0e2e504a2d1122b5a9feee5cb1451bf4c2ace87b": "3940000000000000000000", + "0x22b96ab2cad55db100b53001f9e4db378104c807": "10000000000000000000000", + "0xa927d48bb6cb814bc609cbcaa9151f5d459a27e1": "271600000000000000000", + "0x5cbd8daf27ddf704cdd0d909a789ba36ed4f37b2": "13400000000000000000", + "0x9adbd3bc7b0afc05d1d2eda49ff863939c48db46": "199955000000000000000", + "0xac7e03702723cb16ee27e22dd0b815dc2d5cae9f": "16000000000000000000000", + "0x1e210e7047886daa52aaf70f4b991dac68e3025e": "200000000000000000000", + "0xc98048687f2bfcc9bd90ed18736c57edd352b65d": "1000000000000000000000", + "0x81c18c2a238ddc4cba230a072dd7dc101e620273": "1337000000000000000000", + "0xcb3d766c983f192bcecac70f4ee03dd9ff714d51": "100000000000000000000", + "0x44a63d18424587b9b307bfc3c364ae10cd04c713": "20000000000000000000", + "0x4ab2d34f04834fbf7479649cab923d2c4725c553": "3520000000000000000000", + "0xb834acf3015322c58382eeb2b79638906e88b6de": "24000000000000000000000", + "0x7d551397f79a2988b064afd0efebee802c7721bc": "39400000000000000000000", + "0xb537d36a70eeb8d3e5c80de815225c1158cb92c4": "1500000000000000000000", + "0x805ce51297a0793b812067f017b3e7b2df9bb1f9": "100000000000000000000", + "0x085ba65febe23eefc2c802666ab1262382cfc494": "400000000000000000000", + "0xb1c0d08b36e184f9952a4037e3e53a667d070a4e": "1000000000000000000000", + "0x83fe5a1b328bae440711beaf6aad6026eda6d220": "20000000000000000000000", + "0x7fd679e5fb0da2a5d116194dcb508318edc580f3": "6560000000000000000000", + "0x41ad369f758fef38a19aa3149379832c818ef2a0": "1000060000000000000000", + "0x6d846dc12657e91af25008519c3e857f51707dd6": "4590000000000000000000", + "0xc02d6eadeacf1b78b3ca85035c637bb1ce01f490": "4000000000000000000000", + "0x826eb7cd7319b82dd07a1f3b409071d96e39677f": "1000000000000000000000", + "0x4ac9905a4cb6ab1cfd62546ee5917300b87c4fde": "1015200000000000000000", + "0xcf6e52e6b77480b1867efec6446d9fc3cc3577e8": "222010000000000000000", + "0x2476b2bb751ce748e1a4c4ff7b230be0c15d2245": "4000000000000000000000", + "0x1a505e62a74e87e577473e4f3afa16bedd3cfa52": "500000000000000000000", + "0x21d02705f3f64905d80ed9147913ea8c7307d695": "1363740000000000000000", + "0x7b1daf14891b8a1e1bd429d8b36b9a4aa1d9afbf": "500000000000000000000", + "0x5338ef70eac9dd9af5a0503b5efad1039e67e725": "2674000000000000000000", + "0x50ca86b5eb1d01874df8e5f34945d49c6c1ab848": "1000000000000000000000", + "0xf3cc8bcb559465f81bfe583bd7ab0a2306453b9e": "20000000000000000000000", + "0x5c323457e187761a8276e359b7b7af3f3b6e3df6": "10000000000000000000000", + "0x4d82d7700c123bb919419bbaf046799c6b0e2c66": "20000000000000000000000", + "0x8a66abbc2d30ce21a833b0db8e561d5105e0a72c": "699958000000000000000", + "0x2ae53866fc2d14d572ab73b4a065a1188267f527": "8000000000000000000000", + "0x9af5c9894c33e42c2c518e3ac670ea9505d1b53e": "18200000000000000000", + "0xcba25c7a503cc8e0d04971ca05c762f9b762b48b": "500000000000000000000", + "0xfda3042819af3e662900e1b92b4358eda6e92590": "118200000000000000000000", + "0x9bd7c38a4210304a4d653edeff1b3ce45fce7843": "282000000000000000000", + "0xedc22fb92c638e1e21ff5cf039daa6e734dafb29": "298000000000000000000", + "0xa1f193a0592f1feb9fdfc90aa813784eb80471c9": "1400000000000000000000", + "0xe97fde0b67716325cf0ecce8a191a3761b2c791d": "1004700000000000000000", + "0x110237cf9117e767922fc4a1b78d7964da82df20": "3940000000000000000000", + "0xe32f95766d57b5cd4b173289d6876f9e64558194": "100000000000000000000", + "0xf2d59c8923759073d6f415aaf8eb065ff2f3b685": "7880000000000000000000", + "0xc53d79f7cb9b70952fd30fce58d54b9f0b59f647": "5089200000000000000000", + "0x9eb281c32719c40fdb3e216db0f37fbc73a026b7": "20000000000000000000", + "0x2d6511fd7a3800b26854c7ec39c0dcb5f4c4e8e8": "399910000000000000000", + "0x61ba87c77e9b596de7ba0e326fddfeec2163ef66": "200000000000000000000", + "0xde1121829c9a08284087a43fbd2fc1142a3233b4": "1000000000000000000000", + "0x22a25812ab56dcc423175ed1d8adacce33cd1810": "1850000000000000000000", + "0x518cef27b10582b6d14f69483ddaa0dd3c87bb5c": "600000000000000000000", + "0x59161749fedcf1c721f2202d13ade2abcf460b3d": "2000000000000000000000", + "0x3e36c17253c11cf38974ed0db1b759160da63783": "7000000000000000000000", + "0xcbfa76db04ce38fb205d37b8d377cf1380da0317": "1430000000000000000000", + "0xa7e83772bc200f9006aa2a260dbaa8483dc52b30": "207730000000000000000", + "0xe87eac6d602b4109c9671bf57b950c2cfdb99d55": "49932000000000000000", + "0x9b06ad841dffbe4ccf46f1039fc386f3c321446e": "2000000000000000000000", + "0xe0f903c1e48ac421ab48528f3d4a2648080fe043": "1015200000000000000000", + "0x5d872b122e994ef27c71d7deb457bf65429eca6c": "7999973000000000000000", + "0xf34083ecea385017aa40bdd35ef7effb4ce7762d": "400000000000000000000", + "0x7f3709391f3fbeba3592d175c740e87a09541d02": "480000000000000000000", + "0x888e94917083d152202b53163939869d271175b4": "4000000000000000000000", + "0xbed4c8f006a27c1e5f7ce205de75f516bfb9f764": "16000000000000000000000", + "0xb3a6bd41f9d9c3201e050b87198fbda399342210": "3622615000000000000000", + "0x550aadae1221b07afea39fba2ed62e05e5b7b5f9": "20000000000000000000", + "0xbcedc4267ccb89b31bb764d7211171008d94d44d": "200000000000000000000", + "0x6229dcc203b1edccfdf06e87910c452a1f4d7a72": "32500000000000000000000", + "0x94be3ae54f62d663b0d4cc9e1ea8fe9556ea9ebf": "23280000000000000000", + "0x0e0c9d005ea016c295cd795cc9213e87febc33eb": "198000000000000000000", + "0x55d057bcc04bd0f4af9642513aa5090bb3ff93fe": "1106680000000000000000", + "0xed9e030ca75cb1d29ea01d0d4cdfdccd3844b6e4": "30895000000000000000", + "0x86c4ce06d9ac185bb148d96f7b7abe73f441006d": "10000000000000000000000", + "0x2c04115c3e52961b0dc0b0bf31fba4546f5966fd": "200000000000000000000", + "0xb959dce02e91d9db02b1bd8b7d17a9c41a97af09": "8000000000000000000000", + "0xe01547ba42fcafaf93938becf7699f74290af74f": "2000000000000000000000", + "0xc593d6e37d14b566643ac4135f243caa0787c182": "12000000000000000000000", + "0x2c0ee134d8b36145b47beee7af8d2738dbda08e8": "201000000000000000000", + "0x0ef54ac7264d2254abbb5f8b41adde875157db7c": "40000000000000000000", + "0x0349634dc2a9e80c3f7721ee2b5046aeaaedfbb5": "4000000000000000000000", + "0x873e49135c3391991060290aa7f6ccb8f85a78db": "20000000000000000000", + "0x05236d4c90d065f9e3938358aaffd777b86aec49": "500000000000000000000", + "0xd2abd84a181093e5e229136f42d835e8235de109": "100007000000000000000", + "0xb56a780028039c81caf37b6775c620e786954764": "2000000000000000000000", + "0x86df73bd377f2c09de63c45d67f283eaefa0f4ab": "1000000000000000000000", + "0x7670b02f2c3cf8fd4f4730f3381a71ea431c33c7": "267400000000000000000", + "0x24aa1151bb765fa3a89ca50eb6e1b1c706417fd4": "3100000000000000000000", + "0x43227d65334e691cf231b4a4e1d339b95d598afb": "10000000000000000000000", + "0x695550656cbf90b75d92ad9122d90d23ca68ca4d": "1000000000000000000000", + "0x5281733473e00d87f11e9955e589b59f4ac28e7a": "660360000000000000000000", + "0x99a96bf2242ea1b39ece6fcc0d18aed00c0179f3": "300000000000000000000", + "0xb1cf94f8091505055f010ab4bac696e0ca0f67a1": "1580000000000000000000", + "0x54391b4d176d476cea164e5fb535c69700cb2535": "100076000000000000000", + "0x152f2bd229ddf3cb0fdaf455c183209c0e1e39a2": "2000000000000000000000", + "0xaffc99d5ebb4a84fe7788d97dce274b038240438": "5000000000000000000000", + "0x23df8f48ee009256ea797e1fa369beebcf6bc663": "2302671000000000000000", + "0x3a72d635aadeee4382349db98a1813a4cfeb3df1": "200000000000000000000000", + "0xce26f9a5305f8381094354dbfc92664e84f902b5": "230200000000000000000", + "0xd283b8edb10a25528a4404de1c65e7410dbcaa67": "12000000000000000000000", + "0xa7859fc07f756ea7dcebbccd42f05817582d973f": "10000000000000000000000", + "0xb28181a458a440f1c6bb1de8400281a3148f4c35": "376000000000000000000", + "0x27b1694eafa165ebd7cc7bc99e74814a951419dc": "800000000000000000000", + "0x66cc8ab23c00d1b82acd7d73f38c99e0d05a4fa6": "100000000000000000000", + "0x926082cb7eed4b1993ad245a477267e1c33cd568": "374300000000000000000", + "0x4a47fc3e177f567a1e3893e000e36bba23520ab8": "2000000000000000000000", + "0x594a76f06935388dde5e234696a0668bc20d2ddc": "2800000000000000000000", + "0xe91fa0badaddb9a97e88d3f4db7c55d6bb7430fe": "376000000000000000000", + "0x574de1b3f38d915846ae3718564a5ada20c2f3ed": "4000000000000000000000", + "0x5816c2687777b6d7d2a2432d59a41fa059e3a406": "133700000000000000000000", + "0xb50955aa6e341571986608bdc891c2139f540cdf": "1970000000000000000000", + "0x6d44974a31d187eda16ddd47b9c7ec5002d61fbe": "940000000000000000000", + "0x80abec5aa36e5c9d098f1b942881bd5acac6963d": "2000000000000000000000", + "0x294f494b3f2e143c2ffc9738cbfd9501850b874e": "2240000000000000000000", + "0xbca3ffd4683fba0ad3bbc90734b611da9cfb457e": "200000000000000000000", + "0x5992624c54cdec60a5ae938033af8be0c50cbb0a": "3621678000000000000000", + "0x6560941328ff587cbc56c38c78238a7bb5f442f6": "744900000000000000000", + "0x74b7e0228baed65957aebb4d916d333aae164f0e": "2000000000000000000000", + "0x8516fcaf77c893970fcd1a958ba9a00e49044019": "196279000000000000000", + "0xb992a967308c02b98af91ee760fd3b6b4824ab0e": "2000000000000000000000", + "0x30bb4357cd6910c86d2238bf727cbe8156680e62": "100014000000000000000", + "0xb8cc0f060aad92d4eb8b36b3b95ce9e90eb383d7": "150000000000000000000000", + "0x28d4ebf41e3d3c451e943bdd7e1f175fae932a3d": "6000000000000000000000", + "0x8c83d424a3cf24d51f01923dd54a18d6b6fede7b": "4000000000000000000000", + "0x7efc90766a00bc52372cac97fabd8a3c831f8ecd": "158000000000000000000", + "0x7c2b9603884a4f2e464eceb97d17938d828bc02c": "3000000000000000000000", + "0x9d250ae4f110d71cafc7b0adb52e8d9acb6679b8": "9840000000000000000000", + "0x61b3df2e9e9fd968131f1e88f0a0eb5bd765464d": "4000000000000000000000", + "0x9ae13bd882f2576575921a94974cbea861ba0d35": "3160000000000000000000", + "0x3d09688d93ad07f3abe68c722723cd680990435e": "29999948000000000000000", + "0x5e58e255fc19870a04305ff2a04631f2ff294bb1": "17600000000000000000", + "0xbcaed0acb6a76f113f7c613555a2c3b0f5bf34a5": "193600000000000000000", + "0x159adce27aa10b47236429a34a5ac42cad5b6416": "31867951000000000000000", + "0xe834c64318205ca7dd4a21abcb08266cb21ff02c": "999999000000000000000", + "0x7b6a84718dd86e63338429ac811d7c8a860f21f1": "1790000000000000000000", + "0x2118c116ab0cdf6fd11d54a4309307b477c3fc0f": "10000000000000000000000", + "0x34a901a69f036bcf9f7843c0ba01b426e8c3dc2b": "4000000000000000000000", + "0xc7d44fe32c7f8cd5f1a97427b6cd3afc9e45023e": "1580000000000000000000", + "0xc6045b3c350b4ce9ca0c6b754fb41a69b97e9900": "925000000000000000000", + "0xcf5a6f9df75579c644f794711215b30d77a0ce40": "2000000000000000000000", + "0xe2904b1aefa056398b6234cb35811288d736db67": "40000000000000000000", + "0x7101bd799e411cde14bdfac25b067ac890eab8e8": "1450054000000000000000", + "0xcc45fb3a555bad807b388a0357c855205f7c75e8": "865000000000000000000", + "0xff0c3c7798e8733dd2668152891bab80a8be955c": "80220000000000000000", + "0x3536453322c1466cb905af5c335ca8db74bff1e6": "447000000000000000000", + "0x08cac8952641d8fc526ec1ab4f2df826a5e7710f": "300000000000000000000", + "0x0d8aab8f74ea862cdf766805009d3f3e42d8d00b": "5820000000000000000000", + "0x8908760cd39b9c1e8184e6a752ee888e3f0b7045": "6000000000000000000000", + "0x8156360bbd370961ceca6b6691d75006ad204cf2": "40000000000000000000000", + "0xa304588f0d850cd8d38f76e9e83c1bf63e333ede": "39800000000000000000", + "0x14c63ba2dcb1dd4df33ddab11c4f0007fa96a62d": "15500000000000000000000", + "0xa009bf076f1ba3fa57d2a7217218bed5565a7a7a": "1000000000000000000000", + "0x1c89060f987c518fa079ec2c0a5ebfa30f5d20f7": "38000000000000000000000", + "0x8895eb726226edc3f78cc6a515077b3296fdb95e": "3940000000000000000000", + "0x7919e7627f9b7d54ea3b14bb4dd4649f4f39dee0": "1670000000000000000000", + "0xb3c65b845aba6cd816fbaae983e0e46c82aa8622": "1000000000000000000000", + "0xeff51d72adfae143edf3a42b1aec55a2ccdd0b90": "300000000000000000000", + "0x05bb64a916be66f460f5e3b64332110d209e19ae": "4200000000000000000000", + "0xd5b117ec116eb846418961eb7edb629cd0dd697f": "3000000000000000000000", + "0x05e97b09492cd68f63b12b892ed1d11d152c0eca": "1015200000000000000000", + "0x84cc7878da605fdb019fab9b4ccfc157709cdda5": "1336922000000000000000", + "0x79cac6494f11ef2798748cb53285bd8e22f97cda": "2000000000000000000000", + "0xbd5a8c94bd8be6470644f70c8f8a33a8a55c6341": "200000000000000000000", + "0xb119e79aa9b916526581cbf521ef474ae84dcff4": "1470700000000000000000", + "0xaff1045adf27a1aa329461b24de1bae9948a698b": "33400000000000000000", + "0x4398628ea6632d393e929cbd928464c568aa4a0c": "1400000000000000000000", + "0x99997668f7c1a4ff9e31f9977ae3224bcb887a85": "291200000000000000000", + "0xbc0e8745c3a549445c2be900f52300804ab56289": "33104697000000000000000", + "0xe5bab4f0afd8a9d1a381b45761aa18f3d3cce105": "1508010000000000000000", + "0xbe60037e90714a4b917e61f193d834906703b13a": "1700000000000000000000", + "0x8ed4284c0f47449c15b8d9b3245de8beb6ce80bf": "800000000000000000000", + "0x333ad1596401e05aea2d36ca47318ef4cd2cb3df": "2910000000000000000000", + "0x22db559f2c3c1475a2e6ffe83a5979599196a7fa": "1000000000000000000000", + "0xfdf449f108c6fb4f5a2b081eed7e45e6919e4d25": "2000000000000000000000", + "0x0be1bcb90343fae5303173f461bd914a4839056c": "6000000000000000000000", + "0xb981ad5e6b7793a23fc6c1e8692eb2965d18d0da": "9999924000000000000000", + "0xc75d2259306aec7df022768c69899a652185dbc4": "4000000000000000000000", + "0x6c2e9be6d4ab450fd12531f33f028c614674f197": "3580000000000000000000", + "0x6dcc7e64fcafcbc2dc6c0e5e662cb347bffcd702": "20000000000000000000000", + "0xaabdb35c1514984a039213793f3345a168e81ff1": "309760000000000000000", + "0xd315deea1d8c1271f9d1311263ab47c007afb6f5": "69760000000000000000", + "0x4faf90b76ecfb9631bf9022176032d8b2c207009": "1000032000000000000000", + "0x3e7a966b5dc357ffb07e9fe067c45791fd8e3049": "59100000000000000000", + "0x2e64a8d71111a22f4c5de1e039b336f68d398a7c": "2000000000000000000000", + "0x181fbba852a7f50178b1c7f03ed9e58d54162929": "666000000000000000000", + "0x4f7330096f79ed264ee0127f5d30d2f73c52b3d8": "499970000000000000000", + "0xa8a8dbdd1a85d1beee2569e91ccc4d09ae7f6ea1": "5800000000000000000000", + "0x1f9c3268458da301a2be5ab08257f77bb5a98aa4": "200000000000000000000", + "0xfc372ff6927cb396d9cf29803500110da632bc52": "2000000000000000000000", + "0x4fa554ab955c249217386a4d3263bbf72895434e": "19982000000000000000", + "0x2a59e47ea5d8f0e7c028a3e8e093a49c1b50b9a3": "2000000000000000000000", + "0x5e32c72191b8392c55f510d8e3326e3a60501d62": "44000000000000000000000", + "0x1dfaee077212f1beaf0e6f2f1840537ae154ad86": "1000000000000000000000", + "0x7eaba035e2af3793fd74674b102540cf190addb9": "1273000000000000000000", + "0xd62edb96fce2969aaf6c545e967cf1c0bc805205": "85705000000000000000", + "0x220dc68df019b6b0ccbffb784b5a5ab4b15d4060": "3940000000000000000000", + "0x45bb829652d8bfb58b8527f0ecb621c29e212ec3": "2000000000000000000000", + "0x79b120eb8806732321288f675a27a9225f1cd2eb": "2465000000000000000000", + "0x740af1eefd3365d78ba7b12cb1a673e06a077246": "19700000000000000000000", + "0x0f042c9c2fb18766f836bb59f735f27dc329fe3c": "10000000000000000000000", + "0x6dda5f788a6c688ddf921fa3852eb6d6c6c62966": "40000000000000000000", + "0x96ad579bbfa8db8ebec9d286a72e4661eed8e356": "1070750000000000000000", + "0x0c2073ba44d3ddbdb639c04e191039a71716237f": "1430000000000000000000", + "0x1a3520453582c718a21c42375bc50773255253e1": "790000000000000000000", + "0xefcaae9ff64d2cd95b5249dcffe7faa0a0c0e44d": "401100000000000000000", + "0x0a3de155d5ecd8e81c1ff9bbf0378301f8d4c623": "4000000000000000000000", + "0x80f07ac09e7b2c3c0a3d1e9413a544c73a41becb": "20000000000000000000", + "0xc3631c7698b6c5111989bf452727b3f9395a6dea": "10683500000000000000000", + "0x4cc22c9bc9ad05d875a397dbe847ed221c920c67": "2000000000000000000000", + "0x1a987e3f83de75a42f1bde7c997c19217b4a5f24": "2000000000000000000000", + "0x5b2b64e9c058e382a8b299224eecaa16e09c8d92": "161000000000000000000", + "0x86caafacf32aa0317c032ac36babed974791dc03": "40000000000000000000000", + "0x1cd1f0a314cbb200de0a0cb1ef97e920709d97c2": "2000000000000000000000", + "0x7d980f4b566bb045517e4c14c87750de9346744b": "1337000000000000000000", + "0x8b5f29cc2faa262cdef30ef554f50eb488146eac": "5818250000000000000000", + "0x5153a0c3c8912881bf1c3501bf64b45649e48222": "4000000000000000000000", + "0xd21a7341eb84fd151054e5e387bb25d36e499c09": "14000000000000000000000", + "0x9560e8ac6718a6a1cdcff189d603c9063e413da6": "4000000000000000000000", + "0xe49ba0cd96816c4607773cf8a5970bb5bc16a1e6": "1670000000000000000000", + "0xb8ac117d9f0dba80901445823c4c9d4fa3fedc6e": "15759015000000000000000", + "0xaf67fd3e127fd9dc36eb3fcd6a80c7be4f7532b2": "1670000000000000000000", + "0xb43c27f7a0a122084b98f483922541c8836cee2c": "715000000000000000000", + "0x4d9279962029a8bd45639737e98b511eff074c21": "1337000000000000000000", + "0xc667441e7f29799aba616451d53b3f489f9e0f48": "13920000000000000000000", + "0x275875ff4fbb0cf3a430213127487f7608d04cba": "500080000000000000000", + "0x9a953b5bcc709379fcb559d7b916afdaa50cadcc": "100000000000000000000", + "0x7ea791ebab0445a00efdfc4e4a8e9a7e7565136d": "18200000000000000000", + "0x6ffe5cf82cc9ea5e36cad7c2974ce7249f3749e6": "1940000000000000000000", + "0xf1b4ecc63525f7432c3d834ffe2b970fbeb87212": "3000064000000000000000", + "0x6b72a8f061cfe6996ad447d3c72c28c0c08ab3a7": "4271316000000000000000", + "0xbba3c68004248e489573abb2743677066b24c8a7": "2000000000000000000000", + "0xb7c0d0cc0b4d342d4062bac624ccc3c70cc6da3f": "4000000000000000000000", + "0xfe98c664c3e447a95e69bd582171b7176ea2a685": "4000000000000000000000", + "0xce71086d4c602554b82dcbfce88d20634d53cc4d": "43250000000000000000000", + "0x1c601993789207f965bb865cbb4cd657cce76fc0": "98294000000000000000", + "0x476b5599089a3fb6f29c6c72e49b2e4740ea808d": "2800000000000000000000", + "0x3439998b247cb4bf8bc80a6d2b3527f1dfe9a6d2": "140000000000000000000", + "0xc4f7d2e2e22084c44f70feaab6c32105f3da376f": "1970000000000000000000", + "0xc1eba5684aa1b24cba63150263b7a9131aeec28d": "20000000000000000000", + "0x94ad4bad824bd0eb9ea49c58cebcc0ff5e08346b": "1940000000000000000000", + "0xded877378407b94e781c4ef4af7cfc5bc220b516": "372500000000000000000", + "0x699c9ee47195511f35f862ca4c22fd35ae8ffbf4": "80000000000000000000", + "0xe3a89a1927cc4e2d43fbcda1e414d324a7d9e057": "205500000000000000000", + "0x4d93696fa24859f5d2939aebfa54b4b51ae1dccc": "19100000000000000000", + "0x0af65f14784e55a6f95667fd73252a1c94072d2a": "192987000000000000000", + "0x5b70c49cc98b3df3fbe2b1597f5c1b6347a388b7": "970000000000000000000", + "0x426f78f70db259ac8534145b2934f4ef1098b5d8": "360000000000000000000", + "0x58b8ae8f63ef35ed0762f0b6233d4ac14e64b64d": "2000000000000000000000", + "0x8eae29435598ba8f1c93428cdb3e2b4d31078e00": "2000000000000000000000", + "0x17fd9b551a98cb61c2e07fbf41d3e8c9a530cba5": "26989000000000000000", + "0xab3e78294ba886a0cfd5d3487fb3a3078d338d6e": "1970000000000000000000", + "0xbdf6e68c0cd7584080e847d72cbb23aad46aeb1d": "1970000000000000000000", + "0xf989346772995ec1906faffeba2a7fe7de9c6bab": "6685000000000000000000", + "0xdc5f5ad663a6f263327d64cac9cb133d2c960597": "2000000000000000000000", + "0x68fe1357218d095849cd579842c4aa02ff888d93": "2000000000000000000000", + "0xe09c68e61998d9c81b14e4ee802ba7adf6d74cdb": "4000000000000000000000", + "0x890fe11f3c24db8732d6c2e772e2297c7e65f139": "62980000000000000000000", + "0xa76929890a7b47fb859196016c6fdd8289ceb755": "5000000000000000000000", + "0x2dc79d6e7f55bce2e2d0c02ad07ceca8bb529354": "1580000000000000000000", + "0x19687daa39c368139b6e7be60dc1753a9f0cbea3": "8000000000000000000000", + "0xc69be440134d6280980144a9f64d84748a37f349": "715000000000000000000", + "0x3d8d0723721e73a6c0d860aa0557abd14c1ee362": "5000000000000000000000", + "0x2b241f037337eb4acc61849bd272ac133f7cdf4b": "378000000000000000000000", + "0x24b95ebef79500baa0eda72e77f877415df75c33": "910000000000000000000", + "0x106ed5c719b5261477890425ae7551dc59bd255c": "11979600000000000000000", + "0x5b2e2f1618552eab0db98add55637c2951f1fb19": "12000000000000000000000", + "0x403145cb4ae7489fcc90cd985c6dc782b3cc4e44": "5999800000000000000000", + "0xe8be24f289443ee473bc76822f55098d89b91cc5": "2000000000000000000000", + "0xf6bc37b1d2a3788d589b6de212dc1713b2f6e78e": "5000000000000000000000", + "0x67fc527dce1785f0fb8bc7e518b1c669f7ecdfb5": "240000000000000000000", + "0x6580b1bc94390f04b397bd73e95d96ef11eaf3a8": "20000000000000000000", + "0x98bf4af3810b842387db70c14d46099626003d10": "4000000000000000000000", + "0x17993d312aa1106957868f6a55a5e8f12f77c843": "450065000000000000000", + "0x0729b4b47c09eb16158464c8aa7fd9690b438839": "1999800000000000000000", + "0xae70e69d2c4a0af818807b1a2705f79fd0b5dbc4": "985000000000000000000", + "0x38b50146e71916a5448de12a4d742135dcf39833": "32200000000000000000000", + "0x38439aaa24e3636f3a18e020ea1da7e145160d86": "2600000000000000000000", + "0x54b4429b182f0377be7e626939c5db6440f75d7a": "1970000000000000000000", + "0x7179726f5c71ae1b6d16a68428174e6b34b23646": "7353500000000000000000", + "0xc2ee91d3ef58c9d1a589844ea1ae3125d6c5ba69": "970000000000000000000", + "0x912304118b80473d9e9fe3ee458fbe610ffda2bb": "200000000000000000000", + "0x3308b03466c27a17dfe1aafceb81e16d2934566f": "17000000000000000000000", + "0x10346414bec6d3dcc44e50e54d54c2b8c3734e3e": "4000000000000000000000", + "0x4fee50c5f988206b09a573469fb1d0b42ebb6dce": "2009400000000000000000", + "0x9ece1400800936c7c6485fcdd3626017d09afbf6": "310000000000000000000", + "0xddf3ad76353810be6a89d731b787f6f17188612b": "20000000000000000000000", + "0x72402300e81d146c2e644e2bbda1da163ca3fb56": "7000000000000000000000", + "0xbb4b4a4b548070ff41432c9e08a0ca6fa7bc9f76": "850000000000000000000", + "0xc3dd58903886303b928625257ae1a013d71ae216": "2000000000000000000000", + "0xca6c818befd251361e02744068be99d8aa60b84a": "6000000000000000000000", + "0xb8d2ddc66f308c0158ae3ccb7b869f7d199d7b32": "844800000000000000000", + "0x8e486a0442d171c8605be348fee57eb5085eff0d": "4000000000000000000000", + "0xa807104f2703d679f8deafc442befe849e42950b": "2000000000000000000000", + "0xbb61a04bffd57c10470d45c39103f64650347616": "1000000000000000000000", + "0xd1c45954a62b911ad701ff2e90131e8ceb89c95c": "1394000000000000000000", + "0x5e65458be964ae449f71773704979766f8898761": "528600000000000000000", + "0xf9b37825f03073d31e249378c30c795c33f83af2": "200152000000000000000", + "0xe309974ce39d60aadf2e69673251bf0e04760a10": "254030000000000000000", + "0xd541ac187ad7e090522de6da3213e9a7f4439673": "2000000000000000000000", + "0xf33efc6397aa65fb53a8f07a0f893aae30e8bcee": "2304850000000000000000", + "0xd2f1998e1cb1580cec4f6c047dcd3dcec54cf73c": "200000000000000000000", + "0x0ed76c2c3b5d50ff8fb50b3eeacd681590be1c2d": "100000000000000000000", + "0x637d67d87f586f0a5a479e20ee13ea310a10b647": "48300000000000000000000", + "0x1a5ee533acbfb3a2d76d5b685277b796c56a052b": "2000000000000000000000", + "0x323fca5ed77f699f9d9930f5ceeff8e56f59f03c": "1337000000000000000000", + "0xa5fe2ce97f0e8c3856be0de5f4dcb2ce5d389a16": "22892000000000000000", + "0x93258255b37c7f58f4b10673a932dd3afd90f4f2": "1000000000000000000000", + "0x950fe9c6cad50c18f11a9ed9c45740a6180612d0": "8000000000000000000000", + "0xee31167f9cc93b3c6465609d79db0cde90e8484c": "2000000000000000000000", + "0x6ebb5e6957aa821ef659b6018a393a504cae4450": "2000000000000000000000", + "0xbe305a796e33bbf7f9aeae6512959066efda1010": "10880000000000000000000", + "0x537f9d4d31ef70839d84b0d9cdb72b9afedbdf35": "70000000000000000000000", + "0xfe9e1197d7974a7648dcc7a03112a88edbc9045d": "4925000000000000000000", + "0x99f77f998b20e0bcdcd9fc838641526cf25918ef": "1790000000000000000000", + "0x76ffc157ad6bf8d56d9a1a7fddbc0fea010aabf4": "1000000000000000000000", + "0xdefe9141f4704599159d7b223de42bffd80496b3": "100000000000000000000", + "0x7b1bf53a9cbe83a7dea434579fe72aac8d2a0cd0": "199800000000000000000", + "0x23ccc3c6acd85c2e460c4ffdd82bc75dc849ea14": "4000000000000000000000", + "0x9f86a066edb61fcb5856de93b75c8c791864b97b": "2000000000000000000000", + "0x871b8a8b51dea1989a5921f13ec1a955a515ad47": "8000000000000000000000", + "0x4efcd9c79fb4334ca6247b0a33bd9cc33208e272": "1337000000000000000000", + "0x35ac1d3ed7464fa3db14e7729213ceaa378c095e": "1520000000000000000000", + "0xc69d663c8d60908391c8d236191533fdf7775613": "485000000000000000000", + "0xc2ed5ffdd1add855a2692fe062b5d618742360d4": "1200000000000000000000", + "0x454f0141d721d33cbdc41018bd01119aa4784818": "6000000000000000000000", + "0x6c8687e3417710bb8a93559021a1469e6a86bc77": "11126675000000000000000", + "0xec5b198a00cfb55a97b5d53644cffa8a04d2ab45": "2000000000000000000000", + "0xcd59f3dde77e09940befb6ee58031965cae7a336": "10000000000000000000000", + "0x8eebec1a62c08b05a7d1d59180af9ff0d18e3f36": "500000000000000000000", + "0x92a971a739799f8cb48ea8475d72b2d2474172e6": "3940000000000000000000", + "0xbed4649df646e2819229032d8868556fe1e053d3": "18200000000000000000", + "0xc50fe415a641b0856c4e75bf960515441afa358d": "2000000000000000000000", + "0x91f516146cda20281719978060c6be4149067c88": "2000000000000000000000", + "0x54a1370116fe22099e015d07cd2669dd291cc9d1": "20000000000000000000", + "0x80c04efd310f440483c73f744b5b9e64599ce3ec": "1200000000000000000000", + "0xa8914c95b560ec13f140577338c32bcbb77d3a7a": "180000000000000000000", + "0xe3c812737ac606baf7522ad817428a36050e7a34": "1940000000000000000000", + "0x6d1456fff0104ee844a3314737843338d24cd66c": "141840000000000000000", + "0x0e6ece99111cad1961c748ed3df51edd69d2a3b1": "100000000000000000000000", + "0x019d709579ff4bc09fdcdde431dc1447d2c260bc": "20000000000000000000", + "0xebff84bbef423071e604c361bba677f5593def4e": "10000000000000000000000", + "0xe10c540088113fa6ec00b4b2c8824f8796e96ec4": "236400000000000000000000", + "0xe03220c697bcd28f26ef0b74404a8beb06b2ba7b": "8000000000000000000000", + "0xe69a6cdb3a8a7db8e1f30c8b84cd73bae02bc0f8": "16915503000000000000000", + "0xe5fb31a5caee6a96de393bdbf89fbe65fe125bb3": "1000000000000000000000", + "0x030fb3401f72bd3418b7d1da75bf8c519dd707dc": "3000000000000000000000", + "0x1c751e7f24df9d94a637a5dedeffc58277b5db19": "3220000000000000000000", + "0xbded7e07d0711e684de65ac8b2ab57c55c1a8645": "591000000000000000000", + "0xdd7ff441ba6ffe3671f3c0dabbff1823a5043370": "2000000000000000000000", + "0xb55474ba58f0f2f40e6cbabed4ea176e011fcad6": "1970000000000000000000", + "0xb92427ad7578b4bfe20a9f63a7c5506d5ca12dc8": "2000000000000000000000", + "0x91a8baaed012ea2e63803b593d0d0c2aab4c5b0a": "1500000000000000000000", + "0xa97e072144499fe5ebbd354acc7e7efb58985d08": "2674000000000000000000", + "0x75c2ffa1bef54919d2097f7a142d2e14f9b04a58": "2673866000000000000000", + "0x53faf165be031ec18330d9fce5bd1281a1af08db": "140000000000000000000", + "0x055ab658c6f0ed4f875ed6742e4bc7292d1abbf0": "83500000000000000000", + "0x6f18ec767e320508195f1374500e3f2e125689ff": "1000000000000000000000", + "0x90fc537b210658660a83baa9ac4a8402f65746a8": "1880000000000000000000", + "0x34664d220fa7f37958024a3332d684bcc6d4c8bd": "10000000000000000000000", + "0x15acb61568ec4af7ea2819386181b116a6c5ee70": "31000000000000000000000", + "0x69d98f38a3ba3dbc01fa5c2c1427d862832f2f70": "100000000000000000000000", + "0xece1152682b7598fe2d1e21ec15533885435ac85": "4000000000000000000000", + "0xf618d9b104411480a863e623fc55232d1a4f48aa": "265793000000000000000", + "0xf9debaecb5f339beea4894e5204bfa340d067f25": "1665000000000000000000", + "0x5e731b55ced452bb3f3fe871ddc3ed7ee6510a8f": "3000000000000000000000", + "0x67df242d240dd4b8071d72f8fcf35bb3809d71e8": "4000000000000000000000", + "0xc4cf930e5d116ab8d13b9f9a7ec4ab5003a6abde": "320000000000000000000", + "0x01a25a5f5af0169b30864c3be4d7563ccd44f09e": "1430000000000000000000", + "0x7f6efb6f4318876d2ee624e27595f44446f68e93": "1550000000000000000000", + "0x82249fe70f61c6b16f19a324840fdc020231bb02": "9504014000000000000000", + "0x205237c4be146fba99478f3a7dad17b09138da95": "2000000000000000000000", + "0xfd1fb5a89a89a721b8797068fbc47f3e9d52e149": "236400000000000000000", + "0xe47fbaed99fc209962604ebd20e240f74f4591f1": "2000000000000000000000", + "0xa24c3ab62181e9a15b78c4621e4c7c588127be26": "162410000000000000000", + "0xb6cd7432d5161be79768ad45de3e447a07982063": "4000000000000000000000", + "0x32a70691255c9fc9791a4f75c8b81f388e0a2503": "985000000000000000000", + "0x562f16d79abfcec3943e34b20f05f97bdfcda605": "4000000000000000000000", + "0xdbc66965e426ff1ac87ad6eb78c1d95271158f9f": "18200000000000000000", + "0x7e87863ec43a481df04d017762edcb5caa629b5a": "39400000000000000000", + "0x587d6849b168f6c3332b7abae7eb6c42c37f48bf": "880000000000000000000", + "0x721158be5762b119cc9b2035e88ee4ee78f29b82": "10000000000000000000000", + "0x84b91e2e2902d05e2b591b41083bd7beb2d52c74": "9848621000000000000000", + "0x632cecb10cfcf38ec986b43b8770adece9200221": "20000000000000000000", + "0xc34e3ba1322ed0571183a24f94204ee49c186641": "58200000000000000000", + "0xae78bb849139a6ba38ae92a09a69601cc4cb62d1": "500000000000000000000", + "0x5ce0b6862cce9162e87e0849e387cb5df4f9118c": "1670000000000000000000", + "0xf52c0a7877345fe0c233bb0f04fd6ab18b6f14ba": "400440000000000000000000", + "0xe016dc138e25815b90be3fe9eee8ffb2e105624f": "500000000000000000000", + "0x5789d01db12c816ac268e9af19dc0dd6d99f15df": "200000000000000000000", + "0xd8b77db9b81bbe90427b62f702b201ffc29ff618": "930200000000000000000", + "0x5dff811dad819ece3ba602c383fb5dc64c0a3a48": "186000000000000000000", + "0xaf3087e62e04bf900d5a54dc3e946274da92423b": "20000000000000000000", + "0x8c1023fde1574db8bb54f1739670157ca47da652": "6969382000000000000000", + "0xbb3b010b18e6e2be1135871026b7ba15ea0fde24": "10044000000000000000000", + "0xcabdaf354f4720a466a764a528d60e3a482a393c": "1000000000000000000000", + "0x94bbc67d13f89ebca594be94bc5170920c30d9f3": "80200000000000000000", + "0x3275496fd4dd8931fd69fb0a0b04c4d1ff879ef5": "446000000000000000000", + "0x281250a29121270a4ee5d78d24feafe82c70ba3a": "1000000000000000000000", + "0x590ccb5911cf78f6f622f535c474375f4a12cfcf": "20000000000000000000000", + "0x542e8096bafb88162606002e8c8a3ed19814aeac": "2000000000000000000000", + "0xa65426cff378ed23253513b19f496de45fa7e18f": "7200000000000000000000", + "0x4aa693b122f314482a47b11cc77c68a497876162": "1970000000000000000000", + "0xd9b783d31d32adc50fa3eacaa15d92b568eaeb47": "34010000000000000000000", + "0x068e655766b944fb263619658740b850c94afa31": "35200000000000000000", + "0x9e23c5e4b782b00a5fadf1aead87dacf5b0367a1": "20000000000000000000", + "0xbf17f397f8f46f1bae45d187148c06eeb959fa4d": "1001440000000000000000", + "0x8578e10212ca14ff0732a8241e37467db85632a9": "6000000000000000000000", + "0x2cb5495a505336c2465410d1cae095b8e1ba5cdd": "20000000000000000000000", + "0x695b0f5242753701b264a67071a2dc880836b8db": "16400000000000000000", + "0xf2edde37f9a8c39ddea24d79f4015757d06bf786": "100000000000000000000000", + "0x480f31b989311e4124c6a7465f5a44094d36f9d0": "1025000000000000000000", + "0xcf157612764e0fd696c8cb5fba85df4c0ddc3cb0": "30000000000000000000000", + "0x27521deb3b6ef1416ea4c781a2e5d7b36ee81c61": "2000000000000000000000", + "0x6efd90b535e00bbd889fda7e9c3184f879a151db": "10100000000000000000000", + "0xb635a4bc71fb28fdd5d2c322983a56c284426e69": "170000000000000000000", + "0xa17c9e4323069518189d5207a0728dcb92306a3f": "1000000000000000000000", + "0x6af940f63ec9b8d876272aca96fef65cdacecdea": "3000000000000000000000", + "0x469358709332c82b887e20bcddd0220f8edba7d0": "17300000000000000000000", + "0xa257ad594bd88328a7d90fc0a907df95eecae316": "520510000000000000000", + "0x6f051666cb4f7bd2b1907221b829b555d7a3db74": "1760000000000000000000", + "0x46bfc5b207eb2013e2e60f775fecd71810c5990c": "1550000000000000000000", + "0x62b9081e7710345e38e02e16449ace1b85bcfc4e": "910000000000000000000", + "0xbc73f7b1ca3b773b34249ada2e2c8a9274cc17c2": "2000000000000000000000", + "0x1adaf4abfa867db17f99af6abebf707a3cf55df6": "6000000000000000000000", + "0x8d629c20608135491b5013f1002586a0383130e5": "1370000000000000000000", + "0x38e46de4453c38e941e7930f43304f94bb7b2be8": "2005500000000000000000", + "0x3485f621256433b98a4200dad857efe55937ec98": "2000000000000000000000", + "0x775c10c93e0db7205b2643458233c64fc33fd75b": "2000000000000000000000", + "0x7c4401ae98f12ef6de39ae24cf9fc51f80eba16b": "200000000000000000000", + "0x17b807afa3ddd647e723542e7b52fee39527f306": "400010000000000000000", + "0x0ab366e6e7d5abbce6b44a438d69a1cabb90d133": "320000000000000000000", + "0x194ffe78bbf5d20dd18a1f01da552e00b7b11db1": "7000000000000000000000", + "0xc45d47ab0c9aa98a5bd62d16223ea2471b121ca4": "593640000000000000000", + "0x2487c3c4be86a2723d917c06b458550170c3edba": "1000000000000000000000", + "0xec4d08aa2e47496dca87225de33f2b40a8a5b36f": "158000000000000000000", + "0xaaa8defe11e3613f11067fb983625a08995a8dfc": "200000000000000000000", + "0x50bb67c8b8d8bd0f63c4760904f2d333f400aace": "2000000000000000000000", + "0x1227e10a4dbf9caca31b1780239f557615fc35c1": "200000000000000000000", + "0x44a8989e32308121f72466978db395d1f76c3a4b": "7236900000000000000000", + "0x59569a21d28fba4bda37753405a081f2063da150": "4000000000000000000000", + "0xc3756bcdcc7eec74ed896adfc335275930266e08": "6000000000000000000000", + "0xce3a61f0461b00935e85fa1ead82c45e5a64d488": "500000000000000000000", + "0x012f396a2b5eb83559bac515e5210df2c8c362ba": "200000000000000000000", + "0x93bc7d9a4abd44c8bbb8fe8ba804c61ad8d6576c": "3999922000000000000000", + "0xe20bb9f3966419e14bbbaaaa6789e92496cfa479": "3465116000000000000000", + "0x9eef442d291a447d74c5d253c49ef324eac1d8f0": "3420000000000000000000", + "0xdb6c2a73dac7424ab0d031b66761122566c01043": "3000000000000000000000", + "0x704d243c2978e46c2c86adbecd246e3b295ff633": "2012000000000000000000", + "0xd2ff672016f63b2f85398f4a6fedbb60a50d3cce": "342500000000000000000", + "0xd2051cb3cb6704f0548cc890ab0a19db3415b42a": "334000000000000000000", + "0x1111e5dbf45e6f906d62866f1708101788ddd571": "1300200000000000000000", + "0x6a686bf220b593deb9b7324615fb9144ded3f39d": "1460000000000000000000", + "0x911feea61fe0ed50c5b9e5a0d66071399d28bdc6": "60000000000000000000", + "0x3881defae1c07b3ce04c78abe26b0cdc8d73f010": "200000000000000000000", + "0xea94f32808a2ef8a9bf0861d1d2404f7b7be258a": "20000000000000000000", + "0x2eef6b1417d7b10ecfc19b123a8a89e73e526c58": "600000000000000000000", + "0xdd8af9e7765223f4446f44d3d509819a3d3db411": "10000000000000000000000", + "0x2efc4c647dac6acac35577ad221758fef6616faa": "8000000000000000000000", + "0x1547b9bf7ad66274f3413827231ba405ee8c88c1": "17300000000000000000000", + "0x250a40cef3202397f240469548beb5626af4f23c": "92500000000000000000", + "0xc175be3194e669422d15fee81eb9f2c56c67d9c9": "200000000000000000000", + "0xc9e02608066828848aeb28c73672a12925181f4d": "500038000000000000000", + "0x8229ceb9f0d70839498d44e6abed93c5ca059f5d": "123300000000000000000000", + "0x39f198331e4b21c1b760a3155f4ab2fe00a74619": "2000000000000000000000", + "0x3ffcb870d4023d255d5167d8a507cefc366b68ba": "649400000000000000000", + "0x00dae27b350bae20c5652124af5d8b5cba001ec1": "40000000000000000000", + "0xfc5500825105cf712a318a5e9c3bfc69c89d0c12": "4000000000000000000000", + "0x1ed8bb3f06778b039e9961d81cb71a73e6787c8e": "2000000000000000000000", + "0x530ffac3bc3412e2ec0ea47b7981c770f5bb2f35": "133700000000000000000", + "0x5f344b01c7191a32d0762ac188f0ec2dd460911d": "1000000000000000000000", + "0x5cfa9877f719c79d9e494a08d1e41cf103fc87c9": "200000000000000000000", + "0xf6eaac7032d492ef17fd6095afc11d634f56b382": "500038000000000000000", + "0x962c0dec8a3d464bf39b1215eafd26480ae490cd": "2001680000000000000000", + "0x262a8bfd7d9dc5dd3ad78161b6bb560824373655": "1169820000000000000000", + "0x9b4824ff9fb2abda554dee4fb8cf549165570631": "20000000000000000000", + "0xbb3b9005f46fd2ca3b30162599928c77d9f6b601": "8000014000000000000000", + "0xf7dc251196fbcbb77c947d7c1946b0ff65021cea": "1000000000000000000000", + "0xaf1148ef6c8e103d7530efc91679c9ac27000993": "200000000000000000000", + "0x0bb2650ea01aca755bc0c017b64b1ab5a66d82e3": "1337000000000000000000", + "0x0cda12bf72d461bbc479eb92e6491d057e6b5ad1": "10000000000000000000000", + "0x4e5b77f9066159e615933f2dda7477fa4e47d648": "200000000000000000000", + "0x391161b0e43c302066e8a68d2ce7e199ecdb1d57": "4000000000000000000000", + "0xc7e330cd0c890ac99fe771fcc7e7b009b7413d8a": "4000000000000000000000", + "0xd4b38a5fdb63e01714e9801db47bc990bd509183": "5999000000000000000000", + "0xbc0f98598f88056a26339620923b8f1eb074a9fd": "200000000000000000000", + "0xdbc59ed88973dead310884223af49763c05030f1": "20000000000000000000", + "0x0f85e42b1df321a4b3e835b50c00b06173968436": "985000000000000000000", + "0xd7788ef28658aa06cc53e1f3f0de58e5c371be78": "6685000000000000000000", + "0xecd276af64c79d1bd9a92b86b5e88d9a95eb88f8": "20000000000000000000", + "0x81c9e1aee2d3365d53bcfdcd96c7c538b0fd7eec": "1820000000000000000000", + "0x5d39ef9ea6bdfff15d11fe91f561a6f9e31f5da5": "2000000000000000000000", + "0x99878f9d6e0a7ed9aec78297b73879a80195afe0": "3980000000000000000000", + "0x7294c918b1aefb4d25927ef9d799e71f93a28e85": "197000000000000000000", + "0xa33f70da7275ef057104dfa7db64f472e9f5d553": "80220000000000000000", + "0x255bdd6474cc8262f26a22c38f45940e1ceea69b": "4000000000000000000000", + "0x52f8b509fee1a874ab6f9d87367fbeaf15ac137f": "1000000000000000000000", + "0xe2728a3e8c2aaac983d05dc6877374a8f446eee9": "197600000000000000000", + "0xed0206cb23315128f8caff26f6a30b985467d022": "40000000000000000000000", + "0x87cf36ad03c9eae9053abb5242de9117bb0f2a0b": "500000000000000000000", + "0xa929c8bd71db0c308dac06080a1747f21b1465aa": "500000000000000000000", + "0x9da6e075989c7419094cc9f6d2e49393bb199688": "11100000000000000000000", + "0x763eece0b08ac89e32bfa4bece769514d8cb5b85": "4000000000000000000000", + "0x5df3277ca85936c7a0d2c0795605ad25095e7159": "2000000000000000000000", + "0x7163758cbb6c4c525e0414a40a049dcccce919bb": "200000000000000000000", + "0x14cdddbc8b09e6675a9e9e05091cb92238c39e1e": "5100000000000000000000", + "0xb3b7f493b44a2c8d80ec78b1cdc75a652b73b06c": "2000000000000000000000", + "0xc69b855539ce1b04714728eec25a37f367951de7": "2000000000000000000000", + "0x052eab1f61b6d45517283f41d1441824878749d0": "4000000000000000000000", + "0x515651d6db4faf9ecd103a921bbbbe6ae970fdd4": "20000000000000000000000", + "0xc7aff91929797489555a2ff1d14d5c695a108355": "1000000000000000000000", + "0xd7ca7fdcfebe4588eff5421d1522b61328df7bf3": "4001070000000000000000", + "0xeefba12dfc996742db790464ca7d273be6e81b3e": "1000000000000000000000", + "0xebaa216de9cc5a43031707d36fe6d5bedc05bdf0": "1969606000000000000000", + "0x559194304f14b1b93afe444f0624e053c23a0009": "400000000000000000000", + "0x4ecc19948dd9cd87b4c7201ab48e758f28e7cc76": "500200000000000000000", + "0xf224eb900b37b4490eee6a0b6420d85c947d8733": "970000000000000000000", + "0x97810bafc37e84306332aacb35e92ad911d23d24": "1000000000000000000000", + "0xbd67d2e2f82da8861341bc96a2c0791fddf39e40": "200014000000000000000", + "0x1b6495891240e64e594493c2662171db5e30ce13": "172400000000000000000", + "0x00bdd4013aa31c04616c2bc9785f2788f915679b": "13400000000000000000", + "0xc6ae287ddbe1149ba16ddcca4fe06aa2eaa988a9": "400000000000000000000", + "0xb7c9f12b038e73436d17e1c12ffe1aeccdb3f58c": "540000000000000000000", + "0xc1b500011cfba95d7cd636e95e6cbf6167464b25": "200000000000000000000", + "0x39e0db4d60568c800b8c5500026c2594f5768960": "1000000000000000000000", + "0x40e3c283f7e24de0410c121bee60a5607f3e29a6": "1000000000000000000000", + "0x2f7d3290851be5c6b4b43f7d4574329f61a792c3": "100000000000000000000", + "0xc33ece935a8f4ef938ea7e1bac87cb925d8490ca": "33122000000000000000000", + "0x57bddf078834009c89d88e6282759dc45335b470": "2148000000000000000000", + "0x50ad187ab21167c2b6e78be0153f44504a07945e": "100076000000000000000", + "0x5bd24aac3612b20c609eb46779bf95698407c57c": "1970000000000000000000", + "0x16526c9edf943efa4f6d0f0bae81e18b31c54079": "985000000000000000000", + "0x4c6a9dc2cab10abb2e7c137006f08fecb5b779e1": "499000000000000000000", + "0x02c9f7940a7b8b7a410bf83dc9c22333d4275dd3": "5000000000000000000000", + "0xb9fd3833e88e7cf1fa9879bdf55af4b99cd5ce3f": "1000000000000000000000", + "0x7e268f131ddf687cc325c412f78ba961205e9112": "16000600000000000000000", + "0x180478a655d78d0f3b0c4f202b61485bc4002fd5": "2000000000000000000000", + "0xed4014538cee664a2fbcb6dc669f7ab16d0ba57c": "200000000000000000000", + "0xf63a579bc3eac2a9490410128dbcebe6d9de8243": "1490000000000000000000", + "0x5d822d9b3ef4b502627407da272f67814a6becd4": "20000000000000000000", + "0xeb52ab10553492329c1c54833ae610f398a65b9d": "152000000000000000000", + "0x63340a57716bfa63eb6cd133721202575bf796f0": "209967000000000000000", + "0x933bf33f8299702b3a902642c33e0bfaea5c1ca3": "15200000000000000000", + "0x25bc49ef288cd165e525c661a812cf84fbec8f33": "338464000000000000000", + "0xc8231ba5a411a13e222b29bfc1083f763158f226": "1000090000000000000000", + "0x6c15ec3520bf8ebbc820bd0ff19778375494cf9d": "2005500000000000000000", + "0xaaced8a9563b1bc311dbdffc1ae7f57519c4440c": "2000000000000000000000", + "0xd90f3009db437e4e11c780bec8896f738d65ef0d": "4000000000000000000000", + "0x5603241eb8f08f721e348c9d9ad92f48e390aa24": "200000000000000000000", + "0x53cec6c88092f756efe56f7db11228a2db45b122": "4000000000000000000000", + "0x194cebb4929882bf3b4bf9864c2b1b0f62c283f9": "571300000000000000000", + "0x4be8628a8154874e048d80c142181022b180bcc1": "60000000000000000000", + "0x5fd973af366aa5157c54659bcfb27cbfa5ac15d6": "4000000000000000000000", + "0x303139bc596403d5d3931f774c66c4ba467454db": "1699830000000000000000", + "0x87584a3f613bd4fac74c1e780b86d6caeb890cb2": "1700000000000000000000", + "0x77f4e3bdf056883cc87280dbe640a18a0d02a207": "193806000000000000000", + "0x4de3fe34a6fbf634c051997f47cc7f48791f5824": "1999000000000000000000", + "0xc45a1ca1036b95004187cdac44a36e33a94ab5c3": "254800000000000000000", + "0x65d33eb39cda6453b19e61c1fe4db93170ef9d34": "13370000000000000000", + "0xf65616be9c8b797e7415227c9138faa0891742d7": "790000000000000000000", + "0xe17812f66c5e65941e186c46922b6e7b2f0eeb46": "1820000000000000000000", + "0xd47f50df89a1cff96513bef1b2ae3a2971accf2c": "840000000000000000000", + "0x8ed1528b447ed4297902f639c514d0944a88f8c8": "198800000000000000000", + "0xa4fb14409a67b45688a8593e5cc2cf596ced6f11": "1790000000000000000000", + "0x855d9aef2c39c6230d09c99ef6494989abe68785": "161000000000000000000", + "0x778c43d11afe3b586ff374192d96a7f23d2b9b7f": "2577139000000000000000", + "0xe3ece1f632711d13bfffa1f8f6840871ee58fb27": "4000000000000000000000", + "0xbeb3358c50cf9f75ffc76d443c2c7f55075a0589": "2674000000000000000000", + "0xf156dc0b2a981e5b55d3f2f03b8134e331dbadb7": "100000000000000000000", + "0xeb9cc9fe0869d2dab52cc7aae8fd57adb35f9feb": "1966000000000000000000", + "0x2467c6a5c696ede9a1e542bf1ad06bcc4b06aca0": "18500000000000000000", + "0xec75b4a47513120ba5f86039814f1998e3817ac3": "178756000000000000000", + "0x9c3d0692ceeef80aa4965ceed262ffc7f069f2dc": "200000000000000000000", + "0xe05029aceb0778675bef1741ab2cd2931ef7c84b": "5000057000000000000000", + "0x41d3b731a326e76858baa5f4bd89b57b36932343": "394000000000000000000", + "0xc346cb1fbce2ab285d8e5401f42dd7234d37e86d": "83500000000000000000", + "0x45f4fc60f08eaca10598f0336329801e3c92cb46": "200000000000000000000", + "0xf04a6a379708b9428d722aa2b06b77e88935cf89": "300000000000000000000", + "0x232832cd5977e00a4c30d0163f2e24f088a6cb09": "3000000000000000000000", + "0xd2ac0d3a58605e1d0f0eb3de25b2cad129ed6058": "4000000000000000000000", + "0xa356551bb77d4f45a6d7e09f0a089e79cca249cb": "340000000000000000000", + "0xb50c9f5789ae44e2dce017c714caf00c830084c2": "394000000000000000000", + "0x21fd6c5d97f9c600b76821ddd4e776350fce2be0": "1999946000000000000000", + "0xf0d5c31ccb6cbe30c7c9ea19f268d159851f8c9c": "16700000000000000000000", + "0xab7091932e4bc39dbb552380ca934fd7166d1e6e": "3340000000000000000000", + "0xacd8dd91f714764c45677c63d852e56eb9eece2e": "2000000000000000000000", + "0x57d032a43d164e71aa2ef3ffd8491b0a4ef1ea5b": "2000000000000000000000", + "0x5af46a25ac09cb73616b53b14fb42ff0a51cddb2": "4000000000000000000000", + "0x1ea6bf2f15ae9c1dbc64daa7f8ea4d0d81aad3eb": "4200000000000000000000", + "0x03337012ae1d7ff3ee7f697c403e7780188bf0ef": "200000000000000000000", + "0x32eb64be1b5dede408c6bdefbe6e405c16b7ed02": "1970000000000000000000", + "0x22e2488e2da26a49ae84c01bd54b21f2947891c6": "1730000000000000000000", + "0xbe98a77fd41097b34f59d7589baad021659ff712": "900000000000000000000", + "0xdda4ed2a58a8dd20a73275347b580d71b95bf99a": "399000000000000000000", + "0x671110d96aaff11523cc546bf9940eedffb2faf7": "4000000000000000000000", + "0x5d71799c8df3bccb7ee446df50b8312bc4eb71c5": "200000000000000000000", + "0xae179a460db66326743d24e67523a57b246daf7f": "4722920000000000000000", + "0x198bfcf1b07ae308fa2c02069ac9dafe7135fb47": "20000000000000000000", + "0x4662a1765ee921842ddc88898d1dc8627597bd7e": "10000000000000000000000", + "0x783eec8aa5dac77b2e6623ed5198a431abbaee07": "440000000000000000000", + "0xed6643c0e8884b2d3211853785a08bf8f33ed29f": "1337000000000000000000", + "0x5cc7d3066d45d27621f78bb4b339473e442a860f": "9999908000000000000000", + "0x94ef8be45077c7d4c5652740de946a62624f713f": "100085000000000000000", + "0x2f853817afd3b8f3b86e9f60ee77b5d97773c0e3": "1451450000000000000000", + "0x3e0b8ed86ed669e12723af7572fbacfe829b1e16": "1499800000000000000000", + "0xfa68e0cb3edf51f0a6f211c9b2cb5e073c9bffe6": "291200000000000000000", + "0x2c234f505ca8dcc77d9b7e01d257c318cc19396d": "100000000000000000000", + "0xf3f24fc29e20403fc0e8f5ebbb553426f78270a2": "100000000000000000000", + "0x91546b79ecf69f936b5a561508b0d7e50cc5992f": "267400000000000000000", + "0x435443b81dfdb9bd8c6787bc2518e2d47e57c15f": "5968500000000000000000", + "0x3a06e3bb1edcfd0c44c3074de0bb606b049894a2": "10000000000000000000000", + "0x3a3108c1e680a33b336c21131334409d97e5adec": "20000000000000000000", + "0x2caf6bf4ec7d5a19c5e0897a5eeb011dcece4210": "139740000000000000000", + "0xf44f8551ace933720712c5c491cdb6f2f951736c": "4000000000000000000000", + "0x5bc1f95507b1018642e45cd9c0e22733b9b1a326": "100000000000000000000", + "0x94ca56de777fd453177f5e0694c478e66aff8a84": "500000000000000000000", + "0xafdd1b786162b8317e20f0e979f4b2ce486d765d": "20000000000000000000", + "0x3a805fa0f7387f73055b7858ca8519edd93d634f": "1850000000000000000000", + "0x8b36224c7356e751f0c066c35e3b44860364bfc2": "998987000000000000000", + "0xcfecbea07c27002f65fe534bb8842d0925c78402": "4000000000000000000000", + "0x482982ac1f1c6d1721feecd9b9c96cd949805055": "10000000000000000000000", + "0xaf880fc7567d5595cacce15c3fc14c8742c26c9e": "133700000000000000000", + "0xacc1c78786ab4d2b3b277135b5ba123e0400486b": "78800000000000000000", + "0x41f27e744bd29de2b0598f02a0bb9f98e681eaa4": "7760000000000000000000", + "0x09a025316f967fa8b9a1d60700063f5a68001caa": "38200000000000000000", + "0x391f20176d12360d724d51470a90703675594a4d": "1600000000000000000000", + "0xfe4d8403216fd571572bf1bdb01d00578978d688": "9850000000000000000000", + "0x900f0b8e35b668f81ef252b13855aa5007d012e7": "425000000000000000000", + "0xc35b95a2a3737cb8f0f596b34524872bd30da234": "7540000000000000000000", + "0x412a68f6c645559cc977fc4964047a201d1bb0e2": "50000000000000000000000", + "0xd3dad1b6d08d4581ccae65a8732db6ac69f0c69e": "6000000000000000000000", + "0x35855ec641ab9e081ed0c2a6dcd81354d0244a87": "1201897000000000000000", + "0x88015d7203c5e0224aeda286ed12f1a51b789333": "4999711000000000000000", + "0x251c12722c6879227992a304eb3576cd18434ea5": "2000000000000000000000", + "0x1f6f0030349752061c96072bc3d6eb3549208d6b": "23891000000000000000", + "0x86153063a1ae7f02f1a88136d4d69c7c5e3e4327": "1000000000000000000000", + "0x78355df0a230f83d032c703154414de3eedab557": "2000000000000000000000", + "0xc5b56cd234267c28e89c6f6b2266b086a12f970c": "4000000000000000000000", + "0x3e3cd3bec06591d6346f254b621eb41c89008d31": "993800000000000000000", + "0x378ea1dc8edc19bae82638029ea8752ce98bcfcd": "2000000000000000000000", + "0x67632046dcb25a54936928a96f423f3320cbed92": "2000000000000000000000", + "0xddbee6f094eae63420b003fb4757142aea6cd0fd": "2000000000000000000000", + "0xb555d00f9190cc3677aef314acd73fdc39399259": "2000000000000000000000", + "0xe230fe1bff03186d0219f15d4c481b7d59be286a": "36710000000000000000", + "0x3e4e9265223c9738324cf20bd06006d0073edb8c": "133700000000000000000", + "0x7450ff7f99eaa9116275deac68e428df5bbcd8b9": "2000000000000000000000", + "0x021f69043de88c4917ca10f1842897eec0589c7c": "1978760000000000000000", + "0x351787843505f8e4eff46566cce6a59f4d1c5fe7": "9250000000000000000000", + "0xebd37b256563e30c6f9289a8e2702f0852880833": "1999944000000000000000", + "0xed41e1a28f5caa843880ef4e8b08bd6c33141edf": "790174000000000000000", + "0x8d238e036596987643d73173c37b0ad06055b96c": "2089724000000000000000", + "0x478e524ef2a381d70c82588a93ca7a5fa9d51cbf": "254908000000000000000000", + "0x4419ac618d5dea7cdc6077206fb07dbdd71c1702": "4000000000000000000000", + "0xca25ff34934c1942e22a4e7bd56f14021a1af088": "197000000000000000000", + "0x5552f4b3ed3e1da79a2f78bb13e8ae5a68a9df3b": "1000000000000000000000", + "0x4354221e62dc09e6406436163a185ef06d114a81": "2000000000000000000000", + "0xca0432cb157b5179f02ebba5c9d1b54fec4d88ca": "1000000000000000000000", + "0x8a780ab87a9145fe10ed60fa476a740af4cab1d2": "334000000000000000000", + "0x4ff676e27f681a982d8fd9d20e648b3dce05e945": "2800000000000000000000", + "0x6c63fc85029a2654d79b2bea4de349e4524577c5": "660000000000000000000", + "0x1ac089c3bc4d82f06a20051a9d732dc0e734cb61": "700300000000000000000", + "0x4bf4479799ef82eea20943374f56a1bf54001e5e": "3940000000000000000000", + "0x08411652c871713609af0062a8a1281bf1bbcfd9": "1400000000000000000000", + "0xe1bfaa5a45c504428923c4a61192a55b1400b45d": "2674000000000000000000", + "0x5e1fbd4e58e2312b3c78d7aaaafa10bf9c3189e3": "40000000000000000000000", + "0xbb27c6a7f91075475ab229619040f804c8ec7a6a": "10000000000000000000000", + "0x5d8d31faa864e22159cd6f5175ccecc53fa54d72": "26980000000000000000000", + "0x2dd8eeef87194abc2ce7585da1e35b7cea780cb7": "999999000000000000000", + "0x0e1801e70b6262861b1134ccbc391f568afc92f7": "4000000000000000000000", + "0x61042b80fd6095d1b87be2f00f109fabafd157a6": "100000000000000000000", + "0xfb5518714cefc36d04865de5915ef0ff47dfe743": "2000000000000000000000", + "0xb5add1e7809f7d03069bfe883b0a932210be8712": "1000000000000000000000", + "0xc2e2d498f70dcd0859e50b023a710a6d4b2133bd": "1037130000000000000000", + "0x4ad047fae67ef162fe68fedbc27d3b65caf10c36": "1970000000000000000000", + "0x69cb3e2153998d86e5ee20c1fcd1a6baeeb2863f": "4000000000000000000000", + "0x683633010a88686bea5a98ea53e87997cbf73e69": "99960000000000000000", + "0x6cb11ecb32d3ce829601310636f5a10cf7cf9b5f": "20068370000000000000000", + "0xa613456996408af1c2e93e177788ab55895e2b32": "6366000000000000000000", + "0x8308ed0af7f8a3c1751fafc877b5a42af7d35882": "1000000000000000000000", + "0xe5edf8123f2403ce1a0299becf7aac744d075f23": "200200000000000000000", + "0x05665155cc49cbf6aabdd5ae92cbfaad82b8c0c1": "400000000000000000000", + "0x00b277b099a8e866ca0ec65bcb87284fd142a582": "1970000000000000000000", + "0x4b9e068fc4680976e61504912985fd5ce94bab0d": "668500000000000000000", + "0x12134e7f6b017bf48e855a399ca58e2e892fa5c8": "1000000000000000000000", + "0xdffcea5421ec15900c6ecfc777184e140e209e24": "19980000000000000000", + "0x2132c0516a2e17174ac547c43b7b0020d1eb4c59": "985000000000000000000", + "0xd39a5da460392b940b3c69bc03757bf3f2e82489": "7019250000000000000000", + "0x66c8331efe7198e98b2d32b938688e3241d0e24f": "9620000000000000000000", + "0xbdca2a0ff34588af625fa8e28fc3015ab5a3aa00": "2339800000000000000000", + "0x7dfc342dffcf45dfee74f84c0995397bd1a63172": "250000000000000000000", + "0xa202547242806f6e70e74058d6e5292defc8c8d4": "2002000000000000000000", + "0x3bbc13d04accc0707aebdcaef087d0b87e0b5ee3": "3520000000000000000000", + "0xbe5cba8d37427986e8ca2600e858bb03c359520f": "2955000000000000000000", + "0x4174fa1bc12a3b7183cbabb77a0b59557ba5f1db": "2000000000000000000000", + "0x9eb3a7cb5e6726427a3a361cfa8d6164dbd0ba16": "804000000000000000000", + "0x25e661c939863acc044e6f17b5698cce379ec3cc": "1370000000000000000000", + "0x24bd5904059091d2f9e12d6a26a010ca22ab14e8": "1880000000000000000000", + "0xc96626728aaa4c4fb3d31c26df3af310081710d1": "3340000000000000000000", + "0x0fb5d2c673bfb1ddca141b9894fd6d3f05da6720": "100000000000000000000", + "0x2de31afd189a13a76ff6fe73ead9f74bb5c4a629": "6000000000000000000000", + "0xbd09126c891c4a83068059fe0e15796c4661a9f4": "800000000000000000000", + "0x496f5843f6d24cd98d255e4c23d1e1f023227545": "1754143000000000000000", + "0x540cf23dd95c4d558a279d778d2b3735b3164191": "10000000000000000000000", + "0x9b5ec18e8313887df461d2902e81e67a8f113bb1": "100000000000000000000", + "0xb7a7f77c348f92a9f1100c6bd829a8ac6d7fcf91": "1820000000000000000000", + "0x2590126870e0bde8a663ab040a72a5573d8d41c2": "5000000000000000000000", + "0x090fa9367bda57d0d3253a0a8ff76ce0b8e19a73": "1000000000000000000000", + "0x2a5ba9e34cd58da54c9a2712663a3be274c8e47b": "197000000000000000000", + "0x3e8641d43c42003f0a33c929f711079deb2b9e46": "500000000000000000000", + "0xf4d97664cc4eec9edbe7fa09f4750a663b507d79": "4000000000000000000000", + "0xb1540e94cff3465cc3d187e7c8e3bdaf984659e2": "2989950000000000000000", + "0xf96883582459908c827627e86f28e646f9c7fc7a": "8350000000000000000000", + "0xd4feed99e8917c5c5458635f3603ecb7e817a7d0": "300031000000000000000", + "0x14b1603ec62b20022033eec4d6d6655ac24a015a": "50000000000000000000", + "0xaf8e1dcb314c950d3687434d309858e1a8739cd4": "267400000000000000000", + "0x4b9206ba6b549a1a7f969e1d5dba867539d1fa67": "7880000000000000000000", + "0x471010da492f4018833b088d9872901e06129174": "500000000000000000000", + "0xd243184c801e5d79d2063f3578dbae81e7b3a9cb": "1989700000000000000000", + "0x3eada8c92f56067e1bb73ce378da56dc2cdfd365": "2210000000000000000000", + "0x33ea6b7855e05b07ab80dab1e14de9b649e99b6c": "532000000000000000000", + "0x700711e311bb947355f755b579250ca7fd765a3e": "1790000000000000000000", + "0x87fb26c31e48644d693134205cae43b21f18614b": "1370000000000000000000", + "0x001d14804b399c6ef80e64576f657660804fec0b": "4200000000000000000000", + "0xf9642086b1fbae61a6804dbe5fb15ec2d2b537f4": "2000000000000000000000", + "0x6919dd5e5dfb1afa404703b9faea8cee35d00d70": "5910000000000000000000", + "0x9ac4da51d27822d1e208c96ea64a1e5b55299723": "100040000000000000000", + "0x1bd8ebaa7674bb18e19198db244f570313075f43": "150000000000000000000", + "0xe64ef012658d54f8e8609c4e9023c09fe865c83b": "28000000000000000000", + "0x43b079baf0727999e66bf743d5bcbf776c3b0922": "2000000000000000000000", + "0x06ac26ad92cb859bd5905ddce4266aa0ec50a9c5": "775000000000000000000", + "0x99c1d9f40c6ab7f8a92fce2fdce47a54a586c53f": "985000000000000000000", + "0x4ae93082e45187c26160e66792f57fad3551c73a": "21658000000000000000000", + "0x7da7613445a21299aa74f0ad71431ec43fbb1be9": "68000000000000000000", + "0x4a9a26fd0a8ba10f977da4f77c31908dab4a8016": "1790000000000000000000", + "0x972c2f96aa00cf8a2f205abcf8937c0c75f5d8d9": "200000000000000000000", + "0xb5046cb3dc1dedbd364514a2848e44c1de4ed147": "16445100000000000000000", + "0x48c2ee91a50756d8ce9abeeb7589d22c6fee5dfb": "3220000000000000000000", + "0x46c1aa2244b9c8a957ca8fac431b0595a3b86824": "4000000000000000000000", + "0x21fd0bade5f4ef7474d058b7f3d854cb1300524e": "20000000000000000000", + "0x1864a3c7b48155448c54c88c708f166709736d31": "133700000000000000000", + "0x5dd53ae897526b167d39f1744ef7c3da5b37a293": "8000000000000000000000", + "0xece111670b563ccdbebca52384290ecd68fe5c92": "20000000000000000000", + "0x74d671d99cbea1ab57906375b63ff42b50451d17": "1000000000000000000000", + "0x5717cc9301511d4a81b9f583148beed3d3cc8309": "2600000000000000000000", + "0x8f92844f282a92999ee5b4a8d773d06b694dbd9f": "1940000000000000000000", + "0xb5a606f4ddcbb9471ec67f658caf2b00ee73025e": "4325000000000000000000", + "0xbdb60b823a1173d45a0792245fb496f1fd3301cf": "2000000000000000000000", + "0x1d2615f8b6ca5012b663bdd094b0c5137c778ddf": "10000000000000000000000", + "0x82ff716fdf033ec7e942c909d9831867b8b6e2ef": "1790000000000000000000", + "0x44c14765127cde11fab46c5d2cf4d4b2890023fd": "2000000000000000000000", + "0xc72cb301258e91bc08998a805dd192f25c2f9a35": "591000000000000000000", + "0xad732c976593eec4783b4e2ecd793979780bfedb": "2000000000000000000000", + "0xd8f62036f03b7635b858f1103f8a1d9019a892b6": "50000000000000000000", + "0x0a06fad7dcd7a492cbc053eeabde6934b39d8637": "20000000000000000000", + "0x67f2bb78b8d3e11f7c458a10b5c8e0a1d374467d": "1790000000000000000000", + "0x4b5cdb1e428c91dd7cb54a6aed4571da054bfe52": "88000000000000000000", + "0xb3557d39b5411b84445f5f54f38f62d2714d0087": "600000000000000000000", + "0x0b0e055b28cbd03dc5ff44aa64f3dce04f5e63fb": "2000000000000000000000", + "0x9b2be7f56754f505e3441a10f7f0e20fd3ddf849": "340000000000000000000", + "0x0b93fca4a4f09cac20db60e065edcccc11e0a5b6": "200000000000000000000", + "0x3bc85d6c735b9cda4bba5f48b24b13e70630307b": "1970000000000000000000", + "0x52102354a6aca95d8a2e86d5debda6de69346076": "2000000000000000000000", + "0xcda4530f4b9bc50905b79d17c28fc46f95349bdf": "942000000000000000000", + "0xff545bbb66fbd00eb5e6373ff4e326f5feb5fe12": "20000000000000000000", + "0x4030a925706b2c101c8c5cb9bd05fbb4f6759b18": "4000000000000000000000", + "0xf11e01c7a9d12499005f4dae7716095a34176277": "400000000000000000000", + "0xa4826b6c3882fad0ed5c8fbb25cc40cc4f33759f": "2068000000000000000000", + "0x28510e6eff1fc829b6576f4328bc3938ec7a6580": "10000000000000000000000", + "0x9ce5363b13e8238aa4dd15acd0b2e8afe0873247": "200000000000000000000", + "0xd97bc84abd47c05bbf457b2ef659d61ca5e5e48f": "122000000000000000000", + "0x4a719061f5285495b37b9d7ef8a51b07d6e6acac": "199800000000000000000", + "0x8b714522fa2839620470edcf0c4401b713663df1": "200000000000000000000", + "0xb6decf82969819ba02de29b9b593f21b64eeda0f": "740000000000000000000", + "0xc87d3ae3d88704d9ab0009dcc1a0067131f8ba3c": "1969606000000000000000", + "0xdccb370ed68aa922283043ef7cad1b9d403fc34a": "4000000000000000000000", + "0x2d532df4c63911d1ce91f6d1fcbff7960f78a885": "1669833000000000000000", + "0x1fcfd1d57f872290560cb62d600e1defbefccc1c": "1490000000000000000000", + "0xd9e27eb07dfc71a706060c7f079238ca93e88539": "1000000000000000000000", + "0xda7732f02f2e272eaf28df972ecc0ddeed9cf498": "205274000000000000000", + "0xbf09d77048e270b662330e9486b38b43cd781495": "436000000000000000000000", + "0x619f171445d42b02e2e07004ad8afe694fa53d6a": "20000000000000000000", + "0x2bdd03bebbee273b6ca1059b34999a5bbd61bb79": "20000000000000000000", + "0x8da1d359ba6cb4bcc57d7a437720d55db2f01c72": "80000000000000000000", + "0xbe935793f45b70d8045d2654d8dd3ad24b5b6137": "880000000000000000000", + "0xee71793e3acf12a7274f563961f537529d89c7de": "2000000000000000000000", + "0x86f05d19063e9369c6004eb3f123943a7cff4eab": "1999944000000000000000", + "0x87b10f9c280098179a2b76e9ce90be61fc844d0d": "1337000000000000000000", + "0x243c84d12420570cc4ef3baba1c959c283249520": "2345000000000000000000", + "0x6bc85acd5928722ef5095331ee88f484b8cf8357": "180000000000000000000", + "0x2561a138dcf83bd813e0e7f108642be3de3d6f05": "999940000000000000000", + "0x7d0350e40b338dda736661872be33f1f9752d755": "49933000000000000000", + "0xe5dc9349cb52e161196122cf87a38936e2c57f34": "2000000000000000000000", + "0x543a8c0efb8bcd15c543e2a6a4f807597631adef": "5893800000000000000000", + "0x0413d0cf78c001898a378b918cd6e498ea773c4d": "280000000000000000000", + "0x3708e59de6b4055088782902e0579c7201a8bf50": "200000000000000000000000", + "0x699fc6d68a4775573c1dcdaec830fefd50397c4e": "60000000000000000000", + "0x379a7f755a81a17edb7daaa28afc665dfa6be63a": "25000000000000000000", + "0x260a230e4465077e0b14ee4442a482d5b0c914bf": "1677935000000000000000", + "0x3daa01ceb70eaf9591fa521ba4a27ea9fb8ede4a": "1667400000000000000000", + "0x7f3a1e45f67e92c880e573b43379d71ee089db54": "100000000000000000000000", + "0x38643babea6011316cc797d9b093c897a17bdae7": "334400000000000000000", + "0x84675e9177726d45eaa46b3992a340ba7f710c95": "1000000000000000000000", + "0x0f83461ba224bb1e8fdd9dae535172b735acb4e0": "200000000000000000000", + "0x31aa3b1ebe8c4dbcb6a708b1d74831e60e497660": "400000000000000000000", + "0xa32cf7dde20c3dd5679ff5e325845c70c5962662": "20000000000000000000", + "0xc007f0bdb6e7009202b7af3ea90902697c721413": "2999966000000000000000", + "0x05c64004a9a826e94e5e4ee267fa2a7632dd4e6f": "16191931000000000000000", + "0xf622e584a6623eaaf99f2be49e5380c5cbcf5cd8": "200000000000000000000", + "0x9dc10fa38f9fb06810e11f60173ec3d2fd6a751e": "1970000000000000000000", + "0x423c3107f4bace414e499c64390a51f74615ca5e": "2000000000000000000000", + "0x92438e5203b6346ff886d7c36288aacccc78ceca": "1000000000000000000000", + "0xbef07d97c3481f9d6aee1c98f9d91a180a32442b": "100000000000000000000000", + "0x55aa5d313ebb084da0e7801091e29e92c5dec3aa": "2000000000000000000000", + "0x89c433d601fad714da6369308fd26c1dc9942bbf": "2000000000000000000000", + "0x25106ab6755df86d6b63a187703b0cfea0e594a0": "27400000000000000000", + "0x494256e99b0f9cd6e5ebca3899863252900165c8": "14000000000000000000000", + "0x5f4ace4c1cc13391e01f00b198e1f20b5f91cbf5": "5000196000000000000000", + "0x135cecd955e5798370769230159303d9b1839f66": "5000000000000000000000", + "0xced81ec3533ff1bfebf3e3843ee740ad11758d3e": "1970000000000000000000", + "0x688eb3853bbcc50ecfee0fa87f0ab693cabdef02": "31600000000000000000000", + "0x2159240813a73095a7ebf7c3b3743e8028ae5f09": "2000000000000000000000", + "0x99d1579cd42682b7644e1d4f7128441eeffe339d": "20000000000000000000000", + "0x8a243a0a9fea49b839547745ff2d11af3f4b0522": "985000000000000000000", + "0xc1a41a5a27199226e4c7eb198b031b59196f9842": "191000000000000000000", + "0x7514adbdc63f483f304d8e94b67ff3309f180b82": "622911000000000000000", + "0x74aeec915de01cc69b2cb5a6356feea14658c6c5": "232500000000000000000", + "0x76f9ad3d9bbd04ae055c1477c0c35e7592cb2a20": "40200000000000000000000", + "0xa8a7b68adab4e3eadff19ffa58e34a3fcec0d96a": "6000000000000000000000", + "0x60de22a1507432a47b01cc68c52a0bf8a2e0d098": "19100000000000000000", + "0xceb33d78e7547a9da2e87d51aec5f3441c87923a": "20000000000000000000", + "0x432809a2390f07c665921ff37d547d12f1c9966a": "30000000000000000000000", + "0xd5e656a1b916f9bf45afb07dd8afaf73b4c56f41": "97000000000000000000", + "0xe3410bb7557cf91d79fa69d0dfea0aa075402651": "2000000000000000000000", + "0xdee942d5caf5fac11421d86b010b458e5c392990": "4000000000000000000000", + "0xa98f109835f5eacd0543647c34a6b269e3802fac": "400000000000000000000", + "0x932b9c04d40d2ac83083d94298169dae81ab2ed0": "2000000000000000000000", + "0xba10f2764290f875434372f79dbf713801caac01": "955000000000000000000", + "0xa2c7eaffdc2c9d937345206c909a52dfb14c478f": "143000000000000000000", + "0x6c67e0d7b62e2a08506945a5dfe38263339f1f22": "1970000000000000000000", + "0x60c3714fdddb634659e4a2b1ea42c4728cc7b8ba": "13370000000000000000", + "0x73b4d499de3f38bf35aaf769a6e318bc6d123692": "2000000000000000000000", + "0x3b22dea3c25f1b59c7bd27bb91d3a3eaecef3984": "100000000000000000000", + "0x1e3badb1b6e1380e27039c576ae6222e963a5b53": "20000000000000000000000", + "0xabd4d6c1666358c0406fdf3af248f78ece830104": "2112000000000000000000", + "0x0c925ad5eb352c8ef76d0c222d115b0791b962a1": "3180000000000000000000", + "0xbe9186c34a52514abb9107860f674f97b821bd5b": "509600000000000000000", + "0xb7f67314cb832e32e63b15a40ce0d7ffbdb26985": "1060866000000000000000", + "0x3f30d3bc9f602232bc724288ca46cd0b0788f715": "4000000000000000000000", + "0x970abd53a54fca4a6429207c182d4d57bb39d4a0": "2000000000000000000000", + "0x36d85dc3683156e63bf880a9fab7788cf8143a27": "20000000000000000000000", + "0x2836123046b284e5ef102bfd22b1765e508116ad": "411880000000000000000", + "0xde06d5ea777a4eb1475e605dbcbf43444e8037ea": "50000000000000000000000", + "0x9af11399511c213181bfda3a8b264c05fc81b3ce": "14000000000000000000000", + "0xe2191215983f33fd33e22cd4a2490054da53fddc": "15800000000000000000", + "0x2eebf59432b52892f9380bd140aa99dcf8ad0c0f": "152000000000000000000", + "0xdc087f9390fb9e976ac23ab689544a0942ec2021": "1820000000000000000000", + "0xfd4b989558ae11be0c3b36e2d6f2a54a9343ca2e": "2000000000000000000000", + "0x770c2fb2c4a81753ac0182ea460ec09c90a516f8": "20000000000000000000", + "0xb28dbfc6499894f73a71faa00abe0f4bc9d19f2a": "100000000000000000000", + "0xb0cef8e8fb8984a6019f01c679f272bbe68f5c77": "152000000000000000000", + "0xf400f93d5f5c7e3fc303129ac8fb0c2f786407fa": "2000000000000000000000", + "0xf2133431d1d9a37ba2f0762bc40c5acc8aa6978e": "2000000000000000000000", + "0x9003d270891ba2df643da8341583193545e3e000": "4000000000000000000000", + "0x8938d1b4daee55a54d738cf17e4477f6794e46f7": "18200000000000000000", + "0x98e6f547db88e75f1f9c8ac2c5cf1627ba580b3e": "1000000000000000000000", + "0x009fdbf44e1f4a6362b769c39a475f95a96c2bc7": "564000000000000000000", + "0xd0f9597811b0b992bb7d3757aa25b4c2561d32e2": "500000000000000000000", + "0xdcd10c55bb854f754434f1219c2c9a98ace79f03": "4000086000000000000000", + "0x67048f3a12a4dd1f626c64264cb1d7971de2ca38": "180000000000000000000", + "0xd33cf82bf14c592640a08608914c237079d5be34": "2000000000000000000000", + "0xf5b068989df29c253577d0405ade6e0e7528f89e": "1610000000000000000000", + "0xa9a8eca11a23d64689a2aa3e417dbb3d336bb59a": "262025000000000000000", + "0x99413704b1a32e70f3bc0d69dd881c38566b54cb": "27382708000000000000000", + "0x2a085e25b64862f5e68d768e2b0f7a8529858eee": "1983618000000000000000", + "0x833d3fae542ad5f8b50ce19bde2bec579180c88c": "346000000000000000000", + "0xc3483d6e88ac1f4ae73cc4408d6c03abe0e49dca": "17000000000000000000000", + "0xfde395bc0b6d5cbb4c1d8fea3e0b4bff635e9db7": "2000000000000000000000", + "0xeddacd94ec89a2ef968fcf977a08f1fae2757869": "8000000000000000000000", + "0xdc29119745d2337320da51e19100c948d980b915": "160000000000000000000", + "0x640bf87415e0cf407301e5599a68366da09bbac8": "493207000000000000000", + "0xafcc7dbb8356d842d43ae7e23c8422b022a30803": "30400000000000000000000", + "0x9120e71173e1ba19ba8f9f4fdbdcaa34e1d6bb78": "2000000000000000000000", + "0x9092918707c621fdbd1d90fb80eb787fd26f7350": "2460000000000000000000", + "0x263e57dacbe0149f82fe65a2664898866ff5b463": "38000000000000000000000", + "0x315db7439fa1d5b423afa7dd7198c1cf74c918bc": "600000000000000000000", + "0x09b4668696f86a080f8bebb91db8e6f87015915a": "656010000000000000000", + "0x5c31996dcac015f9be985b611f468730ef244d90": "200000000000000000000", + "0xb1179589e19db9d41557bbec1cb24ccc2dec1c7f": "100000000000000000000000", + "0x3b1937d5e793b89b63fb8eb5f1b1c9ca6ba0fa8e": "2000000000000000000000", + "0xc9127b7f6629ee13fc3f60bc2f4467a20745a762": "16465639000000000000000", + "0x7306de0e288b56cfdf987ef0d3cc29660793f6dd": "508060000000000000000", + "0x2aa192777ca5b978b6b2c2ff800ac1860f753f47": "335000000000000000000", + "0x55da9dcdca61cbfe1f133c7bcefc867b9c8122f9": "880000000000000000000", + "0xcdd9efac4d6d60bd71d95585dce5d59705c13564": "100000000000000000000", + "0xad8e48a377695de014363a523a28b1a40c78f208": "1000000000000000000000", + "0x252b6555afdc80f2d96d972d17db84ea5ad521ac": "7880000000000000000000", + "0x60ab71cd26ea6d6e59a7a0f627ee079c885ebbf6": "26740000000000000000", + "0xf40b134fea22c6b29c8457f49f000f9cda789adb": "600000000000000000000", + "0x85a2f6ea94d05e8c1d9ae2f4910338a358e98ded": "2000000000000000000000", + "0xae13a08511110f32e53be4127845c843a1a57c7b": "500000000000000000000", + "0x40db1ba585ce34531edec5494849391381e6ccd3": "1790000000000000000000", + "0x0c5589a7a89b9ad15b02751930415948a875fbef": "126000000000000000000", + "0x89054430dcdc28ac15fa635ef87c105e602bf70c": "108000000000000000000", + "0x6c882c27732cef5c7c13a686f0a2ea77555ac289": "100000000000000000000000", + "0xde374299c1d07d79537385190f442ef9ca24061f": "133700000000000000000", + "0xb146a0b925553cf06fcaf54a1b4dfea621290757": "2000200000000000000000", + "0x09ae49e37f121df5dc158cfde806f173a06b0c7f": "3988000000000000000000", + "0xb758896f1baa864f17ebed16d953886fee68aae6": "1000000000000000000000", + "0x30730466b8eb6dc90d5496aa76a3472d7dbe0bbe": "1999800000000000000000", + "0xfc02734033e57f70517e0afc7ee62461f06fad8e": "394000000000000000000", + "0xa9b2d2e0494eab18e07d37bbb856d80e80f84cd3": "10000000000000000000000", + "0x95278b08dee7c0f2c8c0f722f9fcbbb9a5241fda": "2408672000000000000000", + "0xdab6bcdb83cf24a0ae1cb21b3b5b83c2f3824927": "50000000000000000000000", + "0x94439ca9cc169a79d4a09cae5e67764a6f871a21": "240000000000000000000", + "0xe06c29a81517e0d487b67fb0b6aabc4f57368388": "401100000000000000000", + "0x458e3cc99e947844a18e6a42918fef7e7f5f5eb3": "36400000000000000000000", + "0x0a9804137803ba6868d93a55f9985fcd540451e4": "13370000000000000000", + "0x40630024bd2c58d248edd8465617b2bf1647da0e": "1000000000000000000000", + "0x15224ad1c0face46f9f556e4774a3025ad06bd52": "13370000000000000000", + "0x2e2810dee44ae4dff3d86342ab126657d653c336": "200000000000000000000", + "0x48a30de1c919d3fd3180e97d5f2b2a9dbd964d2d": "44000000000000000000", + "0x46a30b8a808931217445c3f5a93e882c0345b426": "250019000000000000000", + "0x455396a4bbd9bae8af9fb7c4d64d471db9c24505": "161000000000000000000", + "0xedfda2d5db98f9380714664d54b4ee971a1cae03": "40044000000000000000", + "0xf5eadcd2d1b8657a121f33c458a8b13e76b65526": "249828000000000000000", + "0x90e7070f4d033fe6910c9efe5a278e1fc6234def": "100392000000000000000", + "0xd55508adbbbe9be81b80f97a6ea89add68da674f": "2000000000000000000000", + "0x66925de3e43f4b41bf9dadde27d5488ef569ea0d": "39400000000000000000", + "0xb7c077946674ba9341fb4c747a5d50f5d2da6415": "1000000000000000000000", + "0xc52d1a0c73c2a1be84915185f8b34faa0adf1de3": "1400001000000000000000", + "0x79b8aad879dd30567e8778d2d231c8f37ab8734e": "2000000000000000000000", + "0x3aae4872fd9093cbcad1406f1e8078bab50359e2": "39400000000000000000", + "0xb2e9d76bf50fc36bf7d3944b63e9ca889b699968": "2660000000000000000000", + "0x405f596b94b947344c033ce2dcbff12e25b79784": "2000000000000000000000", + "0x232cb1cd49993c144a3f88b3611e233569a86bd6": "15576000000000000000000", + "0x9e232c08c14dc1a6ed0b8a3b2868977ba5c17d10": "20000000000000000000", + "0x095270cc42141dd998ad2862dbd1fe9b44e7e650": "1200000000000000000000", + "0x15d99468507aa0413fb60dca2adc7f569cb36b54": "2000000000000000000000", + "0x04852732b4c652f6c2e58eb36587e60a62da14db": "20000000000000000000000", + "0xecf24cdd7c22928c441e694de4aa31b0fab59778": "600000000000000000000", + "0x512b91bbfaa9e581ef683fc90d9db22a8f49f48b": "310000000000000000000000", + "0xa88577a073fbaf33c4cd202e00ea70ef711b4006": "2000000000000000000000", + "0x00acc6f082a442828764d11f58d6894ae408f073": "60000000000000000000000", + "0x0355bcacbd21441e95adeedc30c17218c8a408ce": "400000000000000000000", + "0x4e73cf2379f124860f73d6d91bf59acc5cfc845b": "40110000000000000000", + "0x2a742b8910941e0932830a1d9692cfd28494cf40": "499986000000000000000", + "0x41a8c2830081b102df6e0131657c07ab635b54ce": "1999944000000000000000", + "0xb63064bd3355e6e07e2d377024125a33776c4afa": "38800000000000000000000", + "0x1a25e1c5bc7e5f50ec16f8885f210ea1b938800e": "4000000000000000000000", + "0x09b59b8698a7fbd3d2f8c73a008988de3e406b2b": "40000000000000000000000", + "0xc555b93156f09101233c6f7cf6eb3c4f196d3346": "3000000000000000000000", + "0x12f32c0a1f2daab676fe69abd9e018352d4ccd45": "50000000000000000000", + "0x5956b28ec7890b76fc061a1feb52d82ae81fb635": "2000000000000000000000", + "0xc739259e7f85f2659bef5f609ed86b3d596c201e": "200000000000000000000", + "0xfae92c1370e9e1859a5df83b56d0f586aa3b404c": "106480000000000000000", + "0xd5a7bec332adde18b3104b5792546aa59b879b52": "2000000000000000000000", + "0x4f88dfd01091a45a9e2676021e64286cd36b8d34": "1000000000000000000000", + "0x102c477d69aadba9a0b0f62b7459e17fbb1c1561": "2000000000000000000000", + "0x34272d5e7574315dcae9abbd317bac90289d4765": "1820000000000000000000", + "0xfe615d975c0887e0c9113ec7298420a793af8b96": "8000000000000000000000", + "0x487adf7d70a6740f8d51cbdd68bb3f91c4a5ce68": "66850000000000000000", + "0x7e5d9993104e4cb545e179a2a3f971f744f98482": "2000000000000000000000", + "0x5529830a61c1f13c197e550beddfd6bd195c9d02": "10000000000000000000000", + "0x2f282abbb6d4a3c3cd3b5ca812f7643e80305f06": "1850000000000000000000", + "0x7352586d021ad0cf77e0e928404a59f374ff4582": "3400000000000000000000", + "0x03f7b92008813ae0a676eb212814afab35221069": "2000000000000000000000", + "0x056686078fb6bcf9ba0a8a8dc63a906f5feac0ea": "499800000000000000000", + "0x8063379a7bf2cb923a84c5093e68dac7f75481c5": "322102000000000000000", + "0x200264a09f8c68e3e6629795280f56254f8640d0": "20000000000000000000", + "0x5a891155f50e42074374c739baadf7df2651153a": "4775000000000000000000", + "0x80022a1207e910911fc92849b069ab0cdad043d3": "13370000000000000000", + "0xe781ec732d401202bb9bd13860910dd6c29ac0b6": "1240000000000000000000", + "0x4c2f1afef7c5868c44832fc77cb03b55f89e6d6e": "20000000000000000000000", + "0x34ff582952ff24458f7b13d51f0b4f987022c1fe": "2804400000000000000000", + "0x73914b22fc2f131584247d82be4fecbf978ad4ba": "2000000000000000000000", + "0x562be95aba17c5371fe2ba828799b1f55d2177d6": "38200000000000000000000", + "0x648f5bd2a2ae8902db37847d1cb0db9390b06248": "7769965000000000000000", + "0x6a9758743b603eea3aa0524b42889723c4153948": "10100000000000000000000", + "0x5985c59a449dfc5da787d8244e746c6d70caa55f": "100000000000000000000", + "0x56ee197f4bbf9f1b0662e41c2bbd9aa1f799e846": "1000000000000000000000", + "0xd47c242edffea091bc54d57df5d1fdb93101476c": "2914000000000000000000", + "0xd482e7f68e41f238fe517829de15477fe0f6dd1d": "500000000000000000000", + "0x05bf4fcfe772e45b826443852e6c351350ce72a2": "8000000000000000000000", + "0xf10462e58fcc07f39584a187639451167e859201": "169830000000000000000", + "0x1aa27699cada8dc3a76f7933aa66c71919040e88": "400000000000000000000", + "0x24046b91da9b61b629cb8b8ec0c351a07e0703e4": "2000000000000000000000", + "0x41033c1b6d05e1ca89b0948fc64453fbe87ab25e": "1337000000000000000000", + "0x369822f5578b40dd1f4471706b22cd971352da6b": "346000000000000000000", + "0x044e853144e3364495e7a69fa1d46abea3ac0964": "49225000000000000000", + "0xabf728cf9312f22128024e7046c251f5dc5901ed": "29550000000000000000000", + "0xd781f7fc09184611568570b4986e2c72872b7ed0": "20002000000000000000", + "0x6bb4a661a33a71d424d49bb5df28622ed4dffcf4": "630400000000000000000", + "0xfef3b3dead1a6926d49aa32b12c22af54d9ff985": "1000000000000000000000", + "0xfa410971ad229c3036f41acf852f2ac999281950": "3997400000000000000000", + "0xde176b5284bcee3a838ba24f67fc7cbf67d78ef6": "37600000000000000000", + "0x23120046f6832102a752a76656691c863e17e59c": "329800000000000000000", + "0xa2f472fe4f22b77db489219ea4023d11582a9329": "40000000000000000000000", + "0xf0d64cf9df09741133d170485fd24b005011d520": "498680000000000000000", + "0x8b505e2871f7deb7a63895208e8227dcaa1bff05": "61216600000000000000000", + "0x481e3a91bfdc2f1c8428a0119d03a41601417e1c": "1000000000000000000000", + "0xbc69a0d2a31c3dbf7a9122116901b2bdfe9802a0": "3000000000000000000000", + "0x20a81680e465f88790f0074f60b4f35f5d1e6aa5": "1279851000000000000000", + "0x194a6bb302b8aba7a5b579df93e0df1574967625": "500000000000000000000", + "0x264cc8086a8710f91b21720905912cd7964ae868": "26740000000000000000", + "0x24aca08d5be85ebb9f3132dfc1b620824edfedf9": "18200000000000000000", + "0x1851a063ccdb30549077f1d139e72de7971197d5": "2000000000000000000000", + "0xf64a4ac8d540a9289c68d960d5fb7cc45a77831c": "2000000000000000000000", + "0xc3db5657bb72f10d58f231fddf11980aff678693": "5910000000000000000000", + "0xb46ace865e2c50ea4698d216ab455dff5a11cd72": "1000000000000000000000", + "0x9faea13c733412dc4b490402bfef27a0397a9bc3": "310000000000000000000", + "0xb40594c4f3664ef849cca6227b8a25aa690925ee": "4000000000000000000000", + "0x672fa0a019088db3166f6119438d07a99f8ba224": "13370000000000000000000", + "0xc1ffad07db96138c4b2a530ec1c7de29b8a0592c": "17600000000000000000", + "0x87af25d3f6f8eea15313d5fe4557e810c524c083": "19700000000000000000000", + "0xd6a22e598dabd38ea6e958bd79d48ddd9604f4df": "1000000000000000000000", + "0xa2a435de44a01bd0ecb29e44e47644e46a0cdffb": "500171000000000000000", + "0x549b47649cfad993e4064d2636a4baa0623305cc": "601650000000000000000", + "0x1321b605026f4ffb296a3e0edcb390c9c85608b7": "2000000000000000000000", + "0xb4bf24cb83686bc469869fefb044b909716993e2": "2000000000000000000000", + "0x12d91a92d74fc861a729646db192a125b79f5374": "18200000000000000000", + "0x7f0662b410298c99f311d3a1454a1eedba2fea76": "200000000000000000000", + "0x83908aa7478a6d1c9b9b0281148f8f9f242b9fdc": "2000000000000000000000", + "0xc1438c99dd51ef1ca8386af0a317e9b041457888": "223500000000000000000", + "0x545bb070e781172eb1608af7fc2895d6cb87197e": "2244000000000000000000", + "0x161d26ef6759ba5b9f20fdcd66f16132c352415e": "2000000000000000000000", + "0xd7f370d4bed9d57c6f49c999de729ee569d3f4e4": "200000000000000000000", + "0x90e35aabb2deef408bb9b5acef714457dfde6272": "100076000000000000000", + "0x0fcfc4065008cfd323305f6286b57a4dd7eee23b": "20000000000000000000000", + "0xcd725d70be97e677e3c8e85c0b26ef31e9955045": "1337000000000000000000", + "0xdcf6b657266e91a4dae6033ddac15332dd8d2b34": "1760000000000000000000", + "0x31f006f3494ed6c16eb92aaf9044fa8abb5fd5a3": "500000000000000000000", + "0xcdea386f9d0fd804d02818f237b7d9fa7646d35e": "3012139000000000000000", + "0xd45b3341e8f15c80329320c3977e3b90e7826a7e": "500000000000000000000", + "0x0b649da3b96a102cdc6db652a0c07d65b1e443e6": "2000000000000000000000", + "0x0a58fddd71898de773a74fdae45e7bd84ef43646": "20000000000000000000", + "0x0256149f5b5063bea14e15661ffb58f9b459a957": "704000000000000000000", + "0x4438e880cb2766b0c1ceaec9d2418fceb952a044": "133712000000000000000", + "0x9ed80eda7f55054db9fb5282451688f26bb374c1": "300000000000000000000", + "0x8dab948ae81da301d972e3f617a912e5a753712e": "400000000000000000000", + "0x5b5d8c8eed6c85ac215661de026676823faa0a0c": "20000000000000000000000", + "0x46722a36a01e841d03f780935e917d85d5a67abd": "14900000000000000000", + "0xd4b8bdf3df9a51b0b91d16abbea05bb4783c8661": "1000000000000000000000", + "0x98f6b8e6213dbc9a5581f4cce6655f95252bdb07": "319968000000000000000", + "0x3599493ce65772cf93e98af1195ec0955dc98002": "1500048000000000000000", + "0xecab5aba5b828de1705381f38bc744b32ba1b437": "940000000000000000000", + "0x9a82826d3c29481dcc2bd2950047e8b60486c338": "20000000000000000000000", + "0x6c474bc66a54780066aa4f512eefa773abf919c7": "94000000000000000000", + "0xd5903e9978ee20a38c3f498d63d57f31a39f6a06": "10380000000000000000000", + "0x341480cc8cb476f8d01ff30812e7c70e05afaf5d": "2000000000000000000000", + "0xaf771039345a343001bc0f8a5923b126b60d509c": "985000000000000000000", + "0xb5a4679685fa14196c2e9230c8c4e33bffbc10e2": "1400000000000000000000", + "0x2a400dff8594de7228b4fd15c32322b75bb87da8": "95810000000000000000", + "0xa1336dfb96b6bcbe4b3edf3205be5723c90fad52": "5000000000000000000000", + "0xe9b1f1fca3fa47269f21b061c353b7f5e96d905a": "500000000000000000000", + "0x0ee414940487fd24e390378285c5d7b9334d8b65": "2680000000000000000000", + "0x6ab5b4c41cddb829690c2fda7f20c85e629dd5d5": "1860000000000000000000", + "0xdd63042f25ed32884ad26e3ad959eb94ea36bf67": "21340000000000000000000", + "0xc0b3f244bca7b7de5b48a53edb9cbeab0b6d88c0": "5820000000000000000000", + "0xed1a5c43c574d4e934299b24f1472cdc9fd6f010": "200000000000000000000", + "0xb2d9ab9664bcf6df203c346fc692fd9cbab9205e": "438000000000000000000", + "0xede8c2cb876fbe8a4cca8290361a7ea01a69fdf8": "7813091000000000000000", + "0x6a7c252042e7468a3ff773d6450bba85efa26391": "500000000000000000000", + "0xa106e6923edd53ca8ed650968a9108d6ccfd9670": "9499935000000000000000", + "0x031e25db516b0f099faebfd94f890cf96660836b": "2000000000000000000000", + "0x7fdbc3a844e40d96b2f3a635322e6065f4ca0e84": "2000000000000000000000", + "0xdf47a61b72535193c561cccc75c3f3ce0804a20e": "398000000000000000000", + "0xed31305c319f9273d3936d8f5b2f71e9b1b22963": "100000000000000000000", + "0xa6b2d573297360102c07a18fc21df2e7499ff4eb": "4011000000000000000000", + "0xf68464bf64f2411356e4d3250efefe5c50a5f65b": "20000000000000000000", + "0x927cc2bfda0e088d02eff70b38b08aa53cc30941": "1852700000000000000000", + "0x41cb9896445f70a10a14215296daf614e32cf4d5": "1910000000000000000000", + "0x3ad70243d88bf0400f57c8c1fd57811848af162a": "860000000000000000000", + "0x63b9754d75d12d384039ec69063c0be210d5e0e3": "2694055000000000000000", + "0xad1799aad7602b4540cd832f9db5f11150f1687a": "2000000000000000000000", + "0xa8b65ba3171a3f77a6350b9daf1f8d55b4d201eb": "745000000000000000000", + "0xad0a4ae478e9636e88c604f242cf5439c6d45639": "3520000000000000000000", + "0x4cd0b0a6436362595ceade052ebc9b929fb6c6c0": "2000000000000000000000", + "0xc1d4af38e9ba799040894849b8a8219375f1ac78": "20000000000000000000000", + "0x49ddee902e1d0c99d1b11af3cc8a96f78e4dcf1a": "199358000000000000000", + "0xae842210f44d14c4a4db91fc9d3b3b50014f7bf7": "4000000000000000000000", + "0x10a1c42dc1ba746986b985a522a73c93eae64c63": "1000000000000000000000", + "0x5103bc09933e9921fd53dc536f11f05d0d47107d": "4000000000000000000000", + "0xc88eec54d305c928cc2848c2fee23531acb96d49": "1999946000000000000000", + "0x9a2ce43b5d89d6936b8e8c354791b8afff962425": "2000000000000000000000", + "0x562020e3ed792d2f1835fe5f55417d5111460c6a": "20000000000000000000000", + "0xed16ce39feef3bd7f5d162045e0f67c0f00046bb": "20000000000000000000", + "0xab948a4ae3795cbca13126e19253bdc21d3a8514": "200000000000000000000", + "0xc12b7f40df9a2f7bf983661422ab84c9c1f50858": "8000000000000000000000", + "0x62e6b2f5eb94fa7a43831fc87e254a3fe3bf8f89": "250000000000000000000", + "0x423bca47abc00c7057e3ad34fca63e375fbd8b4a": "18000000000000000000000", + "0x5ff326cd60fd136b245e29e9087a6ad3a6527f0d": "1880000000000000000000", + "0x79ffb4ac13812a0b78c4a37b8275223e176bfda5": "17300000000000000000", + "0xf757fc8720d3c4fa5277075e60bd5c411aebd977": "2000000000000000000000", + "0x0bdbc54cc8bdbbb402a08911e2232a5460ce866b": "3000000000000000000000", + "0x9ee9760cc273d4706aa08375c3e46fa230aff3d5": "8950000000000000000000", + "0xd23a24d7f9468343c143a41d73b88f7cbe63be5e": "200000000000000000000", + "0x46d80631284203f6288ecd4e5758bb9d41d05dbe": "2000000000000000000000", + "0x3f4cd1399f8a34eddb9a17a471fc922b5870aafc": "200000000000000000000", + "0x44c54eaa8ac940f9e80f1e74e82fc14f1676856a": "7880000000000000000000", + "0xaec27ff5d7f9ddda91183f46f9d52543b6cd2b2f": "450000000000000000000", + "0x203c6283f20df7bc86542fdfb4e763ecdbbbeef5": "25000000000000000000000", + "0xbcaf347918efb2d63dde03e39275bbe97d26df50": "100000000000000000000", + "0x974d0541ab4a47ec7f75369c0069b64a1b817710": "400000000000000000000", + "0x5da54785c9bd30575c89deb59d2041d20a39e17b": "1967031000000000000000", + "0x1fb463a0389983df7d593f7bdd6d78497fed8879": "20000000000000000000", + "0x6e1ea4b183e252c9bb7767a006d4b43696cb8ae9": "294245000000000000000", + "0xc2aa74847e86edfdd3f3db22f8a2152feee5b7f7": "2048852000000000000000", + "0xa13b9d82a99b3c9bba5ae72ef2199edc7d3bb36c": "1999944000000000000000", + "0x5135fb8757600cf474546252f74dc0746d06262c": "2000000000000000000000", + "0x43e7ec846358d7d0f937ad1c350ba069d7bf72bf": "118800000000000000000", + "0xf2ed3e77254acb83231dc0860e1a11242ba627db": "1980000000000000000000", + "0xc0a02ab94ebe56d045b41b629b98462e3a024a93": "100000000000000000000", + "0xf21549bdd1487912f900a7523db5f7626121bba3": "10000000000000000000000", + "0x886d0a9e17c9c095af2ea2358b89ec705212ee94": "28000000000000000000", + "0x211b29cefc79ae976744fdebcebd3cbb32c51303": "14000000000000000000000", + "0xb8c2703d8c3f2f44c584bc10e7c0a6b64c1c097e": "5550000000000000000000", + "0xec30addd895b82ee319e54fb04cb2bb03971f36b": "2000000000000000000000", + "0xb71b62f4b448c02b1201cb5e394ae627b0a560ee": "500000000000000000000", + "0xe1334e998379dfe983177062791b90f80ee22d8d": "500000000000000000000", + "0x1d633097a85225a1ff4321b12988fdd55c2b3844": "4000000000000000000000", + "0x8bd8d4c4e943f6c8073921dc17e3e8d7a0761627": "2933330000000000000000", + "0xa5d96e697d46358d119af7819dc7087f6ae47fef": "14605131000000000000000", + "0xd0809498c548047a1e2a2aa6a29cd61a0ee268bd": "2000000000000000000000", + "0x3cd6b7593cbee77830a8b19d0801958fcd4bc57a": "500000000000000000000", + "0xead4d2eefb76abae5533961edd11400406b298fc": "3880000000000000000000", + "0x6331028cbb5a21485bc51b565142993bdb2582a9": "534800000000000000000", + "0x163bad4a122b457d64e8150a413eae4d07023e6b": "18800000000000000000", + "0xc522e20fbf04ed7f6b05a37b4718d6fce0142e1a": "4000000000000000000000", + "0x2d9bad6f1ee02a70f1f13def5cccb27a9a274031": "1790000000000000000000", + "0x5ed0d6338559ef44dc7a61edeb893fa5d83fa1b5": "220000000000000000000", + "0xec8c1d7b6aaccd429db3a91ee4c9eb1ca4f6f73c": "4250000000000000000000", + "0x3896ad743579d38e2302454d1fb6e2ab69e01bfd": "1880000000000000000000", + "0xe73ccf436725c151e255ccf5210cfce5a43f13e3": "19982000000000000000", + "0x9483d98f14a33fdc118d403955c29935edfc5f70": "459600000000000000000", + "0x1cfcf7517f0c08459720942b647ad192aa9c8828": "800000000000000000000", + "0x8d378f0edc0bb0f0686d6a20be6a7692c4fa24b8": "100000000000000000000", + "0x06f68de3d739db41121eacf779aada3de8762107": "28000000000000000000", + "0x9909650dd5b1397b8b8b0eb69499b291b0ad1213": "200000000000000000000", + "0xb66675142e3111a1c2ea1eb2419cfa42aaf7a234": "1000000000000000000000", + "0x7836f7ef6bc7bd0ff3acaf449c84dd6b1e2c939f": "4142296000000000000000", + "0x3ddedbe48923fbf9e536bf9ffb0747c9cdd39eef": "16100000000000000000000", + "0xc47d610b399250f70ecf1389bab6292c91264f23": "288800000000000000000", + "0x51a6d627f66a8923d88d6094c4715380d3057cb6": "1152044000000000000000", + "0x6c0cc917cbee7d7c099763f14e64df7d34e2bf09": "250000000000000000000", + "0xaaaae68b321402c8ebc13468f341c63c0cf03fce": "1520000000000000000000", + "0x819cdaa5303678ef7cec59d48c82163acc60b952": "14523448000000000000000", + "0xd071192966eb69c3520fca3aa4dd04297ea04b4e": "110000000000000000000", + "0xe53425d8df1f11c341ff58ae5f1438abf1ca53cf": "322000000000000000000", + "0x8ffe322997b8e404422d19c54aadb18f5bc8e9b7": "3940000000000000000000", + "0x305f78d618b990b4295bac8a2dfa262884f804ea": "4000000000000000000000", + "0x274d69170fe7141401882b886ac4618c6ae40edb": "955000000000000000000", + "0x69c94e07c4a9be3384d95dfa3cb9290051873b7b": "70000000000000000000", + "0x859c600cf13d1d0273d5d1da3cd789e495899f27": "2674000000000000000000", + "0xc06cebbbf7f5149a66f7eb976b3e47d56516da2f": "2000000000000000000000", + "0x37bbc47212d82fcb5ee08f5225ecc2041ad2da7d": "3280000000000000000000", + "0x11e7997edd904503d77da6038ab0a4c834bbd563": "388000000000000000000", + "0xd333627445f2d787901ef33bb2a8a3675e27ffec": "400000000000000000000", + "0x16a58e985dccd707a594d193e7cca78b5d027849": "1360000000000000000000", + "0xf8ae857b67a4a2893a3fbe7c7a87ff1c01c6a6e7": "4000000000000000000000", + "0x491561db8b6fafb9007e62d050c282e92c4b6bc8": "30000000000000000000000", + "0x21df1ec24b4e4bfe79b0c095cebae198f291fbd1": "20000000000000000000000", + "0xe208812a684098f3da4efe6aba256256adfe3fe6": "2000000000000000000000", + "0xf4ec8e97a20aa5f8dd206f55207e06b813df2cc0": "200000000000000000000", + "0x29eb7eefdae9feb449c63ff5f279d67510eb1422": "19400000000000000000", + "0x0d678706d037187f3e22e6f69b99a592d11ebc59": "1580000000000000000000", + "0xde6d363106cc6238d2f092f0f0372136d1cd50c6": "5348000000000000000000", + "0xc8710d7e8b5a3bd69a42fe0fa8b87c357fddcdc8": "4000000000000000000000", + "0x5267f4d41292f370863c90d793296903843625c7": "1400000000000000000000", + "0x4cda41dd533991290794e22ae324143e309b3d3d": "2400000000000000000000", + "0xf8a50cee2e688ceee3aca4d4a29725d4072cc483": "2000000000000000000000", + "0x5ed3bbc05240e0d399eb6ddfe60f62de4d9509af": "193999806000000000000000", + "0x0befb54707f61b2c9fb04715ab026e1bb72042bd": "4000000000000000000000", + "0xcab9a301e6bd46e940355028eccd40ce4d5a1ac3": "400000000000000000000", + "0x64672da3ab052821a0243d1ce4b6e0a36517b8eb": "200000000000000000000", + "0xeac0827eff0c6e3ff28a7d4a54f65cb7689d7b99": "2856500000000000000000", + "0xf4b6cdcfcb24230b337d770df6034dfbd4e1503f": "19000000000000000000000", + "0x7be2f7680c802da6154c92c0194ae732517a7169": "18200000000000000000", + "0x869f1aa30e4455beb1822091de5cadec79a8f946": "8000000000000000000000", + "0xc4681e73bb0e32f6b726204831ff69baa4877e32": "1820000000000000000000", + "0x962cd22a8edf1e4f4e55b4b15ddbfb5d9d541971": "2000000000000000000000", + "0x131df8d330eb7cc7147d0a55576f05de8d26a8b7": "188000000000000000000", + "0x19f99f2c0b46ce8906875dc9f90ae104dae35594": "4507300000000000000000", + "0x91bb3f79022bf3c453f4ff256e269b15cf2c9cbd": "1519000000000000000000", + "0x7301dc4cf26d7186f2a11bf8b08bf229463f64a3": "2000000000000000000000", + "0x7cbca88fca6a0060b960985c9aa1b02534dc2208": "462500000000000000000", + "0xf3c1abd29dc57b41dc192d0e384d021df0b4f6d4": "2798000000000000000000", + "0x5d32f6f86e787ff78e63d78b0ef95fe6071852b8": "401100000000000000000", + "0x1678c5f2a522393225196361894f53cc752fe2f3": "1936000000000000000000", + "0x1cf04cb14380059efd3f238b65d5beb86afa14d8": "20000000000000000000", + "0x52e1731350f983cc2c4189842fde0613fad50ce1": "11640000000000000000000", + "0xd0b11d6f2bce945e0c6a5020c3b52753f803f9d1": "200000000000000000000", + "0x409bd75085821c1de70cdc3b11ffc3d923c74010": "4000000000000000000000", + "0x0bb7160aba293762f8734f3e0326ffc9a4cac190": "1000000000000000000000", + "0x7aad4dbcd3acf997df93586956f72b64d8ad94ee": "4000000000000000000000", + "0x2dec98329d1f96c3a59caa7981755452d4da49d5": "200000000000000000000", + "0xc18ab467feb5a0aadfff91230ff056464d78d800": "2000000000000000000000", + "0xc90c3765156bca8e4897ab802419153cbe5225a9": "200000000000000000000", + "0x85c8f3cc7a354feac99a5e7bfe7cdfa351cfe355": "400000000000000000000", + "0xf4fc4d39bc0c2c4068a36de50e4ab4d4db7e340a": "25380000000000000000", + "0xf50abbd4aa45d3eb88515465a8ba0b310fd9b521": "6685000000000000000000", + "0x4d200110124008d56f76981256420c946a6ff45c": "199955000000000000000", + "0xf4ba6a46d55140c439cbcf076cc657136262f4f8": "2000000000000000000000", + "0xfa7adf660b8d99ce15933d7c5f072f3cbeb99d33": "5910000000000000000000", + "0x84503334630d77f74147f68b2e086613c8f1ade9": "1600000000000000000000", + "0x31ed858788bda4d5270992221cc04206ec62610d": "1176000000000000000000", + "0xbfbca418d3529cb393081062032a6e1183c6b2dc": "8000000000000000000000", + "0x8263ece5d709e0d7ae71cca868ed37cd2fef807b": "990000000000000000000", + "0x23ba3864da583dab56f420873c37679690e02f00": "9800000000000000000000", + "0xcedcb3a1d6843fb6bef643617deaf38f8e98dd5f": "477500000000000000000", + "0x8fac748f784a0fed68dba43319b42a75b4649c6e": "910000000000000000000", + "0x18b8bcf98321da61fb4e3eacc1ec5417272dc27e": "880000000000000000000", + "0x776943ffb2ef5cdd35b83c28bc046bd4f4677098": "3000000000000000000000", + "0xfb8113f94d9173eefd5a3073f516803a10b286ae": "80000000000000000000", + "0x3e8349b67f5745449f659367d9ad4712db5b895a": "1820000000000000000000", + "0x79cfa9780ae6d87b2c31883f09276986c89a6735": "1000000000000000000000", + "0x5006fe4c22173980f00c74342b39cd231c653129": "2000000000000000000000", + "0x13848b46ea75beb7eaa85f59d866d77fd24cf21a": "50000000000000000000000", + "0xd64a2d50f8858537188a24e0f50df1681ab07ed7": "38800000000000000000000", + "0x4f9ce2af9b8c5e42c6808a3870ec576f313545d1": "10000000000000000000000", + "0x8764d02722000996ecd475b433298e9f540b05bf": "200000000000000000000", + "0x3b7c77dbe95dc2602ce3269a9545d04965fefdbd": "2000000000000000000000", + "0xc9dcbb056f4db7d9da39936202c5bd8230b3b477": "20000000000000000000000", + "0x9ecbabb0b22782b3754429e1757aaba04b81189f": "823743000000000000000", + "0x831c44b3084047184b2ad218680640903750c45d": "1970000000000000000000", + "0xff8eb07de3d49d9d52bbe8e5b26dbe1d160fa834": "3986000000000000000000", + "0x8ccf3aa21ab742576ad8c422f71bb188591dea8a": "1000000000000000000000", + "0xddac312a9655426a9c0c9efa3fd82559ef4505bf": "401100000000000000000", + "0x9a3e2b1bf346dd070b027357feac44a4b2c97db8": "10000000000000000000000", + "0x69d39d510889e552a396135bfcdb06e37e387633": "4000000000000000000000", + "0x83a3148833d9644984f7c475a7850716efb480ff": "3400000000000000000000", + "0x62b4a9226e61683c72c183254690daf511b4117a": "260000000000000000000", + "0x50763add868fd7361178342fc055eaa2b95f6846": "66838000000000000000", + "0x91898eab8c05c0222883cd4db23b7795e1a24ad7": "2000000000000000000000", + "0x066647cfc85d23d37605573d208ca154b244d76c": "10000000000000000000000", + "0xaaf9ee4b886c6d1e95496fd274235bf4ecfcb07d": "1400000000000000000000", + "0x06860a93525955ff624940fadcffb8e149fd599c": "1999800000000000000000", + "0xe81c2d346c0adf4cc56708f6394ba6c8c8a64a1e": "2000000000000000000000", + "0x41a8e236a30e6d63c1ff644d132aa25c89537e01": "20000000000000000000", + "0x6a679e378fdce6bfd97fe62f043c6f6405d79e99": "4000000000000000000000", + "0x933436c8472655f64c3afaaf7c4c621c83a62b38": "1000000000000000000000", + "0xabe07ced6ac5ddf991eff6c3da226a741bd243fe": "10000000000000000000000", + "0xbb56a404723cff20d0685488b05a02cdc35aacaa": "20000000000000000000", + "0x0d551ec1a2133c981d5fc6a8c8173f9e7c4f47af": "2000000000000000000000", + "0x23376ecabf746ce53321cf42c86649b92b67b2ff": "2000000000000000000000", + "0x644ba6c61082e989109f5c11d4b40e991660d403": "4000000000000000000000", + "0x680d5911ed8dd9eec45c060c223f89a7f620bbd5": "20000000000000000000000", + "0xcb1bb6f1da5eb10d4899f7e61d06c1b00fdfb52d": "1038000000000000000000", + "0x303a30ac4286ae17cf483dad7b870c6bd64d7b4a": "500000000000000000000", + "0x7b0b31ff6e24745ead8ed9bb85fc0bf2fe1d55d4": "800000000000000000000", + "0x854691ce714f325ced55ce5928ce9ba12facd1b8": "4380000000000000000000", + "0xa13cfe826d6d1841dcae443be8c387518136b5e8": "140000000000000000000000", + "0x5fcd84546896dd081db1a320bd4d8c1dd1528c4c": "20000000000000000000", + "0x3db5fe6a68bd3612ac15a99a61e555928eeceaf3": "1580000000000000000000", + "0x7a79e30ff057f70a3d0191f7f53f761537af7dff": "400000000000000000000", + "0x3d3fad49c9e5d2759c8e8e5a7a4d60a0dd135692": "20000000000000000000", + "0x05a830724302bc0f6ebdaa1ebeeeb46e6ce00b39": "98500000000000000000", + "0xe4b6ae22c7735f5b89f34dd77ad0975f0acc9181": "1000000000000000000000", + "0x3f2dd55db7eab0ebee65b33ed8202c1e992e958b": "820000000000000000000", + "0x395d6d255520a8db29abc47d83a5db8a1a7df087": "100000000000000000000", + "0x1cc90876004109cd79a3dea866cb840ac364ba1b": "2000000000000000000000", + "0xc83e9d6a58253beebeb793e6f28b054a58491b74": "281800000000000000000", + "0x901d99b699e5c6911519cb2076b4c76330c54d22": "2000000000000000000000", + "0x3a9132b7093d3ec42e1e4fb8cb31ecdd43ae773c": "2000000000000000000000", + "0xb41eaf5d51a5ba1ba39bb418dbb54fab750efb1f": "1000000000000000000000", + "0xaa493d3f4fb866491cf8f800efb7e2324ed7cfe5": "1700000000000000000000", + "0x509982f56237ee458951047e0a2230f804e2e895": "17500000000000000000000", + "0x316e92a91bbda68b9e2f98b3c048934e3cc0b416": "2000000000000000000000", + "0xa3430e1f647f321ed34739562323c7d623410b56": "999942000000000000000", + "0xfca43bbc23a0d321ba9e46b929735ce7d8ef0c18": "20000000000000000000", + "0xff45cb34c928364d9cc9d8bb00373474618f06f3": "100000000000000000000", + "0x8c999591fd72ef7111efca7a9e97a2356b3b000a": "4084000000000000000000", + "0x8579dadf1a395a3471e20b6f763d9a0ff19a3f6f": "4000000000000000000000", + "0xc8d4e1599d03b79809e0130a8dc38408f05e8cd3": "2945500000000000000000", + "0x2abce1808940cd4ef5b5e05285f82df7a9ab5e03": "9800000000000000000000", + "0x0bb0c12682a2f15c9b5741b2385cbe41f034068e": "1500000000000000000000", + "0x08b7bdcf944d5570838be70460243a8694485858": "2000000000000000000000", + "0xc452e0e4b3d6ae06b836f032ca09db409ddfe0fb": "800000000000000000000", + "0x48d4f2468f963fd79a006198bb67895d2d5aa4d3": "1400000000000000000000", + "0xf9e7222faaf0f4da40c1c4a40630373a09bed7b6": "2865000000000000000000", + "0xbf59aee281fa43fe97194351a9857e01a3b897b2": "600000000000000000000", + "0xda0d4b7ef91fb55ad265f251142067f10376ced6": "20000000000000000000000", + "0x2c6f5c124cc789f8bb398e3f889751bc4b602d9e": "24928000000000000000", + "0xc85ef27d820403805fc9ed259fff64acb8d6346a": "2000000000000000000000", + "0x9aa8308f42910e5ade09c1a5e282d6d91710bdbf": "200000000000000000000", + "0x9e4cec353ac3e381835e3c0991f8faa5b7d0a8e6": "9999917000000000000000", + "0x137cf341e8516c815814ebcd73e6569af14cf7bc": "1000000000000000000000", + "0x889da662eb4a0a2a069d2bc24b05b4ee2e92c41b": "1663417000000000000000", + "0x0998d8273115b56af43c505e087aff0676ed3659": "3999984000000000000000", + "0x3e4d13c55a84e46ed7e9cb90fd355e8ad991e38f": "1000000000000000000000", + "0xabc068b4979b0ea64a62d3b7aa897d73810dc533": "1970000000000000000000", + "0xd8fdf546674738c984d8fab857880b3e4280c09e": "20000000000000000000", + "0xaff161740a6d909fe99c59a9b77945c91cc91448": "60000000000000000000", + "0x92ad1b3d75fba67d54663da9fc848a8ade10fa67": "2000000000000000000000", + "0x819eb4990b5aba5547093da12b6b3c1093df6d46": "1000000000000000000000", + "0x643d9aeed4b180947ed2b9207cce4c3ddc55e1f7": "200000000000000000000", + "0xab3e62e77a8b225e411592b1af300752fe412463": "9850000000000000000000", + "0x650b425555e4e4c51718146836a2c1ee77a5b421": "20000000000000000000000", + "0xba8e46d69d2e2343d86c60d82cf42c2041a0c1c2": "100000000000000000000", + "0xf9570e924c95debb7061369792cf2efec2a82d5e": "20000000000000000000", + "0x4dc4bf5e7589c47b28378d7503cf96488061dbbd": "1760000000000000000000", + "0x3d7ea5bf03528100ed8af8aed2653e921b6e6725": "1000000000000000000000", + "0xa02bde6461686e19ac650c970d0672e76dcb4fc2": "8865000000000000000000", + "0xb0e760bb07c081777345e0578e8bc898226d4e3b": "2000000000000000000000", + "0x979cbf21dfec8ace3f1c196d82df962534df394f": "2832860000000000000000", + "0x9f8245c3ab7d173164861cd3991b94f1ba40a93a": "2860000000000000000000", + "0xc25cf826550c8eaf10af2234fef904ddb95213be": "1000000000000000000000", + "0x967bfaf76243cdb9403c67d2ceefdee90a3feb73": "970582000000000000000", + "0x0b2113504534642a1daf102eee10b9ebde76e261": "2733351000000000000000", + "0x74bc4a5e2045f4ff8db184cf3a9b0c065ad807d2": "2000000000000000000000", + "0xf1da40736f99d5df3b068a5d745fafc6463fc9b1": "121546000000000000000", + "0x0fa6c7b0973d0bae2940540e247d3627e37ca347": "1000000000000000000000", + "0x72b05962fb2ad589d65ad16a22559eba1458f387": "133700000000000000000", + "0x6ceae3733d8fa43d6cd80c1a96e8eb93109c83b7": "298000000000000000000", + "0x28eaea78cd4d95faecfb68836eafe83520f3bbb7": "200000000000000000000", + "0xf49f6f9baabc018c8f8e119e0115f491fc92a8a4": "10000000000000000000000", + "0x833316985d47742bfed410604a91953c05fb12b0": "2000000000000000000000", + "0xead75016e3a0815072b6b108bcc1b799acf0383e": "2000000000000000000000", + "0x0032403587947b9f15622a68d104d54d33dbd1cd": "77500000000000000000", + "0x8f64b9c1246d857831643107d355b5c75fef5d4f": "1999944000000000000000", + "0x15dcafcc2bace7b55b54c01a1c514626bf61ebd8": "9400000000000000000000", + "0x6886ada7bbb0617bda842191c68c922ea3a8ac82": "1160000000000000000000", + "0xf736dc96760012388fe88b66c06efe57e0d7cf0a": "2100000000000000000000", + "0x0b288a5a8b75f3dc4191eb0457e1c83dbd204d25": "4853000000000000000000", + "0x56b6c23dd2ec90b4728f3bb2e764c3c50c85f144": "1000000000000000000000", + "0x6310b020fd98044957995092090f17f04e52cdfd": "1580000000000000000000", + "0xb0baeb30e313776c4c6d247402ba4167afcda1cc": "1970000000000000000000", + "0x7641f7d26a86cddb2be13081810e01c9c83c4b20": "13370000000000000000", + "0x07a8dadec142571a7d53a4297051786d072cba55": "22729000000000000000", + "0xcc73dd356b4979b579b401d4cc7a31a268ddce5a": "500000000000000000000", + "0xadf1acfe99bc8c14b304c8d905ba27657b8a7bc4": "20000000000000000000000", + "0x72dabb5b6eed9e99be915888f6568056381608f8": "208433000000000000000", + "0x9de20ae76aa08263b205d5142461961e2408d266": "252000000000000000000", + "0x9d4ff989b7bed9ab109d10c8c7e55f02d76734ad": "1000000000000000000000", + "0xe58dd23238ee6ea7c2138d385df500c325f376be": "1820000000000000000000", + "0x4bd6dd0cff23400e1730ba7b894504577d14e74a": "206028000000000000000000", + "0x35147430c3106500e79fa2f502462e94703c23b1": "1999944000000000000000", + "0xc0ae14d724832e2fce2778de7f7b8daf7b12a93e": "20000000000000000000", + "0xb57413060af3f14eb479065f1e9d19b3757ae8cc": "40000000000000000000", + "0x7d04d2edc058a1afc761d9c99ae4fc5c85d4c8a6": "314807840000000000000000", + "0x1c94d636e684eb155895ce6db4a2588fba1d001b": "2000000000000000000000", + "0xc721b2a7aa44c21298e85039d00e2e460e670b9c": "140800000000000000000", + "0x2d89a8006a4f137a20dc2bec46fe2eb312ea9654": "200000000000000000000", + "0x646afba71d849e80c0ed59cac519b278e7f7abe4": "1000000000000000000000", + "0x71f2cdd1b046e2da2fbb5a26723422b8325e25a3": "99960000000000000000", + "0x2c9fa72c95f37d08e9a36009e7a4b07f29bad41a": "16100000000000000000", + "0x848fbd29d67cf4a013cb02a4b176ef244e9ee68d": "20116000000000000000", + "0x68190ca885da4231874c1cfb42b1580a21737f38": "3820000000000000000000", + "0x9adf458bff3599eee1a26398853c575bc38c6313": "280000000000000000000", + "0xb72220ade364d0369f2d2da783ca474d7b9b34ce": "499986000000000000000", + "0x38e2af73393ea98a1d993a74df5cd754b98d529a": "1790000000000000000000", + "0x4d38d90f83f4515c03cc78326a154d358bd882b7": "185000000000000000000", + "0xaa8eb0823b07b0e6d20aadda0e95cf3835be192e": "32000000000000000000", + "0x008639dabbe3aeac887b5dc0e43e13bcd287d76c": "310200000000000000000", + "0xfa3a0c4b903f6ea52ea7ab7b8863b6a616ad6650": "20000000000000000000", + "0xe26bf322774e18288769d67e3107deb7447707b8": "2000000000000000000000", + "0xe061a4f2fc77b296d19ada238e49a5cb8ecbfa70": "4000000000000000000000", + "0xb320834836d1dbfda9e7a3184d1ad1fd4320ccc0": "1000000000000000000000", + "0x0ed3bb3a4eb554cfca97947d575507cdfd6d21d8": "547863000000000000000", + "0x32fa0e86cd087dd68d693190f32d93310909ed53": "4000000000000000000000", + "0x5b759fa110a31c88469f54d44ba303d57dd3e10f": "1683760000000000000000", + "0x136f4907cab41e27084b9845069ff2fd0c9ade79": "4000000000000000000000", + "0x3d89e505cb46e211a53f32f167a877bec87f4b0a": "25019000000000000000", + "0x57a852fdb9b1405bf53ccf9508f83299d3206c52": "2000000000000000000000", + "0x747abc9649056d3926044d28c3ad09ed17b67d70": "5000057000000000000000", + "0x5c29f9e9a523c1f8669448b55c48cbd47c25e610": "964320000000000000000", + "0x30a9da72574c51e7ee0904ba1f73a6b7b83b9b9d": "20200000000000000000", + "0x220e2b92c0f6c902b513d9f1e6fab6a8b0def3d7": "800000000000000000000", + "0x5af7c072b2c5acd71c76addcce535cf7f8f93585": "20000000000000000000", + "0x81556db27349ab8b27004944ed50a46e941a0f5f": "3998000000000000000000", + "0x987618c85656207c7bac1507c0ffefa2fb64b092": "64419000000000000000", + "0xe0f372347c96b55f7d4306034beb83266fd90966": "400000000000000000000", + "0x71784c105117c1f68935797fe159abc74e43d16a": "2001600000000000000000", + "0x9284f96ddb47b5186ee558aa31324df5361c0f73": "16000000000000000000000", + "0xa60c1209754f5d87b181da4f0817a81859ef9fd8": "50000000000000000000", + "0x5afda9405c8e9736514574da928de67456010918": "6008500000000000000000", + "0x6978696d5150a9a263513f8f74c696f8b1397cab": "6640000000000000000000", + "0xa9ad1926bc66bdb331588ea8193788534d982c98": "30000000000000000000000", + "0xe3f80b40fb83fb97bb0d5230af4f6ed59b1c7cc8": "1337000000000000000000", + "0xe207578e1f4ddb8ff6d5867b39582d71b9812ac5": "3880000000000000000000", + "0x86883d54cd3915e549095530f9ab1805e8c5432d": "4000000000000000000000", + "0x6974c8a414ceaefd3c2e4dfdbef430568d9a960b": "334250000000000000000", + "0x532d32b00f305bcc24dcef56817d622f34fb2c24": "1800000000000000000000", + "0x761f8a3a2af0a8bdbe1da009321fb29764eb62a1": "10000000000000000000000", + "0x4677b04e0343a32131fd6abb39b1b6156bba3d5b": "200000000000000000000", + "0xef69781f32ffce33346f2c9ae3f08493f3e82f89": "18200000000000000000", + "0xe3b3d2c9bf570be6a2f72adca1862c310936a43c": "100100000000000000000", + "0xd19caf39bb377fdf2cf19bd4fb52591c2631a63c": "1000000000000000000000", + "0x5d68324bcb776d3ffd0bf9fea91d9f037fd6ab0f": "2000000000000000000000", + "0x1c99fe9bb6c6d1066d912099547fd1f4809eacd9": "2000000000000000000000", + "0xbbfe0a830cace87b7293993a7e9496ce64f8e394": "6000000000000000000000", + "0x26c0054b700d3a7c2dcbe275689d4f4cad16a335": "2000000000000000000000", + "0x7d7e7c61779adb7706c94d32409a2bb4e994bf60": "865992000000000000000", + "0xd037d215d11d1df3d54fbd321cd295c5465e273b": "1400000000000000000000", + "0x08166f02313feae18bb044e7877c808b55b5bf58": "1970000000000000000000", + "0x781b1501647a2e06c0ed43ff197fccec35e1700b": "3000000000000000000000", + "0x74316adf25378c10f576d5b41a6f47fa98fce33d": "336082000000000000000", + "0x44e2fdc679e6bee01e93ef4a3ab1bcce012abc7c": "410231000000000000000", + "0x178eaf6b8554c45dfde16b78ce0c157f2ee31351": "320000000000000000000", + "0xcf923a5d8fbc3d01aa079d1cfe4b43ce071b1611": "2000000000000000000000", + "0x0c28847e4f09dfce5f9b25af7c4e530f59c880fe": "1000000000000000000000", + "0x54ce88275956def5f9458e3b95decacd484021a0": "2000000000000000000000", + "0x9d4213339a01551861764c87a93ce8f85f87959a": "200000000000000000000", + "0xe559b5fd337b9c5572a9bf9e0f2521f7d446dbe4": "200000000000000000000", + "0xdcb03bfa6c1131234e56b7ea7c4f721487546b7a": "1337000000000000000000", + "0xdb6ff71b3db0928f839e05a7323bfb57d29c87aa": "910000000000000000000", + "0xeb7c202b462b7cc5855d7484755f6e26ef43a115": "2000000000000000000000", + "0x323486ca64b375474fb2b759a9e7a135859bd9f6": "400000000000000000000", + "0x2c1df8a76f48f6b54bcf9caf56f0ee1cf57ab33d": "10118000000000000000000", + "0x2cd87866568dd81ad47d9d3ad0846e5a65507373": "400000000000000000000", + "0x8566610901aace38b83244f3a9c831306a67b9dc": "3256000000000000000000", + "0x1c257ad4a55105ea3b58ed374b198da266c85f63": "10000000000000000000000", + "0xcf4f1138f1bd6bf5b6d485cce4c1017fcb85f07d": "882038000000000000000", + "0xc934becaf71f225f8b4a4bf7b197f4ac9630345c": "20000000000000000000000", + "0x1e2bf4ba8e5ef18d37de6d6ad636c4cae489d0cc": "2000000000000000000000", + "0x9d78a975b7db5e4d8e28845cfbe7e31401be0dd9": "1340000000000000000000", + "0x16aa52cb0b554723e7060f21f327b0a68315fea3": "250000000000000000000", + "0x97e28973b860c567402800fbb63ce39a048a3d79": "97000000000000000000", + "0x4ac5acad000b8877214cb1ae00eac9a37d59a0fd": "4000000000000000000000", + "0x01226e0ad8d62277b162621c62c928e96e0b9a8c": "2000000000000000000000", + "0x479abf2da4d58716fd973a0d13a75f530150260a": "20000000000000000000", + "0x31d81d526c195e3f10b5c6db52b5e59afbe0a995": "264000000000000000000", + "0x749087ac0f5a97c6fad021538bf1d6cda18e0daa": "1000000000000000000000", + "0x1565af837ef3b0bd4e2b23568d5023cd34b16498": "393284000000000000000", + "0x997d6592a31589acc31b9901fbeb3cc3d65b3215": "2000000000000000000000", + "0x9d207517422cc0d60de7c237097a4d4fce20940c": "500000000000000000000", + "0x24b8b446debd1947955dd084f2c544933346d3ad": "4324135000000000000000", + "0x107a03cf0842dbdeb0618fb587ca69189ec92ff5": "1970000000000000000000", + "0x7f603aec1759ea5f07c7f8d41a1428fbbaf9e762": "20000000000000000000", + "0x53a244672895480f4a2b1cdf7da5e5a242ec4dbc": "1000000000000000000000", + "0x7db4c7d5b797e9296e6382f203693db409449d62": "400000000000000000000", + "0x2ae82dab92a66389eea1abb901d1d57f5a7cca0b": "2000000000000000000000", + "0x16bc40215abbd9ae5d280b95b8010b4514ff1292": "200000000000000000000", + "0xbba4fac3c42039d828e742cde0efffe774941b39": "1999946000000000000000", + "0x5431ca427e6165a644bae326bd09750a178c650d": "2000000000000000000000", + "0xdcf33965531380163168fc11f67e89c6f1bc178a": "334885000000000000000", + "0x65fd02d704a12a4dace9471b0645f962a89671c8": "28615000000000000000", + "0x135d1719bf03e3f866312479fe338118cd387e70": "2000000000000000000000", + "0xf3159866c2bc86bba40f9d73bb99f1eee57bb9d7": "1000000000000000000000", + "0xe3a4621b66004588e31206f718cb00a319889cf0": "2000000000000000000000", + "0xabcdbc8f1dd13af578d4a4774a62182bedf9f9be": "36660000000000000000", + "0x9fbe066de57236dc830725d32a02aef9246c6c5e": "2000000000000000000000", + "0x81cfad760913d3c322fcc77b49c2ae3907e74f6e": "197000000000000000000", + "0x0ab59d390702c9c059db148eb4f3fcfa7d04c7e7": "18200000000000000000", + "0x2c2db28c3309375eea3c6d72cd6d0eec145afcc0": "2000000000000000000000", + "0x08306de51981e7aca1856859b7c778696a6b69f9": "3200000000000000000000", + "0xf814799f6ddf4dcb29c7ee870e75f9cc2d35326d": "1000000000000000000000", + "0xee867d20916bd2e9c9ece08aa04385db667c912e": "50000000000000000000000", + "0x97a86f01ce3f7cfd4441330e1c9b19e1b10606ef": "2000000000000000000000", + "0x4c759813ad1386bed27ffae9e4815e3630cca312": "2000000000000000000000", + "0x8f226096c184ebb40105e08dac4d22e1c2d54d30": "306552000000000000000", + "0x13acada8980affc7504921be84eb4944c8fbb2bd": "1601600000000000000000", + "0x122dcfd81addb97d1a0e4925c4b549806e9f3beb": "1514954000000000000000", + "0x232f525d55859b7d4e608d20487faadb00293135": "4000000000000000000000", + "0x6f7ac681d45e418fce8b3a1db5bc3be6f06c9849": "2000000000000000000000", + "0x0c8692eeff2a53d6d1688ed56a9ddbbd68dabba1": "2000000000000000000000", + "0x6a6337833f8f6a6bf10ca7ec21aa810ed444f4cb": "1028200000000000000000", + "0x209377b6ad3fe101c9685b3576545c6b1684e73c": "1820000000000000000000", + "0x560fc08d079f047ed8d7df75551aa53501f57013": "7600000000000000000000", + "0x8e78f351457d016f4ad2755ec7424e5c21ba6d51": "146000000000000000000", + "0x2ce11a92fad024ff2b3e87e3b542e6c60dcbd996": "4000000000000000000000", + "0x8ab839aeaf2ad37cb78bacbbb633bcc5c099dc46": "2000000000000000000000", + "0x673144f0ec142e770f4834fee0ee311832f3087b": "500038000000000000000", + "0xba8a63f3f40de4a88388bc50212fea8e064fbb86": "2000000000000000000000", + "0xee899b02cbcb3939cd61de1342d50482abb68532": "1760000000000000000000", + "0xc2d9eedbc9019263d9d16cc5ae072d1d3dd9db03": "20000000000000000000000", + "0x355c0c39f5d5700b41d375b3f17851dcd52401f9": "3979000000000000000000", + "0x8179c80970182cc5b7d82a4df06ea94db63a25f3": "727432000000000000000", + "0xb388b5dfecd2c5e4b596577c642556dbfe277855": "20000000000000000000", + "0xa9e28337e6357193d9e2cb236b01be44b81427df": "2200000000000000000000", + "0x04ba4bb87140022c214a6fac42db5a16dd954045": "1000000000000000000000", + "0x67c926093e9b8927933810d98222d62e2b8206bb": "1910000000000000000000", + "0xed7346766e1a676d0d06ec821867a276a083bf31": "4012890000000000000000", + "0x92558226b384626cad48e09d966bf1395ee7ea5d": "334250000000000000000", + "0xbdf693f833c3fe471753184788eb4bfe4adc3f96": "1970000000000000000000", + "0x4474299d0ee090dc90789a1486489c3d0d645e6d": "1000000000000000000000", + "0xb1178ad47383c31c8134a1941cbcd474d06244e2": "1000000000000000000000", + "0x979d681c617da16f21bcaca101ed16ed015ab696": "1880000000000000000000", + "0x6b20c080606a79c73bd8e75b11717a4e8db3f1c3": "299720000000000000000", + "0xb85218f342f8012eda9f274e63ce2152b2dcfdab": "3100000000000000000000", + "0x530b61e42f39426d2408d40852b9e34ab5ebebc5": "267400000000000000000", + "0x76afc225f4fa307de484552bbe1d9d3f15074c4a": "2998800000000000000000", + "0x1e783e522ab7df0acaac9eeed3593039e5ac7579": "203435800000000000000000", + "0x0f7bf6373f771a4601762c4dae5fbbf4fedd9cc9": "2000000000000000000000", + "0x7a8797690ab77b5470bf7c0c1bba612508e1ac7d": "8865000000000000000000", + "0x2a2ab6b74c7af1d9476bb5bcb4524797bedc3552": "1000000000000000000000", + "0x523e140dc811b186dee5d6c88bf68e90b8e096fd": "2000000000000000000000", + "0xea8168fbf225e786459ca6bb18d963d26b505309": "500000000000000000000", + "0x20ff3ede8cadb5c37b48cb14580fb65e23090a7b": "42000000000000000000000", + "0xe482d255ede56b04c3e8df151f56e9ca62aaa8c2": "500000000000000000000", + "0x2e0880a34596230720f05ac8f065af8681dcb6c2": "100000000000000000000000", + "0xc674f28c8afd073f8b799691b2f0584df942e844": "2000000000000000000000", + "0xb646df98b49442746b61525c81a3b04ba3106250": "1970000000000000000000", + "0xd55c1c8dfbe1e02cacbca60fdbdd405b09f0b75f": "2000000000000000000000", + "0x65ebaed27edb9dcc1957aee5f452ac2105a65c0e": "43531987000000000000000", + "0xf079e1b1265f50e8c8a98ec0c7815eb3aeac9eb4": "20094000000000000000", + "0x867eba56748a5904350d2ca2a5ce9ca00b670a9b": "20000000000000000000000", + "0x51ee0cca3bcb10cd3e983722ced8493d926c0866": "999972000000000000000", + "0x88d541c840ce43cefbaf6d19af6b9859b573c145": "170000000000000000000", + "0xf851b010f633c40af1a8f06a73ebbaab65077ab5": "4400000000000000000000", + "0xe0aa69365555b73f282333d1e30c1bbd072854e8": "7000000000000000000000", + "0xc7b1c83e63203f9547263ef6282e7da33b6ed659": "18200000000000000000", + "0xaf06f5fa6d1214ec43967d1bd4dde74ab814a938": "88000000000000000000", + "0x991173601947c2084a62d639527e961512579af9": "600000000000000000000", + "0x7a381122bada791a7ab1f6037dac80432753baad": "10000000000000000000000", + "0xe766f34ff16f3cfcc97321721f43ddf5a38b0cf4": "1550000000000000000000", + "0xd785a8f18c38b9bc4ffb9b8fa8c7727bd642ee1c": "1000000000000000000000", + "0xaebd4f205de799b64b3564b256d42a711d37ef99": "1177100000000000000000", + "0xa2fa17c0fb506ce494008b9557841c3f641b8cae": "20000000000000000000", + "0xa8aca748f9d312ec747f8b6578142694c7e9f399": "2000000000000000000000", + "0x950c68a40988154d2393fff8da7ccda99614f72c": "4597943000000000000000", + "0x075d15e2d33d8b4fa7dba8b9e607f04a261e340b": "1910000000000000000000", + "0x3616d448985f5d32aefa8b93a993e094bd854986": "205400000000000000000", + "0x4bb9655cfb2a36ea7c637a7b859b4a3154e26ebe": "16000000000000000000000", + "0x84949dba559a63bfc845ded06e9f2d9b7f11ef24": "2000000000000000000000", + "0x937563d8a80fd5a537b0e66d20a02525d5d88660": "2500000000000000000000", + "0xb183ebee4fcb42c220e47774f59d6c54d5e32ab1": "1604266000000000000000", + "0x21e5d77320304c201c1e53b261a123d0a1063e81": "86972000000000000000", + "0xfa14b566234abee73042c31d21717182cba14aa1": "328000000000000000000", + "0x2da617695009cc57d26ad490b32a5dfbeb934e5e": "20000000000000000000000", + "0x3326b88de806184454c40b27f309d9dd6dcfb978": "17900000000000000000000", + "0x95e6a54b2d5f67a24a4875af75107ca7ea9fd2fa": "1337000000000000000000", + "0x8db58e406e202df9bc703c480bd8ed248d52a032": "2000000000000000000000", + "0xf777361a3dd8ab62e5f1b9b047568cc0b555704c": "1000000000000000000000", + "0x83a93b5ba41bf88720e415790cdc0b67b4af34c4": "200000000000000000000", + "0x8a1cc5ac111c49bfcfd848f37dd768aa65c88802": "10000000000000000000000", + "0x52214378b54004056a7cc08c891327798ac6b248": "15200000000000000000000", + "0xad80d865b85c34d2e6494b2e7aefea6b9af184db": "4000000000000000000000", + "0xe7d6240620f42c5edbb2ede6aec43da4ed9b5757": "1000000000000000000000", + "0xd0e35e047646e759f4517093d6408642517f084d": "3939507000000000000000", + "0x9340345ca6a3eabdb77363f2586043f29438ce0b": "530922000000000000000", + "0x6640ccf053555c130ae2b656647ea6e31637b9ab": "1970000000000000000000", + "0x184d86f3466ae6683b19729982e7a7e1a48347b2": "10000000000000000000000", + "0x84ec06f24700fe42414cb9897c154c88de2f6132": "1337000000000000000000", + "0xd1e5e234a9f44266a4a6241a84d7a1a55ad5a7fe": "20000000000000000000000", + "0xe8a9a41740f44f54c3688b53e1ddd42e43c9fe94": "4000000000000000000000", + "0x6e3a51db743d334d2fe88224b5fe7c008e80e624": "106000000000000000000", + "0x3e94df5313fa520570ef232bc3311d5f622ff183": "2000000000000000000000", + "0x8957727e72cf629020f4e05edf799aa7458062d0": "2200000000000000000000", + "0xcf5e0eacd1b39d0655f2f77535ef6608eb950ba0": "2000000000000000000000", + "0xf4aaa3a6163e3706577b49c0767e948a681e16ee": "2000000000000000000000", + "0x97f1fe4c8083e596212a187728dd5cf80a31bec5": "20000000000000000000", + "0x57d5fd0e3d3049330ffcdcd020456917657ba2da": "1991240000000000000000", + "0x49bdbc7ba5abebb6389e91a3285220d3451bd253": "1000000000000000000000", + "0xae126b382cf257fad7f0bc7d16297e54cc7267da": "300000000000000000000", + "0xbbf8616d97724af3def165d0e28cda89b800009a": "114063000000000000000", + "0xadb948b1b6fefe207de65e9bbc2de98e605d0b57": "2000000000000000000000", + "0x8a217db38bc35f215fd92906be42436fe7e6ed19": "6000000000000000000000", + "0xe28b062259e96eeb3c8d4104943f9eb325893cf5": "1337000000000000000000", + "0x6a6b18a45a76467e2e5d5a2ef911c3e12929857b": "82000000000000000000000", + "0xcb68ae5abe02dcf8cbc5aa719c25814651af8b85": "500000000000000000000", + "0x4c7e2e2b77ad0cd6f44acb2861f0fb8b28750ef9": "20000000000000000000", + "0x58ba1569650e5bbbb21d35d3e175c0d6b0c651a9": "500000000000000000000", + "0x1eb4bf73156a82a0a6822080c6edf49c469af8b9": "1910000000000000000000", + "0x4103299671d46763978fa4aa19ee34b1fc952784": "200000000000000000000", + "0xe321bb4a946adafdade4571fb15c0043d39ee35f": "1575212000000000000000", + "0x893608751d68d046e85802926673cdf2f57f7cb8": "19700000000000000000", + "0x70fee08b00c6c2c04a3c625c1ff77caf1c32df01": "200000000000000000000", + "0x7b0fea1176d52159333a143c294943da36bbddb4": "9380000000000000000000", + "0xd331c823825a9e5263d052d8915d4dcde07a5c37": "564000000000000000000", + "0xa45432a6f2ac9d56577b938a37fabac8cc7c461c": "1000000000000000000000", + "0x764fc46d428b6dbc228a0f5f55c9508c772eab9f": "26000000000000000000000", + "0x1a95a8a8082e4652e4170df9271cb4bb4305f0b2": "50000000000000000000", + "0x08c9f1bfb689fdf804d769f82123360215aff93b": "1970000000000000000000", + "0x1572cdfab72a01ce968e78f5b5448da29853fbdd": "5061500000000000000000", + "0x379c7166849bc24a02d6535e2def13daeef8aa8d": "100000000000000000000", + "0xe0a254ac09b9725bebc8e460431dd0732ebcabbf": "6000000000000000000000", + "0x3225c1ca5f2a9c88156bb7d9cdc44a326653c214": "400000000000000000000", + "0x84686c7bad762c54b667d59f90943cd14d117a26": "20000000000000000000", + "0x3d5a8b2b80be8b35d8ecf789b5ed7a0775c5076c": "20000000000000000000", + "0x2ccf80e21898125eb4e807cd82e09b9d28592f6e": "2000000000000000000000", + "0xdde969aef34ea87ac299b7597e292b4a0155cc8a": "298819000000000000000", + "0x19e94e620050aad766b9e1bad931238312d4bf49": "2396000000000000000000", + "0x959f57fded6ae37913d900b81e5f48a79322c627": "255599000000000000000", + "0xb9b0a3219a3288d9b35b091b14650b8fe23dce2b": "14000000000000000000000", + "0x3575c770668a9d179f1ef768c293f80166e2aa3d": "474000000000000000000", + "0x58f05b262560503ca761c61890a4035f4c737280": "8000000000000000000000", + "0x3286d1bc657a312c8847d93cb3cb7950f2b0c6e3": "20000000000000000000000", + "0x1d9e6aaf8019a05f230e5def05af5d889bd4d0f2": "133700000000000000000", + "0xa375b4bc24a24e1f797593cc302b2f331063fa5c": "200000000000000000000", + "0x108ba7c2895c50e072dc6f964932d50c282d3034": "500000000000000000000", + "0xb6b34a263f10c3d2eceb0acc559a7b2ab85ce565": "4000000000000000000000", + "0xa4d2b429f1ad5349e31704969edc5f25ee8aca10": "10000000000000000000000", + "0x674adb21df4c98c7a347ac4c3c24266757dd7039": "2000000000000000000000", + "0x33565ba9da2c03e778ce12294f081dfe81064d24": "16000000000000000000000", + "0x4ddda7586b2237b053a7f3289cf460dc57d37a09": "10000000000000000000000", + "0xcc4faac00be6628f92ef6b8cb1b1e76aac81fa18": "205410000000000000000", + "0x5f99dc8e49e61d57daef606acdd91b4d7007326a": "3000000000000000000000", + "0xb8a979352759ba09e35aa5935df175bff678a108": "20000000000000000000", + "0x86fff220e59305c09f483860d6f94e96fbe32f57": "42900000000000000000", + "0x03e8b084537557e709eae2e1e1a5a6bce1ef8314": "20000000000000000000", + "0xdda4ff7de491c687df4574dd1b17ff8f246ba3d1": "19600000000000000000000", + "0x2538532936813c91e653284f017c80c3b8f8a36f": "2002000000000000000000", + "0x5a82f96cd4b7e2d93d10f3185dc8f43d4b75aa69": "1999400000000000000000", + "0x86740a46648e845a5d96461b18091ff57be8a16f": "98000000000000000000000", + "0x7e3f63e13129a221ba1ab06326342cd98b5126ae": "1597960000000000000000", + "0x1f5f3b34bd134b2781afe5a0424ac5846cdefd11": "99000000000000000000", + "0x39936c2719450b9420cc2522cf91db01f227c1c1": "500000000000000000000", + "0x967076a877b18ec15a415bb116f06ef32645dba3": "2000000000000000000000", + "0xa42908e7fe53980a9abf4044e957a54b70e99cbe": "2000000000000000000000", + "0x5eb371c407406c427b3b7de271ad3c1e04269579": "3000000000000000000000", + "0xa570223ae3caa851418a9843a1ac55db4824f4fd": "200000000000000000000", + "0x764692cccb33405dd0ab0c3379b49caf8e6221ba": "20000000000000000000", + "0xa365918bfe3f2627b9f3a86775d8756e0fd8a94b": "400000000000000000000", + "0x069ed0ab7aa77de571f16106051d92afe195f2d0": "200000000000000000000", + "0xbd432a3916249b4724293af9146e49b8280a7f2a": "4000000000000000000000", + "0x61c9dce8b2981cb40e98b0402bc3eb28348f03ac": "196910000000000000000", + "0x8f1fcc3c51e252b693bc5b0ec3f63529fe69281e": "6000000000000000000000", + "0x55fd08d18064bd202c0ec3d2cce0ce0b9d169c4d": "1970000000000000000000", + "0x383a7c899ee18bc214969870bc7482f6d8f3570e": "10000000000000000000000", + "0xb14cc8de33d6338236539a489020ce4655a32bc6": "8000000000000000000000", + "0x448bf410ad9bbc2fecc4508d87a7fc2e4b8561ad": "199955000000000000000", + "0x06f7dc8d1b9462cef6feb13368a7e3974b097f9f": "2000000000000000000000", + "0x9c9f89a3910f6a2ae8a91047a17ab788bddec170": "10000000000000000000000", + "0x5de598aba344378cab4431555b4f79992dc290c6": "1337000000000000000000", + "0x87e6034ecf23f8b5639d5f0ea70a22538a920423": "328000000000000000000", + "0x8b27392206b958cd375d7ef8af2cf8ef0598c0bc": "1000000000000000000000", + "0x49136fe6e28b7453fcb16b6bbbe9aaacba8337fd": "2000000000000000000000", + "0x6982fe8a867e93eb4a0bd051589399f2ec9a5292": "2000000000000000000000", + "0x9fd1052a60506bd1a9ef003afd9d033c267d8e99": "1000000000000000000000", + "0xd38fa2c4cc147ad06ad5a2f75579281f22a7cc1f": "20000000000000000000000", + "0x6f794dbdf623daa6e0d00774ad6962737c921ea4": "2000000000000000000000", + "0xe96b184e1f0f54924ac874f60bbf44707446b72b": "2910840000000000000000", + "0xb5ba29917c78a1d9e5c5c713666c1e411d7f693a": "3100000000000000000000", + "0x81d619ff5726f2405f12904c72eb1e24a0aaee4f": "20000000000000000000000", + "0xb02fa29387ec12e37f6922ac4ce98c5b09e0b00f": "2000000000000000000000", + "0xb7230d1d1ff2aca366963914a79df9f7c5ea2c98": "8000000000000000000000", + "0x7b4007c45e5a573fdbb6f8bd746bf94ad04a3c26": "15202564000000000000000", + "0x8d9a0c70d2262042df1017d6c303132024772712": "2000000000000000000000", + "0x323aad41df4b6fc8fece8c93958aa901fa680843": "970000000000000000000", + "0xdb04fad9c49f9e880beb8fcf1d3a3890e4b3846f": "1242482000000000000000", + "0x27824666d278d70423f03dfe1dc7a3f02f43e2b5": "1000070000000000000000", + "0xe04920dc6ecc1d6ecc084f88aa0af5db97bf893a": "182000000000000000000", + "0xb0c1b177a220e41f7c74d07cde8569c21c75c2f9": "5600000000000000000000", + "0x7864dc999fe4f8e003c0f43decc39aae1522dc0f": "94400000000000000000", + "0xc75c37ce2da06bbc40081159c6ba0f976e3993b1": "1078640000000000000000", + "0x179a825e0f1f6e985309668465cffed436f6aea9": "20000000000000000000", + "0x2c6b699d9ead349f067f45711a074a641db6a897": "20000000000000000000", + "0x068ce8bd6e902a45cb83b51541b40f39c4469712": "5240000000000000000000", + "0x767ac690791c2e23451089fe6c7083fe55deb62b": "820000000000000000000", + "0xb34f04b8db65bba9c26efc4ce6efc50481f3d65d": "20000000000000000000000", + "0x29aef48de8c9fbad4b9e4ca970797a5533eb722d": "10000000000000000000000", + "0x0a0ecda6636f7716ef1973614687fd89a820a706": "394000000000000000000", + "0xb32825d5f3db249ef4e85cc4f33153958976e8bc": "501375000000000000000", + "0x7ef16fd8d15b378a0fba306b8d03dd98fc92619f": "700000000000000000000", + "0xb58b52865ea55d8036f2fab26098b352ca837e18": "18200000000000000000", + "0x9b658fb361e046d4fcaa8aef6d02a99111223625": "2000000000000000000000", + "0xb2a498f03bd7178bd8a789a00f5237af79a3e3f8": "19400000000000000000000", + "0xcb48fe8265d9af55eb7006bc335645b0a3a183be": "3000000000000000000000", + "0x3cf9a1d465e78b7039e3694478e2627b36fcd141": "1372000000000000000000", + "0x5db84400570069a9573cab04b4e6b69535e202b8": "9700000000000000000000", + "0x214c89c5bd8e7d22bc574bb35e48950211c6f776": "18903000000000000000", + "0x53396f4a26c2b4604496306c5442e7fcba272e36": "20055000000000000000000", + "0x720994dbe56a3a95929774e20e1fe525cf3704e4": "8000000000000000000000", + "0x3571cf7ad304ecaee595792f4bbfa484418549d6": "5825500000000000000000", + "0x6042c644bae2b96f25f94d31f678c90dc96690db": "2000000000000000000000", + "0x2e24b597873bb141bdb237ea8a5ab747799af02d": "20000000000000000000000", + "0x08c802f87758349fa03e6bc2e2fd0791197eea9a": "2000000000000000000000", + "0x297a88921b5fca10e5bb9ded60025437ae221694": "200000000000000000000", + "0xaee49d68adedb081fd43705a5f78c778fb90de48": "20000000000000000000", + "0x4cee901b4ac8b156c5e2f8a6f1bef572a7dceb7e": "1000000000000000000000", + "0xdfaf31e622c03d9e18a0ddb8be60fbe3e661be0a": "9999800000000000000000", + "0x00aa5381b2138ebeffc191d5d8c391753b7098d2": "990049000000000000000", + "0x5b4c0c60f10ed2894bdb42d9dd1d210587810a0d": "500000000000000000000", + "0xc44f4ab5bc60397c737eb0683391b633f83c48fa": "1000000000000000000000", + "0x50bef2756248f9a7a380f91b051ba3be28a649ed": "1999884000000000000000", + "0x1bd909ac0d4a1102ec98dcf2cca96a0adcd7a951": "20055000000000000000", + "0x9ec03e02e587b7769def538413e97f7e55be71d8": "19700000000000000000000", + "0x9874803fe1f3a0365e7922b14270eaeb032cc1b5": "1124500000000000000000", + "0x4e2310191ead8d3bc6489873a5f0c2ec6b87e1be": "1000000000000000000000", + "0x93678a3c57151aeb68efdc43ef4d36cb59a009f3": "30060000000000000000", + "0xf483f607a21fcc28100a018c568ffbe140380410": "1000000000000000000000", + "0x2a91a9fed41b7d0e5cd2d83158d3e8a41a9a2d71": "1940000000000000000000", + "0x240e559e274aaef0c258998c979f671d1173b88b": "4000000000000000000000", + "0x108a2b7c336f784779d8b54d02a8d31d9a139c0a": "10000000000000000000000", + "0x9c98fdf1fdcd8ba8f4c5b04c3ae8587efdf0f6e6": "6000000000000000000000", + "0x194ff44aefc17bd20efd7a204c47d1620c86db5d": "2999400000000000000000", + "0x1f8116bd0af5570eaf0c56c49c7ab5e37a580458": "2000000000000000000000", + "0xd79835e404fb86bf845fba090d6ba25e0c8866a6": "2400000000000000000000", + "0xa8e7201ff619faffc332e6ad37ed41e301bf014a": "600000000000000000000", + "0x286906b6bd4972e3c71655e04baf36260c7cb153": "340000000000000000000", + "0xdb4bc83b0e6baadb1156c5cf06e0f721808c52c7": "880000000000000000000", + "0xa158148a2e0f3e92dc2ce38febc20107e3253c96": "2000000000000000000000", + "0x9f6a322a6d469981426ae844865d7ee0bb15c7b3": "50003000000000000000", + "0x32f29e8727a74c6b4301e3ffff0687c1b870dae9": "1000000000000000000000", + "0x19918aa09e7d494e98ffa5db50350892f7156ac6": "10000000000000000000000", + "0x5a5f8508da0ebebb90be9033bd4d9e274105ae00": "6685000000000000000000", + "0x6fc25e7e00ca4f60a9fe6f28d1fde3542e2d1079": "792000000000000000000", + "0x72094f3951ffc9771dced23ada080bcaf9c7cca7": "6000000000000000000000", + "0x43f7e86e381ec51ec4906d1476cba97a3db584e4": "1000000000000000000000", + "0x05696b73916bd3033e05521e3211dfec026e98e4": "2000000000000000000000", + "0x5e7f70378775589fc66a81d3f653e954f55560eb": "2434000000000000000000", + "0x895613236f3584216ad75c5d3e07e3fa6863a778": "2000000000000000000000", + "0x4eb1454b573805c8aca37edec7149a41f61202f4": "300000000000000000000", + "0xd99999a2490d9494a530cae4daf38554f4dd633e": "120000000000000000000", + "0x1704cefcfb1331ec7a78388b29393e85c1af7916": "400000000000000000000", + "0xac4acfc36ed6094a27e118ecc911cd473e8fb91f": "1799800000000000000000", + "0xa975b077fcb4cc8efcbf838459b6fa243a4159d6": "40000000000000000000", + "0x9c405cf697956138065e11c5f7559e67245bd1a5": "200000000000000000000", + "0xcafde855864c2598da3cafc05ad98df2898e8048": "14179272000000000000000", + "0x8ef711e43a13918f1303e81d0ea78c9eefd67eb2": "4000000000000000000000", + "0x0b14891999a65c9ef73308efe3100ca1b20e8192": "800000000000000000000", + "0x47cf9cdaf92fc999cc5efbb7203c61e4f1cdd4c3": "131400000000000000000", + "0x04ba8a3f03f08b895095994dda619edaacee3e7a": "2000000000000000000000", + "0x02b6d65cb00b7b36e1fb5ed3632c4cb20a894130": "20000000000000000000000", + "0xf99aee444b5783c093cfffd1c4632cf93c6f050c": "400000000000000000000", + "0x2541314a0b408e95a694444977712a50713591ab": "1634706000000000000000", + "0x3096dca34108085bcf04ae72b94574a13e1a3e1d": "200000000000000000000", + "0x56df05bad46c3f00ae476ecf017bb8c877383ff1": "197248000000000000000", + "0x6d59b21cd0e2748804d9abe064eac2bef0c95f27": "2000000000000000000000", + "0xb29f5b7c1930d9f97a115e067066f0b54db44b3b": "1000000000000000000000", + "0x888c16144933197cac26504dd76e06fd6600c789": "100000000000000000000", + "0xdfe3c52a92c30396a4e33a50170dc900fcf8c9cf": "50000000000000000000", + "0xf76f69cee4faa0a63b30ae1e7881f4f715657010": "200000000000000000000", + "0xee0007b0960d00908a94432a737557876aac7c31": "53053000000000000000", + "0xeffc15e487b1beda0a8d1325bdb4172240dc540a": "64940000000000000000", + "0x40ab0a3e83d0c8ac9366910520eab1772bac3b1a": "976600000000000000000", + "0x1895a0eb4a4372722fcbc5afe6936f289c88a419": "910000000000000000000", + "0x81efe296ae76c860d1c5fbd33d47e8ce9996d157": "1000000000000000000000", + "0x9ddd355e634ee9927e4b7f6c97e7bf3a2f1e687a": "50000000000000000000", + "0xf2b4ab2c9427a9015ef6eefff5edb60139b719d1": "716800000000000000000", + "0x765be2e12f629e6349b97d21b62a17b7c830edab": "6000000000000000000000", + "0xff61c9c1b7a3d8b53bba20b34466544b7b216644": "2000000000000000000000", + "0x36a08fd6fd1ac17ce15ed57eefb12a2be28188bf": "1337000000000000000000", + "0x17049311101d817efb1d65910f663662a699c98c": "1999800000000000000000", + "0x30511832918d8034a7bee72ef2bfee440ecbbcf6": "16100000000000000000000", + "0xd27c234ff7accace3d996708f8f9b04970f97d36": "1337000000000000000000", + "0xa961171f5342b173dd70e7bfe5b5ca238b13bcdd": "3397053000000000000000", + "0x30bf61b2d877fe10635126326fa189e4b0b1c3b0": "1027580000000000000000", + "0x4bb6d86b8314c22d8d37ea516d0019f156aae12d": "1000000000000000000000", + "0x5f363e0ab747e02d1b3b66abb69ea53c7baf523a": "11640000000000000000000", + "0x283e11203749b1fa4f32febb71e49d135919382a": "1000000000000000000000", + "0xac5999a89d2dd286d5a80c6dee7e86aad40f9e12": "3880000000000000000000", + "0x3f6dd3650ee428dcb7759553b017a96a94286ac9": "1337000000000000000000", + "0xb3fc1d6881abfcb8becc0bb021b8b73b7233dd91": "50000000000000000000", + "0xf0832a6bb25503eeca435be31b0bf905ca1fcf57": "6685000000000000000000", + "0x9d7fda7070bf3ee9bbd9a41f55cad4854ae6c22c": "11027380000000000000000", + "0x4b0bd8acfcbc53a6010b40d4d08ddd2d9d69622d": "668500000000000000000", + "0xf3b668b3f14d920ebc379092db98031b67b219b3": "199955000000000000000", + "0xd91d889164479ce436ece51763e22cda19b22d6b": "3365200000000000000000", + "0xffe28db53c9044b4ecd4053fd1b4b10d7056c688": "100000000000000000000", + "0xc77b01a6e911fa988d01a3ab33646beef9c138f3": "721400000000000000000", + "0xc0064f1d9474ab915d56906c9fb320a2c7098c9b": "358000000000000000000", + "0x4e3edad4864dab64cae4c5417a76774053dc6432": "590943000000000000000", + "0x71d2cc6d02578c65f73c575e76ce8fbcfadcf356": "72400000000000000000", + "0x9971df60f0ae66dce9e8c84e17149f09f9c52f64": "200000000000000000000", + "0x58e661d0ba73d6cf24099a5562b808f7b3673b68": "2000000000000000000000", + "0x84b0ee6bb837d3a4c4c5011c3a228c0edab4634a": "20000000000000000000", + "0x84375afbf59b3a1d61a1be32d075e0e15a4fbca5": "200000000000000000000", + "0x9ae9476bfecd3591964dd325cf8c2a24faed82c1": "4000000000000000000000", + "0x6a4c8907b600248057b1e46354b19bdc859c991a": "20000000000000000000", + "0x1c045649cd53dc23541f8ed4d341812808d5dd9c": "7000000000000000000000", + "0xc5e488cf2b5677933971f64cb8202dd05752a2c0": "1000000000000000000000", + "0xeb25481fcd9c221f1ac7e5fd1ecd9307a16215b8": "197000000000000000000", + "0xa61887818f914a20e31077290b83715a6b2d6ef9": "1880000000000000000000", + "0x679437eacf437878dc293d48a39c87b7421a216c": "64528000000000000000", + "0x331a1c26cc6994cdd3c14bece276ffff4b9df77c": "18049000000000000000", + "0x75b95696e8ec4510d56868a7c1a735c68b244890": "6400000000000000000000", + "0xa77f3ee19e9388bbbb2215c62397b96560132360": "200000000000000000000", + "0xbc7afc8477412274fc265df13c054473427d43c6": "130034000000000000000", + "0x91050a5cffadedb4bb6eaafbc9e5013428e96c80": "1700000000000000000000", + "0x24586ec5451735eeaaeb470dc8736aae752f82e5": "17600000000000000000", + "0x51039377eed0c573f986c5e8a95fb99a59e9330f": "1970000000000000000000", + "0xfbb161fe875f09290a4b262bc60110848f0d2226": "2000000000000000000000", + "0xed52a2cc0869dc9e9f842bd0957c47a8e9b0c9ff": "9550000000000000000000", + "0xbad235d5085dc7b068a67c412677b03e1836884c": "2000000000000000000000", + "0x055eac4f1ad3f58f0bd024d68ea60dbe01c6afb3": "100000000000000000000", + "0x4058808816fdaa3a5fc98ed47cfae6c18315422e": "199800000000000000000", + "0x3540c7bd7a8442d5bee21a2180a1c4edff1649e0": "1239295000000000000000", + "0xc5edbbd2ca0357654ad0ea4793f8c5cecd30e254": "6000000000000000000000", + "0xb5906b0ae9a28158e8ac550e39da086ee3157623": "200000000000000000000", + "0x4d801093c19ca9b8f342e33cc9c77bbd4c8312cf": "345005000000000000000", + "0x206482ee6f138a778fe1ad62b180ce856fbb23e6": "2000000000000000000000", + "0xc0ed0d4ad10de03435b153a0fc25de3b93f45204": "3160000000000000000000", + "0x29e67990e1b6d52e1055ffe049c53195a81542cf": "20000000000000000000000", + "0xe6d22209ffd0b87509ade3a8e2ef429879cb89b5": "17260000000000000000000", + "0xd6644d40e90bc97fe7dfe7cabd3269fd579ba4b3": "159000000000000000000", + "0xece1290877b583e361a2d41b009346e6274e2538": "300000000000000000000", + "0xab3861226ffec1289187fb84a08ec3ed043264e8": "1000000000000000000000", + "0x60e0bdd0a259bb9cb09d3f37e5cd8b9daceabf8a": "1370000000000000000000", + "0x28b77585cb3d55a199ab291d3a18c68fe89a848a": "1960000000000000000000", + "0x73128173489528012e76b41a5e28c68ba4e3a9d4": "1000000000000000000000", + "0x018492488ba1a292342247b31855a55905fef269": "140000000000000000000", + "0x0bb54c72fd6610bfa4363397e020384b022b0c49": "1337000000000000000000", + "0x520f66a0e2657ff0ac4195f2f064cf2fa4b24250": "40000000000000000000", + "0xa1432ed2c6b7777a88e8d46d388e70477f208ca5": "7999538000000000000000", + "0x149ba10f0da2725dc704733e87f5a524ca88515e": "7880000000000000000000", + "0xb287f7f8d8c3872c1b586bcd7d0aedbf7e732732": "20000000000000000000", + "0xc46bbdef76d4ca60d316c07f5d1a780e3b165f7e": "2000000000000000000000", + "0xb5a589dd9f4071dbb6fba89b3f5d5dae7d96c163": "2000000000000000000000", + "0xd218efb4db981cdd6a797f4bd48c7c26293ceb40": "2975000000000000000000", + "0xaf87d2371ef378957fbd05ba2f1d66931b01e2b8": "700000000000000000000", + "0x86ef6426211949cc37f4c75e7850369d0cf5f479": "13399196000000000000000", + "0xfb3a0b0d6b6a718f6fc0292a825dc9247a90a5d0": "199950000000000000000", + "0xda16dd5c3d1a2714358fe3752cae53dbab2be98c": "19400000000000000000000", + "0x9eb7834e171d41e069a77947fca87622f0ba4e48": "100000000000000000000", + "0xe1d91b0954cede221d6f24c7985fc59965fb98b8": "2000000000000000000000", + "0x85d0d88754ac84b8b21ba93dd2bfec72626faba8": "1000000000000000000000", + "0x695b4cce085856d9e1f9ff3e79942023359e5fbc": "5000000000000000000000", + "0x9156d18029350e470408f15f1aa3be9f040a67c6": "1000000000000000000000", + "0xa9d64b4f3bb7850722b58b478ba691375e224e42": "6000000000000000000000", + "0x17e4a0e52bac3ee44efe0954e753d4b85d644e05": "2000000000000000000000", + "0xb8a79c84945e47a9c3438683d6b5842cff7684b1": "2000000000000000000000", + "0xcfac2e1bf33205b05533691a02267ee19cd81836": "1000000000000000000000", + "0x6b992521ec852370848ad697cc2df64e63cc06ff": "1000000000000000000000", + "0x60af0ee118443c9b37d2fead77f5e521debe1573": "1910000000000000000000", + "0xc6dbdb9efd5ec1b3786e0671eb2279b253f215ed": "1000000000000000000000", + "0x659c0a72c767a3a65ced0e1ca885a4c51fd9b779": "2000000000000000000000", + "0xed1276513b6fc68628a74185c2e20cbbca7817bf": "191000000000000000000", + "0x5ad12c5ed4fa827e2150cfa0d68c0aa37b1769b8": "800000000000000000000", + "0x17c0fef6986cfb2e4041f9979d9940b69dff3de2": "4000000000000000000000", + "0xca98c7988efa08e925ef9c9945520326e9f43b99": "4000000000000000000000", + "0xfe8f1fdcab7fbec9a6a3fcc507619600505c36a3": "19700000000000000000", + "0x4420aa35465be617ad2498f370de0a3cc4d230af": "2000000000000000000000", + "0x8232d1f9742edf8dd927da353b2ae7b4cbce7592": "668500000000000000000", + "0xeca5f58792b8c62d2af556717ee3ee3028be4dce": "2000000000000000000000", + "0x6bf86f1e2f2b8032a95c4d7738a109d3d0ed8104": "1820000000000000000000", + "0x3ac2f0ff1612e4a1c346d53382abf6d8a25baa53": "2000000000000000000000", + "0xdaa1bd7a9148fb865cd612dd35f162861d0f3bdc": "3066243000000000000000", + "0x5169c60aee4ceed1849ab36d664cff97061e8ea8": "3000000000000000000000", + "0x2a5e3a40d2cd0325766de73a3d671896b362c73b": "100000000000000000000000", + "0xa83382b6e15267974a8550b98f7176c1a353f9be": "3541608000000000000000", + "0xb50c149a1906fad2786ffb135aab501737e9e56f": "388000000000000000000", + "0xd9775965b716476675a8d513eb14bbf7b07cd14a": "5076200000000000000000", + "0x66662006015c1f8e3ccfcaebc8ee6807ee196303": "500024000000000000000", + "0x78746a958dced4c764f876508c414a68342cecb9": "50600000000000000000", + "0xe982e6f28c548f5f96f45e63f7ab708724f53fa1": "396238000000000000000", + "0x740bfd52e01667a3419b029a1b8e45576a86a2db": "16800000000000000000000", + "0x2bd252e0d732ff1d7c78f0a02e6cb25423cf1b1a": "2674000000000000000000", + "0x2e2d7ea66b9f47d8cc52c01c52b6e191bc7d4786": "3999800000000000000000", + "0x3e3161f1ea2fbf126e79da1801da9512b37988c9": "49250000000000000000000", + "0x7e2ba86da52e785d8625334f3397ba1c4bf2e8d1": "197000000000000000000", + "0x7608f437b31f18bc0b64d381ae86fd978ed7b31f": "50000000000000000000", + "0x25a5a44d38a2f44c6a9db9cdbc6b1e2e97abb509": "17000000000000000000000", + "0x745ad3abc6eeeb2471689b539e789ce2b8268306": "1129977000000000000000", + "0x09e437d448861228a232b62ee8d37965a904ed9c": "21708305000000000000000", + "0xbe53322f43fbb58494d7cce19dda272b2450e827": "200018000000000000000", + "0x4166fc08ca85f766fde831460e9dc93c0e21aa6c": "1000000000000000000000", + "0x99c0174cf84e0783c220b4eb6ae18fe703854ad3": "2074800000000000000000", + "0x3cf484524fbdfadae26dc185e32b2b630fd2e726": "448798000000000000000", + "0xfdcd5d80b105897a57abc47865768b2900524295": "6400000000000000000000", + "0xf22f4078febbbaa8b0e78e642c8a42f35d433905": "1999944000000000000000", + "0xeac768bf14b8f9432e69eaa82a99fbeb94cd0c9c": "98500000000000000000000", + "0x2639eee9873ceec26fcc9454b548b9e7c54aa65c": "1000000000000000000000", + "0xc3c3c2510d678020485a63735d1307ec4ca6302b": "1000000000000000000000", + "0xb73d6a77559c86cf6574242903394bacf96e3570": "91200000000000000000", + "0x5ce2e7ceaaa18af0f8aafa7fbad74cc89e3cd436": "20000000000000000000000", + "0x03377c0e556b640103289a6189e1aeae63493467": "20000000000000000000000", + "0x6eb0a5a9ae96d22cf01d8fd6483b9f38f08c2c8b": "4000000000000000000000", + "0xfc8215a0a69913f62a43bf1c8590b9ddcd0d8ddb": "2000000000000000000000", + "0x4a835c25824c47ecbfc79439bf3f5c3481aa75cd": "1400000000000000000000", + "0xb5493ef173724445cf345c035d279ba759f28d51": "20000000000000000000", + "0xb9e90c1192b3d5d3e3ab0700f1bf655f5dd4347a": "499928000000000000000", + "0x419bde7316cc1ed295c885ace342c79bf7ee33ea": "6000000000000000000000", + "0xe4625501f52b7af52b19ed612e9d54fdd006b492": "209440000000000000000", + "0xe9d599456b2543e6db80ea9b210e908026e2146e": "200000000000000000000", + "0x2c06dd922b61514aafedd84488c0c28e6dcf0e99": "100000000000000000000000", + "0x06b5ede6fdf1d6e9a34721379aeaa17c713dd82a": "2000000000000000000000", + "0xd8930a39c77357c30ad3a060f00b06046331fd62": "820000000000000000000", + "0xb2a2c2111612fb8bbb8e7dd9378d67f1a384f050": "20000000000000000000", + "0x1f174f40a0447234e66653914d75bc003e5690dc": "160000000000000000000", + "0xe06cb6294704eea7437c2fc3d30773b7bf38889a": "20094000000000000000", + "0xcd06f8c1b5cdbd28e2d96b6346c3e85a0483ba24": "1000000000000000000000", + "0xf316ef1df2ff4d6c1808dba663ec8093697968e0": "1794400000000000000000", + "0x1e6915ebd9a19c81b692ad99b1218a592c1ac7b1": "4000000000000000000000", + "0x885493bda36a0432976546c1ddce71c3f4570021": "216700000000000000000", + "0x18b0407cdad4ce52600623bd5e1f6a81ab61f026": "319489000000000000000", + "0x187d9f0c07f8eb74faaad15ebc7b80447417f782": "20000000000000000000", + "0x5d6ccf806738091042ad97a6e095fe8c36aa79c5": "188000000000000000000", + "0x53437fecf34ab9d435f4deb8ca181519e2592035": "188000000000000000000", + "0xfd1faa347b0fcc804c2da86c36d5f1d18b7087bb": "52380000000000000000", + "0x650cf67db060cce17568d5f2a423687c49647609": "100000000000000000000", + "0xbcd95ef962462b6edfa10fda87d72242fe3edb5c": "334133000000000000000", + "0x3b5e8b3c77f792decb7a8985df916efb490aac23": "2000000000000000000000", + "0xf13b083093ba564e2dc631568cf7540d9a0ec719": "1999944000000000000000", + "0x373c547e0cb5ce632e1c5ad66155720c01c40995": "4691588000000000000000", + "0x7313461208455455465445a459b06c3773b0eb30": "2000000000000000000000", + "0x441f37e8a029fd02482f289c49b5d06d00e408a4": "333333000000000000000", + "0xd30d4c43adcf55b2cb53d68323264134498d89ce": "1000000000000000000000", + "0xf648ea89c27525710172944e79edff847803b775": "100000000000000000000000", + "0x0c7f869f8e90d53fdc03e8b2819b016b9d18eb26": "20000000000000000000000", + "0xc71f92a3a54a7b8c2f5ea44305fccb84eee23148": "49980000000000000000", + "0x7988901331e387f713faceb9005cb9b65136eb14": "1970000000000000000000", + "0xe9a39a8bac0f01c349c64cedb69897f633234ed2": "3980000000000000000000", + "0xad2a5c00f923aaf21ab9f3fb066efa0a03de2fb2": "999996000000000000000", + "0xf25259a5c939cd25966c9b6303d3731c53ddbc4c": "200000000000000000000", + "0xd1682c2159018dc3d07f08240a8c606daf65f8e1": "200000000000000000000000", + "0xa99991cebd98d9c838c25f7a7416d9e244ca250d": "1000000000000000000000", + "0x5a285755391e914e58025faa48cc685f4fd4f5b8": "26000000000000000000000", + "0x4d24b7ac47d2f27de90974ba3de5ead203544bcd": "100000000000000000000", + "0x21b182f2da2b384493cf5f35f83d9d1ee14f2a21": "2000000000000000000000", + "0x31ab088966ecc7229258f6098fce68cf39b38485": "1000000000000000000000", + "0x4977a7939d0939689455ce2639d0ee5a4cd910ed": "1820000000000000000000", + "0x07af938c1237a27c9030094dcf240750246e3d2c": "500000000000000000000", + "0x4e2bfa4a466f82671b800eee426ad00c071ba170": "4000000000000000000000", + "0x107379d4c467464f235bc18e55938aad3e688ad7": "50000000000000000000", + "0xf7b29b82195c882dab7897c2ae95e77710f57875": "2199000000000000000000", + "0x56586391040c57eec6f5affd8cd4abde10b50acc": "4000000000000000000000", + "0xac608e2bac9dd20728d2947effbbbf900a9ce94b": "6000600000000000000000", + "0x48548b4ba62bcb2f0d34a88dc69a680e539cf046": "100084000000000000000", + "0x1665ab1739d71119ee6132abbd926a279fe67948": "100000000000000000000", + "0xaf4493e8521ca89d95f5267c1ab63f9f45411e1b": "200000000000000000000", + "0xbf6925c00751008440a6739a02bf2b6cdaab5e3a": "1000000000000000000000", + "0x3fe40fbd919aad2818df01ee4df46c46842ac539": "6000000000000000000000", + "0x455b9296921a74d1fc41617f43b8303e6f3ed76c": "4200000000000000000000", + "0x7086b4bde3e35d4aeb24b825f1a215f99d85f745": "1999800000000000000000", + "0xd4ee4919fb37f2bb970c3fff54aaf1f3dda6c03f": "40000000000000000000000", + "0xa4489a50ead5d5445a7bee4d2d5536c2a76c41f8": "200000000000000000000", + "0x505e4f7c275588c533a20ebd2ac13b409bbdea3c": "17600000000000000000", + "0x3bb53598cc20e2055dc553b049404ac9b7dd1e83": "615020000000000000000", + "0x52cd20403ba7eda6bc307a3d63b5911b817c1263": "20000000000000000000", + "0xa211da03cc0e31ecce5309998718515528a090df": "200000000000000000000", + "0xbcb422dc4dd2aae94abae95ea45dd1731bb6b0ba": "447500000000000000000", + "0xcbde9734b8e6aa538c291d6d7facedb0f338f857": "2000000000000000000000", + "0x171ca02a8b6d62bf4ca47e906914079861972cb2": "200000000000000000000", + "0xd40d0055fd9a38488aff923fd03d35ec46d711b3": "4999711000000000000000", + "0x3887192c7f705006b630091276b39ac680448d6b": "60000000000000000000", + "0x3f3c8e61e5604cef0605d436dd22accd862217fc": "1337000000000000000000", + "0x4258fd662fc4ce3295f0d4ed8f7bb1449600a0a9": "6719600000000000000000", + "0x4571de672b9904bad8743692c21c4fdcea4c2e01": "4000000000000000000000", + "0x5be045512a026e3f1cebfd5a7ec0cfc36f2dc16b": "120000000000000000000", + "0xd6300b3215b11de762ecde4b70b7927d01291582": "2000000000000000000000", + "0xf9e37447406c412197b2e2aebc001d6e30c98c60": "8346700000000000000000", + "0xbd047ff1e69cc6b29ad26497a9a6f27a903fc4dd": "865000000000000000000", + "0x23fa7eb51a48229598f97e762be0869652dffc66": "1000000000000000000000", + "0x6679aeecd87a57a73f3356811d2cf49d0c4d96dc": "600000000000000000000", + "0x23c55aeb5739876f0ac8d7ebea13be729685f000": "1337000000000000000000", + "0x757b65876dbf29bf911d4f0692a2c9beb1139808": "4124263000000000000000", + "0xe8fc36b0131ec120ac9e85afc10ce70b56d8b6ba": "200000000000000000000", + "0x1a89899cbebdbb64bb26a195a63c08491fcd9eee": "2000000000000000000000", + "0x6edf7f5283725c953ee64317f66188af1184b033": "8050000000000000000000", + "0x297385e88634465685c231a314a0d5dcd146af01": "1550000000000000000000", + "0x018f20a27b27ec441af723fd9099f2cbb79d6263": "2167000000000000000000", + "0xa5a4227f6cf98825c0d5baff5315752ccc1a1391": "10000000000000000000000", + "0x69517083e303d4fbb6c2114514215d69bc46a299": "100000000000000000000", + "0x1dab172effa6fbee534c94b17e794edac54f55f8": "1970000000000000000000", + "0xc6ee35934229693529dc41d9bb71a2496658b88e": "19700000000000000000000", + "0xa8ee1df5d44b128469e913569ef6ac81eeda4fc8": "500000000000000000000", + "0x35bd246865fab490ac087ac1f1d4f2c10d0cda03": "400000000000000000000", + "0x4bf8bf1d35a231315764fc8001809a949294fc49": "66850000000000000000", + "0xc70fa45576bf9c865f983893002c414926f61029": "400400000000000000000", + "0xfdeaac2acf1d138e19f2fc3f9fb74592e3ed818a": "668500000000000000000", + "0xbfbfbcb656c2992be8fcde8219fbc54aadd59f29": "9999924000000000000000", + "0x1722c4cbe70a94b6559d425084caeed4d6e66e21": "4000000000000000000000", + "0x00e681bc2d10db62de85848324492250348e90bf": "20000000000000000000000", + "0x5c308bac4857d33baea074f3956d3621d9fa28e1": "4999711000000000000000", + "0x68c08490c89bf0d6b6f320b1aca95c8312c00608": "4000000000000000000000", + "0xce1884ddbbb8e10e4dba6e44feeec2a7e5f92f05": "4000000000000000000000", + "0x427417bd16b1b3d22dbb902d8f9657016f24a61c": "2000000000000000000000", + "0x5ff93de6ee054cad459b2d5eb0f6870389dfcb74": "220000000000000000000", + "0x71946b7117fc915ed107385f42d99ddac63249c2": "2000000000000000000000", + "0x11ec00f849b6319cf51aa8dd8f66b35529c0be77": "2000000000000000000000", + "0x610fd6ee4eebab10a8c55d0b4bd2e7d6ef817156": "20002000000000000000", + "0xa422e4bf0bf74147cc895bed8f16d3cef3426154": "349281000000000000000", + "0x745aecbaf9bb39b74a67ea1ce623de368481baa6": "10000000000000000000000", + "0x9f496cb2069563144d0811677ba0e4713a0a4143": "1122000000000000000000", + "0xc500b720734ed22938d78c5e48b2ba9367a575ba": "33400000000000000000000", + "0xcd072e6e1833137995196d7bb1725fef8761f655": "6000000000000000000000", + "0x94644ad116a41ce2ca7fbec609bdef738a2ac7c7": "5000000000000000000000", + "0xe8d942d82f175ecb1c16a405b10143b3f46b963a": "568600000000000000000", + "0xf73dd9c142b71bce11d06e30e7e7d032f2ec9c9e": "1970000000000000000000", + "0x1327d759d56e0ab87af37ecf63fe01f310be100a": "659200000000000000000", + "0x28fa2580f9ebe420f3e5eefdd371638e3b7af499": "6000000000000000000000", + "0x024bdd2c7bfd500ee7404f7fb3e9fb31dd20fbd1": "180000000000000000000", + "0xb4b14bf45455d0ab0803358b7524a72be1a2045b": "500000000000000000000", + "0xb1e2dd95e39ae9775c55aeb13f12c2fa233053ba": "2000000000000000000000", + "0x35b03ea4245736f57b85d2eb79628f036ddcd705": "4000000000000000000000", + "0xeb2ef3d38fe652403cd4c9d85ed7f0682cd7c2de": "42784000000000000000000", + "0x690594d306613cd3e2fd24bca9994ad98a3d73f8": "2000000000000000000000", + "0x8397a1bc47acd647418159b99cea57e1e6532d6e": "9169160000000000000000", + "0xb44815a0f28e569d0e921a4ade8fb2642526497a": "55500000000000000000", + "0xe24109be2f513d87498e926a286499754f9ed49e": "886500000000000000000", + "0x37ac29bda93f497bc4aeaab935452c431510341e": "985000000000000000000", + "0x4a81abe4984c7c6bef63d69820e55743c61f201c": "16011846000000000000000", + "0x66dcc5fb4ee7fee046e141819aa968799d644491": "1337000000000000000000", + "0x43ff38743ed0cd43308c066509cc8e7e72c862aa": "1940000000000000000000", + "0xb8f20005b61352ffa7699a1b52f01f5ab39167f1": "10000000000000000000000", + "0x1cda411bd5163baeca1e558563601ce720e24ee1": "18200000000000000000", + "0x86245f596691093ece3f3d3ca2263eace81941d9": "188000000000000000000", + "0xf52a5882e8927d944b359b26366ba2b9cacfbae8": "25000080000000000000000", + "0x118c18b2dce170e8f445753ba5d7513cb7636d2d": "8800000000000000000000", + "0x7168b3bb8c167321d9bdb023a6e9fd11afc9afd9": "1790000000000000000000", + "0xd9103bb6b67a55a7fece2d1af62d457c2178946d": "1000000000000000000000", + "0x8b9fda7d981fe9d64287f85c94d83f9074849fcc": "14000000000000000000000", + "0x91211712719f2b084d3b3875a85069f466363141": "1000000000000000000000", + "0x4863849739265a63b0a2bf236a5913e6f959ce15": "1520000000000000000000", + "0xc2d1778ef6ee5fe488c145f3586b6ebbe3fbb445": "1146000000000000000000", + "0x2b77a4d88c0d56a3dbe3bae04a05f4fcd1b757e1": "300000000000000000000", + "0xfe9c0fffefb803081256c0cf4d6659e6d33eb4fb": "1528000000000000000000", + "0x893017ff1adad499aa065401b4236ce6e92b625a": "1999944000000000000000", + "0x073c67e09b5c713c5221c8a0c7f3f74466c347b0": "19400000000000000000000", + "0x93e303411afaf6c107a44101c9ac5b36e9d6538b": "66000000000000000000000", + "0x0ec50aa823f465b9464b0bc0c4a57724a555f5d6": "59100000000000000000000", + "0xa3e3a6ea509573e21bd0239ece0523a7b7d89b2f": "1970000000000000000000", + "0xc069ef0eb34299abd2e32dabc47944b272334824": "120000000000000000000", + "0x28a3da09a8194819ae199f2e6d9d1304817e28a5": "2000000000000000000000", + "0xe9495ba5842728c0ed97be37d0e422b98d69202c": "2000000000000000000000", + "0xbba976f1a1215f7512871892d45f7048acd356c8": "2000000000000000000000", + "0x887cac41cd706f3345f2d34ac34e01752a6e5909": "595366000000000000000", + "0xe0e0b2e29dde73af75987ee4446c829a189c95bc": "149000000000000000000", + "0x4a5fae3b0372c230c125d6d470140337ab915656": "1600000000000000000000", + "0x425177eb74ad0a9d9a5752228147ee6d6356a6e6": "13370000000000000000", + "0x5db7bba1f9573f24115d8c8c62e9ce8895068e9f": "49984000000000000000", + "0xfa6a37f018e97967937fc5e8617ba1d786dd5f77": "19999800000000000000000", + "0x45e3a93e72144ada860cbc56ff85145ada38c6da": "1610000000000000000000", + "0x67da922effa472a6b124e84ea8f86b24e0f515aa": "20000000000000000000", + "0xaa9bd4589535db27fa2bc903ca17d679dd654806": "2000000000000000000000", + "0x16a9e9b73ae98b864d1728798b8766dbc6ea8d12": "957480000000000000000", + "0xd6580ab5ed4c7dfa506fa6fe64ad5ce129707732": "4000000000000000000000", + "0x984a7985e3cc7eb5c93691f6f8cc7b8f245d01b2": "6000000000000000000000", + "0x7746b6c6699c8f34ca2768a820f1ffa4c207fe05": "4000086000000000000000", + "0x2fa491fb5920a6574ebd289f39c1b2430d2d9a6a": "2000000000000000000000", + "0xfae76719d97eac41870428e940279d97dd57b2f6": "98500000000000000000000", + "0x41b2dbd79dda9b864f6a7030275419c39d3efd3b": "3200000000000000000000", + "0xdd8254121a6e942fc90828f2431f511dad7f32e6": "3018000000000000000000", + "0x37fac1e6bc122e936dfb84de0c4bef6e0d60c2d7": "2000000000000000000000", + "0x3a10888b7e149cae272c01302c327d0af01a0b24": "17000000000000000000", + "0x401354a297952fa972ad383ca07a0a2811d74a71": "14000000000000000000", + "0x51865db148881951f51251710e82b9be0d7eadb2": "2000000000000000000000", + "0xbbbd6ecbb5752891b4ceb3cce73a8f477059376f": "36000000000000000000", + "0x3f236108eec72289bac3a65cd283f95e041d144c": "999925000000000000000", + "0xdc83b6fd0d512131204707eaf72ea0c8c9bef976": "2000000000000000000000", + "0x036eeff5ba90a6879a14dff4c5043b18ca0460c9": "100000000000000000000", + "0xfac5ca94758078fbfccd19db3558da7ee8a0a768": "1017500000000000000000", + "0xd0d62c47ea60fb90a3639209bbfdd4d933991cc6": "194000000000000000000", + "0x891cb8238c88e93a1bcf61db49bd82b47a7f4f84": "2680000000000000000000", + "0xdf53003346d65c5e7a646bc034f2b7d32fcbe56a": "2000000000000000000000", + "0x6e89c51ea6de13e06cdc748b67c4410fe9bcab03": "4000000000000000000000", + "0xa61cdbadf04b1e54c883de6005fcdf16beb8eb2f": "2000000000000000000000", + "0xe3951de5aefaf0458768d774c254f7157735e505": "1600930000000000000000", + "0xf2732cf2c13b8bb8e7492a988f5f89e38273ddc8": "600000000000000000000", + "0x4752218e54de423f86c0501933917aea08c8fed5": "20000000000000000000000", + "0x152f4e860ef3ee806a502777a1b8dbc91a907668": "600000000000000000000", + "0x15b96f30c23b8664e7490651066b00c4391fbf84": "410650000000000000000", + "0x8693e9b8be94425eef7969bc69f9d42f7cad671e": "1000090000000000000000", + "0xf41557dfdfb1a1bdcefefe2eba1e21fe0a4a9942": "1970000000000000000000", + "0x38458e0685573cb4d28f53098829904570179266": "40000000000000000000", + "0x53e4d9696dcb3f4d7b3f70dcaa4eecb71782ff5c": "200000000000000000000", + "0x2dca0e449ab646dbdfd393a96662960bcab5ae1e": "40000000000000000000000", + "0x87d7ac0653ccc67aa9c3469eef4352193f7dbb86": "200000000000000000000000", + "0xae9f5c3fbbe0c9bcbf1af8ff74ea280b3a5d8b08": "1730000000000000000000", + "0x7751f363a0a7fd0533190809ddaf9340d8d11291": "20000000000000000000", + "0x708a2af425ceb01e87ffc1be54c0f532b20eacd6": "134159000000000000000", + "0xac122a03cd058c122e5fe17b872f4877f9df9572": "1969606000000000000000", + "0x5da4ca88935c27f55c311048840e589e04a8a049": "80000000000000000000", + "0xe67c2c1665c88338688187629f49e99b60b2d3ba": "200000000000000000000", + "0xdec82373ade8ebcf2acb6f8bc2414dd7abb70d77": "200000000000000000000", + "0x47c247f53b9fbeb17bba0703a00c009fdb0f6eae": "20000000000000000000000", + "0x9a522e52c195bfb7cf5ffaaedb91a3ba7468161d": "1000000000000000000000", + "0x3159e90c48a915904adfe292b22fa5fd5e72796b": "1008800000000000000000", + "0xdefddfd59b8d2c154eecf5c7c167bf0ba2905d3e": "93588000000000000000", + "0xad1d68a038fd2586067ef6d135d9628e79c2c924": "4686168000000000000000", + "0x038e45eadd3d88b87fe4dab066680522f0dfc8f9": "10000000000000000000000", + "0x2561ec0f379218fe5ed4e028a3f744aa41754c72": "13370000000000000000", + "0xb95396daaa490df2569324fcc6623be052f132ca": "2000000000000000000000", + "0x2376ada90333b1d181084c97e645e810aa5b76f1": "750000000000000000000", + "0x07800d2f8068e448c79a4f69b1f15ef682aae5f6": "19400000000000000000000", + "0xadeb204aa0c38e179e81a94ed8b3e7d53047c26b": "608000000000000000000", + "0x0dc100b107011c7fc0a1339612a16ccec3285208": "2000000000000000000000", + "0xf0b1340b996f6f0bf0d9561c849caf7f4430befa": "100000000000000000000", + "0xe1443dbd95cc41237f613a48456988a04f683282": "4000086000000000000000", + "0xd3c6f1e0f50ec3d2a67e6bcd193ec7ae38f1657f": "6618150000000000000000", + "0xb68899e7610d4c93a23535bcc448945ba1666f1c": "200000000000000000000", + "0xa7253763cf4a75df92ca1e766dc4ee8a2745147b": "10740000000000000000000", + "0x75d67ce14e8d29e8c2ffe381917b930b1aff1a87": "3000000000000000000000", + "0x493d48bda015a9bfcf1603936eab68024ce551e0": "22528000000000000000", + "0x7ddd57165c87a2707f025dcfc2508c09834759bc": "1400000000000000000000", + "0xcff7f89a4d4219a38295251331568210ffc1c134": "1760000000000000000000", + "0x168d30e53fa681092b52e9bae15a0dcb41a8c9bb": "100000000000000000000", + "0x99b743d1d9eff90d9a1934b4db21d519d89b4a38": "100000000000000000000", + "0xa3d0b03cffbb269f796ac29d80bfb07dc7c6ad06": "2000000000000000000000", + "0x816d9772cf11399116cc1e72c26c6774c9edd739": "200000000000000000000", + "0xa880e2a8bf88a1a82648b4013c49c4594c433cc8": "4728000000000000000000", + "0x2a44a7218fe44d65a1b4b7a7d9b1c2c52c8c3e34": "62221355000000000000000", + "0xcb86edbc8bbb1f9131022be649565ebdb09e32a1": "2000000000000000000000", + "0x3915eab5ab2e5977d075dec47d96b68b4b5cf515": "61520000000000000000000", + "0x8165cab0eafb5a328fc41ac64dae715b2eef2c65": "1000000000000000000000", + "0x416c86b72083d1f8907d84efd2d2d783dffa3efb": "1999944000000000000000", + "0xc524086d46c8112b128b2faf6f7c7d8160a8386c": "400000000000000000000", + "0x902d74a157f7d2b9a3378b1f56703730e03a1719": "4000000000000000000000", + "0x74ef2869cbe608856045d8c2041118579f2236ea": "59724000000000000000", + "0xaf992dd669c0883e5515d3f3112a13f617a4c367": "2000000000000000000000", + "0x4c6a248fc97d705def495ca20759169ef0d36471": "760000000000000000000", + "0x974d2f17895f2902049deaaecf09c3046507402d": "14707000000000000000", + "0x0239b4f21f8e05cd01512b2be7a0e18a6d974607": "1000000000000000000000", + "0xb97a6733cd5fe99864b3b33460d1672434d5cafd": "1999579000000000000000", + "0xf558a2b2dd26dd9593aae04531fd3c3cc3854b67": "198000000000000000000", + "0xb577b6befa054e9c040461855094b002d7f57bd7": "114000000000000000000000", + "0x73bfe7710f31cab949b7a2604fbf5239cee79015": "2000000000000000000000", + "0x5717f2d8f18ffcc0e5fe247d3a4219037c3a649c": "3998000000000000000000", + "0x20707e425d2a11d2c89f391b2b809f556c592421": "2000000000000000000000", + "0x9a6708ddb8903c289f83fe889c1edcd61f854423": "1000000000000000000000", + "0xfa27cc49d00b6c987336a875ae39da58fb041b2e": "10000000000000000000000", + "0xd688e785c98f00f84b3aa1533355c7a258e87948": "500000000000000000000", + "0x927cb7dc187036b5427bc7e200c5ec450c1d27d4": "216000000000000000000", + "0xb2bfaa58b5196c5cb7f89de15f479d1838de713d": "21000000000000000000", + "0xe180de9e86f57bafacd7904f9826b6b4b26337a3": "830400000000000000000", + "0xa1204dad5f560728a35c0d8fc79481057bf77386": "1000000000000000000000", + "0x6b0da25af267d7836c226bcae8d872d2ce52c941": "6000000000000000000000", + "0x0517448dada761cc5ba4033ee881c83037036400": "1998000000000000000000", + "0x7ed0a5a847bef9a9da7cba1d6411f5c316312619": "39842000000000000000", + "0x5b5d517029321562111b43086d0b043591109a70": "2600000000000000000000", + "0x56fc1a7bad4047237ce116146296238e078f93ad": "178000000000000000000", + "0x6c5422fb4b14e6d98b6091fdec71f1f08640419d": "400000000000000000000", + "0x108fe8ee2a13da487b22c6ab6d582ea71064d98c": "399800000000000000000", + "0x0ad3e44d3c001fa290b393617030544108ac6eb9": "1969019000000000000000", + "0x25aee68d09afb71d8817f3f184ec562f7897b734": "2000000000000000000000", + "0xc2340a4ca94c9678b7494c3c852528ede5ee529f": "48669000000000000000", + "0x44901e0d0e08ac3d5e95b8ec9d5e0ff5f12e0393": "417500000000000000000", + "0x8775a610c502b9f1e6ad4cdadb8ce29bff75f6e4": "600000000000000000000", + "0x682897bc4f8e89029120fcffb787c01a93e64184": "10000000000000000000000", + "0xf7acff934b84da0969dc37a8fcf643b7d7fbed41": "1999944000000000000000", + "0xf05fcd4c0d73aa167e5553c8c0d6d4f2faa39757": "13334000000000000000000", + "0xc981d312d287d558871edd973abb76b979e5c35e": "1970000000000000000000", + "0x9da61ccd62bf860656e0325d7157e2f160d93bb5": "4999980000000000000000", + "0xd284a50382f83a616d39b8a9c0f396e0ebbfa95d": "1000070000000000000000", + "0xd6cf5c1bcf9da662bcea2255905099f9d6e84dcc": "8349332000000000000000", + "0xc71b2a3d7135d2a85fb5a571dcbe695e13fc43cd": "1000000000000000000000", + "0xb22dadd7e1e05232a93237baed98e0df92b1869e": "2000000000000000000000", + "0xb09fe6d4349b99bc37938054022d54fca366f7af": "200000000000000000000000", + "0x427e4751c3babe78cff8830886febc10f9908d74": "1970000000000000000000", + "0x60b358cb3dbefa37f47df2d7365840da8e3bc98c": "20000000000000000000", + "0xdcd5bca2005395b675fde5035659b26bfefc49ee": "197000000000000000000", + "0x81186931184137d1192ac88cd3e1e5d0fdb86a74": "2900000000000000000000", + "0xde212293f8f1d231fa10e609470d512cb8ffc512": "2000000000000000000000", + "0x1937c5c515057553ccbd46d5866455ce66290284": "1000000000000000000000000", + "0x592777261e3bd852c48eca95b3a44c5b7f2d422c": "20000000000000000000000", + "0xbbf84292d954acd9e4072fb860b1504106e077ae": "1500000000000000000000", + "0x3b4100e30a73b0c734b18ffa8426d19b19312f1a": "55300000000000000000000", + "0xa03a3dc7c533d1744295be955d61af3f52b51af5": "40000000000000000000", + "0x4aa148c2c33401e66a2b586e6577c4b292d3f240": "216200000000000000000", + "0xff850e3be1eb6a4d726c08fa73aad358f39706da": "1940000000000000000000", + "0x743651b55ef8429df50cf81938c2508de5c8870f": "2000000000000000000000", + "0x3700e3027424d939dbde5d42fb78f6c4dbec1a8f": "40000000000000000000", + "0xc1cbd2e2332a524cf219b10d871ccc20af1fb0fa": "1000000000000000000000", + "0xe25b9f76b8ad023f057eb11ad94257a0862e4e8c": "2000000000000000000000", + "0x719e891fbcc0a33e19c12dc0f02039ca05b801df": "6185800000000000000000", + "0x39636b25811b176abfcfeeca64bc87452f1fdff4": "400000000000000000000", + "0x631030a5b27b07288a45696f189e1114f12a81c0": "499970000000000000000", + "0xbcc84597b91e73d5c5b4d69c80ecf146860f779a": "4380000000000000000000", + "0x095e0174829f34c3781be1a5e38d1541ea439b7f": "6000000000000000000000", + "0x2e7e05e29edda7e4ae25c5173543efd71f6d3d80": "6000000000000000000000", + "0xdbb6ac484027041642bbfd8d80f9d0c1cf33c1eb": "2000000000000000000000", + "0x153c08aa8b96a611ef63c0253e2a4334829e579d": "394000000000000000000", + "0x10f4bff0caa5027c0a6a2dcfc952824de2940909": "2000000000000000000000", + "0x2ef869f0350b57d53478d701e3fee529bc911c75": "50000000000000000000", + "0x70ab34bc17b66f9c3b63f151274f2a727c539263": "2000000000000000000000", + "0x3201259caf734ad7581c561051ba0bca7fd6946b": "180000000000000000000000", + "0x84e9cf8166c36abfa49053b7a1ad4036202681ef": "2000000000000000000000", + "0x4ebc5629f9a6a66b2cf3363ac4895c0348e8bf87": "1000090000000000000000", + "0xe50b464ac9de35a5618b7cbf254674182b81b97e": "4100000000000000000000", + "0x2abdf1a637ef6c42a7e2fe217773d677e804ebdd": "5000000000000000000000", + "0x7a0a78a9cc393f91c3d9e39a6b8c069f075e6bf5": "1337000000000000000000", + "0x2d9c5fecd2b44fbb6a1ec732ea059f4f1f9d2b5c": "1010694000000000000000", + "0x7b712c7af11676006a66d2fc5c1ab4c479ce6037": "8000000000000000000000", + "0x3466f67e39636c01f43b3a21a0e8529325c08624": "842864000000000000000", + "0xfdd502a74e813bcfa355ceda3c176f6a6871af7f": "400000000000000000000", + "0x26475419c06d5f147aa597248eb46cf7befa64a5": "1640000000000000000000", + "0x9243d7762d77287b12638688b9854e88a769b271": "1000000000000000000000", + "0x723d8baa2551d2addc43c21b45e8af4ca2bfb2c2": "1760000000000000000000", + "0xf2fbb6d887f8b8cc3a869aba847f3d1f643c53d6": "3999000000000000000000", + "0x2cdb3944650616e47cb182e060322fa1487978ce": "1820000000000000000000", + "0xf0d21663d8b0176e05fde1b90ef31f8530fda95f": "1999944000000000000000", + "0x77cc02f623a9cf98530997ea67d95c3b491859ae": "1354900000000000000000", + "0xd1b5a454ac3405bb4179208c6c84de006bcb9be9": "500000000000000000000", + "0xb9920fd0e2c735c256463caa240fb7ac86a93dfa": "1760000000000000000000", + "0xed1f1e115a0d60ce02fb25df014d289e3a0cbe7d": "500000000000000000000", + "0x23e2c6a8be8e0acfa5c4df5e36058bb7cbac5a81": "2000000000000000000000", + "0xf0be0faf4d7923fc444622d1980cf2d990aab307": "2000000000000000000000", + "0x0829d0f7bb7c446cfbb0deadb2394d9db7249a87": "40110000000000000000", + "0x2ecac504b233866eb5a4a99e7bd2901359e43b3d": "20000000000000000000000", + "0x06d6cb308481c336a6e1a225a912f6e6355940a1": "1760000000000000000000", + "0xd4879fd12b1f3a27f7e109761b23ca343c48e3d8": "666000000000000000000", + "0x857f100b1a5930225efc7e9020d78327b41c02cb": "2000000000000000000000", + "0x3aa42c21b9b31c3e27ccd17e099af679cdf56907": "8000000000000000000000", + "0x764d5212263aff4a2a14f031f04ec749dc883e45": "1850000000000000000000", + "0xd03a2da41e868ed3fef5745b96f5eca462ff6fda": "3000000000000000000000", + "0x4f26690c992b7a312ab12e1385d94acd58288e7b": "14000000000000000000000", + "0x7b122162c913e7146cad0b7ed37affc92a0bf27f": "1506799000000000000000", + "0xc87352dba582ee2066b9c002a962e003134f78b1": "500000000000000000000", + "0x9f4ac9c9e7e24cb2444a0454fa5b9ad9d92d3853": "835000000000000000000", + "0xccf62a663f1353ba2ef8e6521dc1ecb673ec8ef7": "152000000000000000000", + "0x557f5e65e0da33998219ad4e99570545b2a9d511": "11024000000000000000000", + "0xa5f0077b351f6c505cd515dfa6d2fa7f5c4cd287": "40000000000000000000000", + "0x79c6002f8452ca157f1317e80a2faf24475559b7": "20000000000000000000", + "0x3aa07a34a1afc8967d3d1383b96b62cf96d5fa90": "20000000000000000000000", + "0x7f389c12f3c6164f6446566c77669503c2792527": "98500000000000000000", + "0xac4cc256ae74d624ace80db078b2207f57198f6b": "2001000000000000000000", + "0x823ba7647238d113bce9964a43d0a098118bfe4d": "200000000000000000000", + "0xf5a7676ad148ae9c1ef8b6f5e5a0c2c473be850b": "200000000000000000000", + "0x7d34803569e00bd6b59fff081dfa5c0ab4197a62": "1712700000000000000000", + "0x061ea4877cd08944eb64c2966e9db8dedcfec06b": "1000000000000000000000", + "0xdf37c22e603aedb60a627253c47d8ba866f6d972": "24000000000000000000000", + "0x529aa002c6962a3a8545027fd8b05f22b5bf9564": "1670000000000000000000", + "0xeb89a882670909cf377e9e78286ee97ba78d46c2": "802200000000000000000", + "0x9ac85397792a69d78f286b86432a07aeceb60e64": "14300000000000000000", + "0x9610592202c282ab9bd8a884518b3e0bd4758137": "268000000000000000000", + "0x73932709a97f02c98e51b091312865122385ae8e": "1430000000000000000000", + "0x5ef8c96186b37984cbfe04c598406e3b0ac3171f": "9400000000000000000000", + "0xb6f78da4f4d041b3bc14bc5ba519a5ba0c32f128": "172326253000000000000000", + "0x6f0edd23bcd85f6015f9289c28841fe04c83efeb": "19100000000000000000", + "0xa8a43c009100616cb4ae4e033f1fc5d7e0b6f152": "3939015000000000000000", + "0x7081fa6baad6cfb7f51b2cca16fb8970991a64ba": "233953000000000000000", + "0x9de7386dde401ce4c67b71b6553f8aa34ea5a17d": "60000000000000000000", + "0x54ec7300b81ac84333ed1b033cd5d7a33972e234": "200000000000000000000", + "0x67a80e0190721f94390d6802729dd12c31a895ad": "1999964000000000000000", + "0x3a4297da3c555e46c073669d0478fce75f2f790e": "1969606000000000000000", + "0xc2e0584a71348cc314b73b2029b6230b92dbb116": "2000000000000000000000", + "0x0a2ade95b2e8c66d8ae6f0ba64ca57d783be6d44": "4000000000000000000000", + "0x544b5b351d1bc82e9297439948cf4861dac9ae11": "22000000000000000000000", + "0x3ae62bd271a760637fad79c31c94ff62b4cd12f7": "2000000000000000000000", + "0x0d8023929d917234ae40512b1aabb5e8a4512771": "148000000000000000000", + "0x2858acacaf21ea81cab7598fdbd86b452e9e8e15": "666000000000000000000", + "0xc033b1325a0af45472c25527853b1f1c21fa35de": "2000000000000000000000", + "0xbbf85aaaa683738f073baef44ac9dc34c4c779ea": "2000000000000000000000", + "0x6ae57f27917c562a132a4d1bf7ec0ac785832926": "6000000000000000000000", + "0x88e6f9b247f988f6c0fc14c56f1de53ec69d43cc": "100000000000000000000", + "0xb72c2a011c0df50fbb6e28b20ae1aad217886790": "4000000000000000000000", + "0x161caf5a972ace8379a6d0a04ae6e163fe21df2b": "100000000000000000000000", + "0x2a63590efe9986c3fee09b0a0a338b15bed91f21": "6458400000000000000000", + "0x50e1c8ec98415bef442618708799437b86e6c205": "6000000000000000000000", + "0x33f4a6471eb1bca6a9f85b3b4872e10755c82be1": "2000000000000000000000", + "0x9c49deff47085fc09704caa2dca8c287a9a137da": "8000000000000000000000", + "0xe1173a247d29d8238df0922f4df25a05f2af77c3": "40007051000000000000000", + "0x51891b2ccdd2f5a44b2a8bc49a5d9bca6477251c": "310000000000000000000", + "0xecaf3350b7ce144d068b186010852c84dd0ce0f0": "2000000000000000000000", + "0x72393d37b451effb9e1ff3b8552712e2a970d8c2": "985000000000000000000", + "0x1bbc60bcc80e5cdc35c5416a1f0a40a83dae867b": "2000000000000000000000", + "0xb8ab39805bd821184f6cbd3d2473347b12bf175c": "118200000000000000000", + "0xc55a6b4761fd11e8c85f15174d74767cd8bd9a68": "133700000000000000000", + "0x99d1b585965f406a42a49a1ca70f769e765a3f98": "16700000000000000000000", + "0x9ab988b505cfee1dbe9cd18e9b5473b9a2d4f536": "320000000000000000000", + "0x7fef8c38779fb307ec6f044bebe47f3cfae796f1": "168561000000000000000", + "0x322d6f9a140d213f4c80cd051afe25c620bf4c7d": "20000000000000000000", + "0x3bd9a06d1bd36c4edd27fc0d1f5b088ddae3c72a": "499970000000000000000", + "0x5dcdb6b87a503c6d8a3c65c2cf9a9aa883479a1e": "9200000000000000000000", + "0x6e84c2fd18d8095714a96817189ca21cca62bab1": "340935000000000000000", + "0xa5bad86509fbe0e0e3c0e93f6d381f1af6e9d481": "6000000000000000000000", + "0x3954bdfe0bf587c695a305d9244c3d5bdddac9bb": "19187461000000000000000", + "0x63f0e5a752f79f67124eed633ad3fd2705a397d4": "3940000000000000000000", + "0x33fd718f0b91b5cec88a5dc15eecf0ecefa4ef3d": "432500000000000000000", + "0x68027d19558ed7339a08aee8de3559be063ec2ea": "2000000000000000000000", + "0x96f0462ae6f8b96088f7e9c68c74b9d8ad34b347": "1790000000000000000000", + "0xf1f391ca92808817b755a8b8f4e2ca08d1fd1108": "6000000000000000000000", + "0x7fcf5ba6666f966c5448c17bf1cb0bbcd8019b06": "99999000000000000000", + "0xe9b9a2747510e310241d2ece98f56b3301d757e0": "2000000000000000000000", + "0x2100381d60a5b54adc09d19683a8f6d5bb4bfbcb": "10000000000000000000000", + "0x7495ae78c0d90261e2140ef2063104731a60d1ed": "34250000000000000000", + "0xdc911cf7dc5dd0813656670528e9338e67034786": "2000000000000000000000", + "0x262aed4bc0f4a4b2c6fb35793e835a49189cdfec": "10000000000000000000000", + "0x9ee93f339e6726ec65eea44f8a4bfe10da3d3282": "2000000000000000000000", + "0xa3a57b0716132804d60aac281197ff2b3d237b01": "1400000000000000000000", + "0xc799e34e88ff88be7de28e15e4f2a63d0b33c4cb": "200000000000000000000", + "0xc7506c1019121ff08a2c8c1591a65eb4bdfb4a3f": "600000000000000000000", + "0x795ebc2626fc39b0c86294e0e837dcf523553090": "1000000000000000000000", + "0x441aca82631324acbfa2468bda325bbd78477bbf": "6000000000000000000000", + "0x9f271d285500d73846b18f733e25dd8b4f5d4a8b": "722000000000000000000", + "0xd77892e2273b235d7689e430e7aeed9cbce8a1f3": "2000000000000000000000", + "0x4f8972838f70c903c9b6c6c46162e99d6216d451": "4610000000000000000000", + "0x4c85ed362f24f6b9f04cdfccd022ae535147cbb9": "1500000000000000000000", + "0x3807eff43aa97c76910a19752dd715ee0182d94e": "250190000000000000000", + "0x3a9e5441d44b243be55b75027a1ceb9eacf50df2": "1000000000000000000000", + "0x3deae43327913f62808faa1b6276a2bd6368ead9": "2000000000000000000000", + "0xc270456885342b640b4cfc1b520e1a544ee0d571": "1820000000000000000000", + "0x77798f201257b9c35204957057b54674aefa51df": "149000000000000000000", + "0x225f9eb3fb6ff3e9e3c8447e14a66e8d4f3779f6": "2000000000000000000000", + "0x78df2681d6d602e22142d54116dea15d454957aa": "298000000000000000000", + "0x283396ce3cac398bcbe7227f323e78ff96d08767": "400000000000000000000", + "0x747ff7943b71dc4dcdb1668078f83dd7cc4520c2": "60000000000000000000", + "0xa4ed11b072d89fb136759fc69b428c48aa5d4ced": "262800000000000000000", + "0xcc043c4388d345f884c6855e71142a9f41fd6935": "20000000000000000000", + "0xab14d221e33d544629198cd096ed63dfa28d9f47": "6000000000000000000000", + "0x251e6838f7cec5b383c1d90146341274daf8e502": "147510000000000000000", + "0x36a0e61e1be47fa87e30d32888ee0330901ca991": "20000000000000000000", + "0xbcfc98e5c82b6adb180a3fcb120b9a7690c86a3f": "1970000000000000000000", + "0x18a6d2fc52be73084023c91802f05bc24a4be09f": "2000000000000000000000", + "0x80591a42179f34e64d9df75dcd463b28686f5574": "20000000000000000000000", + "0x881230047c211d2d5b00d8de4c5139de5e3227c7": "10000000000000000000000", + "0x9eb1ff71798f28d6e989fa1ea0588e27ba86cb7d": "140800000000000000000", + "0xa01fd1906a908506dedae1e208128872b56ee792": "3000000000000000000000", + "0x1b05ea6a6ac8af7cb6a8b911a8cce8fe1a2acfc8": "2000000000000000000000", + "0x6add932193cd38494aa3f03aeccc4b7ab7fabca2": "89600000000000000000", + "0x2aaa35274d742546670b7426264521032af4f4c3": "10000000000000000000000", + "0x67b8a6e90fdf0a1cac441793301e8750a9fa7957": "895000000000000000000", + "0x5b5be0d8c67276baabd8edb30d48ea75640b8b29": "824480000000000000000", + "0x28d7e5866f1d85fd1ceb32bfbe1dfc36db434566": "7199000000000000000000", + "0x98e3e90b28fccaee828779b8d40a5568c4116e21": "40000000000000000000", + "0x2dd578f7407dfbd548d05e95ccc39c485429626a": "4200000000000000000000", + "0x8ca6989746b06e32e2487461b1ce996a273acfd7": "20000000000000000000", + "0xa6f93307f8bce03195fece872043e8a03f7bd11a": "2886000000000000000000", + "0xefbd52f97da5fd3a673a46cbf330447b7e8aad5c": "100033000000000000000", + "0x52bdd9af5978850bc24110718b3723759b437e59": "1730000000000000000000", + "0x6e073b66d1b8c66744d88096a8dd99ec7e0228da": "4000000000000000000000", + "0xa29d661a6376f66d0b74e2fe9d8f26c0247ec84c": "4117300000000000000000", + "0x7d34ff59ae840a7413c6ba4c5bb2ba2c75eab018": "3000000000000000000000", + "0x2eca6a3c5d9f449d0956bd43fa7b4d7be8435958": "2000020000000000000000", + "0xf59f9f02bbc98efe097eabb78210979021898bfd": "9999800000000000000000", + "0x90e300ac71451e401f887f6e7728851647a80e07": "400000000000000000000", + "0x05ae7fd4bbcc80ca11a90a1ec7a301f7cccc83db": "910000000000000000000", + "0xe54102534de8f23effb093b31242ad3b233facfd": "4000000000000000000000", + "0xc127aab59065a28644a56ba3f15e2eac13da2995": "600000000000000000000", + "0xed60c4ab6e540206317e35947a63a9ca6b03e2cb": "57275000000000000000", + "0xd855b03ccb029a7747b1f07303e0a664793539c8": "2000000000000000000000", + "0x1178501ff94add1c5881fe886136f6dfdbe61a94": "158000000000000000000", + "0xf447108b98df64b57e871033885c1ad71db1a3f9": "6916709000000000000000", + "0xdeee2689fa9006b59cf285237de53b3a7fd01438": "450034000000000000000", + "0x7f01dc7c3747ca608f983dfc8c9b39e755a3b914": "206980000000000000000", + "0x9edeac4c026b93054dc5b1d6610c6f3960f2ad73": "1200000000000000000000", + "0xe3cffe239c64e7e20388e622117391301b298696": "500000000000000000000", + "0xebbb4f2c3da8be3eb62d1ffb1f950261cf98ecda": "2000000000000000000000", + "0x38c10b90c859cbb7815692f99dae520ab5febf5e": "13169000000000000000000", + "0x23f9ecf3e5dddca38815d3e59ed34b5b90b4a353": "204608000000000000000", + "0xd7fa5ffb6048f96fb1aba09ef87b1c11dd7005e4": "1000000000000000000000", + "0x9ca42ee7a0b898f6a5cc60b5a5d7b1bfa3c33231": "2000000000000000000000", + "0x8b9577920053b1a00189304d888010d9ef2cb4bf": "500000000000000000000", + "0xfcd0b4827cd208ffbf5e759dba8c3cc61d8c2c3c": "8000000000000000000000", + "0x01ff1eb1dead50a7f2f9638fdee6eccf3a7b2ac8": "600000000000000000000", + "0xabde147b2af789eaa586547e66c4fa2664d328a4": "247545000000000000000", + "0x64042ba68b12d4c151651ca2813b7352bd56f08e": "600000000000000000000", + "0xdccca42045ec3e16508b603fd936e7fd7de5f36a": "19700000000000000000", + "0xe77a89bd45dc04eeb4e41d7b596b707e6e51e74c": "12000000000000000000000", + "0xf77c7b845149efba19e261bc7c75157908afa990": "2000000000000000000000", + "0xfa5201fe1342af11307b9142a041243ca92e2f09": "152150000000000000000000", + "0x40df495ecf3f8b4cef2a6c189957248fe884bc2b": "12000000000000000000000", + "0x3d79a853d71be0621b44e29759656ca075fdf409": "2000000000000000000000", + "0x6de02f2dd67efdb7393402fa9eaacbcf589d2e56": "1182000000000000000000", + "0x729aad4627744e53f5d66309aa74448b3acdf46f": "2000000000000000000000", + "0x4e4318f5e13e824a54edfe30a7ed4f26cd3da504": "2000000000000000000000", + "0xc6a286e065c85f3af74812ed8bd3a8ce5d25e21d": "18200000000000000000", + "0xfd686de53fa97f99639e2568549720bc588c9efc": "1969606000000000000000", + "0x06b0ff834073cce1cbc9ea557ea87b605963e8b4": "300000000000000000000", + "0x72b5633fe477fe542e742facfd690c137854f216": "1670000000000000000000", + "0x8bf373d076814cbc57e1c6d16a82c5be13c73d37": "200000000000000000000", + "0xcf264e6925130906c4d7c18591aa41b2a67f6f58": "2000000000000000000000", + "0x0ea2a210312b3e867ee0d1cc682ce1d666f18ed5": "10000000000000000000000", + "0xd02afecf8e2ec2b62ac8ad204161fd1fae771d0e": "2000000000000000000000", + "0xe6b20f980ad853ad04cbfc887ce6601c6be0b24c": "4000000000000000000000", + "0x4280a58f8bb10b9440de94f42b4f592120820191": "2000000000000000000000", + "0xa914cdb571bfd93d64da66a4e108ea134e50d000": "1430143000000000000000", + "0x60864236930d04d8402b5dcbeb807f3caf611ea2": "4000000000000000000000", + "0xf9dd239008182fb519fb30eedd2093fed1639be8": "500000000000000000000", + "0x18e53243981aabc8767da10c73449f1391560eaa": "6000000000000000000000", + "0xc3a9226ae275df2cab312b911040634a9c9c9ef6": "4000000000000000000000", + "0x4fcc19ea9f4c57dcbce893193cfb166aa914edc5": "7001380000000000000000", + "0xc1e1409ca52c25435134d006c2a6a8542dfb7273": "34380000000000000000", + "0x981ddf0404e4d22dda556a0726f00b2d98ab9569": "999972000000000000000", + "0xe5bcc88c3b256f6ed5fe550e4a18198b943356ad": "2000000000000000000000", + "0x74a17f064b344e84db6365da9591ff1628257643": "20000000000000000000", + "0x2720f9ca426ef2f2cbd2fecd39920c4f1a89e16d": "2000000000000000000000", + "0x8d04a5ebfb5db409db0617c9fa5631c192861f4a": "970000000000000000000", + "0xf18b14cbf6694336d0fe12ac1f25df2da0c05dbb": "3999800000000000000000", + "0x56ac20d63bd803595cec036da7ed1dc66e0a9e07": "63927000000000000000", + "0x92c94c2820dfcf7156e6f13088ece7958b3676fd": "95500000000000000000", + "0x968dea60df3e09ae3c8d3505e9c080454be0e819": "6000000000000000000000", + "0x9268d62646563611dc3b832a30aa2394c64613e3": "2000000000000000000000", + "0x5a192b964afd80773e5f5eda6a56f14e25e0c6f3": "500000000000000000000", + "0xdf8d48b1eb07b3c217790e6c2df04dc319e7e848": "500000000000000000000", + "0x7f61fa6cf5f898b440dac5abd8600d6d691fdef9": "280000000000000000000", + "0x929d368eb46a2d1fbdc8ffa0607ede4ba88f59ad": "2000000000000000000000", + "0x9982a5890ffb5406d3aca8d2bfc1dd70aaa80ae0": "2000000000000000000000", + "0xbf2aea5a1dcf6ed3b5e8323944e983fedfd1acfb": "1580000000000000000000", + "0x46aa501870677e7f0a504876b4e8801a0ad01c46": "800000000000000000000", + "0x8f473d0ab876ddaa15608621d7013e6ff714b675": "470400000000000000000", + "0x02290fb5f9a517f82845acdeca0fc846039be233": "2000000000000000000000", + "0x8a5831282ce14a657a730dc18826f7f9b99db968": "4330268000000000000000", + "0x0328510c09dbcd85194a98d67c33ac49f2f94d60": "11000000000000000000000", + "0xcf883a20329667ea226a1e3c765dbb6bab32219f": "3038972000000000000000", + "0x2615100ea7e25bba9bca746058afbbb4ffbe4244": "500000000000000000000", + "0xb115ee3ab7641e1aa6d000e41bfc1ec7210c2f32": "13000000000000000000000", + "0x5cfa8d568575658ca4c1a593ac4c5d0e44c60745": "291000000000000000000", + "0xd3c24d4b3a5e0ff8a4622d518edd73f16ab28610": "20000000000000000000", + "0xa639acd96b31ba53b0d08763229e1f06fd105e9d": "8000000000000000000000", + "0xffa4aff1a37f984b0a67272149273ae9bd41e3bc": "10000000000000000000000", + "0xcf684dfb8304729355b58315e8019b1aa2ad1bac": "432500000000000000000", + "0x5797b60fd2894ab3c2f4aede86daf2e788d745ad": "6000000000000000000000", + "0xa6a0de421ae54f6d17281308f5646d2f39f7775d": "2000000000000000000000", + "0x08504f05643fab5919f5eea55925d7a3ed7d807a": "20000000000000000000", + "0x7a7068e1c3375c0e599db1fbe6b2ea23b8f407d2": "2000000000000000000000", + "0x1078d7f61b0e56c74ee6635b2e1819ef1e3d8785": "1000000000000000000000", + "0x6e12b51e225b4a4372e59ad7a2a1a13ea3d3a137": "14172200000000000000000", + "0x6a2e86469a5bf37cee82e88b4c3863895d28fcaf": "519000000000000000000", + "0x197672fd39d6f246ce66a790d13aa922d70ea109": "1000000000000000000000", + "0x8009a7cbd192b3aed4adb983d5284552c16c7451": "4000000000000000000000", + "0xf6c3c48a1ac0a34799f04db86ec7a975fe7768f3": "1970000000000000000000", + "0x16be75e98a995a395222d00bd79ff4b6e638e191": "36000000000000000000000", + "0x6c05e34e5ef2f42ed09deff1026cd66bcb6960bb": "2000000000000000000000", + "0x5d6ae8cbd6b3393c22d16254100d0238e808147c": "719992000000000000000", + "0x1a376e1b2d2f590769bb858d4575320d4e149970": "4841200000000000000000", + "0xf6ead67dbf5b7eb13358e10f36189d53e643cfcf": "40000000000000000000000", + "0x467d5988249a68614716659840ed0ae6f6f457bc": "387500000000000000000", + "0xaa960e10c52391c54e15387cc67af827b5316dcc": "2000000000000000000000", + "0x483ba99034e900e3aedf61499d3b2bce39beb7aa": "985000000000000000000", + "0x86f23e9c0aafc78b9c404dcd60339a925bffa266": "400000000000000000000", + "0xd05a447c911dbb275bfb2e5a37e5a703a56f9997": "200000000000000000000", + "0xedb71ec41bda7dce86e766e6e8c3e9907723a69b": "20000000000000000000", + "0xf86a3ea8071f7095c7db8a05ae507a8929dbb876": "336000000000000000000", + "0x323b3cfe3ee62bbde2a261e53cb3ecc05810f2c6": "13790000000000000000000", + "0x936f3813f5f6a13b8e4ffec83fe7f826186a71cd": "520000000000000000000", + "0x6db72bfd43fef465ca5632b45aab7261404e13bf": "2000000000000000000000", + "0x9bb76204186af2f63be79168601687fc9bad661f": "300000000000000000000", + "0x28ab165ffb69eda0c549ae38e9826f5f7f92f853": "1296890000000000000000", + "0xc73e2112282215dc0762f32b7e807dcd1a7aae3e": "6900000000000000000000", + "0xf8086e42661ea929d2dda1ab6c748ce3055d111e": "1000000000000000000000", + "0x4db21284bcd4f787a7556500d6d7d8f36623cf35": "1939806000000000000000", + "0xc48651c1d9c16bff4c9554886c3f3f26431f6f68": "658000000000000000000", + "0x9bdbdc9b973431d13c89a3f9757e9b3b6275bfc7": "499971000000000000000", + "0x560da37e956d862f81a75fd580a7135c1b246352": "10000000000000000000000", + "0x4b60a3e253bf38c8d5662010bb93a473c965c3e5": "1490000000000000000000", + "0x64e02abb016cc23a2934f6bcddb681905021d563": "1000000000000000000000", + "0xac2c8e09d06493a63858437bd20be01962450365": "1910000000000000000000", + "0x9bf9b3b2f23cf461eb591f28340bc719931c8364": "1000000000000000000000", + "0x9b5c39f7e0ac168c8ed0ed340477117d1b682ee9": "98000000000000000000", + "0xf75bb39c799779ebc04a336d260da63146ed98d0": "25000000000000000000", + "0xa7966c489f4c748a7ae980aa27a574251767caf9": "3000000000000000000000", + "0xea53c954f4ed97fd4810111bdab69ef981ef25b9": "17300000000000000000000", + "0x03a26cfc4c18316f70d59e9e1a79ee3e8b962f4c": "2000000000000000000000", + "0x3e63ce3b24ca2865b4c5a687b7aea3597ef6e548": "2000000000000000000000", + "0x500c902958f6421594d1b6ded712490d52ed6c44": "1970000000000000000000", + "0x6f44ca09f0c6a8294cbd519cdc594ad42c67579f": "50000000000000000000", + "0x3616fb46c81578c9c8eb4d3bf880451a88379d7d": "200000000000000000000", + "0x57bc20e2d62b3d19663cdb4c309d5b4f2fc2db8f": "100000000000000000000", + "0x1cebf0985d7f680aaa915c44cc62edb49eab269e": "1000000000000000000000", + "0xc0cbf6032fa39e7c46ff778a94f7d445fe22cf30": "310000000000000000000", + "0xc58b9cc61dedbb98c33f224d271f0e228b583433": "3880000000000000000000", + "0xe9c6dfae97f7099fc5f4e94b784db802923a1419": "48800000000000000000", + "0x9bacd3d40f3b82ac91a264d9d88d908eac8664b9": "20000000000000000000000", + "0x63d80048877596e0c28489e650cd4ac180096a49": "280000000000000000000", + "0xe6a6f6dd6f70a456f4ec15ef7ad5e5dbb68bd7dc": "200000000000000000000", + "0xd418870bc2e4fa7b8a6121ae0872d55247b62501": "1580000000000000000000", + "0xe2f9383d5810ea7b43182b8704b62b27f5925d39": "400000000000000000000", + "0xbd5e473abce8f97a6932f77c2facaf9cc0a00514": "1117350000000000000000", + "0x2ff1ca55fd9cec1b1fe9f0a9abb74c513c1e2aaa": "3000000000000000000000", + "0x9d99b189bbd9a48fc2e16e8fcda33bb99a317bbb": "1126900000000000000000", + "0x6e96faeda3054302c45f58f161324c99a3eebb62": "20000000000000000000", + "0xef93818f684db0c3675ec81332b3183ecc28a495": "1550000000000000000000", + "0x2659facb1e83436553b5b42989adb8075f9953ed": "29356000000000000000", + "0xc4ffadaaf2823fbea7bff702021bffc4853eb5c9": "42233000000000000000", + "0xe9864c1afc8eaad37f3ba56fcb7477cc622009b7": "79000000000000000000", + "0x87ef6d8b6a7cbf9b5c8c97f67ee2adc2a73b3f77": "200400000000000000000", + "0xc043f2452dcb9602ef62bd360e033dd23971fe84": "2000000000000000000000", + "0x0fdd65402395df9bd19fee4507ef5345f745104c": "5000000000000000000000", + "0x939c4313d2280edf5e071bced846063f0a975d54": "120000000000000000000000", + "0xb28245037cb192f75785cb86cbfe7c930da258b0": "16000000000000000000000", + "0xa80cb1738bac08d4f9c08b4deff515545fa8584f": "500000000000000000000", + "0x62971bf2634cee0be3c9890f51a56099dbb9519b": "656000000000000000000", + "0xf2efe96560c9d97b72bd36447843885c1d90c231": "2000000000000000000000", + "0x0e390f44053ddfcef0d608b35e4d9c2cbe9871bb": "1970000000000000000000", + "0x61d101a033ee0e2ebb3100ede766df1ad0244954": "500000000000000000000", + "0x6785513cf732e47e87670770b5419be10cd1fc74": "2000000000000000000000", + "0x167699f48a78c615512515739958993312574f07": "39000000000000000000", + "0x68ec79d5be7155716c40941c79d78d17de9ef803": "500600000000000000000", + "0xa0e8ba661b48154cf843d4c2a5c0f792d528ee29": "400000000000000000000", + "0x1a201b4327cea7f399046246a3c87e6e03a3cda8": "1000000000000000000000", + "0xf60f62d73937953fef35169e11d872d2ea317eec": "5348000000000000000000", + "0xc0c04d0106810e3ec0e54a19f2ab8597e69a573d": "50000000000000000000", + "0xef47cf073e36f271d522d7fa4e7120ad5007a0bc": "2500000000000000000000", + "0xa44fe800d96fcad73b7170d0f610cb8c0682d6ce": "4000000000000000000000", + "0x010f4a98dfa1d9799bf5c796fb550efbe7ecd877": "8023366000000000000000", + "0x708fa11fe33d85ad1befcbae3818acb71f6a7d7e": "18200000000000000000", + "0xb38c4e537b5df930d65a74d043831d6b485bbde4": "400000000000000000000", + "0x250a69430776f6347703f9529783955a6197b682": "1940000000000000000000", + "0x2d35a9df62757f7ffad1049afb06ca4afc464c51": "20000000000000000000", + "0x6aff1466c2623675e3cb0e75e423d37a25e442eb": "1730000000000000000000", + "0xfc15cb99a8d1030b12770add033a79ee0d0c908c": "350056000000000000000", + "0xe784dcc873aa8c1513ec26ff36bc92eac6d4c968": "200000000000000000000", + "0xb1c328fb98f2f19ab6646f0a7c8c566fda5a8540": "2500000000000000000000", + "0x247a0a11c57f0383b949de540b66dee68604b0a1": "1069600000000000000000", + "0x1af60343360e0b2d75255210375720df21db5c7d": "1000000000000000000000", + "0x8794bf47d54540ece5c72237a1ffb511ddb74762": "2000000000000000000000", + "0xe76d945aa89df1e457aa342b31028a5e9130b2ce": "1015200000000000000000", + "0xa30e0acb534c9b3084e8501da090b4eb16a2c0cd": "2000000000000000000000", + "0x7099d12f6ec656899b049a7657065d62996892c8": "400000000000000000000", + "0x7be7f2456971883b9a8dbe4c91dec08ac34e8862": "3000000000000000000000", + "0x42746aeea14f27beff0c0da64253f1e7971890a0": "1550000000000000000000", + "0x736b44503dd2f6dd5469ff4c5b2db8ea4fec65d0": "313950000000000000000", + "0x822edff636563a6106e52e9a2598f7e6d0ef2782": "36099000000000000000", + "0x03c647a9f929b0781fe9ae01caa3e183e876777e": "445800000000000000000", + "0x63612e7862c27b587cfb6daf9912cb051f030a9f": "43458000000000000000", + "0xd46bae61b027e5bb422e83a3f9c93f3c8fc77d27": "2000000000000000000000", + "0x5f23ba1f37a96c45bc490259538a54c28ba3b0d5": "1200000000000000000000", + "0xd41d7fb49fe701baac257170426cc9b38ca3a9b2": "176000000000000000000", + "0x1ebacb7844fdc322f805904fbf1962802db1537c": "10000000000000000000000", + "0x9c80bc18e9f8d4968b185da8c79fa6e11ffc3e23": "240000000000000000000", + "0xe4ca0a5238564dfc91e8bf22bade2901619a1cd4": "1000000000000000000000", + "0x1ad72d20a76e7fcc6b764058f48d417d496fa6cd": "2000000000000000000000", + "0xd3bc730937fa75d8452616ad1ef1fe7fffe0d0e7": "83363000000000000000", + "0xeac1482826acb6111e19d340a45fb851576bed60": "32177000000000000000", + "0x01e40521122530d9ac91113c06a0190b6d63850b": "1337000000000000000000", + "0x9e20e5fd361eabcf63891f5b87b09268b8eb3793": "100000000000000000000", + "0x69ff429074cb9b6c63bc914284bce5f0c8fbf7d0": "500000000000000000000", + "0x0d3265d3e7bdb93d5e8e8b1ca47f210a793ecc8e": "200000000000000000000", + "0x5b4ea16db6809b0352d4b6e81c3913f76a51bb32": "400000000000000000000", + "0xd8fe088fffce948f5137ee23b01d959e84ac4223": "227942000000000000000", + "0x7e4e9409704121d1d77997026ff06ea9b19a8b90": "2602600000000000000000", + "0x96b434fe0657e42acc8212b6865139dede15979c": "4000000000000000000000", + "0x22f004df8de9e6ebf523ccace457accb26f97281": "10000000000000000000000", + "0xd8f9240c55cff035523c6d5bd300d370dc8f0c95": "285000000000000000000", + "0x9d9e57fde30e5068c03e49848edce343b7028358": "1730000000000000000000", + "0x317cf4a23cb191cdc56312c29d15e210b3b9b784": "144000000000000000000", + "0x79f08e01ce0988e63c7f8f2908fade43c7f9f5c9": "18200000000000000000", + "0x04e5f5bc7c923fd1e31735e72ef968fd67110c6e": "1611000000000000000000", + "0x1ec4ec4b77bf19d091a868e6f49154180541f90e": "2000000000000000000000", + "0x8737dae671823a8d5917e0157ace9c43468d946b": "1999944000000000000000", + "0xf998ca3411730a6cd10e7455b0410fb0f6d3ff80": "2000000000000000000000", + "0x6e2eab85dc89fe29dc0aa1853247dab43a523d56": "80000000000000000000", + "0x72c083beadbdc227c5fb43881597e32e83c26056": "20000000000000000000000", + "0x5902e44af769a87246a21e079c08bf36b06efeb3": "1000000000000000000000", + "0xcc2d04f0a4017189b340ca77198641dcf6456b91": "3940000000000000000000", + "0xbde4c73f969b89e9ceae66a2b51844480e038e9a": "1000000000000000000000", + "0xadff0d1d0b97471e76d789d2e49c8a74f9bd54ff": "1880000000000000000000", + "0x397cdb8c80c67950b18d654229610e93bfa6ee1a": "1172938000000000000000", + "0xa3e051fb744aa3410c3b88f899f5d57f168df12d": "2955000000000000000000", + "0x810db25675f45ea4c7f3177f37ce29e22d67999c": "200000000000000000000", + "0x1e13ec51142cebb7a26083412c3ce35144ba56a1": "5000000000000000000000", + "0x25bdfa3ee26f3849617b230062588a97e3cae701": "1000008000000000000000", + "0xae538c73c5b38d8d584d7ebdadefb15cabe48357": "999000000000000000000", + "0xa2ecce2c49f72a0995a0bda57aacf1e9f001e22a": "4000000000000000000000", + "0x7e24fbdad290175eb2df6d180a19b9a9f41370be": "1000000000000000000000", + "0xe8cc43bc4f8acf39bff04ebfbf42aac06a328470": "400000000000000000000", + "0xc2779771f0536d79a8708f6931abc44b3035e999": "20002000000000000000000", + "0xab27ba78c8e5e3daef31ad05aef0ff0325721e08": "468000000000000000000", + "0x563cb8803c1d32a25b27b64114852bd04d9c20cd": "204400000000000000000", + "0x08d4267feb15da9700f7ccc3c84a8918bf17cfde": "1790000000000000000000", + "0xd1778c13fbd968bc083cb7d1024ffe1f49d02caa": "4020000000000000000000", + "0x1796bcc97b8abc717f4b4a7c6b1036ea2182639f": "355242000000000000000", + "0xbeecd6af900c8b064afcc6073f2d85d59af11956": "2000000000000000000000", + "0x045ed7f6d9ee9f252e073268db022c6326adfc5b": "100000000000000000000", + "0xb88a37c27f78a617d5c091b7d5b73a3761e65f2a": "2000000000000000000000", + "0x72fb49c29d23a18950c4b2dc0ddf410f532d6f53": "2000000000000000000000", + "0x6ecaefa6fc3ee534626db02c6f85a0c395571e77": "600000000000000000000", + "0xd1811c55976980f083901d8a0db269222dfb5cfe": "1550000000000000000000", + "0x98855c7dfbee335344904a12c40c731795b13a54": "1069600000000000000000", + "0x92a898d46f19719c38126a8a3c27867ae2cee596": "2000000000000000000000", + "0xca428863a5ca30369892d612183ef9fb1a04bcea": "1520000000000000000000", + "0x797427e3dbf0feae7a2506f12df1dc40326e8505": "1000000000000000000000", + "0x3d574fcf00fae1d98cc8bf9ddfa1b3953b9741bc": "1970000000000000000000", + "0x28818e18b610001321b31df6fe7d2815cdadc9f5": "1000000000000000000000", + "0x5f3e1e6739b0c62200e00a003691d9efb238d89f": "3000000000000000000000", + "0xd9d370fec63576ab15b318bf9e58364dc2a3552a": "100000000000000000000", + "0xb223bf1fbf80485ca2b5567d98db7bc3534dd669": "4000000000000000000000", + "0x7b27d0d1f3dd3c140294d0488b783ebf4015277d": "400000000000000000000", + "0x7930c2d9cbfa87f510f8f98777ff8a8448ca5629": "199955000000000000000", + "0x820c19291196505b65059d9914b7090be1db87de": "140000000000000000000", + "0xe545ee84ea48e564161e9482d59bcf406a602ca2": "1850000000000000000000", + "0xaf4cf41785161f571d0ca69c94f8021f41294eca": "9850000000000000000000", + "0x7a4f9b850690c7c94600dbee0ca4b0a411e9c221": "1910000000000000000000", + "0xddab6b51a9030b40fb95cf0b748a059c2417bec7": "2000000000000000000000", + "0x315ef2da620fd330d12ee55de5f329a696e0a968": "150000000000000000000", + "0x4db1c43a0f834d7d0478b8960767ec1ac44c9aeb": "872870000000000000000", + "0x2fef81478a4b2e8098db5ff387ba2153f4e22b79": "999000000000000000000", + "0x6c6aa0d30b64721990b9504a863fa0bfb5e57da7": "2700000000000000000000", + "0x33380c6fff5acd2651309629db9a71bf3f20c5ba": "16100000000000000000000", + "0x4eebf1205d0cc20cee6c7f8ff3115f56d48fba26": "19400000000000000000", + "0x03cc9d2d21f86b84ac8ceaf971dba78a90e62570": "1610000000000000000000", + "0x728f9ab080157db3073156dbca1a169ef3179407": "500000000000000000000", + "0x30ed11b77bc17e5e6694c8bc5b6e4798f68d9ca7": "143731500000000000000000", + "0xf617b967b9bd485f7695d2ef51fb7792d898f500": "500000000000000000000", + "0xc0cbad3ccdf654da22cbcf5c786597ca1955c115": "2000000000000000000000", + "0x80522ddf944ec52e27d724ed4c93e1f7be6083d6": "200000000000000000000", + "0x4e90ccb13258acaa9f4febc0a34292f95991e230": "15800000000000000000", + "0xff207308ced238a6c01ad0213ca9eb4465d42590": "1999944000000000000000", + "0x35f2949cf78bc219bb4f01907cf3b4b3d3865482": "289800000000000000000", + "0x68f525921dc11c329b754fbf3e529fc723c834cd": "1610000000000000000000", + "0x81139bfdcca656c430203f72958c543b6580d40c": "2000000000000000000000", + "0x9d511543b3d9dc60d47f09d49d01b6c498d82078": "11245000000000000000000", + "0x084d103254759b343cb2b9c2d8ff9e1ac5f14596": "7600000000000000000000", + "0xb323dcbf2eddc5382ee4bbbb201ca3931be8b438": "2000000000000000000000", + "0x349d2c918fd09e2807318e66ce432909176bd50b": "1120000000000000000000", + "0xb535f8db879fc67fec58824a5cbe6e5498aba692": "1910000000000000000000", + "0x824074312806da4748434266ee002140e3819ac2": "1507000000000000000000", + "0xe8ef100d7ce0895832f2678df72d4acf8c28b8e3": "500038000000000000000", + "0x84af1b157342d54368260d17876230a534b54b0e": "985000000000000000000", + "0x419a71a36c11d105e0f2aef5a3e598078e85c80b": "5000000000000000000000", + "0x55af092f94ba6a79918b0cf939eab3f01b3f51c7": "149940000000000000000", + "0x35a549e8fd6c368d6dcca6d2e7d18e4db95f5284": "499938000000000000000", + "0xf0e2649c7e6a3f2c5dfe33bbfbd927ca3c350a58": "2000000000000000000000", + "0xf4b759cc8a1c75f80849ebbcda878dc8f0d66de4": "400000000000000000000", + "0x21846f2fdf5a41ed8df36e5ed8544df75988ece3": "1999944000000000000000", + "0x229ff80bf5708009a9f739e0f8b560914016d5a6": "333333000000000000000", + "0xda505537537ffb33c415fec64e69bae090c5f60f": "160000000000000000000", + "0xb91d9e916cd40d193db60e79202778a0087716fc": "404800000000000000000", + "0xbb6823a1bd819f13515538264a2de052b4442208": "25610000000000000000", + "0x459393d63a063ef3721e16bd9fde45ee9dbd77fb": "1968818000000000000000", + "0x95f62d0243ede61dad9a3165f53905270d54e242": "1610000000000000000000", + "0xb0bb29a861ea1d424d45acd4bfc492fb8ed809b7": "80000000000000000000", + "0x5e74ed80e9655788e1bb269752319667fe754e5a": "56000000000000000000", + "0xa276b058cb98d88beedb67e543506c9a0d9470d8": "2668652000000000000000", + "0x8ae9ef8c8a8adfa6ab798ab2cdc405082a1bbb70": "2000000000000000000000", + "0xe5102c3b711b810344197419b1cd8a7059f13e32": "299999000000000000000", + "0xc32038ca52aee19745be5c31fcdc54148bb2c4d0": "49984000000000000000", + "0x13e321728c9c57628058e93fc866a032dd0bda90": "714580000000000000000", + "0xc2bae4a233c2d85724f0dabebda0249d833e37d3": "5000000000000000000000", + "0x10d32416722ca4e648630548ead91edd79c06aff": "100000000000000000000", + "0xd5f07552b5c693c20067b378b809cee853b8f136": "505540000000000000000", + "0x8668af868a1e98885f937f2615ded6751804eb2d": "20000000000000000000", + "0x139d3531c9922ad56269f6309aa789fb2485f98c": "4000000000000000000000", + "0x1d29c7aab42b2048d2b25225d498dba67a03fbb2": "200000000000000000000", + "0xd35075ca61fe59d123969c36a82d1ab2d918aa38": "2674000000000000000000", + "0xd6fc0446c6a8d40ae3551db7e701d1fa876e4a49": "2000000000000000000000", + "0xfccd0d1ecee27addea95f6857aeec8c7a04b28ee": "10000000000000000000000", + "0xc12cfb7b3df70fceca0ede263500e27873f8ed16": "1000000000000000000000", + "0xd0db456178206f5c4430fe005063903c3d7a49a7": "706245000000000000000", + "0x73cf80ae9688e1580e68e782cd0811f7aa494d2c": "7760000000000000000000", + "0xd60651e393783423e5cc1bc5f889e44ef7ea243e": "398800000000000000000", + "0x048a8970ea4145c64d5517b8de5b46d0595aad06": "20000000000000000000000", + "0xdd9b485a3b1cd33a6a9c62f1e5bee92701856d25": "225073000000000000000", + "0x5b287c7e734299e727626f93fb1187a60d5057fe": "101230000000000000000", + "0x635c00fdf035bca15fa3610df3384e0fb79068b1": "9000000000000000000000", + "0x630a913a9031c9492abd4c41dbb15054cfec4416": "5688000000000000000000", + "0xaf3614dcb68a36e45a4e911e62796247222d595b": "2259800000000000000000", + "0x335e22025b7a77c3a074c78b8e3dfe071341946e": "10178744000000000000000", + "0xf0e1dfa42adeac2f17f6fdf584c94862fd563393": "500000000000000000000", + "0x1a9e702f385dcd105e8b9fa428eea21c57ff528a": "1400000000000000000000", + "0x8ce4949d8a16542d423c17984e6739fa72ceb177": "24999975000000000000000", + "0x5f29c9de765dde25852af07d33f2ce468fd20982": "2000000000000000000000", + "0xdbf5f061a0f48e5e69618739a77d2ec19768d201": "152000000000000000000", + "0xb247cf9c72ec482af3eaa759658f793d670a570c": "912000000000000000000", + "0x99f4147ccc6bcb80cc842e69f6d00e30fa4133d9": "400000000000000000000", + "0xba6d31b9a261d640b5dea51ef2162c3109f1eba8": "5000000000000000000000", + "0xf05ba8d7b68539d933300bc9289c3d9474d0419e": "126400000000000000000", + "0x682e96276f518d31d7e56e30dfb009c1218201bd": "20000000000000000000", + "0x0927220492194b2eda9fc4bbe38f25d681dfd36c": "6000000000000000000000", + "0xa3c33afc8cb4704e23153de2049d35ae71332472": "799600000000000000000", + "0x05c736d365aa37b5c0be9c12c8ad5cd903c32cf9": "6002000000000000000000", + "0xd8eef4cf4beb01ee20d111748b61cb4d3f641a01": "2740000000000000000000", + "0x16c1bf5b7dc9c83c179efacbcf2eb174e3561cb3": "1000000000000000000000", + "0xd79db5ab43621a7a3da795e58929f3dd25af67d9": "1999944000000000000000", + "0x28efae6356509edface89fc61a7fdcdb39eea8e5": "5348000000000000000000", + "0xc55005a6c37e8ca7e543ce259973a3cace961a4a": "2000000000000000000000", + "0xab3d86bc82927e0cd421d146e07f919327cdf6f9": "1910000000000000000000", + "0xb74ed2666001c16333cf7af59e4a3d4860363b9c": "193600000000000000000", + "0x1899f69f653b05a5a6e81f480711d09bbf97588c": "1955000000000000000000", + "0x27fc85a49cff90dbcfdadc9ddd40d6b9a2210a6c": "100000000000000000000", + "0xcd1ed263fbf6f6f7b48aef8f733d329d4382c7c7": "18500000000000000000", + "0xd97fe6f53f2a58f6d76d752adf74a8a2c18e9074": "309990000000000000000", + "0x80da2fdda29a9e27f9e115975e69ae9cfbf3f27e": "200000000000000000000", + "0x09146ea3885176f07782e1fe30dce3ce24c49e1f": "20000000000000000000", + "0x393ff4255e5c658f2e7f10ecbd292572671bc2d2": "2000000000000000000000", + "0xa390ca122b8501ee3e5e07a8ca4b419f7e4dae15": "100000000000000000000", + "0x6d9193996b194617211106d1635eb26cc4b66c6c": "399640000000000000000", + "0x999c49c174ca13bc836c1e0a92bff48b271543ca": "3280000000000000000000", + "0x7421ce5be381738ddc83f02621974ff0686c79b8": "1632000000000000000000", + "0x6be9030ee6e2fbc491aca3de4022d301772b7b7d": "26740000000000000000", + "0x81bd75abd865e0c3f04a0b4fdbcb74d34082fbb7": "4000000000000000000000", + "0x8bc1ff8714828bf286ff7e8a7709106548ed1b18": "10000000000000000000000", + "0xa0aadbd9509722705f6d2358a5c79f37970f00f6": "200000000000000000000", + "0x3d881433f04a7d0d27f84944e08a512da3555287": "1200000000000000000000", + "0xcc1d6ead01aada3e8dc7b95dca25df26eefa639d": "2000000000000000000000", + "0x35106ba94e8563d4b3cb3c5c692c10e604b7ced8": "2000000000000000000000", + "0x4d8697af0fbf2ca36e8768f4af22133570685a60": "20000000000000000000", + "0x1afcc585896cd0ede129ee2de5c19ea811540b64": "3231259000000000000000", + "0xe5215631b14248d45a255296bed1fbfa0330ff35": "1310000000000000000000", + "0xe3878f91ca86053fced5444686a330e09cc388fb": "194000000000000000000", + "0x555df19390c16d01298772bae8bc3a1152199cbd": "200000000000000000000", + "0xdc3dae59ed0fe18b58511e6fe2fb69b219689423": "100000000000000000000", + "0x74648caac748dd135cd91ea14c28e1bd4d7ff6ae": "3100000000000000000000", + "0xcf2e2ad635e9861ae95cb9bafcca036b5281f5ce": "35200000000000000000000", + "0x14eec09bf03e352bd6ff1b1e876be664ceffd0cf": "20094000000000000000", + "0x856e5ab3f64c9ab56b009393b01664fc0324050e": "1790000000000000000000", + "0x632b9149d70178a7333634275e82d5953f27967b": "700000000000000000000", + "0x2a39190a4fde83dfb3ddcb4c5fbb83ac6c49755c": "1000000000000000000000", + "0x369ef761195f3a373e24ece6cd22520fe0b9e86e": "534933000000000000000", + "0x16afa787fc9f94bdff6976b1a42f430a8bf6fb0f": "2000000000000000000000", + "0x1b0b31afff4b6df3653a94d7c87978ae35f34aae": "354600000000000000000", + "0xb4d82f2e69943f7de0f5f7743879406fac2e9cec": "40000000000000000000", + "0x09d6cefd75b0c4b3f8f1d687a522c96123f1f539": "6000000000000000000000", + "0x01577afd4e50890247c9b10d44af73229aec884f": "680000000000000000000", + "0xa35606d51220ee7f2146d411582ee4ee4a45596e": "3996800000000000000000", + "0x352e77c861696ef96ad54934f894aa8ea35151dd": "1000000000000000000000", + "0xb87f5376c2de0b6cc3c179c06087aa473d6b4674": "1337000000000000000000", + "0x5b49afcd75447838f6e7ceda8d21777d4fc1c3c0": "4000000000000000000000", + "0xb884add88d83dc564ab8e0e02cbdb63919aea844": "2000000000000000000000", + "0x5c312a56c784b122099b764d059c21ece95e84ca": "95000000000000000000", + "0x4697baaf9ccb603fd30430689d435445e9c98bf5": "199600000000000000000", + "0xc625f8c98d27a09a1bcabd5128b1c2a94856af30": "200000000000000000000", + "0x19f5caf4c40e6908813c0745b0aea9586d9dd931": "664000000000000000000", + "0x1e596a81b357c6f24970cc313df6dbdaabd0d09e": "2000000000000000000000", + "0xc1631228efbf2a2e3a4092ee8900c639ed34fbc8": "955000000000000000000", + "0x6f6cf20649a9e973177ac67dbadee4ebe5c7bdda": "5080000000000000000000", + "0x5fa7bfe043886127d4011d8356a47e947963aca8": "1820000000000000000000", + "0x6af8e55969682c715f48ad4fc0fbb67eb59795a3": "2000000000000000000000", + "0x122f56122549d168a5c5e267f52662e5c5cce5c8": "185000000000000000000", + "0x7713ab8037411c09ba687f6f9364f0d3239fac28": "10000000000000000000000", + "0x31ccc616b3118268e75d9ab8996c8858ebd7f3c3": "399924000000000000000", + "0x09c88f917e4d6ad473fa12e98ea3c4472a5ed6da": "10000000000000000000000", + "0xe796fd4e839b4c95d7510fb7c5c72b83c6c3e3c7": "512200000000000000000", + "0xa8285539869d88f8a961533755717d7eb65576ae": "200000000000000000000", + "0xd929c65d69d5bbaea59762662ef418bc21ad924a": "1000000000000000000000", + "0xf7418aa0e713d248228776b2e7434222ae75e3a5": "2000000000000000000000", + "0x7f0b90a1fdd48f27b268feb38382e55ddb50ef0f": "940000000000000000000", + "0x34a0431fff5ead927f3c69649616dc6e97945f6f": "400000000000000000000", + "0x1b3cb81e51011b549d78bf720b0d924ac763a7c2": "560000000000000000000000", + "0x155b3779bb6d56342e2fda817b5b2d81c7f41327": "50200000000000000000", + "0xecd486fc196791b92cf612d348614f9156488b7e": "12000000000000000000000", + "0x82a8cbbfdff02b2e38ae4bbfca15f1f0e83b1aea": "84999000000000000000", + "0x06b0c1e37f5a5ec4bbf50840548f9d3ac0288897": "4000098000000000000000", + "0xe6d49f86c228f47367a35e886caacb271e539429": "412656000000000000000", + "0x704a6eb41ba34f13addde7d2db7df04915c7a221": "1820000000000000000000", + "0x745ccf2d819edbbddea8117b5c49ed3c2a066e93": "4000000000000000000000", + "0x6d3b7836a2b9d899721a4d237b522385dce8dfcd": "1000070000000000000000", + "0x856aa23c82d7215bec8d57f60ad75ef14fa35f44": "20000000000000000000000", + "0xea79057dabef5e64e7b44f7f18648e7e533718d2": "200000000000000000000", + "0x9df057cd03a4e27e8e032f857985fd7f01adc8d7": "2000000000000000000000", + "0x5f2f07d2d697e8c567fcfdfe020f49f360be2139": "2000000000000000000000", + "0x5efbdfe5389999633c26605a5bfc2c1bb5959393": "69200000000000000000", + "0x047e87c8f7d1fce3b01353a85862a948ac049f3e": "1490000000000000000000", + "0x265383d68b52d034161bfab01ae1b047942fbc32": "21000600000000000000000", + "0x760ff3354e0fde938d0fb5b82cef5ba15c3d2916": "10000000000000000000000", + "0xbc46d537cf2edd403565bde733b2e34b215001bd": "20000000000000000000000", + "0xee58fb3db29070d0130188ce472be0a172b89055": "10021400000000000000000", + "0x75abe5270f3a78ce007cf37f8fbc045d489b7bb1": "1999944000000000000000", + "0x5fc6c11426b4a1eae7e51dd512ad1090c6f1a85b": "2730000000000000000000", + "0x26cfffd052152bb3f957b478d5f98b233a7c2b92": "4000000000000000000000", + "0x0a4a011995c681bc999fdd79754e9a324ae3b379": "41350300000000000000000", + "0x6fa60df818a5446418b1bbd62826e0b9825e1318": "13200000000000000000000", + "0x63d55ad99b9137fd1b20cc2b4f03d42cbaddf334": "400000000000000000000", + "0x679b9a109930517e8999099ccf2a914c4c8dd934": "60000000000000000000", + "0x3e83544f0082552572c782bee5d218f1ef064a9d": "100076000000000000000", + "0x968b14648f018333687cd213fa640aec04ce6323": "1000000000000000000000", + "0x427b462ab84e5091f48a46eb0cdc92ddcb26e078": "2000000000000000000000", + "0xdf8510793eee811c2dab1c93c6f4473f30fbef5b": "1000000000000000000000", + "0x362fbcb10662370a068fc2652602a2577937cce6": "200000000000000000000", + "0x5d83b21bd2712360436b67a597ee3378db3e7ae4": "2000000000000000000000", + "0x5777441c83e03f0be8dd340bde636850847c620b": "10000000000000000000000", + "0xc94a585203da7bbafd93e15884e660d4b1ead854": "7000000000000000000000", + "0x35a08081799173e001cc5bd46a02406dc95d1787": "10000000000000000000000", + "0x21d13f0c4024e967d9470791b50f22de3afecf1b": "4452210000000000000000", + "0xfdfd6134c04a8ab7eb16f00643f8fed7daaaecb2": "400000000000000000000", + "0xfd812bc69fb170ef57e2327e80affd14f8e4b6d2": "2000000000000000000000", + "0x7148aef33261d8031fac3f7182ff35928daf54d9": "4100000000000000000000", + "0x0b06390f2437b20ec4a3d3431b3279c6583e5ed7": "194000000000000000000", + "0x4909b31998ead414b8fb0e846bd5cbde393935be": "4000000000000000000000", + "0xb70dba9391682b4a364e77fe99256301a6c0bf1f": "200000000000000000000", + "0x6b83bae7b565244558555bcf4ba8da2011891c17": "2000000000000000000000", + "0x70a03549aa6168e97e88a508330a5a0bea74711a": "1337000000000000000000", + "0x0fc9a0e34145fbfdd2c9d2a499b617d7a02969b9": "180000000000000000000", + "0x2ddf40905769bcc426cb2c2938ffe077e1e89d98": "3000000000000000000000", + "0x794b51c39e53d9e762b0613b829a44b472f4fff3": "667965000000000000000", + "0xd062588171cf99bbeb58f126b870f9a3728d61ec": "4500000000000000000000", + "0x8db185fe1b70a94a6a080e7e23a8bedc4acbf34b": "1400000000000000000000", + "0xe73bfeada6f0fd016fbc843ebcf6e370a65be70c": "1970000000000000000000", + "0x79ed10cf1f6db48206b50919b9b697081fbdaaf3": "2000000000000000000000", + "0x276b0521b0e68b277df0bb32f3fd48326350bfb2": "50000000000000000000", + "0x2e439348df8a4277b22a768457d1158e97c40904": "776970000000000000000", + "0x6c25327f8dcbb2f45e561e86e35d8850e53ab059": "1103200000000000000000", + "0x04d73896cf6593a691972a13a6e4871ff2c42b13": "2000000000000000000000", + "0xb10fd2a647102f881f74c9fbc37da632949f2375": "40000000000000000000", + "0x615f82365c5101f071e7d2cb6af14f7aad2c16c6": "20000000000000000000", + "0x93aa8f92ebfff991fc055e906e651ac768d32bc8": "940000000000000000000", + "0x0cbf8770f0d1082e5c20c5aead34e5fca9ae7ae2": "1000000000000000000000", + "0xffc9cc3094b041ad0e076f968a0de3b167255866": "432400000000000000000", + "0x46531e8b1bde097fdf849d6d119885608a008df7": "200000000000000000000", + "0x23cd2598a20e149ead2ad69379576ecedb60e38e": "2000000000000000000000", + "0x85ca8bc6da2803d0725f5e1a456c89f9bc774e2f": "600000000000000000000", + "0xc0725ec2bdc33a1d826071dea29d62d4385a8c25": "40740000000000000000000", + "0x0e4765790352656bc656682c24fc5ef3e76a23c7": "46610000000000000000", + "0x2ef9e465716acacfb8c8252fa8e7bc7969ebf6e4": "2760000000000000000000", + "0x0ec5308b31282e218fc9e759d4fec5db3708cec4": "1001000000000000000000", + "0xbf7701fc6225d5a17815438a8941d21ebc5d059d": "1880000000000000000000", + "0xc489c83ffbb0252ac0dbe3521217630e0f491f14": "4000000000000000000000", + "0x8eb51774af206b966b8909c45aa6722748802c0c": "500000000000000000000", + "0x7b9226d46fe751940bc416a798b69ccf0dfab667": "4200000000000000000000", + "0x8f660f8b2e4c7cc2b4ac9c47ed28508d5f8f8650": "20000000000000000000000", + "0x9f19fac8a32437d80ac6837a0bb7841729f4972e": "650100000000000000000", + "0x201864a8f784c2277b0b7c9ee734f7b377eab648": "4467000000000000000000", + "0xa6101c961e8e1c15798ffcd0e3201d7786ec373a": "6000000000000000000000", + "0xd4ff46203efa23064b1caf00516e28704a82a4f8": "1337000000000000000000", + "0xaa136b47962bb8b4fb540db4ccf5fdd042ffb8cf": "500038000000000000000", + "0x704ae21d762d6e1dde28c235d13104597236db1a": "2000000000000000000000", + "0xf17a92e0361dbacecdc5de0d1894955af6a9b606": "2000000000000000000000", + "0x8b48e19d39dd35b66e6e1bb6b9c657cb2cf59d04": "17844175000000000000000", + "0x9ad47fdcf9cd942d28effd5b84115b31a658a13e": "3290000000000000000000", + "0xdf0d08617bd252a911df8bd41a39b83ddf809673": "10000000000000000000000", + "0x4c666b86f1c5ee8ca41285f5bde4f79052081406": "500000000000000000000", + "0x88dec5bd3f4eba2d18b8aacefa7b721548c319ba": "1370000000000000000000", + "0x9f9fe0c95f10fee87af1af207236c8f3614ef02f": "6000000000000000000000", + "0xf7d0d310acea18406138baaabbfe0571e80de85f": "1337000000000000000000", + "0x9569c63a9284a805626db3a32e9d236393476151": "1970000000000000000000", + "0x5d5c2c1099bbeefb267e74b58880b444d94449e0": "253574000000000000000", + "0x8c6ae7a05a1de57582ae2768204276c0ff47ed03": "208000000000000000000000", + "0x432d884bd69db1acc0d89c64ade4cb4fc3a88b7a": "2483000000000000000000", + "0x672cbca8440a8577097b19aff593a2ad9d28a756": "80000000000000000000", + "0x19df9445a81c1b3d804aeaeb6f6e204e4236663f": "37387000000000000000", + "0x1cb5f33b4d488936d13e3161da33a1da7df70d1b": "200000000000000000000", + "0xdf60f18c812a11ed4e2776e7a80ecf5e5305b3d6": "900000000000000000000", + "0xc99a9cd6c9c1be3534eecd92ecc22f5c38e9515b": "4821030000000000000000", + "0x00c40fe2095423509b9fd9b754323158af2310f3": "0", + "0xda4a5f557f3bab390a92f49b9b900af30c46ae80": "10000000000000000000000", + "0xf36df02fbd89607347afce2969b9c4236a58a506": "2000000000000000000000", + "0xc549df83c6f65eec0f1dc9a0934a5c5f3a50fd88": "2910000000000000000000", + "0x9f662e95274121f177566e636d23964cf1fd686f": "2000000000000000000000", + "0x5a267331facb262daaecd9dd63a9700c5f5259df": "100000000000000000000", + "0x117d9aa3c4d13bee12c7500f09f5dd1c66c46504": "206000000000000000000", + "0x1b4d07acd38183a61bb2783d2b7b178dd502ac8d": "200000000000000000000", + "0x3c0c3defac9cea7acc319a96c30b8e1fedab4574": "1940000000000000000000", + "0xe4dc22ed595bf0a337c01e03cc6be744255fc9e8": "191000000000000000000", + "0x8f067c7c1bbd57780b7b9eeb9ec0032f90d0dcf9": "20000000000000000000000", + "0x40e2440ae142c880366a12c6d4102f4b8434b62a": "1000000000000000000000", + "0xf9ece022bccd2c92346911e79dd50303c01e0188": "1000000000000000000000", + "0xf70328ef97625fe745faa49ee0f9d4aa3b0dfb69": "1000000000000000000000", + "0xb6aacb8cb30bab2ae4a2424626e6e12b02d04605": "8000000000000000000000", + "0x154459fa2f21318e3434449789d826cdc1570ce5": "2000000000000000000000", + "0x684a44c069339d08e19a75668bdba303be855332": "70000000000000000000000", + "0x9fe501aa57ead79278937cd6308c5cfa7a5629fe": "50003000000000000000", + "0x3e45bd55db9060eced923bb9cb733cb3573fb531": "1640000000000000000000", + "0x9c9f3b8a811b21f3ff3fe20fe970051ce66a824f": "1157740000000000000000", + "0xe99aece90541cae224b87da673965e0aeb296afd": "920000000000000000000", + "0x2f6dce1330c59ef921602154572d4d4bacbd048a": "1000000000000000000000", + "0x6a6353b971589f18f2955cba28abe8acce6a5761": "3000000000000000000000", + "0x98c10ebf2c4f97cba5a1ab3f2aafe1cac423f8cb": "300000000000000000000", + "0x8077c3e4c445586e094ce102937fa05b737b568c": "100000000000000000000", + "0x13371f92a56ea8381e43059a95128bdc4d43c5a6": "1000000000000000000000", + "0x35a6885083c899dabbf530ed6c12f4dd3a204cf5": "200000000000000000000", + "0x36b2c85e3aeeebb70d63c4a4730ce2e8e88a3624": "10000000000000000000000", + "0x5ce44068b8f4a3fe799e6a8311dbfdeda29dee0e": "2000000000000000000000", + "0x6fa6388d402b30afe59934c3b9e13d1186476018": "670000000000000000000", + "0x8251358ca4e060ddb559ca58bc0bddbeb4070203": "2000000000000000000000", + "0x17e86f3b5b30c0ba59f2b2e858425ba89f0a10b0": "2000000000000000000000", + "0x298ec76b440d8807b3f78b5f90979bee42ed43db": "30000000000000000000000", + "0xce4b065dbcb23047203262fb48c1188364977470": "500000000000000000000", + "0xc8e2adeb545e499d982c0c117363ceb489c5b11f": "985000000000000000000", + "0x9928ff715afc3a2b60f8eb4cc4ba4ee8dab6e59d": "440000000000000000000", + "0xc76130c73cb9210238025c9df95d0be54ac67fbe": "1500000000000000000000", + "0x72d03d4dfab3500cf89b86866f15d4528e14a195": "4488000000000000000000", + "0xd193e583d6070563e7b862b9614a47e99489f3e5": "999972000000000000000", + "0x4df140ba796585dd5489315bca4bba680adbb818": "2674000000000000000000", + "0x009eef0a0886056e3f69211853b9b7457f3782e4": "3000512000000000000000", + "0x6e255b700ae7138a4bacf22888a9e2c00a285eec": "4000000000000000000000", + "0xaa47a4ffc979363232c99b99fada0f2734b0aeee": "8121800000000000000000", + "0x9d069197d1de50045a186f5ec744ac40e8af91c6": "2000000000000000000000", + "0xb514882c979bb642a80dd38754d5b8c8296d9a07": "955000000000000000000", + "0x17c0478657e1d3d17aaa331dd429cecf91f8ae5d": "999942000000000000000", + "0x5f9616c47b4a67f406b95a14fe6fc268396f1721": "200000000000000000000", + "0xf70a998a717b338d1dd99854409b1a338deea4b0": "2000000000000000000000", + "0xd1ee905957fe7cc70ec8f2868b43fe47b13febff": "44000000000000000000", + "0xfc018a690ad6746dbe3acf9712ddca52b6250039": "10000000000000000000000", + "0x5118557d600d05c2fcbf3806ffbd93d02025d730": "11360000000000000000000", + "0x1ef5c9c73650cfbbde5c885531d427c7c3fe5544": "6000000000000000000000", + "0xd1a396dcdab2c7494130b3fd307820340dfd8c1f": "17952000000000000000", + "0x2d8e061892a5dcce21966ae1bb0788fd3e8ba059": "250066000000000000000", + "0x8834b2453471f324fb26be5b25166b5b5726025d": "573000000000000000000", + "0x14f221159518783bc4a706676fc4f3c5ee405829": "200000000000000000000", + "0xc056d4bd6bf3cbacac65f8f5a0e3980b852740ae": "100000000000000000000", + "0x560536794a9e2b0049d10233c41adc5f418a264a": "1000000000000000000000", + "0xbc9e0ec6788f7df4c7fc210aacd220c27e45c910": "500000000000000000000", + "0x54bcb8e7f73cda3d73f4d38b2d0847e600ba0df8": "1078000000000000000000", + "0x4361d4846fafb377b6c0ee49a596a78ddf3516a3": "3580000000000000000000", + "0x41c3c2367534d13ba2b33f185cdbe6ac43c2fa31": "4000000000000000000000", + "0x5dc6f45fef26b06e3302313f884daf48e2746fb9": "500000000000000000000", + "0xad414d29cb7ee973fec54e22a388491786cf5402": "14000000000000000000000", + "0x802dc3c4ff2d7d925ee2859f4a06d7ba60f1308c": "98040000000000000000", + "0x2aed2ce531c056b0097efc3c6de10c4762004ed9": "10430000000000000000000", + "0x39782ffe06ac78822a3c3a8afe305e50a56188ce": "10000000000000000000000", + "0xec73833de4b810bb027810fc8f69f544e83c12d1": "1000000000000000000000", + "0x8d51a4cc62011322c696fd725b9fb8f53feaaa07": "1000000000000000000000", + "0x29298ccbdff689f87fe41aa6e98fdfb53deaf37a": "19800000000000000000000", + "0x827531a6c5817ae35f82b00b9754fcf74c55e232": "3600000000000000000000", + "0x9c581a60b61028d934167929b22d70b313c34fd0": "50000000000000000000000", + "0x0a077db13ffeb09484c217709d5886b8bf9c5a8b": "4000000000000000000000", + "0x07b7a57033f8f11330e4665e185d234e83ec140b": "4325683000000000000000", + "0x17f523f117bc9fe978aa481eb4f5561711371bc8": "1999884000000000000000", + "0xde42fcd24ce4239383304367595f068f0c610740": "45120000000000000000", + "0x2a46d353777176ff8e83ffa8001f4f70f9733aa5": "106000000000000000000", + "0x92e4392816e5f2ef5fb65837cec2c2325cc64922": "10000000000000000000000", + "0x9a3da65023a13020d22145cfc18bab10bd19ce4e": "456516000000000000000", + "0x1a085d43ec92414ea27b914fe767b6d46b1eef44": "29550000000000000000000", + "0x3b2367f8494b5fe18d683c055d89999c9f3d1b34": "10000000000000000000000", + "0x84244fc95a6957ed7c1504e49f30b8c35eca4b79": "2000000000000000000000", + "0x5e031b0a724471d476f3bcd2eb078338bf67fbef": "18200000000000000000", + "0x97e5cc6127c4f885be02f44b42d1c8b0ac91e493": "200000000000000000000", + "0xeb1cea7b45d1bd4d0e2a007bd3bfb354759e2c16": "198000000000000000000", + "0x72feaf124579523954645b7fafff0378d1c8242e": "1000000000000000000000", + "0x8d07d42d831c2d7c838aa1872b3ad5d277176823": "349200000000000000000", + "0x9637dc12723d9c78588542eab082664f3f038d9d": "1000000000000000000000", + "0xe84b55b525f1039e744b918cb3332492e45eca7a": "200000000000000000000", + "0xb1d6b01b94d854fe8b374aa65e895cf22aa2560e": "940000000000000000000", + "0x8161d940c3760100b9080529f8a60325030f6edc": "300000000000000000000", + "0xd30ee9a12b4d68abace6baca9ad7bf5cd1faf91c": "1499936000000000000000", + "0x057949e1ca0570469e4ce3c690ae613a6b01c559": "200000000000000000000", + "0x4bf8e26f4c2790da6533a2ac9abac3c69a199433": "200000000000000000000", + "0x36fec62c2c425e219b18448ad757009d8c54026f": "400000000000000000000", + "0x77bfe93ccda750847e41a1affee6b2da96e7214e": "300000000000000000000", + "0xcc48414d2ac4d42a5962f29eee4497092f431352": "161000000000000000000", + "0xddbddd1bbd38ffade0305d30f02028d92e9f3aa8": "2000000000000000000000", + "0x30c01142907acb1565f70438b9980ae731818738": "2000000000000000000000", + "0xcffc49c1787eebb2b56cabe92404b636147d4558": "5679305000000000000000", + "0xf99eeece39fa7ef5076d855061384009792cf2e0": "500000000000000000000", + "0xe9b6a790009bc16642c8d820b7cde0e9fd16d8f5": "3640000000000000000000", + "0x03b41b51f41df20dd279bae18c12775f77ad771c": "1000000000000000000000", + "0x787d313fd36b053eeeaedbce74b9fb0678333289": "27160000000000000000000", + "0x35d2970f49dcc81ea9ee707e9c8a0ab2a8bb7463": "1440000000000000000000", + "0x4c0aca508b3caf5ee028bc707dd1e800b838f453": "18200000000000000000", + "0x514632efbd642c04de6ca342315d40dd90a2dba6": "2674000000000000000000", + "0x36810ff9d213a271eda2b8aa798be654fa4bbe06": "2000000000000000000000", + "0x0c088006c64b30c4ddafbc36cb5f05469eb62834": "2000000000000000000000", + "0x568df31856699bb5acfc1fe1d680df9960ca4359": "1379999000000000000000", + "0xd48e3f9357e303513841b3f84bda83fc89727587": "1000000000000000000000", + "0x953ef652e7b769f53d6e786a58952fa93ee6abe7": "2860000000000000000000", + "0x7c60a05f7a4a5f8cf2784391362e755a8341ef59": "1892300000000000000000", + "0x7a6b26f438d9a352449155b8876cbd17c9d99b64": "6000000000000000000000", + "0x68f719ae342bd7fef18a05cbb02f705ad38ed5b2": "1050000000000000000000", + "0x45ca8d956608f9e00a2f9974028640888465668f": "2000000000000000000000", + "0x3eaf316b87615d88f7adc77c58e712ed4d77966b": "100141000000000000000", + "0x1f0412bfedcd964e837d092c71a5fcbaf30126e2": "20000000000000000000", + "0x7471f72eeb300624eb282eab4d03723c649b1b58": "8000000000000000000000", + "0x9bf71f7fb537ac54f4e514947fa7ff6728f16d2f": "33400000000000000000", + "0x1098c774c20ca1daac5ddb620365316d353f109c": "100000000000000000000", + "0x7dd8d7a1a34fa1f8e73ccb005fc2a03a15b8229c": "200000000000000000000", + "0x0151fa5d17a2dce2d7f1eb39ef7fe2ad213d5d89": "4000000000000000000000", + "0xad6628352ed3390bafa86d923e56014cfcb360f4": "2000000000000000000000", + "0x02af2459a93d0b3f4d062636236cd4b29e3bcecf": "1910000000000000000000", + "0xace2abb63b0604409fbde3e716d2876d44e8e5dd": "152000000000000000000", + "0xe710dcd09b8101f9437bd97db90a73ef993d0bf4": "386100000000000000000", + "0xd43ee438d83de9a37562bb4e286cb1bd19f4964d": "1000000000000000000000", + "0xea3779d14a13f6c78566bcde403591413a6239db": "197000000000000000000000", + "0x6704f169e0d0b36b57bbc39f3c45437b5ee3d28d": "394000000000000000000", + "0x5584423050e3c2051f0bbd8f44bd6dbc27ecb62c": "3000000000000000000000", + "0x2f315d9016e8ee5f536681202f9084b032544d4d": "1037400000000000000000", + "0xe1b63201fae1f129f95c7a116bd9dde5159c6cda": "22837462000000000000000", + "0x2bbe62eac80ca7f4d6fdee7e7d8e28b63acf770e": "2396000000000000000000", + "0x38da1ba2de9e2c954b092dd9d81204fd016ba016": "10156000000000000000000", + "0x8a86e4a51c013b1fb4c76bcf30667c78d52eedef": "2000000000000000000000", + "0x8f717ec1552f4c440084fba1154a81dc003ebdc0": "10000000000000000000000", + "0xc760971bbc181c6a7cf77441f24247d19ce9b4cf": "2000000000000000000000", + "0x7f150afb1a77c2b45928c268c1e9bdb4641d47d8": "2000000000000000000000", + "0x1ea334b5750807ea74aac5ab8694ec5f28aa77cf": "492500000000000000000", + "0x2afb058c3d31032b353bf24f09ae20d54de57dbe": "1100000000000000000000", + "0xcaef027b1ab504c73f41f2a10979b474f97e309f": "200000000000000000000", + "0x5dd112f368c0e6ceff77a9df02a5481651a02fb7": "169800000000000000000", + "0xbd93e550403e2a06113ed4c3fba1a8913b19407e": "2000000000000000000000", + "0x500c16352e901d48ba8d04e2c767121772790b02": "30239000000000000000", + "0xd2a80327cbe55c4c7bd51ff9dde4ca648f9eb3f8": "50000000000000000000", + "0x355ccfe0e77d557b971be1a558bc02df9eee0594": "1759120000000000000000", + "0x5aed0e6cfe95f9d680c76472a81a2b680a7f93e2": "197000000000000000000", + "0xf56442f60e21691395d0bffaa9194dcaff12e2b7": "260000000000000000000", + "0x7db9eacc52e429dc83b461c5f4d86010e5383a28": "1000000000000000000000", + "0x4b984ef26c576e815a2eaed2f5177f07dbb1c476": "1560000000000000000000", + "0x9846648836a307a057184fd51f628a5f8c12427c": "19100000000000000000000", + "0x4af0db077bb9ba5e443e21e148e59f379105c592": "600000000000000000000", + "0xe96e2d3813efd1165f12f602f97f4a62909d3c66": "2300000000000000000000", + "0x30e789b3d2465e946e6210fa5b35de4e8c93085f": "2000000000000000000000", + "0x97f99b6ba31346cd98a9fe4c308f87c5a58c5151": "6000000000000000000000", + "0x595e23d788a2d4bb85a15df7136d264a635511b3": "3940000000000000000000", + "0x2f61efa5819d705f2b1e4ee754aeb8a819506a75": "1460000000000000000000", + "0x3554947b7b947b0040da52ca180925c6d3b88ffe": "66850000000000000000", + "0x8feffadb387a1547fb284da9b8147f3e7c6dc6da": "837200000000000000000", + "0x258939bbf00c9de9af5338f5d714abf6d0c1c671": "1550000000000000000000", + "0x5b333696e04cca1692e71986579c920d6b2916f9": "500000000000000000000", + "0x5381448503c0c702542b1de7cc5fb5f6ab1cf6a5": "8000000000000000000000", + "0x7e81f6449a03374191f3b7cb05d938b72e090dff": "100000000000000000000", + "0x4ef1c214633ad9c0703b4e2374a2e33e3e429291": "1337000000000000000000", + "0xfed8476d10d584b38bfa6737600ef19d35c41ed8": "1820000000000000000000", + "0x1a95c9b7546b5d1786c3858fb1236446bc0ca4ce": "1970000000000000000000", + "0x3b07db5a357f5af2484cbc9d77d73b1fd0519fc7": "500000000000000000000", + "0x5f68a24c7eb4117667737b33393fb3c2148a53b6": "51800000000000000000", + "0xd8f665fd8cd5c2bcc6ddc0a8ae521e4dc6aa6060": "1700000000000000000000", + "0xd66acc0d11b689cea6d9ea5ff4014c224a5dc7c4": "18200000000000000000", + "0x6e72b2a1186a8e2916543b1cb36a68870ea5d197": "186000000000000000000", + "0x5102a4a42077e11c58df4773e3ac944623a66d9f": "2000325000000000000000", + "0x72480bede81ad96423f2228b5c61be44fb523100": "6400000000000000000000", + "0xe076db30ab486f79194ebbc45d8fab9a9242f654": "4840000000000000000000", + "0x8ceea15eec3bdad8023f98ecf25b2b8fef27db29": "2000000000000000000000", + "0x40652360d6716dc55cf9aab21f3482f816cc2cbd": "10000000000000000000000", + "0x13e02fb448d6c84ae17db310ad286d056160da95": "2000000000000000000000", + "0xd6598b1386e93c5ccb9602ff4bbbecdbd3701dc4": "224096000000000000000", + "0xd5ea472cb9466018110af00c37495b5c2c713112": "4997800000000000000000", + "0xbb75cb5051a0b0944b4673ca752a97037f7c8c15": "200000000000000000000", + "0x8af626a5f327d7506589eeb7010ff9c9446020d2": "1400000000000000000000", + "0x318c76ecfd8af68d70555352e1f601e35988042d": "501600000000000000000", + "0x5c3d19441d196cb443662020fcad7fbb79b29e78": "14300000000000000000", + "0x27101a0f56d39a88c5a84f9b324cdde33e5cb68c": "2000000000000000000000", + "0xe229e746a83f2ce253b0b03eb1472411b57e5700": "5730000000000000000000", + "0x604cdf18628dbfa8329194d478dd5201eecc4be7": "23000000000000000000", + "0x657473774f63ac3d6279fd0743d5790c4f161503": "200000000000000000000", + "0x1ddefefd35ab8f658b2471e54790bc17af98dea4": "1000000000000000000000", + "0xac3900298dd14d7cc96d4abb428da1bae213ffed": "24730250000000000000000", + "0x944f07b96f90c5f0d7c0c580533149f3f585a078": "74000000000000000000", + "0x232c6d03b5b6e6711efff190e49c28eef36c82b0": "1337000000000000000000", + "0xc87c77e3c24adecdcd1038a38b56e18dead3b702": "8800000000000000000000", + "0xc4b6e5f09cc1b90df07803ce3d4d13766a9c46f4": "6000000000000000000000", + "0xd44334b4e23a169a0c16bd21e866bba52d970587": "2600000000000000000000", + "0x7757a4b9cc3d0247ccaaeb9909a0e56e1dd6dcc2": "20000000000000000000", + "0xcf694081c76d18c64ca71382be5cd63b3cb476f8": "1000000000000000000000", + "0x133e4f15e1e39c53435930aaedf3e0fe56fde843": "20000000000000000000", + "0xf067fb10dfb293e998abe564c055e3348f9fbf1e": "2000000000000000000000", + "0x94449c01b32a7fa55af8104f42cdd844aa8cbc40": "16548000000000000000000", + "0x0e2094ac1654a46ba1c4d3a40bb8c17da7f39688": "358000000000000000000", + "0x738ca94db7ce8be1c3056cd6988eb376359f3353": "25500000000000000000000", + "0x0cfb172335b16c87d519cd1475530d20577f5e0e": "100000000000000000000000", + "0x3cb561ce86424b359891e364ec925ffeff277df7": "200000000000000000000", + "0x5f981039fcf50225e2adf762752112d1cc26b6e3": "499954000000000000000", + "0xb43657a50eecbc3077e005d8f8d94f377876bad4": "35460000000000000000", + "0xd07e511864b1cf9969e3560602829e32fc4e71f5": "50000000000000000000", + "0x11306c7d57588637780fc9fde8e98ecb008f0164": "1999944000000000000000", + "0x45ca9862003b4e40a3171fb5cafa9028cac8de19": "13790000000000000000000", + "0x231d94155dbcfe2a93a319b6171f63b20bd2b6fa": "3819952000000000000000", + "0xe7533e270cc61fa164ac1553455c105d04887e14": "121550000000000000000", + "0x070d5d364cb7bbf822fc2ca91a35bdd441b215d5": "2000000000000000000000", + "0xd475477fa56390d33017518d6711027f05f28dbf": "1975032000000000000000", + "0xcea34a4dd93dd9aefd399002a97d997a1b4b89cd": "1500000000000000000000", + "0x560becdf52b71f3d8827d927610f1a980f33716f": "429413000000000000000", + "0xf632adff490da4b72d1236d04b510f74d2faa3cd": "1400000000000000000000", + "0x2fdd9b79df8df530ad63c20e62af431ae99216b8": "21000000000000000000", + "0x535201a0a1d73422801f55ded4dfaee4fbaa6e3b": "39641000000000000000", + "0x409d5a962edeeebea178018c0f38b9cdb213f289": "20000000000000000000", + "0x9d911f3682f32fe0792e9fb6ff3cfc47f589fca5": "4000000000000000000000", + "0x9f7a0392f857732e3004a375e6b1068d49d83031": "2000000000000000000000", + "0x6a04f5d53fc0f515be942b8f12a9cb7ab0f39778": "3129800000000000000000", + "0xbe478e8e3dde6bd403bb2d1c657c4310ee192723": "492500000000000000000", + "0x007622d84a234bb8b078230fcf84b67ae9a8acae": "698800000000000000000", + "0x9475c510ec9a26979247744c3d8c3b0e0b5f44d3": "10000000000000000000000", + "0xdf47a8ef95f2f49f8e6f58184154145d11f72797": "1910000000000000000000", + "0x13ce332dff65a6ab933897588aa23e000980fa82": "258400000000000000000", + "0x9c4bbcd5f1644a6f075824ddfe85c571d6abf69c": "1800000000000000000000", + "0xd42b20bd0311608b66f8a6d15b2a95e6de27c5bf": "2000000000000000000000", + "0xa4dd59ab5e517d398e49fa537f899fed4c15e95d": "20000000000000000000000", + "0x1a8a5ce414de9cd172937e37f2d59cff71ce57a0": "10000000000000000000000", + "0x55c564664166a1edf3913e0169f1cd451fdb5d0c": "2399800000000000000000", + "0x58ae2ddc5f4c8ada97e06c0086171767c423f5d7": "1610000000000000000000", + "0xfb79abdb925c55b9f98efeef64cfc9eb61f51bb1": "1794000000000000000000", + "0xe7a42f59fee074e4fb13ea9e57ecf1cc48282249": "20000000000000000000000", + "0x07e2b4cdeed9d087b12e556d9e770c13c099615f": "668500000000000000000", + "0x68473b7a7d965904bedba556dfbc17136cd5d434": "100000000000000000000", + "0x6c5c3a54cda7c2f118edba434ed81e6ebb11dd7a": "200000000000000000000", + "0x24c117d1d2b3a97ab11a4679c99a774a9eade8d1": "1000000000000000000000", + "0xf68c5e33fa97139df5b2e63886ce34ebf3e4979c": "3320000000000000000000", + "0xbd7419dc2a090a46e2873d7de6eaaad59e19c479": "6802000000000000000000", + "0x1a0a1ddfb031e5c8cc1d46cf05842d50fddc7130": "1000000000000000000000", + "0x2b3a68db6b0cae8a7c7a476bdfcfbd6205e10687": "2400000000000000000000", + "0x426d15f407a01135b13a6b72f8f2520b3531e302": "20000000000000000000", + "0x0394b90fadb8604f86f43fc1e35d3124b32a5989": "764000000000000000000", + "0x7412c9bc30b4df439f023100e63924066afd53af": "500000000000000000000", + "0x80e7b3205230a566a1f061d922819bb4d4d2a0e1": "14000000000000000000000", + "0xff4fc66069046c525658c337a917f2d4b832b409": "2000000000000000000000", + "0xf5061ee2e5ee26b815503677130e1de07a52db07": "100000000000000000000", + "0x49793463e1681083d6abd6e725d5bba745dccde8": "545974000000000000000", + "0x23551f56975fe92b31fa469c49ea66ee6662f41e": "1910000000000000000000", + "0xfad96ab6ac768ad5099452ac4777bd1a47edc48f": "100000000000000000000", + "0x2a746cd44027af3ebd37c378c85ef7f754ab5f28": "394000000000000000000", + "0xb8d389e624a3a7aebce4d3e5dbdf6cdc29932aed": "200000000000000000000", + "0x7b761feb7fcfa7ded1f0eb058f4a600bf3a708cb": "4600000000000000000000", + "0x5435c6c1793317d32ce13bba4c4ffeb973b78adc": "250070000000000000000", + "0xdd04eee74e0bf30c3f8d6c2c7f52e0519210df93": "80000000000000000000", + "0x4331ab3747d35720a9d8ca25165cd285acd4bda8": "2000000000000000000000", + "0xb84c8b9fd33ece00af9199f3cf5fe0cce28cd14a": "3820000000000000000000", + "0x393f783b5cdb86221bf0294fb714959c7b45899c": "5910000000000000000000", + "0x259ec4d265f3ab536b7c70fa97aca142692c13fc": "20400000000000000000", + "0x5d2f7f0b04ba4be161e19cb6f112ce7a5e7d7fe4": "35200000000000000000", + "0xd54ba2d85681dc130e5b9b02c4e8c851391fd9b9": "3940000000000000000000", + "0x5cd8af60de65f24dc3ce5730ba92653022dc5963": "1790000000000000000000", + "0x3b42a66d979f582834747a8b60428e9b4eeccd23": "620400000000000000000", + "0x4b19eb0c354bc1393960eb06063b83926f0d67b2": "29000000000000000000", + "0x8cf3546fd1cda33d58845fc8fcfecabca7c5642a": "574027000000000000000", + "0x113612bc3ba0ee4898b49dd20233905f2f458f62": "14000000000000000000000", + "0x1f2afc0aed11bfc71e77a907657b36ea76e3fb99": "4000000000000000000000", + "0x03714b41d2a6f751008ef8dd4d2b29aecab8f36e": "6000000000000000000000", + "0x25721c87b0dc21377c7200e524b14a22f0af69fb": "4000000000000000000000", + "0x335858f749f169cabcfe52b796e3c11ec47ea3c2": "200000000000000000000", + "0x52fb46ac5d00c3518b2c3a1c177d442f8165555f": "1500000000000000000000", + "0x7a8c89c014509d56d7b68130668ff6a3ecec7370": "300000000000000000000", + "0x7d5d2f73949dadda0856b206989df0078d51a1e5": "10560000000000000000000", + "0xbe538246dd4e6f0c20bf5ad1373c3b463a131e86": "200000000000000000000", + "0x62680a15f8ccb8bdc02f7360c25ad8cfb57b8ccd": "1000000000000000000000", + "0xaa0ca3737337178a0caac3099c584b056c56301c": "880000000000000000000", + "0x1d341fa5a3a1bd051f7db807b6db2fc7ba4f9b45": "18200000000000000000", + "0x6463f715d594a1a4ace4bb9c3b288a74decf294d": "1970000000000000000000", + "0xe00d153b10369143f97f54b8d4ca229eb3e8f324": "152000000000000000000", + "0x8d0b9ea53fd263415eac11391f7ce9123c447062": "2000000000000000000000", + "0xcacb675e0996235404efafbb2ecb8152271b55e0": "700000000000000000000", + "0xb615e940143eb57f875893bc98a61b3d618c1e8c": "20000000000000000000", + "0x606f177121f7855c21a5062330c8762264a97b31": "4000000000000000000000", + "0xe3925509c8d0b2a6738c5f6a72f35314491248ce": "1012961000000000000000", + "0x3f08d9ad894f813e8e2148c160d24b353a8e74b0": "60000000000000000000000", + "0x40f4f4c06c732cd35b119b893b127e7d9d0771e4": "10000000000000000000000", + "0x1406854d149e081ac09cb4ca560da463f3123059": "1337000000000000000000", + "0xecf05d07ea026e7ebf4941002335baf2fed0f002": "200000000000000000000", + "0x9a990b8aeb588d7ee7ec2ed8c2e64f7382a9fee2": "33518000000000000000", + "0xa2e0683a805de6a05edb2ffbb5e96f0570b637c3": "20000000000000000000", + "0xfba5486d53c6e240494241abf87e43c7600d413a": "1987592000000000000000", + "0xd81bd54ba2c44a6f6beb1561d68b80b5444e6dc6": "1163806000000000000000", + "0x5298ab182a19359ffcecafd7d1b5fa212dede6dd": "20000000000000000000", + "0xd1acb5adc1183973258d6b8524ffa28ffeb23de3": "4000000000000000000000", + "0x4e7aa67e12183ef9d7468ea28ad239c2eef71b76": "4925000000000000000000", + "0x509a20bc48e72be1cdaf9569c711e8648d957334": "2000000000000000000000", + "0x949f84f0b1d7c4a7cf49ee7f8b2c4a134de32878": "685000000000000000000", + "0xedbac9527b54d6df7ae2e000cca3613ba015cae3": "1970000000000000000000", + "0xc697b70477cab42e2b8b266681f4ae7375bb2541": "5577200000000000000000", + "0x86c934e38e53be3b33f274d0539cfca159a4d0d1": "970000000000000000000", + "0x0877eeaeab78d5c00e83c32b2d98fa79ad51482f": "439420000000000000000", + "0x5e11ecf69d551d7f4f84df128046b3a13240a328": "20000000000000000000", + "0x43ff8853e98ed8406b95000ada848362d6a0392a": "22100000000000000000000", + "0xf11cf5d363746fee6864d3ca336dd80679bb87ae": "40000000000000000000000", + "0xfb223c1e22eac1269b32ee156a5385922ed36fb8": "2000000000000000000000", + "0x4e6600806289454acda330a2a3556010dfacade6": "6000000000000000000000", + "0xcfe2caaf3cec97061d0939748739bffe684ae91f": "10000000000000000000000", + "0xadeb52b604e5f77faaac88275b8d6b49e9f9f97f": "2089268000000000000000", + "0xd53c567f0c3ff2e08b7d59e2b5c73485437fc58d": "600000000000000000000", + "0xfbf75933e01b75b154ef0669076be87f62dffae1": "78000000000000000000000", + "0x7dfd2962b575bcbeee97f49142d63c30ab009f66": "4000000000000000000000", + "0xdf6485c4297ac152b289b19dde32c77ec417f47d": "1000000000000000000000", + "0xffb974673367f5c07be5fd270dc4b7138b074d57": "2470407000000000000000", + "0xf7d7af204c56f31fd94398e40df1964bd8bf123c": "150011000000000000000", + "0x4506fe19fa4b006baa3984529d8516db2b2b50ab": "2000000000000000000000", + "0xf4dc7ba85480bbb3f535c09568aaa3af6f3721c6": "7214962000000000000000", + "0xd171c3f2258aef35e599c7da1aa07300234da9a6": "2000000000000000000000", + "0x33581cee233088c0860d944e0cf1ceabb8261c2e": "13370000000000000000", + "0x1c2e3607e127caca0fbd5c5948adad7dd830b285": "19700000000000000000000", + "0xfd7ede8f5240a06541eb699d782c2f9afb2170f6": "1337000000000000000000", + "0x368c5414b56b8455171fbf076220c1cba4b5ca31": "557940000000000000000", + "0x3e8745ba322f5fd6cb50124ec46688c7a69a7fae": "4925000000000000000000", + "0x76506eb4a780c951c74a06b03d3b8362f0999d71": "500000000000000000000", + "0x96d62dfd46087f62409d93dd606188e70e381257": "2000000000000000000000", + "0x37eada93c475ded2f7e15e7787d400470fa52062": "200000000000000000000", + "0x26babf42b267fdcf3861fdd4236a5e474848b358": "1000000000000000000000", + "0x3526eece1a6bdc3ee7b400fe935b48463f31bed7": "82400000000000000000", + "0x27b62816e1e3b8d19b79d1513d5dfa855b0c3a2a": "99941000000000000000", + "0xb3e3c439069880156600c2892e448d4136c92d9b": "850000000000000000000", + "0x574ad9355390e4889ef42acd138b2a27e78c00ae": "1557000000000000000000", + "0xf0b9d683cea12ba600baace219b0b3c97e8c00e4": "100000000000000000000", + "0xa437fe6ec103ca8d158f63b334224eccac5b3ea3": "8000000000000000000000", + "0x7a48d877b63a8f8f9383e9d01e53e80c528e955f": "8000000000000000000000", + "0xe965daa34039f7f0df62375a37e5ab8a72b301e7": "4796000000000000000000", + "0x72cd048a110574482983492dfb1bd27942a696ba": "2000000000000000000000", + "0x6611ce59a98b072ae959dc49ad511daaaaa19d6b": "200000000000000000000", + "0x0d92582fdba05eabc3e51538c56db8813785b328": "191000000000000000000", + "0xe87e9bbfbbb71c1a740c74c723426df55d063dd9": "7998000000000000000000", + "0x9c99a1da91d5920bc14e0cb914fdf62b94cb8358": "20000000000000000000000", + "0xfe8e6e3665570dff7a1bda697aa589c0b4e9024a": "2000000000000000000000", + "0x811461a2b0ca90badac06a9ea16e787b33b196cc": "164000000000000000000", + "0xd211b21f1b12b5096181590de07ef81a89537ead": "2000000000000000000000", + "0x01155057002f6b0d18acb9388d3bc8129f8f7a20": "1340000000000000000000", + "0x8ce22f9fa372449a420610b47ae0c8d565481232": "2000000000000000000000", + "0xe02b74a47628be315b1f76b315054ad44ae9716f": "4000000000000000000000", + "0x92a7c5a64362e9f842a23deca21035857f889800": "1999944000000000000000", + "0x5213f459e078ad3ab95a0920239fcf1633dc04ca": "2599989000000000000000", + "0xc9957ba94c1b29e5277ec36622704904c63dc023": "1923000000000000000000", + "0x6ac40f532dfee5118117d2ad352da77d4f6da2c8": "400000000000000000000", + "0xea1efb3ce789bedec3d67c3e1b3bc0e9aa227f90": "734000000000000000000", + "0xb01e389b28a31d8e4995bdd7d7c81beeab1e4119": "1000000000000000000000", + "0xee97aa8ac69edf7a987d6d70979f8ec1fbca7a94": "376000000000000000000", + "0x0fad05507cdc8f24b2be4cb7fa5d927ddb911b88": "3004447000000000000000", + "0xb6e8afd93dfa9af27f39b4df06076710bee3dfab": "25000000000000000000", + "0x7d0b255efb57e10f7008aa22d40e9752dfcf0378": "29944000000000000000", + "0xaef5b12258a18dec07d5ec2e316574919d79d6d6": "2000000000000000000000", + "0x63666755bd41b5986997783c13043008242b3cb5": "500000000000000000000", + "0x921f5261f4f612760706892625c75e7bce96b708": "2000000000000000000000", + "0x10e1e3377885c42d7df218522ee7766887c05e6a": "300031000000000000000", + "0x134163be9fbbe1c5696ee255e90b13254395c318": "200000000000000000000", + "0x870f15e5df8b0eabd02569537a8ef93b56785c42": "388000000000000000000", + "0x68eec1e288ac31b6eaba7e1fbd4f04ad579a6b5d": "2000000000000000000000", + "0x1a2694ec07cf5e4d68ba40f3e7a14c53f3038c6e": "1000073000000000000000", + "0xcd9b4cef73390c83a8fd71d7b540a7f9cf8b8c92": "90000000000000000000", + "0xc8de7a564c7f4012a6f6d10fd08f47890fbf07d4": "300000000000000000000", + "0xc0345b33f49ce27fe82cf7c84d141c68f590ce76": "1000000000000000000000", + "0xfe53b94989d89964da2061539526bbe979dd2ea9": "1930600000000000000000", + "0x14410fb310711be074a80883c635d0ef6afb2539": "2000000000000000000000", + "0x1d344e962567cb27e44db9f2fac7b68df1c1e6f7": "1940000000000000000000", + "0xfe016ec17ec5f10e3bb98ff4a1eda045157682ab": "375804000000000000000", + "0xe89da96e06beaf6bd880b378f0680c43fd2e9d30": "601400000000000000000", + "0x0fee81ac331efd8f81161c57382bb4507bb9ebec": "400030000000000000000", + "0x40cf90ef5b768c5da585002ccbe6617650d8e837": "999800000000000000000", + "0x256fa150cc87b5056a07d004efc84524739e62b5": "200000000000000000000", + "0x1b9b2dc2960e4cb9408f7405827c9b59071612fd": "1000000000000000000000", + "0x0efd1789eb1244a3dede0f5de582d8963cb1f39f": "1500000000000000000000", + "0x049c5d4bc6f25d4e456c697b52a07811ccd19fb1": "300048000000000000000", + "0x02b7b1d6b34ce053a40eb65cd4a4f7dddd0e9f30": "685000000000000000000", + "0xc1827686c0169485ec15b3a7c8c01517a2874de1": "40000000000000000000", + "0xd8e5c9675ef4deed266b86956fc4590ea7d4a27d": "1000000000000000000000", + "0x48f883e567b436a27bb5a3124dbc84dec775a800": "771840000000000000000", + "0xa34076f84bd917f20f8342c98ba79e6fb08ecd31": "4200000000000000000000", + "0x21ce6d5b9018cec04ad6967944bea39e8030b6b8": "20000000000000000000", + "0x0596a27dc3ee115fce2f94b481bc207a9e261525": "1000000000000000000000", + "0x717cf9beab3638308ded7e195e0c86132d163fed": "15097428000000000000000", + "0xd5ce55d1b62f59433c2126bcec09bafc9dfaa514": "197000000000000000000", + "0x7dd46da677e161825e12e80dc446f58276e1127c": "820000000000000000000", + "0x98c5494a03ac91a768dffc0ea1dde0acbf889019": "200000000000000000000000", + "0x617ff2cc803e31c9082233b825d025be3f7b1056": "1970000000000000000000", + "0x1091176be19b9964a8f72e0ece6bf8e3cfad6e9c": "10020000000000000000000", + "0x4ea56e1112641c038d0565a9c296c463afefc17e": "182000000000000000000", + "0xe303167f3d4960fe881b32800a2b4aeff1b088d4": "2000000000000000000000", + "0x773141127d8cf318aebf88365add3d5527d85b6a": "1000076000000000000000", + "0xb916b1a01cdc4e56e7657715ea37e2a0f087d106": "2406017000000000000000", + "0x46a430a2d4a894a0d8aa3feac615361415c3f81f": "2000000000000000000000", + "0xe6a3010f0201bc94ff67a2f699dfc206f9e76742": "879088000000000000000", + "0xd7ad09c6d32657685355b5c6ec8e9f57b4ebb982": "1970000000000000000000", + "0x95e80a82c20cbe3d2060242cb92d735810d034a2": "32511000000000000000", + "0x9a390162535e398877e416787d6239e0754e937c": "1000000000000000000000", + "0xd85fdeaf2a61f95db902f9b5a53c9b8f9266c3ac": "2010000000000000000000", + "0xc3e20c96df8d4e38f50b265a98a906d61bc51a71": "2000000000000000000000", + "0x2949fd1def5c76a286b3872424809a07db3966f3": "5236067000000000000000", + "0x86cdb7e51ac44772be3690f61d0e59766e8bfc18": "4000000000000000000000", + "0x749a4a768b5f237248938a12c623847bd4e688dc": "72000000000000000000", + "0x3524a000234ebaaf0789a134a2a417383ce5282a": "5635000000000000000000", + "0x7b43c7eea8d62355b0a8a81da081c6446b33e9e0": "4000000000000000000000", + "0x0eb189ef2c2d5762a963d6b7bdf9698ea8e7b48a": "1337000000000000000000", + "0x767fd7797d5169a05f7364321c19843a8c348e1e": "18800000000000000000", + "0x1b2639588b55c344b023e8de5fd4087b1f040361": "1500000000000000000000", + "0x1e33d1c2fb5e084f2f1d54bc5267727fec3f985d": "500000000000000000000", + "0x06b106649aa8c421ddcd1b8c32cd0418cf30da1f": "40000000000000000000000", + "0x3c5a241459c6abbf630239c98a30d20b8b3ac561": "157600000000000000000", + "0x0f4f94b9191bb7bb556aaad7c74ddb288417a50b": "1400000000000000000000", + "0xd6f4a7d04e8faf20e8c6eb859cf7f78dd23d7a15": "131784000000000000000", + "0x61adf5929a5e2981684ea243baa01f7d1f5e148a": "110302000000000000000", + "0x8f58d8348fc1dc4e0dd8343b6543c857045ee940": "13632400000000000000000", + "0xa6e3baa38e104a1e27a4d82869afb1c0ae6eff8d": "19690000000000000000", + "0x67350b5331926f5e28f3c1e986f96443809c8b8c": "352000000000000000000", + "0x0b5d66b13c87b392e94d91d5f76c0d450a552843": "2000000000000000000000", + "0x562a8dcbbeeef7b360685d27303bd69e094accf6": "10000000000000000000000", + "0xb5d9934d7b292bcf603b2880741eb760288383a0": "16700000000000000000", + "0x6fc53662371dca587b59850de78606e2359df383": "180000000000000000000", + "0xe069c0173352b10bf6834719db5bed01adf97bbc": "18894000000000000000", + "0x10a93457496f1108cd98e140a1ecdbae5e6de171": "399600000000000000000", + "0x69ff8901b541763f817c5f2998f02dcfc1df2997": "40000000000000000000", + "0x00c27d63fde24b92ee8a1e7ed5d26d8dc5c83b03": "2000000000000000000000", + "0x77f81b1b26fc84d6de97ef8b9fbd72a33130cc4a": "1000000000000000000000", + "0x6d20ef9704670a500bb269b5832e859802049f01": "130000000000000000000", + "0x186afdc085f2a3dce4615edffbadf71a11780f50": "200000000000000000000", + "0x7ff0c63f70241bece19b737e5341b12b109031d8": "346000000000000000000", + "0x9d4174aa6af28476e229dadb46180808c67505c1": "1219430000000000000000", + "0x5fec49c665e64ee89dd441ee74056e1f01e92870": "6320000000000000000000", + "0x6cd228dc712169307fe27ceb7477b48cfc8272e5": "77600000000000000000", + "0xfd918536a8efa6f6cefe1fa1153995fef5e33d3b": "500000000000000000000", + "0x2fbb504a5dc527d3e3eb0085e2fc3c7dd538cb7a": "1249961000000000000000", + "0x6ab323ae5056ed0a453072c5abe2e42fcf5d7139": "880000000000000000000", + "0x67d682a282ef73fb8d6e9071e2614f47ab1d0f5e": "1000000000000000000000", + "0x1858cf11aea79f5398ad2bb22267b5a3c952ea74": "9850000000000000000000", + "0x39d6caca22bccd6a72f87ee7d6b59e0bde21d719": "2002000000000000000000", + "0xdaa63cbda45dd487a3f1cd4a746a01bb5e060b90": "4797800000000000000000", + "0xa90476e2efdfee4f387b0f32a50678b0efb573b5": "10000000000000000000000", + "0xae5aa1e6c2b60f6fd3efe721bb4a719cbe3d6f5d": "795860000000000000000", + "0xac2e766dac3f648f637ac6713fddb068e4a4f04d": "197000000000000000000", + "0x6191ddc9b64a8e0890b4323709d7a07c48b92a64": "775000000000000000000", + "0xcc4f0ff2aeb67d54ce3bc8c6510b9ae83e9d328b": "400000000000000000000", + "0xca23f62dff0d6460036c62e840aec5577e0befd2": "140800000000000000000", + "0x97dc26ec670a31e0221d2a75bc5dc9f90c1f6fd4": "50000000000000000000", + "0x848c994a79003fe7b7c26cc63212e1fc2f9c19eb": "2000000000000000000000", + "0x20c284ba10a20830fc3d699ec97d2dfa27e1b95e": "2000000000000000000000", + "0x4fa3f32ef4086448b344d5f0a9890d1ce4d617c3": "1500000000000000000000", + "0x255abc8d08a096a88f3d6ab55fbc7352bddcb9ce": "82161000000000000000", + "0x7c60e51f0be228e4d56fdd2992c814da7740c6bc": "200000000000000000000", + "0x1c356cfdb95febb714633b28d5c132dd84a9b436": "25000000000000000000", + "0x5062e5134c612f12694dbd0e131d4ce197d1b6a4": "1000000000000000000000", + "0xed862616fcbfb3becb7406f73c5cbff00c940755": "1700000000000000000000", + "0x62c9b271ffd5b770a5eee4edc9787b5cdc709714": "2000000000000000000000", + "0x3c925619c9b33144463f0537d896358706c520b0": "2000000000000000000000", + "0xffe2e28c3fb74749d7e780dc8a5d422538e6e451": "253319000000000000000", + "0x37195a635dcc62f56a718049d47e8f9f96832891": "1970000000000000000000", + "0x90e9a9a82edaa814c284d232b6e9ba90701d4952": "100007000000000000000", + "0xe0c4ab9072b4e6e3654a49f8a8db026a4b3386a9": "2000000000000000000000", + "0x439dee3f7679ff1030733f9340c096686b49390b": "2000000000000000000000", + "0x548558d08cfcb101181dac1eb6094b4e1a896fa6": "1999944000000000000000", + "0x3090f8130ec44466afadb36ed3c926133963677b": "4000000000000000000000", + "0xd1648503b1ccc5b8be03fa1ec4f3ee267e6adf7b": "5828000000000000000000", + "0x65b42faecc1edfb14283ca979af545f63b30e60c": "18200000000000000000", + "0x6420f8bcc8164a6152a99d6b99693005ccf7e053": "999972000000000000000", + "0x84b4b74e6623ba9d1583e0cfbe49643f16384149": "20000000000000000000", + "0xb8310a16cc6abc465007694b930f978ece1930bd": "740000000000000000000", + "0x16019a4dafab43f4d9bf4163fae0847d848afca2": "25060000000000000000", + "0x479298a9de147e63a1c7d6d2fce089c7e64083bd": "9999999000000000000000", + "0x030973807b2f426914ad00181270acd27b8ff61f": "5348000000000000000000", + "0xb07bcf1cc5d4462e5124c965ecf0d70dc27aca75": "1600000000000000000000", + "0xa2f798e077b07d86124e1407df32890dbb4b6379": "200000000000000000000", + "0x0cbd921dbe121563b98a6871fecb14f1cc7e88d7": "200000000000000000000", + "0x6042276df2983fe2bc4759dc1943e18fdbc34f77": "1970000000000000000000", + "0xbe2b2280523768ea8ac35cd9e888d60a719300d4": "2000000000000000000000", + "0x2f4da753430fc09e73acbccdcde9da647f2b5d37": "200000000000000000000", + "0x734223d27ff23e5906caed22595701bb34830ca1": "2000000000000000000000", + "0x5b430d779696a3653fc60e74fbcbacf6b9c2baf1": "14000000000000000000000", + "0x84232107932b12e03186583525ce023a703ef8d9": "2000000000000000000000", + "0x4ed14d81b60b23fb25054d8925dfa573dcae6168": "340000000000000000000", + "0x8b338411f26ccf37658cc75521d77629099e467d": "2000000000000000000000", + "0xa37622ac9bbdc4d82b75015d745b9f8de65a28ec": "2910000000000000000000", + "0x1dd77441844afe9cc18f15d8c77bccfb655ee034": "4850000000000000000000", + "0x65849be1af20100eb8a3ba5a5be4d3ae8db5a70e": "400000000000000000000", + "0xd5586da4e59583c8d86cccf71a86197f17996749": "2000000000000000000000", + "0x4b53ae59c784b6b5c43616b9a0809558e684e10c": "1200000000000000000000", + "0x55d42eb495bf46a634997b5f2ea362814918e2b0": "106128000000000000000", + "0x959ff17f1d51b473b44010052755a7fa8c75bd54": "1970000000000000000000", + "0x5a2daab25c31a61a92a4c82c9925a1d2ef58585e": "225400000000000000000", + "0x24c0c88b54a3544709828ab4ab06840559f6c5e2": "2674000000000000000000", + "0x7e8649e690fc8c1bfda1b5e186581f649b50fe33": "98500000000000000000", + "0x4acfa9d94eda6625c9dfa5f9f4f5d107c4031fdf": "39400000000000000000", + "0x5778ffdc9b94c5a59e224eb965b6de90f222d170": "335320000000000000000", + "0x825a7f4e10949cb6f8964268f1fa5f57e712b4c4": "20000000000000000000", + "0x6f39cc37caaa2ddc9b610f6131e0619fae772a3c": "500000000000000000000", + "0x5b437365ae3a9a2ff97c68e6f90a7620188c7d19": "2002000000000000000000", + "0x6710c2c03c65992b2e774be52d3ab4a6ba217ef7": "11600000000000000000000", + "0x896e335ca47af57962fa0f4dbf3e45e688cba584": "1368500000000000000000", + "0xb57549bfbc9bdd18f736b22650e48a73601fa65c": "446000000000000000000", + "0x85ca1e727e9d1a87991cc2c41840ebb9edf21d1b": "13370000000000000000", + "0xcf4166746e1d3bc1f8d0714b01f17e8a62df1464": "1004700000000000000000", + "0x4a75c3d4fa6fccbd5dd5a703c15379a1e783e9b7": "1820000000000000000000", + "0x9e5811b40be1e2a1e1d28c3b0774acde0a09603d": "3000000000000000000000", + "0x763886e333c56feff85be3951ab0b889ce262e95": "2000000000000000000000", + "0x2b101e822cd962962a06800a2c08d3b15d82b735": "152000000000000000000", + "0xa01e9476df84431825c836e8803a97e22fa5a0cd": "6000000000000000000000", + "0xbe4e7d983f2e2a636b1102ec7039efebc842e98d": "66000000000000000000", + "0x9e427272516b3e67d4fcbf82f59390d04c8e28e5": "4000000000000000000000", + "0xe0d231e144ec9107386c7c9b02f1702ceaa4f700": "5000057000000000000000", + "0x6a0f056066c2d56628850273d7ecb7f8e6e9129e": "5000016000000000000000", + "0xd1538e9a87e59ca9ec8e5826a5b793f99f96c4c3": "1000000000000000000000", + "0xf85bab1cb3710fc05fa19ffac22e67521a0ba21d": "2003000000000000000000", + "0xf7cbdba6be6cfe68dbc23c2b0ff530ee05226f84": "20000000000000000000", + "0x4eb87ba8788eba0df87e5b9bd50a8e45368091c1": "20000000000000000000", + "0x1479a9ec7480b74b5db8fc499be352da7f84ee9c": "1000000000000000000000", + "0xd311bcd7aa4e9b4f383ff3d0d6b6e07e21e3705d": "200000000000000000000", + "0x425c1816868f7777cc2ba6c6d28c9e1e796c52b3": "10000000000000000000000", + "0x8510ee934f0cbc900e1007eb38a21e2a5101b8b2": "106000000000000000000", + "0x01e864d354741b423e6f42851724468c74f5aa9c": "20000000000000000000000", + "0xa543a066fb32a8668aa0736a0c9cd40d78098727": "1000000000000000000000", + "0xf3eb1948b951e22df1617829bf3b8d8680ec6b68": "4000000000000000000000", + "0xf6b782f4dcd745a6c0e2e030600e04a24b25e542": "400000000000000000000", + "0x229f4f1a2a4f540774505b4707a81de44410255b": "2000000000000000000000", + "0xcff8d06b00e3f50c191099ad56ba6ae26571cd88": "1000000000000000000000", + "0x910b7d577a7e39aa23acf62ad7f1ef342934b968": "10000000000000000000000", + "0x392433d2ce83d3fb4a7602cca3faca4ec140a4b0": "51000000000000000000", + "0x8ff46045687723dc33e4d099a06904f1ebb584dc": "2000000000000000000000", + "0x9ca0429f874f8dcee2e9c062a9020a842a587ab9": "2000000000000000000000", + "0x160ceb6f980e04315f53c4fc988b2bf69e284d7d": "19100000000000000000", + "0xc340f9b91c26728c31d121d5d6fc3bb56d3d8624": "2000000000000000000000", + "0xafa1d5ad38fed44759c05b8993c1aa0dace19f40": "80000000000000000000", + "0x3969b4f71bb8751ede43c016363a7a614f76118e": "2000000000000000000000", + "0x2bb6f578adfbe7b2a116b3554facf9969813c319": "7400000000000000000000", + "0x8334764b7b397a4e578f50364d60ce44899bff94": "92500000000000000000", + "0x9dd2196624a1ddf14a9d375e5f07152baf22afa2": "1211747000000000000000", + "0xf242da845d42d4bf779a00f295b40750fe49ea13": "1000000000000000000000", + "0xc6234657a807384126f8968ca1708bb07baa493c": "20000000000000000000", + "0x94c055e858357aaa30cf2041fa9059ce164a1f91": "19999000000000000000000", + "0x74c73c90528a157336f1e7ea20620ae53fd24728": "8969310000000000000000", + "0x19e7f3eb7bf67f3599209ebe08b62ad3327f8cde": "2000000000000000000000", + "0xb2b516fdd19e7f3864b6d2cf1b252a4156f1b03b": "53720000000000000000", + "0x8164e78314ae16b28926cc553d2ccb16f356270d": "8450000000000000000000", + "0x4d828894752f6f25175daf2177094487954b6f9f": "1459683000000000000000", + "0xab84a0f147ad265400002b85029a41fc9ce57f85": "1000000000000000000000", + "0xf3fe51fde34413c73318b9c85437fe7e820f561a": "1003200000000000000000", + "0x16c7b31e8c376282ac2271728c31c95e35d952c3": "2000000000000000000000", + "0x80d5c40c59c7f54ea3a55fcfd175471ea35099b3": "1000000000000000000000", + "0x7abb10f5bd9bc33b8ec1a82d64b55b6b18777541": "20000000000000000000000", + "0x095b0ea2b218d82e0aea7c2889238a39c9bf9077": "20000000000000000000000", + "0x5d5cdbe25b2a044b7b9be383bcaa5807b06d3c6b": "2000000000000000000000", + "0x323749a3b971959e46c8b4822dcafaf7aaf9bd6e": "20064000000000000000", + "0xe0272213e8d2fd3e96bd6217b24b4ba01b617079": "20000000000000000000", + "0x00acbfb2f25a5485c739ef70a44eeeeb7c65a66f": "100000000000000000000", + "0x52f15423323c24f19ae2ab673717229d3f747d9b": "1026115000000000000000", + "0xcb4abfc282aed76e5d57affda542c1f382fcacf4": "8136100000000000000000", + "0xf71b4534f286e43093b1e15efea749e7597b8b57": "104410000000000000000000", + "0x44cd77535a893fa7c4d5eb3a240e79d099a72d2d": "820000000000000000000", + "0xeb3ce7fc381c51db7d5fbd692f8f9e058a4c703d": "200000000000000000000", + "0xf1c8c4a941b4628c0d6c30fda56452d99c7e1b64": "1449000000000000000000", + "0x277677aba1e52c3b53bfa2071d4e859a0af7e8e1": "1000000000000000000000", + "0xa5f075fd401335577b6683c281e6d101432dc6e0": "2680000000000000000000", + "0xe28dbc8efd5e416a762ec0e018864bb9aa83287b": "24533161000000000000000", + "0x2b717cd432a323a4659039848d3b87de26fc9546": "500000000000000000000000", + "0xb358e97c70b605b1d7d729dfb640b43c5eafd1e7": "20000000000000000000000", + "0x293c2306df3604ae4fda0d207aba736f67de0792": "200000000000000000000", + "0x74d366b07b2f56477d7c7077ac6fe497e0eb6559": "5000000000000000000000", + "0x490145afa8b54522bb21f352f06da5a788fa8f1d": "9231182000000000000000", + "0x862569211e8c6327b5415e3a67e5738b15baaf6e": "140000000000000000000", + "0x5a74ba62e7c81a3474e27d894fed33dd24ad95fe": "18200000000000000000", + "0x536e4d8029b73f5579dca33e70b24eba89e11d7e": "1970000000000000000000", + "0x25c6e74ff1d928df98137af4df8430df24f07cd7": "390000000000000000000", + "0x19b36b0c87ea664ed80318dc77b688dde87d95a5": "1948386000000000000000", + "0xabc4caeb474d4627cb6eb456ecba0ecd08ed8ae1": "3940000000000000000000", + "0x8ea656e71ec651bfa17c5a5759d86031cc359977": "100000000000000000000", + "0x8d620bde17228f6cbba74df6be87264d985cc179": "100000000000000000000", + "0xb2aa2f1f8e93e79713d92cea9ffce9a40af9c82d": "2000000000000000000000", + "0x198ef1ec325a96cc354c7266a038be8b5c558f67": "608334724000000000000000", + "0x6a13d5e32c1fd26d7e91ff6e053160a89b2c8aad": "53480000000000000000", + "0xe056bf3ff41c26256fef51716612b9d39ade999c": "100009000000000000000", + "0x2c128c95d957215101f043dd8fc582456d41016d": "835000000000000000000", + "0x2560b09b89a4ae6849ed5a3c9958426631714466": "1700000000000000000000", + "0xd3d6e9fb82542fd29ed9ea3609891e151396b6f7": "54000000000000000000000", + "0xa7607b42573bb6f6b4d4f23c7e2a26b3a0f6b6f0": "1610000000000000000000", + "0x020362c3ade878ca90d6b2d889a4cc5510eed5f3": "1042883000000000000000", + "0x14830704e99aaad5c55e1f502b27b22c12c91933": "620000000000000000000", + "0x8030b111c6983f0485ddaca76224c6180634789f": "80000000000000000000", + "0x2c5b7d7b195a371bf9abddb42fe04f2f1d9a9910": "200000000000000000000", + "0x77d43fa7b481dbf3db530cfbf5fdced0e6571831": "2000000000000000000000", + "0x2d90b415a38e2e19cdd02ff3ad81a97af7cbf672": "109800000000000000000", + "0x2fc82ef076932341264f617a0c80dd571e6ae939": "7160000000000000000000", + "0xdfe549fe8430e552c6d07cc3b92ccd43b12fb50f": "83620000000000000000", + "0x1e8e689b02917cdc29245d0c9c68b094b41a9ed6": "2000000000000000000000", + "0x21c3a8bba267c8cca27b1a9afabad86f607af708": "8940000000000000000000", + "0x143c639752caeecf6a997d39709fc8f19878c7e8": "1970000000000000000000", + "0x02603d7a3bb297c67c877e5d34fbd5b913d4c63a": "20000000000000000000", + "0xa166f911c644ac3213d29e0e1ae010f794d5ad26": "2000000000000000000000", + "0x6eb3819617404058268f0c3cff3596bfe9148c1c": "1670000000000000000000", + "0x7a67dd043a504fc2f2fc7194e9becf484cecb1fb": "250000000000000000000", + "0xf824ee331e4ac3cc587693395b57ecf625a6c0c2": "1600930000000000000000", + "0x1179c60dbd068b150b074da4be23033b20c68558": "680000000000000000000", + "0xd2a479404347c5543aab292ae1bb4a6f158357fa": "4000000000000000000000", + "0xb0d32bd7e4e695b7b01aa3d0416f80557dba9903": "16300000000000000000000", + "0xf734ec03724ddee5bb5279aa1afcf61b0cb448a1": "4238080000000000000000", + "0xc04069dfb18b096c7867f8bee77a6dc7477ad062": "2674000000000000000000", + "0x80c53ee7e3357f94ce0d7868009c208b4a130125": "2000000000000000000000", + "0x0f32d9cb4d0fdaa0150656bb608dcc43ed7d9301": "753978000000000000000", + "0x6ddb6092779d5842ead378e21e8120fd4c6bc132": "2000000000000000000000", + "0x82ea01e3bf2e83836e71704e22a2719377efd9c3": "3040000000000000000000", + "0x44c1110b18870ec81178d93d215838c551d48e64": "199958000000000000000", + "0x7727af101f0aaba4d23a1cafe17c6eb5dab1c6dc": "2000000000000000000000", + "0xa11a03c4bb26d21eff677d5d555c80b25453ee7a": "69979000000000000000", + "0x19e5dea3370a2c746aae34a37c531f41da264e83": "200000000000000000000", + "0xc325c352801ba883b3226c5feb0df9eae2d6e653": "3940000000000000000000", + "0xae5055814cb8be0c117bb8b1c8d2b63b4698b728": "32035000000000000000", + "0xdeb1bc34d86d4a4dde2580d8beaf074eb0e1a244": "1580000000000000000000", + "0x558360206883dd1b6d4a59639e5629d0f0c675d0": "2000000000000000000000", + "0xa9d6f871ca781a759a20ac3adb972cf12829a208": "925000000000000000000", + "0xb0ac4eff6680ee14169cdadbffdb30804f6d25f5": "2000000000000000000000", + "0xf1b58faffa8794f50af8e88309c7a6265455d51a": "999800000000000000000", + "0xa61a54df784a44d71b771b87317509211381f200": "1000000000000000000000", + "0xbaa4b64c2b15b79f5f204246fd70bcbd86e4a92a": "500000000000000000000", + "0xa20d8ff60caae31d02e0b665fa435d76f77c9442": "489600000000000000000", + "0xf3e74f470c7d3a3f0033780f76a89f3ef691e6cb": "3021800000000000000000", + "0xd330728131fe8e3a15487a34573c93457e2afe95": "4000000000000000000000", + "0x9af9dbe47422d177f945bdead7e6d82930356230": "3940000000000000000000", + "0x0eb5b662a1c718608fd52f0c25f9378830178519": "6091400000000000000000", + "0xfda6810ea5ac985d6ffbf1c511f1c142edcfddf7": "4000000000000000000000", + "0x832c54176bdf43d2c9bcd7b808b89556b89cbf31": "200000000000000000000", + "0x704d5de4846d39b53cd21d1c49f096db5c19ba29": "152000000000000000000", + "0x344a8db086faed4efc37131b3a22b0782dad7095": "500000000000000000000", + "0x8c7fa5cae82fedb69ab189d3ff27ae209293fb93": "400030000000000000000", + "0xad660dec825522a9f62fcec3c5b731980dc286ea": "3000000000000000000000", + "0x13b9b10715714c09cfd610cf9c9846051cb1d513": "1970000000000000000000", + "0x40467d80e74c35407b7db51789234615fea66818": "388000000000000000000", + "0x30e9d5a0088f1ddb2fd380e2a049192266c51cbf": "196910000000000000000", + "0xb2d1e99af91231858e7065dd1918330dc4c747d5": "16700000000000000000000", + "0x9f21302ca5096bea7402b91b0fd506254f999a3d": "1246832000000000000000", + "0xd24b6644f439c8051dfc64d381b8c86c75c17538": "2000000000000000000000", + "0x8228ebc087480fd64547ca281f5eace3041453b9": "1970000000000000000000", + "0x29da3e35b23bb1f72f8e2258cf7f553359d24bac": "20000000000000000000000", + "0xc8e558a3c5697e6fb23a2594c880b7a1b68f9860": "10000000000000000000000", + "0x6b951a43274eeafc8a0903b0af2ec92bf1efc839": "100000000000000000000", + "0xd015f6fcb84df7bb410e8c8f04894a881dcac237": "1038000000000000000000", + "0x6ccb03acf7f53ce87aadcc21a9932de915f89804": "8000000000000000000000", + "0x388c85a9b9207d8146033fe38143f6d34b595c47": "200000000000000000000", + "0x429c06b487e8546abdfc958a25a3f0fba53f6f00": "13503000000000000000", + "0x771507aeee6a255dc2cd9df55154062d0897b297": "334250000000000000000", + "0x5a2b1c853aeb28c45539af76a00ac2d8a8242896": "25000000000000000000", + "0xf4d67a9044b435b66e8977ff39a28dc4bd53729a": "200000000000000000000", + "0x063759dd1c4e362eb19398951ff9f8fad1d31068": "10000000000000000000000", + "0xcb58990bcd90cfbf6d8f0986f6fa600276b94e2d": "999925000000000000000", + "0x6df5c84f7b909aab3e61fe0ecb1b3bf260222ad2": "4000000000000000000000", + "0xdeb2495d6aca7b2a6a2d138b6e1a42e2dc311fdd": "2000000000000000000000", + "0x59203cc37599b648312a7cc9e06dacb589a9ae6a": "148689000000000000000", + "0xfc9b347464b2f9929d807e039dae48d3d98de379": "14000000000000000000000", + "0x48d2434b7a7dbbff08223b6387b05da2e5093126": "18000000000000000000000", + "0xc9d76446d5aadff80b68b91b08cd9bc8f5551ac1": "714000000000000000000", + "0x3d31587b5fd5869845788725a663290a49d3678c": "500000000000000000000", + "0xd8715ef9176f850b2e30eb8e382707f777a6fbe9": "2000000000000000000000", + "0x2c2147947ae33fb098b489a5c16bfff9abcd4e2a": "200000000000000000000", + "0xd6c0d0bc93a62e257174700e10f024c8b23f1f87": "2000000000000000000000", + "0xd1978f2e34407fab1dc2183d95cfda6260b35982": "788000000000000000000", + "0x1bf974d9904f45ce81a845e11ef4cbcf27af719e": "100000000000000000000", + "0x6e761eaa0f345f777b5441b73a0fa5b56b85f22d": "2000000000000000000000", + "0xea60436912de6bf187d3a472ff8f5333a0f7ed06": "19700000000000000000", + "0x94f8f057db7e60e675ad940f155885d1a477348e": "401100000000000000000", + "0x8933491760c8f0b4df8caac78ed835caee21046d": "20000000000000000000000", + "0xa7775e4af6a23afa201fb78b915e51a515b7a728": "120000000000000000000", + "0xd8d64384249b776794063b569878d5e3b530a4b2": "177569000000000000000", + "0xbe633a3737f68439bac7c90a52142058ee8e8a6f": "960000000000000000000", + "0x90bd62a050845261fa4a9f7cf241ea630b05efb8": "500000000000000000000", + "0x552987f0651b915b2e1e5328c121960d4bdd6af4": "1790000000000000000000", + "0x0baf6ecdb91acb3606a8357c0bc4f45cfd2d7e6f": "1000000000000000000000", + "0x9e5a311d9f69898a7c6a9d6360680438e67a7b2f": "1490000000000000000000", + "0x78859c5b548b700d9284cee4b6633c2f52e529c2": "2955000000000000000000", + "0xd572309169b1402ec8131a17a6aac3222f89e6eb": "13800000000000000000000", + "0x8e6d7485cbe990acc1ad0ee9e8ccf39c0c93440e": "955000000000000000000", + "0x75c11d024d12ae486c1095b7a7b9c4af3e8edeb9": "20000000000000000000", + "0x903413878aea3bc1086309a3fe768b65559e8cab": "8000000000000000000000", + "0x6d0569e5558fc7df2766f2ba15dc8aeffc5beb75": "4001070000000000000000", + "0x3815b0743f94fc8cc8654fd9d597ed7d8b77c57e": "738578000000000000000", + "0x0f26480a150961b8e30750713a94ee6f2e47fc00": "1000000000000000000000", + "0xede5de7c7fb7eee0f36e64530a41440edfbefacf": "617200000000000000000", + "0x763a7cbab70d7a64d0a7e52980f681472593490c": "600000000000000000000", + "0x6e270ad529f1f0b8d9cb6d2427ec1b7e2dc64a74": "200000000000000000000", + "0xeb3bdd59dcdda5a9bb2ac1641fd02180f5f36560": "6600000000000000000000", + "0xf4ebf50bc7e54f82e9b9bd24baef29438e259ce6": "10000000000000000000000", + "0x882c8f81872c79fed521cb5f950d8b032322ea69": "40000000000000000000000", + "0x394132600f4155e07f4d45bc3eb8d9fb72dcd784": "2941000000000000000000", + "0x0be2b94ad950a2a62640c35bfccd6c67dae450f6": "1940000000000000000000", + "0xd4c6ac742e7c857d4a05a04c33d4d05c1467571d": "200000000000000000000", + "0x1fddd85fc98be9c4045961f40f93805ecc4549e5": "164000000000000000000", + "0x534065361cb854fac42bfb5c9fcde0604ac919da": "2000000000000000000000", + "0x9a6ff5f6a7af7b7ae0ed9c20ecec5023d281b786": "2547000000000000000000", + "0x4f3a4854911145ea01c644044bdb2e5a960a982f": "4000000000000000000000", + "0x00497e92cdc0e0b963d752b2296acb87da828b24": "194800000000000000000", + "0x4ff67fb87f6efba9279930cfbd1b7a343c79fade": "400000000000000000000", + "0x62f2e5ccecd52cc4b95e0597df27cc079715608c": "143000000000000000000", + "0x1eda084e796500ba14c5121c0d90846f66e4be62": "534800000000000000000", + "0x9836b4d30473641ab56aeee19242761d72725178": "2000000000000000000000", + "0xde55de0458f850b37e4d78a641dd2eb2dd8f38ce": "4000000000000000000000", + "0x140ca28ff33b9f66d7f1fc0078f8c1eef69a1bc0": "1600000000000000000000", + "0x2014261f01089f53795630ba9dd24f9a34c2d942": "1337000000000000000000", + "0x11415fab61e0dfd4b90676141a557a869ba0bde9": "2048000000000000000000", + "0x88344909644c7ad4930fd873ca1c0da2d434c07f": "131970000000000000000", + "0x88b217ccb786a254cf4dc57f5d9ac3c455a30483": "925000000000000000000", + "0xdfdbcec1014b96da2158ca513e9c8d3b9af1c3d0": "2000000000000000000000", + "0x1ba9f7997e5387b6b2aa0135ac2452fe36b4c20d": "850000000000000000000", + "0xd70ad2c4e9eebfa637ef56bd486ad2a1e5bce093": "200000000000000000000", + "0x9ce27f245e02d1c312c1d500788c9def7690453b": "200000000000000000000", + "0x8234f463d18485501f8f85ace4972c9b632dbccc": "2000000000000000000000", + "0x994152fc95d5c1ca8b88113abbad4d710e40def6": "500000000000000000000", + "0xe5b980d28eece2c06fca6c9473068b37d4a6d6e9": "695200000000000000000", + "0x2d426912d059fad9740b2e390a2eeac0546ff01b": "1400000000000000000000", + "0x6d9997509882027ea947231424bedede2965d0ba": "2001600000000000000000", + "0x167ce7de65e84708595a525497a3eb5e5a665073": "575400000000000000000", + "0xe430c0024fdbf73a82e21fccf8cbd09138421c21": "4000000000000000000000", + "0x2e52912bc10ea39d54e293f7aed6b99a0f4c73be": "400000000000000000000", + "0x12cf8b0e465213211a5b53dfb0dd271a282c12c9": "15200000000000000000", + "0x06964e2d17e9189f88a8203936b40ac96e533c06": "18200000000000000000", + "0x66b1a63da4dcd9f81fe54f5e3fcb4055ef7ec54f": "201412000000000000000", + "0x0a77e7f72b437b574f00128b21f2ac265133528c": "2000000000000000000000", + "0x78f5c74785c5668a838072048bf8b453594ddaab": "400000000000000000000", + "0x58e554af3d87629620da61d538c7f5b4b54c4afe": "1297081000000000000000", + "0x37a10451f36166cf643dd2de6c1cbba8a011cfa3": "380000000000000000000", + "0xfe9ad12ef05d6d90261f96c8340a0381974df477": "2000000000000000000000", + "0x057f7f81cd7a406fc45994408b5049912c566463": "1700000000000000000000", + "0x55a3df57b7aaec16a162fd5316f35bec082821cf": "1970000000000000000000", + "0xc0e0b903088e0c63f53dd069575452aff52410c3": "3000000000000000000000", + "0x63e88e2e539ffb450386b4e46789b223f5476c45": "6292000000000000000000", + "0x3727341f26c12001e378405ee38b2d8464ec7140": "2000000000000000000000", + "0xc96751656c0a8ef4357b7344322134b983504aca": "2000000000000000000000", + "0x1e060dc6c5f1cb8cc7e1452e02ee167508b56542": "12715500000000000000000", + "0x18136c9df167aa17b6f18e22a702c88f4bc28245": "4000000000000000000000", + "0x116108c12084612eeda7a93ddcf8d2602e279e5c": "2000000000000000000000", + "0xbbb643d2187b364afc10a6fd368d7d55f50d1a3c": "1000000000000000000000", + "0xec83e798c396b7a55e2a2224abcd834b27ea459c": "12000000000000000000000", + "0x973f4e361fe5decd989d4c8f7d7cc97990385daf": "388500000000000000000", + "0xc0f29ed0076611b5e55e130547e68a48e26df5e4": "3000000000000000000000", + "0xfd4b551f6fdbcda6c511b5bb372250a6b783e534": "20600000000000000000", + "0x144b19f1f66cbe318347e48d84b14039466c5909": "2000000000000000000000", + "0xbf183641edb886ce60b8190261e14f42d93cce01": "25019000000000000000", + "0x94db807873860aac3d5aea1e885e52bff2869954": "3220000000000000000000", + "0x7a74cee4fa0f6370a7894f116cd00c1147b83e59": "800000000000000000000", + "0xcd32a4a8a27f1cc63954aa634f7857057334c7a3": "1085000000000000000000", + "0x7cbeb99932e97e6e02058cfc62d0b26bc7cca52b": "2000000000000000000000", + "0x8cde8b732e6023878eb23ed16229124b5f7afbec": "133700000000000000000", + "0x45c4ecb4ee891ea984a7c5cefd8dfb00310b2850": "1980000000000000000000", + "0x8b393fb0813ee101db1e14ecc7d322c72b8c0473": "455578000000000000000", + "0x7b66126879844dfa34fe65c9f288117fefb449ad": "6000000000000000000000", + "0x162ba503276214b509f97586bd842110d103d517": "9002000000000000000000", + "0x7dece6998ae1900dd3770cf4b93812bad84f0322": "100000000000000000000", + "0xec0927bac7dc36669c28354ab1be83d7eec30934": "2000000000000000000000", + "0x8d7f3e61299c2db9b9c0487cf627519ed00a9123": "1742400000000000000000", + "0x4fc46c396e674869ad9481638f0013630c87caac": "1000000000000000000000", + "0xbf68d28aaf1eeefef646b65e8cc8d190f6c6da9c": "2000000000000000000000", + "0x00969747f7a5b30645fe00e44901435ace24cc37": "1700000000000000000000", + "0x494dec4d5ee88a2771a815f1ee7264942fb58b28": "2000000000000000000000", + "0xffeac0305ede3a915295ec8e61c7f881006f4474": "98500000000000000000", + "0xb39139576194a0866195151f33f2140ad1cc86cf": "100000000000000000000000", + "0xfead1803e5e737a68e18472d9ac715f0994cc2be": "500000000000000000000", + "0x698ab9a2f33381e07c0c47433d0d21d6f336b127": "20000000000000000000", + "0xe5edc73e626f5d3441a45539b5f7a398c593edf6": "865000000000000000000", + "0xdd4f5fa2111db68f6bde3589b63029395b69a92d": "158400000000000000000", + "0x8c93c3c6db9d37717de165c3a1b4fe51952c08de": "400000000000000000000", + "0xf87bb07b289df7301e54c0efda6a2cf291e89200": "1400000000000000000000", + "0xe7a4560c84b20e0fb54c49670c2903b0a96c42a4": "598000000000000000000", + "0x00a5797f52c9d58f189f36b1d45d1bf6041f2f6b": "5456900000000000000000", + "0x9da3302240af0511c6fd1857e6ddb7394f77ab6b": "3100000000000000000000", + "0x2c2d15ff39561c1b72eda1cc027ffef23743a144": "3920000000000000000000", + "0x9b4c2715780ca4e99e60ebf219f1590c8cad500a": "1600000000000000000000", + "0xff5e7ee7d5114821e159dca5e81f18f1bfffbff9": "2000000000000000000000", + "0x0169c1c210eae845e56840412e1f65993ea90fb4": "2000000000000000000000", + "0xabc45f84db7382dde54c5f7d8938c42f4f3a3bc4": "200000000000000000000", + "0xd9383d4b6d17b3f9cd426e10fb944015c0d44bfb": "800000000000000000000", + "0xc090fe23dcd86b358c32e48d2af91024259f6566": "200000000000000000000", + "0x9ffedcc36b7cc312ad2a9ede431a514fccb49ba3": "669800000000000000000", + "0x2ffe93ec1a5636e9ee34af70dff52682e6ff7079": "2000000000000000000000", + "0x6e01e4ad569c95d007ada30d5e2db12888492294": "4000000000000000000000", + "0xd4d92c62b280e00f626d8657f1b86166cb1f740f": "200028000000000000000", + "0x1d36683063b7e9eb99462dabd569bddce71686f2": "1000000000000000000000", + "0x3a48e0a7098b06a905802b87545731118e89f439": "2000000000000000000000", + "0xbd9e56e902f4be1fc8768d8038bac63e2acbbf8e": "999972000000000000000", + "0x4d67f2ab8599fef5fc413999aa01fd7fce70b43d": "10000000000000000000000", + "0x8e74e0d1b77ebc823aca03f119854cb12027f6d7": "107200000000000000000000", + "0x7e5b19ae1be94ff4dee635492a1b012d14db0213": "100000000000000000000", + "0x5de9e7d5d1b667d095dd34099c85b0421a0bc681": "20000000000000000000", + "0x316eb4e47df71b42e16d6fe46825b7327baf3124": "4000000000000000000000", + "0x772c297f0ad194482ee8c3f036bdeb01c201d5cc": "200000000000000000000", + "0xd7052519756af42590f15391b723a03fa564a951": "4615591000000000000000", + "0x2c6846a1aa999a2246a287056000ba4dcba8e63d": "10020000000000000000000", + "0xde5b005fe8daae8d1f05de3eda042066c6c4691c": "1100000000000000000000", + "0x254c1ecc630c2877de8095f0a8dba1e8bf1f550c": "1700000000000000000000", + "0xf8f226142a428434ab17a1864a2597f64aab2f06": "172473000000000000000", + "0xa6c910ce4d494a919ccdaaa1fc3b82aa74ba06cf": "8000000000000000000000", + "0xe587b16abc8a74081e3613e14342c03375bf0847": "2000000000000000000000", + "0x6f176065e88e3c6fe626267d18a088aaa4db80bc": "3520000000000000000000", + "0x50dcbc27bcad984093a212a9b4178eabe9017561": "145512000000000000000", + "0xe1953c6e975814c571311c34c0f6a99cdf48ab82": "50000000000000000000", + "0xbe0a2f385f09dbfce96732e12bb40ac349871ba8": "1610348000000000000000", + "0x4712540265cbeec3847022c59f1b318d43400a9e": "3500000000000000000000", + "0x29bdc4f28de0180f433c2694eb74f5504ce94337": "2000000000000000000000", + "0x2f66bfbf2262efcc8d2bd0444fc5b0696298ff1e": "9940000000000000000000", + "0x506411fd79003480f6f2b6aac26b7ba792f094b2": "500000000000000000000", + "0x23ea669e3564819a83b0c26c00a16d9e826f6c46": "1430590000000000000000", + "0xe3ffb02cb7d9ea5243701689afd5d417d7ed2ece": "78000000000000000000", + "0x38e7dba8fd4f1f850dbc2649d8e84f0952e3eb3c": "50000000000000000000", + "0x8644cc281be332ccced36da483fb2a0746d9ba2e": "400000000000000000000", + "0xe8a91da6cf1b9d65c74a02ec1f96eecb6dd241f3": "1940000000000000000000", + "0x0631dc40d74e5095e3729eddf49544ecd4396f67": "160000000000000000000", + "0x83c897a84b695eebe46679f7da19d776621c2694": "500000000000000000000", + "0xdb73460b59d8e85045d5e752e62559875e42502e": "999800000000000000000", + "0x0dd4e674bbadb1b0dc824498713dce3b5156da29": "170000000000000000000", + "0xe3933d61b77dcdc716407f8250bc91e4ffaeb09d": "86600000000000000000000", + "0x58c90754d2f20a1cb1dd330625e04b45fa619d5c": "2000000000000000000000", + "0x895ec5545644e0b78330fffab8ddeac9e833156c": "600000000000000000000", + "0x7e1e29721d6cb91057f6c4042d8a0bbc644afe73": "159800000000000000000", + "0x72b90a4dc097239492c5b9777dcd1e52ba2be2c2": "6000000000000000000000", + "0x64241a7844290e0ab855f1d4aa75b55345032224": "1600000000000000000000", + "0x6fd4e0f3f32bee6d3767fdbc9d353a6d3aab7899": "695240000000000000000", + "0x3a035594c747476d42d1ee966c36224cdd224993": "355890000000000000000", + "0xde97f4330700b48c496d437c91ca1de9c4b01ba4": "2910840000000000000000", + "0x716ad3c33a9b9a0a18967357969b94ee7d2abc10": "482000000000000000000", + "0xbfbe05e88c9cbbcc0e92a405fac1d85de248ee24": "100000000000000000000", + "0xcfc4e6f7f8b011414bfba42f23adfaa78d4ecc5e": "1850000000000000000000", + "0xd931ac2668ba6a84481ab139735aec14b7bfbabf": "2000000000000000000000", + "0xe3263ce8af6db3e467584502ed7109125eae22a5": "2000000000000000000000", + "0xf78258c12481bcdddbb72a8ca0c043097261c6c5": "20000000000000000000", + "0x4493123c021ece3b33b1a452c9268de14007f9d3": "6685000000000000000000", + "0x431f2c19e316b044a4b3e61a0c6ff8c104a1a12f": "1000000000000000000000", + "0xe63e787414b9048478a50733359ecdd7e3647aa6": "1580000000000000000000", + "0xe4715956f52f15306ee9506bf82bccc406b3895e": "274944000000000000000", + "0xf7f91e7acb5b8129a306877ce3168e6f438b66a1": "176000000000000000000", + "0xdcdbbd4e2604e40e1710cc6730289dccfad3892d": "4600000000000000000000", + "0x2b5f4b3f1e11707a227aa5e69fa49dded33fb321": "6000000000000000000000", + "0x01488ad3da603c4cdd6cb0b7a1e30d2a30c8fc38": "200000000000000000000", + "0x841145b44840c946e21dbc190264b8e0d5029369": "300000000000000000000000", + "0xbf05070c2c34219311c4548b2614a438810ded6d": "2000000000000000000000", + "0x38f387e1a4ed4a73106ef2b462e474e2e3143ad0": "6000000000000000000000", + "0xf116b0b4680f53ab72c968ba802e10aa1be11dc8": "20000000000000000000", + "0xbea0afc93aae2108a3fac059623bf86fa582a75e": "1700000000000000000000", + "0x4c997992036c5b433ac33d25a8ea1dc3d4e4e6d8": "29200000000000000000", + "0xab7e0b83ed9a424c6d1e6a6f87a4dbf06409c7d6": "2400000000000000000000", + "0xd71fb130f0150c565269e00efb43902b52a455a6": "200000000000000000000", + "0x99b018932bcad355b6792b255db6702dec8ce5dd": "4000086000000000000000", + "0x4b904e934bd0cc8b20705f879e905b93ea0ccc30": "2000000000000000000000", + "0x672ec42faa8cd69aaa71b32cc7b404881d52ff91": "10000000000000000000000", + "0xacbc2d19e06c3babbb5b6f052b6bf7fc37e07229": "200000000000000000000", + "0xcea8743341533cb2f0b9c6efb8fda80d77162825": "100000000000000000000", + "0x9568b7de755628af359a84543de23504e15e41e6": "40000000000000000000000", + "0x6ec96d13bdb24dc7a557293f029e02dd74b97a55": "4000000000000000000000", + "0xd95c90ffbe5484864780b867494a83c89256d6e4": "1640000000000000000000", + "0xade6f8163bf7c7bb4abe8e9893bd0cc112fe8872": "327600000000000000000", + "0x250eb7c66f869ddf49da85f3393e980c029aa434": "4000000000000000000000", + "0xa35c19132cac1935576abfed6c0495fb07881ba0": "2000000000000000000000", + "0xd5550caaf743b037c56fd2558a1c8ed235130750": "5347598000000000000000", + "0x03097923ba155e16d82f3ad3f6b815540884b92c": "1820000000000000000000", + "0xd6d9e30f0842012a7176a917d9d2048ca0738759": "4000000000000000000000", + "0xab9ad36e5c74ce2e96399f57839431d0e79f96ab": "164000000000000000000", + "0x75be8ff65e5788aec6b2a52d5fa7b1e7a03ba675": "67720000000000000000", + "0x4f6d4737d7a940382487264886697cf7637f8015": "1670000000000000000000", + "0x5f7b3bbac16dab831a4a0fc53b0c549dc36c31ca": "1940000000000000000000", + "0xd843ee0863ce933e22f89c802d31287b9671e81c": "13370000000000000000", + "0x361f3ba9ed956b770f257d3672fe1ff9f7b0240c": "600000000000000000000", + "0x6c0ae9f043c834d44271f13406593dfe094f389f": "1517545000000000000000", + "0xdb34745ede8576b499db01beb7c1ecda85cf4abe": "80000000000000000000", + "0x7be8ccb4f11b66ca6e1d57c0b5396221a31ba53a": "20000000000000000000", + "0x128b908fe743a434203de294c441c7e20a86ea67": "713304000000000000000", + "0xdf236bf6abf4f3293795bf0c28718f93e3b1b36b": "1337000000000000000000", + "0x14254ea126b52d0142da0a7e188ce255d8c47178": "775000000000000000000", + "0xceed47ca5b899fd1623f21e9bd4db65a10e5b09d": "133196000000000000000", + "0x30acd858875fa24eef0d572fc7d62aad0ebddc35": "400000000000000000000", + "0x47a281dff64167197855bf6e705eb9f2cef632ea": "1000072000000000000000", + "0x297d5dbe222f2fb52531acbd0b013dc446ac7368": "20000000000000000000000", + "0xadf85203c8376a5fde9815384a350c3879c4cb93": "1147300000000000000000", + "0xc3e0471c64ff35fa5232cc3121d1d38d1a0fb7de": "2000000000000000000000", + "0xfdecc82ddfc56192e26f563c3d68cb544a96bfed": "440000000000000000000", + "0x2614f42d5da844377578e6b448dc24305bef2b03": "2000000000000000000000", + "0x1d96bcd58457bbf1d3c2a46ffaf16dbf7d836859": "171313000000000000000", + "0xbd66ffedb530ea0b2e856dd12ac2296c31fe29e0": "200000000000000000000", + "0x6e84876dbb95c40b6656e42ba9aea08a993b54dc": "1101932000000000000000", + "0xa1c4f45a82e1c478d845082eb18875c4ea6539ab": "200000000000000000000000", + "0x2c964849b1f69cc7cea4442538ed87fdf16cfc8f": "2000000000000000000000", + "0x45b47105fe42c4712dce6e2a21c05bffd5ea47a9": "2000000000000000000000", + "0x31e9c00f0c206a4e4e7e0522170dc81e88f3eb70": "2685000000000000000000", + "0x5fe77703808f823e6c399352108bdb2c527cb87c": "1960000000000000000000", + "0x2272186ef27dcbe2f5fc373050fdae7f2ace2316": "16100000000000000000000", + "0xb7576e9d314df41ec5506494293afb1bd5d3f65d": "20000000000000000000", + "0xac9fff68c61b011efbecf038ed72db97bb9e7281": "9550000000000000000000", + "0xcd9529492b5c29e475acb941402b3d3ba50686b0": "1970000000000000000000", + "0xf19b39389d47b11b8a2c3f1da9124decffbefaf7": "2000000000000000000000", + "0x9e951f6dc5e352afb8d04299d2478a451259bf56": "72004000000000000000", + "0x8eb1fbe4e5d3019cd7d30dae9c0d5b4c76fb6331": "2000000000000000000000", + "0x29cc804d922be91f5909f348b0aaa5d21b607830": "4000000000000000000000", + "0x5c7b9ec7a2438d1e3c7698b545b9c3fd77b7cd55": "1000000000000000000000", + "0xa16160851d2b9c349b92e46f829abfb210943595": "1790000000000000000000", + "0xeac6b98842542ea10bb74f26d7c7488f698b6452": "20000000000000000000000", + "0x57825aeb09076caa477887fbc9ae37e8b27cc962": "100000000000000000000", + "0xb35e8a1c0dac7e0e66dbac736a592abd44012561": "14974000000000000000", + "0x756b84eb85fcc1f4fcdcc2b08db6a86e135fbc25": "3220000000000000000000", + "0xe13b3d2bbfdcbc8772a23315724c1425167c5688": "1032115000000000000000", + "0x0a2dcb7a671701dbb8f495728088265873356c8e": "152120000000000000000", + "0x03cb4c4f4516c4ff79a1b6244fbf572e1c7fea79": "2740000000000000000000", + "0x98ba4e9ca72fddc20c69b4396f76f8183f7a2a4e": "12800000000000000000000", + "0xf8087786b42da04ed6d1e0fe26f6c0eefe1e9f5a": "10000000000000000000000", + "0x02f7f67209b16a17550c694c72583819c80b54ad": "98400000000000000000", + "0x32bb2e9693e4e085344d2f0dbd46a283e3a087fd": "400000000000000000000", + "0x9c78963fbc263c09bd72e4f8def74a9475f7055c": "13790000000000000000000", + "0x27144ca9a7771a836ad50f803f64d869b2ae2b20": "4000000000000000000000", + "0xcc758d071d25a6320af68c5dc9c4f6955ba94520": "6000000000000000000000", + "0xcb42b44eb5fd60b5837e4f9eb47267523d1a229c": "865000000000000000000", + "0xaaf5b207b88b0de4ac40d747cee06e172df6e745": "31428000000000000000000", + "0x52d380511df19d5ec2807bbcb676581b67fd37a3": "13400000000000000000", + "0xaa1b3768c16d821f580e76c8e4c8e86d7dc78853": "400000000000000000000", + "0x41098a81452317c19e3eef0bd123bbe178e9e9ca": "2800000000000000000000", + "0x267148fd72c54f620a592fb92799319cc4532b5c": "410000000000000000000", + "0xd7cdbd41fff20df727c70b6255c1ba7606055468": "200000000000000000000", + "0x0e33fcbbc003510be35785b52a9c5d216bc005f4": "1880000000000000000000", + "0x6727daf5b9d68efcab489fedec96d7f7325dd423": "2000000000000000000000", + "0xcd0a161bc367ae0927a92aac9cf6e5086714efca": "2000000000000000000000", + "0x612667f172135b950b2cd1de10afdece6857b873": "1000000000000000000000", + "0x900194c4b1074305d19de405b0ac78280ecaf967": "1000000000000000000000", + "0x51f55ef47e6456a418ab32b9221ed27dba6608ee": "4200000000000000000000", + "0x0da532c910e3ac0dfb14db61cd739a93353fd05f": "1336866000000000000000", + "0x21df2dcdaf74b2bf803404dd4de6a35eabec1bbd": "6920000000000000000000", + "0xf0e7fb9e420a5340d536f40408344feaefc06aef": "1000000000000000000000", + "0x6742a2cfce8d79a2c4a51b77747498912245cd6a": "258064000000000000000", + "0x8663a241a0a89e70e182c845e2105c8ad7264bcf": "14825507000000000000000", + "0x18e113d8177c691a61be785852fa5bb47aeebdaf": "1337000000000000000000", + "0x1bec4d02ce85fc48feb62489841d85b170586a9b": "2400000000000000000000", + "0x287cf9d0902ef819a7a5f149445bf1775ee8c47c": "16000000000000000000000", + "0x28967280214e218a120c5dda37041b111ea36d74": "200000000000000000000", + "0xa0b771951ce1deee363ae2b771b73e07c4b5e800": "1400000000000000000000", + "0x29f8fba4c30772b057edbbe62ae7420c390572e1": "1000000000000000000000", + "0xee34c7e7995db9f187cff156918cfb6f13f6e003": "1960000000000000000000", + "0x916bf7e3c545921d3206d900c24f14127cbd5e70": "18020000000000000000000", + "0x93235f340d2863e18d2f4c52996516138d220267": "73800000000000000000", + "0x7efec0c6253caf397f71287c1c07f6c9582b5b86": "482839000000000000000", + "0x8d2e31b08803b2c5f13d398ecad88528209f6057": "9993000000000000000000", + "0x964eab4b276b4cd8983e15ca72b106900fe41fce": "500000000000000000000", + "0xeea1e97988de75d821cd28ad6822b22cce988b31": "520000000000000000000", + "0x278c0bde630ec393b1e7267fc9d7d97019e4145b": "2000000000000000000000", + "0x82e4461eb9d849f0041c1404219e4272c4900ab4": "2000000000000000000000", + "0x4a73389298031b8816cca946421c199e18b343d6": "631254000000000000000", + "0x9a5af31c7e06339ac8b4628d7c4db0ce0f45c8a4": "500000000000000000000", + "0xcb9b5103e4ce89af4f64916150bff9eecb9faa5c": "500000000000000000000", + "0x740f641614779dcfa88ed1d425d60db42a060ca6": "998630000000000000000", + "0xa4e623451e7e94e7e89ba5ed95c8a83a62ffc4ea": "20000000000000000000", + "0x25a500eeec7a662a841552b5168b707b0de21e9e": "10020000000000000000000", + "0x185a7fc4ace368d233e620b2a45935661292bdf2": "20000000000000000000000", + "0x9b68f67416a63bf4451a31164c92f672a68759e9": "60000000000000000000000", + "0xa38b5bd81a9db9d2b21d5ec7c60552cd02ed561b": "6000000000000000000000", + "0x61c830f1654718f075ccaba316faacb85b7d120b": "400000000000000000000", + "0x8392e53776713578015bff4940cf43849d7dcba1": "153190000000000000000", + "0xdc57477dafa42f705c7fe40eae9c81756e0225f1": "500044000000000000000", + "0xfebc3173bc9072136354002b7b4fb3bfc53f22f1": "370000000000000000000", + "0xd78f84e38944a0e0255faece48ba4950d4bd39d2": "5000000000000000000000", + "0xa7a3bb6139b0ada00c1f7f1f9f56d994ba4d1fa8": "2000000000000000000000", + "0xaa3f29601a1331745e05c42830a15e71938a6237": "1700000000000000000000", + "0xbec6640f4909b58cbf1e806342961d607595096c": "1999944000000000000000", + "0x9be3c329b62a28b8b0886cbd8b99f8bc930ce3e6": "74500000000000000000", + "0xe3eb2c0a132a524f72ccc0d60fee8b41685d39e2": "1970000000000000000000", + "0x90b1f370f9c1eb0be0fb8e2b8ad96a416371dd8a": "900000000000000000000", + "0xf2742e6859c569d5f2108351e0bf4dca352a48a8": "10000000000000000000000", + "0xb134c004391ab4992878337a51ec242f42285742": "2000000000000000000000", + "0xab7416ff32254951cbbc624ec7fb45fc7ecaa872": "340000000000000000000", + "0x9795f64319fc17dd0f8261f9d206fb66b64cd0c9": "200000000000000000000", + "0x64e03ef070a54703b7184e48276c5c0077ef4b34": "320000000000000000000", + "0x3430a16381f869f6ea5423915855e800883525a9": "17900000000000000000000", + "0xf4a367b166d2991a2bfda9f56463a09f252c1b1d": "1970000000000000000000", + "0x77c4a697e603d42b12056cbba761e7f51d0443f5": "680000000000000000000", + "0x153ef58a1e2e7a3eb6b459a80ab2a547c94182a2": "96000000000000000000000", + "0x6dbe8abfa1742806263981371bf3d35590806b6e": "20000000000000000000000", + "0x4c99dae96481e807c1f99f8b7fbde29b7547c5bf": "150000000000000000000", + "0xd5b9d277d8aad20697a51f76e20978996bffe055": "143250000000000000000", + "0x0f24105abbdaa03fa6309ef6c188e51f714a6e59": "200000000000000000000", + "0x1cb6b2d7cfc559b7f41e6f56ab95c7c958cd0e4c": "1337000000000000000000", + "0xf37b426547a1642d8033324814f0ede3114fc212": "401100000000000000000", + "0x318f1f8bd220b0558b95fb33100ffdbb640d7ca6": "4000000000000000000000", + "0x206d55d5792a514ec108e090599f2a065e501185": "200550000000000000000", + "0x11d2247a221e70c2d66d17ee138d38c55ffb8640": "10000000000000000000000", + "0xe8de725eca5def805ff7941d31ac1c2e342dfe95": "2462500000000000000000", + "0xd561cbbc05515de73ab8cf9eae1357341e7dfdf4": "6000000000000000000000", + "0x0455dcec8a7fc4461bfd7f37456fce3f4c3caac7": "400000000000000000000", + "0x5161fd49e847f67455f1c8bb7abb36e985260d03": "1200000000000000000000", + "0x8e073bad25e42218615f4a0e6b2ea8f8de2230c0": "2402500000000000000000", + "0x6c08a6dc0173c7342955d1d3f2c065d62f83aec7": "20000000000000000000", + "0x95cb6d8a6379f94aba8b885669562c4d448e56a7": "2000000000000000000000", + "0x2805415e1d7fdec6dedfb89e521d10592d743c10": "100000000000000000000", + "0xdaacdaf42226d15cb1cf98fa15048c7f4ceefe69": "300000000000000000000", + "0xe33df4ce80ccb62a76b12bcdfcecc46289973aa9": "6000000000000000000000", + "0x8f8cd26e82e7c6defd02dfad07979021cbf7150c": "3000000000000000000000", + "0x77a17122fa31b98f1711d32a99f03ec326f33d08": "1700000000000000000000", + "0x6f791d359bc3536a315d6382b88311af8ed6da47": "92000000000000000000", + "0xde30e49e5ab313214d2f01dcabce8940b81b1c76": "197000000000000000000", + "0xcf9be9b9ab86c66b59968e67b8d4dcff46b1814a": "660000000000000000000", + "0x7fdfc88d78bf1b285ac64f1adb35dc11fcb03951": "2287900000000000000000", + "0xc5134cfbb1df7a20b0ed7057622eeed280947dad": "3800000000000000000000", + "0xfa9ec8efe08686fa58c181335872ba698560ecab": "1999944000000000000000", + "0xf6a8635757c5e8c134d20d028cf778cf8609e46a": "1459416000000000000000", + "0x6265b2e7730f36b776b52d0c9d02ada55d8e3cb6": "1000000000000000000000", + "0x6a8cea2de84a8df997fd3f84e3083d93de57cda9": "100007000000000000000", + "0x1b7ed974b6e234ce81247498429a5bd4a0a2d139": "2000000000000000000000", + "0x9ba53dc8c95e9a472feba2c4e32c1dc4dd7bab46": "1337000000000000000000", + "0xd7b740dff8c457668fdf74f6a266bfc1dcb723f9": "20000000000000000000", + "0x07bc2cc8eedc01970700efc9c4fb36735e98cd71": "4000000000000000000000", + "0x3e1c962063e0d5295941f210dca3ab531eec8809": "3000000000000000000000", + "0xb447571dacbb3ecbb6d1cf0b0c8f3838e52324e2": "30199000000000000000", + "0x87764e3677eef604cbc59aed24abdc566b09fc25": "3000000000000000000000", + "0x03aa622881236dd0f4940c24c324ff8b7b7e2186": "3200000000000000000000", + "0xa4a7d306f510cd58359428c0d2f7c3609d5674d7": "3349000000000000000000", + "0x3c83c1701db0388b68210d00f5717cd9bd322c6a": "30000000000000000000000", + "0x047d5a26d7ad8f8e70600f70a398ddaa1c2db26f": "6000000000000000000000", + "0x43767bf7fd2af95b72e9312da9443cb1688e4343": "300000000000000000000", + "0x34a85d6d243fb1dfb7d1d2d44f536e947a4cee9e": "20000000000000000000000", + "0x65a9dad42e1632ba3e4e49623fab62a17e4d3611": "93120000000000000000", + "0x48e0cbd67f18acdb7a6291e1254db32e0972737f": "100007000000000000000", + "0xa5de5e434fdcdd688f1c31b6fb512cb196724701": "800000000000000000000", + "0x6d63d38ee8b90e0e6ed8f192eda051b2d6a58bfd": "30000000000000000000", + "0xb079bb4d9866143a6da72ae7ac0022062981315c": "760000000000000000000", + "0xc0413f5a7c2d9a4b8108289ef6ecd271781524f4": "50000000000000000000000", + "0xa91a5a7b341f99c535144e20be9c6b3bb4c28e4d": "5431790000000000000000", + "0x993f146178605e66d517be782ef0b3c61a4e1925": "7011998000000000000000", + "0x966c04781cb5e67dde3235d7f8620e1ab663a9a5": "75800000000000000000000", + "0xb3f82a87e59a39d0d2808f0751eb72c2329cdcc5": "5000000000000000000000", + "0x9b77ebced7e215f0920e8c2b870024f6ecb2ff31": "1000000000000000000000", + "0xfe697ff22ca547bfc95e33d960da605c6763f35b": "1325000000000000000000", + "0x480af52076009ca73781b70e43b95916a62203ab": "924171000000000000000", + "0xa9dc0424c6969d798358b393b1933a1f51bee00a": "20000000000000000000000", + "0x7aba56f63a48bc0817d6b97039039a7ad62fae2e": "600000000000000000000", + "0x59d139e2e40c7b97239d23dfaca33858f602d22b": "2000000000000000000000", + "0x8d6170ff66978e773bb621bf72b1ba7be3a7f87e": "200000000000000000000", + "0xd668523a90f0293d65c538d2dd6c57673710196e": "39500000000000000000", + "0xbbb5a0f4802c8648009e8a6998af352cde87544f": "95500000000000000000", + "0xfc43829ac787ff88aaf183ba352aadbf5a15b193": "3960000000000000000000", + "0xfe22a0b388668d1ae2643e771dacf38a434223cc": "4000304000000000000000", + "0x092acb624b08c05510189bbbe21e6524d644ccad": "18200000000000000000", + "0x8f0538ed71da1155e0f3bde5667ceb84318a1a87": "1940000000000000000000", + "0x06994cd83aa2640a97b2600b41339d1e0d3ede6c": "250000000000000000000", + "0x9d460c1b379ddb19a8c85b4c6747050ddf17a875": "3340000000000000000000", + "0x77a769fafdecf4a638762d5ba3969df63120a41d": "2000000000000000000000", + "0x5f375b86600c40cca8b2676b7a1a1d1644c5f52c": "78838000000000000000", + "0x15ee0fc63ebf1b1fc49d7bb38f8863823a2e17d2": "1910000000000000000000", + "0x6651736fb59b91fee9c93aa0bd6ea2f7b2506180": "500000000000000000000", + "0x361d9ed80b5bd27cf9f1226f26753258ee5f9b3f": "3530900000000000000000", + "0xc9b6b686111691ee6aa197c7231a88dc60bd295d": "500000000000000000000", + "0xe9b4a4853577a9dbcc2e795be0310d1bed28641a": "1000000000000000000000", + "0x36758e049cd98bcea12277a676f9297362890023": "4000000000000000000000", + "0x6bb50813146a9add42ee22038c9f1f7469d47f47": "200200000000000000000", + "0x6de4b581385cf7fc9fe8c77d131fe2ee7724c76a": "2308840000000000000000", + "0xd2a5a024230a57ccc666760b89b0e26cafd189c7": "49997115000000000000000", + "0x65af9087e05167715497c9a5a749189489004def": "835000000000000000000", + "0xead21c1deccfbf1c5cd96688a2476b69ba07ce4a": "72800000000000000000", + "0xe308435204793764f5fcbe65eb510f5a744a655a": "200000000000000000000", + "0x9376dce2af2ec8dcda741b7e7345664681d93668": "1000000000000000000000", + "0xa1b47c4d0ed6018842e6cfc8630ac3a3142e5e6b": "20000000000000000000", + "0xe2198c8ca1b399f7521561fd5384a7132fba486b": "1015200000000000000000", + "0x92c13fe0d6ce87fd50e03def9fa6400509bd7073": "40000000000000000000", + "0x7517f16c28d132bb40e3ba36c6aef131c462da17": "18200000000000000000", + "0x6a023af57d584d845e698736f130db9db40dfa9a": "98800000000000000000", + "0x1518627b88351fede796d3f3083364fbd4887b0c": "16000000000000000000000", + "0xf5b6e9061a4eb096160777e26762cf48bdd8b55d": "254030000000000000000", + "0x28073efc17d05cab3195c2db332b61984777a612": "1000000000000000000000", + "0xf06a854a3c5dc36d1c49f4c87d6db333b57e4add": "10000000000000000000000", + "0x9225983860a1cb4623c72480ac16272b0c95e5f5": "2000000000000000000000", + "0x5260dc51ee07bddaababb9ee744b393c7f4793a6": "34040000000000000000", + "0x0f127bbf8e311caea2ba502a33feced3f730ba42": "188000000000000000000", + "0x17d521a8d9779023f7164d233c3b6420ffd223ed": "20000000000000000000", + "0x8c2b7d8b608d28b77f5caa9cd645242a823e4cd9": "1820000000000000000000", + "0x6e866d032d405abdd65cf651411d803796c22311": "2000000000000000000000", + "0xdc51b2dc9d247a1d0e5bc36ca3156f7af21ff9f6": "1000000000000000000000", + "0xc84d9bea0a7b9f140220fd8b9097cfbfd5edf564": "123047000000000000000", + "0xff86e5e8e15b53909600e41308dab75f0e24e46b": "902400000000000000000", + "0xd7164aa261c09ad9b2b5068d453ed8eb6aa13083": "3000000000000000000000", + "0x76aaf8c1ac012f8752d4c09bb46607b6651d5ca8": "20000000000000000000", + "0x41786a10d447f484d33244ccb7facd8b427b5b8c": "1000000000000000000000", + "0x2e0c57b47150f95aa6a7e16ab9b1cbf54328979a": "100000000000000000000", + "0x3f747237806fed3f828a6852eb0867f79027af89": "1500000000000000000000", + "0xa568db4d57e4d67462d733c69a9e0fe26e218327": "1096140000000000000000", + "0x1f88f8a1338fc7c10976abcd3fb8d38554b5ec9c": "13400000000000000000", + "0xd1ea4d72a67b5b3e0f315559f52bd0614d713069": "2000000000000000000000", + "0xbfaeb91067617dcf8b44172b02af615674835dba": "160661000000000000000", + "0xb71a13ba8e95167b80331b52d69e37054fe7a826": "200000000000000000000", + "0xb67a80f170197d96cdcc4ab6cba627b4afa6e12c": "2400000000000000000000", + "0x35af040a0cc2337a76af288154c7561e1a233349": "1000000000000000000000", + "0xc86190904b8d079ec010e462cbffc90834ffaa5c": "10100000000000000000000", + "0x383304dd7a5720b29c1a10f60342219f48032f80": "5600000000000000000000", + "0x191313525238a21c767457a91374f02200c55448": "116400000000000000000", + "0xcc4a2f2cf86cf3e43375f360a4734691195f1490": "1348127000000000000000", + "0x4e020779b5ddd3df228a00cb48c2fc979da6ae38": "2000000000000000000000", + "0xe206fb7324e9deb79e19903496d6961b9be56603": "100000000000000000000", + "0x3ae160e3cd60ae31b9d6742d68e14e76bd96c517": "30000000000000000000", + "0x1f7d8e86d6eeb02545aad90e91327bd369d7d2f3": "20000000000000000000", + "0x68c7d1711b011a33f16f1f55b5c902cce970bdd7": "152000000000000000000", + "0x637be71b3aa815ff453d5642f73074450b64c82a": "2000000000000000000000", + "0x1584a2c066b7a455dbd6ae2807a7334e83c35fa5": "130000000000000000000", + "0x9c05e9d0f0758e795303717e31da213ca157e686": "1000000000000000000000", + "0x4f1a2da54a4c6da19d142412e56e815741db2325": "100000000000000000000", + "0x9a4ca8b82117894e43db72b9fa78f0b9b93ace09": "50000000000000000000", + "0x26c99f8849c9802b83c861217fd07a9e84cdb79d": "300000000000000000000", + "0x45c0d19f0b8e054f9e893836d5ecae7901af2812": "5000000000000000000000", + "0x00dc01cbf44978a42e8de8e436edf94205cfb6ec": "1458440000000000000000", + "0xde7dee220f0457a7187d56c1c41f2eb00ac56021": "629924000000000000000", + "0x1c128bd6cda5fca27575e4b43b3253c8c4172afe": "2000000000000000000000", + "0x666746fb93d1935c5a3c684e725010c4fad0b1d8": "20000000000000000000", + "0x51d78b178d707e396e8710965c4f41b1a1d9179d": "110600000000000000000", + "0x68f7573cd457e14c03fea43e302d30347c10705c": "5000000000000000000000", + "0x9d30cb237bc096f17036fc80dd21ca68992ca2d9": "30380000000000000000000", + "0xfbcfcc4a7b0f26cf26e9f3332132e2fc6a230766": "8000000000000000000000", + "0xb166e37d2e501ae73c84142b5ffb5aa655dd5a99": "1999000000000000000000", + "0x6df24f6685a62f791ba337bf3ff67e91f3d4bc3a": "2166000000000000000000", + "0x92e435340e9d253c00256389f52b067d55974e76": "268000000000000000000", + "0xea53d26564859d9e90bb0e53b7abf560e0162c38": "400000000000000000000", + "0xe26657f0ed201ea2392c9222b80a7003608ddf30": "40000000000000000000", + "0xf4177a0d85d48b0e264211ce2aa2efd3f1b47f08": "3593425000000000000000", + "0x9d47ba5b4c8505ad8da42934280b61a0e1e8b971": "100000000000000000000", + "0x63c2a3d235e5eeabd0d4a6afdb89d94627396495": "1241620000000000000000", + "0x446a8039cecf9dce4879cbcaf3493bf545a88610": "7000000000000000000000", + "0x7fa37ed67887751a471f0eb306be44e0dbcd6089": "1060000000000000000000", + "0x26d4a16891f52922789217fcd886f7fce296d400": "2000000000000000000000", + "0x487e108502b0b189ef9c8c6da4d0db6261eec6c0": "1910000000000000000000", + "0x7484d26becc1eea8c6315ec3ee0a450117dc86a0": "12000000000000000000000", + "0xad9e97a0482f353a05c0f792b977b6c7e811fa5f": "200000000000000000000", + "0x2273bad7bc4e487622d175ef7a66988b6a93c4ee": "20000000000000000000", + "0x3b93b16136f11eaf10996c95990d3b2739ccea5f": "10000000000000000000000", + "0xf3f1fa3918ca34e2cf7e84670b1f4d8eca160db3": "680000000000000000000", + "0x88a2154430c0e41147d3c1fee3b3b006f851edbd": "999972000000000000000", + "0x25185f325acf2d64500698f65c769ddf68301602": "5000000000000000000000", + "0xe9cafe41a5e8bbd90ba02d9e06585b4eb546c57f": "2000000000000000000000", + "0x95681cdae69b2049ce101e325c759892cac3f811": "2857600000000000000000", + "0x475066f9ad26655196d5535327bbeb9b7929cb04": "3040000000000000000000", + "0x6685fd2e2544702c360b8bb9ee78f130dad16da5": "2000000000000000000000", + "0x45e68db94c7d0ab7ac41857a71d67147870f4e71": "400000000000000000000000", + "0x4ad95d188d6464709add2555fb4d97fe1ebf311f": "346000000000000000000", + "0x73bedd6fda7ba3272185087b6351fc133d484e37": "5057200000000000000000", + "0x1ea4715504c6af107b0194f4f7b1cb6fcccd6f4b": "590598000000000000000", + "0x77306ffe2e4a8f3ca826c1a249f7212da43aeffd": "20000000000000000000000", + "0xeb453f5a3adddd8ab56750fadb0fe7f94d9c89e7": "20000000000000000000", + "0x7201d1c06920cd397ae8ad869bcda6e47ffb1b5a": "20000000000000000000", + "0x821cb5cd05c7ef909fe1be60733d8963d760dc41": "4000000000000000000000", + "0x496e319592b341eaccd778dda7c8196d54cac775": "9250000000000000000000", + "0x88609e0a465b6e99fce907166d57e9da0814f5c8": "20000000000000000000000", + "0xc7ec62b804b1f69b1e3070b5d362c62fb309b070": "13068074000000000000000", + "0x3eb9ef06d0c259040319947e8c7a6812aa0253d8": "167000000000000000000", + "0xcbf37ff854a2f1ce53934494777892d3ec655782": "10000000000000000000000", + "0x02b1af72339b2a2256389fd64607de24f0de600a": "2000000000000000000000", + "0xa8beb91c2b99c8964aa95b6b4a184b1269fc3483": "400000000000000000000", + "0x922a20c79a1d3a26dd3829677bf1d45c8f672bb6": "4000000000000000000000", + "0xc5843399d150066bf7979c34ba294620368ad7c0": "200000000000000000000", + "0x8cd0cd22e620eda79c0461e896c93c44837e2968": "2000000000000000000000", + "0x6170dd0687bd55ca88b87adef51cfdc55c4dd458": "2005160000000000000000", + "0xeed384ef2d41d9d203974e57c12328ea760e08ea": "1000000000000000000000", + "0xb129a5cb7105fe810bd895dc7206a991a4545488": "30000000000000000000", + "0x3872f48dc5e3f817bc6b2ad2d030fc5e0471193d": "4000000000000000000000", + "0x514b7512c9ae5ea63cbf11715b63f21e18d296c1": "1999944000000000000000", + "0x7ab256b204800af20137fabcc916a23258752501": "20000000000000000000000", + "0xfc66faba277f4b5de64ad45eb19c31e00ced3ed5": "5640000000000000000000", + "0x39824f8bced176fd3ea22ec6a493d0ccc33fc147": "4000000000000000000000", + "0xe338e859fe2e8c15554848b75caecda877a0e832": "1801800000000000000000", + "0xe53c68796212033e4e6f9cff56e19c461eb454f9": "1000000000000000000000", + "0x8461ecc4a6a45eb1a5b947fb86b88069b91fcd6f": "2000000000000000000000", + "0x6b4b99cb3fa9f7b74ce3a48317b1cd13090a1a7a": "57300000000000000000", + "0x97de21e421c37fe4b8025f9a51b7b390b5df7804": "80000000000000000000000", + "0xd25aecd7eb8bd6345b063b5dbd271c77d3514494": "1820000000000000000000", + "0x57b23d6a1adc06c652a779c6a7fb6b95b9fead66": "200000000000000000000", + "0x0d658014a199061cf6b39433140303c20ffd4e5a": "8200000000000000000000", + "0x30eac740e4f02cb56eef0526e5d300322600d03e": "1970000000000000000000", + "0x4eead40aad8c73ef08fc84bc0a92c9092f6a36bf": "26740000000000000000", + "0x30f7d025d16f7bee105580486f9f561c7bae3fef": "500000000000000000000", + "0x0977bfba038a44fb49b03970d8d8cf2cb61f8b25": "420000000000000000000", + "0xb14bbeff70720975dc6191b2a44ff49f2672873c": "143000000000000000000", + "0xd588c3a5df228185d98ee7e60748255cdea68b01": "4000000000000000000000", + "0x225d35faedb391c7bc2db7fa9071160405996d00": "167774000000000000000", + "0xc0e457bd56ec36a1246bfa3230fff38e5926ef22": "1940000000000000000000", + "0x2a9c57fe7b6b138a920d676f3c76b6c2a0eef699": "9400000000000000000000", + "0x36df8f883c1273ec8a171f7a33cfd649b1fe6075": "227290000000000000000", + "0x234f46bab73fe45d31bf87f0a1e0466199f2ebac": "485000000000000000000", + "0xa2e1b8aa900e9c139b3fa122354f6156d92a18b1": "500000000000000000000", + "0x517cd7608e5d0d83a26b717f3603dac2277dc3a4": "2000000000000000000000", + "0x75f7539d309e9039989efe2e8b2dbd865a0df088": "2460000000000000000000", + "0x4b792e29683eb586e394bb33526c6001b397999e": "600000000000000000000", + "0xa34f9d568bf7afd94c2a5b8a5ff55c66c4087999": "2444000000000000000000", + "0x4b31bf41abc75c9ae2cd8f7f35163b6e2b745054": "382000000000000000000", + "0xe35453eef2cc3c7a044d0ac134ba615908fa82ee": "147510000000000000000", + "0x7aa79ac04316cc8d08f20065baa6d4142897d54e": "1400000000000000000000", + "0xf1dc8ac81042c67a9c3c6792b230c46ac016ca10": "200000000000000000000", + "0x2bb366b9edcb0da680f0e10b3b6e28748190d6c3": "5799400000000000000000", + "0xa567770b6ae320bdde50f904d663e746a61dace6": "2000000000000000000000", + "0xd9d42fd13ebd4bf69cac5e9c7e82483ab46dd7e9": "5348000000000000000000", + "0x27830c5f6023afaaf79745676c204a0faccda0ba": "240000000000000000000", + "0x3cb179cb4801a99b95c3b0c324a2bdc101a65360": "26000000000000000000", + "0x976e3ceaf3f1af51f8c29aff5d7fa21f0386d8ee": "240000000000000000000", + "0x752a5ee232612cd3005fb26e5b597de19f776be6": "5460000000000000000000", + "0x7d5aa33fc14b51841a06906edb2bb49c2a117269": "300048000000000000000", + "0x55ca6abe79ea2497f46fdbb830346010fe469cbe": "5730000000000000000000", + "0x6bec311ad05008b4af353c958c40bd06739a3ff3": "16380000000000000000000", + "0x30e9698cf1e08a9d048bd8d8048f28be7ed9409f": "6685000000000000000000", + "0x9afa536b4c66bc38d875c4b30099d9261fdb38eb": "205981000000000000000", + "0x6b63a2dfb2bcd0caec0022b88be30c1451ea56aa": "809021000000000000000", + "0xd07be0f90997caf903c8ac1d53cde904fb190741": "1000200000000000000000", + "0x893cdddf5377f3c751bf2e541120045a47cba101": "100000000000000000000", + "0xc1cdc601f89c0428b31302d187e0dc08ad7d1c57": "6000000000000000000000", + "0x8f8acb107607388479f64baaabea8ff007ada97d": "27281800000000000000000", + "0x88bc43012edb0ea9f062ac437843250a39b78fbb": "20000000000000000000000", + "0xfcfc3a5004d678613f0b36a642269a7f371c3f6a": "1000000000000000000000", + "0xf509557e90183fbf0f0651a786487bcc428ba175": "194000000000000000000", + "0xe3d915eda3b825d6ee4af9328d32ac18ada35497": "500000000000000000000", + "0xf237ef05261c34d79cc22b860de0f17f793c3860": "200000000000000000000", + "0xa3a2e319e7d3a1448b5aa2468953160c2dbcba71": "2000000000000000000000", + "0x3a368efe4ad786e26395ec9fc6ad698cae29fe01": "632200000000000000000", + "0x8e3240b0810e1cf407a500804740cf8d616432a4": "40309000000000000000", + "0x5691dd2f6745f20e22d2e1d1b955aa2903d65656": "1969606000000000000000", + "0x5f93ff832774db5114c55bb4bf44ccf3b58f903f": "192026650000000000000000", + "0x2c1cc6e18c152488ba11c2cc1bcefa2df306abd1": "1670000000000000000000", + "0xbde9786a84e75b48f18e726dd78d70e4af3ed802": "5730000000000000000000", + "0x79551cede376f747e3716c8d79400d766d2e0195": "46250000000000000000000", + "0x49f028395b5a86c9e07f7778630e4c2e3d373a77": "122735000000000000000", + "0x6a3694424c7cc6b8bcd9bccaba540cc1f5df18d7": "2000000000000000000000", + "0x068e29b3f191c812a6393918f71ab933ae6847f2": "1999944000000000000000", + "0x6e64e6129f224e378c0e6e736a7e7a06c211e9ec": "1000000000000000000000", + "0xc4c15318d370c73318cc18bdd466dbaa4c6603bf": "19700000000000000000", + "0x8035bcffaefdeeea35830c497d14289d362023de": "300000000000000000000", + "0xa997dfc7986a27050848fa1c64d7a7d6e07acca2": "143000000000000000000", + "0x2fe13a8d0785de8758a5e41876c36e916cf75074": "4000000000000000000000", + "0x6f24c9af2b763480515d1b0951bb77a540f1e3f9": "1970000000000000000000", + "0x4c23b370fc992bb67cec06e26715b62f0b3a4ac3": "10000000000000000000000", + "0x4ac07673e42f64c1a25ec2fa2d86e5aa2b34e039": "2000000000000000000000", + "0x117db836377fe15455e02c2ebda40b1ceb551b19": "6000000000000000000000", + "0xef1c0477f1184d60accab374d374557a0a3e10f3": "152000000000000000000", + "0x99fe0d201228a753145655d428eb9fd94985d36d": "1939268000000000000000", + "0xb3731b046c8ac695a127fd79d0a5d5fa6ae6d12e": "1998000000000000000000", + "0xdce30c31f3ca66721ecb213c809aab561d9b52e4": "2000000000000000000000", + "0xddd69c5b9bf5eb5a39cee7c3341a120d973fdb34": "1987730000000000000000", + "0x216e41864ef98f060da08ecae19ad1166a17d036": "5730000000000000000000", + "0x6a53d41ae4a752b21abed5374649953a513de5e5": "2000000000000000000000", + "0x20dd8fcbb46ea46fe381a68b8ca0ea5be21fe9a5": "2000000000000000000000", + "0x19732bf973055dbd91a4533adaa2149a91d38380": "2000000000000000000000", + "0x51ea1c0934e3d04022ed9c95a087a150ef705e81": "6280000000000000000000", + "0xa0de5c601e696635c698b7ae9ca4539fc7b941ec": "346150000000000000000", + "0x94e1f5cb9b8abace03a1a6428256553b690c2355": "20000000000000000000", + "0xa539b4a401b584dfe0f344b1b422c65543167e2e": "200000000000000000000", + "0x50584d9206a46ce15c301117ee28f15c30e60e75": "13400000000000000000", + "0x856eb204241a87830fb229031343dc30854f581a": "1000000000000000000000", + "0x9dd46b1c6d3f05e29e9c6f037eed9a595af4a9aa": "500000000000000000000", + "0x8925da4549e15155e57a628522cea9dddf627d81": "1000070000000000000000", + "0xa89df34859edd7c820db887740d8ff9e15157c7b": "2000000000000000000000", + "0xad9f4c890a3b511cee51dfe6cfd7f1093b76412c": "506600000000000000000", + "0xf8c7f34a38b31801da43063477b12b27d0f203ff": "494800000000000000000", + "0xa642501004c90ea9c9ed1998ba140a4cd62c6f5f": "250543000000000000000", + "0x508cf19119db70aa86454253da764a2cb1b2be1a": "1000000000000000000000", + "0x2979741174a8c1ea0b7f9edf658177859417f512": "461283000000000000000", + "0x654f524847b3a6acc0d3d5f1f362b603edf65f96": "8000000000000000000000", + "0x5cf18fa7c8a7c0a2b3d5efd1990f64ddc569242c": "1000000000000000000000", + "0x17e82e7078dc4fd9e879fb8a50667f53a5c54591": "200000000000000000000", + "0x8b07d050754dc9ba230db01c310afdb5395aa1b3": "118080000000000000000", + "0x5f77a107ab1226b3f95f10ee83aefc6c5dff3edc": "500000000000000000000", + "0x475a6193572d4a4e59d7be09cb960ddd8c530e2f": "667323000000000000000", + "0x6470a4f92ec6b0fccd01234fa59023e9ff1f3aac": "3000000000000000000000", + "0x2fbcef3384d420e4bf61a0669990bc7054f1a5af": "2000000000000000000000", + "0xbbabf6643beb4bd01c120bd0598a0987d82967d1": "3342500000000000000000", + "0x41a2f2e6ecb86394ec0e338c0fc97e9c5583ded2": "2009400000000000000000", + "0xfb9473cf7712350a1fa0395273fc80560752e4fb": "123300000000000000000", + "0x38b2197106123387a0d4de368431a8bacdda30e2": "20000000000000000000", + "0x5ed56115bd6505a88273df5c56839470d24a2db7": "65601000000000000000", + "0x523f6d64690fdacd942853591bb0ff20d3656d95": "1820000000000000000000", + "0x55caff4bba04d220c9a5d2018672ec85e31ef83e": "2000000000000000000000", + "0x65af8d8b5b1d1eedfa77bcbc96c1b133f83306df": "98000000000000000000", + "0x7456c5b2c5436e3e571008933f1805ccfe34e9ec": "1000000000000000000000", + "0xa6eebbe464d39187bf80ca9c13d72027ec5ba8be": "3000000000000000000000", + "0xdd35cfdbcb993395537aecc9f59085a8d5ddb6f5": "1000000000000000000000", + "0x98e2b6d606fd2d6991c9d6d4077fdf3fdd4585da": "901520000000000000000", + "0x860f5ffc10de767ded807f71e861d647dfd219b1": "10000000000000000000000", + "0x1a644a50cbc2aee823bd2bf243e825be4d47df02": "100007000000000000000", + "0xa8455b411765d6901e311e726403091e42c56683": "3380000000000000000000", + "0x3a86ee94862b743dd34f410969d94e2c5652d4ad": "201610000000000000000", + "0xa57360f002e0d64d2d74457d8ca4857ee00bcddf": "335780000000000000000", + "0xe59b3bd300893f97233ef947c46f7217e392f7e9": "1000000000000000000000", + "0x9f3a74fd5e7edcc1162993171381cbb632b7cff0": "10000000000000000000000", + "0x675d5caa609bf70a18aca580465d8fb7310d1bbb": "20000000000000000000000", + "0x77f609ca8720a023262c55c46f2d26fb3930ac69": "17300000000000000000", + "0xf8ac4a39b53c11307820973b441365cffe596f66": "2000000000000000000000", + "0x112634b4ec30ff786e024159f796a57939ea144e": "1999944000000000000000", + "0x49d2c28ee9bc545eaaf7fd14c27c4073b4bb5f1a": "1474134000000000000000", + "0x91cc46aa379f856a6640dccd5a648a7902f849d9": "200000000000000000000", + "0xb46440c797a556e04c7d9104660491f96bb076bf": "14900000000000000000", + "0xe5968797468ef767101b761d431fce14abffdbb4": "8040000000000000000000", + "0xc0895efd056d9a3a81c3da578ada311bfb9356cf": "200000000000000000000", + "0x76846f0de03b5a76971ead298cdd08843a4bc6c6": "15500000000000000000", + "0x5f708eaf39d823946c51b3a3e9b7b3c003e26341": "1820000000000000000000", + "0x24f7450ddbf18b020feb1a2032d9d54b633edf37": "50000000000000000000", + "0xcae3a253bcb2cf4e13ba80c298ab0402da7c2aa0": "5400000000000000000000", + "0x91e8810652e8e6161525d63bb7751dc20f676076": "725000000000000000000", + "0x543629c95cdef428ad37d453ca9538a9f90900ac": "43250000000000000000000", + "0x6e79edd4845b076e4cd88d188b6e432dd93f35aa": "955000000000000000000", + "0xbd325d4029e0d8729f6d399c478224ae9e7ae41e": "3880000000000000000000", + "0x42cecfd2921079c2d7df3f08b07aa3beee5e219a": "1000000000000000000000", + "0x3690246ba3c80679e22eac4412a1aefce6d7cd82": "20000000000000000000000", + "0x577aeee8d4bc08fc97ab156ed57fb970925366be": "333046000000000000000", + "0xfe00bf439911a553982db638039245bcf032dbdc": "394000000000000000000", + "0x91f624b24a1fa5a056fe571229e7379db14b9a1e": "11999974000000000000000", + "0xf206d328e471d0117b246d2a4619827709e96df3": "3001000000000000000000", + "0x073f1ed1c9c3e9c52a9b0249a5c1caa0571fdf05": "70400000000000000000", + "0xf56048dd2181d4a36f64fcecc6215481e42abc15": "200000000000000000000", + "0xef76a4cd8febcbc9b818f17828f8d93473f3f3cb": "4000000000000000000000", + "0x1031e0ecb54985ae21af1793950dc811888fde7c": "20000000000000000000", + "0x8e0fee38685a94aabcd7ce857b6b1409824f75b8": "500000000000000000000", + "0xf0cbef84e169630098d4e301b20208ef05846ac9": "259084000000000000000", + "0xbbca65b3266ea2fb73a03f921635f912c7bede00": "1970000000000000000000", + "0x0aec2e426ed6cc0cf3c249c1897eac47a7faa9bd": "200000000000000000000", + "0xb8f30758faa808dbc919aa7b425ec922b93b8129": "1000076000000000000000", + "0x936dcf000194e3bff50ac5b4243a3ba014d661d8": "10000000000000000000000", + "0xb14ddb0386fb606398b8cc47565afae00ff1d66a": "2973024000000000000000", + "0x2ec95822eb887bc113b4712a4dfd7f13b097b5e7": "1000000000000000000000", + "0x0136a5af6c3299c6b5f005fdaddb148c070b299b": "20368000000000000000", + "0x37cb868d2c3f95b257611eb34a4188d58b749802": "2000000000000000000000", + "0xcd7f09d7ed66d0c38bc5ad4e32b7f2b08dc1b30d": "1148000000000000000000", + "0xb5fa8184e43ed3e0b8ab91216461b3528d84fd09": "2680000000000000000000", + "0x3dbf0dbfd77890800533f09dea8301b9f025d2a6": "1000000000000000000000", + "0xb553d25d6b5421e81c2ad05e0b8ba751f8f010e3": "2000000000000000000000", + "0xdbf8b13967f55125272de0562536c450ba5655a0": "2046830000000000000000", + "0x0f6e840a3f2a24647d8e43e09d45c7c335df4248": "2500000000000000000000", + "0xfa2fd29d03fee9a07893df3a269f56b72f2e1e64": "10000000000000000000000", + "0x8b57b2bc83cc8d4de331204e893f2f3b1db1079a": "40000000000000000000", + "0x7f541491d2ac00d2612f94aa7f0bcb014651fbd4": "376000000000000000000", + "0x4f4a9be10cd5d3fb5de48c17be296f895690645b": "40000000000000000000000", + "0x45d1c9eedf7cab41a779057b79395f5428d80528": "2000000000000000000000", + "0x662334814724935b7931ddca6100e00d467727cd": "637000000000000000000", + "0x2c52c984102ee0cd3e31821b84d408930efa1ac7": "2000000000000000000000", + "0x000d836201318ec6899a67540690382780743280": "200000000000000000000", + "0x81498ca07b0f2f17e8bbc7e61a7f4ae7be66b78b": "101600000000000000000", + "0x7860a3de38df382ae4a4dce18c0c07b98bce3dfa": "1000000000000000000000", + "0x5e8e4df18cf0af770978a8df8dac90931510a679": "2000000000000000000000", + "0x05d68dad61d3bbdfb3f779265c49474aff3fcd30": "39399000000000000000", + "0x96eafbf2fb6f4db9a436a74c45b5654452e23819": "20000000000000000000", + "0xd7d7f2caa462a41b3b30a34aeb3ba61010e2626f": "2000000000000000000000", + "0x0b71f554122469ef978e2f1fefd7cbb410982772": "3880000000000000000000", + "0x504666ce8931175e11a5ed11c1dcaa06e57f4e66": "11792000000000000000000", + "0xd00f067286c0fbd082f9f4a61083ec76deb3cee6": "1000000000000000000000", + "0x02e4cb22be46258a40e16d4338d802fffd00c151": "379786000000000000000", + "0x1c13d38637b9a47ce79d37a86f50fb409c060728": "1337000000000000000000", + "0xe30212b2011bb56bdbf1bc35690f3a4e0fd905ea": "8022000000000000000000", + "0x1df6911672679bb0ef3509038c0c27e394fdfe30": "540000000000000000000", + "0x2b8fe4166e23d11963c0932b8ade8e0145ea0770": "43250000000000000000000", + "0x6509eeb1347e842ffb413e37155e2cbc738273fd": "2000000000000000000000", + "0x8b7e9f6f05f7e36476a16e3e7100c9031cf404af": "1000000000000000000000", + "0xbec8caf7ee49468fee552eff3ac5234eb9b17d42": "2000000000000000000000", + "0x38898bbb4553e00bbfd0cf268b2fc464d154add5": "320000000000000000000", + "0xcbb3189e4bd7f45f178b1c30c76e26314d4a4b0a": "295007000000000000000", + "0xbe1cd7f4c472070968f3bde268366b21eeea8321": "4300000000000000000000", + "0x976a18536af41874426308871bcd1512a775c9f8": "10000000000000000000000", + "0xe9c758f8da41e3346e4350e5ac3976345c6c1082": "1930050000000000000000", + "0x64ec8a5b743f3479e707dae9ee20ddaa4f40f1d9": "200000000000000000000", + "0x9e01765aff08bc220550aca5ea2e1ce8e5b09923": "1000000000000000000000", + "0xba0f39023bdb29eb1862a9f9059cab5d306e662f": "2000000000000000000000", + "0x2baf8d6e221174124820ee492b9459ec4fadafbb": "2000000000000000000000", + "0x655d5cd7489629e2413c2105b5a172d933c27af8": "4040060000000000000000", + "0xbadc2aef9f5951a8d78a6b35c3d0b3a4e6e2e739": "6000000000000000000000", + "0xe64f6e1d6401b56c076b64a1b0867d0b2f310d4e": "51570000000000000000", + "0x7a8563867901206f3f2bf0fa3e1c8109cabccd85": "137000000000000000000", + "0xd17fbe22d90462ed37280670a2ea0b3086a0d6d6": "199955000000000000000", + "0xe96d7d4cdd15553a4e4d316d6d6480ca3cea1e38": "12200000000000000000000", + "0xf04d2c91efb6e9c45ffbe74b434c8c5f2b028f1f": "1000000000000000000000", + "0x81164deb10814ae08391f32c08667b6248c27d7a": "394000000000000000000", + "0x7f5ae05ae0f8cbe5dfe721f044d7a7bef4c27997": "60000000000000000000", + "0xc982586d63b0d74c201b1af8418372e30c7616be": "100000000000000000000", + "0x64cf0935bf19d2cebbecd8780d27d2e2b2c34166": "1970000000000000000000", + "0xcd566ad7b883f01fd3998a9a58a9dee4724ddca5": "58848000000000000000", + "0x9da609fa3a7e6cf2cc0e70cdabe78dc4e382e11e": "1200000000000000000000", + "0x0d69100c395ce6c5eaadf95d05d872837ededd21": "400000000000000000000", + "0xfe91eccf2bd566afa11696c5049fa84c69630a52": "1940000000000000000000", + "0x005d0ee8155ec0a6ff6808552ca5f16bb5be323a": "197000000000000000000", + "0x3e5cb8928c417825c03a3bfcc52183e5c91e42d7": "4264790000000000000000", + "0x9c1b771f09af882af0643083de2aa79dc097c40e": "2480000000000000000000", + "0xeba388b0da27c87b1cc0eac6c57b2c5a0b459c1a": "6800000000000000000000", + "0x7529f3797bb6a20f7ea6492419c84c867641d81c": "2000000000000000000000", + "0x532a7da0a5ad7407468d3be8e07e69c7dd64e861": "500000000000000000000", + "0xde82cc8d4a1bb1d9434392965b3e80bad3c03d4f": "1477500000000000000000", + "0x4a82694fa29d9e213202a1a209285df6e745c209": "4000000000000000000000", + "0x3e53ff2107a8debe3328493a92a586a7e1f49758": "23143470000000000000000", + "0xb2ddb786d3794e270187d0451ad6c8b79e0e8745": "400000000000000000000", + "0x6ebcf9957f5fc5e985add475223b04b8c14a7aed": "1730000000000000000000", + "0xc5c7590b5621ecf8358588de9b6890f2626143f1": "3000000000000000000000", + "0xae4f122e35c0b1d1e4069291457c83c07f965fa3": "1000000000000000000000", + "0x47885ababedf4d928e1c3c71d7ca40d563ed595f": "1820000000000000000000", + "0x78ce3e3d474a8a047b92c41542242d0a08c70f99": "10000000000000000000000", + "0x6134d942f037f2cc3d424a230c603d67abd3edf7": "2000000000000000000000", + "0x1360e87df24c69ee6d51c76e73767ffe19a2131c": "92000000000000000000", + "0x5fd1c3e31778276cb42ea740f5eae9c641dbc701": "194000000000000000000", + "0x98397342ec5f3d4cb877e54ef5d6f1d366731bd4": "5910000000000000000000", + "0x6d4b5c05d06a20957e1748ab6df206f343f92f01": "10020475000000000000000", + "0xe6115b13f9795f7e956502d5074567dab945ce6b": "100000000000000000000000", + "0x23730c357a91026e44b1d0e2fc2a51d071d8d77b": "4000000000000000000000", + "0xfae881937047895a660cf229760f27e66828d643": "182000000000000000000", + "0xff3ef6ba151c21b59986ae64f6e8228bc9a2c733": "2000000000000000000000", + "0xdfbd4232c17c407a980db87ffbcda03630e5c459": "553150000000000000000", + "0x4429a29fee198450672c0c1d073162250bec6474": "999200000000000000000", + "0x7e8f96cc29f57b0975120cb593b7dd833d606b53": "197000000000000000000", + "0x5ed3f1ebe2ae6756b5d8dc19cad02c419aa5778b": "0", + "0xdaa776a6754469d7b9267a89b86725e740da0fa0": "1970000000000000000000", + "0x139e479764b499d666208c4a8a047a97043163dd": "598880000000000000000", + "0x5ad5e420755613886f35aa56ac403eebdfe4b0d0": "80000000000000000000000", + "0x3fe801e61335c5140dc7eda2ef5204460a501230": "2000000000000000000000", + "0xce8a6b6d5033b1498b1ffeb41a41550405fa03a2": "4000000000000000000000", + "0x26c2ffc30efdc5273e76183a16c2698d6e531286": "776000000000000000000", + "0x71ec3aec3f8f9221f9149fede06903a0f9a232f2": "200000000000000000000", + "0xef35f6d4b1075e6aa139151c974b2f4658f70538": "1111111000000000000000", + "0x26a68eab905a8b3dce00e317308225dab1b9f6b8": "1980000000000000000000", + "0x63f5b53d79bf2e411489526530223845fac6f601": "30000000000000000000000", + "0x481115296ab7db52492ff7b647d63329fb5cbc6b": "16100000000000000000000", + "0xf19f193508393e4d2a127b20b2031f39c82581c6": "3500088000000000000000", + "0x500e34cde5bd9e2b71bb92d7cf55eee188d5fa0c": "5348000000000000000000", + "0x65ea67ad3fb56ad5fb94387dd38eb383001d7c68": "100000000000000000000", + "0x7f9f9b56e4289dfb58e70fd5f12a97b56d35c6a5": "1970000000000000000000", + "0x60be6f953f2a4d25b6256ffd2423ac1438252e4e": "150000000000000000000", + "0xac1dfc984b71a19929a81d81f04a7cbb14073703": "600000000000000000000", + "0xa3c14ace28b192cbb062145fcbbd5869c67271f6": "8000000000000000000000", + "0x2da76b7c39b420e388ba2c1020b0856b0270648a": "2000000000000000000000", + "0x622be4b45495fcd93143efc412d699d6cdc23dc5": "17300000000000000000", + "0xd3f873bd9956135789ab00ebc195b922e94b259d": "2000000000000000000000", + "0x975f3764e97bbccf767cbd3b795ba86d8ba9840e": "346000000000000000000", + "0xfc39be41094b1997d2169e8264c2c3baa6c99bc4": "2000000000000000000000", + "0x12ffc1128605cb0c13709a7290506f2690977193": "3340000000000000000000", + "0x9b1168de8ab64b47552f3389800a9cc08b4666cf": "1730000000000000000000", + "0x9f1aa8fcfc89a1a5328cbd6344b71f278a2ca4a0": "500000000000000000000", + "0x505a33a18634dd4800693c67f48a1d693d4833f8": "7252000000000000000000", + "0xd08fc09a0030fd0928cd321198580182a76aae9f": "1000000000000000000000", + "0x6acddca3cd2b4990e25cd65c24149d0912099e79": "3000037000000000000000", + "0x397a6ef8763a18f00fac217e055c0d3094101011": "2000000000000000000000", + "0x4e0bd32473c4c51bf25654def69f797c6b29a232": "1600930000000000000000", + "0x28d8c35fb7eea622582135e3ad47a227c9a663bd": "18200000000000000000", + "0xf96488698590dc3b2c555642b871348dfa067ad5": "500000000000000000000", + "0x4eebe80cb6f3ae5904f6f4b28d907f907189fcab": "1999944000000000000000", + "0x8d1abd897dacd4312e18080c88fb9647eab44052": "216000000000000000000", + "0x457029c469c4548d168cec3e65872e4428d42b67": "2000000000000000000000", + "0x1296acded1e063af39fe8ba0b4b63df789f70517": "100014000000000000000", + "0x71762c63678c18d1c6378ce068e666381315147e": "2000000000000000000000", + "0x6cc1c878fa6cde8a9a0b8311247e741e4642fe6d": "985000000000000000000", + "0x8d9ed7f4553058c26f7836a3802d3064eb1b363d": "90000000000000000000", + "0x5032e4bcf7932b49fdba377b6f1499636513cfc3": "100000000000000000000", + "0x462b678b51b584f3ed7ada070b5cd99c0bf7b87f": "100000000000000000000", + "0xc8aa49e3809f0899f28ab57e6743709d58419033": "880000000000000000000", + "0x01b1cae91a3b9559afb33cdc6d689442fdbfe037": "200000000000000000000", + "0xb1043004ec1941a8cf4f2b00b15700ddac6ff17e": "1000000000000000000000", + "0x5ba2c6c35dfaec296826591904d544464aeabd5e": "20000000000000000000", + "0xb32400fd13c5500917cb037b29fe22e7d5228f2d": "40000000000000000000000", + "0xd59d92d2c8701980cc073c375d720af064743c0c": "19000000000000000000000", + "0x11dd6185d9a8d73ddfdaa71e9b7774431c4dfec2": "1000000000000000000000", + "0xd4cb21e590c5a0e06801366aff342c7d7db16424": "494000000000000000000", + "0x5b6d55f6712967405c659129f4b1de09acf2cb7b": "267400000000000000000", + "0x6179979907fe7f037e4c38029d60bcbab832b3d6": "1610000000000000000000", + "0x33c407133b84b3ca4c3ded1f4658900c38101624": "2800000000000000000000", + "0xcd2a36d753e9e0ed012a584d716807587b41d56a": "261400000000000000000", + "0x8155fa6c51eb31d808412d748aa086105018122f": "1880000000000000000000", + "0x3ecc8e1668dde995dc570fe414f44211c534a615": "2000000000000000000000", + "0xd6395db5a4bb66e60f4cfbcdf0057bb4d97862e2": "910000000000000000000", + "0xb6fb39786250081426a342c70d47ee521e5bc563": "15000000000000000000000", + "0x510eda5601499a0d5e1a006bfffd833672f2e267": "2000000000000000000000", + "0x98c19dba810ba611e68f2f83ee16f6e7744f0c1f": "200000000000000000000", + "0x34ff26eb60a8d1a95a489fae136ee91d4e58084c": "600000000000000000000", + "0x6ad90be252d9cd464d998125fab693060ba8e429": "4000000000000000000000", + "0x038323b184cff7a82ae2e1bda7793fe4319ca0bf": "20000000000000000000000", + "0xdc5305b4020a06b49d657c7ca34c35c91c5f2c56": "7045990000000000000000", + "0xc9c80dc12e7bab86e949d01e4c3ed35f2b9bba5f": "2000000000000000000000", + "0x7beb81fb2f5e91526b2ac9795e76c69bcff04bc0": "69400000000000000000000", + "0xb8bc9bca7f71b4ed12e620438d620f53c114342f": "500000000000000000000", + "0xd288e7cb7ba9f620ab0f7452e508633d1c5aa276": "4000000000000000000000", + "0xa2e460a989cb15565f9ecca7d121a18e4eb405b6": "2000000000000000000000", + "0x7489cc8abe75cda4ef0d01cef2605e47eda67ab1": "133700000000000000000", + "0x38b403fb1fb7c14559a2d6f6564a5552bca39aff": "2000000000000000000000", + "0xe55c80520a1b0f755b9a2cd3ce214f7625653e8a": "2000000000000000000000", + "0x451b7070259bdba27100e36e23428a53dfe304e9": "13370000000000000000", + "0x8b5c914b128bf1695c088923fa467e7911f351fa": "98500000000000000000", + "0x17df49518d73b129f0da36b1c9b40cb66420fdc7": "10000000000000000000000", + "0xc1950543554d8a713003f662bb612c10ad4cdf21": "18200000000000000000", + "0xfa7606435b356cee257bd2fcd3d9eacb3cd1c4e1": "100000000000000000000", + "0xe0bad98eee9698dbf6d76085b7923de5754e906d": "167000000000000000000", + "0xce53c8cdd74296aca987b2bc19c2b875a48749d0": "3000000000000000000000", + "0xd0c55abf976fdc3db2afe9be99d499484d576c02": "1000000000000000000000", + "0x238a6b7635252f5244486c0af0a73a207385e039": "1370000000000000000000", + "0xceb389381d48a8ae4ffc483ad0bb5e204cfdb1ec": "740745000000000000000", + "0x3847667038f33b01c1cc795d8daf5475eff5a0d4": "728330000000000000000", + "0xa08d215b5b6aac4861a281ac7e400b78fef04cbf": "20000000000000000000", + "0x2d0dec51a6e87330a6a8fa2a0f65d88d4abcdf73": "185000000000000000000", + "0x9e8f64ddcde9b8b451bafaa235a9bf511a25ac91": "2674000000000000000000", + "0xddac6bf4bbdd7d597d9c686d0695593bedccc7fa": "865000000000000000000", + "0x22e15158b5ee3e86eb0332e3e6a9ac6cd9b55ecd": "160000000000000000000", + "0x3aea4e82d2400248f99871a41ca257060d3a221b": "1000000000000000000000", + "0xfb126f0ec769f49dcefca2f200286451583084b8": "5013750000000000000000", + "0x1b8bd6d2eca20185a78e7d98e8e185678dac4830": "16700000000000000000000", + "0x664cd67dccc9ac8228b45c55db8d76550b659cdc": "394000000000000000000", + "0x553f37d92466550e9fd775ae74362df030179132": "2000000000000000000000", + "0x730d8763c6a4fd824ab8b859161ef7e3a96a1200": "20000000000000000000000", + "0x04c2c64bb54c3eccd05585e10ec6f99a0cdb01a3": "100000000000000000000", + "0xf1624d980b65336feac5a6d54125005cfcf2aacb": "2000000000000000000000", + "0x0b7fc9ddf70576f6330669eaaa71b6a831e99528": "140000000000000000000", + "0xfa2bbca15d3fe39f8a328e91f90da14f7ac6253d": "200000000000000000000", + "0x07feef54c136850829badc4b49c3f2a73c89fb9e": "118200000000000000000", + "0x3703350c4d6fe337342cddc65bf1e2386bf3f9b2": "2020000000000000000000", + "0x6d7d1c949511f88303808c60c5ea0640fcc02683": "10000000000000000000000", + "0x34fa7792bad8bbd7ff64056214a33eb6600c1ea8": "50000000000000000000", + "0x994cc2b5227ec3cf048512467c41b7b7b748909f": "2000000000000000000000", + "0x08da3a7a0f452161cfbcec311bb68ebfdee17e88": "2000000000000000000000", + "0xbbb4ee1d82f2e156442cc93338a2fc286fa28864": "1370000000000000000000", + "0x7a2dfc770e24368131b7847795f203f3d50d5b56": "11400000000000000000000", + "0x7cef4d43aa417f9ef8b787f8b99d53f1fea1ee88": "1910000000000000000000", + "0xc6a30ef5bb3320f40dc5e981230d52ae3ac19322": "182000000000000000000", + "0x6a74844d8e9cb5581c45079a2e94462a6cee8821": "1082970000000000000000", + "0xc3110be01dc9734cfc6e1ce07f87d77d1345b7e1": "4999998000000000000000", + "0xaeb916ebf49d0f86c13f7331cef19e129937512d": "599908000000000000000", + "0x3e5abd09ce5af7ba8487c359e0f2a93a986b0b18": "10000000000000000000000", + "0xcdd60d73efaad873c9bbfb178ca1b7105a81a681": "32000000000000000000", + "0x31eb123c95c82bf685ace7a75a1881a289efca10": "920034000000000000000", + "0x86e8670e27598ea09c3899ab7711d3b9fe901c17": "200000000000000000000", + "0xa144f6b60f72d64a21e330dadb62d8990ade2b09": "1000000000000000000000", + "0x68883e152e5660fee59626e7e3b4f05110e6222f": "54683300000000000000000", + "0xfe4249127950e2f896ec0e7e2e3d055aab10550f": "668500000000000000000", + "0x403d53cf620f0922b417848dee96c190b5bc8271": "9850000000000000000000", + "0xbec2e6de39c07c2bae556acfbee2c4728b9982e3": "573000000000000000000", + "0xf3c4716d1ee5279a86d0163a14618181e16136c7": "1000000000000000000000", + "0xe38ef28a5ed984a7db24a1ae782dfb87f397dfc6": "143000000000000000000", + "0x30fbe5885f9fcce9ea5edb82ed4a1196dd259aed": "5200000000000000000000", + "0x48bf14d7b1fc84ebf3c96be12f7bce01aa69b03e": "120000000000000000000", + "0xb8d5c324a8209d7c8049d0d4aede02ba80ab578b": "16889329000000000000000", + "0x43d5a71ce8b8f8ae02b2eaf8eaf2ca2840b93fb6": "6000000000000000000000", + "0xf9a59c3cc5ffacbcb67be0fc7256f64c9b127cb4": "2000000000000000000000", + "0x0e21af1b8dbf27fcf63f37e047b87a825cbe7c27": "3000000000000000000000", + "0x1c35aab688a0cd8ef82e76541ba7ac39527f743b": "500000000000000000000", + "0x91ac5cfe67c54aa7ebfba448666c461a3b1fe2e1": "401880000000000000000", + "0x4ba53ab549e2016dfa223c9ed5a38fad91288d07": "1400000000000000000000", + "0x99a4de19ded79008cfdcd45d014d2e584b8914a8": "1500000000000000000000", + "0x4adbf4aae0e3ef44f7dd4d8985cfaf096ec48e98": "150000000000000000000", + "0x9a633fcd112cceeb765fe0418170732a9705e79c": "18200000000000000000", + "0x292f228b0a94748c8eec612d246f989363e08f08": "185000000000000000000", + "0x9f3497f5ef5fe63095836c004eb9ce02e9013b4b": "633424000000000000000", + "0x0e6dfd553b2e873d2aec15bd5fbb3f8472d8d394": "12000000000000000000000", + "0x74ebf4425646e6cf81b109ce7bf4a2a63d84815f": "40000000000000000000", + "0x8ce5e3b5f591d5eca38abf228f2e3c35134bdac0": "2319920000000000000000", + "0x90c41eba008e20cbe927f346603fc88698125969": "42000000000000000000", + "0x382ba76db41b75606dd48a48f0137e9174e031b6": "20000000000000000000", + "0x5d24bdbc1c47f0eb83d128cae48ac33c4817e91f": "1000000000000000000000", + "0xa64e5ffb704c2c9139d77ef61d8cdfa31d7a88e9": "143000000000000000000", + "0xa18360e985f2062e8f8efe02ad2cbc91ad9a5aad": "3000000000000000000000", + "0xd251f903ae18727259eee841a189a1f569a5fd76": "10000000000000000000000", + "0xefa6b1f0db603537826891b8b4bc163984bb40cd": "985000000000000000000", + "0x47fff42c678551d141eb75a6ee398117df3e4a8d": "100010000000000000000", + "0xf2294adbb6f0dcc76e632ebef48ab49f124dbba4": "1443690000000000000000", + "0x53700d53254d430f22781a4a76a463933b5d6b08": "1970000000000000000000", + "0xb14a7aaa8f49f2fb9a8102d6bbe4c48ae7c06fb2": "8000000000000000000000", + "0x9ed4e63f526542d44fddd34d59cd25388ffd6bda": "3885000000000000000000", + "0x4cac91fb83a147d2f76c3267984b910a79933348": "2167000000000000000000", + "0x9b32cf4f5115f4b34a00a64c617de06387354323": "105501000000000000000", + "0xb8bedd576a4b4c2027da735a5bc3f533252a1808": "2000000000000000000000", + "0xc5a3b98e4593fea0b38c4f455a5065f051a2f815": "20309030000000000000000", + "0xeaf52388546ec35aca6f6c6393d8d609de3a4bf3": "20000000000000000000", + "0x4c423c76930d07f93c47a5cc4f615745c45a9d72": "100000000000000000000", + "0x9052f2e4a3e3c12dd1c71bf78a4ec3043dc88b7e": "267400000000000000000", + "0x2bade91d154517620fd4b439ac97157a4102a9f7": "4000000000000000000000", + "0xda698d64c65c7f2b2c7253059cd3d181d899b6b7": "295500000000000000000", + "0xc6d8954e8f3fc533d2d230ff025cb4dce14f3426": "400000000000000000000", + "0x349a816b17ab3d27bbc0ae0051f6a070be1ff29d": "10000000000000000000000", + "0xff4d9c8484c43c42ff2c5ab759996498d323994d": "4000000000000000000000", + "0x22944fbca9b57963084eb84df7c85fb9bcdfb856": "4649845000000000000000", + "0xbfd93c90c29c07bc5fb5fc49aeea55a40e134f35": "28000000000000000000000", + "0x3caedb5319fe806543c56e5021d372f71be9062e": "40000000000000000000000", + "0x9a079c92a629ca15c8cafa2eb28d5bc17af82811": "500000000000000000000", + "0x7d2a52a7cf0c8436a8e007976b6c26b7229d1e15": "438040000000000000000", + "0xcf89f7460ba3dfe83c5a1d3a019ee1250f242f0f": "985177000000000000000", + "0x577bfe64e3a1e3800e94db1c6c184d8dc8aafc66": "1498000000000000000000", + "0x7ffd02ed370c7060b2ae53c078c8012190dfbb75": "10000000000000000000000", + "0x90b62f131a5f29b45571513ee7a74a8f0b232202": "158000000000000000000", + "0x6e8212b722afd408a7a73ed3e2395ee6454a0330": "159000000000000000000", + "0x515f30bc90cdf4577ee47d65d785fbe2e837c6bc": "10166128000000000000000", + "0xc27376f45d21e15ede3b26f2655fcee02ccc0f2a": "20000000000000000000", + "0x3da39ce3ef4a7a3966b32ee7ea4ebc2335a8f11f": "2000000000000000000000", + "0x25259d975a21d83ae30e33f800f53f37dfa01938": "20000000000000000000", + "0x8ed143701f2f72280fd04a7b4164281979ea87c9": "14000000000000000000", + "0x5ac99ad7816ae9020ff8adf79fa9869b7cea6601": "21000000000000000000000", + "0xf51fded80acb502890e87369741f3722514cefff": "20000042000000000000000", + "0xf657fcbe682eb4e8db152ecf892456000b513d15": "1940000000000000000000", + "0x62c37c52b97f4b040b1aa391d6dec152893c4707": "1000000000000000000000", + "0x89fc8e4d386b0d0bb4a707edf3bd560df1ad8f4e": "2955000000000000000000", + "0x53c0bb7fc88ea422d2ef7e540e2d8f28b1bb8183": "20000000000000000000", + "0x56f493a3d108aaa2d18d98922f8efe1662cfb73d": "2020000000000000000000", + "0xe9458f68bb272cb5673a04f781b403556fd3a387": "61000000000000000000", + "0xbe525a33ea916177f17283fca29e8b350b7f530b": "2638000000000000000000", + "0x4feb846be43041fd6b34202897943e3f21cb7f04": "83226000000000000000", + "0x15aa530dc36958b4edb38eee6dd9e3c77d4c9145": "2000000000000000000000", + "0x2458d6555ff98a129cce4037953d00206eff4287": "197000000000000000000", + "0x8035fe4e6b6af27ae492a578515e9d39fa6fa65b": "4000000000000000000000", + "0x296b71c0015819c242a7861e6ff7eded8a5f71e3": "1999800000000000000000", + "0x8f1952eed1c548d9ee9b97d0169a07933be69f63": "1000000000000000000000", + "0xa421dbb89b3a07419084ad10c3c15dfe9b32d0c2": "20000000000000000000000", + "0x554336ee4ea155f9f24f87bca9ca72e253e12cd2": "100000000000000000000", + "0xffc5fc4b7e8a0293ff39a3a0f7d60d2646d37a74": "2000000000000000000000", + "0xea2c197d26e98b0da83e1b72c787618c979d3db0": "19700000000000000000", + "0x96aa573fed2f233410dbae5180145b23c31a02f0": "1730000000000000000000", + "0xc23b2f921ce4a37a259ee4ad8b2158d15d664f59": "25403000000000000000", + "0xd874b9dfae456a929ba3b1a27e572c9b2cecdfb3": "170000000000000000000", + "0xbf8b8005d636a49664f74275ef42438acd65ac91": "200000000000000000000", + "0x441a52001661fac718b2d7b351b7c6fb521a7afd": "400000000000000000000", + "0x812a55c43caedc597218379000ce510d548836fd": "18200000000000000000", + "0x5e90c85877198756b0366c0e17b28e52b446505a": "374288000000000000000", + "0xda3017c150dd0dce7fcf881b0a48d0d1c756c4c7": "100014000000000000000", + "0x6baf7a2a02ae78801e8904ad7ac05108fc56cff6": "1000000000000000000000", + "0x177dae78bc0113d8d39c4402f2a641ae2a105ab8": "1818320000000000000000", + "0x01b5b5bc5a117fa08b34ed1db9440608597ac548": "200000000000000000000", + "0xaae732eda65988c3a00c7f472f351c463b1c968e": "2000000000000000000000", + "0xd95342953c8a21e8b635eefac7819bea30f17047": "94160000000000000000000", + "0x8d616b1eee77eef6f176e0698db3c0c141b2fc8f": "500000000000000000000", + "0x12d20790b7d3dbd88c81a279b812039e8a603bd0": "1604400000000000000000", + "0x3734cb187491ede713ae5b3b2d12284af46b8101": "3000000000000000000000", + "0xdd967c4c5f8ae47e266fb416aad1964ee3e7e8c3": "7750000000000000000000", + "0x3dcef19c868b15d34eda426ec7e04b18b6017002": "1999800000000000000000", + "0xce9d21c692cd3c01f2011f505f870036fa8f6cd2": "400000000000000000000", + "0xd44f6ac3923b5fd731a4c45944ec4f7ec52a6ae4": "10000000000000000000000", + "0xb424d68d9d0d00cec1938c854e15ffb880ba0170": "200000000000000000000", + "0x1f2186ded23e0cf9521694e4e164593e690a9685": "300000000000000000000", + "0x7f4b5e278578c046cceaf65730a0e068329ed5b6": "1880000000000000000000", + "0x8c50aa2a9212bcde56418ae261f0b35e7a9dbb82": "400000000000000000000", + "0x1953313e2ad746239cb2270f48af34d8bb9c4465": "2000000000000000000000", + "0xa15025f595acdbf3110f77c5bf24477e6548f9e8": "2000000000000000000000", + "0x53af32c22fef99803f178cf90b802fb571c61cb9": "3880000000000000000000", + "0xd0a8abd80a199b54b08b65f01d209c27fef0115b": "6525979000000000000000", + "0x2b68306ba7f8daaf73f4c644ef7d2743c0f26856": "864800000000000000000", + "0x96924191b7df655b3319dc6d6137f481a73a0ff3": "4020000000000000000000", + "0x6fa72015fa78696efd9a86174f7f1f21019286b1": "1337000000000000000000", + "0x0b119df99c6b8de58a1e2c3f297a6744bf552277": "2000000000000000000000", + "0x61733947fab820dbd351efd67855ea0e881373a0": "20000000000000000000", + "0x8ae6f80b70e1f23c91fbd5a966b0e499d95df832": "197000000000000000000", + "0x01a7d9fa7d0eb1185c67e54da83c2e75db69e39f": "7623900000000000000000", + "0x9932ef1c85b75a9b2a80057d508734c51085becc": "50170000000000000000", + "0xaefcfe88c826ccf131d54eb4ea9eb80e61e1ee25": "340000000000000000000", + "0xc21fa6643a1f14c02996ad7144b75926e87ecb4b": "20000000000000000000000", + "0x97d9e46a7604d7b5a4ea4ee61a42b3d2350fc3ed": "2000000000000000000000", + "0x3cafaf5e62505615068af8eb22a13ad8a9e55070": "1999600000000000000000", + "0x22f2dcff5ad78c3eb6850b5cb951127b659522e6": "13700000000000000000", + "0xaaad1baade5af04e2b17439e935987bf8c2bb4b9": "2000000000000000000000", + "0x298887bab57c5ba4f0615229d7525fa113b7ea89": "40000000000000000000", + "0x7539333046deb1ef3c4daf50619993f444e1de68": "1182000000000000000000", + "0x9752d14f5e1093f071711c1adbc4e3eb1e5c57f3": "2000000000000000000000", + "0xed641e06368fb0efaa1703e01fe48f4a685309eb": "200000000000000000000", + "0xd0ee4d02cf24382c3090d3e99560de3678735cdf": "2400000000000000000000", + "0x47e25df8822538a8596b28c637896b4d143c351d": "80500000000000000000000", + "0x559706c332d20779c45f8a6d046a699159b74921": "380123000000000000000", + "0x3a4da78dce05aeb87de9aead9185726da1926798": "200000000000000000000", + "0x3041445a33ba158741160d9c344eb88e5c306f94": "60000000000000000000", + "0x08d4311c9c1bbaf87fabe1a1d01463828d5d98ce": "90000000000000000000000", + "0x6bd3e59f239fafe4776bb9bddd6bee83ba5d9d9f": "1000000000000000000000", + "0x29eaae82761762f4d2db53a9c68b0f6b0b6d4e66": "2000000000000000000000", + "0x0b7d339371e5be6727e6e331b5821fa24bdb9d5a": "857738000000000000000", + "0x4714cfa4f46bd6bd70737d75878197e08f88e631": "11792000000000000000000", + "0xad92ca066edb7c711dfc5b166192d1edf8e77185": "36000000000000000000000", + "0xf97b56ebd5b77abc9fbacbabd494b9d2c221cd03": "1970000000000000000000", + "0x591bef3171d1c5957717a4e98d17eb142c214e56": "20000000000000000000000", + "0x899b3c249f0c4b81df75d212004d3d6d952fd223": "2000000000000000000000", + "0xa819d2ece122e028c8e8a04a064d02b9029b08b9": "1000000000000000000000", + "0xe341642d40d2afce2e9107c67079ac7a2660086c": "400000000000000000000", + "0x0329188f080657ab3a2afa522467178279832085": "216700000000000000000", + "0x03317826d1f70aa4bddfa09be0c4105552d2358b": "38800000000000000000", + "0x3ac9dc7a436ae98fd01c7a9621aa8e9d0b8b531d": "1790000000000000000000", + "0x93c88e2d88621e30f58a9586bed4098999eb67dd": "31200000000000000000000", + "0xcd1e66ed539dd92fc40bbaa1fa16de8c02c14d45": "230000000000000000000", + "0xe6c81ffcecb47ecdc55c0b71e4855f3e5e97fc1e": "334250000000000000000", + "0x50f8fa4bb9e2677c990a4ee8ce70dd1523251e4f": "26030000000000000000", + "0x4f64a85e8e9a40498c0c75fceb0337fb49083e5e": "1000000000000000000000", + "0x4b29437c97b4a844be71cca3b648d4ca0fdd9ba4": "150200000000000000000", + "0x1eee6cbee4fe96ad615a9cf5857a647940df8c78": "19400000000000000000", + "0x29f0edc60338e7112085a1d114da8c42ce8f55d6": "2958000000000000000000", + "0x23b1c4917fbd93ee3d48389306957384a5496cbf": "4000086000000000000000", + "0x1767525c5f5a22ed80e9d4d7710f0362d29efa33": "400000000000000000000", + "0x3064899a963c4779cbf613cd6980846af1e6ec65": "6999908000000000000000", + "0x68531f4dda808f5320767a03113428ca0ce2f389": "19400000000000000000", + "0x1db9ac9a9eaeec0a523757050c71f47278c72d50": "1337000000000000000000", + "0x7592c69d067b51b6cc639d1164d5578c60d2d244": "20000000000000000000", + "0xcf3fbfa1fd32d7a6e0e6f8ef4eab57be34025c4c": "1063120000000000000000", + "0x8efec058cc546157766a632775404a334aaada87": "1999000000000000000000", + "0xfaf5f0b7b6d558f5090d9ea1fb2d42259c586078": "6401000000000000000000", + "0x19ecf2abf40c9e857b252fe1dbfd3d4c5d8f816e": "2000000000000000000000", + "0x6e8a26689f7a2fdefd009cbaaa5310253450daba": "2049982000000000000000", + "0xe2f40d358f5e3fe7463ec70480bd2ed398a7063b": "20000000000000000000", + "0xfa19d6f7a50f4f079893d167bf14e21d0073d196": "530000000000000000000", + "0x3e2ca0d234baf607ad466a1b85f4a6488ef00ae7": "89505000000000000000", + "0xf8a49ca2390c1f6d5c0e62513b079571743f7cc6": "3000000000000000000000", + "0x5d3f3b1f7130b0bb21a0fd32396239179a25657f": "62474000000000000000000", + "0xf332c0f3e05a27d9126fd0b641a8c2d4060608fd": "5001041000000000000000", + "0xe304a32f05a83762744a9542976ff9b723fa31ea": "1576256000000000000000", + "0xf768f321fd6433d96b4f354d3cc1652c1732f57f": "10000000000000000000000", + "0x147af46ae9ccd18bb35ca01b353b51990e49dce1": "4000000000000000000000", + "0x21eae6feffa9fbf4cd874f4739ace530ccbe5937": "5000000000000000000000", + "0x6994fb3231d7e41d491a9d68d1fa4cae2cc15960": "4000000000000000000000", + "0x51126446ab3d8032557e8eba65597d75fadc815c": "322000000000000000000", + "0x24daaaddf7b06bbcea9b80590085a88567682b4e": "319008000000000000000", + "0xcd020f8edfcf524798a9b73a640334bbf72f80a5": "133700000000000000000", + "0x56febf9e1003af15b1bd4907ec089a4a1b91d268": "200000000000000000000", + "0x3c79c863c3d372b3ff0c6f452734a7f97042d706": "176000000000000000000", + "0xe1203eb3a723e99c2220117ca6afeb66fa424f61": "9461996000000000000000", + "0x18fb09188f27f1038e654031924f628a2106703d": "2000000000000000000000", + "0x2eba0c6ee5a1145c1c573984963a605d880a7a20": "500000000000000000000", + "0x4cefbe2398e47d52e78db4334c8b697675f193ae": "4011000000000000000000", + "0xc02471e3fc2ea0532615a7571d493289c13c36ef": "20000000000000000000", + "0xba469aa5c386b19295d4a1b5473b540353390c85": "2000000000000000000000", + "0x7b11673cc019626b290cbdce26046f7e6d141e21": "500000000000000000000", + "0x26784ade91c8a83a8e39658c8d8277413ccc9954": "6000000000000000000000", + "0x57d3df804f2beee6ef53ab94cb3ee9cf524a18d3": "393606000000000000000", + "0xccae0d3d852a7da3860f0636154c0a6ca31628d4": "106560000000000000000", + "0xbfe3a1fc6e24c8f7b3250560991f93cba2cf8047": "80000000000000000000000", + "0x724ce858857ec5481c86bd906e83a04882e5821d": "3000000000000000000000", + "0xfb37cf6b4f81a9e222fba22e9bd24b5098b733cf": "38800000000000000000", + "0x9b22a80d5c7b3374a05b446081f97d0a34079e7f": "3000000000000000000000", + "0x0a29a8a4d5fd950075ffb34d77afeb2d823bd689": "200000000000000000000", + "0xd01af9134faf5257174e8b79186f42ee354e642d": "1000000000000000000000", + "0x7f1619988f3715e94ff1d253262dc5581db3de1c": "900000000000000000000", + "0x6f137a71a6f197df2cbbf010dcbd3c444ef5c925": "2000000000000000000000", + "0x11efb8a20451161b644a8ccebbc1d343a3bbcb52": "3200000000000000000000", + "0x46504e6a215ac83bccf956befc82ab5a679371c8": "518898000000000000000", + "0xb523fff9749871b35388438837f7e6e0dea9cb6b": "2000000000000000000000", + "0xc5c6a4998a33feb764437a8be929a73ba34a0764": "50000000000000000000000", + "0x3cd7f7c7c2353780cde081eeec45822b25f2860c": "200000000000000000000", + "0xb3050beff9de33c80e1fa15225e28f2c413ae313": "700000000000000000000", + "0x59268171b833e0aa13c54b52ccc0422e4fa03aeb": "3000000000000000000000", + "0x7169724ee72271c534cad6420fb04ee644cb86fe": "410164000000000000000", + "0x6e6d5bbbb9053b89d744a27316c2a7b8c09b547d": "909831000000000000000", + "0x3f3f46b75cabe37bfacc8760281f4341ca7f463d": "602709000000000000000", + "0x7a33834e8583733e2d52aead589bd1affb1dd256": "1000000000000000000000", + "0xe94ded99dcb572b9bb1dcba32f6dee91e057984e": "394000000000000000000", + "0x19336a236ded755872411f2e0491d83e3e00159e": "940000000000000000000", + "0x63ac545c991243fa18aec41d4f6f598e555015dc": "600000000000000000000", + "0xcfee05c69d1f29e7714684c88de5a16098e91399": "1970000000000000000000", + "0x77be6b64d7c733a436adec5e14bf9ad7402b1b46": "1000000000000000000000", + "0x233bdddd5da94852f4ade8d212885682d9076bc6": "4000000000000000000000", + "0x952c57d2fb195107d4cd5ca300774119dfad2f78": "2000000000000000000000", + "0xe237baa4dbc9926e32a3d85d1264402d54db012f": "2000000000000000000000", + "0xaa91237e740d25a92f7fa146faa18ce56dc6e1f3": "925000000000000000000", + "0x2339e9492870afea2537f389ac2f838302a33c06": "2000000000000000000000", + "0x1d45586eb803ca2190650bf748a2b174312bb507": "1400000000000000000000", + "0xc61446b754c24e3b1642d9e51765b4d3e46b34b6": "2000000000000000000000", + "0xac28b5edea05b76f8c5f97084541277c96696a4c": "1000000000000000000000", + "0x1a1c9a26e0e02418a5cf687da75a275c622c9440": "5000000000000000000000", + "0x299368609042a858d1ecdf1fc0ada5eaceca29cf": "2000000000000000000000", + "0x095f5a51d06f6340d80b6d29ea2e88118ad730fe": "2000200000000000000000", + "0x751a2ca34e7187c163d28e3618db28b13c196d26": "500000000000000000000", + "0x75b0e9c942a4f0f6f86d3f95ff998022fa67963b": "1490000000000000000000", + "0xd1b37f03cb107424e9c4dd575ccd4f4cee57e6cd": "2000000000000000000000", + "0x7f993ddb7e02c282b898f6155f680ef5b9aff907": "20000000000000000000000", + "0xa3d583a7b65b23f60b7905f3e4aa62aac87f4227": "1046779000000000000000", + "0x526bb533b76e20c8ee1ebf123f1e9ff4148e40be": "197000000000000000000", + "0x2160b4c02cac0a81de9108de434590a8bfe68735": "1970000000000000000000", + "0x010007394b8b7565a1658af88ce463499135d6b7": "100000000000000000000", + "0x64457fa33b0832506c4f7d1180dce48f46f3e0ff": "2000000000000000000000", + "0xb51e558eb5512fbcfa81f8d0bd938c79ebb5242b": "715000000000000000000", + "0x94f13f9f0836a3ee2437a84922d2984dc0f7d53b": "2999916000000000000000", + "0x6bd457ade051795df3f2465c3839aed3c5dee978": "999925000000000000000", + "0xf3dbcf135acb9dee1a489c593c024f03c2bbaece": "2000000000000000000000", + "0x61b902c5a673885826820d1fe14549e4865fbdc2": "334703000000000000000", + "0x2acc9c1a32240b4d5b2f777a2ea052b42fc1271c": "41764000000000000000000", + "0x6ddfef639155daab0a5cb4953aa8c5afaa880453": "1820000000000000000000", + "0x96ff6f509968f36cb42cba48db32f21f5676abf8": "1970000000000000000000", + "0xb4c8170f7b2ab536d1d9a25bdd203ae1288dc3d5": "200000000000000000000", + "0x78d4f8c71c1e68a69a98f52fcb45da8af56ea1a0": "2000000000000000000000", + "0xdec99e972fca7177508c8e1a47ac22d768acab7c": "2000000000000000000000", + "0xa07aa16d74aee8a9a3288d52db1551d593883297": "600000000000000000000", + "0xcf1169041c1745e45b172435a2fc99b49ace2b00": "31960000000000000000", + "0x526cb09ce3ada3672eec1deb46205be89a4b563e": "2468000000000000000000", + "0xee6959de2b67967b71948c891ab00d8c8f38c7dc": "118200000000000000000", + "0xca7ba3ff536c7e5f0e153800bd383db8312998e0": "169600000000000000000", + "0x1ed06ee51662a86c634588fb62dc43c8f27e7c17": "200000000000000000000", + "0x730447f97ce9b25f22ba1afb36df27f9586beb9b": "820000000000000000000", + "0xae5c9bdad3c5c8a1220444aea5c229c1839f1d64": "477500000000000000000", + "0xa38306cb70baa8e49186bd68aa70a83d242f2907": "2000000000000000000000", + "0x71213fca313404204ecba87197741aa9dfe96338": "60000000000000000000", + "0x10e390ad2ba33d82b37388d09c4544c6b0225de5": "200000000000000000000", + "0x3b6e814f770748a7c3997806347605480a3fd509": "2000000000000000000000", + "0xfd452c3969ece3801c542020f1cdcaa1c71ed23d": "100000000000000000000000", + "0xe742b1e6069a8ffc3c4767235defb0d49cbed222": "800000000000000000000", + "0xd7225738dcf3578438f8e7c8b3837e42e04a262f": "445860000000000000000", + "0xcd0b0257e783a3d2c2e3ba9d6e79b75ef98024d4": "2945500000000000000000", + "0xe80e7fef18a5db15b01473f3ad6b78b2a2f8acd9": "500000000000000000000", + "0x261575e9cf59c8226fa7aaf91de86fb70f5ac3ae": "300022000000000000000", + "0x7e71171f2949fa0c3ac254254b1f0440e5e6a038": "40000000000000000000", + "0x96ea6ac89a2bac95347b51dba63d8bd5ebdedce1": "2000000000000000000000", + "0xe6ec5cf0c49b9c317e1e706315ef9eb7c0bf11a7": "17200000000000000000000", + "0x2b99b42e4f42619ee36baa7e4af2d65eacfcba35": "40000000000000000000000", + "0xc6e4cc0c7283fc1c85bc4813effaaf72b49823c0": "276926000000000000000", + "0xdbc1ce0e49b1a705d22e2037aec878ee0d75c703": "250000000000000000000", + "0x806f44bdeb688037015e84ff218049e382332a33": "1999000000000000000000", + "0x1a3a330e4fcb69dbef5e6901783bf50fd1c15342": "4200000000000000000000", + "0xd2a84f75675c62d80c88756c428eee2bcb185421": "1200000000000000000000", + "0xc593b546b7698710a205ad468b2c13152219a342": "1550000000000000000000", + "0x3f627a769e6a950eb87017a7cd9ca20871136831": "13790000000000000000000", + "0xf2d5763ce073127e2cedde6faba786c73ca94141": "7900000000000000000000", + "0x162110f29eac5f7d02b543d8dcd5bb59a5e33b73": "2000000000000000000000", + "0x59473cd300fffae240f5785626c65dfec792b9af": "20000000000000000000", + "0x4dcd11815818ae29b85d01367349a8a7fb12d06b": "7900000000000000000000", + "0x9329ffdc268babde8874b366406c81445b9b2d35": "422415000000000000000", + "0x0ab4281ebb318590abb89a81df07fa3af904258a": "500000000000000000000", + "0x875061ee12e820041a01942cb0e65bb427b00060": "2800000000000000000000", + "0xc9b698e898d20d4d4f408e4e4d061922aa856307": "40000000000000000000", + "0xca49a5f58adbefae23ee59eea241cf0482622eaa": "1430000000000000000000", + "0x196e85df7e732b4a8f0ed03623f4db9db0b8fa31": "21165000000000000000", + "0x4c760cd9e195ee4f2d6bce2500ff96da7c43ee91": "60000000000000000000000", + "0x024a098ae702bef5406c9c22b78bd4eb2cc7a293": "4000000000000000000000", + "0x9d81aea69aed6ad07089d61445348c17f34bfc5b": "300000000000000000000", + "0x76ab87dd5a05ad839a4e2fc8c85aa6ba05641730": "2000000000000000000000", + "0xc6e2f5af979a03fd723a1b6efa728318cf9c1800": "668500000000000000000", + "0x5db69fe93e6fb6fbd450966b97238b110ad8279a": "40000000000000000000000", + "0xa4259f8345f7e3a8b72b0fec2cf75e321fda4dc2": "1910000000000000000000", + "0x095030e4b82692dcf8b8d0912494b9b378ec9328": "1340000000000000000000", + "0x4b470f7ba030bc7cfcf338d4bf0432a91e2ea5ff": "2000000000000000000000", + "0x99c9f93e45fe3c1418c353e4c5ac3894eef8121e": "101870000000000000000", + "0xffac3db879a6c7158e8dec603b407463ba0d31cf": "1970000000000000000000", + "0xac8e87ddda5e78fcbcb9fa7fc3ce038f9f7d2e34": "2000000000000000000000", + "0x7a0589b143a8e5e107c9ac66a9f9f8597ab3e7ab": "1510990000000000000000", + "0xb7d581fe0af1ec383f3b3c416783f385146a7612": "20000000000000000000000", + "0xbb3fc0a29c034d710812dcc775c8cab9d28d6975": "1066806000000000000000", + "0x2c603ff0fe93616c43573ef279bfea40888d6ae7": "4740000000000000000000", + "0x15f2b7b16432ee50a5f55b41232f6334ed58bdc0": "400000000000000000000", + "0x7f3d7203c8a447f7bf36d88ae9b6062a5eee78ae": "6000000000000000000000", + "0xf067e1f1d683556a4cc4fd0c0313239f32c4cfd8": "1000000000000000000000", + "0x52738c90d860e04cb12f498d96fdb5bf36fc340e": "30000000000000000000", + "0x45781bbe7714a1c8f73b1c747921df4f84278b70": "2000000000000000000000", + "0x4a97e8fcf4635ea7fc5e96ee51752ec388716b60": "546000000000000000000", + "0x54939ff08921b467cf2946751d856378296c63ed": "1000000000000000000000", + "0x6485470e61db110aebdbafd536769e3c599cc908": "600000000000000000000", + "0xe20d1bcb71286dc7128a9fc7c6ed7f733892eef5": "1003400000000000000000", + "0xd6eea898d4ae2b718027a19ce9a5eb7300abe3ca": "27475000000000000000", + "0x014974a1f46bf204944a853111e52f1602617def": "2000000000000000000000", + "0x6aa5732f3b86fb8c81efbe6b5b47b563730b06c8": "1000000000000000000000", + "0x6107d71dd6d0eefb11d4c916404cb98c753e117d": "2000000000000000000000", + "0xdd7bcda65924aaa49b80984ae173750258b92847": "10000000000000000000000", + "0x4e7b54474d01fefd388dfcd53b9f662624418a05": "8000000000000000000000", + "0x24fc73d20793098e09ddab5798506224fa1e1850": "200000000000000000000", + "0x2b8488bd2d3c197a3d26151815b5a798d27168dc": "6680000000000000000000", + "0x949131f28943925cfc97d41e0cea0b262973a730": "2800000000000000000000", + "0x60b8d6b73b79534fb08bb8cbcefac7f393c57bfe": "1760000000000000000000", + "0xd6acc220ba2e51dfcf21d443361eea765cbd35d8": "20000000000000000000", + "0xc4c6cb723dd7afa7eb535615e53f3cef14f18118": "1999999000000000000000", + "0x4c9a862ad115d6c8274ed0b944bdd6a5500510a7": "100000000000000000000", + "0x85732c065cbd64119941aed430ac59670b6c51c4": "731345000000000000000", + "0x0126e12ebc17035f35c0e9d11dd148393c405d7a": "1999600000000000000000", + "0x472048cc609aeb242165eaaa8705850cf3125de0": "1000000000000000000000", + "0xd2edd1ddd6d86dc005baeb541d22b640d5c7cae5": "20000000000000000000", + "0x4549b15979255f7e65e99b0d5604db98dfcac8bf": "4000000000000000000000", + "0xc6c7c191379897dd9c9d9a33839c4a5f62c0890d": "4000085000000000000000", + "0xd367009ab658263b62c2333a1c9e4140498e1389": "2000000000000000000000", + "0x143f5f1658d9e578f4f3d95f80c0b1bd3933cbda": "1490000000000000000000", + "0x1a09fdc2c7a20e23574b97c69e93deba67d37220": "1998000000000000000000", + "0xac8b509aefea1dbfaf2bb33500d6570b6fd96d51": "1820000000000000000000", + "0x16ffac84032940f0121a09668b858a7e79ffa3bb": "3879210000000000000000", + "0xf338459f32a159b23db30ac335769ab2351aa63c": "30000000000000000000000", + "0xd82251456dc1380f8f5692f962828640ab9f2a03": "4879980000000000000000", + "0x47f4696bd462b20da09fb83ed2039818d77625b3": "149000000000000000000", + "0x3dde8b15b3ccbaa5780112c3d674f313bba68026": "1773000000000000000000", + "0xf70d637a845c06db6cdc91e6371ce7c4388a628e": "20000000000000000000", + "0x68295e8ea5afd9093fc0a465d157922b5d2ae234": "19982000000000000000", + "0x614e8bef3dd2c59b59a4145674401018351884ea": "20000000000000000000", + "0x4737d042dc6ae73ec73ae2517acea2fdd96487c5": "1000000000000000000000", + "0xcec6fc65853f9cce5f8e844676362e1579015f02": "2000000000000000000000", + "0xae47e2609cfafe369d66d415d939de05081a9872": "27060000000000000000000", + "0x09a928d528ec1b3e25ffc83e218c1e0afe8928c7": "18200000000000000000", + "0x9b444fd337e5d75293adcfff70e1ea01db023222": "100000000000000000000", + "0x168bdec818eafc6d2992e5ef54aa0e1601e3c561": "1000110000000000000000", + "0x353dbec42f92b50f975129b93c4c997375f09073": "1999000000000000000000", + "0x6fcc2c732bdd934af6ccd16846fb26ef89b2aa9b": "10001242000000000000000", + "0x6f2576da4de283bbe8e3ee69ddd66e5e711db3f5": "1260800000000000000000", + "0x3a3dd104cd7eb04f21932fd433ea7affd39369f5": "357500000000000000000", + "0xd44f4ac5fad76bdc1537a3b3af6472319b410d9d": "1600000000000000000000", + "0x3d9d6be57ff83e065985664f12564483f2e600b2": "2041600000000000000000", + "0x88f1045f19f2d3191816b1df18bb6e1435ad1b38": "240000000000000000000", + "0xddab75fb2ff9fecb88f89476688e2b00e367ebf9": "19400000000000000000000", + "0x092e815558402d67f90d6bfe6da0b2fffa91455a": "60000000000000000000", + "0xa7024cfd742c1ec13c01fea18d3042e65f1d5dee": "11272229000000000000000", + "0x7f46bb25460dd7dae4211ca7f15ad312fc7dc75c": "6685000000000000000000", + "0x93f18cd2526040761488c513174d1e7963768b2c": "2416500000000000000000", + "0x352f25babf4a690673e35195efa8f79d05848aad": "66800000000000000000000", + "0xf7b151cc5e571c17c76539dbe9964cbb6fe5de79": "2148000000000000000000", + "0xff3eee57c34d6dae970d8b311117c53586cd3502": "1700000000000000000000", + "0xae6f0c73fdd77c489727512174d9b50296611c4c": "6000000000000000000000", + "0x7819b0458e314e2b53bfe00c38495fd4b9fdf8d6": "20000000000000000000", + "0x7fdba031c78f9c096d62d05a369eeab0bccc55e5": "2800000000000000000000", + "0x735e328666ed5637142b3306b77ccc5460e72c3d": "1968682000000000000000", + "0x0bfbb6925dc75e52cf2684224bbe0550fea685d3": "1970000000000000000000", + "0x6be16313643ebc91ff9bb1a2e116b854ea933a45": "500000000000000000000", + "0xd6acffd0bfd99c382e7bd56ff0e6144a9e52b08e": "160000000000000000000", + "0x276a006e3028ecd44cdb62ba0a77ce94ebd9f10f": "1800000000000000000000", + "0x10711c3dda32317885f0a2fd8ae92e82069b0d0b": "4000000000000000000000", + "0x43cb9652818c6f4d6796b0e89409306c79db6349": "2000000000000000000000", + "0x7109dd011d15f3122d9d3a27588c10d77744508b": "2000000000000000000000", + "0x3497dd66fd118071a78c2cb36e40b6651cc82598": "109600000000000000000", + "0x9bf672d979b36652fc5282547a6a6bc212ae4368": "656000000000000000000", + "0xeaed16eaf5daab5bf0295e5e077f59fb8255900b": "4000000000000000000000", + "0x7ac58f6ffc4f8107ae6e30378e4e9f99c57fbb24": "40000000000000000000", + "0x45a570dcc2090c86a6b3ea29a60863dde41f13b5": "232500000000000000000", + "0x433a3b68e56b0df1862b90586bbd39c840ff1936": "2000000000000000000000", + "0xe8eaf12944092dc3599b3953fa7cb1c9761cc246": "1800000000000000000000", + "0xec11362cec810985d0ebbd7b73451444985b369f": "30000047000000000000000", + "0x78e83f80b3678c7a0a4e3e8c84dccde064426277": "1790000000000000000000", + "0x0cc67f8273e1bae0867fd42e8b8193d72679dbf8": "500000000000000000000", + "0xc70d856d621ec145303c0a6400cd17bbd6f5eaf7": "20000000000000000000", + "0xf468906e7edf664ab0d8be3d83eb7ab3f7ffdc78": "1700000000000000000000", + "0x3c286cfb30146e5fd790c2c8541552578de334d8": "10203000000000000000000", + "0xc401c427cccff10decb864202f36f5808322a0a8": "3329300000000000000000", + "0xafd019ff36a09155346b69974815a1c912c90aa4": "2000000000000000000000", + "0x96fe59c3dbb3aa7cc8cb62480c65e56e6204a7e2": "20000000000000000000000", + "0xa47779d8bc1c7bce0f011ccb39ef68b854f8de8f": "2000000000000000000000", + "0x58c650ced40bb65641b8e8a924a039def46854df": "18500000000000000000", + "0x86f4f40ad984fbb80933ae626e0e42f9333fdd41": "1000000000000000000000", + "0xb22d5055d9623135961e6abd273c90deea16a3e7": "1400000000000000000000", + "0xee3564f5f1ba0f94ec7bac164bddbf31c6888b55": "100000000000000000000", + "0xcf26b47bd034bc508e6c4bcfd6c7d30034925761": "1800000000000000000000", + "0xe87dbac636a37721df54b08a32ef4959b5e4ff82": "2000000000000000000000", + "0x3bf86ed8a3153ec933786a02ac090301855e576b": "450000000000000000000000", + "0xcfd2728dfb8bdbf3bf73598a6e13eaf43052ea2b": "170000000000000000000", + "0x85b16f0b8b34dff3804f69e2168a4f7b24d1042b": "317000000000000000000", + "0x84db1459bb00812ea67ecb3dc189b72187d9c501": "148851000000000000000", + "0x8c3a9ee71f729f236cba3867b4d79d8ceee25dbc": "100000000000000000000", + "0xe677c31fd9cb720075dca49f1abccd59ec33f734": "7800000000000000000000", + "0x8889448316ccf14ed86df8e2f478dc63c4338340": "15200000000000000000", + "0xb279c7d355c2880392aad1aa21ee867c3b3507df": "1261000000000000000000", + "0x12b5e28945bb2969f9c64c63cc05b6f1f8d6f4d5": "7722162000000000000000", + "0x8d2303341e1e1eb5e8189bde03f73a60a2a54861": "100000000000000000000", + "0x94d81074db5ae197d2bb1373ab80a87d121c4bd3": "9400000000000000000000", + "0x752c9febf42f66c4787bfa7eb17cf5333bba5070": "1966448000000000000000", + "0x16816aac0ede0d2d3cd442da79e063880f0f1d67": "2000000000000000000000", + "0xdaac91c1e859d5e57ed3084b50200f9766e2c52b": "400000000000000000000", + "0x32c2fde2b6aabb80e5aea2b949a217f3cb092283": "5614827000000000000000", + "0xcdab46a5902080646fbf954204204ae88404822b": "544942000000000000000", + "0xfdf42343019b0b0c6bf260b173afab7e45b9d621": "1999944000000000000000", + "0x791f6040b4e3e50dcf3553f182cd97a90630b75d": "4000000000000000000000", + "0x4b762166dd1118e84369f804c75f9cd657bf730c": "500000000000000000000", + "0xa76d3f156251b72c0ccf4b47a3393cbd6f49a9c5": "1337000000000000000000", + "0xc5eb42295e9cadeaf2af12dede8a8d53c579c469": "3820000000000000000000", + "0xdb9371b30c4c844e59e03e924be606a938d1d310": "2000000000000000000000", + "0x2cd39334ac7eac797257abe3736195f5b4b5ce0f": "99964000000000000000", + "0xad44357e017e244f476931c7b8189efee80a5d0a": "300000000000000000000", + "0x4ca7b717d9bc8793b04e051a8d23e1640f5ba5e3": "1248980000000000000000", + "0x73e4a2b60cf48e8baf2b777e175a5b1e4d0c2d8f": "100000000000000000000", + "0x5a1d2d2d1d520304b6208849570437eb3091bb9f": "1970000000000000000000", + "0x53047dc8ac9083d90672e8b3473c100ccd278323": "40000000000000000000", + "0x26fe174cbf526650e0cd009bd6126502ce8e684d": "11640000000000000000000", + "0xe2df23f6ea04becf4ab701748dc0963184555cdb": "2000000000000000000000", + "0xc1170dbaadb3dee6198ea544baec93251860fda5": "1200000000000000000000", + "0x8bbeacfc29cfe93402db3c41d99ab759662e73ec": "2000000000000000000000", + "0x165305b787322e25dc6ad0cefe6c6f334678d569": "2000000000000000000000", + "0x095457f8ef8e2bdc362196b9a9125da09c67e3ab": "200000000000000000000", + "0x702802f36d00250fab53adbcd696f0176f638a49": "2000000000000000000000", + "0x489334c2b695c8ee0794bd864217fb9fd8f8b135": "18200000000000000000", + "0xfa8cf4e627698c5d5788abb7880417e750231399": "4244640000000000000000", + "0x3329eb3baf4345d600ced40e6e9975656f113742": "4999711000000000000000", + "0xb4dd5499daeb2507fb2de12297731d4c72b16bb0": "20000000000000000000", + "0x88c2516a7cdb09a6276d7297d30f5a4db1e84b86": "4000000000000000000000", + "0x612ced8dc0dc9e899ee46f7962333315f3f55e44": "338830000000000000000", + "0xd71e43a45177ad51cbe0f72184a5cb503917285a": "200000000000000000000", + "0x2fb566c94bbba4e3cb67cdda7d5fad7131539102": "2000000000000000000000", + "0x03be5b4629aefbbcab9de26d39576cb7f691d764": "200550000000000000000", + "0x025367960304beee34591118e9ac2d1358d8021a": "2000000000000000000000", + "0xa5d5b8b62d002def92413710d13b6ff8d4fc7dd3": "400000000000000000000", + "0xdf3b72c5bd71d4814e88a62321a93d4011e3578b": "4000000000000000000000", + "0x3588895ac9fbafec012092dc05c0c302d90740fa": "3000000000000000000000", + "0x6021e85a8814fce1e82a41abd1d3b2dad2faefe0": "2000000000000000000000", + "0x17ee9f54d4ddc84d670eff11e54a659fd72f4455": "16000000000000000000000", + "0x873c6f70efb6b1d0f2bbc57eebcd70617c6ce662": "1013478000000000000000", + "0x1fcc7ce6a8485895a3199e16481f72e1f762defe": "1000000000000000000000", + "0xd0a7209b80cf60db62f57d0a5d7d521a69606655": "160000000000000000000", + "0xa514d00edd7108a6be839a638db2415418174196": "30000000000000000000000", + "0x046377f864b0143f282174a892a73d3ec8ec6132": "191000000000000000000", + "0xc126573d87b0175a5295f1dd07c575cf8cfa15f2": "10000000000000000000000", + "0x0e123d7da6d1e6fac2dcadd27029240bb39052fe": "1000000000000000000000", + "0xad5a8d3c6478b69f657db3837a2575ef8e1df931": "36990000000000000000", + "0xdb882eacedd0eff263511b312adbbc59c6b8b25b": "9100000000000000000000", + "0x0b43bd2391025581d8956ce42a072579cbbfcb14": "18800000000000000000", + "0xaffea0473722cb7f0e0e86b9e11883bf428d8d54": "1940000000000000000000", + "0xe32b1c4725a1875449e98f970eb3e54062d15800": "200000000000000000000", + "0x98f4af3af0aede5fafdc42a081ecc1f89e3ccf20": "9400000000000000000000", + "0x3b4768fd71e2db2cbe7fa050483c27b4eb931df3": "2000000000000000000000", + "0xd5f7c41e07729dfa6dfc64c4423160a22c609fd3": "1790000000000000000000", + "0xd944c8a69ff2ca1249690c1229c7192f36251062": "1970000000000000000000", + "0x5ae64e853ba0a51282cb8db52e41615e7c9f733f": "2000000000000000000000", + "0xb13f93af30e8d7667381b2b95bc1a699d5e3e129": "420000000000000000000", + "0x8a20e5b5cee7cd1f5515bace3bf4f77ffde5cc07": "80000000000000000000", + "0x2448596f91c09baa30bc96106a2d37b5705e5d28": "2000000000000000000000", + "0xccca24d8c56d6e2c07db086ec07e585be267ac8d": "200000000000000000000", + "0xf67bb8e2118bbcd59027666eedf6943ec9f880a5": "4000000000000000000000", + "0x7ae659eb3bc46852fa86fac4e21c768d50388945": "286000000000000000000", + "0x467e0ed54f3b76ae0636176e07420815a021736e": "2000000000000000000000", + "0xa46cd237b63eea438c8e3b6585f679e4860832ac": "1000000000000000000000", + "0x6b760d4877e6a627c1c967bee451a8507ddddbab": "910000000000000000000", + "0x593044670faeff00a55b5ae051eb7be870b11694": "133700000000000000000", + "0x533c06928f19d0a956cc28866bf6c8d8f4191a94": "292320000000000000000", + "0x262dc1364ccf6df85c43268ee182554dae692e29": "4927600000000000000000", + "0xe4368bc1420b35efda95fafbc73090521916aa34": "4000000000000000000000", + "0xfeb92d30bf01ff9a1901666c5573532bfa07eeec": "1000000000000000000000", + "0xee25b9a7032679b113588ed52c137d1a053a1e94": "199820000000000000000", + "0x20134cbff88bfadc466b52eceaa79857891d831e": "1000000000000000000000", + "0x07b1a306cb4312df66482c2cae72d1e061400fcd": "20000000000000000000000", + "0xe791d585b89936b25d298f9d35f9f9edc25a2932": "2000000000000000000000", + "0x2e6933543d4f2cc00b5350bd8068ba9243d6beb0": "2000000000000000000000", + "0xdae0d33eaa341569fa9ff5982684854a4a328a6e": "1000000000000000000000", + "0x125cc5e4d56b2bcc2ee1c709fb9e68fb177440bd": "2000000000000000000000", + "0xec99e95dece46ffffb175eb6400fbebb08ee9b95": "100000000000000000000", + "0xc538a0ff282aaa5f4b75cfb62c70037ee67d4fb5": "2000000000000000000000", + "0x60676d1fa21fca052297e24bf96389c5b12a70d7": "241500000000000000000", + "0x4b3dfbdb454be5279a3b8addfd0ed1cd37a9420d": "2000000000000000000000", + "0xcdb597299030183f6e2d238533f4642aa58754b6": "400000000000000000000", + "0x1ef2dcbfe0a500411d956eb8c8939c3d6cfe669d": "776000000000000000000", + "0xa7247c53d059eb7c9310f628d7fc6c6a0a773f08": "500000000000000000000", + "0x9799ca21dbcf69bfa1b3f72bac51b9e3ca587cf9": "1700000000000000000000", + "0xddf95c1e99ce2f9f5698057c19d5c94027ee4a6e": "6000000000000000000000", + "0x83563bc364ed81a0c6da3b56ff49bbf267827a9c": "17332000000000000000000", + "0xa192698007cc11aa603d221d5feea076bcf7c30d": "2000000000000000000000", + "0x0134ff38155fabae94fd35c4ffe1d79de7ef9c59": "985000000000000000000", + "0x80977316944e5942e79b0e3abad38da746086519": "38800000000000000000", + "0x193d37ed347d1c2f4e35350d9a444bc57ca4db43": "60000000000000000000", + "0x009a6d7db326679b77c90391a7476d238f3ba33e": "200200000000000000000", + "0x337b3bdf86d713dbd07b5dbfcc022b7a7b1946ae": "3980000000000000000000", + "0x7de7fe419cc61f91f408d234cc80d5ca3d054d99": "20000000000000000000", + "0xf47bb134da30a812d003af8dccb888f44bbf5724": "5190000000000000000000", + "0xfd920f722682afb5af451b0544d4f41b3b9d5742": "2330200000000000000000", + "0x0a917f3b5cb0b883047fd9b6593dbcd557f453b9": "1000000000000000000000", + "0xce9786d3712fa200e9f68537eeaa1a06a6f45a4b": "1790000000000000000000", + "0x9ab98d6dbb1eaae16d45a04568541ad3d8fe06cc": "272451000000000000000", + "0x0b7bb342f01bc9888e6a9af4a887cbf4c2dd2caf": "16000000000000000000000", + "0x4c0b1515dfced7a13e13ee12c0f523ae504f032b": "50000000000000000000000", + "0xac2889b5966f0c7f9edb42895cb69d1c04f923a2": "5000000000000000000000", + "0xd008513b27604a89ba1763b6f84ce688b346945b": "1000000000000000000000", + "0xa4b09de6e713dc69546e76ef0acf40b94f0241e6": "322656000000000000000", + "0xb153f828dd076d4a7c1c2574bb2dee1a44a318a8": "400000000000000000000", + "0x02ade5db22f8b758ee1443626c64ec2f32aa0a15": "20000000000000000000000", + "0x0a0650861f785ed8e4bf1005c450bbd06eb48fb6": "3066860000000000000000", + "0xb75149e185f6e3927057739073a1822ae1cf0df2": "4000086000000000000000", + "0x84cb7da0502df45cf561817bbd2362f451be02da": "1337000000000000000000", + "0xc91bb562e42bd46130e2d3ae4652b6a4eb86bc0f": "540000000000000000000", + "0xb234035f7544463ce1e22bc553064684c513cd51": "249750000000000000000", + "0xe5e33800a1b2e96bde1031630a959aa007f26e51": "1337000000000000000000", + "0xae5ce3355a7ba9b332760c0950c2bc45a85fa9a0": "400000000000000000000", + "0xe6f5eb649afb99599c414b27a9c9c855357fa878": "2674000000000000000000", + "0x7010be2df57bd0ab9ae8196cd50ab0c521aba9f9": "1970000000000000000000", + "0xca4288014eddc5632f5facb5e38517a8f8bc5d98": "340000000000000000000", + "0x2784903f1d7c1b5cd901f8875d14a79b3cbe2a56": "22388000000000000000000", + "0xf8dce867f0a39c5bef9eeba609229efa02678b6c": "2000000000000000000000", + "0xe020e86362b487752836a6de0bc02cd8d89a8b6a": "6000000000000000000000", + "0xc4088c025f3e85013f5439fb3440a17301e544fe": "2325000000000000000000", + "0xbefb448c0c5f683fb67ee570baf0db5686599751": "1970000000000000000000", + "0x2f187d5a704d5a338c5b2876a090dce964284e29": "4000000000000000000000", + "0xec0e18a01dc4dc5daae567c3fa4c7f8f9b590205": "315900000000000000000", + "0x637f5869d6e4695f0eb9e27311c4878aff333380": "1969212000000000000000", + "0xd1100dd00fe2ddf18163ad964d0b69f1f2e9658a": "5959598000000000000000", + "0x17ef4acc1bf147e326749d10e677dcffd76f9e06": "39980000000000000000000", + "0x200dfc0b71e359b2b465440a36a6cdc352773007": "1500000000000000000000", + "0xefe0675da98a5dda70cd96196b87f4e726b43348": "1164000000000000000000", + "0xd5bd5e8455c130169357c471e3e681b7996a7276": "841500000000000000000", + "0x9c7b6dc5190fe2912963fcd579683ec7395116b0": "776000000000000000000", + "0xb105dd3d987cffd813e9c8500a80a1ad257d56c6": "1999944000000000000000", + "0x145250b06e4fa7cb2749422eb817bdda8b54de5f": "219000000000000000000", + "0xd96db33b7b5a950c3efa2dc31b10ba10a532ef87": "2000000000000000000000", + "0xaf529bdb459cc185bee5a1c58bf7e8cce25c150d": "197000000000000000000", + "0x185546e8768d506873818ac9751c1f12116a3bef": "200000000000000000000", + "0x51d24bc3736f88dd63b7222026886630b6eb878d": "2000000000000000000000", + "0x69af28b0746cac0da17084b9398c5e36bb3a0df2": "1004700000000000000000", + "0x76f83ac3da30f7092628c7339f208bfc142cb1ee": "2842600000000000000000", + "0x00f463e137dcf625fbf3bca39eca98d2b968cf7f": "5910000000000000000000", + "0x2084fce505d97bebf1ad8c5ff6826fc645371fb2": "30000000000000000000", + "0x53a714f99fa00fef758e23a2e746326dad247ca7": "1490000000000000000000", + "0x0bf064428f83626722a7b5b26a9ab20421a7723e": "133700000000000000000", + "0xac6f68e837cf1961cb14ab47446da168a16dde89": "1337000000000000000000", + "0x4b3c7388cc76da3d62d40067dabccd7ef0433d23": "100076000000000000000", + "0xdeb9a49a43873020f0759185e20bbb4cf381bb8f": "211628000000000000000", + "0x5bf9f2226e5aeacf1d80ae0a59c6e38038bc8db5": "6000000000000000000000", + "0x9d0e7d92fb305853d798263bf15e97c72bf9d7e0": "1000000000000000000000", + "0x2b5c60e84535eeb4d580de127a12eb2677ccb392": "20000000000000000000000", + "0xd8d65420c18c2327cc5af97425f857e4a9fd51b3": "1760000000000000000000", + "0x30ec9392244a2108c987bc5cdde0ed9f837a817b": "1560562000000000000000", + "0x56a1d60d40f57f308eebf087dee3b37f1e7c2cba": "1159600000000000000000", + "0xa9a1cdc33bfd376f1c0d76fb6c84b6b4ac274d68": "5000000000000000000000", + "0xa67f38819565423aa85f3e3ab61bc763cbab89dd": "2130000000000000000000", + "0x62d5cc7117e18500ac2f9e3c26c86b0a94b0de15": "105000000000000000000", + "0x4970d3acf72b5b1f32a7003cf102c64ee0547941": "140000000000000000000000", + "0x76628150e2995b5b279fc83e0dd5f102a671dd1c": "40000000000000000000000", + "0x3d8f39881b9edfe91227c33fa4cdd91e678544b0": "86111000000000000000", + "0xff0b7cb71da9d4c1ea6ecc28ebda504c63f82fd1": "1043000000000000000000", + "0x8d795c5f4a5689ad62da961671f028065286d554": "2048000000000000000000", + "0xbe2346a27ff9b702044f500deff2e7ffe6824541": "20000000000000000000", + "0x0dbd417c372b8b0d01bcd944706bd32e60ae28d1": "340000000000000000000", + "0x467fbf41441600757fe15830c8cd5f4ffbbbd560": "10000000000000000000000", + "0x090cd67b60e81d54e7b5f6078f3e021ba65b9a1e": "1000000000000000000000", + "0x55a4cac0cb8b582d9fef38c5c9fff9bd53093d1f": "1970000000000000000000", + "0x3b7b4f53c45655f3dc5f017edc23b16f9bc536fa": "100000000000000000000", + "0xd508d39c70916f6abc4cc7f999f011f077105802": "100470000000000000000", + "0x037dd056e7fdbd641db5b6bea2a8780a83fae180": "140000000000000000000", + "0x660557bb43f4be3a1b8b85e7df7b3c5bcd548057": "6000000000000000000000", + "0x02089361a3fe7451fb1f87f01a2d866653dc0b07": "39976000000000000000", + "0xc4bec96308a20f90cab18399c493fd3d065abf45": "14000000000000000000000", + "0xcca07bb794571d4acf041dad87f0d1ef3185b319": "2000000000000000000000", + "0xf2d0e986d814ea13c8f466a0538c53dc922651f0": "1380000000000000000000", + "0x662cfa038fab37a01745a364e1b98127c503746d": "3940000000000000000000", + "0x3336c3ef6e8b50ee90e037b164b7a8ea5faac65d": "272712000000000000000", + "0x30e33358fc21c85006e40f32357dc8895940aaf0": "1910000000000000000000", + "0x41a9a404fc9f5bfee48ec265b12523338e29a8bf": "388000000000000000000", + "0x6af235d2bbe050e6291615b71ca5829658810142": "3000000000000000000000", + "0xfd5a63157f914fd398eab19c137dd9550bb7715c": "100000000000000000000", + "0x8a4314fb61cd938fc33e15e816b113f2ac89a7fb": "432800000000000000000", + "0xb216dc59e27c3d7279f5cd5bb2becfb2606e14d9": "400000000000000000000", + "0xf5a5459fcdd5e5b273830df88eea4cb77ddadfb9": "74500000000000000000", + "0xdf31025f5649d2c6eea41ed3bdd3471a790f759a": "20000000000000000000", + "0x721f9d17e5a0e74205947aeb9bc6a7938961038f": "51900000000000000000", + "0x08d0864dc32f9acb36bf4ea447e8dd6726906a15": "2000200000000000000000", + "0x54575c3114751e3c631971da6a2a02fd3ffbfcc8": "1940000000000000000000", + "0x8f60895fbebbb5017fcbff3cdda397292bf25ba6": "429177000000000000000", + "0x91fe8a4c6164df8fa606995d6ba7adcaf1c893ce": "17000000000000000000000", + "0x889087f66ff284f8b5efbd29493b706733ab1447": "9850000000000000000000", + "0x051633080d07a557adde319261b074997f14692d": "5800000000000000000000", + "0x59a12df2e3ef857aceff9306b309f6a500f70134": "1000000000000000000000", + "0x9f64a8e8dacf4ade30d10f4d59b0a3d5abfdbf74": "1000060000000000000000", + "0x8846928d683289a2d11df8db7a9474988ef01348": "10000000000000000000000", + "0xdff1b220de3d8e9ca4c1b5be34a799bcded4f61c": "385428000000000000000", + "0x7e7c1e9a61a08a83984835c70ec31d34d3eaa87f": "191000000000000000000", + "0xfe210b8f04dc6d4f76216acfcbd59ba83be9b630": "20000000000000000000", + "0xdc8c2912f084a6d184aa73638513ccbc326e0102": "1295000000000000000000", + "0xdddd7b9e6eab409b92263ac272da801b664f8a57": "500000000000000000000000", + "0x86a5f8259ed5b09e188ce346ee92d34aa5dd93fa": "200000000000000000000", + "0xdc1f1979615f082140b8bb78c67b27a1942713b1": "60000000000000000000", + "0xea66e7b84dcdbf36eea3e75b85382a75f1a15d96": "1729135000000000000000", + "0x039e7a4ebc284e2ccd42b1bdd60bd6511c0f7706": "17300000000000000000", + "0x36bfe1fa3b7b70c172eb042f6819a8972595413e": "1000000000000000000000", + "0x039ef1ce52fe7963f166d5a275c4b1069fe3a832": "400008000000000000000", + "0xf1df55dcc34a051012b575cb968bc9c458ea09c9": "4000000000000000000000", + "0x168b5019b818691644835fe69bf229e17112d52c": "28000000000000000000000", + "0xf60bd735543e6bfd2ea6f11bff627340bc035a23": "2000000000000000000000", + "0x2cbb0c73df91b91740b6693b774a7d05177e8e58": "1850000000000000000000", + "0x9ffcf5ef46d933a519d1d16c6ba3189b27496224": "1000000000000000000000", + "0x0e11d77a8977fac30d268445e531149b31541a24": "2000000000000000000000", + "0xdfb1626ef48a1d7d7552a5e0298f1fc23a3b482d": "1713860000000000000000", + "0xcc943be1222cd1400a2399dd1b459445cf6d54a9": "12530000000000000000000", + "0xb37c2b9f50637bece0ca959208aefee6463ba720": "400000000000000000000", + "0x96b906ea729f4655afe3e57d35277c967dfa1577": "1000000000000000000000", + "0x7995bd8ce2e0c67bf1c7a531d477bca1b2b97561": "5945100000000000000000", + "0x96f820500b70f4a3e3239d619cff8f222075b135": "200000000000000000000", + "0xad3565d52b688added08168b2d3872d17d0a26ae": "100000000000000000000", + "0x9e7c2050a227bbfd60937e268cea3e68fea8d1fe": "100000000000000000000", + "0x7e59dc60be8b2fc19abd0a5782c52c28400bce97": "1000000000000000000000", + "0x01ed5fba8d2eab673aec042d30e4e8a611d8c55a": "2000000000000000000000", + "0x59a087b9351ca42f58f36e021927a22988284f38": "18500000000000000000", + "0x2fe0023f5722650f3a8ac01009125e74e3f82e9b": "3000000000000000000000", + "0xbd1803370bddb129d239fd16ea8526a6188ae58e": "500000000000000000000", + "0xc70527d444c490e9fc3f5cc44e66eb4f306b380f": "4000000000000000000000", + "0x0f206e1a1da7207ea518b112418baa8b06260328": "600000000000000000000", + "0x6e1a046caf5b4a57f4fd4bc173622126b4e2fd86": "1790000000000000000000", + "0x84008a72f8036f3feba542e35078c057f32a8825": "100000000000000000000", + "0x246291165b59332df5f18ce5c98856fae95897d6": "1700000000000000000000", + "0x7e99dfbe989d3ba529d19751b7f4317f8953a3e2": "400000000000000000000", + "0x748c285ef1233fe4d31c8fb1378333721c12e27a": "2000000000000000000000", + "0x3dd12e556a603736feba4a6fa8bd4ac45d662a04": "167450000000000000000000", + "0xd0ae735d915e946866e1fea77e5ea466b5cadd16": "2000000000000000000000", + "0x4f767bc8794aef9a0a38fea5c81f14694ff21a13": "512200000000000000000", + "0x0e2f8e28a681f77c583bd0ecde16634bdd7e00cd": "95060000000000000000", + "0xd74a6e8d6aab34ce85976814c1327bd6ea0784d2": "100000000000000000000000", + "0x629be7ab126a5398edd6da9f18447e78c692a4fd": "2000000000000000000000", + "0x2e46fcee6a3bb145b594a243a3913fce5dad6fba": "10000000000000000000000", + "0xe39b11a8ab1ff5e22e5ae6517214f73c5b9b55dc": "2000000000000000000000", + "0x119aa64d5b7d181dae9d3cb449955c89c1f963fa": "700000000000000000000", + "0xce079f51887774d8021cb3b575f58f18e9acf984": "180000000000000000000", + "0x550c306f81ef5d9580c06cb1ab201b95c748a691": "665800000000000000000", + "0x06dc7f18cee7edab5b795337b1df6a9e8bd8ae59": "400000000000000000000", + "0xe21c778ef2a0d7f751ea8c074d1f812243863e4e": "5308559000000000000000", + "0x45d4b54d37a8cf599821235f062fa9d170ede8a4": "324000000000000000000", + "0x893a6c2eb8b40ab096b4f67e74a897b840746e86": "1730000000000000000000", + "0xd44d81e18f46e2cfb5c1fcf5041bc8569767d100": "36381800000000000000000", + "0xc5de1203d3cc2cea31c82ee2de5916880799eafd": "5000000000000000000000", + "0x7f0f04fcf37a53a4e24ede6e93104e78be1d3c9e": "2000000000000000000000", + "0x3ce1dc97fcd7b7c4d3a18a49d6f2a5c1b1a906d7": "200000000000000000000", + "0xac4ee9d502e7d2d2e99e59d8ca7d5f00c94b4dd6": "1000000000000000000000", + "0x7640a37f8052981515bce078da93afa4789b5734": "2000000000000000000000", + "0x76cac488111a4fd595f568ae3a858770fc915d5f": "200000000000000000000", + "0xff4a408f50e9e72146a28ce4fc8d90271f116e84": "1970000000000000000000", + "0x249db29dbc19d1235da7298a04081c315742e9ac": "1801800000000000000000", + "0x3a04572847d31e81f7765ca5bfc9d557159f3683": "133031000000000000000", + "0xb6771b0bf3427f9ae7a93e7c2e61ee63941fdb08": "18800000000000000000000", + "0x30c26a8e971baa1855d633ba703f028cc7873140": "10000000000000000000000", + "0x167e3e3ae2003348459392f7dfce44af7c21ad59": "500000000000000000000", + "0x43f16f1e75c3c06a9478e8c597a40a3cb0bf04cc": "2914000000000000000000", + "0x056b1546894f9a85e203fb336db569b16c25e04f": "169397000000000000000", + "0x70616e2892fa269705b2046b8fe3e72fa55816d3": "20000000000000000000000", + "0x8f4d1d41693e462cf982fd81d0aa701d3a5374c9": "4000000000000000000000", + "0xc518799a5925576213e21896e0539abb85b05ae3": "1000000000000000000000", + "0x0e3a28c1dfafb0505bdce19fe025f506a6d01ceb": "2000000000000000000000", + "0xe4a47e3933246c3fd62979a1ea19ffdf8c72ef37": "148273000000000000000", + "0xd231929735132102471ba59007b6644cc0c1de3e": "1000090000000000000000", + "0x555d8d3ce1798aca902754f164b8be2a02329c6c": "10000000000000000000000", + "0x5ab1a5615348001c7c775dc75748669b8be4de14": "690200000000000000000", + "0x2fee36a49ee50ecf716f1047915646779f8ba03f": "1056230000000000000000", + "0x54db5e06b4815d31cb56a8719ba33af2d73e7252": "670000000000000000000", + "0x7c8bb65a6fbb49bd413396a9d7e31053bbb37aa9": "6000000000000000000000", + "0xc1384c6e717ebe4b23014e51f31c9df7e4e25b31": "500000000000000000000", + "0x474158a1a9dc693c133f65e47b5c3ae2f773a86f": "200200000000000000000", + "0x2934c0df7bbc172b6c186b0b72547ace8bf75454": "60000000000000000000", + "0x6966063aa5de1db5c671f3dd699d5abe213ee902": "8000000000000000000000", + "0x9225d46a5a80943924a39e5b84b96da0ac450581": "40000000000000000000000", + "0x671bbca099ff899bab07ea1cf86965c3054c8960": "50000000000000000000", + "0xf1f766b0e46d73fcd4d52e7a72e1b9190cc632b3": "8000000000000000000000", + "0xef0dc7dd7a53d612728bcbd2b27c19dd4d7d666f": "705668000000000000000", + "0x38d2e9154964b41c8d50a7487d391e7ee2c3d3c2": "3500000000000000000000", + "0x352a785f4a921632504ce5d015f83c49aa838d6d": "4314800000000000000000", + "0x743de50026ca67c94df54f066260e1d14acc11ac": "2000000000000000000000", + "0xb188078444027e386798a8ae68698919d5cc230d": "267400000000000000000", + "0x53608105ce4b9e11f86bf497ffca3b78967b5f96": "20000000000000000000000", + "0x3b159099075207c6807663b1f0f7eda54ac8cce3": "1969543000000000000000", + "0x141a5e39ee2f680a600fbf6fa297de90f3225cdd": "10000000000000000000000", + "0x44fff37be01a3888d3b8b8e18880a7ddefeeead3": "259145000000000000000", + "0xc5a629a3962552cb8eded889636aafbd0c18ce65": "10000000000000000000000", + "0xfdba5359f7ec3bc770ac49975d844ec9716256f1": "1000000000000000000000", + "0x7c1df24a4f7fb2c7b472e0bb006cb27dcd164156": "1000000000000000000000", + "0xab7d54c7c6570efca5b4b8ce70f52a5773e5d53b": "279600000000000000000", + "0x3f173aa6edf469d185e59bd26ae4236b92b4d8e1": "320000000000000000000", + "0xa3f4ad14e0bb44e2ce2c14359c75b8e732d37054": "200000000000000000000", + "0xac5f627231480d0d95302e6d89fc32cb1d4fe7e3": "200000000000000000000", + "0xd0775dba2af4c30a3a78365939cd71c2f9de95d2": "1940000000000000000000", + "0xad94235fc3b3f47a2413af31e884914908ef0c45": "500008000000000000000", + "0xeaedcc6b8b6962d5d9288c156c579d47c0a9fcff": "85000000000000000000", + "0x7ac48d40c664cc9a6d89f1c5f5c80a1c70e744e6": "3008000000000000000000", + "0xec73114c5e406fdbbe09b4fa621bd70ed54ea1ef": "24500000000000000000000", + "0xa690f1a4b20ab7ba34628620de9ca040c43c1963": "4000000000000000000000", + "0xcad14f9ebba76680eb836b079c7f7baaf481ed6d": "238600000000000000000", + "0x6c714a58fff6e97d14b8a5e305eb244065688bbd": "4000000000000000000000", + "0x3e618350fa01657ab0ef3ebac8e37012f8fc2b6f": "2804400000000000000000", + "0xc946d5acc1346eba0a7279a0ac1d465c996d827e": "16385128000000000000000", + "0x1164caaa8cc5977afe1fad8a7d6028ce2d57299b": "400000000000000000000", + "0x7917e5bd82a9790fd650d043cdd930f7799633db": "3999800000000000000000", + "0xd52aecc6493938a28ca1c367b701c21598b6a02e": "1100000000000000000000", + "0x98bed3a72eccfbafb923489293e429e703c7e25b": "2000000000000000000000", + "0x42db0b902559e04087dd5c441bc7611934184b89": "2014420000000000000000", + "0x43bc2d4ddcd6583be2c7bc094b28fb72e62ba83b": "2000000000000000000000", + "0x85f0e7c1e3aff805a627a2aaf2cff6b4c0dbe9cb": "20000000000000000000", + "0x581b9fd6eae372f3501f42eb9619eec820b78a84": "19699015000000000000000", + "0x541db20a80cf3b17f1621f1b3ff79b882f50def3": "1000000000000000000000", + "0x4e8a6d63489ccc10a57f885f96eb04ecbb546024": "18500000000000000000000", + "0x28349f7ef974ea55fe36a1583b34cec3c45065f0": "234490000000000000000", + "0xa3241d890a92baf52908dc4aa049726be426ebd3": "19999560000000000000000", + "0xb4b11d109f608fa8edd3fea9f8c315649aeb3d11": "5000000000000000000000", + "0x5f321b3daaa296cadf29439f9dab062a4bffedd6": "81868000000000000000", + "0xc5ae86b0c6c7e3900f1368105c56537faf8d743e": "188000000000000000000", + "0x9a8eca4189ff4aa8ff7ed4b6b7039f0902219b15": "20000000000000000000", + "0xa3facc50195c0b4933c85897fecc5bbd995c34b8": "20000000000000000000", + "0xf07bd0e5c2ce69c7c4a724bd26bbfa9d2a17ca03": "5910000000000000000000", + "0x640aba6de984d94517377803705eaea7095f4a11": "10000000000000000000000", + "0x204ac98867a7c9c7ed711cb82f28a878caf69b48": "6000000000000000000000", + "0x9d34dac25bd15828faefaaf28f710753b39e89dc": "1090400000000000000000", + "0xfe418b421a9c6d373602790475d2303e11a75930": "1015200000000000000000", + "0x3f472963197883bbda5a9b7dfcb22db11440ad31": "481445000000000000000", + "0x1578bdbc371b4d243845330556fff2d5ef4dff67": "100000000000000000000", + "0xdba4796d0ceb4d3a836b84c96f910afc103f5ba0": "166666000000000000000", + "0x466fda6b9b58c5532750306a10a2a8c768103b07": "199955000000000000000", + "0x2770f14efb165ddeba79c10bb0af31c31e59334c": "3000000000000000000000", + "0x7c382c0296612e4e97e440e02d3871273b55f53b": "197600000000000000000", + "0x1fb7bd310d95f2a6d9baaf8a8a430a9a04453a8b": "3000000000000000000000", + "0xa9acf600081bb55bb6bfbab1815ffc4e17e85a95": "200000000000000000000", + "0xf93d5bcb0644b0cce5fcdda343f5168ffab2877d": "209978000000000000000", + "0xdb0cc78f74d9827bdc8a6473276eb84fdc976212": "2000000000000000000000", + "0xb66411e3a02dedb726fa79107dc90bc1cae64d48": "2000000000000000000000", + "0x4d6e8fe109ccd2158e4db114132fe75fecc8be5b": "25019000000000000000", + "0x6fd947d5a73b175008ae6ee8228163da289b167d": "30000000000000000000000", + "0x32d950d5e93ea1d5b48db4714f867b0320b31c0f": "1015200000000000000000", + "0x9c99b62606281b5cefabf36156c8fe62839ef5f3": "4000000000000000000000", + "0x86c8d0d982b539f48f9830f9891f9d607a942659": "13260000000000000000000", + "0xf2127d54188fedef0f338a5f38c7ff73ad9f6f42": "20000000000000000000000", + "0xe864fec07ed1214a65311e11e329de040d04f0fd": "1656353000000000000000", + "0x1d09ad2412691cc581c1ab36b6f9434cd4f08b54": "7000000000000000000000", + "0x4ea70f04313fae65c3ff224a055c3d2dab28dddf": "19999800000000000000000", + "0xe0668fa82c14d6e8d93a53113ef2862fa81581bc": "870400000000000000000", + "0xf0d858105e1b648101ac3f85a0f8222bf4f81d6a": "600000000000000000000", + "0x0f3a1023cac04dbf44f5a5fa6a9cf8508cd4fddf": "1820000000000000000000", + "0x5793abe6f1533311fd51536891783b3f9625ef1c": "827268000000000000000", + "0x8d667637e29eca05b6bfbef1f96d460eefbf9984": "4000000000000000000000", + "0xd76dbaebc30d4ef67b03e6e6ecc6d84e004d502d": "2019250000000000000000", + "0x42d1a6399b3016a8597f8b640927b8afbce4b215": "2980000000000000000000", + "0x21fd47c5256012198fa5abf131c06d6aa1965f75": "7880000000000000000000", + "0x2f2bba1b1796821a766fce64b84f28ec68f15aea": "20000000000000000000", + "0xd24bf12d2ddf457decb17874efde2052b65cbb49": "14000000000000000000000", + "0x88de13b09931877c910d593165c364c8a1641bd3": "3000000000000000000000", + "0x555ca9f05cc134ab54ae9bea1c3ff87aa85198ca": "100000000000000000000", + "0xae9ecd6bdd952ef497c0050ae0ab8a82a91898ce": "30000000000000000000", + "0xad8bfef8c68a4816b3916f35cb7bfcd7d3040976": "40000000000000000000000", + "0xdad136b88178b4837a6c780feba226b98569a94c": "200000000000000000000", + "0x800e7d631c6e573a90332f17f71f5fd19b528cb9": "152000000000000000000", + "0x94a9a71691317c2064271b51c9353fbded3501a8": "3340000000000000000000", + "0x80a0f6cc186cf6201400736e065a391f52a9df4a": "10000000000000000000000", + "0x712ff7370a13ed360973fedc9ff5d2c93a505e9e": "3940000000000000000000", + "0x42399659aca6a5a863ea2245c933fe9a35b7880e": "2044000000000000000000", + "0xae239acffd4ebe2e1ba5b4170572dc79cc6533ec": "12000000000000000000000", + "0x007b9fc31905b4994b04c9e2cfdc5e2770503f42": "1999000000000000000000", + "0x7480de62254f2ba82b578219c07ba5be430dc3cb": "7040000000000000000000", + "0x917b8f9f3a8d09e9202c52c29e724196b897d35e": "161000000000000000000", + "0x708ea707bae4357f1ebea959c3a250acd6aa21b3": "500000000000000000000", + "0x6dc7053a718616cfc78bee6382ee51add0c70330": "2000000000000000000000", + "0xc4dac5a8a0264fbc1055391c509cc3ee21a6e04c": "6501000000000000000000", + "0xc1b2a0fb9cad45cd699192cd27540b88d3384279": "500000000000000000000", + "0xb07cb9c12405b711807543c4934465f87f98bd2d": "2000000000000000000000", + "0xc7f72bb758016b374714d4899bce22b4aec70a31": "1072706000000000000000", + "0x0c480de9f7461002908b49f60fc61e2b62d3140b": "10000000000000000000000", + "0x83d532d38d6dee3f60adc68b936133c7a2a1b0dd": "500000000000000000000", + "0x12afbcba1427a6a39e7ba4849f7ab1c4358ac31b": "20000000000000000000000", + "0xf8f6645e0dee644b3dad81d571ef9baf840021ad": "2000000000000000000000", + "0x40cf890591eae4a18f812a2954cb295f633327e6": "48132000000000000000", + "0x735b97f2fc1bd24b12076efaf3d1288073d20c8c": "20000000000000000000", + "0x47c7e5efb48b3aed4b7c6e824b435f357df4c723": "18200000000000000000", + "0xd34d708d7398024533a5a2b2309b19d3c55171bb": "400000000000000000000", + "0x64370e87202645125a35b207af1231fb6072f9a7": "200000000000000000000", + "0xb055af4cadfcfdb425cf65ba6431078f07ecd5ab": "100000000000000000000", + "0xc7de5e8eafb5f62b1a0af2195cf793c7894c9268": "1000000000000000000000", + "0xc63cd7882118b8a91e074d4c8f4ba91851303b9a": "260000000000000000000", + "0x164d7aac3eecbaeca1ad5191b753f173fe12ec33": "744090000000000000000", + "0xe4fb26d1ca1eecba3d8298d9d148119ac2bbf580": "400000000000000000000", + "0x613ac53be565d46536b820715b9b8d3ae68a4b95": "3760000000000000000000", + "0x7f616c6f008adfa082f34da7d0650460368075fb": "1000000000000000000000", + "0x9af100cc3dae83a33402051ce4496b16615483f6": "2000000000000000000000", + "0xb45cca0d36826662683cf7d0b2fdac687f02d0c4": "1000000000000000000000", + "0x93a6b3ab423010f981a7489d4aad25e2625c5741": "20190033000000000000000", + "0xee049af005974dd1c7b3a9ca8d9aa77175ba53aa": "333333000000000000000", + "0x687927e3048bb5162ae7c15cf76bd124f9497b9e": "2000000000000000000000", + "0x1aa40270d21e5cde86b6316d1ac3c533494b79ed": "20000000000000000000", + "0x426259b0a756701a8b663528522156c0288f0f24": "9900000000000000000000", + "0x91c75e3cb4aa89f34619a164e2a47898f5674d9c": "2000000000000000000000", + "0x437983388ab59a4ffc215f8e8269461029c3f1c1": "20000000000000000000000", + "0x272a131a5a656a7a3aca35c8bd202222a7592258": "2674000000000000000000", + "0xbc0ca4f217e052753614d6b019948824d0d8688b": "400000000000000000000", + "0xcc6c03bd603e09de54e9c4d5ac6d41cbce715724": "98500000000000000000", + "0xd79aff13ba2da75d46240cac0a2467c656949823": "1730000000000000000000", + "0x477b24eee8839e4fd19d1250bd0b6645794a61ca": "8000000000000000000000", + "0x79fd6d48315066c204f9651869c1096c14fc9781": "2000000000000000000000", + "0x1463a873555bc0397e575c2471cf77fa9db146e0": "10000000000000000000000", + "0x89ab13ee266d779c35e8bb04cd8a90cc2103a95b": "60000000000000000000000", + "0x90acced7e48c08c6b934646dfa0adf29dc94074f": "56154000000000000000", + "0x31ea6eab19d00764e9a95e183f2b1b22fc7dc40f": "20000000000000000000", + "0x87a53ea39f59a35bada8352521645594a1a714cb": "1910000000000000000000", + "0x1e1aed85b86c6562cb8fa1eb6f8f3bc9dcae6e79": "4516200000000000000000", + "0xe36a8ea87f1e99e8a2dc1b2608d166667c9dfa01": "100000000000000000000", + "0xec2cb8b9378dff31aec3c22e0e6dadff314ab5dd": "2000000000000000000000", + "0x3cadeb3d3eed3f62311d52553e70df4afce56f23": "4000000000000000000000", + "0x3ceca96bb1cdc214029cbc5e181d398ab94d3d41": "80000000000000000000000", + "0x3283eb7f9137dd39bed55ffe6b8dc845f3e1a079": "66224000000000000000", + "0x0954a8cb5d321fc3351a7523a617d0f58da676a7": "2506000000000000000000", + "0xde33d708a3b89e909eaf653b30fdc3a5d5ccb4b3": "177300000000000000000", + "0x1c6702b3b05a5114bdbcaeca25531aeeb34835f4": "26071500000000000000000", + "0xe5b96fc9ac03d448c1613ac91d15978145dbdfd1": "200000000000000000000", + "0xfbf204c813f836d83962c7870c7808ca347fd33e": "20000000000000000000", + "0x3b13631a1b89cb566548899a1d60915cdcc4205b": "2000000000000000000000", + "0xa87f7abd6fa31194289678efb63cf584ee5e2a61": "4000000000000000000000", + "0xc0a39308a80e9e84aaaf16ac01e3b01d74bd6b2d": "136499000000000000000", + "0xffd6da958eecbc016bab91058440d39b41c7be83": "20000000000000000000000", + "0x0e3dd7d4e429fe3930a6414035f52bdc599d784d": "40110000000000000000", + "0xe0663e8cd66792a641f56e5003660147880f018e": "2000000000000000000000", + "0x5b78eca27fbdea6f26befba8972b295e7814364b": "2000000000000000000000", + "0xec9851bd917270610267d60518b54d3ca2b35b17": "40000000000000000000000", + "0xbc9c95dfab97a574cea2aa803b5caa197cef0cff": "420000000000000000000", + "0x100b4d0977fcbad4debd5e64a0497aeae5168fab": "314500000000000000000", + "0x1b6610fb68bad6ed1cfaa0bbe33a24eb2e96fafb": "152000000000000000000", + "0xb4524c95a7860e21840296a616244019421c4aba": "8000000000000000000000", + "0x88975a5f1ef2528c300b83c0c607b8e87dd69315": "83500000000000000000", + "0x853e6abaf44469c72f151d4e223819aced4e3728": "2000000000000000000000", + "0xd604abce4330842e3d396ca73ddb5519ed3ec03f": "163940000000000000000", + "0xd209482bb549abc4777bea6d7f650062c9c57a1c": "320880000000000000000", + "0x590acbda37290c0d3ec84fc2000d7697f9a4b15d": "500000000000000000000", + "0x571950ea2c90c1427d939d61b4f2de4cf1cfbfb0": "20000000000000000000", + "0xcb94e76febe208116733e76e805d48d112ec9fca": "1000000000000000000000", + "0xfa8e3b1f13433900737daaf1f6299c4887f85b5f": "715000000000000000000", + "0x162d76c2e6514a3afb6fe3d3cb93a35c5ae783f1": "2000000000000000000000", + "0x4bea288eea42c4955eb9faad2a9faf4783cbddac": "28790618000000000000000", + "0xc8ab1a3cf46cb8b064df2e222d39607394203277": "2000000000000000000000", + "0x318b2ea5f0aaa879c4d5e548ac9d92a0c67487b7": "200000000000000000000", + "0x53c5fe0119e1e848640cee30adea96940f2a5d8b": "21746000000000000000000", + "0x0701f9f147ec486856f5e1b71de9f117e99e2105": "173360000000000000000", + "0x337cfe1157a5c6912010dd561533791769c2b6a6": "1000000000000000000000", + "0xfd60d2b5af3d35f7aaf0c393052e79c4d823d985": "56400000000000000000", + "0x0f049a8bdfd761de8ec02cee2829c4005b23c06b": "252000000000000000000", + "0x924bce7a853c970bb5ec7bb759baeb9c7410857b": "13700000000000000000", + "0x16abb8b021a710bdc78ea53494b20614ff4eafe8": "158000000000000000000", + "0x9e7f65a90e8508867bccc914256a1ea574cf07e3": "1240000000000000000000", + "0x01d03815c61f416b71a2610a2daba59ff6a6de5b": "9553100000000000000000", + "0x3df762049eda8ac6927d904c7af42f94e5519601": "2000000000000000000000", + "0x5593c9d4b664730fd93ca60151c25c2eaed93c3b": "200000000000000000000", + "0xe023f09b2887612c7c9cf1988e3a3a602b3394c9": "2000000000000000000000", + "0x4c13980c32dcf3920b78a4a7903312907c1b123f": "60024000000000000000", + "0xa282e969cac9f7a0e1c0cd90f5d0c438ac570da3": "627760000000000000000", + "0x3b22da2a0271c8efe102532773636a69b1c17e09": "502000000000000000000", + "0x1aa1021f550af158c747668dd13b463160f95a40": "1470000000000000000000", + "0xf15178ffc43aa8070ece327e930f809ab1a54f9d": "197600000000000000000", + "0xdb1293a506e90cad2a59e1b8561f5e66961a6788": "2000000000000000000000", + "0x88c361640d6b69373b081ce0c433bd590287d5ec": "50000000000000000000000", + "0x3737216ee91f177732fb58fa4097267207e2cf55": "1520000000000000000000", + "0xa16d9e3d63986159a800b46837f45e8bb980ee0b": "2030400000000000000000", + "0xec76f12e57a65504033f2c0bce6fc03bd7fa0ac4": "3580000000000000000000", + "0xd9f1b26408f0ec67ad1d0d6fe22e8515e1740624": "24000000000000000000", + "0x716ba01ead2a91270635f95f25bfaf2dd610ca23": "44750000000000000000000", + "0x42a98bf16027ce589c4ed2c95831e2724205064e": "10000000000000000000000", + "0x0f88aac9346cb0e7347fba70905475ba8b3e5ece": "10000000000000000000000", + "0x2d8c52329f38d2a2fa9cbaf5c583daf1490bb11c": "20000000000000000000", + "0x3cea302a472a940379dd398a24eafdbadf88ad79": "3000000000000000000000", + "0xa29d5bda74e003474872bd5894b88533ff64c2b5": "10000000000000000000000", + "0x2d23766b6f6b05737dad80a419c40eda4d77103e": "3820000000000000000000", + "0xb07249e055044a9155359a402937bbd954fe48b6": "100000000000000000000", + "0xf1e980c559a1a8e5e50a47f8fffdc773b7e06a54": "30104784000000000000000", + "0x8275cd684c3679d5887d03664e338345dc3cdde1": "15800000000000000000", + "0xb27c1a24204c1e118d75149dd109311e07c073ab": "3100000000000000000000", + "0x451b3699475bed5d7905f8905aa3456f1ed788fc": "2560000000000000000000", + "0x31ad4d9946ef09d8e988d946b1227f9141901736": "22880000000000000000000", + "0x52b8a9592634f7300b7c5c59a3345b835f01b95c": "2000000000000000000000", + "0xb161725fdcedd17952d57b23ef285b7e4b1169e8": "50071000000000000000", + "0x74fc5a99c0c5460503a13b0509459da19ce7cd90": "200000000000000000000", + "0xd99df7421b9382e42c89b006c7f087702a0757c0": "480000000000000000000", + "0x8a4f4a7f52a355ba105fca2072d3065fc8f7944b": "500000000000000000000", + "0x12316fc7f178eac22eb2b25aedeadf3d75d00177": "19999999000000000000000", + "0xf598db2e09a8a5ee7d720d2b5c43bb126d11ecc2": "200000000000000000000", + "0x37b8beac7b1ca38829d61ab552c766f48a10c32f": "400000000000000000000", + "0x851dc38adb4593729a76f33a8616dab6f5f59a77": "100000000000000000000", + "0xbf4096bc547dbfc4e74809a31c039e7b389d5e17": "3940000000000000000000", + "0x98d3731992d1d40e1211c7f735f2189afa0702e0": "8000000000000000000000", + "0x0f4073c1b99df60a1549d69789c7318d9403a814": "20000000000000000000000", + "0xa430995ddb185b9865dbe62539ad90d22e4b73c2": "10000000000000000000000", + "0x898c72dd736558ef9e4be9fdc34fef54d7fc7e08": "1000000000000000000000", + "0xf9b617f752edecae3e909fbb911d2f8192f84209": "2674000000000000000000", + "0xe1ae029b17e373cde3de5a9152201a14cac4e119": "99968000000000000000", + "0xd8e8474292e7a051604ca164c0707783bb2885e8": "13370000000000000000000", + "0xf476f2cb7208a32e051fd94ea8662992638287a2": "100000000000000000000", + "0x3a84e950ed410e51b7e8801049ab2634b285fea1": "18690000000000000000000", + "0x5b7784caea01799ca30227827667ce207c5cbc76": "2000000000000000000000", + "0x3af65b3e28895a4a001153391d1e69c31fb9db39": "3940000000000000000000", + "0x95fb5afb14c1ef9ab7d179c5c300503fd66a5ee2": "34225000000000000000", + "0xa8446c4781a737ac4328b1e15b8a0b3fbb0fd668": "21390500000000000000000", + "0x4888fb25cd50dbb9e048f41ca47d78b78a27c7d9": "17300000000000000000000", + "0x566c10d638e8b88b47d6e6a414497afdd00600d4": "99960000000000000000", + "0xbd47f5f76e3b930fd9485209efa0d4763da07568": "1000000000000000000000", + "0x1e1c6351776ac31091397ecf16002d979a1b2d51": "1400000000000000000000", + "0xedf603890228d7d5de9309942b5cad4219ef9ad7": "5000000000000000000000", + "0x1923cfc68b13ea7e2055803645c1e320156bd88d": "1337000000000000000000", + "0x8f8f37d0ad8f335d2a7101b41156b688a81a9cbe": "70000000000000000000", + "0x63334fcf1745840e4b094a3bb40bb76f9604c04c": "3978000000000000000000", + "0x001762430ea9c3a26e5749afdb70da5f78ddbb8c": "200000000000000000000", + "0x512116817ba9aaf843d1507c65a5ea640a7b9eec": "50000000000000000000", + "0x2961fb391c61957cb5c9e407dda29338d3b92c80": "999942000000000000000", + "0xfc2952b4c49fedd0bc0528a308495e6d6a1c71d6": "2000000000000000000000", + "0x13ec812284026e409bc066dfebf9d5a4a2bf801e": "1610000000000000000000", + "0xef463c2679fb279164e20c3d2691358773a0ad95": "2000000000000000000000", + "0x3aadf98b61e5c896e7d100a3391d3250225d61df": "234000000000000000000", + "0xe8137fc1b2ec7cc7103af921899b4a39e1d959a1": "1490000000000000000000", + "0xb1a2b43a7433dd150bb82227ed519cd6b142d382": "2738000000000000000000", + "0xc1f39bd35dd9cec337b96f47c677818160df37b7": "20000000000000000000", + "0xb587b44a2ca79e4bc1dd8bfdd43a207150f2e7e0": "630400000000000000000", + "0x41485612d03446ec4c05e5244e563f1cbae0f197": "970000000000000000000", + "0xa12623e629df93096704b16084be2cd89d562da4": "8500000000000000000000", + "0x3f2f381491797cc5c0d48296c14fd0cd00cdfa2d": "804000000000000000000", + "0x9470cc36594586821821c5c996b6edc83b6d5a32": "24000000000000000000", + "0x3605372d93a9010988018f9f315d032ed1880fa1": "500066000000000000000", + "0x12632388b2765ee4452b50161d1fffd91ab81f4a": "740000000000000000000", + "0x274a3d771a3d709796fbc4d5f48fce2fe38c79d6": "20000000000000000000", + "0xd60a52580728520df7546bc1e283291788dbae0c": "999910000000000000000", + "0x1ab53a11bcc63ddfaa40a02b9e186496cdbb8aff": "1996800000000000000000", + "0xc282e6993fbe7a912ea047153ffd9274270e285b": "139939000000000000000", + "0xa291e9c7990d552dd1ae16cebc3fca342cbaf1d1": "20000000000000000000000", + "0x5547fdb4ae11953e01292b7807fa9223d0e4606a": "98940000000000000000", + "0xbded11612fb5c6da99d1e30e320bc0995466141e": "400000000000000000000", + "0xb73b4ff99eb88fd89b0b6d57a9bc338e886fa06a": "32000000000000000000", + "0xb1c751786939bba0d671a677a158c6abe7265e46": "10000000000000000000000", + "0xe881bbbe69722d81efecaa48d1952a10a2bfac8f": "16000000000000000000000", + "0xfe96c4cd381562401aa32a86e65b9d52fa8aee27": "2640000000000000000000", + "0x683dba36f7e94f40ea6aea0d79b8f521de55076e": "140000000000000000000", + "0x5ac2908b0f398c0df5bac2cb13ca7314fba8fa3d": "199800000000000000000", + "0x8914a680a5aec5226d4baaec2e5552b44dd7c874": "100076000000000000000", + "0x041170f581de80e58b2a045c8f7c1493b001b7cb": "889800000000000000000", + "0x4665e47396c7db97eb2a03d90863d5d4ba319a94": "600000000000000000000", + "0xed4be04a052d7accb3dcce90319dba4020ab2c68": "37547947000000000000000", + "0x4b0619d9d8aa313a9531ac7dbe04ca0d6a5ad1b6": "2000000000000000000000", + "0xa21442ab05340ade68c915f3c3399b9955f3f7eb": "775000000000000000000", + "0x655934da8e744eaa3de34dbbc0894c4eda0b61f2": "200000000000000000000", + "0x6038740ae28d66ba93b0be08482b3205a0f7a07b": "316000000000000000000", + "0x99924a9816bb7ddf3fec1844828e9ad7d06bf4e6": "1760000000000000000000", + "0x6847825bdee8240e28042c83cad642f286a3bddc": "1500000000000000000000", + "0xa718aaad59bf395cba2b23e09b02fe0c89816247": "999600000000000000000", + "0x2c89f5fdca3d155409b638b98a742e55eb4652b7": "98500000000000000000000", + "0x1a7044e2383f8708305b495bd1176b92e7ef043a": "200000000000000000000", + "0x282e80a554875a56799fa0a97f5510e795974c4e": "1000000000000000000000", + "0xffb3bcc3196a8c3cb834cec94c34fed35b3e1054": "1340000000000000000000", + "0xd135794b149a18e147d16e621a6931f0a40a969a": "20000000000000000000000", + "0x6b94615db750656ac38c7e1cf29a9d13677f4e15": "12000000000000000000000", + "0xecbe425e670d39094e20fb5643a9d818eed236de": "5000000000000000000000", + "0x511e0efb04ac4e3ff2e6550e498295bfcd56ffd5": "668500000000000000000", + "0xff65511cada259260c1ddc41974ecaecd32d6357": "1760000000000000000000", + "0x9ffc5fe06f33f5a480b75aa94eb8556d997a16c0": "20000000000000000000", + "0x57df23bebdc65eb75feb9cb2fad1c073692b2baf": "4000000000000000000000", + "0x207ef80b5d60b6fbffc51f3a64b8c72036a5abbd": "6685000000000000000000", + "0xc573e841fa08174a208b060ccb7b4c0d7697127f": "668500000000000000000", + "0x411610b178d5617dfab934d293f512a93e5c10e1": "170000000000000000000", + "0x9991614c5baa47dd6c96874645f97add2c3d8380": "1970000000000000000000", + "0x2d3480bf0865074a72c7759ee5137b4d70c51ce9": "200000000000000000000", + "0x9d40e012f60425a340d82d03a1c757bfabc706fb": "169799000000000000000", + "0x47648bed01f3cd3249084e635d14daa9e7ec3c8a": "194000000000000000000", + "0xa5ff62222d80c013cec1a0e8850ed4d354dac16d": "207600000000000000000", + "0xf80d3619702fa5838c48391859a839fb9ce7160f": "1992800000000000000000", + "0x7c0f5e072043c9ee740242197e78cc4b98cdf960": "200000000000000000000", + "0xa40aa2bbce0c72b4d0dfffcc42715b2b54b01bfa": "1000000000000000000000", + "0x2eeed50471a1a2bf53ee30b1232e6e9d80ef866d": "20000000000000000000", + "0x0c2808b951ed9e872d7b32790fcc5994ae41ffdc": "102000000000000000000000", + "0x7f06c89d59807fa60bc60136fcf814cbaf2543bd": "10000000000000000000000", + "0x8d4b603c5dd4570c34669515fdcc665890840c77": "18200000000000000000", + "0xd5e5c135d0c4c3303934711993d0d16ff9e7baa0": "2000000000000000000000", + "0x241361559feef80ef137302153bd9ed2f25db3ef": "20000000000000000000000", + "0xdb63122de7037da4971531fae9af85867886c692": "277000000000000000000", + "0x417e4e2688b1fd66d821529e46ed4f42f8b3db3d": "2000000000000000000000", + "0x127db1cadf1b771cbd7475e1b272690f558c8565": "14000000000000000000000", + "0x48659d8f8c9a2fd44f68daa55d23a608fbe500dc": "2000000000000000000000", + "0xb3a64b1176724f5409e1414a3523661baee74b4a": "25610000000000000000", + "0xaa14422d6f0ae5a758194ed15780c838d67f1ee1": "28503824000000000000000", + "0xa0a0e65204541fca9b2fb282cd95138fae16f809": "10000000000000000000000", + "0xd2107b353726c3a2b46566eaa7d9f80b5d21dbe3": "20000000000000000000", + "0xe4cafb727fb5c6b70bb27533b8a9ccc9ef6888e1": "300443000000000000000", + "0x09f3f601f605441140586ce0656fa24aa5b1d9ae": "1539400000000000000000", + "0x87fcbe7c4193ffcb08143779c9bec83fe7fda9fc": "100275000000000000000", + "0x03ebc63fda6660a465045e235fbe6e5cf195735f": "141840000000000000000", + "0xbdbaf6434d40d6355b1e80e40cc4ab9c68d96116": "100000000000000000000", + "0x4e2225a1bb59bc88a2316674d333b9b0afca6655": "155000000000000000000", + "0x4dc3da13b2b4afd44f5d0d3189f444d4ddf91b1b": "2000000000000000000000", + "0x4ba8e0117fc0b6a3e56b24a3a58fe6cef442ff98": "5640000000000000000000", + "0x27146913563aa745e2588430d9348e86ea7c3510": "400000000000000000000", + "0x4c5afe40f18ffc48d3a1aec41fc29de179f4d297": "2000000000000000000000", + "0x8a810114b2025db9fbb50099a6e0cb9e2efa6bdc": "1910000000000000000000", + "0x2dee90a28f192d676a8773232b56f18f239e2fad": "18587970000000000000000", + "0x60676e92d18b000509c61de540e6c5ddb676d509": "1200000000000000000000", + "0x9bfc659c9c601ea42a6b21b8f17084ec87d70212": "10000000000000000000000", + "0x5d5d6e821c6eef96810c83c491468560ef70bfb5": "2000000000000000000000", + "0xd5787668c2c5175b01a8ee1ac3ecc9c8b2aba95a": "1999944000000000000000", + "0x33b336f5ba5edb7b1ccc7eb1a0d984c1231d0edc": "2000000000000000000000", + "0x3abb8adfc604f48d5984811d7f1d52fef6758270": "4475000000000000000000", + "0x980a84b686fc31bdc83c221058546a71b11f838a": "779471000000000000000", + "0x0b507cf553568daaf65504ae4eaa17a8ea3cdbf5": "2000000000000000000000", + "0x896009526a2c7b0c09a6f63a80bdf29d9c87de9c": "3462830000000000000000", + "0x9696052138338c722f1140815cf7749d0d3b3a74": "500000000000000000000", + "0x3831757eae7557cb8a37a4b10644b63e4d3b3c75": "200000000000000000000", + "0x62dc72729024375fc37cbb9c7c2393d10233330f": "2000000000000000000000", + "0x44098866a69b68c0b6bc168229b9603587058967": "188000000000000000000", + "0x25adb8f96f39492c9bb47c5edc88624e46075697": "26740000000000000000000", + "0xfd4de8e3748a289cf7d060517d9d38388db01fb8": "250000000000000000000", + "0x6be7595ea0f068489a2701ec4649158ddc43e178": "2000000000000000000000", + "0xd402b4f6a099ebe716cb14df4f79c0cd01c6071b": "2000000000000000000000", + "0xa07682000b1bcf3002f85c80c0fa2949bd1e82fd": "4000000000000000000000", + "0xeb4f00e28336ea09942588eeac921811c522143c": "2000000000000000000000", + "0x8f31c7005197ec997a87e69bec48649ab94bb2a5": "4000000000000000000000", + "0xe7fd8fd959aed2767ea7fa960ce1db53af802573": "1000000000000000000000", + "0xa8ef9ad274436042903e413c3b0c62f5f52ed584": "10000000000000000000000", + "0xd83ad260e9a6f432fb6ea28743299b4a09ad658c": "2000000000000000000000", + "0xb5c816a8283ca4df68a1a73d63bd80260488df08": "200000000000000000000", + "0xd7d3c75920590438b82c3e9515be2eb6ed7a8b1a": "60000000000000000000000", + "0xaf3cb5965933e7dad883693b9c3e15beb68a4873": "2000000000000000000000", + "0x6e899e59a9b41ab7ea41df7517860f2acb59f4fd": "20000000000000000000000", + "0x527a8ca1268633a6c939c5de1b929aee92aeac8d": "900000000000000000000", + "0x1680cec5021ee93050f8ae127251839e74c1f1fd": "13098657000000000000000", + "0xff7843c7010aa7e61519b762dfe49124a76b0e4e": "933580000000000000000000", + "0x140fba58dbc04803d84c2130f01978f9e0c73129": "400000000000000000000", + "0x0261ad3a172abf1315f0ffec3270986a8409cb25": "203500000000000000000", + "0xab5a79016176320973e8cd38f6375530022531c0": "1000000000000000000000", + "0xfca73eff8771c0103ba3cc1a9c259448c72abf0b": "1000000000000000000000", + "0x07d41217badca5e0e60327d845a3464f0f27f84a": "4000000000000000000000", + "0x2c1c19114e3d6de27851484b8d2715e50f8a1065": "100000000000000000000", + "0xabd21eff954fc6a7de26912a7cbb303a6607804e": "1517000000000000000000", + "0xf303d5a816affd97e83d9e4dac2f79072bb0098f": "960000000000000000000", + "0x114cfefe50170dd97ae08f0a44544978c599548d": "863000000000000000000", + "0x647b85044df2cf0b4ed4882e88819fe22ae5f793": "1000032000000000000000", + "0x1b130d6fa51d5c48ec8d1d52dc8a227be8735c8a": "2000000000000000000000", + "0x0d9d3f9bc4a4c6efbd59679b69826bc1f63d9916": "600000000000000000000", + "0xc765e00476810947816af142d46d2ee7bca8cc4f": "500000000000000000000", + "0xb57b04fa23d1203fae061eac4542cb60f3a57637": "191000000000000000000", + "0xe192489b85a982c1883246d915b229cb13207f38": "5000000000000000000000", + "0x5f483ffb8f680aedf2a38f7833afdcde59b61e4b": "2000000000000000000000", + "0xb46d1182e5aacaff0d26b2fcf72f3c9ffbcdd97d": "3139000000000000000000", + "0x59c7f785c93160e5807ed34e5e534bc6188647a7": "640000000000000000000", + "0x18e4ce47483b53040adbab35172c01ef64506e0c": "9000000000000000000000", + "0x296d66b521571a4e4103a7f562c511e6aa732d81": "668500000000000000000", + "0xbcd99edc2160f210a05e3a1fa0b0434ced00439b": "2000000000000000000000", + "0xf14f0eb86db0eb68753f16918e5d4b807437bd3e": "200000000000000000000", + "0x60d5667140d12614b21c8e5e8a33082e32dfcf23": "20000000000000000000000", + "0x8ccabf25077f3aa41545344d53be1b2b9c339000": "1695400000000000000000", + "0x8cc0d7c016fa7aa950114aa1db094882eda274ea": "159800000000000000000", + "0xc71145e529c7a714e67903ee6206e4c3042b6727": "1430000000000000000000", + "0xc5e9939334f1252ed2ba26814487dfd2982b3128": "70000000000000000000", + "0xf09b3e87f913ddfd57ae8049c731dba9b636dfc3": "608000000000000000000", + "0x4349225a62f70aea480a029915a01e5379e64fa5": "2598000000000000000000", + "0x666b4f37d55d63b7d056b615bb74c96b3b01991a": "4000000000000000000000", + "0x8bd6b1c6d74d010d1008dba6ef835d4430b35c32": "50000000000000000000", + "0x7363cd90fbab5bb8c49ac20fc62c398fe6fb744c": "2000000000000000000000", + "0xb7479dab5022c4d5dbaaf8de171b4e951dd1a457": "80000000000000000000", + "0x5a5468fa5ca226c7532ecf06e1bc1c45225d7ec9": "1910000000000000000000", + "0x32a20d028e2c6218b9d95b445c771524636a22ef": "9500000000000000000000", + "0x1bd28cd5c78aee51357c95c1ef9235e7c18bc854": "2000000000000000000000", + "0x693492a5c51396a482881669ccf6d8d779f00951": "345827000000000000000", + "0xbd723b289a7367b6ece2455ed61edb49670ab9c4": "4999995000000000000000", + "0x1be3542c3613687465f15a70aeeb81662b65cca8": "2000000000000000000000", + "0x5803e68b34da121aef08b602badbafb4d12481ca": "18000000000000000000000", + "0x9ac907ee85e6f3e223459992e256a43fa08fa8b2": "10000000000000000000000", + "0x833b6a8ec8da408186ac8a7d2a6dd61523e7ce84": "16000000000000000000000", + "0x64628c6fb8ec743adbd87ce5e018d531d9210437": "26740000000000000000", + "0x566c28e34c3808d9766fe8421ebf4f2b1c4f7d77": "1970000000000000000000", + "0x171ad9a04bedc8b861e8ed4bddf5717813b1bb48": "400000000000000000000", + "0x4f85bc1fc5cbc9c001e8f1372e07505370d8c71f": "940000000000000000000", + "0x6d2f976734b9d0070d1883cf7acab8b3e4920fc1": "10000000000000000000000", + "0x357a02c0a9dfe287de447fb67a70ec5b62366647": "26740000000000000000", + "0x44a01fb04ac0db2cce5dbe281e1c46e28b39d878": "1999944000000000000000", + "0x3630c5e565ceaa8a0f0ffe32875eae2a6ce63c19": "170016000000000000000", + "0x334340ee4b9cdc81f850a75116d50ee9b69825bf": "2000000000000000000000", + "0xc0afb7d8b79370cfd663c68cc6b9702a37cd9eff": "1000000000000000000000", + "0x2016895df32c8ed5478269468423aea7b7fbce50": "20000000000000000000", + "0x1e2fe4e4a77d141ff49a0c7fbc95b0a2b283eeeb": "2000000000000000000000", + "0x260df8943a8c9a5dba7945327fd7e0837c11ad07": "200000000000000000000", + "0x32fbeed6f626fcdfd51acafb730b9eeff612f564": "2000000000000000000000", + "0x9bd88068e13075f3a8cac464a5f949d6d818c0f6": "6000000000000000000000", + "0xab4572fbb1d72b575d69ec6ad17333873e8552fc": "1999942000000000000000", + "0xe44ea51063405154aae736be2bf1ee3b9be639ae": "4000000000000000000000", + "0x617f20894fa70e94a86a49cd74e03238f64d3cd9": "5000057000000000000000", + "0x3e914e3018ac00449341c49da71d04dfeeed6221": "4000000000000000000000", + "0x590181d445007bd0875aaf061c8d51153900836a": "2000000000000000000000", + "0x27987110221a880826adb2e7ab5eca78c6e31aec": "4000000000000000000000", + "0x06618e9d5762df62028601a81d4487d6a0ecb80e": "1337000000000000000000", + "0x8cc652dd13e7fe14dabbb36d5d320db9ffee8a54": "1790000000000000000000", + "0x8973aefd5efaee96095d9e288f6a046c97374b43": "141000000000000000000", + "0xdbd51cdf2c3bfacdff106221de2e19ad6d420414": "1760000000000000000000", + "0x25697ef20cccaa70d32d376f8272d9c1070c3d78": "200000000000000000000", + "0x0726c42e00f45404836eb1e280d073e7059687f5": "1623331000000000000000", + "0x5e0785532c7723e4c0af9357d5274b73bdddddde": "25000088000000000000000", + "0x38430e931d93be01b4c3ef0dc535f1e0a9610063": "10000000000000000000000", + "0x143d536b8b1cb84f56a39e0bc81fd5442bcacce1": "100000000000000000000", + "0x5c6d041da7af4487b9dc48e8e1f60766d0a56dbc": "1457800000000000000000", + "0xf9bfb59d538afc4874d4f5941b08c9730e38e24b": "40000000000000000000", + "0x83dbfd8eda01d0de8e158b16d0935fc2380a5dc7": "600000000000000000000", + "0x0e6cd664ad9c1ed64bf98749f40644b626e3792c": "60000000000000000000000", + "0xce2e0da8934699bb1a553e55a0b85c169435bea3": "4999962000000000000000", + "0xa39bfee4aec9bd75bd22c6b672898ca9a1e95d32": "10000000000000000000000", + "0x1bc44c8761231ba1f11f5faa40fa669a013e12ce": "203586000000000000000", + "0x68809af5d532a11c1a4d6e32aac75c4c52b08ead": "10000000000000000000000", + "0x80cc21bd99f39005c58fe4a448909220218f66cb": "1000072000000000000000", + "0x1080c1d8358a15bc84dac8253c6883319020df2c": "2674000000000000000000", + "0x9eaf6a328a4076024efa6b67b48b21eedcc0f0b8": "158000000000000000000", + "0x1e7b5e4d1f572becf2c00fc90cb4767b4a6e33d4": "112970000000000000000", + "0xacbd185589f7a68a67aa4b1bd65077f8c64e4e21": "200000000000000000000", + "0xff78541756ab2b706e0d70b18adb700fc4f1643d": "43250000000000000000000", + "0x7f0ec3db804692d4d1ea3245365aab0590075bc4": "4000000000000000000000", + "0x4a918032439159bb315b6725b6830dc83697739f": "343800000000000000000", + "0xbc1b021a78fde42d9b5226d6ec26e06aa3670090": "80000000000000000000", + "0x2f2523cc834f0086052402626296675186a8e582": "16000000000000000000000", + "0x9db2e15ca681f4c66048f6f9b7941ed08b1ff506": "4000000000000000000000", + "0x20b9a9e6bd8880d9994ae00dd0b9282a0beab816": "500000000000000000000", + "0x3bddbc8134f77d55597fc97c26d26698090604eb": "13700000000000000000", + "0x80c3a9f695b16db1597286d1b3a8b7696c39fa27": "100000000000000000000", + "0x53194d8afa3e883502767edbc30586af33b114d3": "2000000000000000000000", + "0xe2efd0a9bc407ece03d67e8ec8e9d283f48d2a49": "12280000000000000000000", + "0x1cb450920078aab2317c7db3b38af7dd298b2d41": "340000000000000000000", + "0xca8276c477b4a07b80107b843594189607b53bec": "6000000000000000000000", + "0x147f4210ab5804940a0b7db8c14c28396b62a6bf": "2000000000000000000000", + "0xd3df3b53cb3b4755de54e180451cc44c9e8ae0aa": "659801000000000000000", + "0xf7c708015071d4fb0a3a2a09a45d156396e3349e": "3000000000000000000000", + "0xa8cafac32280d021020bf6f2a9782883d7aabe12": "100000000000000000000", + "0x399aa6f5d078cb0970882bc9992006f8fbdf3471": "1000000000000000000000", + "0x15669180dee29598869b08a721c7d24c4c0ee63f": "1000000000000000000000", + "0xbba8ab22d2fedbcfc63f684c08afdf1c175090b5": "99091000000000000000", + "0x5e5a441974a83d74c687ebdc633fb1a49e7b1ad7": "3000000000000000000000", + "0x98b769cc305cecfb629a00c907069d7ef9bc3a12": "26000000000000000000", + "0xc820c711f07705273807aaaa6de44d0e4b48be2e": "155000000000000000000", + "0x12aa7d86ddfbad301692feac8a08f841cb215c37": "137000000000000000000", + "0x6ff5d361b52ad0b68b1588607ec304ae5665fc98": "1940000000000000000000", + "0x2382a9d48ec83ea3652890fd0ee79c907b5b2dc1": "133700000000000000000", + "0xb2a144b1ea67b9510f2267f9da39d3f93de26642": "2000000000000000000000", + "0xb3e20eb4de18bd060221689894bee5aeb25351ee": "73535000000000000000", + "0x101a0a64f9afcc448a8a130d4dfcbee89537d854": "15200000000000000000000", + "0x1b826fb3c012b0d159e294ba5b8a499ff3c0e03c": "2000000000000000000000", + "0xaafb7b013aa1f8541c7e327bf650adbd194c208f": "1358000000000000000000", + "0x96eb523e832f500a017de13ec27f5d366c560eff": "307600000000000000000", + "0xc7bf17c4c11f98941f507e77084fffbd2dbd3db5": "1000000000000000000000", + "0x840ec83ea93621f034e7bb3762bb8e29ded4c479": "2500000000000000000000", + "0x0e9c511864a177f49be78202773f60489fe04e52": "6000000000000000000000", + "0xf6f1a44309051c6b25e47dff909b179bb9ab591c": "1940000000000000000000", + "0x63fe6bcc4b8a9850abbe75803730c932251f145b": "18200000000000000000", + "0xf88b58db37420b464c0be88b45ee2b95290f8cfa": "40000000000000000000", + "0x9d4d321177256ebd9afbda304135d517c3dc5693": "616000000000000000000", + "0x8c1fbe5f0aea359c5aa1fa08c8895412ca8e05a6": "1000000000000000000000", + "0xcb0dd7cf4e5d8661f6028943a4b9b75c914436a7": "120000000000000000000000", + "0xa3979a92760a135adf69d72f75e167755f1cb8c3": "100000000000000000000", + "0xca22cda3606da5cad013b8074706d7e9e721a50c": "6816200000000000000000", + "0x157559adc55764cc6df79323092534e3d6645a66": "6000000000000000000000", + "0x4f52ad6170d25b2a2e850eadbb52413ff2303e7f": "3040000000000000000000", + "0xeed28c3f068e094a304b853c950a6809ebcb03e0": "17300000000000000000000", + "0x2e47f287f498233713850d3126823cc67dcee255": "14600000000000000000", + "0x6c359e58a13d4578a9338e335c67e7639f5fb4d7": "218000000000000000000", + "0x4968a2cedb457555a139295aea28776e54003c87": "10092310000000000000000", + "0x4041374b0feef4792e4b33691fb86897a4ff560c": "365000000000000000000", + "0x83e48055327c28b5936fd9f4447e73bdb2dd3376": "2674000000000000000000", + "0x32b7feebc5c59bf65e861c4c0be42a7611a5541a": "2212000000000000000000", + "0x21a6db6527467bc6dad54bc16e9fe2953b6794ed": "14000000000000000000000", + "0xe8ead1bb90ccc3aea2b0dcc5b58056554655d1d5": "7760000000000000000000", + "0x7a94b19992ceb8ce63bc92ee4b5aded10c4d9725": "16770000000000000000000", + "0x90e93e4dc17121487952333614002be42356498e": "1910000000000000000000", + "0xaab00abf5828d7ebf26b47ceaccdb8ba03325166": "10000000000000000000000", + "0x0a9ab2638b1cfd654d25dab018a0aebddf85fd55": "21801000000000000000", + "0xb12ed07b8a38ad5506363fc07a0b6d799936bdaf": "10000000000000000000000", + "0xf4a9d00cefa97b7a58ef9417fc6267a5069039ee": "21800000000000000000", + "0x04a1cada1cc751082ff8da928e3cfa000820a9e9": "40000000000000000000", + "0x9018cc1f48d2308e252ab6089fb99a7c1d569410": "200000000000000000000", + "0x895d694e880b13ccd0848a86c5ce411f88476bbf": "199955000000000000000", + "0x40a7f72867a7dc86770b162b7557a434ed50cce9": "1000000000000000000000", + "0x467ea10445827ef1e502daf76b928a209e0d4032": "2000000000000000000000", + "0x7553aa23b68aa5f57e135fe39fdc235eaca8c98c": "1000000000000000000000", + "0x31b43b015d0081643c6cda46a7073a6dfdbca825": "50019600000000000000000", + "0xd82fd9fdf6996bedad2843159c06f37e0924337d": "1688800000000000000000", + "0x24a4eb36a7e498c36f99975c1a8d729fd6b305d7": "258000000000000000000", + "0x91d66ea6288faa4b3d606c2aa45c7b6b8a252739": "2000000000000000000000", + "0x83a402438e0519773d5448326bfb61f8b20cf52d": "1520000000000000000000", + "0xc2fafdd30acb6d6706e9293cb02641f9edbe07b5": "1494224000000000000000", + "0x79dba256472db4e058f2e4cdc3ea4e8a42773833": "1460000000000000000000", + "0x498abdeb14c26b7b7234d70fceaef361a76dff72": "3000000000000000000000", + "0x7b73242d75ca9ad558d650290df17692d54cd8b8": "2000200000000000000000", + "0x6ec3659571b11f889dd439bcd4d67510a25be57e": "123000000000000000000", + "0xab098633eeee0ccefdf632f9575456f6dd80fc86": "200000000000000000000000", + "0xf4a51fce4a1d5b94b0718389ba4e7814139ca738": "300000000000000000000", + "0x8f561b41b209f248c8a99f858788376250609cf3": "1700000000000000000000", + "0x05d0f4d728ebe82e84bf597515ad41b60bf28b39": "4200000000000000000000", + "0xdfdf43393c649caebe1bb18059decb39f09fb4e8": "400000000000000000000", + "0x0089508679abf8c71bf6781687120e3e6a84584d": "1800000000000000000000", + "0x80907f593148b57c46c177e23d25abc4aae18361": "100000000000000000000", + "0x94fcceadfe5c109c5eaeaf462d43873142c88e22": "4800000000000000000000", + "0xe89249738b7eced7cb666a663c49cbf6de8343ea": "2000000000000000000000", + "0x23c99ba087448e19c9701df66e0cab52368331fa": "2000000000000000000000", + "0xa68e0c30cba3bc5a883e540320f999c7cd558e5c": "1799869000000000000000", + "0x88888a57bd9687cbf950aeeacf9740dcc4d1ef59": "1820000000000000000000", + "0xe9b36fe9b51412ddca1a521d6e94bc901213dda8": "10000000000000000000000", + "0xa9145046fa3628cf5fd4c613927be531e6db1fdd": "112000000000000000000", + "0xe82c58c579431b673546b53a86459acaf1de9b93": "1000000000000000000000", + "0xbd6a474d66345bcdd707594adb63b30c7822af54": "4000000000000000000000", + "0x6a6159074ab573e0ee581f0f3df2d6a594629b74": "310000000000000000000", + "0x2e7f465520ec35cc23d68e75651bb6689544a196": "1050049000000000000000", + "0xac6d02e9a46b379fac4ac9b1d7b5d47bc850ce16": "1760000000000000000000", + "0xbd59094e074f8d79142ab1489f148e32151f2089": "20000000000000000000", + "0x0ba6e46af25a13f57169255a34a4dac7ce12be04": "500000000000000000000", + "0x35145f620397c69cb8e00962961f0f4886643989": "6000000000000000000000", + "0xd84b922f7841fc5774f00e14604ae0df42c8551e": "4011000000000000000000", + "0x44232ff66ddad1fd841266380036afd7cf7d7f42": "200000000000000000000", + "0x516954025fca2608f47da81c215eedfd844a09ff": "382000000000000000000", + "0xe5aa0b833bb916dc19a8dd683f0ede241d988eba": "3000000000000000000000", + "0x80ea1acc136eca4b68c842a95adf6b7fee7eb8a2": "4000000000000000000000", + "0x98a0e54c6d9dc8be96276cebf4fec460f6235d85": "1969803000000000000000", + "0x91620f3eb304e813d28b0297556d65dc4e5de5aa": "3820000000000000000000", + "0x7bb984c6dbb9e279966afafda59c01d02627c804": "8050000000000000000000", + "0x41f489a1ec747bc29c3e5f9d8db97877d4d1b4e9": "133700000000000000000", + "0x8dbc3e6cb433e194f40f82b40faadb1f8b856116": "1910000000000000000000", + "0x889da40fb1b60f9ea9bd7a453e584cf7b1b4d9f7": "40000000000000000000", + "0xdebbdd831e0f20ae6e378252decdf92f7cf0c658": "2000000000000000000000", + "0xa22ade0ddb5c6ef8d0cd8de94d82b11082cb2e91": "1020000000000000000000", + "0x823219a25976bb2aa4af8bad41ac3526b493361f": "2000000000000000000000", + "0x6d39a9e98f81f769d73aad2cead276ac1387babe": "394000000000000000000", + "0x751abcb6cc033059911815c96fd191360ab0442d": "8000000000000000000000", + "0x64d80c3b8ba68282290b75e65d8978a15a87782c": "1970000000000000000000", + "0x6ba8f7e25fc2d871618e24e40184199137f9f6aa": "400020000000000000000", + "0x25a74c2ac75dc8baa8b31a9c7cb4b7829b2456da": "2000000000000000000000", + "0x0f7b61c59b016322e8226cafaee9d9e76d50a1b3": "4000000000000000000000", + "0x7526e482529f0a14eec98871dddd0e721b0cd9a2": "20000000000000000000", + "0x071dd90d14d41f4ff7c413c24238d3359cd61a07": "36400000000000000000000", + "0xa986762f7a4f294f2e0b173279ad2c81a2223458": "20000000000000000000", + "0xe667f652f957c28c0e66d0b63417c80c8c9db878": "601650000000000000000", + "0x7b98e23cb96beee80a168069ebba8f20edd55ccf": "214500000000000000000", + "0x2d8e5bb8d3521695c77e7c834e0291bfacee7408": "1970000000000000000000", + "0xf23d01589eb12d439f7448ff54307529f191858d": "2000000000000000000000", + "0xabd9605b3e91acfd777830d16463478ae0fc7720": "133700000000000000000", + "0xeabb90d37989aab31feae547e0e6f3999ce6a35d": "2000000000000000000000", + "0x0abfb39b11486d79572866195ba26c630b6784db": "121500000000000000000000", + "0xd56a144d7af0ae8df649abae535a15983aa04d02": "5000000000000000000000", + "0x998c1f93bcdb6ff23c10d0dc924728b73be2ff9f": "1002750000000000000000", + "0xbc62b3096a91e7dc11a1592a293dd2542150d751": "1000000000000000000000", + "0x0c8f66c6017bce5b20347204b602b743bad78d60": "2000000000000000000000", + "0x4c5b3dc0e2b9360f91289b1fe13ce12c0fbda3e1": "2000000000000000000000", + "0xb44605552471a6eee4daab71ff3bb41326d473e0": "839200000000000000000", + "0xfc3d226bb36a58f526568857b0bb12d109ec9301": "2000000000000000000000", + "0xadc8228ef928e18b2a807d00fb3c6c79cd1d9e96": "22800000000000000000", + "0x9df32a501c0b781c0281022f42a1293ffd7b892a": "9000000000000000000000", + "0xe7da609d40cde80f00ce5b4ffb6aa9d0b03494fc": "1000000000000000000000", + "0x9b64d3cd8d2b73f66841b5c46bb695b88a9ab75d": "20769000000000000000", + "0x8e9c08f738661f9676236eff82ba6261dd3f4822": "100000000000000000000", + "0xdeb97254474c0d2f5a7970dcdb2f52fb1098b896": "1000000000000000000000", + "0xb4256273962bf631d014555cc1da0dcc31616b49": "2000000000000000000000", + "0x23abd9e93e7957e5b636be6579051c15e5ce0b0e": "17188400000000000000000", + "0x382591e7217b435e8e884cdbf415fe377a6fe29e": "8022000000000000000000", + "0xf17adb740f45cbbde3094e7e13716f8103f563bd": "2000000000000000000000", + "0x61ed5596c697207f3d55b2a51aa7d50f07fa09e8": "2000000000000000000000", + "0x788e809741a3b14a22a4b1d937c82cfea489eebe": "7000000000000000000000", + "0x992646ac1acaabf5ddaba8f9429aa6a94e7496a7": "1000110000000000000000", + "0x51296f5044270d17707646129c86aad1645eadc1": "1337133000000000000000", + "0x6ee8aad7e0a065d8852d7c3b9a6e5fdc4bf50c00": "20000000000000000000", + "0x30db6b9b107e62102f434a9dd0960c2021f5ce4c": "599742000000000000000", + "0x63fc93001305adfbc9b85d29d9291a05f8f1410b": "1000000000000000000000", + "0xdf6ed6006a6abe886ed33d95a4de28fc12183927": "910000000000000000000", + "0x4745ab181a36aa8cbf2289d0c45165bc7ebe2381": "39400000000000000000", + "0x7bb0fdf5a663b5fba28d9c902af0c811e252f298": "200000000000000000000", + "0xe0ff0bd9154439c4a5b7233e291d7d868af53f33": "396110000000000000000", + "0x09261f9acb451c3788844f0c1451a35bad5098e3": "8664000000000000000000", + "0x2813d263fc5ff2479e970595d6b6b560f8d6d6d1": "2000000000000000000000", + "0x2cd19694d1926a0fa9189edebafc671cf1b2caa5": "1000000000000000000000", + "0x05336e9a722728d963e7a1cf2759fd0274530fca": "915583000000000000000", + "0xe5b7af146986c0ff8f85d22e6cc334077d84e824": "2000000000000000000000", + "0x3e4fbd661015f6461ed6735cefef01f31445de3a": "16200000000000000000000", + "0x4f5df5b94357de948604c51b7893cddf6076baad": "3760000000000000000000", + "0x9567a0de811de6ff095b7ee64e7f1b83c2615b80": "267400000000000000000", + "0x955db3b74360b9a268677e73cea821668af6face": "30000000000000000000000", + "0x3e040d40cb80ba0125f3b15fdefcc83f3005da1b": "1038000000000000000000", + "0x43f470ed659e2991c375957e5ddec5bd1d382231": "100000000000000000000", + "0x047f9bf1529daf87d407175e6f171b5e59e9ff3e": "650000000000000000000", + "0x15e3b584056b62c973cf5eb096f1733e54c15c91": "936702000000000000000", + "0xc03de42a109b657a64e92224c08dc1275e80d9b2": "20000000000000000000", + "0xe4fc13cfcbac1b17ce7783acd423a845943f6b3a": "20000000000000000000", + "0x65ff874fafce4da318d6c93d57e2c38a0d73e820": "1000160000000000000000", + "0x8b997dbc078ad02961355da0a159f2927ed43d64": "197000000000000000000", + "0x2f5080b83f7e2dc0a1dd11b092ad042bff788f4c": "3338355000000000000000", + "0x1b3920d001c43e72b24e7ca46f0fd6e0c20a5ff2": "2000000000000000000000", + "0x5ade77fd81c25c0af713b10702768c1eb2f975e7": "20000000000000000000", + "0xacaaddcbf286cb0e215dda55598f7ff0f4ada5c6": "1000000000000000000000", + "0x64e0217a5b38aa40583625967fa9883690388b6f": "200000000000000000000", + "0xae648155a658370f929be384f7e001047e49dd46": "13561000000000000000000", + "0xf7c1b443968b117b5dd9b755572fcd39ca5ec04b": "456082000000000000000", + "0xde027efbb38503226ed871099cb30bdb02af1335": "1000000000000000000000", + "0x49cf1e54be363106b920729d2d0ba46f0867989a": "268000000000000000000", + "0xe7f4d7fe6f561f7fa1da3005fd365451ad89df89": "200000000000000000000", + "0xb036916bdacf94b69e5a8a65602975eb026104dd": "20000000000000000000", + "0xe923c06177b3427ea448c0a6ff019b54cc548d95": "36281000000000000000", + "0xad927e03d1599a78ca2bf0cad2a183dceb71eac0": "1970000000000000000000", + "0xef39ca9173df15531d73e6b72a684b51ba0f2bb4": "1598000000000000000000", + "0x6443b8ae639de91cf73c5ae763eeeed3ddbb9253": "2000000000000000000000", + "0x8026435aac728d497b19b3e7e57c28c563954f2b": "1730000000000000000000", + "0xed327a14d5cfadd98103fc0999718d7ed70528ea": "1440000000000000000000", + "0x38a3dccf2fcfe0c91a2624bd0cbf88ee4a076c33": "2000000000000000000000", + "0xf0b1f9e27832c6de6914d70afc238c749995ace4": "2000000000000000000000", + "0x770d98d31b4353fceee8560c4ccf803e88c0c4e0": "600000000000000000000", + "0xba1f0e03cb9aa021f4dcebfa94e5c889c9c7bc9e": "32200000000000000000000", + "0x233842b1d0692fd11140cf5acda4bf9630bae5f8": "2000000000000000000000", + "0xb5dd50a15da34968890a53b4f13fe1af081baaaa": "4000000000000000000000", + "0x72072a0ef1cff3d567cdd260e708ddc11cbc9a31": "100000000000000000000", + "0x81a88196fac5f23c3e12a69dec4b880eb7d97310": "2000000000000000000000", + "0x6c63f84556d290bfcd99e434ee9997bfd779577a": "2000000000000000000000", + "0x5f167aa242bc4c189adecb3ac4a7c452cf192fcf": "1999980000000000000000", + "0x445cb8de5e3df520b499efc980f52bff40f55c76": "2000000000000000000000", + "0xaec27ce2133e82d052520afb5c576d9f7eb93ed2": "65232380000000000000000", + "0x07dc2bf83bc6af19a842ffea661af5b41b67fda1": "1500000000000000000000", + "0xfebd48d0ffdbd5656cd5e686363a61145228f279": "2800000000000000000000", + "0xa86db07d9f812f4796622d40e03d135874a88a74": "20000000000000000000", + "0x5413c97ffa4a6e2a7bba8961dc9fce8530a787d7": "1000000000000000000000", + "0xe2ff9ee4b6ecc14141cc74ca52a9e7a2ee14d908": "1400000000000000000000", + "0x2e8eb30a716e5fe15c74233e039bfb1106e81d12": "100000000000000000000", + "0xfd88d114220f081cb3d5e15be8152ab07366576a": "300000000000000000000", + "0xe408fceaa1b98f3c640f48fcba39f056066d6308": "10000000000000000000000", + "0x057dd29f2d19aa3da42327ea50bce86ff5c911d9": "4000000000000000000000", + "0xed1065dbcf9d73c04ffc7908870d881468c1e132": "2000000000000000000000", + "0xbbc9d8112e5beb02dd29a2257b1fe69b3536a945": "2000000000000000000000", + "0x79c1be19711f73bee4e6316ae7549459aacea2e0": "400000000000000000000", + "0x1bcf3441a866bdbe963009ce33c81cbb0261b02c": "182000000000000000000", + "0xe2e26e4e1dcf30d048cc6ecf9d51ec1205a4e926": "4000000000000000000000", + "0x77701e2c493da47c1b58f421b5495dee45bea39b": "6068279000000000000000", + "0x37a05aceb9395c8635a39a7c5d266ae610d10bf2": "30000000000000000000000", + "0xc6355ec4768c70a49af69513cd83a5bca7e3b9cd": "6000000000000000000000", + "0xe3c0c128327a9ad80148139e269773428e638cb0": "2000000000000000000000", + "0xf7f4898c4c526d955f21f055cb6e47b915e51964": "2288000000000000000000", + "0x29824e94cc4348bc963279dcdf47391715324cd3": "1940000000000000000000", + "0xeaa45cea02d87d2cc8fda9434e2d985bd4031584": "1920750000000000000000", + "0xe08b9aba6bd9d28bc2056779d2fbf0f2855a3d9d": "2000000000000000000000", + "0x87c498170934b8233d1ad1e769317d5c475f2f40": "1015200000000000000000", + "0x352d29a26e8a41818181746467f582e6e84012e0": "6000000000000000000000", + "0x403220600a36f73f24e190d1edb2d61be3f41354": "304000000000000000000", + "0x0a48296f7631708c95d2b74975bc4ab88ac1392a": "5000000000000000000000", + "0xffe0e997f1977a615f5a315af413fd4869343ba0": "100076000000000000000", + "0xca66b2280fa282c5b67631ce552b62ee55ad8474": "1969488000000000000000", + "0x2b6ed29a95753c3ad948348e3e7b1a251080ffb9": "250000000000000000000000", + "0x492e70f04d18408cb41e25603730506b35a2876b": "39400000000000000000", + "0x0e6baaa3deb989f289620076668618e9ac332865": "200000000000000000000", + "0xb753a75f9ed10b21643a0a3dc0517ac96b1a4068": "401800000000000000000", + "0x3ad915d550b723415620f5a9b5b88a85f382f035": "1000000000000000000000", + "0xc992be59c6721caf4e028f9e8f05c25c55515bd4": "20000000000000000000", + "0x02b643d6fabd437a851accbe79abb7fde126dccf": "7200000000000000000000", + "0x88797e58675ed5cc4c19980783dbd0c956085153": "2000000000000000000000", + "0xac142eda1157b9a9a64390df7e6ae694fac98905": "200000000000000000000", + "0x656579daedd29370d9b737ee3f5cd9d84bc2b342": "1430000000000000000000", + "0x9bb9b02a26bfe1ccc3f0c6219e261c397fc5ca78": "1337000000000000000000", + "0xbee8d0b008421954f92d000d390fb8f8e658eaee": "1000000000000000000000", + "0x7989d09f3826c3e5af8c752a8115723a84d80970": "415554000000000000000", + "0x7cd5d81eab37e11e6276a3a1091251607e0d7e38": "62856000000000000000", + "0x6ce1b0f6adc47051e8ab38b39edb4186b03babcc": "1207800000000000000000", + "0xabfcf5f25091ce57875fc674dcf104e2a73dd2f2": "19700000000000000000", + "0x1c3ef05dae9dcbd489f3024408669de244c52a02": "20000000000000000000000", + "0xcfa8b37127149bdbfee25c34d878510951ea10eb": "2000000000000000000000", + "0x74863acec75d03d53e860e64002f2c165e538377": "1000000000000000000000", + "0x59b9e733cba4be00429b4bd9dfa64732053a7d55": "20000000000000000000", + "0xaeadfcd0978edad74a32bd01a0a51d37f246e661": "260000000000000000000", + "0x08090876baadfee65c3d363ba55312748cfa873d": "1700170000000000000000", + "0xe589fa76984db5ec4004b46ee8a59492c30744ce": "2800000000000000000000", + "0x3485361ee6bf06ef6508ccd23d94641f814d3e2f": "2000000000000000000000", + "0x5cb731160d2e8965670bde925d9de5510935347d": "40000000000000000000", + "0x8ef4d8a2c23c5279187b64e96f741404085385f3": "299598000000000000000", + "0xe246683cc99db7c4a52bcbacaab0b32f6bfc93d7": "2000000000000000000000", + "0x7d273e637ef1eac481119413b91c989dc5eac122": "500000000000000000000", + "0x6efba8fb2ac5b6730729a972ec224426a287c3ad": "283152000000000000000", + "0x0773eeacc050f74720b4a1bd57895b1cceeb495d": "10000000000000000000000", + "0x88a122a2382c523931fb51a0ccad3beb5b7259c3": "2000000000000000000000", + "0xb0b779b94bfa3c2e1f587bcc9c7e21789222378f": "1550000000000000000000", + "0x86f95c5b11a293940e35c0b898d8b75f08aab06d": "29605000000000000000000", + "0xcf2288ef4ebf88e86db13d8a0e0bf52a056582c3": "2533000000000000000000", + "0x71ea5b11ad8d29b1a4cb67bf58ca6c9f9c338c16": "1600000000000000000000", + "0x9917d68d4af341d651e7f0075c6de6d7144e7409": "5660000000000000000000", + "0x1e5800227d4dcf75e30f5595c5bed3f72e341e3b": "248300000000000000000", + "0x123759f333e13e3069e2034b4f05398918119d36": "20000000000000000000000", + "0xf798d16da4e460c460cd485fae0fa0599708eb82": "1000000000000000000000", + "0x864bec5069f855a4fd5892a6c4491db07c88ff7c": "1000000000000000000000", + "0xfa283299603d8758e8cab082125d2c8f7d445429": "6415633000000000000000", + "0xc811c2e9aa1ac3462eba5e88fcb5120e9f6e2ca2": "1400140000000000000000", + "0x61547d376e5369bcf978fc162c3c56ae453547e8": "200000000000000000000", + "0x0d747ee5969bf79d57381d6fe3a2406cd0d8ce27": "100000000000000000000000", + "0xf8962b75db5d24c7e8b7cef1068c3e67cebb30a5": "280000000000000000000", + "0x35bf6688522f35467a7f75302314c02ba176800e": "17400000000000000000000", + "0x05cb6c3b0072d3116761b532b218443b53e8f6c5": "141722000000000000000000", + "0x91c80caa081b38351d2a0e0e00f80a34e56474c1": "1000000000000000000000", + "0xd75a502a5b677287470f65c5aa51b87c10150572": "907400000000000000000", + "0x3e194b4ecef8bb711ea2ff24fec4e87bd032f7d1": "2575465000000000000000", + "0x736bf1402c83800f893e583192582a134eb532e9": "9999996000000000000000", + "0xc2cb1ada5da9a0423873814793f16144ef36b2f3": "1334326000000000000000", + "0xefcce06bd6089d0e458ef561f5a689480afe7000": "600000000000000000000", + "0xbfe6bcb0f0c07852643324aa5df5fd6225abc3ca": "74500000000000000000", + "0x9d799e943e306ba2e5b99c8a6858cbb52c0cf735": "300000000000000000000", + "0xf45b1dcb2e41dc27ffa024daadf619c11175c087": "19700000000000000000", + "0x08e38ee0ce48c9ca645c1019f73b5355581c56e6": "1600000000000000000000", + "0x2cb4c3c16bb1c55e7c6b7a19b127a1ac9390cc09": "3397053000000000000000", + "0xbdc02cd4330c93d6fbda4f6db2a85df22f43c233": "2000000000000000000000", + "0xacec91ef6941cf630ba9a3e787a012f4a2d91dd4": "80000000000000000000000", + "0x27ac073be79ce657a93aa693ee43bf0fa41fef04": "50000000000000000000000", + "0x22fe884d9037291b4d52e6285ae68dea0be9ffb5": "2000000000000000000000", + "0xc3107a9af3322d5238df0132419131629539577d": "492650000000000000000", + "0xb5cac5ed03477d390bb267d4ebd46101fbc2c3da": "197000000000000000000", + "0x58fb947364e7695765361ebb1e801ffb8b95e6d0": "200000000000000000000", + "0x32860997d730b2d83b73241a25d3667d51c908ef": "499938000000000000000", + "0xc79d5062c796dd7761f1f13e558d73a59f82f38b": "8000000000000000000000", + "0xfa142fe47eda97e6503b386b18a2bedd73ccb5b1": "850080000000000000000", + "0x6ca5de00817de0cedce5fd000128dede12648b3c": "20000000000000000000", + "0x214b743955a512de6e0d886a8cbd0282bee6d2a2": "2000000000000000000000", + "0xede79ae1ff4f1606d59270216fa46ab2ddd4ecaa": "146000000000000000000", + "0x528101ce46b720a2214dcdae6618a53177ffa377": "508876000000000000000", + "0xb5870ce342d43343333673038b4764a46e925f3e": "1000000000000000000000", + "0x843bd3502f45f8bc4da370b323bdac3fcf5f19a6": "1476000000000000000000", + "0x5067f4549afbfe884c59cbc12b96934923d45db0": "1000000000000000000000", + "0x6f2a42e6e033d01061131929f7a6ee1538021e52": "2000000000000000000000", + "0xe9e1f7cb00a110edd0ebf8b377ef8a7bb856117f": "200000000000000000000", + "0xa387ecde0ee4c8079499fd8e03473bd88ad7522a": "1970000000000000000000", + "0x6dff90e6dc359d2590882b1483edbcf887c0e423": "1000000000000000000000", + "0x22e512149a18d369b73c71efa43e86c9edabaf1d": "1455000000000000000000", + "0xa3203095edb7028e6871ce0a84f548459f83300a": "4000000000000000000000", + "0x93b4bf3fdff6de3f4e56ba6d7799dc4b93a6548f": "19100000000000000000", + "0x8c75956e8fed50f5a7dd7cfd27da200f6746aea6": "1000000000000000000000", + "0xafc8ebe8988bd4105acc4c018e546a1e8f9c7888": "500000000000000000000", + "0xbf9acd4445d9c9554689cabbbab18800ff1741c2": "1000000000000000000000", + "0x603f2fab7afb6e017b94766069a4b43b38964923": "1656954000000000000000", + "0xa1f765c44fe45f790677944844be4f2d42165fbd": "3687750000000000000000", + "0x4dc9d5bb4b19cecd94f19ec25d200ea72f25d7ed": "2000000000000000000000", + "0x48f60a35484fe7792bcc8a7b6393d0dda1f6b717": "3600000000000000000000", + "0x588ed990a2aff44a94105d58c305257735c868ac": "16100000000000000000000", + "0x710be8fd5e2918468be2aabea80d828435d79612": "17600000000000000000", + "0x03ea6d26d080e57aee3926b18e8ed73a4e5b2826": "200000000000000000000", + "0x20824ba1dbebbef9846ef3d0f6c1b017e6912ec4": "7170194000000000000000", + "0xf7500c166f8bea2f82347606e5024be9e4f4ce99": "20000000000000000000", + "0x9d369165fb70b81a3a765f188fd60cbe5e7b0968": "2000000000000000000000", + "0x6fddbd9bca66e28765c2162c8433548c1052ed11": "82720000000000000000000", + "0x8b81156e698639943c01a75272ad3d35851ab282": "344946000000000000000", + "0x75804aac64b4199083982902994d9c5ed8828f11": "557800000000000000000", + "0xd6e8e97ae9839b9ee507eedb28edfb7477031439": "2000000000000000000000", + "0x6c808cabb8ff5fbb6312d9c8e84af8cf12ef0875": "4000086000000000000000", + "0xafa539586e4719174a3b46b9b3e663a7d1b5b987": "5000000000000000000000", + "0xf8a065f287d91d77cd626af38ffa220d9b552a2b": "1910000000000000000000", + "0x30e60900cacc7203f314dc604347255167fc2a0f": "2000000000000000000000", + "0x796f87ba617a2930b1670be92ed1281fb0b346e1": "128400000000000000000", + "0xf114ff0d0f24eff896edde5471dea484824a99b3": "13700000000000000000", + "0x0b80fc70282cbdd5fde35bf78984db3bdb120188": "1000160000000000000000", + "0xda7ad025ebde25d22243cb830ea1d3f64a566323": "500000000000000000000", + "0x65a52141f56bef98991724c6e7053381da8b5925": "60140000000000000000", + "0xbbc8eaff637e94fcc58d913c7770c88f9b479277": "200000000000000000000", + "0x0469e8c440450b0e512626fe817e6754a8152830": "2000000000000000000000", + "0x0727be0a2a00212048b5520fbefb953ebc9d54a0": "10000000000000000000000", + "0x7d858493f07415e0912d05793c972113eae8ae88": "1818000000000000000000", + "0x7091303116d5f2389b23238b4d656a8596d984d3": "1094014000000000000000", + "0x3702e704cc21617439ad4ea27a5714f2fda1e932": "1000000000000000000000", + "0xb87de1bcd29269d521b8761cc39cfb4319d2ead5": "1000000000000000000000", + "0xf639ac31da9f67271bd10402b7654e5ce763bd47": "399996000000000000000", + "0xe7735ec76518fc6aa92da8715a9ee3f625788f13": "1997803000000000000000", + "0x51277fe7c81eebd252a03df69a6b9f326e272207": "59965000000000000000", + "0x3b8098533f7d9bdcd307dbb23e1777ca18418936": "2000000000000000000000", + "0x2cba6d5d0dc204ea8a25ada2e26f5675bd5f2fdc": "1330755000000000000000", + "0x5c3c1c645b917543113b3e6c1c054da1fe742b9a": "800000000000000000000", + "0x5ecdbaeab9106ffe5d7b519696609a05baeb85ad": "20000000000000000000", + "0x45a820a0672f17dc74a08112bc643fd1167736c3": "199943000000000000000", + "0xbeef94213879e02622142bea61290978939a60d7": "5728109000000000000000", + "0x6cd212aee04e013f3d2abad2a023606bfb5c6ac7": "1999944000000000000000", + "0x92698e345378c62d8eda184d94366a144b0c105b": "1400000000000000000000", + "0x2d5b42fc59ebda0dfd66ae914bc28c1b0a6ef83a": "206764195000000000000000", + "0xb7a6791c16eb4e2162f14b6537a02b3d63bfc602": "780700000000000000000", + "0xfa105f1a11b6e4b1f56012a27922e2ac2da4812f": "9550000000000000000000", + "0x2306df931a940d58c01665fa4d0800802c02edfe": "1000000000000000000000", + "0xf37bf78c5875154711cb640d37ea6d28cfcb1259": "200000000000000000000", + "0x66201bd227ae6dc6bdfed5fbde811fecfe5e9dd9": "594808000000000000000", + "0x2bafbf9e9ed2c219f7f2791374e7d05cb06777e7": "220000000000000000000", + "0x8e9b35ad4a0a86f758446fffde34269d940ceacd": "4000000000000000000000", + "0x1b43232ccd4880d6f46fa751a96cd82473315841": "80000000000000000000", + "0x6eefdc850e87b715c72791773c0316c3559b58a4": "4000000000000000000000", + "0xf2c03e2a38998c21648760f1e5ae7ea3077d8522": "2642456000000000000000", + "0x0625d06056968b002206ff91980140242bfaa499": "1000000000000000000000", + "0x6158e107c5eb54cb7604e0cd8dc1e07500d91c3c": "50000000000000000000", + "0x02477212ffdd75e5155651b76506b1646671a1eb": "1760000000000000000000", + "0xfa44a855e404c86d0ca8ef3324251dfb349c539e": "1552000000000000000000", + "0x49897fe932bbb3154c95d3bce6d93b6d732904dd": "4000000000000000000000", + "0x9b6641b13e172fc072ca4b8327a3bc28a15b66a9": "120000000000000000000", + "0xa46b4387fb4dcce011e76e4d73547d4481e09be5": "1337000000000000000000", + "0x72bb27cb99f3e2c2cf90a98f707d30e4a201a071": "1640000000000000000000", + "0xb6bfe1c3ef94e1846fb9e3acfe9b50c3e9069233": "1999944000000000000000", + "0xe6cb3f3124c9c9cc3834b1274bc3336456a38bac": "427382000000000000000", + "0xfcbc5c71ace79741450b012cf6b8d3f17db68a70": "9550000000000000000000", + "0x15dbb48c98309764f99ced3692dcca35ee306bac": "150000000000000000000000", + "0x2e10910ba6e0bc17e055556614cb87090f4d7e5b": "200000000000000000000", + "0xe5fbe34984b637196f331c679d0c0c47d83410e1": "2000050000000000000000", + "0x6d120f0caae44fd94bcafe55e2e279ef96ba5c7a": "4000000000000000000000", + "0xaa5afcfd8309c2df9d15be5e6a504e7d706624c5": "5846763000000000000000", + "0x37959c20b7e9931d72f5a8ae869dafddad3b6d5c": "200000000000000000000", + "0xb041310fe9eed6864cedd4bee58df88eb4ed3cac": "10000000000000000000000", + "0x986df47e76e4d7a789cdee913cc9831650936c9d": "5000000000000000000000", + "0x35aaa0465d1c260c420fa30e2629869fb6559207": "704976000000000000000", + "0x7f655c6789eddf455cb4b88099720639389eebac": "6000000000000000000000", + "0x9e3eb509278fe0dcd8e0bbe78a194e06b6803943": "940000000000000000000", + "0x3e9410d3b9a87ed5e451a6b91bb8923fe90fb2b5": "200000000000000000000", + "0x9e960dcd03d5ba99cb115d17ff4c09248ad4d0be": "200000000000000000000", + "0xf057aa66ca767ede124a1c5b9cc5fc94ef0b0137": "2077730000000000000000", + "0xf38a6ca80168537e974d14e1c3d13990a44c2c1b": "6000000000000000000000", + "0x229e430de2b74f442651ddcdb70176bc054cad54": "13545000000000000000", + "0x27bf9f44ba7d05c33540c3a53bb02cbbffe7c3c6": "2000000000000000000000", + "0x10389858b800e8c0ec32f51ed61a355946cc409b": "200000000000000000000", + "0xfd2929271e9d2095a264767e7b0df52ea0d1d400": "3000040000000000000000", + "0x44250d476e062484e9080a3967bf3a4a732ad73f": "20000000000000000000", + "0x0c67033dd8ee7f0c8ae534d42a51f7d9d4f7978f": "200000000000000000000", + "0xe083d34863e0e17f926b7928edff317e998e9c4b": "400000000000000000000", + "0x7f7192c0df1c7db6d9ed65d71184d8e4155a17ba": "79800000000000000000", + "0x51e7b55c2f9820eed73884361b5066a59b6f45c6": "2000000000000000000000", + "0x4fa983bb5e3073a8edb557effeb4f9fb1d60ef86": "1599800000000000000000", + "0x5a5ee8e9bb0e8ab2fecb4b33d29478be50bbd44b": "776000000000000000000", + "0x1f3959fc291110e88232c36b7667fc78a379613f": "18200000000000000000", + "0x2d7d5c40ddafc450b04a74a4dabc2bb5d665002e": "2000000000000000000000", + "0x5215183b8f80a9bc03d26ce91207832a0d39e620": "1000000000000000000000", + "0x5607590059a9fec1881149a44b36949aef85d560": "2000000000000000000000", + "0xf7c50f922ad16b61c6d1baa045ed816815bac48f": "12566370000000000000000", + "0xda10978a39a46ff0bb848cf65dd9c77509a6d70e": "2000000000000000000000", + "0xa7dcbba9b9bf6762c145416c506a71e3b497209c": "1999944000000000000000", + "0x54e01283cc8b384538dd646770b357c960d6cacd": "5000000000000000000000", + "0x78cf8336b328db3d87813a472b9e89b75e0cf3bc": "1000000000000000000000", + "0xba24fc436753a739db2c8d40e6d4d04c528e86fa": "13000000000000000000000", + "0xdfe929a61c1b38eddbe82c25c2d6753cb1e12d68": "402500000000000000000", + "0x2b49fba29830360fcdb6da23bbfea5c0bbac5281": "20000000000000000000", + "0x76becae4a31d36f3cb577f2a43594fb1abc1bb96": "24860000000000000000000", + "0xe0cf698a053327ebd16b7d7700092fe2e8542446": "95275000000000000000", + "0xa3802d8a659e89a2c47e905430b2a827978950a7": "1000000000000000000000", + "0x75636cdb109050e43d5d6ec47e359e218e857eca": "22886800000000000000000", + "0x3d813ff2b6ed57b937dabf2b381d148a411fa085": "100000000000000000000", + "0xa9252551a624ae513719dabe5207fbefb2fd7749": "40000000000000000000", + "0xc749668042e71123a648975e08ed6382f83e05e2": "14000000000000000000000", + "0x04eca501630abce35218b174956b891ba25efb23": "1000060000000000000000", + "0x790f91bd5d1c5cc4739ae91300db89e1c1303c93": "2000000000000000000000", + "0x009560a3de627868f91fa8bfe1c1b7afaf08186b": "524000000000000000000", + "0x1329dd19cd4baa9fc64310efeceab22117251f12": "200000000000000000000", + "0x7005a772282b1f62afda63f89b5dc6ab64c84cb9": "18000000000000000000000", + "0xabfe936425dcc7b74b955082bbaaf2a11d78bc05": "1400000000000000000000", + "0x97d0d9725e3b70e675843173938ed371b62c7fac": "170000000000000000000", + "0x41ed2d8e7081482c919fc23d8f0091b3c82c4685": "1295460000000000000000", + "0x992365d764c5ce354039ddfc912e023a75b8e168": "18200000000000000000", + "0xe1c607c0a8a060da8f02a8eb38a013ea8cda5b8c": "805000000000000000000", + "0x3b2c45990e21474451cf4f59f01955b331c7d7c9": "2000000000000000000000", + "0x29ac2b458454a36c7e96c73a8667222a12242c71": "4000000000000000000000", + "0xb8555010776e3c5cb311a5adeefe9e92bb9a64b9": "4000000000000000000000", + "0x30380087786965149e81423b15e313ba32c5c783": "18200000000000000000", + "0xa2f86bc061884e9eef05640edd51a2f7c0596c69": "2000050000000000000000", + "0x9f98eb34d46979b0a6de8b05aa533a89b825dcf1": "86500000000000000000", + "0xc81fb7d20fd2800192f0aac198d6d6a37d3fcb7d": "259500000000000000000", + "0xa4035ab1e5180821f0f380f1131b7387c8d981cd": "20000000000000000000", + "0x782f52f0a676c77716d574c81ec4684f9a020a97": "850055000000000000000", + "0x261e0fa64c51137465eecf5b90f197f7937fdb05": "18000000000000000000000", + "0x276fd7d24f8f883f5a7a28295bf17151c7a84b03": "2000000000000000000000", + "0xa1f5b840140d5a9acef402ac3cc3886a68cad248": "2000000000000000000000", + "0xd2bf67a7f3c6ce56b7be41675dbbadfe7ea93a33": "400000000000000000000", + "0x8ee584337ddbc80f9e3498df55f0a21eacb57fb1": "20000000000000000000", + "0x34393c5d91b9de597203e75bac4309b5fa3d28c3": "194000000000000000000", + "0x114cbbbf6fb52ac414be7ec61f7bb71495ce1dfa": "3000000000000000000000", + "0xab7c42c5e52d641a07ad75099c62928b7f86622f": "335940000000000000000", + "0x80bf995ed8ba92701d10fec49f9e7d014dbee026": "572153000000000000000", + "0x4a192035e2619b24b0709d56590e9183ccf2c1d9": "10000000000000000000000", + "0x376cd7577383e902951b60a2017ba7ea29e33576": "2000000000000000000000", + "0xf5437e158090b2a2d68f82b54a5864b95dd6dbea": "4010732000000000000000", + "0x13a5eecb38305df94971ef2d9e179ae6cebab337": "330000000000000000000", + "0xefc8cf1963c9a95267b228c086239889f4dfd467": "10000000000000000000000", + "0xdb77b88dcb712fd17ee91a5b94748d720c90a994": "2000000000000000000000", + "0x9aaafa0067647ed999066b7a4ca5b4b3f3feaa6f": "1000000000000000000000", + "0xae36f7452121913e800e0fcd1a65a5471c23846f": "164000000000000000000", + "0xb124bcb6ffa430fcae2e86b45f27e3f21e81ee08": "2000000000000000000000", + "0xf2813a64c5265d020235cb9c319b6c96f906c41e": "350000000000000000000", + "0xe848ca7ebff5c24f9b9c316797a43bf7c356292d": "114000000000000000000", + "0x21a6feb6ab11c766fdd977f8df4121155f47a1c0": "57200000000000000000", + "0xe95e92bbc6de07bf3a660ebf5feb1c8a3527e1c5": "18200000000000000000", + "0x0b369e002e1b4c7913fcf00f2d5e19c58165478f": "64520000000000000000", + "0x0909648c18a3ce5bae7a047ec2f868d24cdda81d": "3820000000000000000000", + "0xd32b45564614516c91b07fa9f72dcf787cce4e1c": "291000000000000000000", + "0xcf1bdb799b2ea63ce134668bdc198b54840f180b": "18200000000000000000", + "0xae062c448618643075de7a0030342dced63dbad7": "825982000000000000000", + "0x99dfd0504c06c743e46534fd7b55f1f9c7ec3329": "2000000000000000000000", + "0x87fc4635263944ce14a46c75fa4a821f39ce7f72": "20000000000000000000", + "0x27c2d7ca504daa3d9066dc09137dc42f3aaab452": "600000000000000000000", + "0xcc60f836acdef3548a1fefcca13ec6a937db44a0": "86500000000000000000", + "0xc910a970556c9716ea53af66ddef93143124913d": "1580000000000000000000", + "0x8173c835646a672e0152be10ffe84162dd256e4c": "492000000000000000000", + "0xe989733ca1d58d9e7b5029ba5d444858bec03172": "581595000000000000000", + "0x86806474c358047d9406e6a07f40945bc8328e67": "6884000000000000000000", + "0x5395a4455d95d178b4532aa4725b193ffe512961": "1000000000000000000000", + "0x56397638bb3cebf1f62062794b5eb942f916171d": "2000000000000000000000", + "0x6958f83bb2fdfb27ce0409cd03f9c5edbf4cbedd": "20000000000000000000000", + "0x26ff0a51e7cece8400276978dbd6236ef162c0e6": "100020000000000000000000", + "0x4ca783b556e5bf53aa13c8116613d65782c9b642": "25200000000000000000000", + "0x15a0aec37ff9ff3d5409f2a4f0c1212aaccb0296": "1000000000000000000000", + "0x50378af7ef54043f892ab7ce97d647793511b108": "19700000000000000000", + "0xe7c6b5fc05fc748e5b4381726449a1c0ad0fb0f1": "2000000000000000000000", + "0x5317ecb023052ca7f5652be2fa854cfe4563df4d": "499986000000000000000", + "0xc94f7c35c027d47df8ef4f9df85a9248a17dd23b": "29944000000000000000", + "0x6a63fc89abc7f36e282d80787b7b04afd6553e71": "160000000000000000000", + "0x5fd3d6777ec2620ae83a05528ed425072d3ca8fd": "2000000000000000000000", + "0x29adcf83b6b20ac6a434abb1993cbd05c60ea2e4": "10000000000000000000000", + "0x8c6f9f4e5b7ae276bf58497bd7bf2a7d25245f64": "2730000000000000000000", + "0xd94a57882a52739bbe2a0647c80c24f58a2b4f1c": "1341230000000000000000", + "0x7286e89cd9de8f7a8a00c86ffdb53992dd9251d1": "1940000000000000000000", + "0x5773b6026721a1dd04b7828cd62b591bfb34534c": "27000000000000000000000", + "0x11fefb5dc1a4598aa712640c517775dfa1d91f8c": "10000000000000000000000", + "0xc6e324beeb5b36765ecd464260f7f26006c5c62e": "2000000000000000000000", + "0x118fbd753b9792395aef7a4d78d263cdcaabd4f7": "999800000000000000000", + "0xf8298591523e50b103f0b701d623cbf0f74556f6": "200000000000000000000", + "0xab0ced762e1661fae1a92afb1408889413794825": "1910000000000000000000", + "0xfa67b67b4f37a0150915110ede073b05b853bda2": "647490000000000000000", + "0xca122cf0f2948896b74843f49afed0ba1618eed7": "560000000000000000000", + "0x186b95f8e5effddcc94f1a315bf0295d3b1ea588": "1999944000000000000000", + "0x2915624bcb679137b8dae9ab57d11b4905eaee4b": "20000000000000000000", + "0x0c6845bf41d5ee273c3ee6b5b0d69f6fd5eabbf7": "3000026000000000000000", + "0xcb7479109b43b26657f4465f4d18c6f974be5f42": "1820000000000000000000", + "0x8dd6a9bae57f518549ada677466fea8ab04fd9b4": "4000000000000000000000", + "0x34958a46d30e30b273ecc6e5d358a212e5307e8c": "2000000000000000000000", + "0x2003717907a72560f4307f1beecc5436f43d21e7": "500000000000000000000", + "0x55ab99b0e0e55d7bb874b7cfe834de631c97ec23": "1031400000000000000000", + "0x79b48d2d6137c3854d611c01ea42427a0f597bb7": "191000000000000000000", + "0xd609ec0be70d0ad26f6e67c9d4762b52ee51122c": "1000000000000000000000", + "0xe8c3f045bb7d38c9d2f395b0ba8492b253230901": "9000000000000000000000", + "0xaaca60d9d700e78596bbbbb1f1e2f70f4627f9d8": "999996000000000000000", + "0x89d75b8e0831e46f80bc174188184e006fde0eae": "1000000000000000000000", + "0xb3667894b7863c068ad344873fcff4b5671e0689": "20000000000000000000000", + "0xbc1609d685b76b48ec909aa099219022f89b2ccd": "1182000000000000000000", + "0x88ee7f0efc8f778c6b687ec32be9e7d6f020b674": "2000000000000000000000", + "0x470ac5d1f3efe28f3802af925b571e63868b397d": "2000000000000000000000", + "0xabf8ffe0708a99b528cc1ed4e9ce4b0d0630be8c": "2263600000000000000000", + "0x8cee38d6595788a56e3fb94634b3ffe1fbdb26d6": "20000000000000000000000", + "0x19798cbda715ea9a9b9d6aab942c55121e98bf91": "1200000000000000000000", + "0xe25a167b031e84616d0f013f31bda95dcc6350b9": "10560000000000000000000", + "0x6196c3d3c0908d254366b7bca55745222d9d4db1": "4000000000000000000000", + "0xe8e9850586e94f5299ab494bb821a5f40c00bd04": "3820000000000000000000", + "0x1059cbc63e36c43e88f30008aca7ce058eeaa096": "100000000000000000000000", + "0xc4f2913b265c430fa1ab8adf26c333fc1d9b66f2": "20000000000000000000", + "0x26e9e2ad729702626417ef25de0dc800f7a779b3": "1000000000000000000000", + "0x0dfbd4817050d91d9d625c02053cf61a3ee28572": "340000000000000000000", + "0x709fe9d2c1f1ce42207c9585044a60899f35942f": "2000000000000000000000", + "0x7ad82caea1a8b4ed05319b9c9870173c814e06ee": "616000000000000000000", + "0x2a595f16eee4cb0c17d9a2d939b3c10f6c677243": "1100000000000000000000", + "0xa8f89dd5cc6e64d7b1eeace00702022cd7d2f03d": "700000000000000000000", + "0xc0a6cbad77692a3d88d141ef769a99bb9e3c9951": "100000000000000000000", + "0x868c23be873466d4c74c220a19b245d1787e807f": "1366481000000000000000", + "0x2905b192e83ce659aa355b9d0c204e3e95f9bb9a": "2160817000000000000000", + "0x50b9fef0a1329b02d16506255f5a2db71ec92d1f": "1325464000000000000000", + "0xfc10b7a67b3268d5331bfb6a14def5ea4a162ca3": "200000000000000000000", + "0x85eb256b51c819d60ea61a82d12c9358d59c1cae": "460000000000000000000", + "0x75de7e9352e90b13a59a5878ffecc7831cac4d82": "2740000000000000000000", + "0xd32b2c79c36478c5431901f6d700b04dbe9b8810": "396000000000000000000", + "0x2d0326b23f0409c0c0e9236863a133075a94ba18": "210380000000000000000", + "0xd2e21ed56868fab28e0947927adaf29f23ebad6c": "1994000000000000000000", + "0x2ad6c9d10c261819a1a0ca2c48d8c7b2a71728df": "1000000000000000000000", + "0x7d445267c59ab8d2a2d9e709990e09682580c49f": "1000000000000000000000", + "0xb6047cdf932db3e4045f4976122341537ed5961e": "20000000000000000000", + "0x2b3cf97311ff30f460945a9d8099f4a88e26d456": "2000000000000000000000", + "0x7f4f593b618c330ba2c3d5f41eceeb92e27e426c": "2775000000000000000000", + "0x72a2fc8675feb972fa41b50dffdbbae7fa2adfb7": "2853840000000000000000", + "0x076561a856455d7ef86e63f87c73dbb628a55f45": "900000000000000000000", + "0x03d1724fd00e54aabcd2de2a91e8462b1049dd3a": "2640000000000000000000", + "0x7ea0f96ee0a573a330b56897761f3d4c0130a8e3": "1337000000000000000000", + "0xfe65c4188d7922576909642044fdc52395560165": "4000000000000000000000", + "0x57883010b4ac857fedac03eab2551723a8447ffb": "1000000000000000000000", + "0x0729a8a4a5ba23f579d0025b1ad0f8a0d35cdfd2": "9700000000000000000000", + "0xe75c1fb177089f3e58b1067935a6596ef1737fb5": "99910000000000000000", + "0xe0e978753d982f7f9d1d238a18bd4889aefe451b": "9700000000000000000000", + "0x5620f46d1451c2353d6243a5d4b427130be2d407": "60000000000000000000", + "0xf3d688f06bbdbf50f9932c4145cbe48ecdf68904": "20000000000000000000", + "0x3aa948ea02397755effb2f9dc9392df1058f7e33": "850000000000000000000", + "0x20d1417f99c569e3beb095856530fe12d0fceaaa": "1182175000000000000000", + "0xac77bdf00fd5985b5db12bbef800380abc2a0677": "1000000000000000000000", + "0x267a7e6e82e1b91d51deddb644f0e96dbb1f7f7e": "20000000000000000000", + "0x4bbcbf38b3c90163a84b1cd2a93b58b2a3348d87": "8000000000000000000000", + "0x4c6b93a3bec16349540cbfcae96c9621d6645010": "2000000000000000000000", + "0xc9308879056dfe138ef8208f79a915c6bc7e70a8": "10000000000000000000000", + "0xc48b693cacefdbd6cb5d7895a42e3196327e261c": "1000000000000000000000", + "0xa0951970dfd0832fb83bda12c23545e79041756c": "600000000000000000000", + "0x7cdf74213945953db39ad0e8a9781add792e4d1d": "2000000000000000000000", + "0x75621865b6591365606ed378308c2d1def4f222c": "3100000000000000000000", + "0x67d6a8aa1bf8d6eaf7384e993dfdf10f0af68a61": "198067000000000000000", + "0x8f0af37566d152802f1ae8f928b25af9b139b448": "200000000000000000000", + "0x2c6afcd4037c1ed14fa74ff6758e0945a185a8e8": "17600000000000000000", + "0xc1b2aa8cb2bf62cdc13a47ecc4657facaa995f98": "1000129000000000000000", + "0x9e8144e08e89647811fe6b72d445d6a5f80ad244": "10000000000000000000000", + "0xe04ff5e5a7e2af995d8857ce0290b53a2b0eda5d": "1000000000000000000000", + "0x03dedfcd0b3c2e17c705da248790ef98a6bd5751": "1337000000000000000000", + "0x698a8a6f01f9ab682f637c7969be885f6c5302bf": "19400000000000000000", + "0xd82c6fedbdac98af2eed10b00f32b00056ca5a6d": "200000000000000000000", + "0x2697b339813b0c2d964b2471eb1c606f4ecb9616": "1154000000000000000000", + "0x987c9bcd6e3f3990a52be3eda4710c27518f4f72": "400000000000000000000", + "0xc5d48ca2db2f85d8c555cb0e9cfe826936783f9e": "200000000000000000000", + "0xda214c023e2326ff696c00393168ce46ffac39ec": "1000000000000000000000", + "0x86570ab259c9b1c32c9729202f77f590c07dd612": "200000000000000000000", + "0xa646a95c6d6f59f104c6541d7760757ab392b08c": "4200000000000000000000", + "0x1933e334c40f3acbad0c0b851158206924beca3a": "7551541000000000000000", + "0x3552a496eba67f12be6eedab360cd13661dc7480": "300000000000000000000", + "0x2a9c96c19151ffcbe29a4616d0c52b3933b4659f": "69263000000000000000", + "0x3b7b8e27de33d3ce7961b98d19a52fe79f6c25be": "100000000000000000000000", + "0xa1911405cf6e999ed011f0ddcd2a4ff7c28f2526": "40000000000000000000", + "0x0cae108e6db99b9e637876b064c6303eda8a65c8": "3000000000000000000000", + "0x3883becc08b9be68ad3b0836aac3b620dc0017ef": "2000000000000000000000", + "0xd0abcc70c0420e0e172f97d43b87d5e80c336ea9": "10000000000000000000000", + "0xcbf16a0fe2745258cd52db2bf21954c975fc6a15": "300000000000000000000", + "0x1b23cb8663554871fbbe0d9e60397efb6faedc3e": "200000000000000000000", + "0xfbede32c349f3300ef4cd33b4de7dc18e443d326": "3160000000000000000000", + "0x5e806e845730f8073e6cc9018ee90f5c05f909a3": "9480000000000000000000", + "0x425c338a1325e3a1578efa299e57d986eb474f81": "2000000000000000000000", + "0x8bf297f8f453523ed66a1acb7676856337b93bf0": "4000000000000000000000", + "0x38e8a31af2d265e31a9fff2d8f46286d1245a467": "20000000000000000000", + "0x7edafba8984baf631a820b6b92bbc2c53655f6bd": "2000000000000000000000", + "0xaa0200f1d17e9c54da0647bb96395d57a78538d8": "1056000000000000000000", + "0x433eb94a339086ed12d9bde9cd1d458603c97dd6": "100000000000000000000000", + "0xcd7e47909464d871b9a6dc76a8e9195db3485e7a": "9850000000000000000000", + "0x5975d78d974ee5bb9e4d4ca2ae77c84b9c3b4b82": "1370000000000000000000", + "0xcea2896623f4910287a2bdc5be83aea3f2e6de08": "9359000000000000000000", + "0xcb4ad0c723da46ab56d526da0c1d25c73daff10a": "510000000000000000000", + "0xe2cf360aa2329eb79d2bf7ca04a27a17c532e4d8": "102000000000000000000", + "0xea60549ec7553f511d2149f2d4666cbd9243d93c": "2000000000000000000000", + "0xcbb7be17953f2ccc93e1bc99805bf45511434e4c": "50440000000000000000000", + "0x3549bd40bbbc2b30095cac8be2c07a0588e0aed6": "20000000000000000000", + "0x6510df42a599bcb0a519cca961b488759a6f6777": "2000000000000000000000", + "0xed12a1ba1fb8adfcb20dfa19582e525aa3b74524": "6685000000000000000000", + "0x135eb8c0e9e101deedec11f2ecdb66ae1aae8867": "20000000000000000000000", + "0xee906d7d5f1748258174be4cbc38930302ab7b42": "200000000000000000000", + "0x253f1e742a2cec86b0d7b306e5eacb6ccb2f8554": "20040000000000000000000", + "0xecd1a62802351a41568d23033004acc6c005a5d3": "50000000000000000000", + "0x558c54649a8a6e94722bd6d21d14714f71780534": "2000000000000000000000", + "0xca657ec06fe5bc09cf23e52af7f80cc3689e6ede": "900000000000000000000", + "0x74bf7a5ab59293149b5c60cf364263e5ebf1aa0d": "115800000000000000000", + "0x7a6d781c77c4ba1fcadf687341c1e31799e93d27": "274000000000000000000", + "0x77028e409cc43a3bd33d21a9fc53ec606e94910e": "3880000000000000000000", + "0x4781a10a4df5eebc82f4cfe107ba1d8a7640bd66": "1790000000000000000000", + "0x78e08bc533413c26e291b3143ffa7cc9afb97b78": "200000000000000000000", + "0x03ef6ad20ff7bd4f002bac58d47544cf879ae728": "6895000000000000000000", + "0x0e3696cf1f4217b163d1bc12a5ea730f1c32a14a": "4000000000000000000000", + "0x825135b1a7fc1605614c8aa4d0ac6dbad08f480e": "1430000000000000000000", + "0x286b186d61ea1fd78d9930fe12b06537b05c3d51": "1000000000000000000000", + "0x8d6657f59711b1f803c6ebef682f915b62f92dc9": "2000000000000000000000", + "0xda8bbee182e455d2098acb338a6d45b4b17ed8b6": "2000000000000000000000", + "0x3f2da093bb16eb064f8bfa9e30b929d15f8e1c4c": "2000000000000000000000", + "0xf5d9cf00d658dd45517a48a9d3f5f633541a533d": "116400000000000000000", + "0xc5f64babb7033142f20e46d7aa6201ed86f67103": "2000000000000000000000", + "0xa2e2b5941e0c01944bfe1d5fb4e8a34b922ccfb1": "200000000000000000000", + "0x6114b0eae5576903f80bfb98842d24ed92237f1e": "100000000000000000000", + "0x38df0c4abe7ded5fe068eadf154ac691774324a4": "1790000000000000000000", + "0x1c2010bd662df417f2a271879afb13ef4c88a3ae": "4000000000000000000000", + "0x918967918cd897dd0005e36dc6c883ef438fc8c7": "140000000000000000000", + "0xa522de7eb6ae1250522a513133a93bd42849475c": "20000000000000000000000", + "0x7de442c82386154d2e993cbd1280bb7ca6b12ada": "4002000000000000000000", + "0x66424bd8785b8cb461102a900283c35dfa07ef6a": "40221000000000000000", + "0x7bbbec5e70bdead8bb32b42805988e9648c0aa97": "1000076000000000000000", + "0xfec06fe27b44c784b2396ec92f7b923ad17e9077": "2000000000000000000000", + "0x95d550427b5a514c751d73a0f6d29fb65d22ed10": "300000000000000000000", + "0x8dde60eb08a099d7daa356daaab2470d7b025a6b": "197000000000000000000", + "0x81bccbff8f44347eb7fca95b27ce7c952492aaad": "152240000000000000000", + "0x3995e096b08a5a726800fcd17d9c64c64e088d2b": "200000000000000000000", + "0x4ee13c0d41200b46d19dee5c4bcec71d82bb8e38": "7893915000000000000000", + "0xc41461a3cfbd32c9865555a4813137c076312360": "999999000000000000000", + "0x3300fb149aded65bcba6c04e9cd6b7a03b893bb1": "18200000000000000000", + "0x29f9286c0e738d1721a691c6b95ab3d9a797ede8": "200000000000000000000000", + "0x34c8e5f1330fcb4b14ca75cb2580a4b93d204e36": "2000000000000000000000", + "0xec5df227bfa85d7ad76b426e1cee963bc7f519dd": "1000000000000000000000", + "0x797510e386f56393ced8f477378a444c484f7dad": "1000000000000000000000", + "0x0191eb547e7bf6976b9b1b577546761de65622e2": "1999980000000000000000", + "0x615a6f36777f40d6617eb5819896186983fd3731": "5910000000000000000000", + "0x17580b766f7453525ca4c6a88b01b50570ea088c": "100000000000000000000", + "0x945d96ea573e8df7262bbfa572229b4b16016b0f": "209300000000000000000", + "0x2de0964400c282bdd78a919c6bf77c6b5f796179": "200000000000000000000", + "0x304ec69a74545721d7316aef4dcfb41ac59ee2f0": "200000000000000000000", + "0xbe2b326e78ed10e550fee8efa8f8070396522f5a": "39400000000000000000000", + "0x1a0841b92a7f7075569dc4627e6b76cab05ade91": "1520000000000000000000", + "0x5fa61f152de6123516c751242979285f796ac791": "204000000000000000000", + "0x68c8791dc342c373769ea61fb7b510f251d32088": "1000000000000000000000", + "0x4167cd48e733418e8f99ffd134121c4a4ab278c4": "3640000000000000000000", + "0x598aaabae9ed833d7bc222e91fcaa0647b77580b": "1800000000000000000000", + "0x979f30158b574b999aab348107b9eed85b1ff8c1": "970000000000000000000", + "0x3ad06149b21c55ff867cc3fb9740d2bcc7101231": "197000000000000000000000", + "0x7133843a78d939c69d4486e10ebc7b602a349ff7": "329000000000000000000", + "0x8bdfda6c215720eda2136f91052321af4e936c1f": "1000008000000000000000", + "0x3e1c53300e4c168912163c7e99b95da268ad280a": "1003200000000000000000", + "0xe07ebbc7f4da416e42c8d4f842aba16233c12580": "2000000000000000000000", + "0xbac8922c4acc7d2cb6fd59a14eb45cf3e702214b": "800000000000000000000", + "0xbb6c284aac8a69b75cddb00f28e145583b56bece": "2000000000000000000000", + "0x0372ee5508bf8163ed284e5eef94ce4d7367e522": "100000000000000000000", + "0x17125b59ac51cee029e4bd78d7f5947d1ea49bb2": "22000000000000000000000", + "0xc88ca1e6e5f4d558d13780f488f10d4ad3130d34": "1550000000000000000000", + "0xa825fd5abb7926a67cf36ba246a24bd27be6f6ed": "17600000000000000000", + "0x04241b41ecbd0bfdf1295e9d4fa59ea09e6c6186": "1870000000000000000000", + "0x6de4d15219182faf3aa2c5d4d2595ff23091a727": "1580000000000000000000", + "0xb203d29e6c56b92699c4b92d1f6f84648dc4cfbc": "400000000000000000000", + "0x80b42de170dbd723f454e88f7716452d92985092": "300202000000000000000", + "0x0a5b79d8f23b6483dbe2bdaa62b1064cc76366ae": "1969803000000000000000", + "0x32034e8581d9484e8af42a28df190132ec29c466": "3460000000000000000000", + "0x7ee604c7a9dc2909ce321de6b9b24f5767577555": "5533575000000000000000", + "0xa387ce4e961a7847f560075c64e1596b5641d21c": "668500000000000000000", + "0xfcc9d4a4262e7a027ab7519110d802c495ceea39": "6370000000000000000000", + "0xff8a2ca5a81333f19998255f203256e1a819c0aa": "224000000000000000000", + "0xf9811fa19dadbf029f8bfe569adb18228c80481a": "200000000000000000000", + "0x0d1f2a57713ebc6e94de29846e8844d376665763": "5000000000000000000000", + "0xeab0bd148309186cf8cbd13b7232d8095acb833a": "10691800000000000000000", + "0x36928b55bc861509d51c8cf1d546bfec6e3e90af": "1970000000000000000000", + "0x30480164bcd84974ebc0d90c9b9afab626cd1c73": "800000000000000000000", + "0x36339f84a5c2b44ce53dfdb6d4f97df78212a7df": "321600000000000000000", + "0xcfeacaaed57285e0ac7268ce6a4e35ecfdb242d7": "1086400000000000000000", + "0x572dd8cd3fe399d1d0ec281231b7cefc20b9e4bb": "10400000000000000000000", + "0x5dded049a6e1f329dc4b971e722c9c1f2ade83f0": "1000000000000000000000", + "0x9756e176c9ef693ee1eec6b9f8b151d313beb099": "1200000000000000000000", + "0x01e6415d587b065490f1ed7f21d6e0f386ee6747": "2000000000000000000000", + "0xb4413576869c08f9512ad311fe925988a52d3414": "10000000000000000000000", + "0xda9f55460946d7bfb570ddec757ca5773b58429a": "507600000000000000000", + "0x7180b83ee5574317f21c8072b191d895d46153c3": "460000000000000000000", + "0x0aca9a5626913b08cfc9a66d40508dce52b60f87": "1910000000000000000000", + "0x5cd0e475b54421bdfc0c12ea8e082bd7a5af0a6a": "59000000000000000000", + "0x7edb02c61a227287611ad950696369cc4e647a68": "274000000000000000000", + "0xb2676841ee9f2d31c172e82303b0fe9bbf9f1e09": "200000000000000000000", + "0xa2222259dd9c3e3ded127084f808e92a1887302c": "162000000000000000000", + "0x4b3a7cc3a7d7b00ed5282221a60259f25bf6538a": "1000000000000000000000", + "0xe33ff987541dde5cdee0a8a96dcc3f33c3f24cc2": "200000000000000000000000", + "0x1e1a4828119be309bd88236e4d482b504dc55711": "2955000000000000000000", + "0x9b1811c3051f46e664ae4bc9c824d18592c4574a": "199955000000000000000", + "0x59fe00696dbd87b7976b29d1156c8842a2e17914": "2000000000000000000000", + "0x48010ef3b8e95e3f308f30a8cb7f4eb4bf60d965": "2000000000000000000000", + "0xc90300cb1d4077e6a6d7e169a460468cf4a492d7": "2000000000000000000000", + "0x6dedf62e743f4d2c2a4b87a787f5424a7aeb393c": "180000000000000000000", + "0xfb744b951d094b310262c8f986c860df9ab1de65": "52009000000000000000", + "0x193ac65183651800e23580f8f0ead3bb597eb8a4": "50020000000000000000", + "0xbf05ff5ecf0df2df887759fb8274d93238ac267d": "800000000000000000000", + "0x6c0e712f405c59725fe829e9774bf4df7f4dd965": "57413800000000000000000", + "0x2744ff67464121e35afc2922177164fa2fcb0267": "100000000000000000000", + "0xd09cb2e6082d693a13e8d2f68dd1dd8461f55840": "1000000000000000000000", + "0xbc171e53d17ac9b61241ae436deec7af452e7496": "5348000000000000000000", + "0x71fa22cc6d33206b7d701a163a0dab31ae4d31d6": "1610000000000000000000", + "0x4da8030769844bc34186b85cd4c7348849ff49e9": "10000000000000000000000", + "0xc8616b4ec09128cdff39d6e4b9ac86eec471d5f2": "19400000000000000000", + "0x407295ebd94b48269c2d569c9b9af9aa05e83e5e": "10000000000000000000000", + "0xd45d5daa138dd1d374c71b9019916811f4b20a4e": "576000000000000000000", + "0x42c6edc515d35557808d13cd44dcc4400b2504e4": "197876000000000000000", + "0x0bc95cb32dbb574c832fa8174a81356d38bc92ac": "2000000000000000000000", + "0x5a6071bcebfcba4ab57f4db96fc7a68bece2ba5b": "2000000000000000000000", + "0x54c93e03a9b2e8e4c3672835a9ee76f9615bc14e": "19400000000000000000", + "0x3c03bbc023e1e93fa3a3a6e428cf0cd8f95e1ec6": "1520000000000000000000", + "0xba1531fb9e791896bcf3a80558a359f6e7c144bd": "3940000000000000000000", + "0xaa56a65dc4abb72f11bae32b6fbb07444791d5c9": "748600000000000000000", + "0xe437acbe0f6227b0e36f36e4bcf7cf613335fb68": "200000000000000000000", + "0x39d4a931402c0c79c457186f24df8729cf957031": "4000000000000000000000", + "0xe22b20c77894463baf774cc256d5bddbbf7ddd09": "1000000000000000000000", + "0x70a4067d448cc25dc8e70e651cea7cf84e92109e": "176000000000000000000", + "0xaa3925dc220bb4ae2177b2883078b6dc346ca1b2": "8000000000000000000000", + "0xad57aa9d00d10c439b35efcc0becac2e3955c313": "200000000000000000000", + "0xe93d47a8ca885d540c4e526f25d5c6f2c108c4b8": "112640000000000000000000", + "0x232ce782506225fd9860a2edc14a7a3047736da2": "20000000000000000000", + "0x49a645e0667dfd7b32d075cc2467dd8c680907c4": "129560000000000000000", + "0xcf2e734042a355d05ffb2e3915b16811f45a695e": "2000000000000000000000", + "0x39b1c471ae94e12164452e811fbbe2b3cd7275ac": "2000000000000000000000", + "0xffad3dd74e2c1f796ac640de56dc99b4c792a402": "5000000000000000000000", + "0xa69d7cd17d4842fe03f62a90b2fbf8f6af7bb380": "100000000000000000000", + "0x2001bef77b66f51e1599b02fb110194a0099b78d": "2000000000000000000000", + "0x95e7616424cd0961a71727247437f0069272280e": "400000000000000000000", + "0xc04f4bd4049f044685b883b62959ae631d667e35": "5820000000000000000000", + "0xede0147ec032c3618310c1ff25690bf172193dac": "2000000000000000000000", + "0x66719c0682b2ac7f9e27abebec7edf8decf0ae0d": "20000000000000000000", + "0x45272b8f62e9f9fa8ce04420e1aea3eba9686eac": "4000000000000000000000", + "0xd1da0c8fb7c210e0f2ec618f85bdae7d3e734b1c": "1970000000000000000000", + "0xe9133e7d31845d5f2b66a2618792e869311acf66": "24050000000000000000000", + "0xebb62cf8e22c884b1b28c6fa88fbbc17938aa787": "798000000000000000000", + "0x6205c2d5647470848a3840f3887e9b015d34755c": "1800000000000000000000", + "0x76ca22bcb8799e5327c4aa2a7d0949a1fcce5f29": "1524180000000000000000", + "0x6b925dd5d8ed6132ab6d0860b82c44e1a51f1fee": "1480000000000000000000", + "0x797bb7f157d9feaa17f76da4f704b74dc1038341": "3340000000000000000000", + "0xae8954f8d6166de507cf61297d0fc7ca6b9e7128": "300000000000000000000", + "0x75c1ad23d23f24b384d0c3149177e86697610d21": "6426082000000000000000", + "0x805d846fb0bc02a7337226d685be9ee773b9198a": "19999800000000000000000", + "0xc3cb6b36af443f2c6e258b4a39553a818747811f": "1610000000000000000000", + "0xcea43f7075816b60bbfce68b993af0881270f6c4": "2000000000000000000000", + "0xe0388aeddd3fe2ad56f85748e80e710a34b7c92e": "500000000000000000000", + "0xe131f87efc5ef07e43f0f2f4a747b551d750d9e6": "19999000000000000000000", + "0xc2b2cbe65bc6c2ee7a3c75b2e47c189c062e8d8b": "20000000000000000000000", + "0xbd8765f41299c7f479923c4fd18f126d7229047d": "4000000000000000000000", + "0xc83ba6dd9549be1d3287a5a654d106c34c6b5da2": "7000000000000000000000", + "0xf870995fe1e522321d754337a45c0c9d7b38951c": "20000000000000000000", + "0x0d8ed7d0d15638330ed7e4eaccab8a458d75737e": "2000000000000000000000", + "0x36c510bf8d6e569bf2f37d47265dbcb502ff2bce": "30000000000000000000000", + "0x0eccf617844fd61fba62cb0e445b7ac68bcc1fbe": "387260000000000000000", + "0xae10e27a014f0d306baf266d4897c89aeee2e974": "20000000000000000000000", + "0x1827039f09570294088fddf047165c33e696a492": "9550000000000000000000", + "0x23378f42926d0184b793b0c827a6dd3e3d334fcd": "56000000000000000000", + "0x467124ae7f452f26b3d574f6088894fa5d1cfb3b": "2700000000000000000000", + "0xaae61e43cb0d0c96b30699f77e00d711d0a3979b": "1000000000000000000000", + "0x15c7edb8118ee27b342285eb5926b47a855bc7a5": "20000000000000000000", + "0x0d5d98565c647ca5f177a2adb9d3022fac287f21": "200000000000000000000", + "0x7222fec7711781d26eaa4e8485f7aa3fac442483": "456000000000000000000", + "0xdc44275b1715baea1b0345735a29ac42c9f51b4f": "1164000000000000000000", + "0x04d82af9e01a936d97f8f85940b970f9d4db9936": "200000000000000000000", + "0x45533390e340fe0de3b3cf5fb9fc8ea552e29e62": "1460000000000000000000", + "0x1284f0cee9d2ff2989b65574d06ffd9ab0f7b805": "400000000000000000000", + "0xed9ebccba42f9815e78233266dd6e835b6afc31b": "6000000000000000000000", + "0xe4324912d64ea3aef76b3c2ff9df82c7e13ae991": "2000000000000000000000", + "0x94c742fd7a8b7906b3bfe4f8904fc0be5c768033": "20000000000000000000000", + "0x62fb8bd1f0e66b90533e071e6cbe6111fef0bc63": "17600000000000000000000", + "0x2c83aeb02fcf067d65a47082fd977833ab1cec91": "150400000000000000000", + "0x06cbfa08cdd4fba737bac407be8224f4eef35828": "593459000000000000000", + "0x67ee406ea4a7ae6a3a381eb4edd2f09f174b4928": "1036000000000000000000", + "0x83c23d8a502124ee150f08d71dc6727410a0f901": "33999600000000000000000", + "0xf7c00cdb1f020310d5acab7b496aaa44b779085e": "1670000000000000000000", + "0xd096565b7c7407d06536580355fdd6d239144aa1": "250000000000000000000", + "0xf8d52dcc5f96cc28007b3ecbb409f7e22a646caa": "149200000000000000000", + "0x0c222c7c41c9b048efcce0a232434362e12d673b": "10007600000000000000000", + "0x503bdbd8bc421c32a443032deb2e3e4cd5ba8b4e": "2000000000000000000000", + "0x77da5e6c72fb36bce1d9798f7bcdf1d18f459c2e": "22380000000000000000", + "0xe62f98650712eb158753d82972b8e99ca3f61877": "2000000000000000000000", + "0x87a7c508ef71582dd9a54372f89cb01f252fb180": "200000000000000000000", + "0xf61283b4bd8504058ca360e993999b62cbc8cd67": "255000000000000000000", + "0x9ccddcb2cfc2b25b08729a0a98d9e6f0202ea2c1": "100000000000000000000", + "0xd460a4b908dd2b056759b488850b66a838fc77a8": "1970000000000000000000", + "0x5431b1d18751b98fc9e2888ac7759f1535a2db47": "2000000000000000000000", + "0xda2a14f9724015d79014ed8e5909681d596148f1": "48499000000000000000", + "0xc989434f825aaf9c552f685eba7c11db4a5fc73a": "501000000000000000000", + "0x2b701d16c0d3cc1e4cd85445e6ad02eea4ac012d": "600000000000000000000", + "0x78b978a9d7e91ee529ea4fc4b76feaf8762f698c": "32000000000000000000000", + "0xc89cf504b9f3f835181fd8424f5ccbc8e1bddf7d": "10000000000000000000000", + "0xe94941b6036019b4016a30c1037d5a6903babaad": "780000000000000000000", + "0x95d98d0c1069908f067a52acac2b8b534da37afd": "2054053000000000000000", + "0x8284923b62e68bbf7c2b9f3414d13ef6c812a904": "3880000000000000000000", + "0x3e5a39fdda70df1126ab0dc49a7378311a537a1f": "2400000000000000000000", + "0xa2ace4c993bb1e5383f8ac74e179066e814f0591": "100000000000000000000", + "0x0609d83a6ce1ffc9b690f3e9a81e983e8bdc4d9d": "70000000000000000000000", + "0xd119417c46732cf34d1a1afb79c3e7e2cd8eece4": "2000000000000000000000", + "0xfdb33944f2360615e5be239577c8a19ba52d9887": "601650000000000000000", + "0xdd95dbe30f1f1877c5dd7684aeef302ab6885192": "8372000000000000000000", + "0x413f4b02669ccff6806bc826fcb7deca3b0ea9bc": "20000000000000000000", + "0x5800cd8130839e94495d2d8415a8ea2c90e0c5cb": "200000000000000000000", + "0x65053191319e067a25e6361d47f37f6318f83419": "394000000000000000000", + "0x9bc573bcda23b8b26f9073d90c230e8e71e0270b": "999544000000000000000", + "0x97f7760657c1e202759086963eb4211c5f8139b9": "49770000000000000000000", + "0x126897a311a14ad43b78e0920100c4426bfd6bdd": "973581000000000000000", + "0xd5276f0cd5ffd5ffb63f98b5703d5594ede0838b": "400000000000000000000", + "0xe9c35c913ca1fceab461582fe1a5815164b4fd21": "8000000000000000000000", + "0xb43067fe70d9b55973ba58dc64dd7f311e554259": "200000000000000000000", + "0x6f8f0d15cc96fb7fe94f1065bc6940f8d12957b2": "1000000000000000000000", + "0xb1dba5250ba9625755246e067967f2ad2f0791de": "80000000000000000000000", + "0x72b7a03dda14ca9c661a1d469fd33736f673c8e8": "2000000000000000000000", + "0xe792349ce9f6f14f81d0674096befa1f9221cdea": "1685365000000000000000", + "0x1815279dff9952da3be8f77249dbe22243377be7": "4749800000000000000000", + "0x33481e856ebed48ea708a27426ef28e867f57cd1": "200000000000000000000", + "0x8eb8c71982a00fb84275293253f8044544b66b49": "400000000000000000000", + "0x65f5870f26bce089677dfc23b5001ee492483428": "5067230000000000000000", + "0x8e23facd12c765c36ab81a6dd34d8aa9e68918ae": "167310000000000000000", + "0x4912d902931676ff39fc34fe3c3cc8fb2182fa7a": "20000000000000000000", + "0xc09a66172aea370d9a63da04ff71ffbbfcff7f94": "2000000000000000000000", + "0xe969ea1595edc5c4a707cfde380929633251a2b0": "200000000000000000000", + "0x4f2b47e2775a1fa7178dad92985a5bbe493ba6d6": "200000000000000000000", + "0xcab9a97ada065c87816e6860a8f1426fe6b3d775": "1000000000000000000000", + "0xcdfd8217339725d7ebac11a63655f265eff1cc3d": "4999962000000000000000", + "0xab4004c0403f7eabb0ea586f212156c4203d67f1": "1999944000000000000000", + "0x1c7cb2fe6bf3e09cbcdc187af38fa8f5053a70b6": "9970823000000000000000", + "0xa951b244ff50cfae591d5e1a148df6a938ef2a1a": "1734000000000000000000", + "0xb158db43fa62d30e65f3d09bf781c7b67372ebaa": "1999000000000000000000", + "0x25e037f00a18270ba5ec3420229ddb0a2ce38fa2": "10000000000000000000000", + "0x2aaea1f1046f30f109faec1c63ef5c7594eb08da": "4000000000000000000000", + "0x73d7269ff06c9ffd33754ce588f74a966abbbbba": "6600000000000000000000", + "0x4c767b65fd91161f4fbdcc6a69e2f6ad711bb918": "720000000000000000000", + "0x92ae5b7c7eb492ff1ffa16dd42ad9cad40b7f8dc": "865000000000000000000", + "0xa04f2ae02add14c12faf65cb259022d0830a8e26": "100000000000000000000000", + "0x63ef2fbc3daf5edaf4a295629ccf31bcdf4038e5": "1460000000000000000000", + "0x749ad6f2b5706bbe2f689a44c4b640b58e96b992": "100000000000000000000", + "0x4d836d9d3b0e2cbd4de050596faa490cffb60d5d": "300000000000000000000", + "0x59f6247b0d582aaa25e5114765e4bf3c774f43c2": "50000000000000000000", + "0x1293c78c7d6a443b9d74b0ba5ee7bb47fd418588": "6685000000000000000000", + "0x67bc85e87dc34c4e80aafa066ba8d29dbb8e438e": "402500000000000000000", + "0xa09f4d5eaa65a2f4cb750a49923401dae59090af": "140000000000000000000", + "0xebbd4db9019952d68b1b0f6d8cf0683c00387bb5": "332330000000000000000", + "0xb16479ba8e7df8f63e1b95d149cd8529d735c2da": "846477000000000000000", + "0xe1b2aca154b8e0766c4eba30bc10c7f35036f368": "19980000000000000000", + "0x5c464197791c8a3da3c925436f277ab13bf2faa2": "8000000000000000000000", + "0x170a88a8997f92d238370f1affdee6347050b013": "3000800000000000000000", + "0xdadbfafd8b62b92a24efd75256dd83abdbd7bbdb": "19700000000000000000", + "0xbb993b96ee925ada7d99d786573d3f89180ce3aa": "2000000000000000000000", + "0xf2c362b0ef991bc82fb36e66ff75932ae8dd8225": "74000000000000000000", + "0x7f2382ffd8f83956467937f9ba72374623f11b38": "600000000000000000000", + "0x74d1a4d0c7524e018d4e06ed3b648092b5b6af2c": "50000000000000000000", + "0x24a750eae5874711116dd7d47b7186ce990d3103": "200000000000000000000", + "0xa8e42a4e33d7526cca19d9a36dcd6e8040d0ea73": "1080000000000000000000", + "0x3e1b2230afbbd310b4926a4c776d5ae7819c661d": "30000000000000000000000", + "0x6af9f0dfeeaebb5f64bf91ab771669bf05295553": "400000000000000000000", + "0x41e4a20275e39bdcefeb655c0322744b765140c2": "10000000000000000000000", + "0xceb089ec8a78337e8ef88de11b49e3dd910f748f": "1000000000000000000000", + "0xe6bcd30a8fa138c5d9e5f6c7d2da806992812dcd": "260000000000000000000000", + "0xe08c60313106e3f9334fe6f7e7624d211130c077": "40000000000000000000", + "0xf5cffbba624e7eb321bc83c60ca68199b4e36671": "2000000000000000000000", + "0xd7c2803ed7b0e0837351411a8e6637d168bc5b05": "29549015000000000000000", + "0x0f3665d48e9f1419cd984fc7fa92788710c8f2e4": "2000000000000000000000", + "0xb48921c9687d5510744584936e8886bdbf2df69b": "1000000000000000000000", + "0xa94bbb8214cf8da0c2f668a2ac73e86248528d4b": "960000000000000000000", + "0xbe0c2a80b9de084b172894a76cf4737a4f529e1a": "1999944000000000000000", + "0xfcf199f8b854222f182e4e1d099d4e323e2aae01": "1000000000000000000000", + "0xb52dfb45de5d74e3df208332bc571c809b8dcf32": "6000000000000000000000", + "0x704819d2e44d6ed1da25bfce84c49fcca25613e5": "400000000000000000000", + "0x6ff6cc90d649de4e96cffee1077a5b302a848dcb": "28600000000000000000", + "0x4d9c77d0750c5e6fbc247f2fd79274686cb353d6": "20000000000000000000", + "0x68e8022740f4af29eb48db32bcecddfd148d3de3": "1000000000000000000000", + "0x2cb615073a40dcdb99faa848572e987b3b056efb": "799600000000000000000", + "0x64adcceec53dd9d9dd15c8cc1a9e736de4241d2c": "56000000000000000000", + "0x2aec809df9325b9f483996e99f7331097f08aa0e": "4000000000000000000000", + "0x438c2f54ff8e629bab36b1442b760b12a88f02ae": "2000000000000000000000", + "0x9e35399071a4a101e9194daa3f09f04a0b5f9870": "4000000000000000000000", + "0xa5c336083b04f9471b8c6ed73679b74d66c363ec": "3014100000000000000000", + "0x7ad3f307616f19dcb143e6444dab9c3c33611f52": "50000000000000000000", + "0x455cb8ee39ffbc752331e5aefc588ef0ee593454": "999963000000000000000", + "0xc4c01afc3e0f045221da1284d7878574442fb9ac": "7419944000000000000000", + "0x99268327c373332e06c3f6164287d455b9d5fa4b": "2000000000000000000000", + "0x4367ae4b0ce964f4a54afd4b5c368496db169e9a": "2000000000000000000000", + "0x2cd79eb52027b12c18828e3eaab2969bfcd287e9": "20000000000000000000", + "0xb96841cabbc7dbd69ef0cf8f81dff3c8a5e21570": "12000000000000000000000", + "0xd7ebddb9f93987779b680155375438db65afcb6a": "100600000000000000000", + "0x0631d18bbbbd30d9e1732bf36edae2ce8901ab80": "3024800000000000000000", + "0x5fad960f6b2c84569c9f4d47bf1985fcb2c65da6": "999972000000000000000", + "0x01d599ee0d5f8c38ab2d392e2c65b74c3ce31820": "510000000000000000000", + "0xff0cc8dac824fa24fc3caa2169e6e057cf638ad6": "4000000000000000000000", + "0xc25266c7676632f13ef29be455ed948add567792": "1337000000000000000000", + "0x9c344098ba615a398f11d009905b177c44a7b602": "1000000000000000000000", + "0x3b0accaf4b607cfe61d17334c214b75cdefdbd89": "2000000000000000000000", + "0x6d6634b5b8a40195d949027af4828802092ceeb6": "3000000000000000000000", + "0x208c45732c0a378f17ac8324926d459ba8b658b4": "2955000000000000000000", + "0xc24399b4bf86f7338fbf645e3b22b0e0b7973912": "2000000000000000000000", + "0x29763dd6da9a7c161173888321eba6b63c8fb845": "328000000000000000000", + "0x9c2fd54089af665df5971d73b804616039647375": "1000000000000000000000", + "0x0e09646c99af438e99fa274cb2f9c856cb65f736": "1910000000000000000000", + "0xbe73274d8c5aa44a3cbefc8263c37ba121b20ad3": "500000000000000000000", + "0xecfd004d02f36cd4d8b4a8c1a9533b6af85cd716": "5003800000000000000000", + "0xf978b025b64233555cc3c19ada7f4199c9348bf7": "400000000000000000000000", + "0x705ddd38355482b8c7d3b515bda1500dd7d7a817": "400000000000000000000", + "0x2b8a0dee5cb0e1e97e15cfca6e19ad21f995efad": "504206000000000000000", + "0x1098cc20ef84bad5146639c4cd1ca6c3996cb99b": "18200000000000000000", + "0xafdac5c1cb56e245bf70330066a817eaafac4cd1": "20000000000000000000", + "0x910e996543344c6815fb97cda7af4b8698765a5b": "103400000000000000000", + "0x94612781033b57b146ee74e753c672017f5385e4": "3600000000000000000000", + "0xd03fc165576aaed525e5502c8e140f8b2e869639": "6850000000000000000000", + "0x293384c42b6f8f2905ce52b7205c2274376c612b": "1400000000000000000000", + "0x09ee12b1b42b05af9cf207d5fcac255b2ec411f2": "58929000000000000000", + "0xdbd71efa4b93c889e76593de609c3b04cbafbe08": "20000000000000000000", + "0xfa86ca27bf2854d98870837fb6f6dfe4bf6453fc": "322061000000000000000", + "0x61ff8e67b34d9ee6f78eb36ffea1b9f7c15787af": "1640000000000000000000", + "0x6d4cbf3d8284833ae99344303e08b4d614bfda3b": "12000000000000000000000", + "0x2ff160c44f72a299b5ec2d71e28ce5446d2fcbaf": "360000000000000000000", + "0x94a7cda8f481f9d89d42c303ae1632b3b709db1d": "300000000000000000000", + "0x7566496162ba584377be040a4f87777a707acaeb": "4000000000000000000000", + "0xbdc461462b6322b462bdb33f22799e8108e2417d": "668500000000000000000", + "0x7e47637e97c14622882be057bea229386f4052e5": "440000000000000000000", + "0x3b5c251d7fd7893ba209fe541cecd0ce253a990d": "30000000000000000000000", + "0x0e498800447177b8c8afc3fdfa7f69f4051bb629": "2140234000000000000000", + "0xb71623f35107cf7431a83fb3d204b29ee0b1a7f4": "19700000000000000000", + "0x1d395b30adda1cf21f091a4f4a7b753371189441": "100000000000000000000000", + "0x2c2428e4a66974edc822d5dbfb241b2728075158": "2000000000000000000000", + "0xa575f2891dcfcda83c5cf01474af11ee01b72dc2": "100076000000000000000", + "0xad728121873f0456d0518b80ab6580a203706595": "500000000000000000000", + "0x48669eb5a801d8b75fb6aa58c3451b7058c243bf": "30940000000000000000000", + "0xb3ae54fba09d3ee1d6bdd1e957923919024c35fa": "65513000000000000000", + "0x0d35408f226566116fb8acdaa9e2c9d59b76683f": "940000000000000000000", + "0xdf211cd21288d6c56fae66c3ff54625dd4b15427": "2500024000000000000000", + "0x8a746c5d67064711bfca685b95a4fe291a27028e": "40000000000000000000", + "0x1cf105ab23023b554c583e86d7921179ee83169f": "1970000000000000000000", + "0x8cfedef198db0a9143f09129b3fd64dcbb9b4956": "2000000000000000000000", + "0x1e381adcf801a3bf9fd7bfac9ccc2b8482ad5e66": "600200000000000000000", + "0xe74608f506866ada6bfbfdf20fea440be76989ef": "1999944000000000000000", + "0x27e63989ca1e903bc620cf1b9c3f67b9e2ae6581": "1337000000000000000000", + "0xbb0857f1c911b24b86c8a70681473fe6aaa1cce2": "100000000000000000000", + "0x4f8e8d274fb22a3fd36a47fe72980471544b3434": "200000000000000000000", + "0x127d3fc5003bf63c0d83e93957836515fd279045": "111890000000000000000", + "0x95809e8da3fbe4b7f281f0b8b1715f420f7d7d63": "2000000000000000000000", + "0x28904bb7c4302943b709b14d7970e42b8324e1a1": "10027500000000000000000", + "0xc07e3867ada096807a051a6c9c34cc3b3f4ad34a": "1788210000000000000000", + "0xf0b469eae89d400ce7d5d66a9695037036b88903": "20000000000000000000000", + "0x7445202f0c74297a004eb3726aa6a82dd7c02fa1": "2000000000000000000000", + "0xc58f62fee9711e6a05dc0910b618420aa127f288": "3980000000000000000000", + "0x801d65c518b11d0e3f4f470221417013c8e53ec5": "4000000000000000000000", + "0x41010fc8baf8437d17a04369809a168a17ca56fb": "100000000000000000000", + "0xa1998144968a5c70a6415554cefec2824690c4a5": "20000000000000000000", + "0xe9559185f166fc9513cc71116144ce2deb0f1d4b": "20000000000000000000000", + "0xed5b4c41e762d942404373caf21ed4615d25e6c1": "2013960000000000000000", + "0x665b000f0b772750cc3c217a5ef429a92bf1ccbb": "4000000000000000000000", + "0xfebd9f81cf78bd5fb6c4b9a24bd414bb9bfa4c4e": "1990019000000000000000", + "0xa072691c8dd7cd4237ff72a75c1a9506d0ce5b9e": "370000000000000000000", + "0x6765df25280e8e4f38d4b1cf446fc5d7eb659e34": "100000000000000000000", + "0x524fb210522c5e23bb67dfbf8c26aa616da49955": "999971000000000000000", + "0xe987e6139e6146a717fef96bc24934a5447fe05d": "2000000000000000000000", + "0xd6110276cfe31e42825a577f6b435dbcc10cf764": "1000000000000000000000", + "0x5e51b8a3bb09d303ea7c86051582fd600fb3dc1a": "20000000000000000000", + "0x5c4f24e994ed8f850ea7818f471c8fac3bcf0452": "1724800000000000000000", + "0x85b2998d0c73302cb2ba13f489313301e053be15": "10000000000000000000000", + "0x0af6c8d539c96d50259e1ba6719e9c8060f388c2": "1000000000000000000000", + "0x7d901b28bf7f88ef73d8f73cca97564913ea8a24": "955000000000000000000", + "0xe01859f242f1a0ec602fa8a3b0b57640ec89075e": "555000000000000000000", + "0xc66ae4cee87fb3353219f77f1d6486c580280332": "29550000000000000000", + "0x2d40558b06f90a3923145592123b6774e46e31f4": "1000000000000000000000", + "0xccf43975b76bfe735fec3cb7d4dd24f805ba0962": "60000000000000000000", + "0x1703b4b292b8a9deddede81bb25d89179f6446b6": "19690000000000000000000", + "0x0e9096d343c060db581a120112b278607ec6e52b": "20000000000000000000", + "0xf65819ac4cc14c137f05dd7977c7dae08d1a4ab5": "102000000000000000000", + "0xca373fe3c906b8c6559ee49ccd07f37cd4fb5266": "1790000000000000000000", + "0xd28298524df5ec4b24b0ffb9df85170a145a9eb5": "287700000000000000000", + "0x5fcda847aaf8d7fa8bca08029ca2849166aa15a3": "623350000000000000000", + "0xbdc739a699700b2e8e2c4a4c7b058a0e513ddebe": "2000000000000000000000", + "0x0bb05f7224bb5804856556c07eeadbed87ba8f7c": "401100000000000000000", + "0xab416fe30d58afe5d9454c7fce7f830bcc750356": "114515000000000000000", + "0x3eee6f1e96360b7689b3069adaf9af8eb60ce481": "1000000000000000000000", + "0x9a0d3cee3d9892ea3b3700a27ff84140d9025493": "60000000000000000000", + "0x5dc36de5359450a1ec09cb0c44cf2bb42b3ae435": "1117500000000000000000", + "0x35c8adc11125432b3b77acd64625fe58ebee9d66": "2000000000000000000000", + "0xa5e9cd4b74255d22b7d9b27ae8dd43ed6ed0252b": "766527000000000000000", + "0x31ea12d49a35a740780ddeeaece84c0835b26270": "200000000000000000000", + "0x7aef7b551f0b9c46e755c0f38e5b3a73fe1199f5": "1490000000000000000000", + "0xcc6d7b12061bc96d104d606d65ffa32b0036eb07": "10000000000000000000000", + "0x322021022678a0166d204b3aaa7ad4ec4b88b7d0": "400000000000000000000", + "0xb31196714a48dff726ea9433cd2912f1a414b3b3": "2680000000000000000000", + "0x0f2fb884c8aaff6f543ac6228bd08e4f60b0a5fd": "3145000000000000000000", + "0x7d9d221a3df89ddd7b5f61c1468c6787d6b333e6": "138000000000000000000", + "0x367f59cc82795329384e41e1283115e791f26a01": "2000000000000000000000", + "0xfd9579f119bbc819a02b61e38d8803c942f24d32": "105600000000000000000", + "0x3e2f26235e137a7324e4dc154b5df5af46ea1a49": "22458000000000000000", + "0x4c1579af3312e4f88ae93c68e9449c2e9a68d9c4": "2000000000000000000000", + "0xffb04726dfa41afdc819168418610472970d7bfc": "4000000000000000000000", + "0x403c64896a75cad816a9105e18d8aa5bf80f238e": "985000000000000000000", + "0x5cd588a14ec648ccf64729f9167aa7bf8be6eb3d": "1000000000000000000000", + "0x24b2be118b16d8b2174769d17b4cf84f07ca946d": "2000000000000000000000", + "0xd3bb59fa31258be62f8ed232f1a7d47b4a0b41ee": "100000000000000000000", + "0xcc9ac715cd6f2610c52b58676456884297018b29": "13370000000000000000", + "0x6f2a31900e240395b19f159c1d00dfe4d898ebdf": "1999600000000000000000", + "0xd60b247321a32a5affb96b1e279927cc584de943": "2265500000000000000000", + "0xf7a1ade2d0f529123d1055f19b17919f56214e67": "500000000000000000000", + "0xbea00df17067a43a82bc1daecafb6c14300e89e6": "1820000000000000000000", + "0xa2968fc1c64bac0b7ae0d68ba949874d6db253f4": "20000000000000000000000", + "0x92d8ad9a4d61683b80d4a6672e84c20d62421e80": "20000000000000000000", + "0x6ed2a12b02f8c688c7b5d3a6ea14d63687dab3b6": "2000000000000000000000", + "0x7a63869fc767a4c6b1cd0e0649f3634cb121d24b": "77500000000000000000", + "0x84f522f0520eba52dd18ad21fa4b829f2b89cb97": "4949566000000000000000", + "0xd6234aaf45c6f22e66a225ffb93add629b4ef80f": "1000000000000000000000", + "0xe3d8bf4efe84b1616d1b89e427ddc6c8830685ae": "2000000000000000000000", + "0xa3db364a332d884ba93b2617ae4d85a1489bea47": "1700000000000000000000", + "0x9f7986924aeb02687cd64189189fb167ded2dd5c": "985000000000000000000", + "0x2eaf4e2a46b789ccc288c8d1d9294e3fb0853896": "2000000000000000000000", + "0xa02dc6aa328b880de99eac546823fccf774047fb": "1970000000000000000000", + "0x873b7f786d3c99ff012c4a7cae2677270240b9c5": "1730000000000000000000", + "0x1d69c83d28ff0474ceebeacb3ad227a144ece7a3": "5474937000000000000000", + "0x7b827cae7ff4740918f2e030ab26cb98c4f46cf5": "7460000000000000000000", + "0x3083ef0ed4c4401196774a95cf4edc83edc1484f": "170000000000000000000000", + "0x40ad74bc0bce2a45e52f36c3debb1b3ada1b7619": "6790000000000000000000", + "0x05423a54c8d0f9707e704173d923b946edc8e700": "127543000000000000000", + "0x22eb7db0ba56b0f8b816ccb206e615d929185b0d": "80500000000000000000", + "0x66082c75a8de31a53913bbd44de3a0374f7faa41": "1460000000000000000000", + "0xe3d3eaa299887865569e88be219be507189be1c9": "456156000000000000000", + "0xae57cc129a96a89981dac60d2ffb877d5dc5e432": "1110994000000000000000", + "0x1a2434cc774422d48d53d59c5d562cce8407c94b": "30000000000000000000", + "0x21546914dfd3af2add41b0ff3e83ffda7414e1e0": "5969100000000000000000", + "0x4dcf62a3de3f061db91498fd61060f1f6398ff73": "1999944000000000000000", + "0x6fd98e563d12ce0fd60f4f1f850ae396a9823c02": "1261000000000000000000", + "0xedf8a3e1d40f13b79ec8e3e1ecf262fd92116263": "158000000000000000000", + "0xc09e3cfc19f605ff3ec9c9c70e2540d7ee974366": "500000000000000000000", + "0x953572f0ea6df9b197cae40e4b8ecc056c4371c5": "1000000000000000000000", + "0x163cc8be227646cb09719159f28ed09c5dc0dce0": "1337000000000000000000", + "0xa3932a31d6ff75fb3b1271ace7caa7d5e1ff1051": "20000000000000000000000", + "0xf9a94bd56198da245ed01d1e6430b24b2708dcc0": "749938000000000000000", + "0x3eb8b33b21d23cda86d8288884ab470e164691b5": "500000000000000000000", + "0x84bcbf22c09607ac84341d2edbc03bfb1739d744": "500000000000000000000", + "0x961c59adc74505d1864d1ecfcb8afa0412593c93": "40000000000000000000000", + "0xf068dfe95d15cd3a7f98ffa688b4346842be2690": "1255160000000000000000", + "0x291efe0081dce8c14799f7b2a43619c0c3b3fc1f": "1200000000000000000000", + "0xbe4fd073617022b67f5c13499b827f763639e4e3": "2000000000000000000000", + "0xe40a7c82e157540a0b00901dbb86c716e1a062da": "49800000000000000000", + "0x6635b46f711d2da6f0e16370cd8ee43efb2c2d52": "2000000000000000000000", + "0x43748928e8c3ec4436a1d092fbe43ac749be1251": "400000000000000000000", + "0xb557ab9439ef50d237b553f02508364a466a5c03": "200000000000000000000", + "0x11928378d27d55c520ceedf24ceb1e822d890df0": "8000000000000000000000", + "0x61518464fdd8b73c1bb6ac6db600654938dbf17a": "200000000000000000000", + "0x004bfbe1546bc6c65b5c7eaa55304b38bbfec6d3": "2000000000000000000000", + "0xa5e0fc3c3affed3db6710947d1d6fb017f3e276d": "2000000000000000000000", + "0x8ecbcfacbfafe9f00c3922a24e2cf0026756ca20": "5640000000000000000000", + "0xfb5ffaa0f7615726357891475818939d2037cf96": "20000000000000000000", + "0xae222865799079aaf4f0674a0cdaab02a6d570ff": "2000000000000000000000", + "0x9edc90f4be210865214ab5b35e5a8dd77415279d": "4000000000000000000000", + "0x9d7831e834c20b1baa697af1d8e0c621c5afff9a": "86500000000000000000", + "0x046d274b1af615fb505a764ad8dda770b1db2f3d": "2000000000000000000000", + "0xeaea23aa057200e7c9c15e8ff190d0e66c0c0e83": "2000000000000000000000", + "0x417a3cd19496530a6d4204c3b5a17ce0f207b1a5": "8000000000000000000000", + "0xa035a3652478f82dbd6d115faa8ca946ec9e681d": "109880000000000000000", + "0x4f5801b1eb30b712d8a0575a9a71ff965d4f34eb": "300000000000000000000", + "0x91dbb6aaad149585be47375c5d6de5ff09191518": "20000000000000000000000", + "0xd043a011ec4270ee7ec8b968737515e503f83028": "500000000000000000000", + "0xbb371c72c9f0316cea2bd9c6fbb4079e775429ef": "1760000000000000000000", + "0xaa1df92e51dff70b1973e0e924c66287b494a178": "534400000000000000000", + "0xbd5f46caab2c3d4b289396bbb07f203c4da82530": "80000000000000000000", + "0x4d29fc523a2c1629532121da9998e9b5ab9d1b45": "15800000000000000000", + "0xaddb26317227f45c87a2cb90dc4cfd02fb23caf8": "1000000000000000000000", + "0x52e46783329a769301b175009d346768f4c87ee4": "2000000000000000000000", + "0xcaad9dc20d589ce428d8fda3a9d53a607b7988b5": "4000000000000000000000", + "0x95034e1621865137cd4739b346dc17da3a27c34e": "1580000000000000000000", + "0x0c3239e2e841242db989a61518c22247e8c55208": "263656000000000000000", + "0x5a0d609aae2332b137ab3b2f26615a808f37e433": "160000000000000000000000", + "0x2334c590c7a48769103045c5b6534c8a3469f44a": "17443200000000000000000", + "0xddfcca13f934f0cfbe231da13039d70475e6a1d0": "1000169000000000000000", + "0xee7288d91086d9e2eb910014d9ab90a02d78c2a0": "2000000000000000000000", + "0xfb91fb1a695553f0c68e21276decf0b83909b86d": "100016000000000000000", + "0x38695fc7e1367ceb163ebb053751f9f68ddb07a0": "2000000000000000000000", + "0x65093b239bbfba23c7775ca7da5a8648a9f54cf7": "400000000000000000000", + "0x73d8fee3cb864dce22bb26ca9c2f086d5e95e63b": "1000000000000000000000", + "0xf7155213449892744bc60f2e04400788bd041fdd": "66850000000000000000", + "0xd1a71b2d0858e83270085d95a3b1549650035e23": "14900000000000000000000", + "0xeac17b81ed5191fb0802aa54337313834107aaa4": "8000000000000000000000", + "0xbb076aac92208069ea318a31ff8eeb14b7e996e3": "149000000000000000000", + "0x9f46e7c1e9078cae86305ac7060b01467d6685ee": "668500000000000000000", + "0x1598127982f2f8ad3b6b8fc3cf27bf617801ba2b": "173000000000000000000", + "0xe91dac0195b19e37b59b53f7c017c0b2395ba44c": "1880000000000000000000", + "0xa436c75453ccca4a1f1b62e5c4a30d86dde4be68": "2000000000000000000000", + "0x11001b89ed873e3aaec1155634b4681643986323": "1000000000000000000000", + "0xab93b26ece0a0aa21365afed1fa9aea31cd54468": "1608000000000000000000", + "0xe77febabdf080f0f5dca1d3f5766f2a79c0ffa7c": "1386000000000000000000", + "0x1c4af0e863d2656c8635bc6ffec8dd9928908cb5": "2000000000000000000000", + "0x0c48ae62d1539788eba013d75ea60b64eeba4e80": "2213311000000000000000", + "0x423cc4594cf4abb6368de59fd2b1230734612143": "2000000000000000000000", + "0x7f6b28c88421e4857e459281d78461692489d3fb": "2000000000000000000000", + "0x806854588ecce541495f81c28a290373df0274b2": "582000000000000000000", + "0xdc76e85ba50b9b31ec1e2620bce6e7c8058c0eaf": "20000000000000000000", + "0xb00996b0566ecb3e7243b8227988dcb352c21899": "12000000000000000000000", + "0xf5d14552b1dce0d6dc1f320da6ffc8a331cd6f0c": "1337000000000000000000", + "0x55a61b109480b5b2c4fcfdef92d90584160c0d35": "44700000000000000000", + "0xb8947822d5ace7a6ad8326e95496221e0be6b73d": "20000000000000000000", + "0x492de46aaf8f1d708d59d79af1d03ad2cb60902f": "2000000000000000000000", + "0x0e0d6633db1e0c7f234a6df163a10e0ab39c200f": "200000000000000000000", + "0xf8bf9c04874e5a77f38f4c38527e80c676f7b887": "2000000000000000000000", + "0x15528350e0d9670a2ea27f7b4a33b9c0f9621d21": "4000086000000000000000", + "0xeccf7a0457b566b346ca673a180f444130216ac3": "100000000000000000000", + "0x10cf560964ff83c1c9674c783c0f73fcd89943fc": "40000000000000000000000", + "0xe7f06f699be31c440b43b4db0501ec0e25261644": "500000000000000000000", + "0xb6ce4dc560fc73dc69fb7a62e388db7e72ea764f": "966000000000000000000", + "0xf456055a11ab91ff668e2ec922961f2a23e3db25": "18200000000000000000", + "0x8dfbafbc0e5b5c86cd1ad697feea04f43188de96": "390060000000000000000", + "0x085b4ab75d8362d914435cedee1daa2b1ee1a23b": "3880000000000000000000", + "0xe400d651bb3f2d23d5f849e6f92d9c5795c43a8a": "2674000000000000000000", + "0x851aa91c82f42fad5dd8e8bb5ea69c8f3a5977d1": "148607000000000000000", + "0x4c935bb250778b3c4c7f7e07fc251fa630314aab": "1500000000000000000000", + "0xebd356156a383123343d48843bffed6103e866b3": "1970000000000000000000", + "0xda0b48e489d302b4b7bf204f957c1c9be383b0df": "2000000000000000000000", + "0x7085ae7e7e4d932197b5c7858c00a3674626b7a5": "6000000000000000000000", + "0x5b06d1e6930c1054692b79e3dbe6ecce53966420": "205400000000000000000", + "0x8df53d96191471e059de51c718b983e4a51d2afd": "32000000000000000000000", + "0x0678654ac6761db904a2f7e8595ec1eaac734308": "878000000000000000000", + "0x89fee30d1728d96cecc1dab3da2e771afbcfaa41": "1999944000000000000000", + "0x59c5d06b170ee4d26eb0a0eb46cb7d90c1c91019": "10000000000000000000000", + "0x2b129c26b75dde127f8320bd0f63410c92a9f876": "2200000000000000000000", + "0x3d6ae053fcbc318d6fd0fbc353b8bf542e680d27": "14300000000000000000", + "0x755a60bf522fbd8fff9723446b7e343a7068567e": "20000000000000000000000", + "0x947e11e5ea290d6fc3b38048979e0cd44ec7c17f": "2000000000000000000000", + "0x711ecf77d71b3d0ea95ce4758afecdb9c131079d": "760000000000000000000", + "0xde9eff4c798811d968dccb460d9b069cf30278e0": "400000000000000000000", + "0x4e892e8081bf36e488fddb3b2630f3f1e8da30d2": "12003800000000000000000", + "0x8ede7e3dc50749c6c50e2e28168478c34db81946": "19999800000000000000000", + "0x0c30cacc3f72269f8b4f04cf073d2b05a83d9ad1": "2001000000000000000000", + "0xe51eb87e7fb7311f5228c479b48ec9878831ac4c": "2000000000000000000000", + "0x8b01da34d470c1d115acf4d8113c4dd8a8c338e4": "25220000000000000000000", + "0x4329fc0931cbeb033880fe4c9398ca45b0e2d11a": "2000400000000000000000", + "0x540c072802014ef0d561345aec481e8e11cb3570": "8000000000000000000000", + "0x21e5d2bae995ccfd08a5c16bb524e1f630448f82": "2800000000000000000000", + "0x5cf8c03eb3e872e50f7cfd0c2f8d3b3f2cb5183a": "200000000000000000000", + "0x5c0f2e51378f6b0d7bab617331580b6e39ad3ca5": "9600000000000000000000", + "0xd2f241255dd7c3f73c07043071ec08ddd9c5cde5": "500000000000000000000", + "0xcbe1b948864d8474e765145858fca4550f784b92": "10000000000000000000000", + "0x30742ccdf4abbcd005681f8159345c9e79054b1a": "668500000000000000000", + "0x6aeb9f74742ea491813dbbf0d6fcde1a131d4db3": "440800000000000000000", + "0x821eb90994a2fbf94bdc3233910296f76f9bf6e7": "10000000000000000000000", + "0x25c1a37ee5f08265a1e10d3d90d5472955f97806": "1820000000000000000000", + "0x7ef98b52bee953bef992f305fda027f8911c5851": "514717000000000000000", + "0x8adc53ef8c18ed3051785d88e996f3e4b20ecd51": "42000000000000000000000", + "0x007f4a23ca00cd043d25c2888c1aa5688f81a344": "773658000000000000000", + "0x4a735d224792376d331367c093d31c8794341582": "1900000000000000000000", + "0x05440c5b073b529b4829209dff88090e07c4f6f5": "1288000000000000000000", + "0x5e772e27f28800c50dda973bb33e10762e6eea20": "1790000000000000000000", + "0xa429fa88731fdd350e8ecd6ea54296b6484fe695": "1969606000000000000000", + "0xe0d76b7166b1f3a12b4091ee2b29de8caa7d07db": "2000000000000000000000", + "0x7ebd95e9c470f7283583dc6e9d2c4dce0bea8f84": "14000000000000000000000", + "0x883a78aeabaa50d8ddd8570bcd34265f14b19363": "3879951000000000000000", + "0x51f9c432a4e59ac86282d6adab4c2eb8919160eb": "530000000000000000000000", + "0xb86607021b62d340cf2652f3f95fd2dc67698bdf": "5000000000000000000000", + "0xacc0909fda2ea6b7b7a88db7a0aac868091ddbf6": "22155000000000000000", + "0x69b80ed90f84834afa3ff82eb964703b560977d6": "26740000000000000000", + "0xca4ca9e4779d530ecbacd47e6a8058cfde65d98f": "800000000000000000000", + "0x5d6c5c720d66a6abca8397142e63d26818eaab54": "40000000000000000000", + "0xc2c13e72d268e7150dc799e7c6cf03c88954ced7": "700000000000000000000", + "0x6bbd1e719390e6b91043f8b6b9df898ea8001b34": "2000053000000000000000", + "0xa9ba6f413b82fcddf3affbbdd09287dcf50415ca": "4000000000000000000000", + "0xced3c7be8de7585140952aeb501dc1f876ecafb0": "4000000000000000000000", + "0x1c63fa9e2cbbf23c49fcdef1cbabfe6e0d1e14c1": "1000000000000000000000", + "0x7d6e990daa7105de2526339833f77b5c0b85d84f": "20000000000000000000000", + "0x68addf019d6b9cab70acb13f0b3117999f062e12": "49941000000000000000", + "0xa77428bcb2a0db76fc8ef1e20e461a0a32c5ac15": "401100000000000000000", + "0x26048fe84d9b010a62e731627e49bc2eb73f408f": "4000000000000000000000", + "0xff26138330274df4e0a3081e6df7dd983ec6e78f": "2000000000000000000000", + "0xb7382d37db0398ac72410cf9813de9f8e1ec8dad": "1000070000000000000000", + "0x44f62f2aaabc29ad3a6b04e1ff6f9ce452d1c140": "17000000000000000000000", + "0x47fef58584465248a0810d60463ee93e5a6ee8d3": "283100000000000000000", + "0xbd2b70fecc37640f69514fc7f3404946aad86b11": "1200000000000000000000", + "0x649a85b93653075fa6562c409a565d087ba3e1ba": "2000000000000000000000", + "0x55866486ec168f79dbe0e1abb18864d98991ae2c": "16100000000000000000", + "0xd7e74afdbad55e96cebc5a374f2c8b768680f2b0": "99000000000000000000", + "0xa8c1d6aa41fe3d65f67bd01de2a866ed1ed9ae52": "30000000000000000000", + "0x744c0c77ba7f236920d1e434de5da33e48ebf02c": "1970000000000000000000", + "0x9445ba5c30e98961b8602461d0385d40fbd80311": "10000000000000000000000", + "0xeb835c1a911817878a33d167569ea3cdd387f328": "1000000000000000000000", + "0x761a6e362c97fbbd7c5977acba2da74687365f49": "183840000000000000000", + "0x38202c5cd7078d4f887673ab07109ad8ada89720": "1000000000000000000000", + "0x5abfec25f74cd88437631a7731906932776356f9": "11901484239480000000000000", + "0x28e4af30cd93f686a122ad7bb19f8a8785eee342": "2101000000000000000000", + "0x3a9b111029ce1f20c9109c7a74eeeef34f4f2eb2": "4000000000000000000000", + "0x7bb9571f394b0b1a8eba5664e9d8b5e840677bea": "19700000000000000000", + "0x50fb36c27107ee2ca9a3236e2746cca19ace6b49": "2000000000000000000000", + "0xa3bc979b7080092fa1f92f6e0fb347e28d995045": "2800000000000000000000", + "0xd04b861b3d9acc563a901689941ab1e1861161a2": "20000000000000000000", + "0x58c555bc293cdb16c6362ed97ae9550b92ea180e": "20000000000000000000", + "0x8bf02bd748690e1fd1c76d270833048b66b25fd3": "11800000000000000000000", + "0xfbc01db54e47cdc3c438694ab717a856c23fe6e9": "8456774000000000000000", + "0x9c9a07a8e57c3172a919ef64789474490f0d9f51": "10000000000000000000000", + "0xfc7e22a503ec5abe9b08c50bd14999f520fa4884": "6387725000000000000000", + "0x9b773669e87d76018c090f8255e54409b9dca8b2": "20000000000000000000", + "0xffe8cbc1681e5e9db74a0f93f8ed25897519120f": "1507000000000000000000", + "0x4d4cf5807429615e30cdface1e5aae4dad3055e6": "600000000000000000000", + "0xcfde0fc75d6f16c443c3038217372d99f5d907f7": "2419000000000000000000", + "0x818ffe271fc3973565c303f213f6d2da89897ebd": "5734655000000000000000", + "0xba1fcaf223937ef89e85675503bdb7ca6a928b78": "640000000000000000000", + "0xa30a45520e5206d9004070e6af3e7bb2e8dd5313": "400000000000000000000", + "0xa747439ad0d393b5a03861d77296326de8bb9db9": "1000000000000000000000", + "0x14d00aad39a0a7d19ca05350f7b03727f08dd82e": "500000000000000000000", + "0x551999ddd205563327b9b530785acff9bc73a4ba": "6000000000000000000000", + "0xa4670731175893bbcff4fa85ce97d94fc51c4ba8": "8000000000000000000000", + "0xf858171a04d357a13b4941c16e7e55ddd4941329": "41984000000000000000", + "0xa6484cc684c4c91db53eb68a4da45a6a6bda3067": "6000000000000000000000", + "0x00d75ed60c774f8b3a5a5173fb1833ad7105a2d9": "2005500000000000000000", + "0xbf92418a0c6c31244d220260cb3e867dd7b4ef49": "99800000000000000000", + "0x716d50cca01e938500e6421cc070c3507c67d387": "2000000000000000000000", + "0x82a8b96b6c9e13ebec1e9f18ac02a60ea88a48ff": "1999998000000000000000", + "0x5a565285374a49eedd504c957d510874d00455bc": "100000000000000000000", + "0x778c79f4de1953ebce98fe8006d53a81fb514012": "999800000000000000000", + "0x41b2d34fde0b1029262b4172c81c1590405b03ae": "1000000000000000000000", + "0x4039bd50a2bde15ffe37191f410390962a2b8886": "200000000000000000000", + "0xc033be10cb48613bd5ebcb33ed4902f38b583003": "3000000000000000000000", + "0x5d5751819b4f3d26ed0c1ac571552735271dbefa": "1000000000000000000000", + "0xb600429752f399c80d0734744bae0a022eca67c6": "20000000000000000000", + "0xf875619d8a23e45d8998d184d480c0748970822a": "4000000000000000000000", + "0x71c7230a1d35bdd6819ed4b9a88e94a0eb0786dd": "4365000000000000000000", + "0xb2f9c972c1e9737755b3ff1b3088738396395b26": "20000000000000000000000", + "0xa66a4963b27f1ee1932b172be5964e0d3ae54b51": "173000000000000000000", + "0x53ce88e66c5af2f29bbd8f592a56a3d15f206c32": "140840000000000000000", + "0x433e3ba1c51b810fc467d5ba4dea42f7a9885e69": "40000000000000000000000", + "0xc7837ad0a0bf14186937ace06c5546a36aa54f46": "4000000000000000000000", + "0xc3f8f67295a5cd049364d05d23502623a3e52e84": "6000000000000000000000", + "0x3fd0bb47798cf44cdfbe4d333de637df4a00e45c": "100040000000000000000", + "0xa1ae8d4540d4db6fdde7146f415b431eb55c7983": "197000000000000000000", + "0x5cccf1508bfd35c20530aa642500c10dee65eaed": "850000000000000000000", + "0xa53ead54f7850af21438cbe07af686279a315b86": "10000000000000000000000", + "0x8cf6da0204dbc4860b46ad973fc111008d9e0c46": "200000000000000000000", + "0x8e7936d592008fdc7aa04edeeb755ab513dbb89d": "20000000000000000000", + "0x4a53dcdb56ce4cdce9f82ec0eb13d67352e7c88b": "4200000000000000000000", + "0x2b4f4507bb6b9817942ce433781b708fbcd166fd": "18200000000000000000", + "0x026432af37dc5113f1f46d480a4de0b28052237e": "355800000000000000000", + "0xe780a56306ba1e6bb331952c22539b858af9f77d": "50000000000000000000000", + "0xd1f1694d22671b5aad6a94995c369fbe6133676f": "1000000000000000000000", + "0x7c45f0f8442a56dbd39dbf159995415c52ed479b": "2000000000000000000000", + "0xb65941d44c50d24666670d364766e991c02e11c2": "600000000000000000000", + "0x45e68db8dbbaba5fc2cb337c62bcd0d61b059189": "2000000000000000000000", + "0x05f3631f5664bdad5d0132c8388d36d7d8920918": "20000000000000000000", + "0x5475d7f174bdb1f789017c7c1705989646079d49": "9400000000000000000000", + "0xc7bf2ed1ed312940ee6aded1516e268e4a604856": "6000000000000000000000", + "0x39aaf0854db6eb39bc7b2e43846a76171c0445de": "1850000000000000000000", + "0xc817df1b91faf30fe3251571727c9711b45d8f06": "1999944000000000000000", + "0x7d13d6705884ab2157dd8dcc7046caf58ee94be4": "137200000000000000000000", + "0x478dc09a1311377c093f9cc8ae74111f65f82f39": "4000000000000000000000", + "0x8043ed22f997e5a2a4c16e364486ae64975692c4": "1130513000000000000000", + "0xb9a985501ee950829b17fae1c9cf348c3156542c": "294100000000000000000", + "0xd5cba5b26bea5d73fabb1abafacdef85def368cc": "200000000000000000000", + "0x6776e133d9dc354c12a951087b639650f539a433": "120000000000000000000", + "0x804ca94972634f633a51f3560b1d06c0b293b3b1": "200000000000000000000", + "0x0be1fdf626ee6189102d70d13b31012c95cd1cd6": "2000000000000000000000", + "0xf848fce9ab611c7d99206e23fac69ad488b94fe1": "48500000000000000000", + "0xf01195d657ef3c942e6cb83949e5a20b5cfa8b1e": "25760000000000000000000", + "0x78a5e89900bd3f81dd71ba869d25fec65261df15": "51900000000000000000000", + "0xd6f1e55b1694089ebcb4fe7d7882aa66c8976176": "19998846000000000000000", + "0xd5294b666242303b6df0b1c88d37429bc8c965aa": "300700000000000000000", + "0x3171877e9d820cc618fc0919b29efd333fda4934": "1000000000000000000000", + "0x2901f8077f34190bb47a8e227fa29b30ce113b31": "100000000000000000000", + "0x6b2284440221ce16a8382de5ff0229472269deec": "1000000000000000000000", + "0x1bba03ff6b4ad5bf18184acb21b188a399e9eb4a": "1790000000000000000000", + "0x80744618de396a543197ee4894abd06398dd7c27": "2000000000000000000000", + "0x1b799033ef6dc7127822f74542bb22dbfc09a308": "100000000000000000000", + "0xd513a45080ff2febe62cd5854abe29ee4467f996": "153200000000000000000", + "0xe761d27fa3502cc76bb1a608740e1403cf9dfc69": "280000000000000000000", + "0x53989ed330563fd57dfec9bd343c3760b0799390": "6208000000000000000000", + "0xccf7110d1bd9a74bfd1d7d7d2d9d55607e7b837d": "900000000000000000000", + "0xf373e9daac0c8675f53b797a160f6fc034ae6b23": "100000000000000000000", + "0xabc9a99e8a2148a55a6d82bd51b98eb5391fdbaf": "6000000000000000000000", + "0xffec0913c635baca2f5e57a37aa9fb7b6c9b6e26": "805000000000000000000", + "0x581a3af297efa4436a29af0072929abf9826f58b": "2000000000000000000000", + "0x924efa6db595b79313277e88319625076b580a10": "2000000000000000000000", + "0x65d8dd4e251cbc021f05b010f2d5dc520c3872e0": "834956000000000000000", + "0x6c67d6db1d03516c128b8ff234bf3d49b26d2941": "100000000000000000000000", + "0x496d365534530a5fc1577c0a5241cb88c4da7072": "1790000000000000000000", + "0xb85ff03e7b5fc422981fae5e9941dacbdaba7584": "1337000000000000000000", + "0xe13540ecee11b212e8b775dc8e71f374aae9b3f8": "2000000000000000000000", + "0xa02e3f8f5959a7aab7418612129b701ca1b80010": "20000000000000000000", + "0xa7a3f153cdc38821c20c5d8c8241b294a3f82b24": "500000000000000000000", + "0x366175403481e0ab15bb514615cbb989ebc68f82": "2000000000000000000000", + "0x5104ecc0e330dd1f81b58ac9dbb1a9fbf88a3c85": "100000000000000000000000", + "0xa466d770d898d8c9d405e4a0e551efafcde53cf9": "492500000000000000000", + "0x5fa8a54e68176c4fe2c01cf671c515bfbdd528a8": "330000000000000000000000", + "0xe2e15c60dd381e3a4be25071ab249a4c5c5264da": "2350502000000000000000", + "0x0628bfbe5535782fb588406bc96660a49b011af5": "1520000000000000000000", + "0x04d6b8d4da867407bb997749debbcdc0b358538a": "1000000000000000000000", + "0x0e6ec313376271dff55423ab5422cc3a8b06b22b": "4000000000000000000000", + "0x8787d12677a5ec291e57e31ffbfad105c3324b87": "12438777000000000000000", + "0x58e2f11223fc8237f69d99c6289c148c0604f742": "24000000000000000000000", + "0x5600730a55f6b20ebd24811faa3de96d1662abab": "1880000000000000000000", + "0xfce089635ce97abac06b44819be5bb0a3e2e0b37": "92491000000000000000", + "0xfa0c1a988c8a17ad3528eb28b3409daa58225f26": "200000000000000000000", + "0x7ae1c19e53c71cee4c73fae2d7fc73bf9ab5e392": "1000000000000000000000", + "0xbd17eed82b9a2592019a1b1b3c0fbad45c408d22": "250000000000000000000", + "0x884a7a39d0916e05f1c242df55607f37df8c5fda": "23400000000000000000000", + "0xca70f4ddbf069d2143bd6bbc7f696b52789b32e7": "3000000000000000000000", + "0x7b25bb9ca8e702217e9333225250e53c36804d48": "1880000000000000000000", + "0xea8317197959424041d9d7c67a3ece1dbb78bb55": "394000000000000000000", + "0x5cb953a0e42f5030812226217fffc3ce230457e4": "100000000000000000000", + "0xd1f4dc1ddb8abb8848a8b14e25f3b55a8591c266": "250000000000000000000", + "0x6a42ca971c6578d5ade295c3e7f4ad331dd3424e": "6000000000000000000000", + "0x07e1162ceae3cf21a3f62d105990302e307f4e3b": "1530000000000000000000", + "0x5d1dc3387b47b8451e55106c0cc67d6dc72b7f0b": "2000000000000000000000", + "0x5d2819e8d57821922ee445650ccaec7d40544a8d": "200000000000000000000", + "0x4c24b78baf2bafc7fcc69016426be973e20a50b2": "3000000000000000000000", + "0x630c5273126d517ce67101811cab16b8534cf9a8": "9422595000000000000000", + "0x291f929ca59b54f8443e3d4d75d95dee243cef78": "499938000000000000000", + "0x2dd325fdffb97b19995284afa5abdb574a1df16a": "500000000000000000000", + "0x4fce8429ba49caa0369d1e494db57e89eab2ad39": "200000000000000000000000", + "0x712b76510214dc620f6c3a1dd29aa22bf6d214fb": "6000000000000000000000", + "0x266f2da7f0085ef3f3fa09baee232b93c744db2e": "60000000000000000000000", + "0x0770c61be78772230cb5a3bb2429a72614a0b336": "6767695000000000000000", + "0x02dfcb17a1b87441036374b762a5d3418b1cb4d4": "1340860000000000000000", + "0x5e67df8969101adabd91accd6bb1991274af8df2": "500000000000000000000", + "0x7d9c59631e2ba2e8e82891f3979922aaa3b567a1": "8000000000000000000000", + "0x949f8c107bc7f0aceaa0f17052aadbd2f9732b2e": "2000000000000000000000", + "0xea4e809e266ae5f13cdbe38f9d0456e6386d1274": "4500000000000000000000", + "0xcd5510a242dfb0183de925fba866e312fabc1657": "2400000000000000000000", + "0xa36e0d94b95364a82671b608cb2d373245612909": "150011000000000000000", + "0x0ec46696ffac1f58005fa8439824f08eed1df89b": "10000000000000000000000", + "0xc6fb1ee37417d080a0d048923bdabab095d077c6": "200000000000000000000", + "0x53c9eca40973f63bb5927be0bc6a8a8be1951f74": "2000000000000000000000", + "0xea14bfda0a6e76668f8788321f07df37824ec5df": "200000000000000000000000", + "0xdfb4d4ade52fcc818acc7a2c6bb2b00224658f78": "7750000000000000000000", + "0x5997ffefb3c1d9d10f1ae2ac8ac3c8e2d2292783": "1000000000000000000000", + "0x8eceb2e124536c5b5ffc640ed14ff15ed9a8cb71": "2000000000000000000000", + "0x8f02bda6c36922a6be6a509be51906d393f7b99b": "1019835000000000000000", + "0x530077c9f7b907ff9cec0c77a41a70e9029add4a": "2000000000000000000000", + "0x08936a37df85b3a158cafd9de021f58137681347": "18200000000000000000", + "0x8e9c429266df057efa78dd1d5f77fc40742ad466": "300061000000000000000", + "0xacc59f3b30ceffc56461cc5b8df48902240e0e7b": "2000000000000000000000", + "0xf5534815dc635efa5cc84b2ac734723e21b29372": "1580000000000000000000", + "0xf873e57a65c93b6e18cb75f0dc077d5b8933dc5c": "197000000000000000000", + "0x25b78c9fad85b43343f0bfcd0fac11c9949ca5eb": "2000000000000000000000", + "0xaad2b7f8106695078e6c138ec81a7486aaca1eb2": "200000000000000000000", + "0x509c8668036d143fb8ae70b11995631f3dfcad87": "1000000000000000000000", + "0x3602458da86f6d6a9d9eb03daf97fe5619d442fa": "2000000000000000000000", + "0x9f607b3f12469f446121cebf3475356b71b4328c": "4000000000000000000000", + "0xfe3827d57630cf8761d512797b0b858e478bbd12": "20000000000000000000", + "0x9d9c4efe9f433989e23be94049215329fa55b4cb": "256215000000000000000", + "0x9bd905f1719fc7acd0159d4dc1f8db2f21472338": "1000000000000000000000", + "0x7d82e523cc2dc591da3954e8b6bb2caf6461e69c": "2316058000000000000000", + "0x74afe54902d615782576f8baac13ac970c050f6e": "177670000000000000000", + "0xaff11ccf699304d5f5862af86083451c26e79ae5": "1999000000000000000000", + "0x3885fee67107dc3a3c741ee290c98918c9b99397": "20000000000000000000", + "0x36343aeca07b6ed58a0e62fa4ecb498a124fc971": "300000000000000000000", + "0xc94a28fb3230a9ddfa964e770f2ce3c253a7be4f": "200000000000000000000", + "0x9882967cee68d2a839fad8ab4a7c3dddf6c0adc8": "1336866000000000000000", + "0x95df4e3445d7662624c48eba74cf9e0a53e9f732": "56000000000000000000000", + "0xca9faa17542fafbb388eab21bc4c94e8a7b34788": "1999999000000000000000", + "0xc8b1850525d946f2ae84f317b15188c536a5dc86": "2685000000000000000000", + "0x39bac68d947859f59e9226089c96d62e9fbe3cde": "40000000000000000000", + "0xa9bfc410dddb20711e45c07387eab30a054e19ac": "1154750000000000000000", + "0x540a1819bd7c35861e791804e5fbb3bc97c9abb1": "1454400000000000000000", + "0x667b61c03bb937a9f5d0fc5a09f1ea3363c77035": "4250000000000000000000", + "0x010df1df4bed23760d2d1c03781586ddf7918e54": "60000000000000000000", + "0xbd51ee2ea143d7b1d6b77e7e44bdd7da12f485ac": "1318800000000000000000", + "0xfb5125bf0f5eb0b6f020e56bfc2fdf3d402c097e": "5910000000000000000000", + "0x3f0c83aac5717962734e5ceaeaecd39b28ad06be": "2000000000000000000000", + "0xf10661ff94140f203e7a482572437938bec9c3f7": "20000000000000000000000", + "0xbd3097a79b3c0d2ebff0e6e86ab0edadbed47096": "1670000000000000000000", + "0xedeb4894aadd0081bbddd3e8846804b583d19f27": "2000000000000000000000", + "0x49c9771fca19d5b9d245c891f8158fe49f47a062": "10000000000000000000000", + "0x6405dd13e93abcff377e700e3c1a0086eca27d29": "18200000000000000000", + "0xce5e04f0184369bcfa06aca66ffa91bf59fa0fb9": "40000000000000000000", + "0x4364309a9fa07095600f79edc65120cdcd23dc64": "10000000000000000000000", + "0xb749b54e04d5b19bdcedfb84da7701ab478c27ae": "2680000000000000000000", + "0xf593c65285ee6bbd6637f3be8f89ad40d489f655": "3000000000000000000000", + "0xd224f880f9479a89d32f09e52be990b288135cef": "17300000000000000000000", + "0x85bb51bc3bfe9a1b2a2f6b1cda95bca8b38c8d5e": "321750000000000000000", + "0xcaf4481d9db78dc4f25f7b4ac8bd3b1ca0106b31": "5000000000000000000000", + "0x51ca8bd4dc644fac47af675563d5804a0da21eeb": "788000000000000000000", + "0x19f643e1a8fa04ae16006028138333a59a96de87": "20000000000000000000", + "0x58b808a65b51e6338969afb95ec70735e451d526": "39998000000000000000000", + "0x574921838cc77d6c98b17d903a3ae0ee0da95bd0": "53480000000000000000000", + "0x7c6924d07c3ef5891966fe0a7856c87bef9d2034": "2000000000000000000000", + "0xf9767e4ecb4a5980527508d7bec3d45e4c649c13": "1910000000000000000000", + "0xf3be99b9103ce7550aa74ff1db18e09dfe32e005": "2000000000000000000000", + "0x625644c95a873ef8c06cdb9e9f6d8d7680043d62": "1800000000000000000000", + "0x6a44af96b3f032ae641beb67f4b6c83342d37c5d": "29000000000000000000", + "0xd3a10ec7a5c9324999dd9e9b6bde7c911e584bda": "600000000000000000000", + "0xe8ddbed732ebfe754096fde9086b8ea4a4cdc616": "2000000000000000000000", + "0x235fa66c025ef5540070ebcf0d372d8177c467ab": "33400000000000000000000", + "0x4d08471d68007aff2ae279bc5e3fe4156fbbe3de": "40000000000000000000000", + "0xdadc00ab7927603c2fcf31cee352f80e6c4d6351": "1999664000000000000000", + "0x7393cbe7f9ba2165e5a7553500b6e75da3c33abf": "100000000000000000000", + "0x77617ebc4bebc5f5ddeb1b7a70cdeb6ae2ffa024": "1970000000000000000000", + "0x7fea1962e35d62059768c749bedd96cab930d378": "2000000000000000000000", + "0x243b3bca6a299359e886ce33a30341fafe4d573d": "20000000000000000000000", + "0xb94d47b3c052a5e50e4261ae06a20f45d8eee297": "2000000000000000000000", + "0xe727e67ef911b81f6cf9c73fcbfebc2b02b5bfc6": "2000000000000000000000", + "0xe510d6797fba3d6693835a844ea2ad540691971b": "17381000000000000000000", + "0x0cdc960b998c141998160dc179b36c15d28470ed": "500038000000000000000", + "0x3e76a62db187aa74f63817533b306cead0e8cebe": "31200000000000000000000", + "0x495b641b1cdea362c3b4cbbd0f5cc50b1e176b9c": "1000000000000000000000", + "0x5126460d692c71c9af6f05574d93998368a23799": "52000000000000000000", + "0xa008019863c1a77c1499eb39bbd7bf2dd7a31cb9": "137000000000000000000", + "0x65ee20b06d9ad589a7e7ce04b9f5f795f402aece": "2000000000000000000000", + "0xf432b9dbaf11bdbd73b6519fc0a904198771aac6": "152000000000000000000", + "0x85946d56a4d371a93368539690b60ec825107454": "1730000000000000000000", + "0x26f9f7cefd7e394b9d3924412bf2c2831faf1f85": "4000000000000000000000", + "0xd4ebb1929a23871cf77fe049ab9602be08be0a73": "1910000000000000000000", + "0x4fdac1aa517007e0089430b3316a1badd12c01c7": "500000000000000000000", + "0x05e671de55afec964b074de574d5158d5d21b0a3": "3940000000000000000000", + "0x20181c4b41f6f972b66958215f19f570c15ddff1": "1600000000000000000000", + "0xcc9519d1f3985f6b255eaded12d5624a972721e1": "1000000000000000000000", + "0x169bbefc41cfd7d7cbb8dfc63020e9fb06d49546": "2000000000000000000000", + "0x175a183a3a235ffbb03ba835675267229417a091": "16000000000000000000000", + "0x8dde3cb8118568ef4503fe998ccdf536bf19a098": "4000000000000000000000", + "0x6a05b21c4f17f9d73f5fb2b0cb89ff5356a6cc7e": "1500000000000000000000", + "0x5cc4cba621f220637742057f6055b80dffd77e13": "39997692000000000000000", + "0xecb94c568bfe59ade650645f4f26306c736cace4": "267400000000000000000", + "0xdfa6b8b8ad3184e357da282951d79161cfb089bc": "400000000000000000000", + "0xa3058c51737a4e96c55f2ef6bd7bb358167ec2a7": "606093000000000000000", + "0x051d424276b21239665186133d653bb8b1862f89": "1000000000000000000000", + "0xd05ffb2b74f867204fe531653b0248e21c13544e": "1000000000000000000000", + "0xe1f63ebbc62c7b7444040eb99623964f7667b376": "20000000000000000000", + "0xe5a3d7eb13b15c100177236d1beb30d17ee15420": "2000000000000000000000", + "0x18fa8625c9dc843c78c7ab259ff87c9599e07f10": "1000000000000000000000", + "0x64264aedd52dcae918a012fbcd0c030ee6f71821": "1000000000000000000000", + "0x6f1f4907b8f61f0c51568d692806b382f50324f5": "2000000000000000000000", + "0xbecef61c1c442bef7ce04b73adb249a8ba047e00": "1000400000000000000000", + "0x7b893286427e72db219a21fc4dcd5fbf59283c31": "10000000000000000000000", + "0xce5eb63a7bf4fbc2f6e4baa0c68ab1cb4cf98fb4": "2000000000000000000000", + "0x66ec16ee9caab411c55a6629e318de6ee216491d": "865000000000000000000", + "0x30b66150f1a63457023fdd45d0cc6cb54e0c0f06": "1000000000000000000000", + "0x87183160d172d2e084d327b86bcb7c1d8e6784ef": "4000086000000000000000", + "0xc420388fbee84ad656dd68cdc1fbaa9392780b34": "187767000000000000000", + "0x90f774c9147dde90853ddc43f08f16d455178b8c": "4000000000000000000000", + "0x1e1d7a5f2468b94ea826982dbf2125793c6e4a5a": "999940000000000000000", + "0x8043fdd0bc4c973d1663d55fc135508ec5d4f4fa": "20000000000000000000", + "0x7bca1da6c80a66baa5db5ac98541c4be276b447d": "679000000000000000000", + "0x73550beb732ba9ddafda7ae406e18f7feb0f8bb2": "2800000000000000000000", + "0xadc19ec835afe3e58d87dc93a8a9213c90451326": "1971200000000000000000", + "0x821d798af19989c3ae5b84a7a7283cd7fda1fabe": "20000000000000000000000", + "0x4c4e6f13fb5e3f70c3760262a03e317982691d10": "100000000000000000000", + "0x664e43119870af107a448db1278b044838ffcdaf": "400000000000000000000", + "0x8da1178f55d97772bb1d24111a404a4f8715b95d": "878149000000000000000", + "0x5e6e9747e162f8b45c656e0f6cae7a84bac80e4e": "2000000000000000000000", + "0xc7eac31abce6d5f1dea42202b6a674153db47a29": "591000000000000000000", + "0xd96711540e2e998343d4f590b6fc8fac3bb8b31d": "1758944000000000000000", + "0x9da4ec407077f4b9707b2d9d2ede5ea5282bf1df": "4000000000000000000000", + "0xf60c1b45f164b9580e20275a5c39e1d71e35f891": "2000000000000000000000", + "0xeb6394a7bfa4d28911d5a5b23e93f35e340c2294": "78000000000000000000", + "0xa89ac93b23370472daac337e9afdf642543f3e57": "10000000000000000000000", + "0xbb618e25221ad9a740b299ed1406bc3934b0b16d": "1000000000000000000000", + "0x817ac33bd8f847567372951f4a10d7a91ce3f430": "200015000000000000000", + "0xfe6a895b795cb4bf85903d3ce09c5aa43953d3bf": "3400000000000000000000", + "0x3673954399f6dfbe671818259bb278e2e92ee315": "200000000000000000000000", + "0xdf0ff1f3d27a8ec9fb8f6b0cb254a63bba8224a5": "4367636000000000000000", + "0xff12e49d8e06aa20f886293c0b98ed7eff788805": "4000000000000000000000", + "0x5aef16a226dd68071f2483e1da42598319f69b2c": "2000000000000000000000", + "0x0266ab1c6b0216230b9395443d5fa75e684568c6": "1000000000000000000000", + "0x14a7352066364404db50f0d0d78d754a22198ef4": "1880000000000000000000", + "0x444caf79b71338ee9aa7c733b02acaa7dc025948": "40000000000000000000", + "0x64e2de21200b1899c3a0c0653b5040136d0dc842": "20000000000000000000000", + "0x36e156610cd8ff64e780d89d0054385ca76755aa": "14000000000000000000000", + "0x0a6ebe723b6ed1f9a86a69ddda68dc47465c2b1b": "1185000000000000000000", + "0x38bf2a1f7a69de0e2546adb808b36335645da9ff": "2000320000000000000000", + "0x39f44663d92561091b82a70dcf593d754005973a": "199999000000000000000", + "0x24b9e6644f6ba4cde126270d81f6ab60f286dff4": "133700000000000000000", + "0x9b59eb213b1e7565e45047e04ea0374f10762d16": "2000000000000000000000", + "0x309544b6232c3dd737f945a03193d19b5f3f65b9": "1087440000000000000000", + "0xb28bb39f3466517cd46f979cf59653ee7d8f152e": "450000000000000000000", + "0x9da8e22ca10e67fea44e525e4751eeac36a31194": "260000000000000000000", + "0x4f8ae80238e60008557075ab6afe0a7f2e74d729": "100000000000000000000", + "0x74ed33acf43f35b98c9230b9e6642ecb5330839e": "681872000000000000000", + "0x22842ab830da509913f81dd1f04f10af9edd1c55": "2000000000000000000000", + "0xa8f37f0ab3a1d448a9e3ce40965f97a646083a34": "329800000000000000000", + "0x582b70669c97aab7d68148d8d4e90411e2810d56": "999972000000000000000", + "0xd5e55100fbd1956bbed2ca518d4b1fa376032b0b": "100000000000000000000", + "0xb7cc6b1acc32d8b295df68ed9d5e60b8f64cb67b": "300000000000000000000", + "0xe081ca1f4882db6043d5a9190703fde0ab3bf56d": "400000000000000000000", + "0xc02077449a134a7ad1ef7e4d927affeceeadb5ae": "18200000000000000000", + "0xe09fea755aee1a44c0a89f03b5deb762ba33006f": "1100070000000000000000", + "0xb3717731dad65132da792d876030e46ac227bb8a": "1000000000000000000000", + "0x157eb3d3113bd3b597714d3a954edd018982a5cb": "2000000000000000000000", + "0xdc57345b38e0f067c9a31d9deac5275a10949321": "200000000000000000000", + "0x40ea5044b204b23076b1a5803bf1d30c0f88871a": "14000000000000000000000", + "0x2bab0fbe28d58420b52036770a12f9952aea6911": "3820000000000000000000", + "0xadaa0e548c035affed64ca678a963fabe9a26bfd": "70000000000000000000", + "0xbb48eaf516ce2dec3e41feb4c679e4957641164f": "3820000000000000000000", + "0x7693bdeb6fc82b5bca721355223175d47a084b4d": "22000000000000000000000", + "0x03cb98d7acd817de9d886d22fab3f1b57d92a608": "1600000000000000000000", + "0xf88900db737955b1519b1a7d170a18864ce590eb": "18200000000000000000", + "0x757fa55446c460968bb74b5ebca96c4ef2c709c5": "1015200000000000000000", + "0xda855d53477f505ec4c8d5e8bb9180d38681119c": "5600000000000000000000", + "0xe41aea250b877d423a63ba2bce2f3a61c0248d56": "260000000000000000000", + "0x8262169b615870134eb4ac6c5f471c6bf2f789fc": "462500000000000000000", + "0x66b0c100c49149935d14c0dc202cce907cea1a3d": "1970000000000000000000", + "0x854c0c469c246b83b5d1b3eca443b39af5ee128a": "1600000000000000000000", + "0xeb6810691d1ae0d19e47bd22cebee0b3ba27f88a": "2499922000000000000000", + "0x24dcc24bd9c7210ceacfb30da98ae04a4d7b8ab9": "1000000000000000000000", + "0xe31b4eef184c24ab098e36c802714bd4743dd0d4": "200000000000000000000", + "0x99b8c824869de9ed24f3bff6854cb6dd45cc3f9f": "1880000000000000000000", + "0x2ae73a79aea0278533accf21070922b1613f8f32": "3097417000000000000000", + "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a": "10000000000000000000000", + "0x1b4bbcb18165211b265b280716cb3f1f212176e8": "472325000000000000000", + "0xe177e0c201d335ba3956929c571588b51c5223ae": "2000000000000000000000", + "0x1945fe377fe6d4b71e3e791f6f17db243c9b8b0f": "2185500000000000000000", + "0x3e9b34a57f3375ae59c0a75e19c4b641228d9700": "17900000000000000000", + "0xa4d6c82eddae5947fbe9cdfbd548ae33d91a7191": "8000000000000000000000", + "0xbad4425e171c3e72975eb46ac0a015db315a5d8f": "2000000000000000000000", + "0xa2d2aa626b09d6d4e4b13f7ffc5a88bd7ad36742": "4639390000000000000000", + "0xb61c34fcacda701a5aa8702459deb0e4ae838df8": "35000000000000000000000", + "0x145e0600e2a927b2dd8d379356b45a2e7d51d3ae": "2545843000000000000000", + "0x8df339214b6ad1b24663ce716034749d6ef838d9": "11000000000000000000000", + "0x8fd9a5c33a7d9edce0997bdf77ab306424a11ea9": "2000000000000000000000", + "0x097da12cfc1f7c1a2464def08c29bed5e2f851e9": "20000000000000000000", + "0xddabf13c3c8ea4e3d73d78ec717afafa430e5479": "41600000000000000000000", + "0x9eeb07bd2b7890195e7d46bdf2071b6617514ddb": "2000000000000000000000", + "0x819af9a1c27332b1c369bbda1b3de1c6e933d640": "314308000000000000000", + "0xd7d2c6fca8ad1f75395210b57de5dfd673933909": "340000000000000000000", + "0xcdd5d881a7362c9070073bdfbc75e72453ac510e": "842000000000000000000", + "0xe9ac36376efa06109d40726307dd1a57e213eaa9": "194000000000000000000", + "0x1bea4df5122fafdeb3607eddda1ea4ffdb9abf2a": "346000000000000000000", + "0x3e5e93fb4c9c9d1246f8f247358e22c3c5d17b6a": "150000000000000000000", + "0x6c1ddd33c81966dc8621776071a4129482f2c65f": "40000000000000000000000", + "0x2ccb66494d0af689abf9483d365d782444e7dead": "1000000000000000000000", + "0x19571a2b8f81c6bcf66ab3a10083295617150003": "492500000000000000000", + "0x38ac664ee8e0795e4275cb852bcba6a479ad9c8d": "20000000000000000000", + "0xc4803bb407c762f90b7596e6fde194931e769590": "4000000000000000000000", + "0x93507e9e8119cbceda8ab087e7ecb071383d6981": "14000000000000000000000", + "0xb672734afcc224e2e609fc51d4f059732744c948": "295500000000000000000", + "0xfbbbebcfbe235e57dd2306ad1a9ec581c7f9f48f": "40000000000000000000", + "0x8c81410ea8354cc5c65c41be8bd5de733c0b111d": "9550000000000000000000", + "0x942c6b8c955bc0d88812678a236725b32739d947": "1550000000000000000000", + "0xd2e817738abf1fb486583f80c350318bed860c80": "240010000000000000000", + "0xbff5df769934b8943ca9137d0efef2fe6ebbb34e": "100000000000000000000", + "0x6c4e426e8dc005dfa3516cb8a680b02eea95ae8e": "1337000000000000000000", + "0xf645dd7c890093e8e4c8aa92a6bb353522d3dc98": "134000000000000000000", + "0x4bac846af4169f1d95431b341d8800b22180af1a": "20000000000000000000", + "0x0514954c3c2fb657f9a06f510ea22748f027cdd3": "400000000000000000000", + "0x163dca73d7d6ea3f3e6062322a8734180c0b78ef": "2941400000000000000000", + "0xfeaca2ac74624bf348dac9985143cfd652a4be55": "26148245000000000000000", + "0xfe80e9232deaff19baf99869883a4bdf0004e53c": "855680000000000000000", + "0x17108dab2c50f99de110e1b3b3b4cd82f5df28e7": "980000000000000000000", + "0x837a645dc95c49549f899c4e8bcf875324b2f57c": "600400000000000000000", + "0x762998e1d75227fced7a70be109a4c0b4ed86414": "20000000000000000000", + "0xc0a7e8435dff14c25577739db55c24d5bf57a3d9": "49250000000000000000000", + "0xaead88d689416b1c91f2364421375b7d3c70fb2e": "2000000000000000000000", + "0x9279b2228cec8f7b4dda3f320e9a0466c2f585ca": "5000000000000000000000", + "0x36726f3b885a24f92996da81625ec8ad16d8cbe6": "1543723000000000000000", + "0x3951e48e3c869e6b72a143b6a45068cdb9d466d0": "20000000000000000000", + "0xf5d61ac4ca95475e5b7bffd5f2f690b316759615": "31040000000000000000000", + "0x158a0d619253bf4432b5cd02c7b862f7c2b75636": "135733000000000000000", + "0xe56d431324c92911a1749df292709c14b77a65cd": "8200000000000000000000", + "0x9976947eff5f6ae5da08dd541192f378b428ff94": "8000000000000000000000", + "0x83210583c16a4e1e1dac84ebd37e3d0f7c57eba4": "2000000000000000000000", + "0xdcb64df43758c7cf974fa660484fbb718f8c67c1": "20000000000000000000000", + "0xd4205592844055b3c7a1f80cefe3b8eb509bcde7": "178973000000000000000", + "0xd0648a581b3508e135a2935d12c9657045d871ca": "8022000000000000000000", + "0xe7d17524d00bad82497c0f27156a647ff51d2792": "20000000000000000000", + "0x21582e99e502cbf3d3c23bdffb76e901ac6d56b2": "100000000000000000000", + "0xe61f280915c774a31d223cf80c069266e5adf19b": "880000000000000000000", + "0x03c91d92943603e752203e05340e566013b90045": "802200000000000000000", + "0x22561c5931143536309c17e832587b625c390b9a": "4000000000000000000000", + "0xe399c81a1d701b44f0b66f3399e66b275aaaf8c1": "1000000000000000000000", + "0x7f8dbce180ed9c563635aad2d97b4cbc428906d9": "2674000000000000000000", + "0x9f61beb46f5e853d0a8521c7446e68e34c7d0973": "560000000000000000000", + "0x6d3f2ba856ccbb0237fa7661156b14b013f21240": "1000000000000000000000", + "0x5f742e487e3ab81af2f94afdbe1b9b8f5ccc81bc": "2172412000000000000000", + "0xb600feab4aa96c537504d96057223141692c193a": "400000000000000000000", + "0xfab487500df20fb83ebed916791d561772adbebf": "1999980000000000000000", + "0xf8704c16d2fd5ba3a2c01d0eb20484e6ecfa3109": "200000000000000000000", + "0x3f1bc420c53c002c9e90037c44fe6a8ef4ddc962": "173000000000000000000", + "0x82e577b515cb2b0860aafe1ce09a59e09fe7d040": "600000000000000000000", + "0xbc999e385c5aebcac8d6f3f0d60d5aa725336d0d": "2000000000000000000000", + "0xe16ce35961cd74bd590d04c4ad4a1989e05691c6": "146000000000000000000", + "0xeb76424c0fd597d3e341a9642ad1ee118b2b579d": "4000000000000000000000", + "0xc440c7ca2f964b6972ef664a2261dde892619d9c": "20000000000000000000000", + "0x460d5355b2ceeb6e62107d81e51270b26bf45620": "2005500000000000000000", + "0xfcada300283f6bcc134a91456760b0d77de410e0": "2000000000000000000000", + "0xbe8d7f18adfe5d6cc775394989e1930c979d007d": "1000000000000000000000", + "0xa7f9220c8047826bd5d5183f4e676a6d77bfed36": "153368000000000000000", + "0x98d204f9085f8c8e7de23e589b64c6eff692cc63": "2000000000000000000000", + "0x5a2916b8d2e8cc12e207ab464d433e2370d823d9": "2000000000000000000000", + "0xc42d6aeb710e3a50bfb44d6c31092969a11aa7f3": "150052000000000000000", + "0x04ce45f600db18a9d0851b29d9393ebdaafe3dc5": "20000000000000000000", + "0x7a1370a742ec2687e761a19ac5a794329ee67404": "2999988000000000000000", + "0xda2ad58e77deddede2187646c465945a8dc3f641": "660000000000000000000", + "0xec58bc0d0c20d8f49465664153c5c196fe59e6be": "400000000000000000000", + "0xf8063af4cc1dd9619ab5d8bff3fcd1faa8488221": "2000000000000000000000", + "0xb9231eb26e5f9e4b4d288f03906704fab96c87d6": "19700000000000000000000", + "0x6e5c2d9b1c546a86eefd5d0a5120c9e4e730190e": "199600000000000000000", + "0xe49936a92a8ccf710eaac342bc454b9b14ebecb1": "2000000000000000000000", + "0x21dbdb817a0d8404c6bdd61504374e9c43c9210e": "9999917000000000000000", + "0x5cebe30b2a95f4aefda665651dc0cf7ef5758199": "18200000000000000000", + "0x597038ff91a0900cbbab488af483c790e6ec00a0": "10000000000000000000000", + "0x0fa5d8c5b3f294efd495ab69d768f81872508548": "2000000000000000000000", + "0xfeef3b6eabc94affd3310c1c4d0e65375e131119": "20000000000000000000", + "0x1ce81d31a7923022e125bf48a3e03693b98dc9dd": "2000000000000000000000", + "0x5887dc6a33dfed5ac1edefe35ef91a216231ac96": "250000000000000000000", + "0x4e8e47ae3b1ef50c9d54a38e14208c1abd3603c2": "2235000000000000000000", + "0xe845e387c4cbdf982280f6aa01c40e4be958ddb2": "25000000000000000000000", + "0x71d9494e50c5dd59c599dba3810ba1755e6537f0": "4000000000000000000000", + "0x6eb5578a6bb7c32153195b0d8020a6914852c059": "660000000000000000000000", + "0x543f8c674e2462d8d5daa0e80195a8708e11a29e": "63940000000000000000", + "0xa0459ef3693aacd1647cd5d8929839204cef53be": "1000000000000000000000", + "0xdda371e600d30688d4710e088e02fdf2b9524d5f": "6920000000000000000000", + "0xdd4dd6d36033b0636fcc8d0938609f4dd64f4a86": "60000000000000000000", + "0x3bd624b548cb659736907ed8aa3c0c705e24b575": "2000000000000000000000", + "0x414599092e879ae25372a84d735af5c4e510cd6d": "400000000000000000000", + "0x3d66cd4bd64d5c8c1b5eea281e106d1c5aad2373": "1951100000000000000000", + "0x5948bc3650ed519bf891a572679fd992f8780c57": "197000000000000000000", + "0x8b74a7cb1bb8c58fce267466a30358adaf527f61": "13620000000000000000000", + "0x3f10800282d1b7ddc78fa92d8230074e1bf6aeae": "4925000000000000000000", + "0x32dbb6716c54e83165829a4abb36757849b6e47d": "1000000000000000000000", + "0xe6b3ac3f5d4da5a8857d0b3f30fc4b2b692b77d7": "1460000000000000000000", + "0x052a58e035f1fe9cdd169bcf20970345d12b9c51": "1490000000000000000000", + "0x581bdf1bb276dbdd86aedcdb397a01efc0e00c5b": "1000000000000000000000", + "0x604e9477ebf4727c745bcabbedcb6ccf29994022": "1000060000000000000000", + "0x59b96deb8784885d8d3b4a166143cc435d2555a1": "1337000000000000000000", + "0x37d980a12ee3bf23cc5cdb63b4ae45691f74c837": "2000000000000000000000", + "0x3bfbd3847c17a61cf3f17b52f8eba1b960b3f39f": "3000000000000000000000", + "0x49c941e0e5018726b7290fc473b471d41dae80d1": "500000000000000000000", + "0xf26bcedce3feadcea3bc3e96eb1040dfd8ffe1a0": "775000000000000000000", + "0xd0944aa185a1337061ae20dc9dd96c83b2ba4602": "200000000000000000000", + "0x904caa429c619d940f8e6741826a0db692b19728": "1000000000000000000000", + "0xb95c9b10aa981cf4a67a71cc52c504dee8cf58bd": "4000000000000000000000", + "0x15874686b6733d10d703c9f9bec6c52eb8628d67": "2000000000000000000000", + "0x1374facd7b3f8d68649d60d4550ee69ff0484133": "269700000000000000000", + "0xb0e469c886593815b3495638595daef0665fae62": "1940000000000000000000", + "0x47ff6feb43212060bb1503d7a397fc08f4e70352": "2000000000000000000000", + "0xc60b04654e003b4683041f1cbd6bc38fda7cdbd6": "2000000000000000000000", + "0x3ecdb532e397579662b2a46141e78f8235936a5f": "66850000000000000000", + "0xb3a8c2cb7d358e5739941d945ba9045a023a8bbb": "1000000000000000000000", + "0x32ef5cdc671df5562a901aee5db716b9be76dcf6": "2000000000000000000000", + "0xc94110e71afe578aa218e4fc286403b0330ace8d": "2000000000000000000000", + "0x9b43dcb95fde318075a567f1e6b57617055ef9e8": "3940000000000000000000", + "0xefeea010756f81da4ba25b721787f058170befbd": "32470000000000000000", + "0xc88255eddcf521c6f81d97f5a42181c9073d4ef1": "290793000000000000000", + "0xdd47189a3e64397167f0620e484565b762bfbbf4": "1850000000000000000000", + "0x82f39b2758ae42277b86d69f75e628d958ebcab0": "40000000000000000000000", + "0xe37f5fdc6ec97d2f866a1cfd0d3a4da4387b22b5": "10000000000000000000000", + "0x62331df2a3cbee3520e911dea9f73e905f892505": "2000000000000000000000", + "0x8c5d16ed65e3ed7e8b96ca972bc86173e3500b03": "2000000000000000000000", + "0x8b9841862e77fbbe919470935583a93cf027e450": "2000054000000000000000", + "0xc8dd27f16bf22450f5771b9fe4ed4ffcb30936f4": "197000000000000000000", + "0xdec8a1a898f1b895d8301fe64ab3ad5de941f689": "787803000000000000000", + "0x61c4ee7c864c4d6b5e37ea1331c203739e826b2f": "30063000000000000000", + "0x3250e3e858c26adeccadf36a5663c22aa84c4170": "5000000000000000000000", + "0x299e0bca55e069de8504e89aca6eca21d38a9a5d": "55500000000000000000", + "0xd50f7fa03e389876d3908b60a537a6706304fb56": "100000000000000000000", + "0x69073269729e6414b26ec8dc0fd935c73b579f1e": "30000000000000000000000", + "0x14fcd1391e7d732f41766cdacd84fa1deb9ffdd2": "2000000000000000000000", + "0x823768746737ce6da312d53e54534e106f967cf3": "20000000000000000000", + "0x882f75708386653c80171d0663bfe30b017ed0ad": "2000000000000000000000", + "0xa25b086437fd2192d0a0f64f6ed044f38ef3da32": "335000000000000000000", + "0x5a9c8b69fc614d69564999b00dcb42db67f97e90": "3429227000000000000000", + "0xa2b701f9f5cdd09e4ba62baebae3a88257105885": "1000000000000000000000", + "0x5e7b8c54dc57b0402062719dee7ef5e37ea35d62": "2877224000000000000000", + "0x7ffabfbc390cbe43ce89188f0868b27dcb0f0cad": "6370000000000000000000", + "0xb5cdbc4115406f52e5aa85d0fea170d2979cc7ba": "1337000000000000000000", + "0x263814309de4e635cf585e0d365477fc40e66cf7": "146000000000000000000", + "0x24cff0e9336a9f80f9b1cb968caf6b1d1c4932a4": "200200000000000000000", + "0xd3a941c961e8ca8b1070f23c6d6d0d2a758a4444": "200000000000000000000", + "0xa97beb3a48c45f1528284cb6a95f7de453358ec6": "31000000000000000000000", + "0x4dd131c74a068a37c90aded4f309c2409f6478d3": "400008000000000000000", + "0x653675b842d7d8b461f722b4117cb81dac8e639d": "31000000000000000000", + "0x561be9299b3e6b3e63b79b09169d1a948ae6db01": "500000000000000000000", + "0xdc067ed3e12d711ed475f5156ef7e71a80d934b9": "9550000000000000000000", + "0x08d97eadfcb7b064e1ccd9c8979fbee5e77a9719": "266063000000000000000", + "0x6e4c2ab7db026939dbd3bc68384af660a61816b2": "167000000000000000000", + "0xbf4c73a7ede7b164fe072114843654e4d8781dde": "2000000000000000000000", + "0xf504943aaf16796e0b341bbcdf21d11cc586cdd1": "9000000000000000000000", + "0xea81ca8638540cd9d4d73d060f2cebf2241ffc3e": "1970000000000000000000", + "0x9944fee9d34a4a880023c78932c00b59d5c82a82": "750022000000000000000", + "0x12f460ae646cd2780fd35c50a6af4b9accfa85c6": "1000000000000000000000", + "0x4e232d53b3e6be8f895361d31c34d4762b12c82e": "1760000000000000000000", + "0x6bb2aca23fa1626d18efd6777fb97db02d8e0ae4": "40000000000000000000000", + "0xbc4e471560c99c8a2a4b1b1ad0c36aa6502b7c4b": "12000000000000000000000", + "0x2e2cbd7ad82547b4f5ff8b3ab56f942a6445a3b0": "200000000000000000000", + "0x21ecb2dfa65779c7592d041cd2105a81f4fd4e46": "1000000000000000000000", + "0x34318625818ec13f11835ae97353ce377d6f590a": "1520000000000000000000", + "0xa7ef35ce87eda6c28df248785815053ec97a5045": "4999998000000000000000", + "0x6a514e6242f6b68c137e97fea1e78eb555a7e5f7": "20000000000000000000", + "0x9340b5f678e45ee05eb708bb7abb6ec8f08f1b6b": "6000000000000000000000", + "0x43cc08d0732aa58adef7619bed46558ad7774173": "4443926000000000000000", + "0x12e9a4ad2ad57484dd700565bddb46423bd9bd31": "19999800000000000000000", + "0xebbeeb259184a6e01cccfc2207bbd883785ac90a": "619966000000000000000", + "0x704ab1150d5e10f5e3499508f0bf70650f028d4b": "4000000000000000000000", + "0xfc361105dd90f9ede566499d69e9130395f12ac8": "395000000000000000000000", + "0xc1b9a5704d351cfe983f79abeec3dbbbae3bb629": "20000000000000000000", + "0x66f50406eb1b11a946cab45927cca37470e5a208": "2000000000000000000000", + "0x53942e7949d6788bb780a7e8a0792781b1614b84": "15899600000000000000000", + "0x32ba9a7d0423e03a525fe2ebeb661d2085778bd8": "20000000000000000000000", + "0x11c0358aa6479de21866fe21071924b65e70f8b9": "36400000000000000000000", + "0x76cb9c8b69f4387675c48253e234cb7e0d74a426": "7396300000000000000000", + "0x9f5f44026b576a4adb41e95961561d41039ca391": "250000000000000000000", + "0x533a73a4a2228eee05c4ffd718bbf3f9c1b129a7": "6000000000000000000000", + "0xdcc52d8f8d9fc742a8b82767f0555387c563efff": "500000000000000000000", + "0xf456a75bb99655a7412ce97da081816dfdb2b1f2": "200000000000000000000", + "0xd0c101fd1f01c63f6b1d19bc920d9f932314b136": "20000000000000000000000", + "0xdabc225042a6592cfa13ebe54efa41040878a5a2": "259550000000000000000", + "0x38eec6e217f4d41aa920e424b9525197041cd4c6": "4428166000000000000000", + "0x8a247d186510809f71cffc4559471c3910858121": "1790000000000000000000", + "0x4f152b2fb8659d43776ebb1e81673aa84169be96": "2000000000000000000000", + "0xb4496ddb27799a222457d73979116728e8a1845b": "2610331000000000000000", + "0x4a4053b31d0ee5dbafb1d06bd7ac7ff3222c47d6": "1400000000000000000000", + "0x0f7bea4ef3f73ae0233df1e100718cbe29310bb0": "2000000000000000000000", + "0xc836e24a6fcf29943b3608e662290a215f6529ea": "292000000000000000000", + "0x1765361c2ec2f83616ce8363aae21025f2566f40": "5000000000000000000000", + "0xb6e6c3222b6b6f9be2875d2a89f127fb64100fe2": "8008000000000000000000", + "0x01bbc14f67af0639aab1441e6a08d4ce7162090f": "1309500000000000000000", + "0xaf2058c7282cf67c8c3cf930133c89617ce75d29": "6920000000000000000000", + "0x464d9c89cce484df000277198ed8075fa63572d1": "20000000000000000000", + "0x50cd97e9378b5cf18f173963236c9951ef7438a5": "1400000000000000000000", + "0xcb47bd30cfa8ec5468aaa6a94642ced9c819c8d4": "4000000000000000000000", + "0x6b10f8f8b3e3b60de90aa12d155f9ff5ffb22c50": "2000000000000000000000", + "0x09b7a988d13ff89186736f03fdf46175b53d16e0": "6000000000000000000000", + "0x5bfafe97b1dd1d712be86d41df79895345875a87": "500000000000000000000", + "0xa06cd1f396396c0a64464651d7c205efaf387ca3": "1999944000000000000000", + "0xfc0096b21e95acb8d619d176a4a1d8d529badbef": "384601000000000000000", + "0xa74444f90fbb54e56f3ac9b6cfccaa4819e4614a": "20000000000000000000", + "0x3c15b3511df6f0342e7348cc89af39a168b7730f": "1000000000000000000000", + "0x3d6ff82c9377059fb30d9215723f60c775c891fe": "250066000000000000000", + "0xa524a8cccc49518d170a328270a2f88133fbaf5d": "294500000000000000000", + "0x8a7a06be199a3a58019d846ac9cbd4d95dd757de": "3000200000000000000000", + "0xd744ac7e5310be696a63b003c40bd039370561c6": "1670000000000000000000", + "0xfe362688845fa244cc807e4b1130eb3741a8051e": "1000000000000000000000", + "0xb2d0360515f17daba90fcbac8205d569b915d6ac": "6000000000000000000000", + "0xc53594c7cfb2a08f284cc9d7a63bbdfc0b319732": "49200000000000000000000", + "0xb3c228731d186d2ded5b5fbe004c666c8e469b86": "29000000000000000000", + "0x63e414603e80d4e5a0f5c18774204642258208e4": "5000000000000000000000", + "0x826ce5790532e0548c6102a30d3eac836bd6388f": "18000000000000000000000", + "0xc5e812f76f15f2e1f2f9bc4823483c8804636f67": "73000000000000000000", + "0x116fef5e601642c918cb89160fc2293ba71da936": "802200000000000000000", + "0x08b84536b74c8c01543da88b84d78bb95747d822": "200000000000000000000", + "0x04a80afad53ef1f84165cfd852b0fdf1b1c24ba8": "58000000000000000000", + "0x2b0362633614bfcb583569438ecc4ea57b1d337e": "20000000000000000000000", + "0xe95179527deca5916ca9a38f215c1e9ce737b4c9": "10000000000000000000000", + "0x2c5df866666a194b26cebb407e4a1fd73e208d5e": "1000000000000000000000", + "0x529e824fa072582b4032683ac7eecc1c04b4cac1": "2000000000000000000000", + "0x78634371e17304cbf339b1452a4ce438dc764cce": "10000000000000000000000", + "0xe172dfc8f80cd1f8cd8539dc26082014f5a8e3e8": "3000000000000000000000", + "0xb07618328a901307a1b7a0d058fcd5786e9e72fe": "30239500000000000000000", + "0xb0571153db1c4ed7acaefe13ecdfdb72e7e4f06a": "80520000000000000000000", + "0xad910a23d6850613654af786337ad2a70868ac6d": "1999800000000000000000", + "0x4da5edc688b0cb62e1403d1700d9dcb99ffe3fd3": "2000000000000000000000", + "0xbe2471a67f6047918772d0e36839255ed9d691ae": "4000000000000000000000", + "0x28868324337e11ba106cb481da962f3a8453808d": "2000000000000000000000", + "0xd8f94579496725b5cb53d7985c989749aff849c0": "17000000000000000000000", + "0x4981c5ff66cc4e9680251fc4cd2ff907cb327865": "750000000000000000000", + "0xfd2872d19e57853cfa16effe93d0b1d47b4f93fb": "4000000000000000000000", + "0x63c8dfde0b8e01dadc2e748c824cc0369df090b3": "3880000000000000000000", + "0xc4dd048bfb840e2bc85cb53fcb75abc443c7e90f": "3716000000000000000000", + "0xf579714a45eb8f52c3d57bbdefd2c15b2e2f11df": "1560000000000000000000", + "0xcc7b0481cc32e6faef2386a07022bcb6d2c3b4fc": "3160000000000000000000", + "0xa0aa5f0201f04d3bbeb898132f7c11679466d901": "36600000000000000000", + "0xf3df63a97199933330383b3ed7570b96c4812334": "2000000000000000000000", + "0x42732d8ef49ffda04b19780fd3c18469fb374106": "425068000000000000000", + "0x6f92d6e4548c78996509ee684b2ee29ba3c532b4": "1000000000000000000000", + "0xfff4bad596633479a2a29f9a8b3f78eefd07e6ee": "100000000000000000000", + "0xac4460a76e6db2b9fcd152d9c7718d9ac6ed8c6f": "200000000000000000000", + "0x553b6b1c57050e88cf0c31067b8d4cd1ff80cb09": "400000000000000000000", + "0x84b6b6adbe2f5b3e2d682c66af1bc4905340c3ed": "619333000000000000000", + "0x9f4a7195ac7c151ca258cafda0cab083e049c602": "1537100000000000000000", + "0x2955c357fd8f75d5159a3dfa69c5b87a359dea8c": "2000000000000000000000", + "0x11d7844a471ef89a8d877555583ceebd1439ea26": "10098000000000000000000", + "0x34b454416e9fb4274e6addf853428a0198d62ee1": "407000000000000000000", + "0x308dd21cebe755126704b48c0f0dc234c60ba9b1": "200000000000000000000", + "0x381db4c8465df446a4ce15bf81d47e2f17c980bf": "32000000000000000000000", + "0x1abc4e253b080aeb437984ab05bca0979aa43e1c": "1000000000000000000000", + "0x53e35b12231f19c3fd774c88fec8cbeedf1408b2": "512000000000000000000", + "0x69e2e2e704307ccc5b5ca3f164fece2ea7b2e512": "7000000000000000000000", + "0x1914f1eb95d1277e93b6e61b668b7d77f13a11a1": "970000000000000000000", + "0x50e13023bd9ca96ad4c53fdfd410cb6b1f420bdf": "200000000000000000000", + "0x46224f32f4ece5c8867090d4409d55e50b18432d": "6000000000000000000000", + "0xff83855051ee8ffb70b4817dba3211ed2355869d": "400000000000000000000", + "0xfb39189af876e762c71d6c3e741893df226cedd6": "4000000000000000000000", + "0x9875623495a46cdbf259530ff838a1799ec38991": "2000000000000000000000", + "0xe1b39b88d9900dbc4a6cdc481e1060080a8aec3c": "2000000000000000000000", + "0x5baf6d749620803e8348af3710e5c4fbf20fc894": "5003680000000000000000", + "0x9c54e4ed479a856829c6bb42da9f0b692a75f728": "7520000000000000000000", + "0x486a6c8583a84484e3df43a123837f8c7e2317d0": "323378000000000000000", + "0xd235d15cb5eceebb61299e0e827fa82748911d89": "4000000000000000000000", + "0x47d792a756779aedf1343e8883a6619c6c281184": "2000000000000000000000", + "0x70c213488a020c3cfb39014ef5ba6404724bcaa3": "1940000000000000000000", + "0x133c490fa5bf7f372888e607d958fab7f955bae1": "1580000000000000000000", + "0xa9e194661aac704ee9dea043974e9692ded84a5d": "482400000000000000000", + "0xbc6b58364bf7f1951c309e0cba0595201cd73f9a": "1812400000000000000000", + "0x2309d34091445b3232590bd70f4f10025b2c9509": "10000000000000000000000", + "0xd89bc271b27ba3ab6962c94a559006ae38d5f56a": "2000000000000000000000", + "0xff0e2fec304207467e1e3307f64cbf30af8fd9cd": "2000000000000000000000", + "0xc0b0b7a8a6e1acdd05e47f94c09688aa16c7ad8d": "64234000000000000000", + "0xb66f92124b5e63035859e390628869dbdea9485e": "9850000000000000000000", + "0xa9e6e25e656b762558619f147a21985b8874edfe": "2000000000000000000000", + "0xa43e1947a9242b355561c30a829dfeeca2815af8": "3878255000000000000000", + "0x8b20ad3b94656dbdc0dd21a393d8a7d9e02138cb": "3000000000000000000000", + "0xaca2a838330b17302da731d30db48a04f0f207c1": "1337000000000000000000", + "0xfa60868aafd4ff4c5c57914b8ed58b425773dfa9": "8557400000000000000000", + "0x1848003c25bfd4aa90e7fcb5d7b16bcd0cffc0d8": "1000000000000000000000", + "0xb4b185d943ee2b58631e33dff5af6854c17993ac": "1000000000000000000000", + "0x7719888795ad745924c75760ddb1827dffd8cda8": "1999980000000000000000", + "0xccd521132d986cb96869842622a7dda26c3ed057": "2000000000000000000000", + "0x253e32b74ea4490ab92606fda0aa257bf23dcb8b": "10000000000000000000000", + "0x3712367e5e55a96d5a19168f6eb2bc7e9971f869": "1000000000000000000000", + "0x8f29a14a845ad458f2d108b568d813166bcdf477": "10000000000000000000000", + "0x51a8c2163602a32ee24cf4aa97fd9ea414516941": "62904000000000000000", + "0x61cea71fa464d62a07063f920b0cc917539733d8": "1670000000000000000000", + "0x6f81f3abb1f933b1df396b8e9cc723a89b7c9806": "280000000000000000000", + "0x61b1b8c012cd4c78f698e470f90256e6a30f48dd": "200000000000000000000", + "0x4f3f2c673069ac97c2023607152981f5cd6063a0": "600000000000000000000", + "0xe2efa5fca79538ce6068bf31d2c516d4d53c08e5": "131200000000000000000", + "0x2383c222e67e969190d3219ef14da37850e26c55": "2000000000000000000000", + "0xeac3af5784927fe9a598fc4eec38b8102f37bc58": "1000000000000000000000", + "0x4fe56ab3bae1b0a44433458333c4b05a248f8241": "2180000000000000000000", + "0xfe9cfc3bb293ddb285e625f3582f74a6b0a5a6cd": "1970000000000000000000", + "0xf48e1f13f6af4d84b371d7de4b273d03a263278e": "600000000000000000000", + "0x1ba9228d388727f389150ea03b73c82de8eb2e09": "7258000000000000000000", + "0x37a7a6ff4ea3d60ec307ca516a48d3053bb79cbb": "2000000000000000000000", + "0xe33840d8bca7da98a6f3d096d83de78b70b71ef8": "2000000000000000000000", + "0x8e7fd23848f4db07906a7d10c04b21803bb08227": "1000000000000000000000", + "0x07d4334ec385e8aa54eedaeadb30022f0cdfa4ab": "2629946000000000000000", + "0xd4b085fb086f3d0d68bf12926b1cc3142cae8770": "3700000000000000000000", + "0x5a87f034e6f68f4e74ffe60c64819436036cf7d7": "20000000000000000000", + "0xc00ab080b643e1c2bae363e0d195de2efffc1c44": "500000000000000000000", + "0x22f3c779dd79023ea92a78b65c1a1780f62d5c4a": "1970000000000000000000", + "0xc7d5c7054081e918ec687b5ab36e973d18132935": "182000000000000000000", + "0x9662ee021926682b31c5f200ce457abea76c6ce9": "670500000000000000000", + "0x116a09df66cb150e97578e297fb06e13040c893c": "2000000000000000000000", + "0xb7240af2af90b33c08ae9764103e35dce3638428": "8464547000000000000000", + "0xe8b28acda971725769db8f563d28666d41ddab6c": "10000000000000000000000", + "0x17d4918dfac15d77c47f9ed400a850190d64f151": "2000000000000000000000", + "0xc42250b0fe42e6b7dcd5c890a6f0c88f5f5fb574": "149800000000000000000", + "0x5da2a9a4c2c0a4a924cbe0a53ab9d0c627a1cfa0": "733202000000000000000", + "0x5869fb867d71f1387f863b698d09fdfb87c49b5c": "3666000000000000000000", + "0xd49a75bb933fca1fca9aa1303a64b6cb44ea30e1": "10000000000000000000000", + "0x76331e30796ce664b2700e0d4153700edc869777": "2000000000000000000000", + "0x8a5fb75793d043f1bcd43885e037bd30a528c927": "356500000000000000000", + "0xfc0ee6f7c2b3714ae9916c45566605b656f32441": "1760000000000000000000", + "0xbf50ce2e264b9fe2b06830617aedf502b2351b45": "1000000000000000000000", + "0x0f6000de1578619320aba5e392706b131fb1de6f": "499986000000000000000", + "0xc953f934c0eb2d0f144bdab00483fd8194865ce7": "2000000000000000000000", + "0x24fd9a6c874c2fab3ff36e9afbf8ce0d32c7de92": "1337000000000000000000", + "0xc6cd68ec35362c5ad84c82ad4edc232125912d99": "27750000000000000000000", + "0x2a67660a1368efcd626ef36b2b1b601980941c05": "133700000000000000000", + "0x9deb39027af877992b89f2ec4a1f822ecdf12693": "2000000000000000000000", + "0xc12f881fa112b8199ecbc73ec4185790e614a20f": "2000000000000000000000", + "0xd58a52e078a805596b0d56ea4ae1335af01c66eb": "267400000000000000000", + "0x4d7cfaa84cb33106800a8c802fb8aa463896c599": "1790000000000000000000", + "0x0ee391f03c765b11d69026fd1ab35395dc3802a0": "200000000000000000000", + "0xa192f06ab052d5fd7f94eea8318e827815fe677a": "131400000000000000000", + "0x8f0ab894bd3f4e697dbcfb859d497a9ba195994a": "39501652000000000000000", + "0x387eeafd6b4009deaf8bd5b85a72983a8dcc3487": "4000000000000000000000", + "0x03b0f17cd4469ddccfb7da697e82a91a5f9e7774": "20000000000000000000", + "0x11172b278ddd44eea2fdf4cb1d16962391c453d9": "935900000000000000000000", + "0x33d172ab075c51db1cd40a8ca8dbff0d93b843bb": "5727139000000000000000", + "0x909b5e763a39dcc795223d73a1dbb7d94ca75ac8": "2000000000000000000000", + "0x0ca12ab0b9666cf0cec6671a15292f2653476ab2": "210000600000000000000000", + "0x6b5ae7bf78ec75e90cb503c778ccd3b24b4f1aaf": "800000000000000000000", + "0xd9e3857efd1e202a441770a777a49dcc45e2e0d3": "223500000000000000000", + "0xd703c6a4f11d60194579d58c2766a7ef16c30a29": "2000000000000000000000", + "0x838bd565f99fde48053f7917fe333cf84ad548ab": "200000000000000000000", + "0x8168edce7f2961cf295b9fcd5a45c06cdeda6ef5": "200000000000000000000", + "0xde50868eb7e3c71937ec73fa89dd8b9ee10d45aa": "1000000000000000000000", + "0x087498c0464668f31150f4d3c4bcdda5221ba102": "20000000000000000000", + "0x613fab44b16bbe554d44afd178ab1d02f37aeaa5": "2000000000000000000000", + "0xe2ee691f237ee6529b6557f2fcdd3dcf0c59ec63": "5450048000000000000000", + "0xa9ed377b7d6ec25971c1a597a3b0f3bead57c98f": "400000000000000000000", + "0x175feeea2aa4e0efda12e1588d2f483290ede81a": "200000000000000000000", + "0xb51ddcb4dd4e8ae6be336dd9654971d9fec86b41": "421133000000000000000", + "0x92c0f573eccf62c54810ee6ba8d1f113542b301b": "3384000000000000000000", + "0xa109e18bb0a39c9ef82fa19597fc5ed8e9eb6d58": "1640000000000000000000", + "0xf74e6e145382b4db821fe0f2d98388f45609c69f": "100000000000000000000", + "0x378f37243f3ff0bef5e1dc85eb4308d9340c29f9": "2000200000000000000000", + "0x84e9949680bece6841b9a7e5250d08acd87d16cd": "200000000000000000000", + "0x882bd3a2e9d74110b24961c53777f22f1f46dc5d": "13370000000000000000000", + "0xacce01e0a70610dc70bb91e9926fa9957f372fba": "537000000000000000000", + "0xc5f687717246da8a200d20e5e9bcac60b67f3861": "28650000000000000000", + "0xe14617f6022501e97e7b3e2d8836aa61f0ff2dba": "200000000000000000000", + "0x076ee99d3548623a03b5f99859d2d785a1778d48": "200000000000000000000", + "0x2c424ee47f583cdce07ae318b6fad462381d4d2b": "4000000000000000000000", + "0xf98250730c4c61c57f129835f2680894794542f3": "4000000000000000000000", + "0xed1b24b6912d51b334ac0de6e771c7c0454695ea": "40000000000000000000", + "0xffd5170fd1a8118d558e7511e364b24906c4f6b3": "60085000000000000000", + "0xbf49c14898316567d8b709c2e50594b366c6d38c": "733202000000000000000", + "0x65ea26eabbe2f64ccccfe06829c25d4637520225": "700000000000000000000", + "0x5c5419565c3aad4e714e0739328e3521c98f05cc": "528000000000000000000", + "0xc53b50fd3b2b72bc6c430baf194a515585d3986d": "20000000000000000000", + "0x2b74c373d04bfb0fd60a18a01a88fbe84770e58c": "40000000000000000000", + "0xd97f4526dea9b163f8e8e33a6bcf92fb907de6ec": "284000000000000000000", + "0xa4a49f0bc8688cc9e6dc04e1e08d521026e65574": "200000000000000000000", + "0x575c00c2818210c28555a0ff29010289d3f82309": "10000000000000000000000", + "0x3f1233714f204de9de4ee96d073b368d8197989f": "38606000000000000000", + "0xf964d98d281730ba35b2e3a314796e7b42fedf67": "1543800000000000000000", + "0x1deec01abe5c0d952de9106c3dc30639d85005d6": "2000000000000000000000", + "0x12d60d65b7d9fc48840be5f891c745ce76ee501e": "21359400000000000000000", + "0x5c6136e218de0a61a137b2b3962d2a6112b809d7": "294273000000000000000", + "0xcd43258b7392a930839a51b2ef8ad23412f75a9f": "2000000000000000000000", + "0xdb3f258ab2a3c2cf339c4499f75a4bd1d3472e9e": "1500000000000000000000", + "0x0edd4b580ff10fe06c4a03116239ef96622bae35": "197000000000000000000", + "0x1d157c5876c5cad553c912caf6ce2d5277e05c73": "2000000000000000000000", + "0xcda1b886e3a795c9ba77914e0a2fe5676f0f5ccf": "106024000000000000000", + "0xf50cbafd397edd556c0678988cb2af5c2617e0a2": "716000000000000000000", + "0x327bb49e754f6fb4f733c6e06f3989b4f65d4bee": "20000000000000000000", + "0xc44bdec8c36c5c68baa2ddf1d431693229726c43": "100000000000000000000000", + "0x34e2849bea583ab0cc37975190f322b395055582": "7780340000000000000000", + "0x9221c9ce01232665741096ac07235903ad1fe2fc": "126489000000000000000", + "0xff3ded7a40d3aff0d7a8c45fa6136aa0433db457": "1999800000000000000000", + "0x10b5b34d1248fcf017f8c8ffc408ce899ceef92f": "267400000000000000000", + "0xf1a1f320407964fd3c8f2e2cc8a4580da94f01ea": "2000040000000000000000", + "0x6c800d4b49ba07250460f993b8cbe00b266a2553": "492500000000000000000", + "0xf827d56ed2d32720d4abf103d6d0ef4d3bcd559b": "26265000000000000000", + "0xffb9c7217e66743031eb377af65c77db7359dcda": "40000000000000000000", + "0x530319db0a8f93e5bb7d4dbf4816314fbed8361b": "2000000000000000000000", + "0x9c28a2c4086091cb5da226a657ce3248e8ea7b6f": "280000000000000000000", + "0xdb23a6fef1af7b581e772cf91882deb2516fc0a7": "200000000000000000000", + "0x6636d7ac637a48f61d38b14cfd4865d36d142805": "500000000000000000000", + "0xb3c260609b9df4095e6c5dff398eeb5e2df49985": "254030000000000000000", + "0x58e5c9e344c806650dacfc904d33edba5107b0de": "19100000000000000000", + "0x4f67396d2553f998785f704e07a639197dd1948d": "300080000000000000000", + "0x510d8159cc945768c7450790ba073ec0d9f89e30": "2560000000000000000000", + "0x593c48935beaff0fde19b04d309cd530a28e52ce": "4000000000000000000000", + "0xc27f4e08099d8cf39ee11601838ef9fc06d7fc41": "1790000000000000000000", + "0x07723e3c30e8b731ee456a291ee0e798b0204a77": "2000000000000000000000", + "0x0a652e2a8b77bd97a790d0e91361c98890dbb04e": "1000000000000000000000", + "0x671015b97670b10d5e583f3d62a61c1c79c5143f": "400000000000000000000", + "0x7cc24a6a958c20c7d1249660f7586226950b0d9a": "1970000000000000000000", + "0x6ef9e8c9b6217d56769af97dbb1c8e1b8be799d2": "182000000000000000000", + "0x5c4368918ace6409c79eca80cdaae4391d2b624e": "4000000000000000000000", + "0x043707071e2ae21eed977891dc79cd5d8ee1c2da": "2000000000000000000000", + "0x39bfd978689bec048fc776aa15247f5e1d7c39a2": "20000000000000000000000", + "0x05915d4e225a668162aee7d6c25fcfc6ed18db03": "66348000000000000000", + "0x3f551ba93cd54693c183fb9ad60d65e1609673c9": "2000000000000000000000", + "0xa8c0b02faf02cb5519dda884de7bbc8c88a2da81": "16700000000000000000", + "0xbd0c5cd799ebc48642ef97d74e8e429064fee492": "326000000000000000000", + "0x0a931b449ea8f12cdbd5e2c8cc76bad2c27c0639": "23031000000000000000", + "0x2ea5fee63f337a376e4b918ea82148f94d48a626": "1864242000000000000000", + "0xcc6c2df00e86eca40f21ffda1a67a1690f477c65": "3160000000000000000000", + "0xe5e37e19408f2cfbec83349dd48153a4a795a08f": "4200000000000000000000", + "0xf555a27bb1e2fd4e2cc784caee92939fc06e2fc9": "2000000000000000000000", + "0xdcf9719be87c6f46756db4891db9b611d2469c50": "1000000000000000000000", + "0x8e2f9034c9254719c38e50c9aa64305ed696df1e": "4728000000000000000000", + "0xa01f12d70f44aa7b113b285c22dcdb45873454a7": "18200000000000000000", + "0xbce40475d345b0712dee703d87cd7657fc7f3b62": "7750000000000000000000", + "0xbb19bf91cbad74cceb5f811db27e411bc2ea0656": "17600000000000000000", + "0xacc062702c59615d3444ef6214b8862b009a02ed": "1499936000000000000000", + "0x449ac4fbe383e36738855e364a57f471b2bfa131": "197000000000000000000000", + "0xad59a78eb9a74a7fbdaefafa82eada8475f07f95": "500000000000000000000", + "0x6b6577f3909a4d6de0f411522d4570386400345c": "1880000000000000000000", + "0x79bf2f7b6e328aaf26e0bb093fa22da29ef2f471": "1790000000000000000000", + "0x940f715140509ffabf974546fab39022a41952d2": "1400000000000000000000", + "0x1d572edd2d87ca271a6714c15a3b37761dcca005": "127674000000000000000", + "0xd78ecd25adc86bc2051d96f65364866b42a426b7": "3877300000000000000000", + "0xf9729d48282c9e87166d5eef2d01eda9dbf78821": "99981000000000000000", + "0x17762560e82a93b3f522e0e524adb8612c3a7470": "1000000000000000000000", + "0xd500e4d1c9824ba9f5b635cfa3a8c2c38bbd4ced": "400000000000000000000", + "0xa11effab6cf0f5972cffe4d56596e98968144a8f": "1670000000000000000000", + "0xf64ecf2117931c6d535a311e4ffeaef9d49405b8": "2674000000000000000000", + "0x229cc4711b62755ea296445ac3b77fc633821cf2": "39481000000000000000", + "0xfc989cb487bf1a7d17e4c1b7c4b7aafdda6b0a8d": "20000000000000000000", + "0xea8527febfa1ade29e26419329d393b940bbb7dc": "1999944000000000000000", + "0xbce13e22322acfb355cd21fd0df60cf93add26c6": "200000000000000000000", + "0x19ff244fcfe3d4fa2f4fd99f87e55bb315b81eb6": "200000000000000000000", + "0xd2581a55ce23ab10d8ad8c44378f59079bd6f658": "8800000000000000000000", + "0x4073fa49b87117cb908cf1ab512da754a932d477": "1970000000000000000000", + "0xb6a82933c9eadabd981e5d6d60a6818ff806e36b": "400000000000000000000", + "0xc79806032bc7d828f19ac6a640c68e3d820fa442": "20000000000000000000", + "0x577b2d073c590c50306f5b1195a4b2ba9ecda625": "373600000000000000000", + "0x7f13d760498d7193ca6859bc95c901386423d76c": "5000000000000000000000", + "0x416784af609630b070d49a8bcd12235c6428a408": "20000000000000000000000", + "0xfbe71622bcbd31c1a36976e7e5f670c07ffe16de": "400000000000000000000", + "0xa5698035391e67a49013c0002079593114feb353": "240000000000000000000", + "0xab2871e507c7be3965498e8fb462025a1a1c4264": "775000000000000000000", + "0x9c78fbb4df769ce2c156920cfedfda033a0e254a": "1970000000000000000000", + "0x95e6f93dac228bc7585a25735ac2d076cc3a4017": "6000000000000000000000", + "0x3c1f91f301f4b565bca24751aa1f761322709ddd": "1790000000000000000000", + "0xf77f9587ff7a2d7295f1f571c886bd33926a527c": "1999800000000000000000", + "0x755f587e5efff773a220726a13d0f2130d9f896b": "1000000000000000000000", + "0x8c6aa882ee322ca848578c06cb0fa911d3608305": "600000000000000000000", + "0x492cb5f861b187f9df21cd4485bed90b50ffe22d": "499928000000000000000", + "0x95a577dc2eb3ae6cb9dfc77af697d7efdfe89a01": "136000000000000000000", + "0x4173419d5c9f6329551dc4d3d0ceac1b701b869e": "88000000000000000000", + "0x456ae0aca48ebcfae166060250525f63965e760f": "300000000000000000000", + "0x81f8de2c283d5fd4afbda85dedf9760eabbbb572": "3000000000000000000000", + "0xcd0af3474e22f069ec3407870dd770443d5b12b0": "2626262000000000000000", + "0x283c2314283c92d4b064f0aef9bb5246a7007f39": "200000000000000000000", + "0x29b3f561ee7a6e25941e98a5325b78adc79785f3": "100000000000000000000", + "0xcd4306d7f6947ac1744d4e13b8ef32cb657e1c00": "499986000000000000000", + "0xd9ec2efe99ff5cf00d03a8317b92a24aef441f7e": "2000000000000000000000", + "0x83dbf8a12853b40ac61996f8bf1dc8fdbaddd329": "970000000000000000000", + "0x9d93fab6e22845f8f45a07496f11de71530debc7": "1998000000000000000000", + "0xfd204f4f4aba2525ba728afdf78792cbdeb735ae": "2000000000000000000000", + "0x99fad50038d0d9d4c3fbb4bce05606ecadcd5121": "2000000000000000000000", + "0xd206aaddb336d45e7972e93cb075471d15897b5d": "600000000000000000000", + "0x428a1ee0ed331d7952ccbe1c7974b2852bd1938a": "2208370000000000000000", + "0x690228e4bb12a8d4b5e0a797b0c5cf2a7509131e": "1880000000000000000000", + "0xfa3a1aa4488b351aa7560cf5ee630a2fd45c3222": "878850000000000000000", + "0x0372e852582e0934344a0fed2178304df25d4628": "20000000000000000000000", + "0x35ea2163a38cdf9a123f82a5ec00258dae0bc767": "4000000000000000000000", + "0xd1fed0aee6f5dfd7e25769254c3cfad15adeccaa": "730000000000000000000", + "0xc05b740620f173f16e52471dc38b9c514a0b1526": "140000000000000000000", + "0x87e3062b2321e9dfb0875ce3849c9b2e3522d50a": "10000000000000000000000", + "0x303fbaebbe46b35b6e5b74946a5f99bc1585cae7": "878148000000000000000", + "0xe7a8e471eafb798f4554cc6e526730fd56e62c7d": "1000000000000000000000", + "0xad7dd053859edff1cb6f9d2acbed6dd5e332426f": "1970000000000000000000", + "0xdc4345d6812e870ae90c568c67d2c567cfb4f03c": "6700000000000000000000", + "0xa6a08252c8595177cc2e60fc27593e2379c81fb1": "20055000000000000000", + "0xa9af21acbe482f8131896a228036ba51b19453c3": "49999000000000000000", + "0x86e3fe86e93da486b14266eadf056cbfa4d91443": "2000000000000000000000", + "0x744b03bba8582ae5498e2dc22d19949467ab53fc": "500000000000000000000", + "0xd3118ea3c83505a9d893bb67e2de142d537a3ee7": "20000000000000000000", + "0xb32f1c2689a5ce79f1bc970b31584f1bcf2283e7": "20000000000000000000", + "0x4828e4cbe34e1510afb72c2beeac8a4513eaebd9": "3940000000000000000000", + "0xb07bcc085ab3f729f24400416837b69936ba8873": "2000140000000000000000", + "0xbdc74873af922b9df474853b0fa7ff0bf8c82695": "3999000000000000000000", + "0x15ebd1c7cad2aff19275c657c4d808d010efa0f5": "200550000000000000000", + "0xcbc04b4d8b82caf670996f160c362940d66fcf1a": "6000000000000000000000", + "0x8197948121732e63d9c148194ecad46e30b749c8": "4000000000000000000000", + "0x69797bfb12c9bed682b91fbc593591d5e4023728": "10000000000000000000000", + "0xbe9b8c34b78ee947ff81472eda7af9d204bc8466": "150000000000000000000", + "0xdf3f57b8ee6434d047223def74b20f63f9e4f955": "250500000000000000000", + "0xa3ae1879007d801cb5f352716a4dd8ba2721de3d": "200000000000000000000000", + "0xcb4bb1c623ba28dc42bdaaa6e74e1d2aa1256c2a": "1999944000000000000000", + "0xe03c00d00388ecbf4f263d0ac778bb41a57a40d9": "1000072000000000000000", + "0xfc2c1f88961d019c3e9ea33009152e0693fbf88a": "8000000000000000000000", + "0x8599cbd5a6a9dcd4b966be387d69775da5e33c6f": "58180000000000000000000", + "0xb7a31a7c38f3db09322eae11d2272141ea229902": "2000000000000000000000", + "0x231a15acc199c89fa9cb22441cc70330bdcce617": "500000000000000000000", + "0x3fbed6e7e0ca9c84fbe9ebcf9d4ef9bb49428165": "2000000000000000000000", + "0x92cfd60188efdfb2f8c2e7b1698abb9526c1511f": "2000000000000000000000", + "0x5c936f3b9d22c403db5e730ff177d74eef42dbbf": "75000000000000000000", + "0x931fe712f64207a2fd5022728843548bfb8cbb05": "2000000000000000000000", + "0x08d54e83ad486a934cfaeae283a33efd227c0e99": "1039000000000000000000", + "0xa339a3d8ca280e27d2415b26d1fc793228b66043": "1013600000000000000000", + "0x581f34b523e5b41c09c87c298e299cbc0e29d066": "1131607000000000000000", + "0xcaaa68ee6cdf0d34454a769b0da148a1faaa1865": "7216000000000000000000", + "0x0838a7768d9c2aca8ba279adfee4b1f491e326f1": "200000000000000000000", + "0xdde77a4740ba08e7f73fbe3a1674912931742eeb": "19867021000000000000000", + "0xcbe810fe0fecc964474a1db97728bc87e973fcbd": "10000000000000000000000", + "0x86c28b5678af37d727ec05e4447790f15f71f2ea": "200000000000000000000", + "0xdd6c062193eac23d2fdbf997d5063a346bb3b470": "20000000000000000000", + "0x5975b9528f23af1f0e2ec08ac8ebaa786a2cb8e0": "345827000000000000000", + "0xe29d8ae452dcf3b6ac645e630409385551faae0a": "80276000000000000000", + "0x2fbc85798a583598b522166d6e9dda121d627dbc": "200000000000000000000", + "0x7a36aba5c31ea0ca7e277baa32ec46ce93cf7506": "20000000000000000000000", + "0xdbcbcd7a57ea9db2349b878af34b1ad642a7f1d1": "200000000000000000000", + "0x92aae59768eddff83cfe60bb512e730a05a161d7": "1708015000000000000000", + "0xa5e93b49ea7c509de7c44d6cfeddef5910deaaf2": "2000000000000000000000", + "0xe33d980220fab259af6a1f4b38cf0ef3c6e2ea1a": "2000000000000000000000", + "0x8ed0af11ff2870da0681004afe18b013f7bd3882": "4000000000000000000000", + "0xf23e5c633221a8f7363e65870c9f287424d2a960": "1380000000000000000000", + "0x96334bfe04fffa590213eab36514f338b864b736": "400000000000000000000", + "0xfa1f1971a775c3504fef5079f640c2c4bce7ac05": "2000000000000000000000", + "0xdf44c47fc303ac76e74f97194cca67b5bb3c023f": "591000000000000000000", + "0x4b74f5e58e2edf76daf70151964a0b8f1de0663c": "324020000000000000000", + "0xe38b91b35190b6d9deed021c30af094b953fdcaa": "33340000000000000000", + "0x6b38de841fad7f53fe02da115bd86aaf662466bd": "1730000000000000000000", + "0x11675a25554607a3b6c92a9ee8f36f75edd3e336": "159800000000000000000", + "0x0ba8705bf55cf219c0956b5e3fc01c4474a6cdc1": "94963000000000000000", + "0x0f05f120c89e9fbc93d4ab0c5e2b4a0df092b424": "30000000000000000000000", + "0xfdd1195f797d4f35717d15e6f9810a9a3ff55460": "18200000000000000000", + "0x63a61dc30a8e3b30a763c4213c801cbf98738178": "1000000000000000000000", + "0xe5bdf34f4ccc483e4ca530cc7cf2bb18febe92b3": "126260000000000000000", + "0xd6e09e98fe1300332104c1ca34fbfac554364ed9": "2000000000000000000000", + "0x5bd6862d517d4de4559d4eec0a06cad05e2f946e": "200000000000000000000", + "0x7294ec9da310bc6b4bbdf543b0ef45abfc3e1b4d": "22000000000000000000000", + "0xae34861d342253194ffc6652dfde51ab44cad3fe": "466215000000000000000", + "0xf50ae7fab4cfb5a646ee04ceadf9bf9dd5a8e540": "3999952000000000000000", + "0xdd2bdfa917c1f310e6fa35aa8af16939c233cd7d": "400000000000000000000", + "0xe0060462c47ff9679baef07159cae08c29f274a9": "2000000000000000000000", + "0xb7d12e84a2e4c4a6345af1dd1da9f2504a2a996e": "200000000000000000000", + "0xf5500178cb998f126417831a08c2d7abfff6ab5f": "1308923000000000000000", + "0xfd377a385272900cb436a3bb7962cdffe93f5dad": "2000000000000000000000", + "0xa4a83a0738799b971bf2de708c2ebf911ca79eb2": "600000000000000000000", + "0x52a5e4de4393eeccf0581ac11b52c683c76ea15d": "19999800000000000000000", + "0xb07fdeaff91d4460fe6cd0e8a1b0bd8d22a62e87": "5260000000000000000000", + "0x35f5860149e4bbc04b8ac5b272be55ad1aca58e0": "200000000000000000000", + "0xfb135eb15a8bac72b69915342a60bbc06b7e077c": "20000000000000000000000", + "0x02d4a30968a39e2b3498c3a6a4ed45c1c6646822": "2000000000000000000000", + "0xe44b7264dd836bee8e87970340ed2b9aed8ed0a5": "5772100000000000000000", + "0xe90a354cec04d69e5d96ddc0c5138d3d33150aa0": "499971000000000000000", + "0x693d83be09459ef8390b2e30d7f7c28de4b4284e": "2000000000000000000000", + "0x87bf7cd5d8a929e1c785f9e5449106ac232463c9": "77800000000000000000", + "0xe5f8ef6d970636b0dcaa4f200ffdc9e75af1741c": "2000000000000000000000", + "0xfef09d70243f39ed8cd800bf9651479e8f4aca3c": "200000000000000000000", + "0xe98c91cadd924c92579e11b41217b282956cdaa1": "135800000000000000000", + "0xc2836188d9a29253e0cbda6571b058c289a0bb32": "2000000000000000000000", + "0xafa6946effd5ff53154f82010253df47ae280ccc": "1970000000000000000000", + "0x43c7ebc5b3e7af16f47dc5617ab10e0f39b4afbb": "1910000000000000000000", + "0x097ecda22567c2d91cb03f8c5215c22e9dcda949": "20055000000000000000", + "0x3e66b84769566ab67945d5fa81373556bcc3a1fa": "152000000000000000000", + "0x56373daab46316fd7e1576c61e6affcb6559ddd7": "215340000000000000000", + "0xfaaeba8fc0bbda553ca72e30ef3d732e26e82041": "1338337000000000000000", + "0xf54c19d9ef3873bfd1f7a622d02d86249a328f06": "44284729000000000000000", + "0x825309a7d45d1812f51e6e8df5a7b96f6c908887": "2365000000000000000000", + "0x89009e3c6488bd5e570d1da34eabe28ed024de1b": "20000000000000000000000", + "0x63977cad7d0dcdc52b9ac9f2ffa136e8642882b8": "75000000000000000000", + "0xc239abdfae3e9af5457f52ed2b91fd0ab4d9c700": "2000000000000000000000", + "0x1a4ec6a0ae7f5a9427d23db9724c0d0cffb2ab2f": "179000000000000000000", + "0xa12a6c2d985daf0e4f5f207ae851aaf729b332cd": "100000000000000000000000", + "0xcbe52fc533d7dd608c92a260b37c3f45deb4eb33": "1000000000000000000000", + "0xabb2e6a72a40ba6ed908cdbcec3c5612583132fe": "1460000000000000000000", + "0x6503860b191008c15583bfc88158099301762828": "1000000000000000000000", + "0xa0228240f99e1de9cb32d82c0f2fa9a3d44b0bf3": "1600000000000000000000", + "0xe154daeadb545838cbc6aa0c55751902f528682a": "4925000000000000000000", + "0x8e92aba38e72a098170b92959246537a2e5556c0": "267400000000000000000", + "0xd23d7affacdc3e9f3dae7afcb4006f58f8a44600": "3600000000000000000000", + "0x00d78d89b35f472716eceafebf600527d3a1f969": "27750000000000000000000", + "0x120f9de6e0af7ec02a07c609ca8447f157e6344c": "267400000000000000000", + "0xe0352fdf819ba265f14c06a6315c4ac1fe131b2e": "1000000000000000000000", + "0x8f47328ee03201c9d35ed2b5412b25decc859362": "2000000000000000000000", + "0x453e359a3397944c5a275ab1a2f70a5e5a3f6989": "240000000000000000000", + "0x9bf58efbea0784eb068adecfa0bb215084c73a35": "5800000000000000000000", + "0x21bfe1b45cacde6274fd8608d9a178bf3eeb6edc": "2009400000000000000000", + "0xd1d5b17ffe2d7bbb79cc7d7930bcb2e518fb1bbf": "3000000000000000000000", + "0x20a29c5079e26b3f18318bb2e50e8e8b346e5be8": "499986000000000000000", + "0x7d392852f3abd92ff4bb5bb26cb60874f2be6795": "1000070000000000000000", + "0x55852943492970f8d629a15366cdda06a94f4513": "2000000000000000000000", + "0xab5dfc1ea21adc42cf8c3f6e361e243fd0da61e5": "300000000000000000000", + "0x9d2bfc36106f038250c01801685785b16c86c60d": "380000000000000000000000", + "0x6e60aee1a78f8eda8b424c73e353354ae67c3042": "3490300000000000000000", + "0x7e29290038493559194e946d4e460b96fc38a156": "309072000000000000000", + "0x6006e36d929bf45d8f16231b126a011ae283d925": "176000000000000000000", + "0xd6d03572a45245dbd4368c4f82c95714bd2167e2": "1162200000000000000000", + "0xd1432538e35b7664956ae495a32abdf041a7a21c": "19700000000000000000000", + "0x2276264bec8526c0c0f270677abaf4f0e441e167": "1000000000000000000000", + "0xc8814e34523e38e1f927a7dce8466a447a093603": "10000000000000000000000", + "0x688a569e965524eb1d0ac3d3733eab909fb3d61e": "1320000000000000000000", + "0x90dc09f717fc2a5b69fd60ba08ebf40bf4e8246c": "4000086000000000000000", + "0x239a733e6b855ac592d663156186a8a174d2449e": "1637020000000000000000", + "0xbcdfacb9d9023c3417182e9100e8ea1d373393a3": "59100000000000000000", + "0xba6440aeb3737b8ef0f1af9b0c15f4c214ffc7cf": "1000000000000000000000", + "0x322e5c43b0f524389655a9b3ff24f2d4db3da10f": "4650000000000000000000", + "0xbe5a60689998639ad75bc105a371743eef0f7940": "501700000000000000000", + "0xb727a9fc82e1cffc5c175fa1485a9befa2cdbdd1": "999000000000000000000", + "0xa3883a24f7f166205f1a6a9949076c26a76e7178": "1820000000000000000000", + "0x5e95fe5ffcf998f9f9ac0e9a81dab83ead77003d": "539766000000000000000", + "0xe60955dc0bc156f6c41849f6bd776ba44b0ef0a1": "299982000000000000000", + "0xaf203e229d7e6d419df4378ea98715515f631485": "1970000000000000000000", + "0x86499a1228ff2d7ee307759364506f8e8c8307a5": "1970000000000000000000", + "0x1a04cec420ad432215246d77fe178d339ed0b595": "316000000000000000000", + "0xcc2b5f448f3528d3fe41cc7d1fa9c0dc76f1b776": "60000000000000000000", + "0xcb50587412822304ebcba07dab3a0f09fffee486": "1370000000000000000000", + "0x4ae2a04d3909ef454e544ccfd614bfefa71089ae": "442800000000000000000", + "0xc8a2c4e59e1c7fc54805580438aed3e44afdf00e": "44000000000000000000", + "0x5792814f59a33a1843faa01baa089eb02ffb5cf1": "499986000000000000000", + "0xa1f2854050f872658ed82e52b0ad7bbc1cb921f6": "2010918000000000000000", + "0x92dca5e102b3b81b60f1a504634947c374a88ccb": "2000000000000000000000", + "0x732fead60f7bfdd6a9dec48125e3735db1b6654f": "20000000000000000000", + "0x6bf7b3c065f2c1e7c6eb092ba0d15066f393d1b8": "400000000000000000000", + "0xcde36d81d128c59da145652193eec2bfd96586ef": "4000000000000000000000", + "0x40eddb448d690ed72e05c225d34fc8350fa1e4c5": "7000000000000000000000", + "0x454b61b344c0ef965179238155f277c3829d0b38": "2000000000000000000000", + "0xac3da526cfce88297302f34c49ca520dc271f9b2": "800000000000000000000", + "0xc989eec307e8839b9d7237cfda08822962abe487": "400000000000000000000", + "0xe99de258a4173ce9ac38ede26c0b3bea3c0973d5": "1656800000000000000000", + "0xff0cb06c42e3d88948e45bd7b0d4e291aefeea51": "1910000000000000000000", + "0x0990e81cd785599ea236bd1966cf526302c35b9c": "1000000000000000000000", + "0x6da0ed8f1d69339f059f2a0e02471cb44fb8c3bb": "935900000000000000000", + "0x5d958a9bd189c2985f86c58a8c69a7a78806e8da": "10200000000000000000000", + "0x98be696d51e390ff1c501b8a0f6331b628ddc5ad": "2000000000000000000000", + "0x09d0b8cd077c69d9f32d9cca43b3c208a21ed48b": "150011000000000000000", + "0x96e7c0c9d5bf10821bf140c558a145b7cac21397": "1056000000000000000000", + "0x5b736eb18353629bde9676dadd165034ce5ecc68": "1970000000000000000000", + "0xe5a365343cc4eb1e770368e1f1144a77b832d7e0": "20000000000000000000", + "0x4cf5537b85842f89cfee359eae500fc449d2118f": "1000000000000000000000", + "0xc71f1d75873f33dcb2dd4b3987a12d0791a5ce27": "1015200000000000000000", + "0x9bf703b41c3624e15f4054962390bcba3052f0fd": "6055000000000000000000", + "0x145e1de0147911ccd880875fbbea61f6a142d11d": "4000000000000000000000", + "0x68419c6dd2d3ce6fcbb3c73e2fa079f06051bde6": "1970000000000000000000", + "0xd8eb78503ec31a54a90136781ae109004c743257": "1000000000000000000000", + "0xf25e4c70bc465632c89e5625a832a7722f6bffab": "4488000000000000000000", + "0x7b4d2a38269069c18557770d591d24c5121f5e83": "700000000000000000000", + "0x27d158ac3d3e1109ab6e570e90e85d3892cd7680": "100000000000000000000", + "0xd3679a47df2d99a49b01c98d1c3e0c987ce1e158": "280000000000000000000", + "0x095b949de3333a377d5019d893754a5e4656ff97": "340000000000000000000", + "0x6b17598a8ef54f797ae515ccb6517d1859bf8011": "100000000000000000000", + "0x3eaf0879b5b6db159b589f84578b6a74f6c10357": "7253657000000000000000", + "0x40d45d9d7625d15156c932b771ca7b0527130958": "100000000000000000000000", + "0x0392549a727f81655429cb928b529f25df4d1385": "26248000000000000000", + "0xc5b009baeaf788a276bd35813ad65b400b849f3b": "1000000000000000000000", + "0x6ed884459f809dfa1016e770edaf3e9fef46fa30": "3400170000000000000000", + "0x439d2f2f5110a4d58b1757935015408740fec7f8": "3830421000000000000000", + "0xdc46c13325cd8edf0230d068896486f007bf4ef1": "1337000000000000000000", + "0x8c54c7f8b9896e75d7d5f5c760258699957142ad": "40000000000000000000", + "0x61c8f1fa43bf846999ecf47b2b324dfb6b63fe3a": "800000000000000000000", + "0x935069444a6a984de2084e46692ab99f671fc727": "9000000000000000000000", + "0xfc49c1439a41d6b3cf26bb67e0365224e5e38f5f": "1000076000000000000000", + "0xe1dfb5cc890ee8b2877e885d267c256187d019e6": "100000000000000000000", + "0xee7c3ded7c28f459c92fe13b4d95bafbab02367d": "700000000000000000000", + "0xa5874d754635a762b381a5c4c792483af8f23d1d": "50000000000000000000", + "0xcfbb32b7d024350e3321fa20c9a914035372ffc6": "401100000000000000000", + "0x2bc429d618a66a4cf82dbb2d824e9356effa126a": "1999944000000000000000", + "0xdb244f97d9c44b158a40ed9606d9f7bd38913331": "102000000000000000000", + "0x55e220876262c218af4f56784798c7e55da09e91": "133566000000000000000", + "0xca41ccac30172052d522cd2f2f957d248153409f": "1970000000000000000000", + "0xb11fa7fb270abcdf5a2eab95aa30c4b53636efbf": "800000000000000000000", + "0x0ffea06d7113fb6aec2869f4a9dfb09007facef4": "225416000000000000000", + "0x646628a53c2c4193da88359ce718dadd92b7a48d": "200032000000000000000", + "0xca8409083e01b397cf12928a05b68455ce6201df": "1600000000000000000000", + "0xdbbcbb79bf479a42ad71dbcab77b5adfaa872c58": "1730000000000000000000", + "0xdb7d4037081f6c65f9476b0687d97f1e044d0a1d": "660000000000000000000", + "0x4be90d412129d5a4d0424361d6649d4e47a62316": "1015200000000000000000", + "0xe3ab3ca9b870e3f548517306bba4de2591afafc2": "1200062000000000000000", + "0x5c61ab79b408dd3229f662593705d72f1e147bb8": "22729000000000000000000", + "0x4f177f9d56953ded71a5611f393322c30279895c": "246000000000000000000", + "0xe6cb260b716d4c0ab726eeeb07c8707204e276ae": "1000000000000000000000", + "0x44355253b27748e3f34fe9cae1fb718c8f249529": "200000000000000000000", + "0xa309df54cabce70c95ec3033149cd6678a6fd4cf": "223600000000000000000", + "0xec4867d2175ab5b9469361595546554684cda460": "3000000000000000000000", + "0x8d06e464245cad614939e0af0845e6d730e20374": "200359000000000000000", + "0x9810e34a94db6ed156d0389a0e2b80f4fd6b0a8a": "2000000000000000000000", + "0xdcfff3e8d23c2a34b56bd1b3bd45c79374432239": "5000000000000000000000", + "0x7d7dd5ee614dbb6fbfbcd26305247a058c41faa1": "2000000000000000000000", + "0x8a9eca9c5aba8e139f8003edf1163afb70aa3aa9": "660000000000000000000", + "0xd942de4784f7a48716c0fd4b9d54a6e54c5f2f3e": "20000000000000000000000", + "0x07dae622630d1136381933d2ad6b22b839d82102": "200000000000000000000", + "0xabf12fa19e82f76c718f01bdca0003674523ef30": "2000000000000000000000", + "0x411c831cc6f44f1965ec5757ab4e5b3ca4cffd1f": "425000000000000000000", + "0x99129d5b3c0cde47ea0def4dfc070d1f4a599527": "2000000000000000000000", + "0xc5cdcee0e85d117dabbf536a3f4069bf443f54e7": "1969606000000000000000", + "0xf218bd848ee7f9d38bfdd1c4eb2ed2496ae4305f": "500000000000000000000", + "0xfe549bbfe64740189892932538daaf46d2b61d4f": "40000000000000000000", + "0xdc3f0e7672f71fe7525ba30b9755183a20b9166a": "9603617000000000000000", + "0x0e83b850481ab44d49e0a229a2e464902c69539b": "100000000000000000000", + "0x07ddd0422c86ef65bf0c7fc3452862b1228b08b8": "2065302000000000000000", + "0xa68c313445c22d919ee46cc2d0cdff043a755825": "75189000000000000000", + "0xa9e9dbce7a2cb03694799897bed7c54d155fdaa8": "197559000000000000000", + "0x18fccf62d2c3395453b7587b9e26f5cff9eb7482": "1000000000000000000000", + "0xff41d9e1b4effe18d8b0d1f63fc4255fb4e06c3d": "1337000000000000000000", + "0x8f69eafd0233cadb4059ab779c46edf2a0506e48": "1788210000000000000000", + "0x9aa48c66e4fb4ad099934e32022e827427f277ba": "10000000000000000000000", + "0xf46980e3a4a9d29a6a6e90604537a3114bcb2897": "500000000000000000000", + "0x801732a481c380e57ed62d6c29de998af3fa3b13": "100000000000000000000", + "0x0cd6a141918d126b106d9f2ebf69e102de4d3277": "20000000000000000000", + "0x17589a6c006a54cad70103123aae0a82135fdeb4": "4000000000000000000000", + "0x8725e8c753b3acbfdca55f3c62dfe1a59454968a": "1000090000000000000000", + "0xd20dcb0b78682b94bc3000281448d557a20bfc83": "895000000000000000000", + "0xe84f8076a0f2969ecd333eef8de41042986291f2": "432000000000000000000", + "0xb3145b74506d1a8d047cdcdc55392a7b5350799a": "129314663000000000000000", + "0x0d9a825ff2bcd397cbad5b711d9dcc95f1cc112d": "12800000000000000000000", + "0x0ca670eb2c8b96cba379217f5929c2b892f39ef6": "2000000000000000000000", + "0x25cfc4e25c35c13b69f7e77dbfb08baf58756b8d": "40000000000000000000000", + "0x182db85293f606e88988c3704cb3f0c0bbbfca5a": "133700000000000000000", + "0xbd73c3cbc26a175062ea0320dd84b253bce64358": "394000000000000000000", + "0x2680713d40808e2a50ed013150a2a694b96a7f1d": "1790000000000000000000", + "0x51e32f14f4ca5e287cdac057a7795ea9e0439953": "500000000000000000000", + "0xb1e9c5f1d21e61757a6b2ee75913fc5a1a4101c3": "2000000000000000000000", + "0xd4c4d1a7c3c74984f6857b2f5f07e8face68056d": "2000000000000000000000", + "0x4651dc420e08c3293b27d2497890eb50223ae2f4": "20000000000000000000000", + "0xc74a3995f807de1db01a2eb9c62e97d0548f696f": "1000000000000000000000", + "0x0505a08e22a109015a22f685305354662a5531d5": "2600000000000000000000", + "0x39c773367c8825d3596c686f42bf0d14319e3f84": "133700000000000000000", + "0x0f929cf895db017af79f3ead2216b1bd69c37dc7": "2000000000000000000000", + "0xbdd3254e1b3a6dc6cc2c697d45711aca21d516b2": "2000000000000000000000", + "0xae5d221afcd3d29355f508eadfca408ce33ca903": "100000000000000000000000", + "0x916cf17d71412805f4afc3444a0b8dd1d9339d16": "14300000000000000000", + "0x4319263f75402c0b5325f263be4a5080651087f0": "983086000000000000000", + "0x0f1c249cd962b00fd114a9349f6a6cc778d76c4d": "2000000000000000000000", + "0x54febcce20fe7a9098a755bd90988602a48c089e": "640000000000000000000", + "0x2c1800f35fa02d3eb6ff5b25285f5e4add13b38d": "906400000000000000000", + "0x72b904440e90e720d6ac1c2ad79c321dcc1c1a86": "1550000000000000000000", + "0xb0aa00950c0e81fa3210173e729aaf163a27cd71": "40000000000000000000000", + "0x663604b0503046e624cd26a8b6fb4742dce02a6f": "65400000000000000000", + "0x3c98594bf68b57351e8814ae9e6dfd2d254aa06f": "300000000000000000000", + "0x9c45202a25f6ad0011f115a5a72204f2f2198866": "5014000000000000000000", + "0xb02d062873334545cea29218e4057760590f7423": "3186000000000000000000", + "0x7bddb2ee98de19ee4c91f661ee8e67a91d054b97": "1000000000000000000000", + "0x9cf2928beef09a40f9bfc953be06a251116182fb": "6000000000000000000000", + "0x51b4758e9e1450e7af4268c3c7b1e7bd6f5c7550": "1000000000000000000000", + "0xeb570dba975227b1c42d6e8dea2c56c9ad960670": "2000000000000000000000", + "0x970d8b8a0016d143054f149fb3b8e550dc0797c7": "1000000000000000000000", + "0xc7b39b060451000ca1049ba154bcfa00ff8af262": "100000000000000000000000", + "0x945e18769d7ee727c7013f92de24d117967ff317": "2000000000000000000000", + "0xd18eb9e1d285dabe93e5d4bae76beefe43b521e8": "668500000000000000000", + "0xc618521321abaf5b26513a4a9528086f220adc6f": "27000000000000000000", + "0xdd65f6e17163b5d203641f51cc7b24b00f02c8fb": "200000000000000000000", + "0x131faed12561bb7aee04e5185af802b1c3438d9b": "219000000000000000000", + "0x1ced6715f862b1ff86058201fcce5082b36e62b2": "6684522000000000000000", + "0xa0ff5b4cf016027e8323497d4428d3e5a83b8795": "6596500000000000000000", + "0x02e816afc1b5c0f39852131959d946eb3b07b5ad": "1000000000000000000000", + "0x153cf2842cb9de876c276fa64767d1a8ecf573bb": "2000000000000000000000", + "0x3bc6e3ee7a56ce8f14a37532590f63716b9966e8": "2000000000000000000000", + "0xf6d25d3f3d846d239f525fa8cac97bc43578dbac": "896000000000000000000", + "0x2066774d822793ff25f1760909479cf62491bf88": "55160000000000000000000", + "0x46779a5656ff00d73eac3ad0c38b6c853094fb40": "230752000000000000000", + "0x22eed327f8eb1d1338a3cb7b0f8a4baa5907cd95": "23445000000000000000", + "0xff88ebacc41b3687f39e4b59e159599b80cba33f": "400000000000000000000", + "0x2874f3e2985d5f7b406627e17baa772b01abcc9e": "6014000000000000000000", + "0xeb10458daca79e4a6b24b29a8a8ada711b7f2eb6": "3998000000000000000000", + "0x541060fc58c750c40512f83369c0a63340c122b6": "1970000000000000000000", + "0xfd2757cc3551a095878d97875615fe0c6a32aa8a": "598200000000000000000", + "0xbe659d85e7c34f8833ea7f488de1fbb5d4149bef": "9072500000000000000000", + "0xe149b5726caf6d5eb5bf2acc41d4e2dc328de182": "1940000000000000000000", + "0x2fe0cc424b53a31f0916be08ec81c50bf8eab0c1": "600000000000000000000", + "0xe3712701619ca7623c55db3a0ad30e867db0168b": "20000000000000000000", + "0xf8ca336c8e91bd20e314c20b2dd4608b9c8b9459": "846000000000000000000", + "0x68acdaa9fb17d3c309911a77b05f5391fa034ee9": "8950000000000000000000", + "0xe77d7deab296c8b4fa07ca3be184163d5a6d606c": "92538000000000000000", + "0xe6b9545f7ed086e552924639f9a9edbbd5540b3e": "3760000000000000000000", + "0x2866b81decb02ee70ae250cee5cdc77b59d7b679": "2000000000000000000000", + "0x60e3cc43bcdb026aad759c7066f555bbf2ac66f5": "2000000000000000000000", + "0xfcbd85feea6a754fcf3449449e37ff9784f7773c": "3086000000000000000000", + "0x38a744efa6d5c2137defef8ef9187b649eee1c78": "4000000000000000000000", + "0x9d7655e9f3e5ba5d6e87e412aebe9ee0d49247ee": "2620100000000000000000", + "0x2020b81ae53926ace9f7d7415a050c031d585f20": "341200000000000000000", + "0x4244f1331158b9ce26bbe0b9236b9203ca351434": "10000000000000000000000", + "0x99c236141daec837ece04fdaee1d90cf8bbdc104": "2184000000000000000000", + "0x943d37864a4a537d35c8d99723cd6406ce2562e6": "2000000000000000000000", + "0xd79483f6a8444f2549d611afe02c432d15e11051": "20000000000000000000", + "0x9fd64373f2fbcd9c0faca60547cad62e26d9851f": "1000000000000000000000", + "0xb89c036ed7c492879921be41e10ca1698198a74c": "1820000000000000000000", + "0x7462c89caa9d8d7891b2545def216f7464d5bb21": "109162000000000000000", + "0xbb0366a7cfbd3445a70db7fe5ae34885754fd468": "6160000000000000000000", + "0x6c52cf0895bb35e656161e4dc46ae0e96dd3e62c": "4000086000000000000000", + "0xb9cf71b226583e3a921103a5316f855a65779d1b": "24000000000000000000000", + "0x016b60bb6d67928c29fd0313c666da8f1698d9c5": "2000000000000000000000", + "0x9454b3a8bff9709fd0e190877e6cb6c89974dbd6": "2674000000000000000000", + "0x84aac7fa197ff85c30e03b7a5382b957f41f3afb": "157600000000000000000", + "0xdb6e560c9bc620d4bea3a94d47f7880bf47f2d5f": "89500000000000000000", + "0xeefd05b0e3c417d55b3343060486cdd5e92aa7a6": "1430000000000000000000", + "0x3a59a08246a8206f8d58f70bb1f0d35c5bcc71bd": "185000000000000000000", + "0x9bfff50db36a785555f07652a153b0c42b1b8b76": "2000000000000000000000", + "0xd44f5edf2bcf2433f211dadd0cc450db1b008e14": "267400000000000000000", + "0x2378fd4382511e968ed192106737d324f454b535": "1000000000000000000000", + "0xc94089553ae4c22ca09fbc98f57075cf2ec59504": "4000000000000000000000", + "0x08ef3fa4c43ccdc57b22a4b9b2331a82e53818f2": "4000000000000000000000", + "0xe48e65125421880d42bdf1018ab9778d96928f3f": "4200000000000000000000", + "0x67518e5d02b205180f0463a32004471f753c523e": "1984289000000000000000", + "0x0da7401262384e2e8b4b26dd154799b55145efa0": "300000000000000000000", + "0x0b6920a64b363b8d5d90802494cf564b547c430d": "1200000000000000000000", + "0xa5ab4bd3588f46cb272e56e93deed386ba8b753d": "1332989000000000000000", + "0x1788da9b57fd05edc4ff99e7fef301519c8a0a1e": "2000000000000000000000", + "0x17b2d6cf65c6f4a347ddc6572655354d8a412b29": "2000000000000000000000", + "0xd0319139fbab2e8e2accc1d924d4b11df6696c5a": "200000000000000000000", + "0x4c377bb03ab52c4cb79befa1dd114982924c4ae9": "1827814000000000000000", + "0xfb949c647fdcfd2514c7d58e31f28a532d8c5833": "20000000000000000000000", + "0x70e5e9da735ff077249dcb9aaf3db2a48d9498c0": "1000000000000000000000", + "0xfe6f5f42b6193b1ad16206e4afb5239d4d7db45e": "1730000000000000000000", + "0xbda4be317e7e4bed84c0495eee32d607ec38ca52": "2309457000000000000000", + "0x5910106debd291a1cd80b0fbbb8d8d9e93a7cc1e": "2000000000000000000000", + "0xba42f9aace4c184504abf5425762aca26f71fbdc": "37400000000000000000", + "0xbeb4fd315559436045dcb99d49dcec03f40c42dc": "2000000000000000000000", + "0x452b64db8ef7d6df87c788639c2290be8482d575": "8000000000000000000000", + "0x66e09427c1e63deed7e12b8c55a6a19320ef4b6a": "170000000000000000000", + "0xfaad905d847c7b23418aeecbe3addb8dd3f8924a": "1970000000000000000000", + "0xa29319e81069e5d60df00f3de5adee3505ecd5fb": "2000000000000000000000", + "0xcf348f2fe47b7e413c077a7baf3a75fbf8428692": "2000000000000000000000", + "0xe1e8c50b80a352b240ce7342bbfdf5690cc8cb14": "394000000000000000000", + "0x131c792c197d18bd045d7024937c1f84b60f4438": "4000000000000000000000", + "0xe49af4f34adaa2330b0e49dc74ec18ab2f92f827": "2000000000000000000000", + "0xf2e99f5cbb836b7ad36247571a302cbe4b481c69": "1970000000000000000000", + "0xc93fbde8d46d2bcc0fa9b33bd8ba7f8042125565": "1400000000000000000000", + "0x038779ca2dbe663e63db3fe75683ea0ec62e2383": "1670000000000000000000", + "0xa33cb450f95bb46e25afb50fe05feee6fb8cc8ea": "776000000000000000000", + "0x40ab66fe213ea56c3afb12c75be33f8e32fd085d": "4000000000000000000000", + "0x6403d062549690c8e8b63eae41d6c109476e2588": "2000000000000000000000", + "0xbfb0ea02feb61dec9e22a5070959330299c43072": "20000000000000000000000", + "0x99c475bf02e8b9214ada5fad02fdfd15ba365c0c": "591000000000000000000", + "0x904966cc2213b5b8cb5bd6089ef9cddbef7edfcc": "2000000000000000000000", + "0x767a03655af360841e810d83f5e61fb40f4cd113": "985000000000000000000", + "0xab209fdca979d0a647010af9a8b52fc7d20d8cd1": "9129000000000000000000", + "0x6294eae6e420a3d5600a39c4141f838ff8e7cc48": "2955000000000000000000", + "0x9777cc61cf756be3b3c20cd4491c69d275e7a120": "10000000000000000000000", + "0xbcbf6ba166e2340db052ea23d28029b0de6aa380": "3880000000000000000000", + "0x9f10f2a0463b65ae30b070b3df18cf46f51e89bd": "1910000000000000000000", + "0x8d9952d0bb4ebfa0efd01a3aa9e8e87f0525742e": "3460000000000000000000", + "0x4f23b6b817ffa5c664acdad79bb7b726d30af0f9": "1760000000000000000000", + "0xb4c20040ccd9a1a3283da4d4a2f365820843d7e2": "1000000000000000000000", + "0x7f49e7a4269882bd8722d4a6f566347629624079": "2000000000000000000000", + "0x33629bd52f0e107bc071176c64df108f64777d49": "33425000000000000000", + "0x6a7b2e0d88867ff15d207c222bebf94fa6ce8397": "60000000000000000000000", + "0xb7ce684b09abda53389a875369f71958aeac3bdd": "2000000000000000000000", + "0xffbc3da0381ec339c1c049eb1ed9ee34fdcea6ca": "4000000000000000000000", + "0x849ab80790b28ff1ffd6ba394efc7463105c36f7": "34600000000000000000", + "0xb0b36af9aeeedf97b6b02280f114f13984ea3260": "985000000000000000000", + "0x4d57e716876c0c95ef5eaebd35c8f41b069b6bfe": "2000000000000000000000", + "0x2d2b032359b363964fc11a518263bfd05431e867": "149600000000000000000", + "0x2ccc1f1cb5f4a8002e186b20885d9dbc030c0894": "2000000000000000000000", + "0x016c85e1613b900fa357b8283b120e65aefcdd08": "799954000000000000000", + "0x710b0274d712c77e08a5707d6f3e70c0ce3d92cf": "6400000000000000000000", + "0x3cd3a6e93579c56d494171fc533e7a90e6f59464": "2000000000000000000000", + "0xfe0e30e214290d743dd30eb082f1f0a5225ade61": "200000000000000000000", + "0xd0718520eae0a4d62d70de1be0ca431c5eea2482": "2000000000000000000000", + "0xaf7f79cb415a1fb8dbbd094607ee8d41fb7c5a3b": "10000000000000000000000", + "0xb7d252ee9402b0eef144295f0e69f0db586c0871": "660000000000000000000", + "0xc3b928a76fad6578f04f0555e63952cd21d1520a": "2000000000000000000000", + "0xa7a517d7ad35820b09d497fa7e5540cde9495853": "2000000000000000000000", + "0xe6e886317b6a66a5b4f81bf164c538c264351765": "2000000000000000000000", + "0x0770b43dbae4b1f35a927b4fa8124d3866caf97b": "1016390000000000000000", + "0x52b4257cf41b6e28878d50d57b99914ffa89873a": "3930150000000000000000", + "0xe08bc29c2b48b169ff2bdc16714c586e6cb85ccf": "20000000000000000000", + "0x2372c4c1c9939f7aaf6cfac04090f00474840a09": "10000000000000000000000", + "0xab6b65eab8dfc917ec0251b9db0ecfa0fa032849": "500000000000000000000", + "0x582e7cc46f1d7b4e6e9d95868bfd370573178f4c": "2000000000000000000000", + "0xf167f5868dcf4233a7830609682caf2df4b1b807": "2396150000000000000000", + "0xec82f50d06475f684df1b392e00da341aa145444": "2000000000000000000000", + "0x0968ee5a378f8cadb3bafdbed1d19aaacf936711": "1000000000000000000000", + "0xa86613e6c4a4c9c55f5c10bcda32175dcbb4af60": "10696140000000000000000", + "0xa5cd123992194b34c4781314303b03c54948f4b9": "2010462000000000000000", + "0x52f058d46147e9006d29bf2c09304ad1cddd6e15": "1500000000000000000000", + "0x160226efe7b53a8af462d117a0108089bdecc2d1": "200550000000000000000", + "0x256292a191bdda34c4da6b6bd69147bf75e2a9ab": "14051000000000000000", + "0x1b8aa0160cd79f005f88510a714913d70ad3be33": "201760000000000000000", + "0xd4b2ff3bae1993ffea4d3b180231da439f7502a2": "2000000000000000000000", + "0xe408aa99835307eea4a6c5eb801fe694117f707d": "500000000000000000000", + "0xe60a55f2df996dc3aedb696c08dde039b2641de8": "2000000000000000000000", + "0x73df3c3e7955f4f2d859831be38000b1076b3884": "1970000000000000000000", + "0x6228ade95e8bb17d1ae23bfb0518414d497e0eb8": "400000000000000000000", + "0x0f46c81db780c1674ac73d314f06539ee56ebc83": "9850000000000000000000", + "0x762d6f30dab99135e4eca51d5243d6c8621102d5": "282000000000000000000", + "0x4ba0d9e89601772b496847a2bb4340186787d265": "1000000000000000000000", + "0xca747576446a4c8f30b08340fee198de63ec92cf": "7020000000000000000000", + "0x99c31fe748583787cdd3e525b281b218961739e3": "1015200000000000000000", + "0x1210f80bdb826c175462ab0716e69e46c24ad076": "100000000000000000000", + "0x3f75ae61cc1d8042653b5baec4443e051c5e7abd": "95500000000000000000", + "0x5c4892907a0720df6fd3413e63ff767d6b398023": "13189467000000000000000", + "0x17f14632a7e2820be6e8f6df823558283dadab2d": "2000000000000000000000", + "0x1dc7f7dad85df53f1271152403f4e1e4fdb3afa0": "200000000000000000000", + "0x5a30feac37ac9f72d7b4af0f2bc73952c74fd5c3": "2000000000000000000000", + "0x136d4b662bbd1080cfe4445b0fa213864435b7f1": "4000000000000000000000", + "0xc1ec81dd123d4b7c2dd9b4d438a7072c11dc874c": "2000000000000000000000", + "0x09f9575be57d004793c7a4eb84b71587f97cbb6a": "200000000000000000000", + "0x2c4b470307a059854055d91ec3794d80b53d0f4a": "20000000000000000000000", + "0x6af6c7ee99df271ba15bf384c0b764adcb4da182": "999972000000000000000", + "0x0dae3ee5b915b36487f9161f19846d101433318a": "1910000000000000000000", + "0x0dcf9d8c9804459f647c14138ed50fad563b4154": "173000000000000000000", + "0xbfa8c858df102cb12421008b0a31c4c7190ad560": "200000000000000000000", + "0xc2fd0bf7c725ef3e047e5ae1c29fe18f12a7299c": "1337000000000000000000", + "0xd70a612bd6dda9eab0dddcff4aaf4122d38feae4": "540000000000000000000", + "0xe07137ae0d116d033533c4eab496f8a9fb09569c": "1400000000000000000000", + "0x7f49f20726471ac1c7a83ef106e9775ceb662566": "5910000000000000000000", + "0x1e706655e284dcf0bb37fe075d613a18dc12ff4a": "4376760000000000000000", + "0x03af7ad9d5223cf7c8c13f20df67ebe5ffc5bb41": "200000000000000000000", + "0x228242f8336eecd8242e1f000f41937e71dffbbf": "5000000000000000000000", + "0xe8ed51bbb3ace69e06024b33f86844c47348db9e": "165170600000000000000000", + "0x3b566a8afad19682dc2ce8679a3ce444a5b0fd4f": "2000000000000000000000", + "0xdc738fb217cead2f69594c08170de1af10c419e3": "100000000000000000000000", + "0x13032446e7d610aa00ec8c56c9b574d36ca1c016": "2000000000000000000000", + "0x6ca6a132ce1cd288bee30ec7cfeffb85c1f50a54": "2000000000000000000000", + "0xb85f26dd0e72d9c29ebaf697a8af77472c2b58b5": "11900000000000000000000", + "0x055bd02caf19d6202bbcdc836d187bd1c01cf261": "100000000000000000000", + "0x3c322e611fdb820d47c6f8fc64b6fad74ca95f5e": "242514000000000000000", + "0x8daddf52efbd74da95b969a5476f4fbbb563bfd2": "835000000000000000000", + "0xc63ac417992e9f9b60386ed953e6d7dff2b090e8": "4000086000000000000000", + "0x27f03cf1abc5e1b51dbc444b289e542c9ddfb0e6": "5000000000000000000000", + "0xd8f4bae6f84d910d6d7d5ac914b1e68372f94135": "100000000000000000000", + "0x9f83a293c324d4106c18faa8888f64d299054ca0": "200000000000000000000", + "0x39ee4fe00fbced647068d4f57c01cb22a80bccd1": "6000000000000000000000", + "0x404100db4c5d0eec557823b58343758bcc2c8083": "20000000000000000000", + "0x02751dc68cb5bd737027abf7ddb77390cd77c16b": "20000000000000000000", + "0xd10302faa1929a326904d376bf0b8dc93ad04c4c": "1790000000000000000000", + "0xcc419fd9912b85135659e77a93bc3df182d45115": "10000000000000000000000", + "0x10097198b4e7ee91ff82cc2f3bd95fed73c540c0": "2000000000000000000000", + "0x7e24d9e22ce1da3ce19f219ccee523376873f367": "5900150000000000000000", + "0x2e4ee1ae996aa0a1d92428d06652a6bea6d2d15d": "2000000000000000000000", + "0x91a4149a2c7b1b3a67ea28aff34725e0bf8d7524": "1940000000000000000000", + "0xead65262ed5d122df2b2751410f98c32d1238f51": "101680000000000000000", + "0xe20954d0f4108c82d4dcb2148d26bbd924f6dd24": "10000000000000000000000", + "0xebb7d2e11bc6b58f0a8d45c2f6de3010570ac891": "26740000000000000000", + "0xef115252b1b845cd857f002d630f1b6fa37a4e50": "1970000000000000000000", + "0x01a818135a414210c37c62b625aca1a54611ac36": "260000000000000000000", + "0xea1ea0c599afb9cd36caacbbb52b5bbb97597377": "1069600000000000000000", + "0x7a7a4f807357a4bbe68e1aa806393210c411ccb3": "30000000000000000000000", + "0x6d40ca27826d97731b3e86effcd7b92a4161fe89": "2000000000000000000000", + "0x8431277d7bdd10457dc017408c8dbbbd414a8df3": "39400000000000000000", + "0x69b81d5981141ec7a7141060dfcf8f3599ffc63e": "5000000000000000000000", + "0x47688410ff25d654d72eb2bc06e4ad24f833b094": "160440000000000000000", + "0x6c101205b323d77544d6dc52af37aca3cec6f7f1": "10000000000000000000000", + "0xfb685c15e439965ef626bf0d834cd1a89f2b5695": "3940000000000000000000", + "0x673706b1b0e4dc7a949a7a796258a5b83bb5aa83": "16100000000000000000000", + "0xecdaf93229b45ee672f65db506fb5eca00f7fce6": "1605009000000000000000", + "0xec6904bae1f69790591709b0609783733f2573e3": "500000000000000000000", + "0x812ea7a3b2c86eed32ff4f2c73514cc63bacfbce": "1000000000000000000000", + "0x196c02210a450ab0b36370655f717aa87bd1c004": "259456000000000000000", + "0xd96ac2507409c7a383ab2eee1822a5d738b36b56": "200000000000000000000", + "0xae2f9c19ac76136594432393b0471d08902164d3": "698600000000000000000", + "0x9d32962ea99700d93228e9dbdad2cc37bb99f07e": "3327560000000000000000", + "0x17e584e810e567702c61d55d434b34cdb5ee30f6": "5000000000000000000000", + "0xa3a93ef9dbea2636263d06d8492f6a41de907c22": "60000000000000000000", + "0x2b5016e2457387956562587115aa8759d8695fdf": "200000000000000000000000", + "0x140129eaa766b5a29f5b3af2574e4409f8f6d3f1": "6400000000000000000000", + "0x7025965d2b88da197d4459be3dc9386344cc1f31": "2005500000000000000000", + "0x388bdcdae794fc44082e667501344118ea96cd96": "1670000000000000000000", + "0xeee9d0526eda01e43116a395322dda8970578f39": "9999980000000000000000", + "0x6ec89b39f9f5276a553e8da30e6ec17aa47eefc7": "447500000000000000000", + "0x7e236666b2d06e63ea4e2ab84357e2dfc977e50e": "999972000000000000000", + "0x68df947c495bebaeb8e889b3f953d533874bf106": "546000000000000000000", + "0xd40ed66ab3ceff24ca05ecd471efb492c15f5ffa": "500000000000000000000", + "0xf0c70d0d6dab7663aa9ed9ceea567ee2c6b02765": "2089349000000000000000", + "0xb589676d15a04448344230d4ff27c95edf122c49": "1000000000000000000000", + "0xa0347f0a98776390165c166d32963bf74dcd0a2f": "1000000000000000000000", + "0xd47d8685faee147c520fd986709175bf2f886bef": "2000000000000000000000", + "0xa1dcd0e5b05a977c9623e5ae2f59b9ada2f33e31": "100000000000000000000", + "0x4979194ec9e97db9bee8343b7c77d9d7f3f1dc9f": "20000000000000000000", + "0x7cd20eccb518b60cab095b720f571570caaa447e": "500000000000000000000", + "0x2ff830cf55fb00d5a0e03514fecd44314bd6d9f1": "10000000000000000000000", + "0x0bb25ca7d188e71e4d693d7b170717d6f8f0a70a": "336870000000000000000", + "0xe9a2b4914e8553bf0d7c00ca532369b879f931bf": "2000000000000000000000", + "0x720e6b22bf430966fa32b6acb9a506eebf662c61": "152000000000000000000", + "0x7ade5d66b944bb860c0efdc86276d58f4653f711": "2000000000000000000000", + "0x2eaff9f8f8113064d3957ac6d6e11eee42c8195d": "1970000000000000000000", + "0x0c8fd7775e54a6d9c9a3bf890e761f6577693ff0": "9850000000000000000000", + "0x290a56d41f6e9efbdcea0342e0b7929a8cdfcb05": "344000000000000000000", + "0xd73ed2d985b5f21b55b274643bc6da031d8edd8d": "49250000000000000000000", + "0x80156d10efa8b230c99410630d37e269d4093cea": "2000000000000000000000", + "0x0989c200440b878991b69d6095dfe69e33a22e70": "1910000000000000000000", + "0xec8014efc7cbe5b0ce50f3562cf4e67f8593cd32": "17300000000000000000", + "0xde612d0724e84ea4a7feaa3d2142bd5ee82d3201": "20000000000000000000", + "0x0f832a93df9d7f74cd0fb8546b7198bf5377d925": "143000000000000000000", + "0xaa2c670096d3f939305325427eb955a8a60db3c5": "2003010000000000000000", + "0x25287b815f5c82380a73b0b13fbaf982be24c4d3": "40000000000000000000", + "0xe75c3b38a58a3f33d55690a5a59766be185e0284": "500000000000000000000", + "0x1940dc9364a852165f47414e27f5002445a4f143": "10850000000000000000000", + "0xe5b826196c0e1bc1119b021cf6d259a610c99670": "200000000000000000000", + "0x82a15cef1d6c8260eaf159ea3f0180d8677dce1c": "2000000000000000000000", + "0xda06044e293c652c467fe74146bf185b21338a1c": "1000000000000000000000", + "0xf815c10a032d13c34b8976fa6e3bd2c9131a8ba9": "1337000000000000000000", + "0xcd95fa423d6fc120274aacde19f4eeb766f10420": "200000000000000000000", + "0xe3a4f83c39f85af9c8b1b312bfe5fc3423afa634": "28650000000000000000", + "0x768ce0daa029b7ded022e5fc574d11cde3ecb517": "322000000000000000000", + "0xe3ec18a74ed43855409a26ade7830de8e42685ef": "19700000000000000000", + "0xb2bdbedf95908476d7148a370cc693743628057f": "4000000000000000000000", + "0xbbb8ffe43f98de8eae184623ae5264e424d0b8d7": "107600000000000000000", + "0x090cebef292c3eb081a05fd8aaf7d39bf07b89d4": "4000000000000000000000", + "0xdd2a233adede66fe1126d6c16823b62a021feddb": "2000000000000000000000", + "0xd8cd64e0284eec53aa4639afc4750810b97fab56": "20000000000000000000", + "0xe5953fea497104ef9ad2d4e5841c271f073519c2": "704000000000000000000", + "0x967d4142af770515dd7062af93498dbfdff29f20": "20200000000000000000", + "0xfd191a35157d781373fb411bf9f25290047c5eef": "1000000000000000000000", + "0x8967d7b9bdb7b4aed22e65a15dc803cb7a213f10": "400000000000000000000", + "0x51e43fe0d25c782860af81ea89dd793c13f0cbb1": "60000000000000000000", + "0xa38476691d34942eea6b2f76889223047db4617a": "2000000000000000000000", + "0x1321ccf29739b974e5a516f18f3a843671e39642": "4000000000000000000000", + "0x4d71a6eb3d7f327e1834278e280b039eddd31c2f": "6000000000000000000000", + "0xdc2d15a69f6bb33b246aef40450751c2f6756ad2": "1996000000000000000000", + "0xec89f2b678a1a15b9134ec5eb70c6a62071fbaf9": "200000000000000000000", + "0x27bf943c1633fe32f8bcccdb6302b407a5724e44": "940229000000000000000", + "0xd0a6c6f9e9c4b383d716b31de78d56414de8fa91": "300000000000000000000", + "0x7b6175ec9befc738249535ddde34688cd36edf25": "10000000000000000000000", + "0x41ce79950935cff55bf78e4ccec2fe631785db95": "2000000000000000000000", + "0x5598b3a79a48f32b1f5fc915b87b645d805d1afe": "500000000000000000000", + "0x5c4881165cb42bb82e97396c8ef44adbf173fb99": "110600000000000000000", + "0x25b0533b81d02a617b9229c7ec5d6f2f672e5b5a": "1000000000000000000000", + "0x015f097d9acddcddafaf2a107eb93a40fc94b04c": "20000000000000000000000", + "0xb84b53d0bb125656cddc52eb852ab71d7259f3d5": "16000000000000000000000", + "0x1a79c7f4039c67a39d7513884cdc0e2c34222490": "20000000000000000000", + "0x926209b7fda54e8ddb9d9e4d3d19ebdc8e88c29f": "2000000000000000000000", + "0xc2fe7d75731f636dcd09dbda0671393ba0c82a7d": "2200000000000000000000", + "0x30248d58e414b20fed3a6c482b59d9d8f5a4b7e2": "60000000000000000000", + "0xd0e194f34b1db609288509ccd2e73b6131a2538b": "999972000000000000000", + "0xe8f29969e75c65e01ce3d86154207d0a9e7c76f2": "2991807000000000000000", + "0xcb93199b9c90bc4915bd859e3d42866dc8c18749": "231800000000000000000", + "0xe6fe0afb9dcedd37b2e22c451ba6feab67348033": "10000000000000000000000", + "0x82f854c9c2f087dffa985ac8201e626ca5467686": "100000000000000000000000", + "0x63bb664f9117037628594da7e3c5089fd618b5b5": "20000000000000000000", + "0xf8d17424c767bea31205739a2b57a7277214eebe": "42000000000000000000", + "0x4ca8db4a5efefc80f4cd9bbcccb03265931332b6": "200000000000000000000", + "0xc56e6b62ba6e40e52aab167d21df025d0055754b": "2000000000000000000000", + "0x0d8c40a79e18994ff99ec251ee10d088c3912e80": "114600000000000000000", + "0x40a331195b977325c2aa28fa2f42cb25ec3c253c": "2000000000000000000000", + "0xa2c5854ff1599f98892c5725d262be1da98aadac": "314315000000000000000", + "0x23ab09e73f87aa0f3be0139df0c8eb6be5634f95": "8000000000000000000000", + "0xb8040536958d5998ce4bec0cfc9c2204989848e9": "24472420000000000000000", + "0x42d6b263d9e9f4116c411424fc9955783c763030": "2000000000000000000000", + "0xc496cbb0459a6a01600fc589a55a32b454217f9d": "274000000000000000000", + "0x48302c311ef8e5dc664158dd583c81194d6e0d58": "3364760000000000000000", + "0xd5b284040130abf7c1d163712371cc7e28ad66da": "1970000000000000000000", + "0xd22f0ca4cd479e661775053bcc49e390f670dd8a": "1000000000000000000000", + "0xe597f083a469c4591c3d2b1d2c772787befe27b2": "280000000000000000000", + "0x668b6ba8ab08eace39c502ef672bd5ccb6a67a20": "31135320000000000000000", + "0xa3bff1dfa9971668360c0d82828432e27bf54e67": "200000000000000000000", + "0xee655bb4ee0e8d5478526fb9f15e4064e09ff3dd": "200000000000000000000", + "0x121f855b70149ac83473b9706fb44d47828b983b": "1400000000000000000000", + "0x20a15256d50ce058bf0eac43aa533aa16ec9b380": "20000000000000000000", + "0x69bcfc1d43b4ba19de7b274bdffb35139412d3d7": "985000000000000000000", + "0xdb288f80ffe232c2ba47cc94c763cf6fc9b82b0d": "85000000000000000000", + "0xe1cb83ec5eb6f1eeb85e99b2fc63812fde957184": "20000000000000000000000", + "0xa419a984142363267575566089340eea0ea20819": "1999944000000000000000", + "0x8489f6ad1d9a94a297789156899db64154f1dbb5": "358849000000000000000", + "0xd609bf4f146eea6b0dc8e06ddcf4448a1fccc9fa": "2000000000000000000000", + "0xdf1fa2e20e31985ebe2c0f0c93b54c0fb67a264b": "200000000000000000000", + "0xefe8ff87fc260e0767638dd5d02fc4672e0ec06d": "2000000000000000000000", + "0xeef1bbb1e5a83fde8248f88ee3018afa2d1332eb": "200000000000000000000", + "0x4b3aab335ebbfaa870cc4d605e7d2e74c668369f": "60000000000000000000000", + "0x8f4fb1aea7cd0f570ea5e61b40a4f4510b6264e4": "4000000000000000000000", + "0x0b0b3862112aeec3a03492b1b05f440eca54256e": "4000000000000000000000", + "0xdff4007931786593b229efe5959f3a4e219e51af": "4925000000000000000000", + "0xfec14e5485de2b3eef5e74c46146db8e454e0335": "179000000000000000000", + "0xac21c1e5a3d7e0b50681679dd6c792dbca87decb": "100000000000000000000000", + "0x796ebbf49b3e36d67694ad79f8ff36767ac6fab0": "60800000000000000000", + "0xae7739124ed153052503fc101410d1ffd8cd13b7": "999942000000000000000", + "0x86026cad3fe4ea1ce7fca260d3d45eb09ea6a364": "200000000000000000000", + "0xb2fc84a3e50a50af02f94da0383ed59f71ff01d7": "30000000000000000000000", + "0xbbab000b0408ed015a37c04747bc461ab14e151b": "6000000000000000000000", + "0xc4ff6fbb1f09bd9e102ba033d636ac1c4c0f5304": "1000000000000000000000", + "0xcc606f511397a38fc7872bd3b0bd03c71bbd768b": "1000000000000000000000", + "0xf346d7de92741c08fc58a64db55b062dde012d14": "295106000000000000000", + "0x33f15223310d44de8b6636685f3a4c3d9c5655a5": "250500000000000000000", + "0x3c860e2e663f46db53427b29fe3ea5e5bf62bbcc": "98500000000000000000", + "0xacb94338554bc488cc88ae2d9d94080d6bdf8410": "1000000000000000000000", + "0x9c5cc111092c122116f1a85f4ee31408741a7d2f": "492500000000000000000", + "0x5f76f0a306269c78306b3d650dc3e9c37084db61": "2400000000000000000000", + "0x2c0cc3f951482cc8a2925815684eb9f94e060200": "6000000000000000000000", + "0xb74372dbfa181dc9242f39bf1d3731dffe2bdacf": "2000000000000000000000", + "0x3bab4b01a7c84ba13feea9b0bb191b77a3aadca3": "200000000000000000000", + "0x39aa05e56d7d32385421cf9336e90d3d15a9f859": "26000000000000000000", + "0x4a52bad20357228faa1e996bed790c93674ba7d0": "1337000000000000000000", + "0xff128f4b355be1dc4a6f94fa510d7f15d53c2aff": "2720000000000000000000", + "0x92793ac5b37268774a7130de2bbd330405661773": "40110000000000000000", + "0xdb19a3982230368f0177219cb10cb259cdb2257c": "2000000000000000000000", + "0x8d1794da509cb297053661a14aa892333231e3c1": "199600000000000000000", + "0x9b7c8810cc7cc89e804e6d3e38121850472877fe": "2000000000000000000000", + "0xed3cbc3782cebd67989b305c4133b2cde32211eb": "400000000000000000000", + "0x8532490897bbb4ce8b7f6b837e4cba848fbe9976": "100000000000000000000", + "0xc384ac6ee27c39e2f278c220bdfa5baed626d9d3": "600000000000000000000", + "0xb1459285863ea2db3759e546ceb3fb3761f5909c": "1122309000000000000000", + "0x634efc24371107b4cbf03f79a93dfd93e431d5fd": "1221341000000000000000", + "0xef9f59aeda418c1494682d941aab4924b5f4929a": "100000000000000000000000", + "0xe7311c9533f0092c7248c9739b5b2c864a34b1ce": "2803436000000000000000", + "0xe6e621eaab01f20ef0836b7cad47464cb5fd3c96": "316014000000000000000", + "0xcd102cd6db3df14ad6af0f87c72479861bfc3d24": "2000000000000000000000", + "0x005a9c03f69d17d66cbb8ad721008a9ebbb836fb": "2000000000000000000000", + "0xa072cebe62a9e9f61cc3fbf88a9efbfe3e9a8d70": "400000000000000000000", + "0xf2ab1161750244d0ecd048ee0d3e51abb143a2fd": "1235800000000000000000", + "0xf686785b89720b61145fea80978d6acc8e0bc196": "4000000000000000000000", + "0x0a2b4fc5d81ace67dc4bba03f7b455413d46fe3d": "197000000000000000000", + "0xc32ec7e42ad16ce3e2555ad4c54306eda0b26758": "2000000000000000000000", + "0xf3fa723552a5d0512e2b62f48dca7b2b8105305b": "137000000000000000000", + "0x6dc3f92baa1d21dab7382b893261a0356fa7c187": "1730000000000000000000", + "0x4627c606842671abde8295ee5dd94c7f549534f4": "286600000000000000000", + "0xe39e46e15d22ce56e0c32f1877b7d1a264cf94f3": "20000000000000000000000", + "0xd7d157e4c0a96437a6d285741dd23ec4361fa36b": "2000000000000000000000", + "0x68f8f45155e98c5029a4ebc5b527a92e9fa83120": "4436101000000000000000", + "0x9aba2b5e27ff78baaab5cdc988b7be855cebbdce": "9999000000000000000000", + "0x66b39837cb3cac8a802afe3f12a258bbca62dacd": "400000000000000000000", + "0xd39b7cbc94003fc948f0cde27b100db8ccd6e063": "400000000000000000000", + "0x3db9ed7f024c7e26372feacf2b050803445e3810": "1285600000000000000000", + "0x3fbc1e4518d73400c6d046359439fb68ea1a49f4": "16400000000000000000000", + "0xe3da4f3240844c9b6323b4996921207122454399": "11539639000000000000000", + "0x09afa73bc047ef46b977fd9763f87286a6be68c6": "501500000000000000000", + "0x1dbe8e1c2b8a009f85f1ad3ce80d2e05350ee39c": "135400000000000000000", + "0x2c5a2d0abda03bbe215781b4ff296c8c61bdbaf6": "30617000000000000000", + "0x9a9d1dc0baa77d6e20c3d849c78862dd1c054c87": "880000000000000000000", + "0x3ccef88679573947e94997798a1e327e08603a65": "807700000000000000000", + "0x850b9db18ff84bf0c7da49ea3781d92090ad7e64": "2600000000000000000000", + "0x361c75931696bc3d427d93e76c77fd13b241f6f4": "549212000000000000000", + "0xc8f2b320e6dfd70906c597bad2f9501312c78259": "1504800000000000000000", + "0x8dc1d5111d09af25fdfcac455c7cec283e6d6775": "2000000000000000000000", + "0xcd7ece086b4b619b3b369352ee38b71ddb06439a": "200000000000000000000", + "0xf607c2150d3e1b99f24fa1c7d540add35c4ebe1e": "3098020000000000000000", + "0x32485c818728c197fea487fbb6e829159eba8370": "1053893000000000000000", + "0x8e670815fb67aeaea57b86534edc00cdf564fee5": "3300000000000000000000", + "0x10df681506e34930ac7a5c67a54c3e89ce92b981": "2153800000000000000000", + "0x1cf2eb7a8ccac2adeaef0ee87347d535d3b94058": "2000000000000000000000", + "0xf0dc43f205619127507b2b1c1cfdf32d28310920": "301973000000000000000", + "0xf2c2904e9fa664a11ee25656d8fd2cc0d9a522a0": "13370000000000000000", + "0x70670fbb05d33014444b8d1e8e7700258b8caa6d": "2000000000000000000000", + "0x5160ed612e1b48e73f3fc15bc4321b8f23b8a24b": "562800000000000000000", + "0x54a62bf9233e146ffec3876e45f20ee8414adeba": "10000000000000000000000", + "0x26d4ec17d5ceb2c894bdc59d0a6a695dad2b43cc": "2935300000000000000000", + "0x205fc843e19a4913d1881eb69b69c0fa3be5c50b": "9700000000000000000000", + "0xe001aba77c02e172086c1950fffbcaa30b83488f": "1970000000000000000000", + "0x21efbca09b3580b98e73f5b2f7f4dc0bf02c529c": "2000000000000000000000", + "0xc4d916574e68c49f7ef9d3d82d1638b2b7ee0985": "1580000000000000000000", + "0xcab0d32cf3767fa6b3537c84328baa9f50458136": "8960000000000000000000", + "0x7ce4686446f1949ebed67215eb0d5a1dd72c11b8": "2217776000000000000000", + "0x7837fcb876da00d1eb3b88feb3df3fa4042fac82": "1760000000000000000000", + "0x71e38ff545f30fe14ca863d4f5297fd48c73a5ce": "3580000000000000000000", + "0xe528a0e5a267d667e9393a6584e19b34dc9be973": "5600000000000000000000", + "0xc5374928cdf193705443b14cc20da423473cd9cf": "138139000000000000000", + "0xe406f5dd72cab66d8a6ecbd6bfb494a7b6b09afe": "100000000000000000000", + "0xd7ef340e66b0d7afcce20a19cb7bfc81da33d94e": "3000000000000000000000", + "0xe012db453827a58e16c1365608d36ed658720507": "2000000000000000000000", + "0xd59638d3c5faa7711bf085745f9d5bdc23d498d8": "2000000000000000000000", + "0x008fc7cbadffbd0d7fe44f8dfd60a79d721a1c9c": "1000000000000000000000", + "0x8a3470282d5e2a2aefd7a75094c822c4f5aeef8a": "242743000000000000000", + "0x38b3965c21fa893931079beacfffaf153678b6eb": "170374000000000000000", + "0x57dd9471cbfa262709f5f486bcb774c5f527b8f8": "197000000000000000000", + "0x5a60c924162873fc7ea4da7f972e350167376031": "83583000000000000000", + "0xb9013c51bd078a098fae05bf2ace0849c6be17a5": "80000000000000000000", + "0xdc23b260fcc26e7d10f4bd044af794579460d9da": "500038000000000000000", + "0x45db03bccfd6a5f4d0266b82a22a368792c77d83": "8000000000000000000000", + "0x3e0cbe6a6dcb61f110c45ba2aa361d7fcad3da73": "8022000000000000000000", + "0x42d3a5a901f2f6bd9356f112a70180e5a1550b60": "925000000000000000000", + "0x47219229e8cd56659a65c2a943e2dd9a8f4bfd89": "1520000000000000000000", + "0xa20d071b1b003063497d7990e1249dabf36c35f7": "1000000000000000000000", + "0x6835c8e8b74a2ca2ae3f4a8d0f6b954a3e2a8392": "60140000000000000000", + "0x0c2d5c920538e953caaf24f0737f554cc6927742": "1000000000000000000000", + "0xeedf6c4280e6eb05b934ace428e11d4231b5905b": "200000000000000000000", + "0xffa696ecbd787e66abae4fe87b635f07ca57d848": "1337000000000000000000", + "0x3e81772175237eb4cbe0fe2dcafdadffeb6a1999": "8800000000000000000000", + "0xb44783c8e57b480793cbd69a45d90c7b4f0c48ac": "20000000000000000000", + "0xf84f090adf3f8db7e194b350fbb77500699f66fd": "1970000000000000000000", + "0x2e9824b5c132111bca24ddfba7e575a5cd7296c1": "17201900000000000000000", + "0x5cce72d068c7c3f55b1d2819545e77317cae8240": "1940000000000000000000", + "0xd815e1d9f4e2b5e57e34826b7cfd8881b8546890": "17300000000000000000", + "0xf901c00fc1db88b69c4bc3252b5ca70ea6ee5cf6": "400000000000000000000", + "0xa960b1cadd3b5c1a8e6cb3abcaf52ee7c3d9fa88": "1522704000000000000000", + "0xf7e45a12aa711c709acefe95f33b78612d2ad22a": "66230000000000000000000", + "0xc332df50b13c013490a5d7c75dbfa366da87b6d6": "4000000000000000000000", + "0xd467cf064c0871989b90d8b2eb14ccc63b360823": "200000000000000000000", + "0xb9144b677c2dc614ceefdf50985f1183208ea64c": "2000000000000000000000", + "0xea7c4d6dc729cd6b157c03ad237ca19a209346c3": "2000000000000000000000", + "0x9c9de44724a4054da0eaa605abcc802668778bea": "200020000000000000000", + "0xd7140c8e5a4307fab0cc27badd9295018bf87970": "109600000000000000000", + "0xc33acdb3ba1aab27507b86b15d67faf91ecf6293": "2000000000000000000000", + "0xdb2a0c9ab64df58ddfb1dbacf8ba0d89c85b31b4": "4000000000000000000000", + "0xbfcb9730246304700da90b4153e71141622e1c41": "1000000000000000000000", + "0x07dc8c8b927adbedfa8f5d639b4352351f2f36d2": "314382000000000000000", + "0x2d5391e938b34858cf965b840531d5efda410b09": "1400000000000000000000", + "0x0b5e2011ebc25a007f21362960498afb8af280fb": "2000000000000000000000", + "0xed9fb1f5af2fbf7ffc5029cee42b70ff5c275bf5": "280000000000000000000", + "0xa3232d068d50064903c9ebc563b515acc8b7b097": "2002000000000000000000", + "0x66274fea82cd30b6c29b23350e4f4f3d310a5899": "2070000000000000000000", + "0xdbfb1bb464b8a58e500d2ed8de972c45f5f1c0fb": "1600000000000000000000", + "0xa1f8d8bcf90e777f19b3a649759ad95027abdfc3": "200000000000000000000", + "0x5bd23547477f6d09d7b2a005c5ee650c510c56d7": "10000000000000000000000", + "0xec3b8b58a12703e581ce5ffd7e21c57d1e5c663f": "1700000000000000000000", + "0x54310b3aa88703a725dfa57de6e646935164802c": "1910000000000000000000", + "0x8f41b1fbf54298f5d0bc2d122f4eb95da4e5cd3d": "354200000000000000000", + "0xc80b36d1beafba5fcc644d60ac6e46ed2927e7dc": "13370000000000000000", + "0x1ea492bce1ad107e337f4bd4a7ac9a7babcccdab": "100000000000000000000", + "0xaaf023fef290a49bb78bb7abc95d669c50d528b0": "200000000000000000000", + "0x80b79f338390d1ba1b3737a29a0257e5d91e0731": "20000000000000000000", + "0xf382e4c20410b951089e19ba96a2fee3d91cce7e": "5054000000000000000000", + "0x0748713145ef83c3f0ef4d31d823786f7e9cc689": "4500000000000000000000", + "0x21e219c89ca8ac14ae4cba6130eeb77d9e6d3962": "789580000000000000000", + "0xca9a042a6a806ffc92179500d24429e8ab528117": "1100000000000000000000", + "0xbcc9593b2da6df6a34d71b1aa38dacf876f95b88": "20000000000000000000", + "0xd1438267231704fc7280d563adf4763844a80722": "200000000000000000000", + "0x4989e1ab5e7cd00746b3938ef0f0d064a2025ba5": "2000000000000000000000", + "0xbd4b60faec740a21e3071391f96aa534f7c1f44e": "182000000000000000000", + "0x8c7cb4e48b25031aa1c4f92925d631a8c3edc761": "1000000000000000000000", + "0x322788b5e29bf4f5f55ae1ddb32085fda91b8ebe": "200000000000000000000", + "0xf15e182c4fbbad79bd93342242d4dccf2be58925": "1940000000000000000000", + "0x1548b770a5118ede87dba2f690337f616de683ab": "527558000000000000000", + "0x69c2d835f13ee90580408e6a3283c8cca6a434a2": "656000000000000000000", + "0xa1e4380a3b1f749673e270229993ee55f35663b4": "2000000000000000000000", + "0xc7675e5647b9d8daf4d3dff1e552f6b07154ac38": "180000000000000000000", + "0xa02c1e34064f0475f7fa831ccb25014c3aa31ca2": "60000000000000000000", + "0x517c75430de401c341032686112790f46d4d369e": "388000000000000000000", + "0x29681d9912ddd07eaabb88d05d90f766e862417d": "1000000000000000000000", + "0x544dda421dc1eb73bb24e3e56a248013b87c0f44": "1970000000000000000000", + "0x2ab97e8d59eee648ab6caf8696f89937143864d6": "3820000000000000000000", + "0x79c130c762b8765b19d2abc9a083ab8f3aad7940": "3940000000000000000000", + "0xf9650d6989f199ab1cc479636ded30f241021f65": "850000000000000000000", + "0xd1c96e70f05ae0e6cd6021b2083750a7717cde56": "500000000000000000000", + "0x88106c27d20b74b4b98ca62b232bd5c97411171f": "197000000000000000000", + "0x37ab66083a4fa23848b886f9e66d79cdc150cc70": "88510000000000000000000", + "0x8e6156336be2cdbe32140df08a2ba55fd0a58463": "74480000000000000000", + "0x2982d76a15f847dd41f1922af368fe678d0e681e": "100000000000000000000", + "0x209e8e29d33beae8fb6baa783d133e1d9ec1bc0b": "835000000000000000000", + "0xb325674c01e3f7290d5226339fbeac67d221279f": "2800000000000000000000", + "0xf20c9a99b74759d782f25c1ceca802a27e0b436c": "1670000000000000000000", + "0x61bf84d5ab026f58c873f86ff0dfca82b55733ae": "2000000000000000000000", + "0x0734a0a81c9562f4d9e9e10a8503da15db46d76e": "18200000000000000000", + "0x0521bc3a9f8711fecb10f50797d71083e341eb9d": "20000000000000000000", + "0x3301d9ca2f3bfe026279cd6819f79a293d98156e": "50000000000000000000000", + "0x549d51af29f724c967f59423b85b2681e7b15136": "3760000000000000000000", + "0x2053ac97548a0c4e8b80bc72590cd6a098fe7516": "187000000000000000000", + "0xaa321fdbd449180db8ddd34f0fe906ec18ee0914": "685000000000000000000", + "0x697f55536bf85ada51841f0287623a9f0ed09a17": "10000000000000000000000", + "0xdf57353aaff2aadb0a04f9014e8da7884e86589c": "152800000000000000000", + "0x6807ddc88db489b033e6b2f9a81553571ab3c805": "29944000000000000000", + "0x90057af9aa66307ec9f033b29724d3b2f41eb6f9": "121930000000000000000000", + "0x3ff836b6f57b901b440c30e4dbd065cf37d3d48c": "200000000000000000000", + "0x91051764af6b808e4212c77e30a5572eaa317070": "1000000000000000000000", + "0x7faa30c31519b584e97250ed2a3cf3385ed5fd50": "2000000000000000000000", + "0xfb842ca2c5ef133917a236a0d4ac40690110b038": "306000000000000000000", + "0xaa167026d39ab7a85635944ed9edb2bfeba11850": "8298000000000000000000", + "0x57beea716cbd81700a73d67f9ff039529c2d9025": "200000000000000000000", + "0x654b7e808799a83d7287c67706f2abf49a496404": "1970000000000000000000", + "0xdde8f0c31b7415511dced1cd7d46323e4bd12232": "1610000000000000000000", + "0x8667fa1155fed732cfb8dca5a0d765ce0d0705ed": "81770000000000000000", + "0x905526568ac123afc0e84aa715124febe83dc87c": "17900000000000000000", + "0x8e98766524b0cf2747c50dd43b9567594d9731de": "1997200000000000000000", + "0xc6df2075ebd240d44869c2be6bdf82e63d4ef1f5": "20000000000000000000", + "0x2ff5cab12c0d957fd333f382eeb75107a64cb8e8": "10000000000000000000000", + "0x3055efd26029e0d11b930df4f53b162c8c3fd2ce": "499938000000000000000", + "0xb2c53efa33fe4a3a1a80205c73ec3b1dbcad0602": "1918595000000000000000", + "0x766b3759e8794e926dac473d913a8fb61ad0c2c9": "86500000000000000000", + "0x882aa798bf41df179f85520130f15ccdf59b5e58": "2000000000000000000000", + "0x80b23d380b825c46e0393899a85556462da0e18c": "2000000000000000000000", + "0x51f4663ab44ff79345f427a0f6f8a6c8a53ff234": "20000000000000000000000", + "0x8d5ef172bf77315ea64e85d0061986c794c6f519": "3940000000000000000000", + "0x75ac547017134c04ae1e11d60e63ec04d18db4ef": "6000000000000000000000", + "0xce1b0cb46aaecfd79b880cad0f2dda8a8dedd0b1": "20000000000000000000", + "0x21408b4d7a2c0e6eca4143f2cacdbbccba121bd8": "20000000000000000000000", + "0x9c526a140683edf1431cfaa128a935e2b614d88b": "111000000000000000000", + "0x599728a78618d1a17b9e34e0fed8e857d5c40622": "14000000000000000000000", + "0x6ac4d4be2db0d99da3faaaf7525af282051d6a90": "80185000000000000000", + "0x785c8ea774d73044a734fa790a1b1e743e77ed7c": "238750000000000000000", + "0xff2726294148b86c78a9372497e459898ed3fee3": "1970000000000000000000", + "0x68a86c402388fddc59028fec7021e98cbf830eac": "19100000000000000000", + "0x6121af398a5b2da69f65c6381aec88ce9cc6441f": "640000000000000000000", + "0x5a6686b0f17e07edfc59b759c77d5bef164d3879": "1490000000000000000000", + "0xa2d38de1c73906f6a7ca6efeb97cf6f69cc421be": "1000000000000000000000", + "0xae3f98a443efe00f3e711d525d9894dc9a61157b": "295500000000000000000", + "0x5f1c8a04c90d735b8a152909aeae636fb0ce1665": "6999974000000000000000", + "0xd687cec0059087fdc713d4d2d65e77daefedc15f": "60000000000000000000", + "0x845203750f7148a9aa262921e86d43bf641974fd": "100000000000000000000", + "0x64464a6805b462412a901d2db8174b06c22deea6": "475600000000000000000", + "0x053471cd9a41925b3904a5a8ffca3659e034be23": "199600000000000000000", + "0x911ff233e1a211c0172c92b46cf997030582c83a": "1970000000000000000000", + "0xd930b27a78876485d0f48b70dd5336549679ca8f": "40000000000000000000", + "0x6ba9b21b35106be159d1c1c2657ac56cd29ffd44": "4480000000000000000000", + "0xebac2b4408ef5431a13b8508e86250982114e145": "4000000000000000000000", + "0x931df34d1225bcd4224e63680d5c4c09bce735a6": "68000000000000000000", + "0x23eb6fd85671a9063ab7678ebe265a20f61a02b3": "2000000000000000000000", + "0xb32af3d3e8d075344926546f2e32887bf93b16bd": "200000000000000000000", + "0x8261fa230c901d43ff579f4780d399f31e6076bc": "2000000000000000000000", + "0x84a74ceecff65cb93b2f949d773ef1ad7fb4a245": "92998000000000000000", + "0xda982e9643ffece723075a40fe776e5ace04b29b": "160884000000000000000", + "0xba70e8b4759c0c3c82cc00ac4e9a94dd5bafb2b8": "890342000000000000000", + "0x82f2e991fd324c5f5d17768e9f61335db6319d6c": "500000000000000000000", + "0x3e84b35c5b2265507061d30b6f12da033fe6f8b9": "1790000000000000000000", + "0x2895e80999d406ad592e2b262737d35f7db4b699": "1940000000000000000000", + "0x65f534346d2ffb787fa9cf185d745ba42986bd6e": "500000000000000000000", + "0xc7368b9709a5c1b51c0adf187a65df14e12b7dba": "9489681000000000000000", + "0xba176dbe3249e345cd4fa967c0ed13b24c47e586": "399990000000000000000", + "0xcff6a6fe3e9a922a12f21faa038156918c4fcb9c": "78800000000000000000", + "0xbcbd31252ec288f91e298cd812c92160e738331a": "1975802000000000000000", + "0x5543dd6d169eec8a213bbf7a8af9ffd15d4ff759": "18200000000000000000", + "0xb65bd780c7434115162027565223f44e5498ff8c": "19999800000000000000000", + "0x4cadf573ce4ceec78b8e1b21b0ed78eb113b2c0e": "2000000000000000000000", + "0x04aafc8ae5ce6f4903c89d7fac9cb19512224777": "500000000000000000000", + "0xfdc4d4765a942f5bf96931a9e8cc7ab8b757ff4c": "87000000000000000000000", + "0x38c7851f5ffd4cee98df30f3b25597af8a6ca263": "2631920000000000000000", + "0x0e320219838e859b2f9f18b72e3d4073ca50b37d": "2000000000000000000000", + "0xbbbf39b1b67995a42241504f9703d2a14a515696": "1580000000000000000000", + "0x5b800bfd1b3ed4a57d875aed26d42f1a7708d72a": "6392000000000000000000", + "0x5b85e60e2af0544f2f01c64e2032900ebd38a3c7": "2000000000000000000000", + "0xc9ac01c3fb0929033f0ccc7e1acfeaaba7945d47": "12459235000000000000000", + "0xf355d3ec0cfb907d8dbb1bf3464e458128190bac": "4925600000000000000000", + "0x69c08d744754de709ce96e15ae0d1d395b3a2263": "1000000000000000000000", + "0xcef77451dfa2c643e00b156d6c6ff84e2373eb66": "188000000000000000000", + "0xf3034367f87d24d3077fa9a2e38a8b0ccb1104ef": "1000000000000000000000", + "0x73473e72115110d0c3f11708f86e77be2bb0983c": "20000000000000000000", + "0x761e6caec189c230a162ec006530193e67cf9d19": "2000000000000000000000", + "0xe9caf827be9d607915b365c83f0d3b7ea8c79b50": "3000000000000000000000", + "0xeda4b2fa59d684b27a810df8978a73df308a63c2": "4000000000000000000000", + "0x065ff575fd9c16d3cb6fd68ffc8f483fc32ec835": "200000000000000000000", + "0xa72ee666c4b35e82a506808b443cebd5c632c7dd": "800000000000000000000", + "0x5b30608c678e1ac464a8994c3b33e5cdf3497112": "400000000000000000000", + "0xb0c7ce4c0dc3c2bbb99cc1857b8a455f611711ce": "4000000000000000000000", + "0xd7274d50804d9c77da93fa480156efe57ba501de": "1940000000000000000000", + "0xa609c26dd350c235e44b2b9c1dddccd0a9d9f837": "1000000000000000000000", + "0xbddfa34d0ebf1b04af53b99b82494a9e3d8aa100": "12000000000000000000000", + "0xfd40242bb34a70855ef0fd90f3802dec2136b327": "1930600000000000000000", + "0x58aed6674affd9f64233272a578dd9386b99c263": "3400000000000000000000", + "0x24434a3e32e54ecf272fe3470b5f6f512f675520": "5910000000000000000000", + "0xa379a5070c503d2fac89b8b3afa080fd45ed4bec": "19700000000000000000000", + "0x37e169a93808d8035698f815c7235613c1e659f2": "1000000000000000000000", + "0x849b116f596301c5d8bb62e0e97a8248126e39f3": "300000000000000000000", + "0xfe7011b698bf3371132d7445b19eb5b094356aee": "2000000000000000000000", + "0xf16de1891d8196461395f9b136265b3b9546f6ef": "31313000000000000000", + "0x6c6564e5c9c24eaaa744c9c7c968c9e2c9f1fbae": "1357800000000000000000", + "0x8bb0212f3295e029cab1d961b04133a1809e7b91": "2000000000000000000000", + "0x408a69a40715e1b313e1354e600800a1e6dc02a5": "35144000000000000000", + "0xddf0cce1fe996d917635f00712f4052091dff9ea": "2000000000000000000000", + "0x50fef296955588caae74c62ec32a23a454e09ab8": "1201200000000000000000", + "0xd913f0771949753c4726acaa2bd3619c5c20ff77": "3000000000000000000000", + "0x9d6ecfa03af2c6e144b7c4692a86951e902e9e1f": "3000310000000000000000", + "0xecbe5e1c9ad2b1dccf0a305fc9522f4669dd3ae7": "5000000000000000000000", + "0x33e9b71823952e1f66958c278fc28b1196a6c5a4": "100000000000000000000", + "0x9de20bc37e7f48a80ffd7ad84ffbf1a1abe1738c": "200000000000000000000", + "0x16f313cf8ad000914a0a176dc6a4342b79ec2538": "2000000000000000000000", + "0x991ac7ca7097115f26205eee0ef7d41eb4e311ae": "20000000000000000000", + "0xddfafdbc7c90f1320e54b98f374617fbd01d109f": "13370000000000000000", + "0x26b11d066588ce74a572a85a6328739212aa8b40": "2000000000000000000000", + "0xef2c34bb487d3762c3cca782ccdd7a8fbb0a9931": "180000000000000000000", + "0xa9be88ad1e518b0bbb024ab1d8f0e73f790e0c76": "2800000000000000000000", + "0x4a7494cce44855cc80582842be958a0d1c0072ee": "2400000000000000000000", + "0x23569542c97d566018c907acfcf391d14067e87e": "2000000000000000000000", + "0xd252960b0bf6b2848fdead80136db5f507f8be02": "2000000000000000000000", + "0x2c0f5b9df43625798e7e03c1a5fd6a6d091af82b": "31200000000000000000", + "0xa7c9d388ebd873e66b1713448397d0f37f8bd3a8": "5000000000000000000000", + "0x3259bd2fddfbbc6fbad3b6e874f0bbc02cda18b5": "11886645000000000000000", + "0xf287ff52f461117adb3e1daa71932d1493c65f2e": "3640000000000000000000", + "0xc852428d2b586497acd30c56aa13fb5582f84402": "945600000000000000000", + "0x296f00de1dc3bb01d47a8ccd1e5d1dd9a1eb7791": "1000000000000000000000", + "0x817493cd9bc623702a24a56f9f82e3fd48f3cd31": "2920000000000000000000", + "0x7adfedb06d91f3cc7390450b85550270883c7bb7": "322312000000000000000", + "0x8d544c32c07fd0842c761d53a897d6c950bb7599": "200000000000000000000", + "0x86297d730fe0f7a9ee24e08fb1087b31adb306a7": "2000000000000000000000", + "0xf64fe0939a8d1eea2a0ecd9a9730fd7958e33109": "20600000000000000000", + "0xb06eab09a610c6a53d56a946b2c43487ac1d5b2d": "1000000000000000000000", + "0xbae9b82f7299631408659dd74e891cb8f3860fe5": "1970000000000000000000", + "0x0eda80f4ed074aea697aeddf283b63dbca3dc4da": "2000000000000000000000", + "0xea686c5057093c171c66db99e01b0ececb308683": "384907000000000000000", + "0x425725c0f08f0811f5f006eec91c5c5c126b12ae": "150000000000000000000", + "0xb18e67a5050a1dc9fb190919a33da838ef445014": "20000000000000000000", + "0x8dd484ff8a307364eb66c525a571aac701c5c318": "4000000000000000000000", + "0x6671b182c9f741a0cd3c356c73c23126d4f9e6f4": "200000000000000000000", + "0xba0249e01d945bef93ee5ec61925e03c5ca509fd": "4000000000000000000000", + "0xb2968f7d35f208871631c6687b3f3daeabc6616c": "156060000000000000000", + "0xa6f62b8a3d7f11220701ab9ffffcb327959a2785": "506000000000000000000", + "0xc885a18aabf4541b7b7b7ecd30f6fae6869d9569": "2000000000000000000000", + "0x33fb577a4d214fe010d32cca7c3eeda63f87ceef": "1000000000000000000000", + "0xbe86d0b0438419ceb1a038319237ba5206d72e46": "999942000000000000000", + "0x466292f0e80d43a78774277590a9eb45961214f4": "970000000000000000000", + "0xb33c0323fbf9c26c1d8ac44ef74391d0804696da": "20000000000000000000", + "0xf7bc4c44910d5aedd66ed2355538a6b193c361ec": "96980000000000000000", + "0xd0f04f52109aebec9a7b1e9332761e9fe2b97bb5": "4000000000000000000000", + "0xcb4a914d2bb029f32e5fef5c234c4fec2d2dd577": "1800000000000000000000", + "0x2e619f57abc1e987aa936ae3a2264962e7eb2d9a": "756000000000000000000", + "0x166bf6dab22d841b486c38e7ba6ab33a1487ed8c": "20000000000000000000000", + "0xc3a046e3d2b2bf681488826e32d9c061518cfe8c": "2600000000000000000000", + "0xd082275f745a2cac0276fbdb02d4b2a3ab1711fe": "30000000000000000000", + "0xa701df79f594901afe1444485e6b20c3bda2b9b3": "1000000000000000000000", + "0xdec3eec2640a752c466e2b7e7ee685afe9ac41f4": "1324245000000000000000", + "0x8134dd1c9df0d6c8a5812426bb55c761ca831f08": "122360000000000000000", + "0xbfc57aa666fae28e9f107a49cb5089a4e22151dd": "1000000000000000000000", + "0xc3c2297329a6fd99117e54fc6af379b4d556547e": "6000000000000000000000", + "0x40585200683a403901372912a89834aadcb55fdb": "2000000000000000000000", + "0xcd49bf185e70d04507999f92a4de4455312827d0": "1000000000000000000000", + "0x9c6bc9a46b03ae5404f043dfcf21883e4110cc33": "200000000000000000000", + "0x1f49b86d0d3945590698a6aaf1673c37755ca80d": "700000000000000000000", + "0xefeb1997aad277cc33430e6111ed0943594048b8": "2000000000000000000000", + "0x7c0883054c2d02bc7a852b1f86c42777d0d5c856": "500000000000000000000", + "0xff49a775814ec00051a795a875de24592ea400d4": "200000000000000000000000", + "0xf039683d7b3d225bc7d8dfadef63163441be41e2": "34380000000000000000", + "0xa3ba0d3a3617b1e31b4e422ce269e873828d5d69": "850000000000000000000", + "0xd116f3dcd5db744bd008887687aa0ec9fd7292aa": "1000000000000000000000", + "0x5719f49b720da68856f4b9e708f25645bdbc4b41": "640000000000000000000", + "0x870796abc0db84af82da52a0ed68734de7e636f5": "300000000000000000000", + "0x68b6854788a7c6496cdbf5f84b9ec5ef392b78bb": "19700000000000000000000", + "0x8c2fbeee8eacc5c5d77c16abd462ee9c8145f34b": "1940000000000000000000", + "0x421684baa9c0b4b5f55338e6f6e7c8e146d41cb7": "1500000000000000000000", + "0xdd26b429fd43d84ec179825324bad5bfb916b360": "5142000000000000000000", + "0x3821862493242c0aeb84b90de05d250c1e50c074": "322200000000000000000", + "0x68a7425fe09eb28cf86eb1793e41b211e57bd68d": "668500000000000000000", + "0xda875e4e2f3cabe4f37e0eaed7d1f6dcc6ffef43": "2000000000000000000000", + "0xc2663f8145dbfec6c646fc5c49961345de1c9f11": "690000000000000000000", + "0xe89c22f1a4e1d4746ecfaa59ed386fee12d51e37": "44932000000000000000", + "0xeff86b5123bcdc17ed4ce8e05b7e12e51393a1f7": "500000000000000000000", + "0x6c3d18704126aa99ee3342ce60f5d4c85f1867cd": "50000000000000000000", + "0xb8d531a964bcea13829620c0ced72422dadb4cca": "169990000000000000000", + "0x7c29d47d57a733f56b9b217063b513dc3b315923": "4000000000000000000000", + "0xbc1e80c181616342ebb3fb3992072f1b28b802c6": "4000000000000000000000", + "0x31313ffd635bf2f3324841a88c07ed146144ceeb": "1970000000000000000000", + "0xcc4feb72df98ff35a138e01761d1203f9b7edf0a": "7000000000000000000000", + "0x741693c30376508513082020cc2b63e9fa92131b": "1200000000000000000000", + "0xaa3135cb54f102cbefe09e96103a1a796718ff54": "57800000000000000000", + "0xef61155ba009dcdebef10b28d9da3d1bc6c9ced4": "59100000000000000000", + "0xb3c94811e7175b148b281c1a845bfc9bb6fbc115": "200000000000000000000", + "0x96d9cca8f55eea0040ec6eb348a1774b95d93ef4": "4000000000000000000000", + "0xce62125adec3370ac52110953a4e760be9451e3b": "152000000000000000000", + "0xaca1e6bc64cc3180f620e94dc5b1bcfd8158e45d": "2000000000000000000000", + "0xbc237148d30c13836ffa2cad520ee4d2e5c4eeff": "1970000000000000000000", + "0x0e024e7f029c6aaf3a8b910f5e080873b85795aa": "1000000000000000000000", + "0x7283cd4675da58c496556151dafd80c7f995d318": "760000000000000000000", + "0x39b299327490d72f9a9edff11b83afd0e9d3c450": "200000000000000000000", + "0x5f333a3b2310765a0d1832b9be4c0a03704c1c09": "1000000000000000000000", + "0x5aaf1c31254a6e005fba7f5ab0ec79d7fc2b630e": "5910000000000000000000", + "0x833db42c14163c7be4cab86ac593e06266d699d5": "174212000000000000000000", + "0xf32d25eb0ea2b8b3028a4c7a155dc1aae865784d": "5710684000000000000000", + "0x1fa2319fed8c2d462adf2e17feec6a6f30516e95": "125300000000000000000", + "0xc49cfaa967f3afbf55031061fc4cef88f85da584": "2000000000000000000000", + "0x43db7ff95a086d28ebbfb82fb8fb5f230a5ebccd": "16100000000000000000", + "0xcf3f9128b07203a3e10d7d5755c0c4abc6e2cac2": "5000000000000000000000", + "0x8f4d1e7e4561284a34fef9673c0d34e12af4aa03": "2000000000000000000000", + "0x934af21b7ebfa467e2ced65aa34edd3a0ec71332": "35420000000000000000000", + "0x5d231a70c1dfeb360abd97f616e2d10d39f3cab5": "400000000000000000000", + "0x2d5d7335acb0362b47dfa3a8a4d3f5949544d380": "200000000000000000000", + "0xd1e1f2b9c16c309874dee7fac32675aff129c398": "72800000000000000000", + "0xa43b6da6cb7aac571dff27f09d39f846f53769b1": "380000000000000000000", + "0x779274bf1803a336e4d3b00ddd93f2d4f5f4a62e": "1000000000000000000000", + "0xa644ed922cc237a3e5c4979a995477f36e50bc62": "583900000000000000000", + "0xee6c03429969ca1262cb3f0a4a54afa7d348d7f5": "256100000000000000000", + "0x4f06246b8d4bd29661f43e93762201d286935ab1": "4818730000000000000000", + "0xe04972a83ca4112bc871c72d4ae1616c2f0728db": "267606000000000000000", + "0xdf098f5e4e3dffa51af237bda8652c4f73ed9ca6": "502000000000000000000", + "0xdfded2574b27d1613a7d98b715159b0d00baab28": "20000000000000000000000", + "0x17d931d4c56294dcbe77c8655be4695f006d4a3c": "2000000000000000000000", + "0x3ccb71aa6880cb0b84012d90e60740ec06acd78f": "2000000000000000000000", + "0xe57d2995b0ebdf3f3ca6c015eb04260dbb98b7c6": "2000000000000000000000", + "0xfb3860f4121c432ebdc8ec6a0331b1b709792e90": "600400000000000000000", + "0xfa00c376e89c05e887817a9dd0748d96f341aa89": "300700000000000000000", + "0xc7a018f0968a51d1f6603c5c49dc545bcb0ff293": "4000000000000000000000", + "0x7d73863038ccca22f96affda10496e51e1e6cd48": "20000000000000000000", + "0x38ea6f5b5a7b88417551b4123dc127dfe9342da6": "400000000000000000000", + "0x014b7f67b14f5d983d87014f570c8b993b9872b5": "200000000000000000000", + "0x8ac89bd9b8301e6b0677fa25fcf0f58f0cc7b611": "20000000000000000000", + "0x7eb4b0185c92b6439a08e7322168cb353c8a774a": "10165988000000000000000", + "0xd29dc08efbb3d72e263f78ab7610d0226de76b00": "12000000000000000000000", + "0x72a8260826294726a75bf39cd9aa9e07a3ea14cd": "2000000000000000000000", + "0x4cb5c6cd713ca447b848ae2f56b761ca14d7ad57": "267400000000000000000", + "0x49185dd7c23632f46c759473ebae966008cd3598": "254030000000000000000", + "0x13d67a7e25f2b12cdb85585009f8acc49b967301": "1999944000000000000000", + "0x9d913b5d339c95d87745562563fea98b23c60cc4": "170718000000000000000", + "0xabdc9f1bcf4d19ee96591030e772c334302f7d83": "40110000000000000000000", + "0xe9a5ae3c9e05977dd1069e9fd9d3aefbae04b8df": "1970000000000000000000", + "0x1fd296be03ad737c92f9c6869e8d80a71c5714aa": "13370000000000000000", + "0x2f13657526b177cad547c3908c840eff647b45d9": "1170685000000000000000", + "0xe69fcc26ed225f7b2e379834c524d70c1735e5bc": "2000000000000000000000", + "0xbade43599e02f84f4c3014571c976b13a36c65ab": "4000000000000000000000", + "0x184a4f0beb71ffd558a6b6e8f228b78796c4cf3e": "12000000000000000000000", + "0xd1de5aad3a5fd803f1b1aeb6103cb8e14fe723b7": "20000000000000000000", + "0x0bd67dbde07a856ebd893b5edc4f3a5be4202616": "2000000000000000000000", + "0x6b30f1823910b86d3acb5a6afc9defb6f3a30bf8": "4200000000000000000000", + "0x9a63d185a79129fdab19b58bb631ea36a420544e": "42000000000000000000", + "0xdf660a91dab9f730f6190d50c8390561500756ca": "2000000000000000000000", + "0xa1a1f0fa6d20b50a794f02ef52085c9d036aa6ca": "1000000000000000000000", + "0x4ec768295eeabafc42958415e22be216cde77618": "59600000000000000000", + "0xc348fc5a461323b57be303cb89361b991913df28": "100000000000000000000000", + "0x3a7db224acae17de7798797d82cdf8253017dfa8": "5000000000000000000000", + "0x8bea40379347a5c891d59a6363315640f5a7e07a": "1999992000000000000000", + "0x2257fca16a6e5c2a647c3c29f36ce229ab93b17e": "4000000000000000000000", + "0xe492818aa684e5a676561b725d42f3cc56ae5198": "800000000000000000000", + "0xc841884fa4785fb773b28e9715fae99a5134305d": "2000000000000000000000", + "0x0d9443a79468a5bbf7c13c6e225d1de91aee07df": "70000000000000000000", + "0x6d4008b4a888a826f248ee6a0b0dfde9f93210b9": "5460000000000000000000", + "0x884980eb4565c1048317a8f47fdbb461965be481": "3999922000000000000000", + "0x985d70d207892bed398590024e2421b1cc119359": "20000000000000000000000", + "0xd9ec8fe69b7716c0865af888a11b2b12f720ed33": "4000000000000000000000", + "0x49b74e169265f01a89ec4c9072c5a4cd72e4e835": "16100000000000000000000", + "0x4c3e95cc3957d252ce0bf0c87d5b4f2234672e70": "2500000000000000000000", + "0xd9ff115d01266c9f73b063c1c238ef3565e63b36": "680000000000000000000", + "0x48c5c6970b9161bb1c7b7adfed9cdede8a1ba864": "4000000000000000000000", + "0xea6afe2cc928ac8391eb1e165fc40040e37421e7": "2997569000000000000000", + "0x08ccda50e4b26a0ffc0ef92e9205310706bec2c7": "6077440000000000000000", + "0xe6e9a39d750fe994394eb68286e5ea62a6997882": "600000000000000000000", + "0x4b58101f44f7e389e12d471d1635b71614fdd605": "160000000000000000000", + "0x8d93dac785f88f1a84bf927d53652b45a154ccdd": "158000000000000000000", + "0x415d096ab06293183f3c033d25f6cf7178ac3bc7": "40000000000000000000", + "0xc3e387b03ce95ccfd7fa51dd840183bc43532809": "2000000000000000000000", + "0xda34b2eae30bafe8daeccde819a794cd89e09549": "2000000000000000000000", + "0xfa279bfd8767f956bf7fa0bd5660168da75686bd": "2674000000000000000000", + "0xb98ca31785ef06be49a1e47e864f60d076ca472e": "4000000000000000000000", + "0xb768b5234eba3a9968b34d6ddb481c8419b3655d": "14974000000000000000", + "0x31047d703f63b93424fbbd6e2f1f9e74de13e709": "2850123000000000000000", + "0x9a24ce8d485cc4c86e49deb39022f92c7430e67e": "1300000000000000000000", + "0xe62f9d7c64e8e2635aeb883dd73ba684ee7c1079": "8000000000000000000000", + "0xf15d9d5a21b1929e790371a17f16d95f0c69655c": "2000000000000000000000", + "0x285ae51b9500c58d541365d97569f14bb2a3709b": "2000000000000000000000", + "0x09c177f1ae442411ddacf187d46db956148360e7": "8950000000000000000000", + "0x12173074980153aeaa4b0dcbc7132eadcec21b64": "240000000000000000000", + "0x351f16e5e0735af56751b0e225b2421171394090": "13370000000000000000000", + "0xac52b77e15664814f39e4f271be641308d91d6cc": "220000000000000000000", + "0x99c883258546cc7e4e971f522e389918da5ea63a": "4000000000000000000000", + "0xaa16269aac9c0d803068d82fc79151dadd334b66": "4000000000000000000000", + "0x7c9a110cb11f2598b2b20e2ca400325e41e9db33": "26000000000000000000000", + "0x583e83ba55e67e13e0e76f8392d873cd21fbf798": "20000000000000000000", + "0x555ebe84daa42ba256ea789105cec4b693f12f18": "100000000000000000000", + "0x978c430ce4359b06bc2cdf5c2985fc950e50d5c8": "480000000000000000000", + "0xdc1eb9b6e64351f56424509645f83e79eee76cf4": "4000000000000000000000", + "0x5b290c01967c812e4dc4c90b174c1b4015bae71e": "149946000000000000000", + "0xe7d213947fcb904ad738480b1eed2f5c329f27e8": "18718000000000000000", + "0xc517d0315c878813c717e18cafa1eab2654e01da": "10000000000000000000000", + "0x7e972a8a7c2a44c93b21436c38d21b9252c345fe": "1790000000000000000000", + "0x9cb28ac1a20a106f7f373692c5ce4c73f13732a1": "1000000000000000000000", + "0x14ab164b3b524c82d6abfbc0de831126ae8d1375": "2000000000000000000000", + "0xd46f8223452982a1eea019a8816efc2d6fc00768": "137000000000000000000", + "0x5cdc4708f14f40dcc15a795f7dc8cb0b7faa9e6e": "537000000000000000000", + "0x66fdc9fee351fa1538eb0d87d819fcf09e7c106a": "6016500000000000000000", + "0xe7be82c6593c1eeddd2ae0b15001ff201ab57b2f": "19100000000000000000", + "0x47d20e6ae4cad3f829eac07e5ac97b66fdd56cf5": "1000000000000000000000", + "0x0f2d8daf04b5414a0261f549ff6477b80f2f1d07": "200000000000000000000000", + "0x84bfcef0491a0ae0694b37ceac024584f2aa0467": "1999944000000000000000", + "0xec5feafe210c12bfc9a5d05925a123f1e73fbef8": "456000000000000000000000", + "0x7023c70956e04a92d70025aad297b539af355869": "2000000000000000000000", + "0xd66ddf1159cf22fd8c7a4bc8d5807756d433c43e": "2200000000000000000000", + "0xd0638ea57189a6a699024ad78c71d939c1c2ff8c": "2632000000000000000000", + "0x70d25ed2c8ada59c088cf70dd22bf2db93acc18a": "1056600000000000000000", + "0xa4875928458ec2005dbb578c5cd33580f0cf1452": "1000000000000000000000", + "0xb5ad5157dda921e6bafacd9086ae73ae1f611d3f": "2000000000000000000000", + "0xc493489e56c3bdd829007dc2f956412906f76bfa": "48968000000000000000", + "0xc57612de91110c482e6f505bcd23f3c5047d1d61": "3580000000000000000000", + "0x9b18478655a4851cc906e660feac61f7f4c8bffc": "4174120000000000000000", + "0xb21b7979bf7c5ca01fa82dd640b41c39e6c6bc75": "1999944000000000000000", + "0xa9d4a2bcbe5b9e0869d70f0fe2e1d6aacd45edc5": "198800000000000000000", + "0x6f29bb375be5ed34ed999bb830ee2957dde76d16": "2000000000000000000000", + "0xa006268446643ec5e81e7acb3f17f1c351ee2ed9": "4000000000000000000000", + "0x42ddd014dc52bfbcc555325a40b516f4866a1dd3": "2000000000000000000000", + "0xd6d6776958ee23143a81adadeb08382009e996c2": "3000000000000000000000", + "0xd34e03d36a2bd4d19a5fa16218d1d61e3ffa0b15": "320000000000000000000", + "0xdac0c177f11c5c3e3e78f2efd663d13221488574": "1000000000000000000000", + "0x814135da8f9811075783bf1ab67062af8d3e9f40": "20000000000000000000", + "0x7c3eb713c4c9e0381cd8154c7c9a7db8645cde17": "200000000000000000000", + "0xf49c47b3efd86b6e6a5bc9418d1f9fec814b69ef": "20000000000000000000000", + "0x35f1da127b83376f1b88c82a3359f67a5e67dd50": "1910000000000000000000", + "0x44dfba50b829becc5f4f14d1b04aab3320a295e5": "1000000000000000000000", + "0x0b924df007e9c0878417cfe63b976ea1a382a897": "40000000000000000000", + "0x82438fd2b32a9bdd674b49d8cc5fa2eff9781847": "20000000000000000000", + "0x794529d09d017271359730027075b87ad83dae6e": "310000000000000000000", + "0xf4b49100757772f33c177b9a76ba95226c8f3dd8": "6700000000000000000000", + "0x8563c49361b625e768771c96151dbfbd1c906976": "2000000000000000000000", + "0x0b9df80fbe232009dacf0aa8cac59376e2476203": "2000000000000000000000", + "0x149b6dbde632c19f5af47cb493114bebd9b03c1f": "12000000000000000000000", + "0xd7a1431ee453d1e49a0550d1256879b4f5d10201": "1670000000000000000000", + "0x1d37616b793f94911838ac8e19ee9449df921ec4": "1500000000000000000000", + "0xd6670c036df754be43dadd8f50feea289d061fd6": "5988459000000000000000", + "0x02778e390fa17510a3428af2870c4273547d386c": "16163700000000000000000", + "0xb89f4632df5909e58b2a9964f74feb9a3b01e0c5": "21406707000000000000000", + "0x76c27535bcb59ce1fa2d8c919cabeb4a6bba01d1": "2000000000000000000000", + "0x36bf43ff35df90908824336c9b31ce33067e2f50": "346837200000000000000000", + "0xb53bcb174c2518348b818aece020364596466ba3": "2000000000000000000000", + "0xb4dd460cd016725a64b22ea4f8e06e06674e033e": "5370000000000000000000", + "0xcda1741109c0265b3fb2bf8d5ec9c2b8a3346b63": "20000000000000000000", + "0xfeb8b8e2af716ae41fc7c04bcf29540156461e6b": "1555396000000000000000", + "0xa49f523aa51364cbc7d995163d34eb590ded2f08": "2659160000000000000000", + "0xa7e74f0bdb278ff0a805a648618ec52b166ff1be": "100000000000000000000", + "0x5ead29037a12896478b1296ab714e9cb95428c81": "71500000000000000000", + "0xcdecf5675433cdb0c2e55a68db5d8bbe78419dd2": "20000000000000000000", + "0xc24ccebc2344cce56417fb684cf81613f0f4b9bd": "1550000000000000000000", + "0x5a70106f20d63f875265e48e0d35f00e17d02bc9": "20000000000000000000", + "0x2606c3b3b4ca1b091498602cb1978bf3b95221c0": "400000000000000000000", + "0x1ad4563ea5786be1159935abb0f1d5879c3e7372": "6000000000000000000000", + "0xb782bfd1e2de70f467646f9bc09ea5b1fcf450af": "267400000000000000000", + "0x649a2b9879cd8fb736e6703b0c7747849796f10f": "7358102000000000000000", + "0x1cc1d3c14f0fb8640e36724dc43229d2ea7a1e48": "1700000000000000000000", + "0x824b3c3c443e19295d7ef6faa7f374a4798486a8": "20000000000000000000", + "0xa7758cecb60e8f614cce96137ef72b4fbd07774a": "500000000000000000000", + "0x981f712775c0dad97518ffedcb47b9ad1d6c2762": "6685000000000000000000", + "0x26e801b62c827191dd68d31a011990947fd0ebe0": "20000000000000000000", + "0x95447046313b2f3a5e19b948fd3b8bedc82c717c": "500000000000000000000", + "0x0b701101a4109f9cb360dc57b77442673d5e5983": "2000000000000000000000", + "0x5b25cae86dcafa2a60e7723631fc5fa49c1ad87d": "2491200000000000000000", + "0xf73ac46c203be1538111b151ec8220c786d84144": "294515000000000000000", + "0xe8c3d3b0e17f97d1e756e684f94e1470f99c95a1": "400000000000000000000", + "0x8c900a8236b08c2b65405d39d75f20062a7561fd": "1640000000000000000000", + "0x43898c49a34d509bfed4f76041ee91caf3aa6aa5": "300000000000000000000", + "0xc85325eab2a59b3ed863c86a5f2906a04229ffa9": "465600000000000000000", + "0x4a430170152de5172633dd8262d107a0afd96a0f": "3160000000000000000000", + "0x6e0ee70612c976287d499ddfa6c0dcc12c06deea": "129980000000000000000", + "0x21c07380484f6cbc8724ad32bc864c3b5ad500b7": "1000000000000000000000", + "0xff5162f2354dc492c75fd6e3a107268660eecb47": "1700000000000000000000", + "0x8845e9f90e96336bac3c616be9d88402683e004c": "2000000000000000000000", + "0xf23c7b0cb8cd59b82bd890644a57daf40c85e278": "50038000000000000000", + "0x1784948bf99848c89e445638504dd698271b5924": "6037580000000000000000", + "0xb39f4c00b2630cab7db7295ef43d47d501e17fd7": "4000000000000000000000", + "0x3fb7d197b3ba4fe045efc23d50a14585f558d9b2": "20000000000000000000", + "0xbd043b67c63e60f841ccca15b129cdfe6590c8e3": "200000000000000000000", + "0x86ca0145957e6b0dfe36875fbe7a0dec55e17a28": "10000000000000000000000", + "0xdae7201eab8c063302930d693929d07f95e71962": "2687370000000000000000", + "0xcc034985d3f28c2d39b1a34bced4d3b2b6ca234e": "182000000000000000000", + "0x40e0dbf3efef9084ea1cd7e503f40b3b4a8443f6": "4000000000000000000000", + "0xb1896a37e5d8825a2d01765ae5de629977de8352": "200000000000000000000", + "0xd9f547f2c1de0ed98a53d161df57635dd21a00bd": "98500000000000000000", + "0x2fea1b2f834f02fc54333f8a809f0438e5870aa9": "20200000000000000000", + "0x68b31836a30a016ada157b638ac15da73f18cfde": "26000000000000000000", + "0xbc967fe4418c18b99858966d870678dca2b88879": "8740000000000000000000", + "0x16bae5d24eff91778cd98b4d3a1cc3162f44aa77": "401100000000000000000", + "0xf476e1267f86247cc908816f2e7ad5388c952db0": "4000000000000000000000", + "0x0203ae01d4c41cae1865e04b1f5b53cdfaecae31": "1006054000000000000000", + "0xbd4bd5b122d8ef7b7c8f0667450320db2116142e": "600000000000000000000", + "0xa394ad4fd9e6530e6f5c53faecbede81cb172da1": "5600000000000000000000", + "0x3a9960266df6492063538a99f487c950a3a5ec9e": "24000000000000000000000", + "0xd8069f84b521493f4715037f3226b25f33b60586": "1910000000000000000000", + "0x136c834bf111326d207395295b2e583ea7f33572": "100000000000000000000", + "0xc5c73d61cce7c8fe4c8fce29f39092cd193e0fff": "8000000000000000000000", + "0x3cfbf066565970639e130df2a7d16b0e14d6091c": "1700000000000000000000", + "0x61b905de663fc17386523b3a28e2f7d037a655cd": "500000000000000000000", + "0xfda0ce15330707f10bce3201172d2018b9ddea74": "51900000000000000000", + "0xf7fc45abf76f5088e2e5b5a8d132f28a4d4ec1c0": "2000000000000000000000", + "0xc3db9fb6f46c480af34465d79753b4e2b74a67ce": "20000000000000000000000", + "0xebe46cc3c34c32f5add6c3195bb486c4713eb918": "1000000000000000000000", + "0x91d2a9ee1a6db20f5317cca7fbe2313895db8ef8": "8499600000000000000000", + "0xc4cc45a2b63c27c0b4429e58cd42da59be739bd6": "1000000000000000000000", + "0xa43b81f99356c0af141a03010d77bd042c71c1ee": "2000000000000000000000", + "0x4c45d4c9a725d11112bfcbca00bf31186ccaadb7": "400000000000000000000", + "0xbf9f271f7a7e12e36dd2fe9facebf385fe6142bd": "62760000000000000000", + "0xe0ce80a461b648a501fd0b824690c8868b0e4de8": "500000000000000000000", + "0xa1f7dde1d738d8cd679ea1ee965bee224be7d04d": "1127000000000000000000", + "0x7f1c81ee1697fc144b7c0be5493b5615ae7fddca": "500200000000000000000", + "0xb508f987b2de34ae4cf193de85bff61389621f88": "6000000000000000000000", + "0x5f26cf34599bc36ea67b9e7a9f9b4330c9d542a3": "1000000000000000000000", + "0xd02108d2ae3cab10cbcf1657af223e027c8210f6": "2000140000000000000000", + "0x952183cfd38e352e579d36decec5b18450f7fba0": "2000000000000000000000", + "0xeb90c793b3539761e1c814a29671148692193eb4": "12000000000000000000000", + "0x1076212d4f758c8ec7121c1c7d74254926459284": "35000056000000000000000", + "0xf05ceeab65410564709951773c8445ad9f4ec797": "299982000000000000000", + "0x05361d8eb6941d4e90fb7e1418a95a32d5257732": "20000000000000000000", + "0xa5783bf33432ff82ac498985d7d460ae67ec3673": "1820000000000000000000", + "0xb1cd4bdfd104489a026ec99d597307a04279f173": "20000000000000000000000", + "0x876c3f218b4776df3ca9dbfb270de152d94ed252": "100000000000000000000", + "0x8a36869ad478997cbf6d8924d20a3c8018e9855b": "20000000000000000000", + "0xfb3fe09bb836861529d7518da27635f538505615": "1399904000000000000000", + "0xd093e829819fd2e25b973800bb3d5841dd152d05": "4000000000000000000000", + "0x126d91f7ad86debb0557c612ca276eb7f96d00a1": "100000000000000000000", + "0x2a81d27cb6d4770ff4f3c4a3ba18e5e57f07517c": "2000000000000000000000", + "0xc4f7b13ac6d4eb4db3d4e6a252af8a07bd5957da": "200000000000000000000", + "0x305d26c10bdc103f6b9c21272eb7cb2d9108c47e": "500000000000000000000", + "0xd0d0a2ad45f59a9dccc695d85f25ca46ed31a5a3": "840000000000000000000", + "0x522323aad71dbc96d85af90f084b99c3f09decb7": "6000000000000000000000", + "0xf43da3a4e3f5fab104ca9bc1a0f7f3bb4a56f351": "1999944000000000000000", + "0xa2dc65ee256b59a5bd7929774f904b358df3ada1": "21319600000000000000000", + "0xf382df583155d8548f3f93440cd5f68cb79d6026": "266619800000000000000000", + "0x0c967e3061b87a753e84507eb60986782c8f3013": "100000000000000000000", + "0xa3a262afd2936819230892fde84f2d5a594ab283": "1880000000000000000000", + "0x93868ddb2a794d02ebda2fa4807c76e3609858dc": "2027851000000000000000", + "0xcd35ff010ec501a721a1b2f07a9ca5877dfcf95a": "4011000000000000000000", + "0x5824a7e22838277134308c5f4b50dab65e43bb31": "6000000000000000000000", + "0x7f7a3a21b3f5a65d81e0fcb7d52dd00a1aa36dba": "100000000000000000000", + "0x30513fca9f36fd788cfea7a340e86df98294a244": "447000000000000000000", + "0x283e6252b4efcf4654391acb75f903c59b78c5fb": "12000000000000000000000", + "0xeddbaafbc21be8f25562f1ed6d05d6afb58f02c2": "2000000000000000000000", + "0x0dcfe837ea1cf28c65fccec3bef1f84e59d150c0": "200000000000000000000", + "0x828ba651cb930ed9787156299a3de44cd08b7212": "1337000000000000000000", + "0xcfd47493c9f89fe680bda5754dd7c9cfe7cb5bbe": "54508000000000000000", + "0x0e89eddd3fa0d71d8ab0ff8da5580686e3d4f74f": "2000000000000000000000", + "0x205f5166f12440d85762c967d3ae86184f8f4d98": "432500000000000000000", + "0x25dad495a11a86b9eeece1eeec805e57f157faff": "16000000000000000000000", + "0x6c84cba77c6db4f7f90ef13d5ee21e8cfc7f8314": "2000000000000000000000", + "0x91a787bc5196f34857fe0c372f4df376aaa76613": "2000000000000000000000", + "0xb0d3c9872b85056ea0c0e6d1ecf7a77e3ce6ab85": "4999711000000000000000", + "0x6e4d2e39c8836629e5b487b1918a669aebdd9536": "1000000000000000000000", + "0xdc703a5f3794c84d6cb3544918cae14a35c3bd4f": "1850000000000000000000", + "0x47beb20f759100542aa93d41118b3211d664920e": "2000000000000000000000", + "0x5a7735007d70b06844da9901cdfadb11a2582c2f": "6000000000000000000000", + "0xaff107960b7ec34ed690b665024d60838c190f70": "500000000000000000000", + "0x563a03ab9c56b600f6d25b660c21e16335517a75": "1000000000000000000000", + "0xa106465bbd19e1b6bce50d1b1157dc59095a3630": "2000000000000000000000", + "0xca9dec02841adf5cc920576a5187edd2bd434a18": "500000000000000000000", + "0x572ac1aba0de23ae41a7cae1dc0842d8abfc103b": "1910000000000000000000", + "0x5f74ed0e24ff80d9b2c4a44baa9975428cd6b935": "2980000000000000000000", + "0xf2049532fd458a83ca1bff2eebacb6d5ca63f4a4": "3625693000000000000000", + "0xcee699c0707a7836252b292f047ce8ad289b2f55": "324700000000000000000", + "0x8b3696f3c60de32432a2e4c395ef0303b7e81e75": "30000000000000000000000", + "0x13dee03e3799952d0738843d4be8fc0a803fb20e": "2000000000000000000000", + "0xc853215b9b9f2d2cd0741e585e987b5fb80c212e": "1550000000000000000000", + "0x851c0d62be4635d4777e8035e37e4ba8517c6132": "500000000000000000000", + "0xa76b743f981b693072a131b22ba510965c2fefd7": "18200000000000000000", + "0x69bd25ade1a3346c59c4e930db2a9d715ef0a27a": "4000000000000000000000", + "0x0fec4ee0d7ca180290b6bd20f9992342f60ff68d": "334383000000000000000", + "0xccfd725760a68823ff1e062f4cc97e1360e8d997": "399800000000000000000", + "0x9f017706b830fb9c30efb0a09f506b9157457534": "2000000000000000000000", + "0x420fb86e7d2b51401fc5e8c72015decb4ef8fc2e": "1000000000000000000000", + "0xcb7d2b8089e9312cc9aeaa2773f35308ec6c2a7b": "10000000000000000000000", + "0x6c822029218ac8e98a260c1e064029348839875b": "5010000000000000000000", + "0x1c68a66138783a63c98cc675a9ec77af4598d35e": "50100000000000000000", + "0xf270792576f05d514493ffd1f5e84bec4b2df810": "1000000000000000000000", + "0x9191f94698210516cf6321a142070e20597674ed": "17194000000000000000", + "0xc0ca3277942e7445874be31ceb902972714f1823": "250000000000000000000", + "0x35e096120deaa5c1ecb1645e2ccb8b4edbd9299a": "500000000000000000000", + "0xe2bbf84641e3541f6c33e6ed683a635a70bde2ec": "502763000000000000000", + "0xd12d77ae01a92d35117bac705aacd982d02e74c1": "1000000000000000000000", + "0xdabb0889fc042926b05ef57b2520910abc4b4149": "2000000000000000000000", + "0x5a1a336962d6e0c63031cc83c6a5c6a6f4478ecb": "1000000000000000000000", + "0xabd154903513b8da4f019f68284b0656a1d0169b": "1000000000000000000000", + "0xad377cd25eb53e83ae091a0a1d2b4516f484afde": "1940000000000000000000", + "0x08c2f236ac4adcd3fda9fbc6e4532253f9da3bec": "20000000000000000000", + "0x71135d8f05963c905a4a07922909235a896a52ea": "3000000000000000000000", + "0x080546508a3d2682c8b9884f13637b8847b44db3": "2000000000000000000000", + "0x2d61bfc56873923c2b00095dc3eaa0f590d8ae0f": "20760000000000000000000", + "0xcbfa6af6c283b046e2772c6063b0b21553c40106": "2000000000000000000000", + "0xccabc6048a53464424fcf76eeb9e6e1801fa23d4": "49250000000000000000", + "0x60cc3d445ebdf76a7d7ae571c6971dff68cc8585": "1000000000000000000000", + "0xfff33a3bd36abdbd412707b8e310d6011454a7ae": "8000000000000000000000", + "0xd2dbebe89b0357aea98bbe8e496338debb28e805": "4000000000000000000000", + "0x5f521282e9b278dc8c034c72af53ee29e5443d78": "6520000000000000000000", + "0xc5a48a8500f9b4e22f0eb16c6f4649687674267d": "812721000000000000000", + "0x8cb3aa3fcd212854d7578fcc30fdede6742a312a": "300000000000000000000", + "0x90d2809ae1d1ffd8f63eda01de49dd552df3d1bc": "3998000000000000000000", + "0x96a55f00dff405dc4de5e58c57f6f6f0cac55d2f": "1962711000000000000000", + "0xae842e81858ecfedf6506c686dc204ac15bf8b24": "40000000000000000000", + "0x0be6a09e4307fe48d412b8d1a1a8284dce486261": "19180000000000000000000", + "0xc9c7ac0bdd9342b5ead4360923f68c72a6ba633a": "500000000000000000000", + "0xea8f30b6e4c5e65290fb9864259bc5990fa8ee8a": "20000000000000000000", + "0x74d37a51747bf8b771bfbf43943933d100d21483": "1000000000000000000000", + "0x1a04d5389eb006f9ce880c30d15353f8d11c4b31": "17072800000000000000000", + "0x726a14c90e3f84144c765cffacba3e0df11b48be": "10000000000000000000000", + "0x86b7bd563ceab686f96244f9ddc02ad7b0b14bc2": "10000000000000000000000", + "0x2bbe672a1857508f630f2a5edb563d9e9de92815": "2000000000000000000000", + "0xa17070c2e9c5a940a4ec0e4954c4d7d643be8f49": "1999965000000000000000", + "0xf2d1b7357724ec4c03185b879b63f57e26589153": "6000000000000000000000", + "0xd6a7ac4de7b510f0e8de519d973fa4c01ba83400": "1880000000000000000000", + "0x593b45a1864ac5c7e8f0caaeba0d873cd5d113b2": "6000000000000000000000", + "0x0837539b5f6a522a482cdcd3a9bb7043af39bdd2": "6000000000000000000000", + "0xb927abd2d28aaaa24db31778d27419df8e1b04bb": "27531000000000000000", + "0xb2e085fddd1468ba07415b274e734e11237fb2a9": "100000000000000000000", + "0x970938522afb5e8f994873c9fbdc26e3b37e314c": "1000000000000000000000", + "0xf3de5f26ef6aded6f06d3b911346ee70401da4a0": "354718000000000000000", + "0xbffb6929241f788693273e7022e60e3eab1fe84f": "2000000000000000000000", + "0xb56ad2aec6c8c3f19e1515bbb7dd91285256b639": "1000000000000000000000", + "0x47730f5f8ebf89ac72ef80e46c12195038ecdc49": "3160000000000000000000", + "0xf39a9d7aa3581df07ee4279ae6c312ef21033658": "4000000000000000000000", + "0x36227cdfa0fd3b9d7e6a744685f5be9aa366a7f0": "198479000000000000000", + "0x89e3b59a15864737d493c1d23cc53dbf8dcb1362": "4000000000000000000000", + "0xbd08e0cddec097db7901ea819a3d1fd9de8951a2": "20000000000000000000", + "0x533444584082eba654e1ad30e149735c6f7ba922": "1730000000000000000000", + "0x6a8a4317c45faa0554ccdb482548183e295a24b9": "1000000000000000000000", + "0x22ce349159eeb144ef06ff2636588aef79f62832": "188000000000000000000", + "0x3cd1d9731bd548c1dd6fcea61beb75d91754f7d3": "5130285000000000000000", + "0x8b7056f6abf3b118d026e944d5c073433ca451d7": "999999000000000000000", + "0x15f1b352110d68901d8f67aac46a6cfafe031477": "200000000000000000000", + "0x0f789e30397c53bf256fc364e6ef39f853504114": "3640000000000000000000", + "0x750bbb8c06bbbf240843cc75782ee02f08a97453": "835000000000000000000", + "0xfff7ac99c8e4feb60c9750054bdc14ce1857f181": "1000000000000000000000", + "0x5c6f36af90ab1a656c6ec8c7d521512762bba3e1": "1999800000000000000000", + "0x6811b54cd19663b11b94da1de2448285cd9f68d9": "1100000000000000000000", + "0x6f50929777824c291a49c46dc854f379a6bea080": "360000000000000000000", + "0xe83604e4ff6be7f96f6018d3ec3072ec525dff6b": "182000000000000000000", + "0xd731bb6b5f3c37395e09ceaccd14a918a6060789": "3940000000000000000000", + "0x372e453a6b629f27678cc8aeb5e57ce85ec0aef9": "200000000000000000000", + "0x86924fb211aad23cf5ce600e0aae806396444087": "10000000000000000000000", + "0x18c6723a6753299cb914477d04a3bd218df8c775": "1000000000000000000000", + "0xe00484788db50fc6a48e379d123e508b0f6e5ab1": "1000000000000000000000", + "0x150e3dbcbcfc84ccf89b73427763a565c23e60d0": "40000000000000000000", + "0x8ffa062122ac307418821adb9311075a3703bfa3": "1000000000000000000000", + "0x21206ce22ea480e85940d31314e0d64f4e4d3a04": "1000000000000000000000", + "0xac024f594f9558f04943618eb0e6b2ee501dc272": "2000000000000000000000", + "0xb2b7cdb4ff4b61d5b7ce0b2270bbb5269743ec04": "2000000000000000000000", + "0xabc74706964960dfe0dca3dca79e9216056f1cf4": "40000000000000000000000", + "0xd7eb903162271c1afa35fe69e37322c8a4d29b11": "10000000000000000000000", + "0xd7c6265dea11876c903b718e4cd8ab24fe265bde": "2000000000000000000000", + "0xcba288cd3c1eb4d59ddb06a6421c14c345a47b24": "4000000000000000000000", + "0x8c22426055b76f11f0a2de1a7f819a619685fe60": "1980000000000000000000", + "0xf463a90cb3f13e1f0643423636beab84c123b06d": "40000000000000000000", + "0x2b5ced9987c0765f900e49cf9da2d9f9c1138855": "400000000000000000000", + "0x9bb760d5c289a3e1db18db095345ca413b9a43c2": "197000000000000000000", + "0xd66ab79294074c8b627d842dab41e17dd70c5de5": "1000000000000000000000", + "0x0bdd58b96e7c916dd2fb30356f2aebfaaf1d8630": "2000000000000000000000", + "0xd612597bc31743c78633f633f239b1e9426bd925": "76000000000000000000000", + "0x140518a3194bad1350b8949e650565debe6db315": "2000000000000000000000", + "0xdaedd4ad107b271e89486cbf80ebd621dd974578": "2000000000000000000000", + "0xc36c0b63bfd75c2f8efb060883d868cccd6cbdb4": "3000000000000000000000", + "0xe646665872e40b0d7aa2ff82729caaba5bc3e89e": "400000000000000000000", + "0xb5fb7ea2ddc1598b667a9d57dd39e85a38f35d56": "500000000000000000000", + "0xe51421f8ee2210c71ed870fe618276c8954afbe9": "1337000000000000000000", + "0x08a9a44e1f41de3dbba7a363a3ab412c124cd15e": "200000000000000000000", + "0x562bced38ab2ab6c080f3b0541b8456e70824b3f": "641760000000000000000", + "0x1e484d0621f0f5331b35d5408d9aae4eb1acf21e": "20000000000000000000", + "0x3a476bd2c9e664c63ab266aa4c6e4a4825f516c3": "200000000000000000000", + "0x8d6df209484d7b94702b03a53e56b9fb0660f6f0": "2000000000000000000000", + "0x5970fb1b144dd751e4ce2eca7caa20e363dc4da3": "10000000000000000000000", + "0xd1dd79fb158160e5b4e8e23f312e6a907fbc4d4e": "500000000000000000000", + "0x7ee5ca805dce23af89c2d444e7e40766c54c7404": "240660000000000000000", + "0x93e0f37ecdfb0086e3e862a97034447b1e4dec1a": "30000000000000000000", + "0xe10ac19c546fc2547c61c139f5d1f45a6666d5b0": "4775000000000000000000", + "0x1c73d00b6e25d8eb9c1ff4ad827b6b9e9cf6d20c": "200000000000000000000", + "0xd771d9e0ca8a08a113775731434eb3270599c40d": "20000000000000000000", + "0xe69d1c378b771e0feff051db69d966ac6779f4ed": "553000000000000000000", + "0x0ef85b49d08a75198692914eddb4b22cf5fa4450": "2004800000000000000000", + "0xed70a37cdd1cbda9746d939658ae2a6181288578": "9600000000000000000000", + "0xeee761847e33fd61d99387ee14628694d1bfd525": "2000000000000000000000", + "0x271d3d481cb88e7671ad216949b6365e06303de0": "4000000000000000000000", + "0x5255dc69155a45b970c604d30047e2f530690e7f": "20000000000000000000", + "0xcabab6274ed15089737e287be878b757934864e2": "20000000000000000000000", + "0x9defe56a0ff1a1947dba0923f7dd258d8f12fa45": "26880000000000000000000", + "0xb7a2c103728b7305b5ae6e961c94ee99c9fe8e2b": "50000000000000000000000", + "0xb498bb0f520005b6216a4425b75aa9adc52d622b": "4000000000000000000000", + "0xc1132878235c5ddba5d9f3228b5236e47020dc6f": "1000000000000000000000", + "0xf81622e55757daea6675975dd93538da7d16991e": "2000000000000000000000", + "0xce2deab51c0a9ae09cd212c4fa4cc52b53cc0dec": "2000000000000000000000", + "0x86a1eadeeb30461345d9ef6bd05216fa247c0d0c": "2000000000000000000000", + "0x7b1fe1ab4dfd0088cdd7f60163ef59ec2aee06f5": "2000000000000000000000", + "0x6bbc3f358a668dd1a11f0380f3f73108426abd4a": "4000000000000000000000", + "0xb1e6e810c24ab0488de9e01e574837829f7c77d0": "400000000000000000000", + "0x03eb3cb860f6028da554d344a2bb5a500ae8b86f": "2000000000000000000000", + "0xe5481a7fed42b901bbed20789bd4ade50d5f83b9": "2000000000000000000000", + "0x1f3da68fe87eaf43a829ab6d7ec5a6e009b204fb": "554988000000000000000", + "0x30037988702671acbe892c03fe5788aa98af287a": "2800000000000000000000", + "0xedb473353979a206879de144c10a3c51d7d7081a": "6000000000000000000000", + "0x22bdffc240a88ff7431af3bff50e14da37d5183e": "1000000000000000000000", + "0x9374869d4a9911ee1eaf558bc4c2b63ec63acfdd": "1000000000000000000000", + "0xb756ad52f3bf74a7d24c67471e0887436936504c": "20000000000000000000000", + "0x8bd0b65a50ef5cef84fec420be7b89ed1470ceb9": "11999000000000000000000", + "0xaf26f7c6bf453e2078f08953e4b28004a2c1e209": "100000000000000000000", + "0x7c532db9e0c06c26fd40acc56ac55c1ee92d3c3a": "300000000000000000000000", + "0xdde670d01639667576a22dd05d3246d61f06e083": "26740000000000000000", + "0x5cf44e10540d65716423b1bcb542d21ff83a94cd": "10000000000000000000000", + "0xf96b4c00766f53736a8574f822e6474c2f21da2d": "400000000000000000000", + "0x8d89170b92b2be2c08d57c48a7b190a2f146720f": "19700000000000000000000", + "0x142b87c5043ffb5a91df18c2e109ced6fe4a71db": "200000000000000000000", + "0x42d34940edd2e7005d46e2188e4cfece8311d74d": "158000000000000000000", + "0x562105e82b099735de49f62692cc87cd38a8edcd": "6000000000000000000000", + "0x457bcef37dd3d60b2dd019e3fe61d46b3f1e7252": "20000000000000000000", + "0xcf8882359c0fb23387f5674074d8b17ade512f98": "6000000000000000000000", + "0xf0c081da52a9ae36642adf5e08205f05c54168a6": "111000000000000000000", + "0x551e7784778ef8e048e495df49f2614f84a4f1dc": "600000000000000000000", + "0x3c869c09696523ced824a070414605bb76231ff2": "1000000000000000000000", + "0x7e7f18a02eccaa5d61ab8fbf030343c434a25ef7": "66850000000000000000", + "0x9328d55ccb3fce531f199382339f0e576ee840a3": "4000000000000000000000", + "0x9d0f347e826b7dceaad279060a35c0061ecf334b": "4000000000000000000000", + "0x680640838bd07a447b168d6d923b90cf6c43cdca": "1730000000000000000000", + "0xc951900c341abbb3bafbf7ee2029377071dbc36a": "327600000000000000000", + "0xddf5810a0eb2fb2e32323bb2c99509ab320f24ac": "17900000000000000000000", + "0x2489ac126934d4d6a94df08743da7b7691e9798e": "1000000000000000000000", + "0xf42f905231c770f0a406f2b768877fb49eee0f21": "197000000000000000000", + "0x756f45e3fa69347a9a973a725e3c98bc4db0b5a0": "200000000000000000000" +} + +},{}],598:[function(require,module,exports){ +module.exports={ + "0x0000000000000000000000000000000000000000": "0x1", + "0x0000000000000000000000000000000000000001": "0x1", + "0x0000000000000000000000000000000000000002": "0x1", + "0x0000000000000000000000000000000000000003": "0x1", + "0x0000000000000000000000000000000000000004": "0x1", + "0x0000000000000000000000000000000000000005": "0x1", + "0x0000000000000000000000000000000000000006": "0x1", + "0x0000000000000000000000000000000000000007": "0x1", + "0x0000000000000000000000000000000000000008": "0x1", + "0x0000000000000000000000000000000000000009": "0x1", + "0x000000000000000000000000000000000000000a": "0x1", + "0x000000000000000000000000000000000000000b": "0x1", + "0x000000000000000000000000000000000000000c": "0x1", + "0x000000000000000000000000000000000000000d": "0x1", + "0x000000000000000000000000000000000000000e": "0x1", + "0x000000000000000000000000000000000000000f": "0x1", + "0x0000000000000000000000000000000000000010": "0x1", + "0x0000000000000000000000000000000000000011": "0x1", + "0x0000000000000000000000000000000000000012": "0x1", + "0x0000000000000000000000000000000000000013": "0x1", + "0x0000000000000000000000000000000000000014": "0x1", + "0x0000000000000000000000000000000000000015": "0x1", + "0x0000000000000000000000000000000000000016": "0x1", + "0x0000000000000000000000000000000000000017": "0x1", + "0x0000000000000000000000000000000000000018": "0x1", + "0x0000000000000000000000000000000000000019": "0x1", + "0x000000000000000000000000000000000000001a": "0x1", + "0x000000000000000000000000000000000000001b": "0x1", + "0x000000000000000000000000000000000000001c": "0x1", + "0x000000000000000000000000000000000000001d": "0x1", + "0x000000000000000000000000000000000000001e": "0x1", + "0x000000000000000000000000000000000000001f": "0x1", + "0x0000000000000000000000000000000000000020": "0x1", + "0x0000000000000000000000000000000000000021": "0x1", + "0x0000000000000000000000000000000000000022": "0x1", + "0x0000000000000000000000000000000000000023": "0x1", + "0x0000000000000000000000000000000000000024": "0x1", + "0x0000000000000000000000000000000000000025": "0x1", + "0x0000000000000000000000000000000000000026": "0x1", + "0x0000000000000000000000000000000000000027": "0x1", + "0x0000000000000000000000000000000000000028": "0x1", + "0x0000000000000000000000000000000000000029": "0x1", + "0x000000000000000000000000000000000000002a": "0x1", + "0x000000000000000000000000000000000000002b": "0x1", + "0x000000000000000000000000000000000000002c": "0x1", + "0x000000000000000000000000000000000000002d": "0x1", + "0x000000000000000000000000000000000000002e": "0x1", + "0x000000000000000000000000000000000000002f": "0x1", + "0x0000000000000000000000000000000000000030": "0x1", + "0x0000000000000000000000000000000000000031": "0x1", + "0x0000000000000000000000000000000000000032": "0x1", + "0x0000000000000000000000000000000000000033": "0x1", + "0x0000000000000000000000000000000000000034": "0x1", + "0x0000000000000000000000000000000000000035": "0x1", + "0x0000000000000000000000000000000000000036": "0x1", + "0x0000000000000000000000000000000000000037": "0x1", + "0x0000000000000000000000000000000000000038": "0x1", + "0x0000000000000000000000000000000000000039": "0x1", + "0x000000000000000000000000000000000000003a": "0x1", + "0x000000000000000000000000000000000000003b": "0x1", + "0x000000000000000000000000000000000000003c": "0x1", + "0x000000000000000000000000000000000000003d": "0x1", + "0x000000000000000000000000000000000000003e": "0x1", + "0x000000000000000000000000000000000000003f": "0x1", + "0x0000000000000000000000000000000000000040": "0x1", + "0x0000000000000000000000000000000000000041": "0x1", + "0x0000000000000000000000000000000000000042": "0x1", + "0x0000000000000000000000000000000000000043": "0x1", + "0x0000000000000000000000000000000000000044": "0x1", + "0x0000000000000000000000000000000000000045": "0x1", + "0x0000000000000000000000000000000000000046": "0x1", + "0x0000000000000000000000000000000000000047": "0x1", + "0x0000000000000000000000000000000000000048": "0x1", + "0x0000000000000000000000000000000000000049": "0x1", + "0x000000000000000000000000000000000000004a": "0x1", + "0x000000000000000000000000000000000000004b": "0x1", + "0x000000000000000000000000000000000000004c": "0x1", + "0x000000000000000000000000000000000000004d": "0x1", + "0x000000000000000000000000000000000000004e": "0x1", + "0x000000000000000000000000000000000000004f": "0x1", + "0x0000000000000000000000000000000000000050": "0x1", + "0x0000000000000000000000000000000000000051": "0x1", + "0x0000000000000000000000000000000000000052": "0x1", + "0x0000000000000000000000000000000000000053": "0x1", + "0x0000000000000000000000000000000000000054": "0x1", + "0x0000000000000000000000000000000000000055": "0x1", + "0x0000000000000000000000000000000000000056": "0x1", + "0x0000000000000000000000000000000000000057": "0x1", + "0x0000000000000000000000000000000000000058": "0x1", + "0x0000000000000000000000000000000000000059": "0x1", + "0x000000000000000000000000000000000000005a": "0x1", + "0x000000000000000000000000000000000000005b": "0x1", + "0x000000000000000000000000000000000000005c": "0x1", + "0x000000000000000000000000000000000000005d": "0x1", + "0x000000000000000000000000000000000000005e": "0x1", + "0x000000000000000000000000000000000000005f": "0x1", + "0x0000000000000000000000000000000000000060": "0x1", + "0x0000000000000000000000000000000000000061": "0x1", + "0x0000000000000000000000000000000000000062": "0x1", + "0x0000000000000000000000000000000000000063": "0x1", + "0x0000000000000000000000000000000000000064": "0x1", + "0x0000000000000000000000000000000000000065": "0x1", + "0x0000000000000000000000000000000000000066": "0x1", + "0x0000000000000000000000000000000000000067": "0x1", + "0x0000000000000000000000000000000000000068": "0x1", + "0x0000000000000000000000000000000000000069": "0x1", + "0x000000000000000000000000000000000000006a": "0x1", + "0x000000000000000000000000000000000000006b": "0x1", + "0x000000000000000000000000000000000000006c": "0x1", + "0x000000000000000000000000000000000000006d": "0x1", + "0x000000000000000000000000000000000000006e": "0x1", + "0x000000000000000000000000000000000000006f": "0x1", + "0x0000000000000000000000000000000000000070": "0x1", + "0x0000000000000000000000000000000000000071": "0x1", + "0x0000000000000000000000000000000000000072": "0x1", + "0x0000000000000000000000000000000000000073": "0x1", + "0x0000000000000000000000000000000000000074": "0x1", + "0x0000000000000000000000000000000000000075": "0x1", + "0x0000000000000000000000000000000000000076": "0x1", + "0x0000000000000000000000000000000000000077": "0x1", + "0x0000000000000000000000000000000000000078": "0x1", + "0x0000000000000000000000000000000000000079": "0x1", + "0x000000000000000000000000000000000000007a": "0x1", + "0x000000000000000000000000000000000000007b": "0x1", + "0x000000000000000000000000000000000000007c": "0x1", + "0x000000000000000000000000000000000000007d": "0x1", + "0x000000000000000000000000000000000000007e": "0x1", + "0x000000000000000000000000000000000000007f": "0x1", + "0x0000000000000000000000000000000000000080": "0x1", + "0x0000000000000000000000000000000000000081": "0x1", + "0x0000000000000000000000000000000000000082": "0x1", + "0x0000000000000000000000000000000000000083": "0x1", + "0x0000000000000000000000000000000000000084": "0x1", + "0x0000000000000000000000000000000000000085": "0x1", + "0x0000000000000000000000000000000000000086": "0x1", + "0x0000000000000000000000000000000000000087": "0x1", + "0x0000000000000000000000000000000000000088": "0x1", + "0x0000000000000000000000000000000000000089": "0x1", + "0x000000000000000000000000000000000000008a": "0x1", + "0x000000000000000000000000000000000000008b": "0x1", + "0x000000000000000000000000000000000000008c": "0x1", + "0x000000000000000000000000000000000000008d": "0x1", + "0x000000000000000000000000000000000000008e": "0x1", + "0x000000000000000000000000000000000000008f": "0x1", + "0x0000000000000000000000000000000000000090": "0x1", + "0x0000000000000000000000000000000000000091": "0x1", + "0x0000000000000000000000000000000000000092": "0x1", + "0x0000000000000000000000000000000000000093": "0x1", + "0x0000000000000000000000000000000000000094": "0x1", + "0x0000000000000000000000000000000000000095": "0x1", + "0x0000000000000000000000000000000000000096": "0x1", + "0x0000000000000000000000000000000000000097": "0x1", + "0x0000000000000000000000000000000000000098": "0x1", + "0x0000000000000000000000000000000000000099": "0x1", + "0x000000000000000000000000000000000000009a": "0x1", + "0x000000000000000000000000000000000000009b": "0x1", + "0x000000000000000000000000000000000000009c": "0x1", + "0x000000000000000000000000000000000000009d": "0x1", + "0x000000000000000000000000000000000000009e": "0x1", + "0x000000000000000000000000000000000000009f": "0x1", + "0x00000000000000000000000000000000000000a0": "0x1", + "0x00000000000000000000000000000000000000a1": "0x1", + "0x00000000000000000000000000000000000000a2": "0x1", + "0x00000000000000000000000000000000000000a3": "0x1", + "0x00000000000000000000000000000000000000a4": "0x1", + "0x00000000000000000000000000000000000000a5": "0x1", + "0x00000000000000000000000000000000000000a6": "0x1", + "0x00000000000000000000000000000000000000a7": "0x1", + "0x00000000000000000000000000000000000000a8": "0x1", + "0x00000000000000000000000000000000000000a9": "0x1", + "0x00000000000000000000000000000000000000aa": "0x1", + "0x00000000000000000000000000000000000000ab": "0x1", + "0x00000000000000000000000000000000000000ac": "0x1", + "0x00000000000000000000000000000000000000ad": "0x1", + "0x00000000000000000000000000000000000000ae": "0x1", + "0x00000000000000000000000000000000000000af": "0x1", + "0x00000000000000000000000000000000000000b0": "0x1", + "0x00000000000000000000000000000000000000b1": "0x1", + "0x00000000000000000000000000000000000000b2": "0x1", + "0x00000000000000000000000000000000000000b3": "0x1", + "0x00000000000000000000000000000000000000b4": "0x1", + "0x00000000000000000000000000000000000000b5": "0x1", + "0x00000000000000000000000000000000000000b6": "0x1", + "0x00000000000000000000000000000000000000b7": "0x1", + "0x00000000000000000000000000000000000000b8": "0x1", + "0x00000000000000000000000000000000000000b9": "0x1", + "0x00000000000000000000000000000000000000ba": "0x1", + "0x00000000000000000000000000000000000000bb": "0x1", + "0x00000000000000000000000000000000000000bc": "0x1", + "0x00000000000000000000000000000000000000bd": "0x1", + "0x00000000000000000000000000000000000000be": "0x1", + "0x00000000000000000000000000000000000000bf": "0x1", + "0x00000000000000000000000000000000000000c0": "0x1", + "0x00000000000000000000000000000000000000c1": "0x1", + "0x00000000000000000000000000000000000000c2": "0x1", + "0x00000000000000000000000000000000000000c3": "0x1", + "0x00000000000000000000000000000000000000c4": "0x1", + "0x00000000000000000000000000000000000000c5": "0x1", + "0x00000000000000000000000000000000000000c6": "0x1", + "0x00000000000000000000000000000000000000c7": "0x1", + "0x00000000000000000000000000000000000000c8": "0x1", + "0x00000000000000000000000000000000000000c9": "0x1", + "0x00000000000000000000000000000000000000ca": "0x1", + "0x00000000000000000000000000000000000000cb": "0x1", + "0x00000000000000000000000000000000000000cc": "0x1", + "0x00000000000000000000000000000000000000cd": "0x1", + "0x00000000000000000000000000000000000000ce": "0x1", + "0x00000000000000000000000000000000000000cf": "0x1", + "0x00000000000000000000000000000000000000d0": "0x1", + "0x00000000000000000000000000000000000000d1": "0x1", + "0x00000000000000000000000000000000000000d2": "0x1", + "0x00000000000000000000000000000000000000d3": "0x1", + "0x00000000000000000000000000000000000000d4": "0x1", + "0x00000000000000000000000000000000000000d5": "0x1", + "0x00000000000000000000000000000000000000d6": "0x1", + "0x00000000000000000000000000000000000000d7": "0x1", + "0x00000000000000000000000000000000000000d8": "0x1", + "0x00000000000000000000000000000000000000d9": "0x1", + "0x00000000000000000000000000000000000000da": "0x1", + "0x00000000000000000000000000000000000000db": "0x1", + "0x00000000000000000000000000000000000000dc": "0x1", + "0x00000000000000000000000000000000000000dd": "0x1", + "0x00000000000000000000000000000000000000de": "0x1", + "0x00000000000000000000000000000000000000df": "0x1", + "0x00000000000000000000000000000000000000e0": "0x1", + "0x00000000000000000000000000000000000000e1": "0x1", + "0x00000000000000000000000000000000000000e2": "0x1", + "0x00000000000000000000000000000000000000e3": "0x1", + "0x00000000000000000000000000000000000000e4": "0x1", + "0x00000000000000000000000000000000000000e5": "0x1", + "0x00000000000000000000000000000000000000e6": "0x1", + "0x00000000000000000000000000000000000000e7": "0x1", + "0x00000000000000000000000000000000000000e8": "0x1", + "0x00000000000000000000000000000000000000e9": "0x1", + "0x00000000000000000000000000000000000000ea": "0x1", + "0x00000000000000000000000000000000000000eb": "0x1", + "0x00000000000000000000000000000000000000ec": "0x1", + "0x00000000000000000000000000000000000000ed": "0x1", + "0x00000000000000000000000000000000000000ee": "0x1", + "0x00000000000000000000000000000000000000ef": "0x1", + "0x00000000000000000000000000000000000000f0": "0x1", + "0x00000000000000000000000000000000000000f1": "0x1", + "0x00000000000000000000000000000000000000f2": "0x1", + "0x00000000000000000000000000000000000000f3": "0x1", + "0x00000000000000000000000000000000000000f4": "0x1", + "0x00000000000000000000000000000000000000f5": "0x1", + "0x00000000000000000000000000000000000000f6": "0x1", + "0x00000000000000000000000000000000000000f7": "0x1", + "0x00000000000000000000000000000000000000f8": "0x1", + "0x00000000000000000000000000000000000000f9": "0x1", + "0x00000000000000000000000000000000000000fa": "0x1", + "0x00000000000000000000000000000000000000fb": "0x1", + "0x00000000000000000000000000000000000000fc": "0x1", + "0x00000000000000000000000000000000000000fd": "0x1", + "0x00000000000000000000000000000000000000fe": "0x1", + "0x00000000000000000000000000000000000000ff": "0x1", + "0x31b98d14007bdee637298086988a0bbd31184523": "0x200000000000000000000000000000000000000000000000000000000000000" +} + +},{}],599:[function(require,module,exports){ +module.exports={ + "0x0000000000000000000000000000000000000011": "0", + "0x0000000000000000000000000000000000000010": "0", + "0x0000000000000000000000000000000000000013": "0", + "0x0000000000000000000000000000000000000012": "0", + "0x0000000000000000000000000000000000000015": "0", + "0x0000000000000000000000000000000000000014": "0", + "0x0000000000000000000000000000000000000017": "0", + "0x0000000000000000000000000000000000000016": "0", + "0x0000000000000000000000000000000000000019": "0", + "0x0000000000000000000000000000000000000018": "0", + "0x00000000000000000000000000000000000000c1": "0", + "0x00000000000000000000000000000000000000c0": "0", + "0x00000000000000000000000000000000000000c7": "0", + "0x00000000000000000000000000000000000000c6": "0", + "0x00000000000000000000000000000000000000c5": "0", + "0x00000000000000000000000000000000000000c4": "0", + "0x000000000000000000000000000000000000002d": "0", + "0x000000000000000000000000000000000000002e": "0", + "0x000000000000000000000000000000000000002f": "0", + "0x00000000000000000000000000000000000000c8": "0", + "0x000000000000000000000000000000000000002a": "0", + "0x000000000000000000000000000000000000002b": "0", + "0x000000000000000000000000000000000000002c": "0", + "0x0000000000000000000000000000000000000091": "0", + "0x0000000000000000000000000000000000000090": "0", + "0x0000000000000000000000000000000000000093": "0", + "0x0000000000000000000000000000000000000092": "0", + "0x0000000000000000000000000000000000000095": "0", + "0x0000000000000000000000000000000000000094": "0", + "0x0000000000000000000000000000000000000097": "0", + "0x0000000000000000000000000000000000000096": "0", + "0x0000000000000000000000000000000000000076": "0", + "0x000000000000000000000000000000000000000c": "0", + "0x00000000000000000000000000000000000000c3": "0", + "0x00000000000000000000000000000000000000c2": "0", + "0x0000000000000000000000000000000000000081": "0", + "0x000000000000000000000000000000000000000a": "0", + "0x0000000000000000000000000000000000000024": "0", + "0x0000000000000000000000000000000000000025": "0", + "0x0000000000000000000000000000000000000026": "0", + "0x0000000000000000000000000000000000000027": "0", + "0x0000000000000000000000000000000000000020": "0", + "0x0000000000000000000000000000000000000021": "0", + "0x0000000000000000000000000000000000000022": "0", + "0x0000000000000000000000000000000000000023": "0", + "0x000000000000000000000000000000000000009a": "0", + "0x00000000000000000000000000000000000000d7": "0", + "0x000000000000000000000000000000000000009c": "0", + "0x000000000000000000000000000000000000009b": "0", + "0x0000000000000000000000000000000000000028": "0", + "0x0000000000000000000000000000000000000029": "0", + "0x00000000000000000000000000000000000000d0": "0", + "0x000000000000000000000000000000000000009f": "0", + "0x000000000000000000000000000000000000001a": "0", + "0x000000000000000000000000000000000000001c": "0", + "0x000000000000000000000000000000000000001b": "0", + "0x000000000000000000000000000000000000001e": "0", + "0x000000000000000000000000000000000000001d": "0", + "0x000000000000000000000000000000000000001f": "0", + "0x00000000000000000000000000000000000000cc": "0", + "0x00000000000000000000000000000000000000cb": "0", + "0x00000000000000000000000000000000000000ca": "0", + "0x00000000000000000000000000000000000000cf": "0", + "0x00000000000000000000000000000000000000ce": "0", + "0x00000000000000000000000000000000000000cd": "0", + "0x0000000000000000000000000000000000000099": "0", + "0x0000000000000000000000000000000000000098": "0", + "0x00000000000000000000000000000000000000ac": "0", + "0x00000000000000000000000000000000000000aa": "0", + "0x00000000000000000000000000000000000000e9": "0", + "0x00000000000000000000000000000000000000e8": "0", + "0x00000000000000000000000000000000000000e5": "0", + "0x00000000000000000000000000000000000000e4": "0", + "0x00000000000000000000000000000000000000e7": "0", + "0x00000000000000000000000000000000000000e6": "0", + "0x00000000000000000000000000000000000000e1": "0", + "0x00000000000000000000000000000000000000e0": "0", + "0x00000000000000000000000000000000000000e3": "0", + "0x00000000000000000000000000000000000000e2": "0", + "0x00000000000000000000000000000000000000df": "0", + "0x00000000000000000000000000000000000000fb": "0", + "0x00000000000000000000000000000000000000fc": "0", + "0x00000000000000000000000000000000000000fd": "0", + "0x00000000000000000000000000000000000000fe": "0", + "0x00000000000000000000000000000000000000ff": "0", + "0x00000000000000000000000000000000000000ae": "0", + "0x00000000000000000000000000000000000000dd": "0", + "0x00000000000000000000000000000000000000ad": "0", + "0x00000000000000000000000000000000000000de": "0", + "0x000000000000000000000000000000000000009e": "0", + "0x000000000000000000000000000000000000004f": "0", + "0x00000000000000000000000000000000000000db": "0", + "0x000000000000000000000000000000000000004d": "0", + "0x000000000000000000000000000000000000004e": "0", + "0x000000000000000000000000000000000000004b": "0", + "0x000000000000000000000000000000000000004c": "0", + "0x000000000000000000000000000000000000004a": "0", + "0x0000000000000000000000000000000000000039": "0", + "0x0000000000000000000000000000000000000038": "0", + "0x000000000000000000000000000000000000000e": "0", + "0x0000000000000000000000000000000000000033": "0", + "0x0000000000000000000000000000000000000032": "0", + "0x0000000000000000000000000000000000000031": "0", + "0x0000000000000000000000000000000000000030": "0", + "0x0000000000000000000000000000000000000037": "0", + "0x0000000000000000000000000000000000000036": "0", + "0x0000000000000000000000000000000000000035": "0", + "0x0000000000000000000000000000000000000034": "0", + "0x00000000000000000000000000000000000000f0": "0", + "0x00000000000000000000000000000000000000f1": "0", + "0x00000000000000000000000000000000000000f2": "0", + "0x00000000000000000000000000000000000000f3": "0", + "0x00000000000000000000000000000000000000f4": "0", + "0x00000000000000000000000000000000000000f5": "0", + "0x00000000000000000000000000000000000000f6": "0", + "0x00000000000000000000000000000000000000f7": "0", + "0x00000000000000000000000000000000000000f8": "0", + "0x00000000000000000000000000000000000000f9": "0", + "0x00000000000000000000000000000000000000ee": "0", + "0x00000000000000000000000000000000000000c9": "0", + "0x00000000000000000000000000000000000000ef": "0", + "0x00000000000000000000000000000000000000ea": "0", + "0x00000000000000000000000000000000000000ec": "0", + "0x00000000000000000000000000000000000000eb": "0", + "0x000000000000000000000000000000000000003c": "0", + "0x000000000000000000000000000000000000003b": "0", + "0x000000000000000000000000000000000000003a": "0", + "0x000000000000000000000000000000000000003f": "0", + "0x000000000000000000000000000000000000003e": "0", + "0x000000000000000000000000000000000000003d": "0", + "0x0000000000000000000000000000000000000089": "0", + "0x0000000000000000000000000000000000000048": "0", + "0x0000000000000000000000000000000000000049": "0", + "0x0000000000000000000000000000000000000046": "0", + "0x0000000000000000000000000000000000000047": "0", + "0x0000000000000000000000000000000000000044": "0", + "0x0000000000000000000000000000000000000045": "0", + "0x0000000000000000000000000000000000000042": "0", + "0x0000000000000000000000000000000000000043": "0", + "0x0000000000000000000000000000000000000040": "0", + "0x0000000000000000000000000000000000000041": "0", + "0x874b54a8bd152966d63f706bae1ffeb0411921e5": "1000000000000000000000000000000", + "0x00000000000000000000000000000000000000af": "0", + "0x0000000000000000000000000000000000000088": "0", + "0x000000000000000000000000000000000000000d": "0", + "0x00000000000000000000000000000000000000ed": "0", + "0x000000000000000000000000000000000000006a": "0", + "0x000000000000000000000000000000000000006b": "0", + "0x000000000000000000000000000000000000006c": "0", + "0x000000000000000000000000000000000000006d": "0", + "0x000000000000000000000000000000000000006e": "0", + "0x000000000000000000000000000000000000006f": "0", + "0x0000000000000000000000000000000000000086": "0", + "0x0000000000000000000000000000000000000087": "0", + "0x0000000000000000000000000000000000000059": "0", + "0x0000000000000000000000000000000000000058": "0", + "0x0000000000000000000000000000000000000055": "0", + "0x0000000000000000000000000000000000000054": "0", + "0x0000000000000000000000000000000000000057": "0", + "0x0000000000000000000000000000000000000056": "0", + "0x0000000000000000000000000000000000000051": "0", + "0x0000000000000000000000000000000000000050": "0", + "0x0000000000000000000000000000000000000053": "0", + "0x0000000000000000000000000000000000000052": "0", + "0x000000000000000000000000000000000000009d": "0", + "0x00000000000000000000000000000000000000dc": "0", + "0x000000000000000000000000000000000000000b": "0", + "0x00000000000000000000000000000000000000fa": "0", + "0x000000000000000000000000000000000000005e": "0", + "0x000000000000000000000000000000000000005d": "0", + "0x000000000000000000000000000000000000005f": "0", + "0x000000000000000000000000000000000000005a": "0", + "0x000000000000000000000000000000000000005c": "0", + "0x000000000000000000000000000000000000005b": "0", + "0x0000000000000000000000000000000000000060": "0", + "0x0000000000000000000000000000000000000061": "0", + "0x0000000000000000000000000000000000000062": "0", + "0x0000000000000000000000000000000000000063": "0", + "0x0000000000000000000000000000000000000064": "0", + "0x0000000000000000000000000000000000000065": "0", + "0x0000000000000000000000000000000000000066": "0", + "0x0000000000000000000000000000000000000067": "0", + "0x0000000000000000000000000000000000000068": "0", + "0x0000000000000000000000000000000000000069": "0", + "0x00000000000000000000000000000000000000bd": "0", + "0x00000000000000000000000000000000000000be": "0", + "0x00000000000000000000000000000000000000bf": "0", + "0x00000000000000000000000000000000000000ba": "0", + "0x00000000000000000000000000000000000000bb": "0", + "0x00000000000000000000000000000000000000bc": "0", + "0x000000000000000000000000000000000000008b": "0", + "0x000000000000000000000000000000000000008c": "0", + "0x000000000000000000000000000000000000008a": "0", + "0x000000000000000000000000000000000000008f": "0", + "0x000000000000000000000000000000000000008d": "0", + "0x000000000000000000000000000000000000008e": "0", + "0x00000000000000000000000000000000000000a1": "0", + "0x00000000000000000000000000000000000000a0": "0", + "0x00000000000000000000000000000000000000a3": "0", + "0x00000000000000000000000000000000000000a2": "0", + "0x00000000000000000000000000000000000000a5": "0", + "0x00000000000000000000000000000000000000a4": "0", + "0x00000000000000000000000000000000000000a7": "0", + "0x00000000000000000000000000000000000000a6": "0", + "0x00000000000000000000000000000000000000a9": "0", + "0x00000000000000000000000000000000000000a8": "0", + "0x00000000000000000000000000000000000000ab": "0", + "0x00000000000000000000000000000000000000d8": "0", + "0x00000000000000000000000000000000000000d9": "0", + "0x0000000000000000000000000000000000000077": "0", + "0x00000000000000000000000000000000000000d6": "0", + "0x0000000000000000000000000000000000000075": "0", + "0x0000000000000000000000000000000000000074": "0", + "0x0000000000000000000000000000000000000073": "0", + "0x0000000000000000000000000000000000000072": "0", + "0x0000000000000000000000000000000000000071": "0", + "0x0000000000000000000000000000000000000070": "0", + "0x00000000000000000000000000000000000000d4": "0", + "0x0000000000000000000000000000000000000079": "0", + "0x0000000000000000000000000000000000000078": "0", + "0x0000000000000000000000000000000000000002": "1", + "0x0000000000000000000000000000000000000003": "1", + "0x0000000000000000000000000000000000000000": "1", + "0x0000000000000000000000000000000000000001": "1", + "0x0000000000000000000000000000000000000006": "1", + "0x0000000000000000000000000000000000000007": "1", + "0x0000000000000000000000000000000000000004": "1", + "0x0000000000000000000000000000000000000005": "1", + "0x00000000000000000000000000000000000000d2": "0", + "0x0000000000000000000000000000000000000008": "1", + "0x0000000000000000000000000000000000000009": "1", + "0x00000000000000000000000000000000000000d3": "0", + "0x00000000000000000000000000000000000000b4": "0", + "0x00000000000000000000000000000000000000b5": "0", + "0x00000000000000000000000000000000000000b6": "0", + "0x00000000000000000000000000000000000000b7": "0", + "0x00000000000000000000000000000000000000b0": "0", + "0x00000000000000000000000000000000000000b1": "0", + "0x00000000000000000000000000000000000000b2": "0", + "0x00000000000000000000000000000000000000b3": "0", + "0x0000000000000000000000000000000000000082": "0", + "0x0000000000000000000000000000000000000083": "0", + "0x0000000000000000000000000000000000000080": "0", + "0x00000000000000000000000000000000000000d1": "0", + "0x00000000000000000000000000000000000000b8": "0", + "0x00000000000000000000000000000000000000b9": "0", + "0x0000000000000000000000000000000000000084": "0", + "0x0000000000000000000000000000000000000085": "0", + "0x000000000000000000000000000000000000007f": "0", + "0x000000000000000000000000000000000000007e": "0", + "0x000000000000000000000000000000000000007d": "0", + "0x000000000000000000000000000000000000007c": "0", + "0x000000000000000000000000000000000000007b": "0", + "0x000000000000000000000000000000000000007a": "0", + "0x000000000000000000000000000000000000000f": "0", + "0x00000000000000000000000000000000000000d5": "0", + "0x00000000000000000000000000000000000000da": "0" +} + +},{}],600:[function(require,module,exports){ +module.exports={ + "name": "byzantium", + "comment": "Hardfork with new precompiles, instructions and other protocol changes", + "eip": { + "url": "https://eips.ethereum.org/EIPS/eip-609", + "status": "Final" + }, + "gasConfig": {}, + "gasPrices": { + "modexpGquaddivisor": { + "v": 20, + "d": "Gquaddivisor from modexp precompile for gas calculation" + }, + "ecAdd": { + "v": 500, + "d": "Gas costs for curve addition precompile" + }, + "ecMul": { + "v": 40000, + "d": "Gas costs for curve multiplication precompile" + }, + "ecPairing": { + "v": 100000, + "d": "Base gas costs for curve pairing precompile" + }, + "ecPairingWord": { + "v": 80000, + "d": "Gas costs regarding curve pairing precompile input length" + } + }, + "vm": {}, + "pow": { + "minerReward": { + "v": "3000000000000000000", + "d": "the amount a miner get rewarded for mining a block" + } + }, + "casper": {}, + "sharding": {} +} + +},{}],601:[function(require,module,exports){ +module.exports={ + "name": "chainstart", + "comment": "Start of the Ethereum main chain", + "eip": { + "url": "", + "status": "" + }, + "status": "", + "gasConfig": { + "minGasLimit": { + "v": 5000, + "d": "Minimum the gas limit may ever be" + }, + "gasLimitBoundDivisor": { + "v": 1024, + "d": "The bound divisor of the gas limit, used in update calculations" + } + }, + "gasPrices": { + "tierStep": { + "v": [0, 2, 3, 5, 8, 10, 20], + "d": "Once per operation, for a selection of them" + }, + "exp": { + "v": 10, + "d": "Once per EXP instuction" + }, + "expByte": { + "v": 10, + "d": "Times ceil(log256(exponent)) for the EXP instruction" + }, + "sha3": { + "v": 30, + "d": "Once per SHA3 operation" + }, + "sha3Word": { + "v": 6, + "d": "Once per word of the SHA3 operation's data" + }, + "sload": { + "v": 50, + "d": "Once per SLOAD operation" + }, + "sstoreSet": { + "v": 20000, + "d": "Once per SSTORE operation if the zeroness changes from zero" + }, + "sstoreReset": { + "v": 5000, + "d": "Once per SSTORE operation if the zeroness does not change from zero" + }, + "sstoreRefund": { + "v": 15000, + "d": "Once per SSTORE operation if the zeroness changes to zero" + }, + "jumpdest": { + "v": 1, + "d": "Refunded gas, once per SSTORE operation if the zeroness changes to zero" + }, + "log": { + "v": 375, + "d": "Per LOG* operation" + }, + "logData": { + "v": 8, + "d": "Per byte in a LOG* operation's data" + }, + "logTopic": { + "v": 375, + "d": "Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas" + }, + "create": { + "v": 32000, + "d": "Once per CREATE operation & contract-creation transaction" + }, + "call": { + "v": 40, + "d": "Once per CALL operation & message call transaction" + }, + "callStipend": { + "v": 2300, + "d": "Free gas given at beginning of call" + }, + "callValueTransfer": { + "v": 9000, + "d": "Paid for CALL when the value transfor is non-zero" + }, + "callNewAccount": { + "v": 25000, + "d": "Paid for CALL when the destination address didn't exist prior" + }, + "selfdestructRefund": { + "v": 24000, + "d": "Refunded following a selfdestruct operation" + }, + "memory": { + "v": 3, + "d": "Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL" + }, + "quadCoeffDiv": { + "v": 512, + "d": "Divisor for the quadratic particle of the memory cost equation" + }, + "createData": { + "v": 200, + "d": "" + }, + "tx": { + "v": 21000, + "d": "Per transaction. NOTE: Not payable on data of calls between transactions" + }, + "txCreation": { + "v": 32000, + "d": "The cost of creating a contract via tx" + }, + "txDataZero": { + "v": 4, + "d": "Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions" + }, + "txDataNonZero": { + "v": 68, + "d": "Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions" + }, + "copy": { + "v": 3, + "d": "Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added" + }, + "ecRecover": { + "v": 3000, + "d": "" + }, + "sha256": { + "v": 60, + "d": "" + }, + "sha256Word": { + "v": 12, + "d": "" + }, + "ripemd160": { + "v": 600, + "d": "" + }, + "ripemd160Word": { + "v": 120, + "d": "" + }, + "identity": { + "v": 15, + "d": "" + }, + "identityWord": { + "v": 3, + "d": "" + } + }, + "vm": { + "stackLimit": { + "v": 1024, + "d": "Maximum size of VM stack allowed" + }, + "callCreateDepth": { + "v": 1024, + "d": "Maximum depth of call/create stack" + }, + "maxExtraDataSize": { + "v": 32, + "d": "Maximum size extra data may be after Genesis" + } + }, + "pow": { + "minimumDifficulty": { + "v": 131072, + "d": "The minimum that the difficulty may ever be" + }, + "difficultyBoundDivisor": { + "v": 2048, + "d": "The bound divisor of the difficulty, used in the update calculations" + }, + "durationLimit": { + "v": 13, + "d": "The decision boundary on the blocktime duration used to determine whether difficulty should go up or not" + }, + "epochDuration": { + "v": 30000, + "d": "Duration between proof-of-work epochs" + }, + "timebombPeriod": { + "v": 100000, + "d": "Exponential difficulty timebomb period" + }, + "minerReward": { + "v": "5000000000000000000", + "d": "the amount a miner get rewarded for mining a block" + } + }, + "casper": {}, + "sharding": {} +} + +},{}],602:[function(require,module,exports){ +module.exports={ + "name": "constantinople", + "comment": "Postponed hardfork including EIP-1283 (SSTORE gas metering changes)", + "eip": { + "url": "https://eips.ethereum.org/EIPS/eip-1013", + "status": "Final" + }, + "gasConfig": {}, + "gasPrices": { + "netSstoreNoopGas": { + "v": 200, + "d": "Once per SSTORE operation if the value doesn't change" + }, + "netSstoreInitGas": { + "v": 20000, + "d": "Once per SSTORE operation from clean zero" + }, + "netSstoreCleanGas": { + "v": 5000, + "d": "Once per SSTORE operation from clean non-zero" + }, + "netSstoreDirtyGas": { + "v": 200, + "d": "Once per SSTORE operation from dirty" + }, + "netSstoreClearRefund": { + "v": 15000, + "d": "Once per SSTORE operation for clearing an originally existing storage slot" + }, + "netSstoreResetRefund": { + "v": 4800, + "d": "Once per SSTORE operation for resetting to the original non-zero value" + }, + "netSstoreResetClearRefund": { + "v": 19800, + "d": "Once per SSTORE operation for resetting to the original zero value" + } + }, + "vm": {}, + "pow": { + "minerReward": { + "v": "2000000000000000000", + "d": "The amount a miner gets rewarded for mining a block" + } + }, + "casper": {}, + "sharding": {} +} + +},{}],603:[function(require,module,exports){ +module.exports={ + "name": "dao", + "comment": "DAO rescue hardfork", + "eip": { + "url": "https://eips.ethereum.org/EIPS/eip-779", + "status": "Final" + }, + "gasConfig": {}, + "gasPrices": {}, + "vm": {}, + "pow": {}, + "casper": {}, + "sharding": {} +} + +},{}],604:[function(require,module,exports){ +module.exports={ + "name": "homestead", + "comment": "Homestead hardfork with protocol and network changes", + "eip": { + "url": "https://eips.ethereum.org/EIPS/eip-606", + "status": "Final" + }, + "gasConfig": {}, + "gasPrices": {}, + "vm": {}, + "pow": {}, + "casper": {}, + "sharding": {} +} + +},{}],605:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hardforks = [ + ['chainstart', require('./chainstart.json')], + ['homestead', require('./homestead.json')], + ['dao', require('./dao.json')], + ['tangerineWhistle', require('./tangerineWhistle.json')], + ['spuriousDragon', require('./spuriousDragon.json')], + ['byzantium', require('./byzantium.json')], + ['constantinople', require('./constantinople.json')], + ['petersburg', require('./petersburg.json')], +]; + +},{"./byzantium.json":600,"./chainstart.json":601,"./constantinople.json":602,"./dao.json":603,"./homestead.json":604,"./petersburg.json":606,"./spuriousDragon.json":607,"./tangerineWhistle.json":608}],606:[function(require,module,exports){ +module.exports={ + "name": "petersburg", + "comment": "Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople", + "eip": { + "url": "https://github.com/ethereum/EIPs/pull/1716", + "status": "Draft" + }, + "gasConfig": {}, + "gasPrices": { + "netSstoreNoopGas": { + "v": null, + "d": "Removed along EIP-1283" + }, + "netSstoreInitGas": { + "v": null, + "d": "Removed along EIP-1283" + }, + "netSstoreCleanGas": { + "v": null, + "d": "Removed along EIP-1283" + }, + "netSstoreDirtyGas": { + "v": null, + "d": "Removed along EIP-1283" + }, + "netSstoreClearRefund": { + "v": null, + "d": "Removed along EIP-1283" + }, + "netSstoreResetRefund": { + "v": null, + "d": "Removed along EIP-1283" + }, + "netSstoreResetClearRefund": { + "v": null, + "d": "Removed along EIP-1283" + } + }, + "vm": {}, + "pow": {}, + "casper": {}, + "sharding": {} +} + +},{}],607:[function(require,module,exports){ +module.exports={ + "name": "spuriousDragon", + "comment": "HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit", + "eip": { + "url": "https://eips.ethereum.org/EIPS/eip-607", + "status": "Final" + }, + "gasConfig": {}, + "gasPrices": { + "expByte": { + "v": 50, + "d": "Times ceil(log256(exponent)) for the EXP instruction" + } + }, + "vm": { + "maxCodeSize": { + "v": 24576, + "d": "Maximum length of contract code" + } + }, + "pow": {}, + "casper": {}, + "sharding": {} +} + +},{}],608:[function(require,module,exports){ +module.exports={ + "name": "tangerineWhistle", + "comment": "Hardfork with gas cost changes for IO-heavy operations", + "eip": { + "url": "https://eips.ethereum.org/EIPS/eip-608", + "status": "Final" + }, + "gasConfig": {}, + "gasPrices": { + "sload": { + "v": 200, + "d": "Once per SLOAD operation" + }, + "call": { + "v": 700, + "d": "Once per CALL operation & message call transaction" + } + }, + "vm": {}, + "pow": {}, + "casper": {}, + "sharding": {} +} + +},{}],609:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var chains_1 = require("./chains"); +var hardforks_1 = require("./hardforks"); +/** + * Common class to access chain and hardfork parameters + */ +var Common = /** @class */ (function () { + /** + * @constructor + * @param chain String ('mainnet') or Number (1) chain + * @param hardfork String identifier ('byzantium') for hardfork (optional) + * @param supportedHardforks Limit parameter returns to the given hardforks (optional) + */ + function Common(chain, hardfork, supportedHardforks) { + this._chainParams = this.setChain(chain); + this._hardfork = null; + this._supportedHardforks = supportedHardforks === undefined ? [] : supportedHardforks; + if (hardfork) { + this.setHardfork(hardfork); + } + } + /** + * Sets the chain + * @param chain String ('mainnet') or Number (1) chain + * representation. Or, a Dictionary of chain parameters for a private network. + * @returns The dictionary with parameters set as chain + */ + Common.prototype.setChain = function (chain) { + if (typeof chain === 'number') { + if (chains_1.chains['names'][chain]) { + this._chainParams = chains_1.chains[chains_1.chains['names'][chain]]; + } + else { + throw new Error("Chain with ID " + chain + " not supported"); + } + } + else if (typeof chain === 'string') { + if (chains_1.chains[chain]) { + this._chainParams = chains_1.chains[chain]; + } + else { + throw new Error("Chain with name " + chain + " not supported"); + } + } + else if (typeof chain === 'object') { + var required = ['networkId', 'genesis', 'hardforks', 'bootstrapNodes']; + for (var _i = 0, required_1 = required; _i < required_1.length; _i++) { + var param = required_1[_i]; + if (chain[param] === undefined) { + throw new Error("Missing required chain parameter: " + param); + } + } + this._chainParams = chain; + } + else { + throw new Error('Wrong input format'); + } + return this._chainParams; + }; + /** + * Sets the hardfork to get params for + * @param hardfork String identifier ('byzantium') + */ + Common.prototype.setHardfork = function (hardfork) { + if (!this._isSupportedHardfork(hardfork)) { + throw new Error("Hardfork " + hardfork + " not set as supported in supportedHardforks"); + } + var changed = false; + for (var _i = 0, hardforkChanges_1 = hardforks_1.hardforks; _i < hardforkChanges_1.length; _i++) { + var hfChanges = hardforkChanges_1[_i]; + if (hfChanges[0] === hardfork) { + this._hardfork = hardfork; + changed = true; + } + } + if (!changed) { + throw new Error("Hardfork with name " + hardfork + " not supported"); + } + }; + /** + * Internal helper function to choose between hardfork set and hardfork provided as param + * @param hardfork Hardfork given to function as a parameter + * @returns Hardfork chosen to be used + */ + Common.prototype._chooseHardfork = function (hardfork, onlySupported) { + onlySupported = onlySupported === undefined ? true : onlySupported; + if (!hardfork) { + if (!this._hardfork) { + throw new Error('Method called with neither a hardfork set nor provided by param'); + } + else { + hardfork = this._hardfork; + } + } + else if (onlySupported && !this._isSupportedHardfork(hardfork)) { + throw new Error("Hardfork " + hardfork + " not set as supported in supportedHardforks"); + } + return hardfork; + }; + /** + * Internal helper function, returns the params for the given hardfork for the chain set + * @param hardfork Hardfork name + * @returns Dictionary with hardfork params + */ + Common.prototype._getHardfork = function (hardfork) { + var hfs = this.hardforks(); + for (var _i = 0, hfs_1 = hfs; _i < hfs_1.length; _i++) { + var hf = hfs_1[_i]; + if (hf['name'] === hardfork) + return hf; + } + throw new Error("Hardfork " + hardfork + " not defined for chain " + this.chainName()); + }; + /** + * Internal helper function to check if a hardfork is set to be supported by the library + * @param hardfork Hardfork name + * @returns True if hardfork is supported + */ + Common.prototype._isSupportedHardfork = function (hardfork) { + if (this._supportedHardforks.length > 0) { + for (var _i = 0, _a = this._supportedHardforks; _i < _a.length; _i++) { + var supportedHf = _a[_i]; + if (hardfork === supportedHf) + return true; + } + } + else { + return true; + } + return false; + }; + /** + * Returns the parameter corresponding to a hardfork + * @param topic Parameter topic ('gasConfig', 'gasPrices', 'vm', 'pow', 'casper', 'sharding') + * @param name Parameter name (e.g. 'minGasLimit' for 'gasConfig' topic) + * @param hardfork Hardfork name, optional if hardfork set + */ + Common.prototype.param = function (topic, name, hardfork) { + hardfork = this._chooseHardfork(hardfork); + var value; + for (var _i = 0, hardforkChanges_2 = hardforks_1.hardforks; _i < hardforkChanges_2.length; _i++) { + var hfChanges = hardforkChanges_2[_i]; + if (!hfChanges[1][topic]) { + throw new Error("Topic " + topic + " not defined"); + } + if (hfChanges[1][topic][name] !== undefined) { + value = hfChanges[1][topic][name].v; + } + if (hfChanges[0] === hardfork) + break; + } + if (value === undefined) { + throw new Error(topic + " value for " + name + " not found"); + } + return value; + }; + /** + * Returns a parameter for the hardfork active on block number + * @param topic Parameter topic + * @param name Parameter name + * @param blockNumber Block number + */ + Common.prototype.paramByBlock = function (topic, name, blockNumber) { + var activeHfs = this.activeHardforks(blockNumber); + var hardfork = activeHfs[activeHfs.length - 1]['name']; + return this.param(topic, name, hardfork); + }; + /** + * Checks if set or provided hardfork is active on block number + * @param hardfork Hardfork name or null (for HF set) + * @param blockNumber + * @param opts Hardfork options (onlyActive unused) + * @returns True if HF is active on block number + */ + Common.prototype.hardforkIsActiveOnBlock = function (hardfork, blockNumber, opts) { + opts = opts !== undefined ? opts : {}; + var onlySupported = opts.onlySupported === undefined ? false : opts.onlySupported; + hardfork = this._chooseHardfork(hardfork, onlySupported); + var hfBlock = this.hardforkBlock(hardfork); + if (hfBlock !== null && blockNumber >= hfBlock) + return true; + return false; + }; + /** + * Alias to hardforkIsActiveOnBlock when hardfork is set + * @param blockNumber + * @param opts Hardfork options (onlyActive unused) + * @returns True if HF is active on block number + */ + Common.prototype.activeOnBlock = function (blockNumber, opts) { + return this.hardforkIsActiveOnBlock(null, blockNumber, opts); + }; + /** + * Sequence based check if given or set HF1 is greater than or equal HF2 + * @param hardfork1 Hardfork name or null (if set) + * @param hardfork2 Hardfork name + * @param opts Hardfork options + * @returns True if HF1 gte HF2 + */ + Common.prototype.hardforkGteHardfork = function (hardfork1, hardfork2, opts) { + opts = opts !== undefined ? opts : {}; + var onlyActive = opts.onlyActive === undefined ? false : opts.onlyActive; + hardfork1 = this._chooseHardfork(hardfork1, opts.onlySupported); + var hardforks; + if (onlyActive) { + hardforks = this.activeHardforks(null, opts); + } + else { + hardforks = this.hardforks(); + } + var posHf1 = -1, posHf2 = -1; + var index = 0; + for (var _i = 0, hardforks_2 = hardforks; _i < hardforks_2.length; _i++) { + var hf = hardforks_2[_i]; + if (hf['name'] === hardfork1) + posHf1 = index; + if (hf['name'] === hardfork2) + posHf2 = index; + index += 1; + } + return posHf1 >= posHf2; + }; + /** + * Alias to hardforkGteHardfork when hardfork is set + * @param hardfork Hardfork name + * @param opts Hardfork options + * @returns True if hardfork set is greater than hardfork provided + */ + Common.prototype.gteHardfork = function (hardfork, opts) { + return this.hardforkGteHardfork(null, hardfork, opts); + }; + /** + * Checks if given or set hardfork is active on the chain + * @param hardfork Hardfork name, optional if HF set + * @param opts Hardfork options (onlyActive unused) + * @returns True if hardfork is active on the chain + */ + Common.prototype.hardforkIsActiveOnChain = function (hardfork, opts) { + opts = opts !== undefined ? opts : {}; + var onlySupported = opts.onlySupported === undefined ? false : opts.onlySupported; + hardfork = this._chooseHardfork(hardfork, onlySupported); + for (var _i = 0, _a = this.hardforks(); _i < _a.length; _i++) { + var hf = _a[_i]; + if (hf['name'] === hardfork && hf['block'] !== null) + return true; + } + return false; + }; + /** + * Returns the active hardfork switches for the current chain + * @param blockNumber up to block if provided, otherwise for the whole chain + * @param opts Hardfork options (onlyActive unused) + * @return Array with hardfork arrays + */ + Common.prototype.activeHardforks = function (blockNumber, opts) { + opts = opts !== undefined ? opts : {}; + var activeHardforks = []; + var hfs = this.hardforks(); + for (var _i = 0, hfs_2 = hfs; _i < hfs_2.length; _i++) { + var hf = hfs_2[_i]; + if (hf['block'] === null) + continue; + if (blockNumber !== undefined && blockNumber !== null && blockNumber < hf['block']) + break; + if (opts.onlySupported && !this._isSupportedHardfork(hf['name'])) + continue; + activeHardforks.push(hf); + } + return activeHardforks; + }; + /** + * Returns the latest active hardfork name for chain or block or throws if unavailable + * @param blockNumber up to block if provided, otherwise for the whole chain + * @param opts Hardfork options (onlyActive unused) + * @return Hardfork name + */ + Common.prototype.activeHardfork = function (blockNumber, opts) { + opts = opts !== undefined ? opts : {}; + var activeHardforks = this.activeHardforks(blockNumber, opts); + if (activeHardforks.length > 0) { + return activeHardforks[activeHardforks.length - 1]['name']; + } + else { + throw new Error("No (supported) active hardfork found"); + } + }; + /** + * Returns the hardfork change block for hardfork provided or set + * @param hardfork Hardfork name, optional if HF set + * @returns Block number + */ + Common.prototype.hardforkBlock = function (hardfork) { + hardfork = this._chooseHardfork(hardfork, false); + return this._getHardfork(hardfork)['block']; + }; + /** + * True if block number provided is the hardfork (given or set) change block of the current chain + * @param blockNumber Number of the block to check + * @param hardfork Hardfork name, optional if HF set + * @returns True if blockNumber is HF block + */ + Common.prototype.isHardforkBlock = function (blockNumber, hardfork) { + hardfork = this._chooseHardfork(hardfork, false); + if (this.hardforkBlock(hardfork) === blockNumber) { + return true; + } + else { + return false; + } + }; + /** + * Provide the consensus type for the hardfork set or provided as param + * @param hardfork Hardfork name, optional if hardfork set + * @returns Consensus type (e.g. 'pow', 'poa') + */ + Common.prototype.consensus = function (hardfork) { + hardfork = this._chooseHardfork(hardfork); + return this._getHardfork(hardfork)['consensus']; + }; + /** + * Provide the finality type for the hardfork set or provided as param + * @param {String} hardfork Hardfork name, optional if hardfork set + * @returns {String} Finality type (e.g. 'pos', null of no finality) + */ + Common.prototype.finality = function (hardfork) { + hardfork = this._chooseHardfork(hardfork); + return this._getHardfork(hardfork)['finality']; + }; + /** + * Returns the Genesis parameters of current chain + * @returns Genesis dictionary + */ + Common.prototype.genesis = function () { + return this._chainParams['genesis']; + }; + /** + * Returns the hardforks for current chain + * @returns {Array} Array with arrays of hardforks + */ + Common.prototype.hardforks = function () { + return this._chainParams['hardforks']; + }; + /** + * Returns bootstrap nodes for the current chain + * @returns {Dictionary} Dict with bootstrap nodes + */ + Common.prototype.bootstrapNodes = function () { + return this._chainParams['bootstrapNodes']; + }; + /** + * Returns the hardfork set + * @returns Hardfork name + */ + Common.prototype.hardfork = function () { + return this._hardfork; + }; + /** + * Returns the Id of current chain + * @returns chain Id + */ + Common.prototype.chainId = function () { + return this._chainParams['chainId']; + }; + /** + * Returns the name of current chain + * @returns chain name (lower case) + */ + Common.prototype.chainName = function () { + return chains_1.chains['names'][this.chainId()] || this._chainParams['name']; + }; + /** + * Returns the Id of current network + * @returns network Id + */ + Common.prototype.networkId = function () { + return this._chainParams['networkId']; + }; + return Common; +}()); +exports.default = Common; + +},{"./chains":589,"./hardforks":605}],610:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var ethUtil = require('ethereumjs-util'); +var fees = require('ethereum-common/params.json'); +var BN = ethUtil.BN; + +// secp256k1n/2 +var N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16); + +/** + * Creates a new transaction object. + * + * @example + * var rawTx = { + * nonce: '00', + * gasPrice: '09184e72a000', + * gasLimit: '2710', + * to: '0000000000000000000000000000000000000000', + * value: '00', + * data: '7f7465737432000000000000000000000000000000000000000000000000000000600057', + * v: '1c', + * r: '5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab', + * s: '5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13' + * }; + * var tx = new Transaction(rawTx); + * + * @class + * @param {Buffer | Array | Object} data a transaction can be initiailized with either a buffer containing the RLP serialized transaction or an array of buffers relating to each of the tx Properties, listed in order below in the exmple. + * + * Or lastly an Object containing the Properties of the transaction like in the Usage example. + * + * For Object and Arrays each of the elements can either be a Buffer, a hex-prefixed (0x) String , Number, or an object with a toBuffer method such as Bignum + * + * @property {Buffer} raw The raw rlp encoded transaction + * @param {Buffer} data.nonce nonce number + * @param {Buffer} data.gasLimit transaction gas limit + * @param {Buffer} data.gasPrice transaction gas price + * @param {Buffer} data.to to the to address + * @param {Buffer} data.value the amount of ether sent + * @param {Buffer} data.data this will contain the data of the message or the init of a contract + * @param {Buffer} data.v EC signature parameter + * @param {Buffer} data.r EC signature parameter + * @param {Buffer} data.s EC recovery ID + * @param {Number} data.chainId EIP 155 chainId - mainnet: 1, ropsten: 3 + * */ + +var Transaction = function () { + function Transaction(data) { + _classCallCheck(this, Transaction); + + data = data || {}; + // Define Properties + var fields = [{ + name: 'nonce', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'gasPrice', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'gasLimit', + alias: 'gas', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'to', + allowZero: true, + length: 20, + default: new Buffer([]) + }, { + name: 'value', + length: 32, + allowLess: true, + default: new Buffer([]) + }, { + name: 'data', + alias: 'input', + allowZero: true, + default: new Buffer([]) + }, { + name: 'v', + allowZero: true, + default: new Buffer([0x1c]) + }, { + name: 'r', + length: 32, + allowZero: true, + allowLess: true, + default: new Buffer([]) + }, { + name: 's', + length: 32, + allowZero: true, + allowLess: true, + default: new Buffer([]) + }]; + + /** + * Returns the rlp encoding of the transaction + * @method serialize + * @return {Buffer} + * @memberof Transaction + * @name serialize + */ + // attached serialize + ethUtil.defineProperties(this, fields, data); + + /** + * @property {Buffer} from (read only) sender address of this transaction, mathematically derived from other parameters. + * @name from + * @memberof Transaction + */ + Object.defineProperty(this, 'from', { + enumerable: true, + configurable: true, + get: this.getSenderAddress.bind(this) + }); + + // calculate chainId from signature + var sigV = ethUtil.bufferToInt(this.v); + var chainId = Math.floor((sigV - 35) / 2); + if (chainId < 0) chainId = 0; + + // set chainId + this._chainId = chainId || data.chainId || 0; + this._homestead = true; + } + + /** + * If the tx's `to` is to the creation address + * @return {Boolean} + */ + + + Transaction.prototype.toCreationAddress = function toCreationAddress() { + return this.to.toString('hex') === ''; + }; + + /** + * Computes a sha3-256 hash of the serialized tx + * @param {Boolean} [includeSignature=true] whether or not to inculde the signature + * @return {Buffer} + */ + + + Transaction.prototype.hash = function hash(includeSignature) { + if (includeSignature === undefined) includeSignature = true; + + // EIP155 spec: + // when computing the hash of a transaction for purposes of signing or recovering, + // instead of hashing only the first six elements (ie. nonce, gasprice, startgas, to, value, data), + // hash nine elements, with v replaced by CHAIN_ID, r = 0 and s = 0 + + var items = void 0; + if (includeSignature) { + items = this.raw; + } else { + if (this._chainId > 0) { + var raw = this.raw.slice(); + this.v = this._chainId; + this.r = 0; + this.s = 0; + items = this.raw; + this.raw = raw; + } else { + items = this.raw.slice(0, 6); + } + } + + // create hash + return ethUtil.rlphash(items); + }; + + /** + * returns the public key of the sender + * @return {Buffer} + */ + + + Transaction.prototype.getChainId = function getChainId() { + return this._chainId; + }; + + /** + * returns the sender's address + * @return {Buffer} + */ + + + Transaction.prototype.getSenderAddress = function getSenderAddress() { + if (this._from) { + return this._from; + } + var pubkey = this.getSenderPublicKey(); + this._from = ethUtil.publicToAddress(pubkey); + return this._from; + }; + + /** + * returns the public key of the sender + * @return {Buffer} + */ + + + Transaction.prototype.getSenderPublicKey = function getSenderPublicKey() { + if (!this._senderPubKey || !this._senderPubKey.length) { + if (!this.verifySignature()) throw new Error('Invalid Signature'); + } + return this._senderPubKey; + }; + + /** + * Determines if the signature is valid + * @return {Boolean} + */ + + + Transaction.prototype.verifySignature = function verifySignature() { + var msgHash = this.hash(false); + // All transaction signatures whose s-value is greater than secp256k1n/2 are considered invalid. + if (this._homestead && new BN(this.s).cmp(N_DIV_2) === 1) { + return false; + } + + try { + var v = ethUtil.bufferToInt(this.v); + if (this._chainId > 0) { + v -= this._chainId * 2 + 8; + } + this._senderPubKey = ethUtil.ecrecover(msgHash, v, this.r, this.s); + } catch (e) { + return false; + } + + return !!this._senderPubKey; + }; + + /** + * sign a transaction with a given a private key + * @param {Buffer} privateKey + */ + + + Transaction.prototype.sign = function sign(privateKey) { + var msgHash = this.hash(false); + var sig = ethUtil.ecsign(msgHash, privateKey); + if (this._chainId > 0) { + sig.v += this._chainId * 2 + 8; + } + Object.assign(this, sig); + }; + + /** + * The amount of gas paid for the data in this tx + * @return {BN} + */ + + + Transaction.prototype.getDataFee = function getDataFee() { + var data = this.raw[5]; + var cost = new BN(0); + for (var i = 0; i < data.length; i++) { + data[i] === 0 ? cost.iaddn(fees.txDataZeroGas.v) : cost.iaddn(fees.txDataNonZeroGas.v); + } + return cost; + }; + + /** + * the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee) + * @return {BN} + */ + + + Transaction.prototype.getBaseFee = function getBaseFee() { + var fee = this.getDataFee().iaddn(fees.txGas.v); + if (this._homestead && this.toCreationAddress()) { + fee.iaddn(fees.txCreation.v); + } + return fee; + }; + + /** + * the up front amount that an account must have for this transaction to be valid + * @return {BN} + */ + + + Transaction.prototype.getUpfrontCost = function getUpfrontCost() { + return new BN(this.gasLimit).imul(new BN(this.gasPrice)).iadd(new BN(this.value)); + }; + + /** + * validates the signature and checks to see if it has enough gas + * @param {Boolean} [stringError=false] whether to return a string with a dscription of why the validation failed or return a Bloolean + * @return {Boolean|String} + */ + + + Transaction.prototype.validate = function validate(stringError) { + var errors = []; + if (!this.verifySignature()) { + errors.push('Invalid Signature'); + } + + if (this.getBaseFee().cmp(new BN(this.gasLimit)) > 0) { + errors.push(['gas limit is too low. Need at least ' + this.getBaseFee()]); + } + + if (stringError === undefined || stringError === false) { + return errors.length === 0; + } else { + return errors.join(' '); + } + }; + + return Transaction; +}(); + +module.exports = Transaction; +}).call(this,require("buffer").Buffer) +},{"buffer":113,"ethereum-common/params.json":611,"ethereumjs-util":612}],611:[function(require,module,exports){ +module.exports={ + "genesisGasLimit": { + "v": 5000, + "d": "Gas limit of the Genesis block." + }, + "genesisDifficulty": { + "v": 17179869184, + "d": "Difficulty of the Genesis block." + }, + "genesisNonce": { + "v": "0x0000000000000042", + "d": "the geneis nonce" + }, + "genesisExtraData": { + "v": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa", + "d": "extra data " + }, + "genesisHash": { + "v": "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3", + "d": "genesis hash" + }, + "genesisStateRoot": { + "v": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544", + "d": "the genesis state root" + }, + "minGasLimit": { + "v": 5000, + "d": "Minimum the gas limit may ever be." + }, + "gasLimitBoundDivisor": { + "v": 1024, + "d": "The bound divisor of the gas limit, used in update calculations." + }, + "minimumDifficulty": { + "v": 131072, + "d": "The minimum that the difficulty may ever be." + }, + "difficultyBoundDivisor": { + "v": 2048, + "d": "The bound divisor of the difficulty, used in the update calculations." + }, + "durationLimit": { + "v": 13, + "d": "The decision boundary on the blocktime duration used to determine whether difficulty should go up or not." + }, + "maximumExtraDataSize": { + "v": 32, + "d": "Maximum size extra data may be after Genesis." + }, + "epochDuration": { + "v": 30000, + "d": "Duration between proof-of-work epochs." + }, + "stackLimit": { + "v": 1024, + "d": "Maximum size of VM stack allowed." + }, + "callCreateDepth": { + "v": 1024, + "d": "Maximum depth of call/create stack." + }, + + "tierStepGas": { + "v": [0, 2, 3, 5, 8, 10, 20], + "d": "Once per operation, for a selection of them." + }, + "expGas": { + "v": 10, + "d": "Once per EXP instuction." + }, + "expByteGas": { + "v": 10, + "d": "Times ceil(log256(exponent)) for the EXP instruction." + }, + + "sha3Gas": { + "v": 30, + "d": "Once per SHA3 operation." + }, + "sha3WordGas": { + "v": 6, + "d": "Once per word of the SHA3 operation's data." + }, + "sloadGas": { + "v": 50, + "d": "Once per SLOAD operation." + }, + "sstoreSetGas": { + "v": 20000, + "d": "Once per SSTORE operation if the zeroness changes from zero." + }, + "sstoreResetGas": { + "v": 5000, + "d": "Once per SSTORE operation if the zeroness does not change from zero." + }, + "sstoreRefundGas": { + "v": 15000, + "d": "Once per SSTORE operation if the zeroness changes to zero." + }, + "jumpdestGas": { + "v": 1, + "d": "Refunded gas, once per SSTORE operation if the zeroness changes to zero." + }, + + "logGas": { + "v": 375, + "d": "Per LOG* operation." + }, + "logDataGas": { + "v": 8, + "d": "Per byte in a LOG* operation's data." + }, + "logTopicGas": { + "v": 375, + "d": "Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas." + }, + + "createGas": { + "v": 32000, + "d": "Once per CREATE operation & contract-creation transaction." + }, + + "callGas": { + "v": 40, + "d": "Once per CALL operation & message call transaction." + }, + "callStipend": { + "v": 2300, + "d": "Free gas given at beginning of call." + }, + "callValueTransferGas": { + "v": 9000, + "d": "Paid for CALL when the value transfor is non-zero." + }, + "callNewAccountGas": { + "v": 25000, + "d": "Paid for CALL when the destination address didn't exist prior." + }, + + "suicideRefundGas": { + "v": 24000, + "d": "Refunded following a suicide operation." + }, + + "memoryGas": { + "v": 3, + "d": "Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL." + }, + "quadCoeffDiv": { + "v": 512, + "d": "Divisor for the quadratic particle of the memory cost equation." + }, + + "createDataGas": { + "v": 200, + "d": "" + }, + "txGas": { + "v": 21000, + "d": "Per transaction. NOTE: Not payable on data of calls between transactions." + }, + "txCreation": { + "v": 32000, + "d": "the cost of creating a contract via tx" + }, + "txDataZeroGas": { + "v": 4, + "d": "Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions." + }, + "txDataNonZeroGas": { + "v": 68, + "d": "Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions." + }, + + "copyGas": { + "v": 3, + "d": "Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added." + }, + + "ecrecoverGas": { + "v": 3000, + "d": "" + }, + "sha256Gas": { + "v": 60, + "d": "" + }, + "sha256WordGas": { + "v": 12, + "d": "" + }, + "ripemd160Gas": { + "v": 600, + "d": "" + }, + "ripemd160WordGas": { + "v": 120, + "d": "" + }, + "identityGas": { + "v": 15, + "d": "" + }, + "identityWordGas": { + "v": 3, + "d": "" + }, + "minerReward": { + "v": "5000000000000000000", + "d": "the amount a miner get rewarded for mining a block" + }, + "ommerReward": { + "v": "625000000000000000", + "d": "The amount of wei a miner of an uncle block gets for being inculded in the blockchain" + }, + "niblingReward": { + "v": "156250000000000000", + "d": "the amount a miner gets for inculding a uncle" + }, + "homeSteadForkNumber": { + "v": 1150000, + "d": "the block that the Homestead fork started at" + }, + "homesteadRepriceForkNumber": { + "v": 2463000, + "d": "the block that the Homestead Reprice (EIP150) fork started at" + }, + "timebombPeriod": { + "v": 100000, + "d": "Exponential difficulty timebomb period" + }, + "freeBlockPeriod": { + "v": 2 + } +} + +},{}],612:[function(require,module,exports){ +'use strict'; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var createKeccakHash = require('keccak'); +var secp256k1 = require('secp256k1'); +var assert = require('assert'); +var rlp = require('rlp'); +var BN = require('bn.js'); +var createHash = require('create-hash'); +var Buffer = require('safe-buffer').Buffer; +Object.assign(exports, require('ethjs-util')); + +/** + * the max integer that this VM can handle (a ```BN```) + * @var {BN} MAX_INTEGER + */ +exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16); + +/** + * 2^256 (a ```BN```) + * @var {BN} TWO_POW256 + */ +exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16); + +/** + * Keccak-256 hash of null (a ```String```) + * @var {String} KECCAK256_NULL_S + */ +exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'; +exports.SHA3_NULL_S = exports.KECCAK256_NULL_S; + +/** + * Keccak-256 hash of null (a ```Buffer```) + * @var {Buffer} KECCAK256_NULL + */ +exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex'); +exports.SHA3_NULL = exports.KECCAK256_NULL; + +/** + * Keccak-256 of an RLP of an empty array (a ```String```) + * @var {String} KECCAK256_RLP_ARRAY_S + */ +exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'; +exports.SHA3_RLP_ARRAY_S = exports.KECCAK256_RLP_ARRAY_S; + +/** + * Keccak-256 of an RLP of an empty array (a ```Buffer```) + * @var {Buffer} KECCAK256_RLP_ARRAY + */ +exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex'); +exports.SHA3_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY; + +/** + * Keccak-256 hash of the RLP of null (a ```String```) + * @var {String} KECCAK256_RLP_S + */ +exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'; +exports.SHA3_RLP_S = exports.KECCAK256_RLP_S; + +/** + * Keccak-256 hash of the RLP of null (a ```Buffer```) + * @var {Buffer} KECCAK256_RLP + */ +exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex'); +exports.SHA3_RLP = exports.KECCAK256_RLP; + +/** + * [`BN`](https://github.com/indutny/bn.js) + * @var {Function} + */ +exports.BN = BN; + +/** + * [`rlp`](https://github.com/ethereumjs/rlp) + * @var {Function} + */ +exports.rlp = rlp; + +/** + * [`secp256k1`](https://github.com/cryptocoinjs/secp256k1-node/) + * @var {Object} + */ +exports.secp256k1 = secp256k1; + +/** + * Returns a buffer filled with 0s + * @method zeros + * @param {Number} bytes the number of bytes the buffer should be + * @return {Buffer} + */ +exports.zeros = function (bytes) { + return Buffer.allocUnsafe(bytes).fill(0); +}; + +/** + * Returns a zero address + * @method zeroAddress + * @return {String} + */ +exports.zeroAddress = function () { + var addressLength = 20; + var zeroAddress = exports.zeros(addressLength); + return exports.bufferToHex(zeroAddress); +}; + +/** + * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes. + * Or it truncates the beginning if it exceeds. + * @method lsetLength + * @param {Buffer|Array} msg the value to pad + * @param {Number} length the number of bytes the output should be + * @param {Boolean} [right=false] whether to start padding form the left or right + * @return {Buffer|Array} + */ +exports.setLengthLeft = exports.setLength = function (msg, length, right) { + var buf = exports.zeros(length); + msg = exports.toBuffer(msg); + if (right) { + if (msg.length < length) { + msg.copy(buf); + return buf; + } + return msg.slice(0, length); + } else { + if (msg.length < length) { + msg.copy(buf, length - msg.length); + return buf; + } + return msg.slice(-length); + } +}; + +/** + * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes. + * Or it truncates the beginning if it exceeds. + * @param {Buffer|Array} msg the value to pad + * @param {Number} length the number of bytes the output should be + * @return {Buffer|Array} + */ +exports.setLengthRight = function (msg, length) { + return exports.setLength(msg, length, true); +}; + +/** + * Trims leading zeros from a `Buffer` or an `Array` + * @param {Buffer|Array|String} a + * @return {Buffer|Array|String} + */ +exports.unpad = exports.stripZeros = function (a) { + a = exports.stripHexPrefix(a); + var first = a[0]; + while (a.length > 0 && first.toString() === '0') { + a = a.slice(1); + first = a[0]; + } + return a; +}; +/** + * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method. + * @param {*} v the value + */ +exports.toBuffer = function (v) { + if (!Buffer.isBuffer(v)) { + if (Array.isArray(v)) { + v = Buffer.from(v); + } else if (typeof v === 'string') { + if (exports.isHexString(v)) { + v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex'); + } else { + v = Buffer.from(v); + } + } else if (typeof v === 'number') { + v = exports.intToBuffer(v); + } else if (v === null || v === undefined) { + v = Buffer.allocUnsafe(0); + } else if (BN.isBN(v)) { + v = v.toArrayLike(Buffer); + } else if (v.toArray) { + // converts a BN to a Buffer + v = Buffer.from(v.toArray()); + } else { + throw new Error('invalid type'); + } + } + return v; +}; + +/** + * Converts a `Buffer` to a `Number` + * @param {Buffer} buf + * @return {Number} + * @throws If the input number exceeds 53 bits. + */ +exports.bufferToInt = function (buf) { + return new BN(exports.toBuffer(buf)).toNumber(); +}; + +/** + * Converts a `Buffer` into a hex `String` + * @param {Buffer} buf + * @return {String} + */ +exports.bufferToHex = function (buf) { + buf = exports.toBuffer(buf); + return '0x' + buf.toString('hex'); +}; + +/** + * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers. + * @param {Buffer} num + * @return {BN} + */ +exports.fromSigned = function (num) { + return new BN(num).fromTwos(256); +}; + +/** + * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers. + * @param {BN} num + * @return {Buffer} + */ +exports.toUnsigned = function (num) { + return Buffer.from(num.toTwos(256).toArray()); +}; + +/** + * Creates Keccak hash of the input + * @param {Buffer|Array|String|Number} a the input data + * @param {Number} [bits=256] the Keccak width + * @return {Buffer} + */ +exports.keccak = function (a, bits) { + a = exports.toBuffer(a); + if (!bits) bits = 256; + + return createKeccakHash('keccak' + bits).update(a).digest(); +}; + +/** + * Creates Keccak-256 hash of the input, alias for keccak(a, 256) + * @param {Buffer|Array|String|Number} a the input data + * @return {Buffer} + */ +exports.keccak256 = function (a) { + return exports.keccak(a); +}; + +/** + * Creates SHA-3 (Keccak) hash of the input [OBSOLETE] + * @param {Buffer|Array|String|Number} a the input data + * @param {Number} [bits=256] the SHA-3 width + * @return {Buffer} + */ +exports.sha3 = exports.keccak; + +/** + * Creates SHA256 hash of the input + * @param {Buffer|Array|String|Number} a the input data + * @return {Buffer} + */ +exports.sha256 = function (a) { + a = exports.toBuffer(a); + return createHash('sha256').update(a).digest(); +}; + +/** + * Creates RIPEMD160 hash of the input + * @param {Buffer|Array|String|Number} a the input data + * @param {Boolean} padded whether it should be padded to 256 bits or not + * @return {Buffer} + */ +exports.ripemd160 = function (a, padded) { + a = exports.toBuffer(a); + var hash = createHash('rmd160').update(a).digest(); + if (padded === true) { + return exports.setLength(hash, 32); + } else { + return hash; + } +}; + +/** + * Creates SHA-3 hash of the RLP encoded version of the input + * @param {Buffer|Array|String|Number} a the input data + * @return {Buffer} + */ +exports.rlphash = function (a) { + return exports.keccak(rlp.encode(a)); +}; + +/** + * Checks if the private key satisfies the rules of the curve secp256k1. + * @param {Buffer} privateKey + * @return {Boolean} + */ +exports.isValidPrivate = function (privateKey) { + return secp256k1.privateKeyVerify(privateKey); +}; + +/** + * Checks if the public key satisfies the rules of the curve secp256k1 + * and the requirements of Ethereum. + * @param {Buffer} publicKey The two points of an uncompressed key, unless sanitize is enabled + * @param {Boolean} [sanitize=false] Accept public keys in other formats + * @return {Boolean} + */ +exports.isValidPublic = function (publicKey, sanitize) { + if (publicKey.length === 64) { + // Convert to SEC1 for secp256k1 + return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey])); + } + + if (!sanitize) { + return false; + } + + return secp256k1.publicKeyVerify(publicKey); +}; + +/** + * Returns the ethereum address of a given public key. + * Accepts "Ethereum public keys" and SEC1 encoded keys. + * @param {Buffer} pubKey The two points of an uncompressed key, unless sanitize is enabled + * @param {Boolean} [sanitize=false] Accept public keys in other formats + * @return {Buffer} + */ +exports.pubToAddress = exports.publicToAddress = function (pubKey, sanitize) { + pubKey = exports.toBuffer(pubKey); + if (sanitize && pubKey.length !== 64) { + pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1); + } + assert(pubKey.length === 64); + // Only take the lower 160bits of the hash + return exports.keccak(pubKey).slice(-20); +}; + +/** + * Returns the ethereum public key of a given private key + * @param {Buffer} privateKey A private key must be 256 bits wide + * @return {Buffer} + */ +var privateToPublic = exports.privateToPublic = function (privateKey) { + privateKey = exports.toBuffer(privateKey); + // skip the type flag and use the X, Y points + return secp256k1.publicKeyCreate(privateKey, false).slice(1); +}; + +/** + * Converts a public key to the Ethereum format. + * @param {Buffer} publicKey + * @return {Buffer} + */ +exports.importPublic = function (publicKey) { + publicKey = exports.toBuffer(publicKey); + if (publicKey.length !== 64) { + publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1); + } + return publicKey; +}; + +/** + * ECDSA sign + * @param {Buffer} msgHash + * @param {Buffer} privateKey + * @return {Object} + */ +exports.ecsign = function (msgHash, privateKey) { + var sig = secp256k1.sign(msgHash, privateKey); + + var ret = {}; + ret.r = sig.signature.slice(0, 32); + ret.s = sig.signature.slice(32, 64); + ret.v = sig.recovery + 27; + return ret; +}; + +/** + * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call. + * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign` + * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key + * used to produce the signature. + * @param message + * @returns {Buffer} hash + */ +exports.hashPersonalMessage = function (message) { + var prefix = exports.toBuffer('\x19Ethereum Signed Message:\n' + message.length.toString()); + return exports.keccak(Buffer.concat([prefix, message])); +}; + +/** + * ECDSA public key recovery from signature + * @param {Buffer} msgHash + * @param {Number} v + * @param {Buffer} r + * @param {Buffer} s + * @return {Buffer} publicKey + */ +exports.ecrecover = function (msgHash, v, r, s) { + var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64); + var recovery = v - 27; + if (recovery !== 0 && recovery !== 1) { + throw new Error('Invalid signature v value'); + } + var senderPubKey = secp256k1.recover(msgHash, signature, recovery); + return secp256k1.publicKeyConvert(senderPubKey, false).slice(1); +}; + +/** + * Convert signature parameters into the format of `eth_sign` RPC method + * @param {Number} v + * @param {Buffer} r + * @param {Buffer} s + * @return {String} sig + */ +exports.toRpcSig = function (v, r, s) { + // NOTE: with potential introduction of chainId this might need to be updated + if (v !== 27 && v !== 28) { + throw new Error('Invalid recovery id'); + } + + // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin + // FIXME: this might change in the future - https://github.com/ethereum/go-ethereum/issues/2053 + return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v - 27)])); +}; + +/** + * Convert signature format of the `eth_sign` RPC method to signature parameters + * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053 + * @param {String} sig + * @return {Object} + */ +exports.fromRpcSig = function (sig) { + sig = exports.toBuffer(sig); + + // NOTE: with potential introduction of chainId this might need to be updated + if (sig.length !== 65) { + throw new Error('Invalid signature length'); + } + + var v = sig[64]; + // support both versions of `eth_sign` responses + if (v < 27) { + v += 27; + } + + return { + v: v, + r: sig.slice(0, 32), + s: sig.slice(32, 64) + }; +}; + +/** + * Returns the ethereum address of a given private key + * @param {Buffer} privateKey A private key must be 256 bits wide + * @return {Buffer} + */ +exports.privateToAddress = function (privateKey) { + return exports.publicToAddress(privateToPublic(privateKey)); +}; + +/** + * Checks if the address is a valid. Accepts checksummed addresses too + * @param {String} address + * @return {Boolean} + */ +exports.isValidAddress = function (address) { + return (/^0x[0-9a-fA-F]{40}$/.test(address) + ); +}; + +/** + * Checks if a given address is a zero address + * @method isZeroAddress + * @param {String} address + * @return {Boolean} + */ +exports.isZeroAddress = function (address) { + var zeroAddress = exports.zeroAddress(); + return zeroAddress === exports.addHexPrefix(address); +}; + +/** + * Returns a checksummed address + * @param {String} address + * @return {String} + */ +exports.toChecksumAddress = function (address) { + address = exports.stripHexPrefix(address).toLowerCase(); + var hash = exports.keccak(address).toString('hex'); + var ret = '0x'; + + for (var i = 0; i < address.length; i++) { + if (parseInt(hash[i], 16) >= 8) { + ret += address[i].toUpperCase(); + } else { + ret += address[i]; + } + } + + return ret; +}; + +/** + * Checks if the address is a valid checksummed address + * @param {Buffer} address + * @return {Boolean} + */ +exports.isValidChecksumAddress = function (address) { + return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address; +}; + +/** + * Generates an address of a newly created contract + * @param {Buffer} from the address which is creating this new address + * @param {Buffer} nonce the nonce of the from account + * @return {Buffer} + */ +exports.generateAddress = function (from, nonce) { + from = exports.toBuffer(from); + nonce = new BN(nonce); + + if (nonce.isZero()) { + // in RLP we want to encode null in the case of zero nonce + // read the RLP documentation for an answer if you dare + nonce = null; + } else { + nonce = Buffer.from(nonce.toArray()); + } + + // Only take the lower 160bits of the hash + return exports.rlphash([from, nonce]).slice(-20); +}; + +/** + * Returns true if the supplied address belongs to a precompiled account (Byzantium) + * @param {Buffer|String} address + * @return {Boolean} + */ +exports.isPrecompiled = function (address) { + var a = exports.unpad(address); + return a.length === 1 && a[0] >= 1 && a[0] <= 8; +}; + +/** + * Adds "0x" to a given `String` if it does not already start with "0x" + * @param {String} str + * @return {String} + */ +exports.addHexPrefix = function (str) { + if (typeof str !== 'string') { + return str; + } + + return exports.isHexPrefixed(str) ? str : '0x' + str; +}; + +/** + * Validate ECDSA signature + * @method isValidSignature + * @param {Buffer} v + * @param {Buffer} r + * @param {Buffer} s + * @param {Boolean} [homestead=true] + * @return {Boolean} + */ + +exports.isValidSignature = function (v, r, s, homestead) { + var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16); + var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16); + + if (r.length !== 32 || s.length !== 32) { + return false; + } + + if (v !== 27 && v !== 28) { + return false; + } + + r = new BN(r); + s = new BN(s); + + if (r.isZero() || r.gt(SECP256K1_N) || s.isZero() || s.gt(SECP256K1_N)) { + return false; + } + + if (homestead === false && new BN(s).cmp(SECP256K1_N_DIV_2) === 1) { + return false; + } + + return true; +}; + +/** + * Converts a `Buffer` or `Array` to JSON + * @param {Buffer|Array} ba + * @return {Array|String|null} + */ +exports.baToJSON = function (ba) { + if (Buffer.isBuffer(ba)) { + return '0x' + ba.toString('hex'); + } else if (ba instanceof Array) { + var array = []; + for (var i = 0; i < ba.length; i++) { + array.push(exports.baToJSON(ba[i])); + } + return array; + } +}; + +/** + * Defines properties on a `Object`. It make the assumption that underlying data is binary. + * @param {Object} self the `Object` to define properties on + * @param {Array} fields an array fields to define. Fields can contain: + * * `name` - the name of the properties + * * `length` - the number of bytes the field can have + * * `allowLess` - if the field can be less than the length + * * `allowEmpty` + * @param {*} data data to be validated against the definitions + */ +exports.defineProperties = function (self, fields, data) { + self.raw = []; + self._fields = []; + + // attach the `toJSON` + self.toJSON = function (label) { + if (label) { + var obj = {}; + self._fields.forEach(function (field) { + obj[field] = '0x' + self[field].toString('hex'); + }); + return obj; + } + return exports.baToJSON(this.raw); + }; + + self.serialize = function serialize() { + return rlp.encode(self.raw); + }; + + fields.forEach(function (field, i) { + self._fields.push(field.name); + function getter() { + return self.raw[i]; + } + function setter(v) { + v = exports.toBuffer(v); + + if (v.toString('hex') === '00' && !field.allowZero) { + v = Buffer.allocUnsafe(0); + } + + if (field.allowLess && field.length) { + v = exports.stripZeros(v); + assert(field.length >= v.length, 'The field ' + field.name + ' must not have more ' + field.length + ' bytes'); + } else if (!(field.allowZero && v.length === 0) && field.length) { + assert(field.length === v.length, 'The field ' + field.name + ' must have byte length of ' + field.length); + } + + self.raw[i] = v; + } + + Object.defineProperty(self, field.name, { + enumerable: true, + configurable: true, + get: getter, + set: setter + }); + + if (field.default) { + self[field.name] = field.default; + } + + // attach alias + if (field.alias) { + Object.defineProperty(self, field.alias, { + enumerable: false, + configurable: true, + set: setter, + get: getter + }); + } + }); + + // if the constuctor is passed data + if (data) { + if (typeof data === 'string') { + data = Buffer.from(exports.stripHexPrefix(data), 'hex'); + } + + if (Buffer.isBuffer(data)) { + data = rlp.decode(data); + } + + if (Array.isArray(data)) { + if (data.length > self._fields.length) { + throw new Error('wrong number of fields in data'); + } + + // make sure all the items are buffers + data.forEach(function (d, i) { + self[self._fields[i]] = exports.toBuffer(d); + }); + } else if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object') { + var keys = Object.keys(data); + fields.forEach(function (field) { + if (keys.indexOf(field.name) !== -1) self[field.name] = data[field.name]; + if (keys.indexOf(field.alias) !== -1) self[field.alias] = data[field.alias]; + }); + } else { + throw new Error('invalid data'); + } + } +}; +},{"assert":35,"bn.js":66,"create-hash":466,"ethjs-util":707,"keccak":868,"rlp":1331,"safe-buffer":1334,"secp256k1":1339}],613:[function(require,module,exports){ +'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var assert = require('assert'); +var utils = require('ethereumjs-util'); + +var BYTE_SIZE = 256; + +module.exports = function () { + /** + * Represents a Bloom + * @constructor + * @param {Buffer} bitvector + */ + function Bloom(bitvector) { + _classCallCheck(this, Bloom); + + if (!bitvector) { + this.bitvector = utils.zeros(BYTE_SIZE); + } else { + assert(bitvector.length === BYTE_SIZE, 'bitvectors must be 2048 bits long'); + this.bitvector = bitvector; + } + } + + /** + * adds an element to a bit vector of a 64 byte bloom filter + * @method add + * @param {Buffer} e the element to add + */ + + + _createClass(Bloom, [{ + key: 'add', + value: function add(e) { + e = utils.keccak256(e); + var mask = 2047; // binary 11111111111 + + for (var i = 0; i < 3; i++) { + var first2bytes = e.readUInt16BE(i * 2); + var loc = mask & first2bytes; + var byteLoc = loc >> 3; + var bitLoc = 1 << loc % 8; + this.bitvector[BYTE_SIZE - byteLoc - 1] |= bitLoc; + } + } + + /** + * checks if an element is in the bloom + * @method check + * @param {Buffer} e the element to check + * @returns {boolean} Returns {@code true} if the element is in the bloom + */ + + }, { + key: 'check', + value: function check(e) { + e = utils.keccak256(e); + var mask = 2047; // binary 11111111111 + var match = true; + + for (var i = 0; i < 3 && match; i++) { + var first2bytes = e.readUInt16BE(i * 2); + var loc = mask & first2bytes; + var byteLoc = loc >> 3; + var bitLoc = 1 << loc % 8; + match = this.bitvector[BYTE_SIZE - byteLoc - 1] & bitLoc; + } + + return Boolean(match); + } + + /** + * checks if multiple topics are in a bloom + * @method multiCheck + * @param {Buffer} topics + * @returns {boolean} Returns {@code true} if every topic is in the bloom + */ + + }, { + key: 'multiCheck', + value: function multiCheck(topics) { + var _this = this; + + return topics.every(function (t) { + return _this.check(t); + }); + } + + /** + * bitwise or blooms together + * @method or + * @param {Bloom} bloom + */ + + }, { + key: 'or', + value: function or(bloom) { + if (bloom) { + for (var i = 0; i <= BYTE_SIZE; i++) { + this.bitvector[i] = this.bitvector[i] | bloom.bitvector[i]; + } + } + } + }]); + + return Bloom; +}(); +},{"assert":35,"ethereumjs-util":640}],614:[function(require,module,exports){ +'use strict'; + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var Tree = require('functional-red-black-tree'); +var Account = require('ethereumjs-account'); +var async = require('async'); + +module.exports = function () { + function Cache(trie) { + _classCallCheck(this, Cache); + + this._cache = Tree(); + this._checkpoints = []; + this._trie = trie; + } + + /** + * Puts account to cache under its address. + * @param {Buffer} key - Address of account + * @param {Account} val - Account + * @param {bool} [fromTrie] + */ + + + _createClass(Cache, [{ + key: 'put', + value: function put(key, val) { + var fromTrie = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var modified = !fromTrie; + this._update(key, val, modified, false); + } + + /** + * Returns the queried account or an empty account. + * @param {Buffer} key - Address of account + */ + + }, { + key: 'get', + value: function get(key) { + var account = this.lookup(key); + if (!account) { + account = new Account(); + } + return account; + } + + /** + * Returns the queried account or undefined. + * @param {buffer} key - Address of account + */ + + }, { + key: 'lookup', + value: function lookup(key) { + key = key.toString('hex'); + + var it = this._cache.find(key); + if (it.node) { + var account = new Account(it.value.val); + return account; + } + } + + /** + * Looks up address in underlying trie. + * @param {Buffer} address - Address of account + * @param {Function} cb - Callback with params (err, account) + */ + + }, { + key: '_lookupAccount', + value: function _lookupAccount(address, cb) { + this._trie.get(address, function (err, raw) { + if (err) return cb(err); + var account = new Account(raw); + cb(null, account); + }); + } + + /** + * Looks up address in cache, if not found, looks it up + * in the underlying trie. + * @param {Buffer} key - Address of account + * @param {Function} cb - Callback with params (err, account) + */ + + }, { + key: 'getOrLoad', + value: function getOrLoad(key, cb) { + var _this = this; + + var account = this.lookup(key); + if (account) { + async.nextTick(cb, null, account); + } else { + this._lookupAccount(key, function (err, account) { + if (err) return cb(err); + _this._update(key, account, false, false); + cb(null, account); + }); + } + } + + /** + * Warms cache by loading their respective account from trie + * and putting them in cache. + * @param {Array} addresses - Array of addresses + * @param {Function} cb - Callback + */ + + }, { + key: 'warm', + value: function warm(addresses, cb) { + var _this2 = this; + + // shim till async supports iterators + var accountArr = []; + addresses.forEach(function (val) { + if (val) accountArr.push(val); + }); + + async.eachSeries(accountArr, function (addressHex, done) { + var address = Buffer.from(addressHex, 'hex'); + _this2._lookupAccount(address, function (err, account) { + if (err) return done(err); + _this2._update(address, account, false, false); + done(); + }); + }, cb); + } + + /** + * Flushes cache by updating accounts that have been modified + * and removing accounts that have been deleted. + * @param {function} cb - Callback + */ + + }, { + key: 'flush', + value: function flush(cb) { + var _this3 = this; + + var it = this._cache.begin; + var next = true; + async.whilst(function () { + return next; + }, function (done) { + if (it.value && it.value.modified) { + it.value.modified = false; + it.value.val = it.value.val.serialize(); + _this3._trie.put(Buffer.from(it.key, 'hex'), it.value.val, function () { + next = it.hasNext; + it.next(); + done(); + }); + } else if (it.value && it.value.deleted) { + it.value.modified = false; + it.value.deleted = false; + it.value.val = new Account().serialize(); + _this3._trie.del(Buffer.from(it.key, 'hex'), function () { + next = it.hasNext; + it.next(); + done(); + }); + } else { + next = it.hasNext; + it.next(); + async.nextTick(done); + } + }, cb); + } + + /** + * Marks current state of cache as checkpoint, which can + * later on be reverted or commited. + */ + + }, { + key: 'checkpoint', + value: function checkpoint() { + this._checkpoints.push(this._cache); + } + + /** + * Revert changes to cache last checkpoint (no effect on trie). + */ + + }, { + key: 'revert', + value: function revert() { + this._cache = this._checkpoints.pop(); + } + + /** + * Commits to current state of cache (no effect on trie). + */ + + }, { + key: 'commit', + value: function commit() { + this._checkpoints.pop(); + } + + /** + * Clears cache. + */ + + }, { + key: 'clear', + value: function clear() { + this._cache = Tree(); + } + + /** + * Marks address as deleted in cache. + * @params {Buffer} key - Address + */ + + }, { + key: 'del', + value: function del(key) { + this._update(key, new Account(), false, true); + } + }, { + key: '_update', + value: function _update(key, val, modified, deleted) { + key = key.toString('hex'); + var it = this._cache.find(key); + if (it.node) { + this._cache = it.update({ + val: val, + modified: modified, + deleted: deleted + }); + } else { + this._cache = this._cache.insert(key, { + val: val, + modified: modified, + deleted: deleted + }); + } + } + }]); + + return Cache; +}(); +},{"async":42,"ethereumjs-account":585,"functional-red-black-tree":725,"safe-buffer":1334}],615:[function(require,module,exports){ +'use strict'; + +var ERROR = { + OUT_OF_GAS: 'out of gas', + STACK_UNDERFLOW: 'stack underflow', + STACK_OVERFLOW: 'stack overflow', + INVALID_JUMP: 'invalid JUMP', + INVALID_OPCODE: 'invalid opcode', + REVERT: 'revert', + STATIC_STATE_CHANGE: 'static state change', + INTERNAL_ERROR: 'internal error' +}; + +function VmError(error) { + this.error = error; + this.errorType = 'VmError'; +} + +module.exports = { + ERROR: ERROR, + VmError: VmError +}; +},{}],616:[function(require,module,exports){ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; +var utils = require('ethereumjs-util'); + +module.exports = { + fake: true, + getBlock: function getBlock(blockTag, cb) { + var _hash; + + if (Buffer.isBuffer(blockTag)) { + _hash = utils.keccak256(blockTag); + } else if (Number.isInteger(blockTag)) { + _hash = utils.keccak256('0x' + utils.toBuffer(blockTag).toString('hex')); + } else { + return cb(new Error('Unknown blockTag type')); + } + + var block = { + hash: function hash() { + return _hash; + } + }; + + cb(null, block); + }, + + delBlock: function delBlock(hash, cb) { + cb(null); + }, + + iterator: function iterator(name, onBlock, cb) { + cb(null); + } +}; +},{"ethereumjs-util":640,"safe-buffer":1334}],617:[function(require,module,exports){ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); +var ethUtil = require('ethereumjs-util'); +var StateManager = require('./stateManager.js'); +var Common = require('ethereumjs-common').default; +var Account = require('ethereumjs-account'); +var AsyncEventEmitter = require('async-eventemitter'); +var Trie = require('merkle-patricia-tree/secure.js'); +var fakeBlockchain = require('./fakeBlockChain.js'); +var BN = ethUtil.BN; + +// require the precompiled contracts +var num01 = require('./precompiled/01-ecrecover.js'); +var num02 = require('./precompiled/02-sha256.js'); +var num03 = require('./precompiled/03-ripemd160.js'); +var num04 = require('./precompiled/04-identity.js'); +var num05 = require('./precompiled/05-modexp.js'); +var num06 = require('./precompiled/06-ecadd.js'); +var num07 = require('./precompiled/07-ecmul.js'); +var num08 = require('./precompiled/08-ecpairing.js'); + +module.exports = VM; + +VM.deps = { + ethUtil: ethUtil, + Account: require('ethereumjs-account'), + Trie: require('merkle-patricia-tree'), + rlp: require('ethereumjs-util').rlp + + /** + * VM Class, `new VM(opts)` creates a new VM object + * @method VM + * @param {Object} opts + * @param {StateManager} opts.stateManager a [`StateManager`](stateManager.md) instance to use as the state store (Beta API) + * @param {Trie} opts.state a merkle-patricia-tree instance for the state tree (ignored if stateManager is passed) + * @param {Blockchain} opts.blockchain a blockchain object for storing/retrieving blocks (ignored if stateManager is passed) + * @param {String|Number} opts.chain the chain the VM operates on [default: 'mainnet'] + * @param {String} opts.hardfork hardfork rules to be used [default: 'byzantium', supported: 'byzantium', 'constantinople', 'petersburg' (will throw on unsupported)] + * @param {Boolean} opts.activatePrecompiles create entries in the state tree for the precompiled contracts + * @param {Boolean} opts.allowUnlimitedContractSize allows unlimited contract sizes while debugging. By setting this to `true`, the check for contract size limit of 24KB (see [EIP-170](https://git.io/vxZkK)) is bypassed. (default: `false`; ONLY set to `true` during debugging) + * @param {Boolean} opts.emitFreeLogs Changes the behavior of the LOG opcode, the gas cost of the opcode becomes zero and calling it using STATICCALL won't throw. (default: `false`; ONLY set to `true` during debugging) + */ +};function VM() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.opts = opts; + + var chain = opts.chain ? opts.chain : 'mainnet'; + var hardfork = opts.hardfork ? opts.hardfork : 'byzantium'; + var supportedHardforks = ['byzantium', 'constantinople', 'petersburg']; + this._common = new Common(chain, hardfork, supportedHardforks); + + if (opts.stateManager) { + this.stateManager = opts.stateManager; + } else { + var trie = opts.state || new Trie(); + if (opts.activatePrecompiles) { + for (var i = 1; i <= 8; i++) { + trie.put(new BN(i).toArrayLike(Buffer, 'be', 20), new Account().serialize()); + } + } + this.stateManager = new StateManager({ trie: trie, common: this._common }); + } + + this.blockchain = opts.blockchain || fakeBlockchain; + + this.allowUnlimitedContractSize = opts.allowUnlimitedContractSize === undefined ? false : opts.allowUnlimitedContractSize; + this.emitFreeLogs = opts.emitFreeLogs === undefined ? false : opts.emitFreeLogs; + + // precompiled contracts + this._precompiled = {}; + this._precompiled['0000000000000000000000000000000000000001'] = num01; + this._precompiled['0000000000000000000000000000000000000002'] = num02; + this._precompiled['0000000000000000000000000000000000000003'] = num03; + this._precompiled['0000000000000000000000000000000000000004'] = num04; + this._precompiled['0000000000000000000000000000000000000005'] = num05; + this._precompiled['0000000000000000000000000000000000000006'] = num06; + this._precompiled['0000000000000000000000000000000000000007'] = num07; + this._precompiled['0000000000000000000000000000000000000008'] = num08; + + AsyncEventEmitter.call(this); +} + +util.inherits(VM, AsyncEventEmitter); + +VM.prototype.runCode = require('./runCode.js'); +VM.prototype.runJIT = require('./runJit.js'); +VM.prototype.runBlock = require('./runBlock.js'); +VM.prototype.runTx = require('./runTx.js'); +VM.prototype.runCall = require('./runCall.js'); +VM.prototype.runBlockchain = require('./runBlockchain.js'); + +VM.prototype.copy = function () { + return new VM({ stateManager: this.stateManager.copy(), blockchain: this.blockchain }); +}; +},{"./fakeBlockChain.js":616,"./precompiled/01-ecrecover.js":618,"./precompiled/02-sha256.js":619,"./precompiled/03-ripemd160.js":620,"./precompiled/04-identity.js":621,"./precompiled/05-modexp.js":622,"./precompiled/06-ecadd.js":623,"./precompiled/07-ecmul.js":624,"./precompiled/08-ecpairing.js":625,"./runBlock.js":626,"./runBlockchain.js":627,"./runCall.js":628,"./runCode.js":629,"./runJit.js":630,"./runTx.js":631,"./stateManager.js":632,"async-eventemitter":39,"ethereumjs-account":585,"ethereumjs-common":609,"ethereumjs-util":640,"merkle-patricia-tree":947,"merkle-patricia-tree/secure.js":953,"safe-buffer":1334,"util":1439}],618:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var error = require('../exceptions.js').ERROR; +var assert = require('assert'); + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + + results.gasUsed = new BN(opts._common.param('gasPrices', 'ecRecover')); + + if (opts.gasLimit.lt(results.gasUsed)) { + results.return = Buffer.alloc(0); + results.gasUsed = opts.gasLimit; + results.exception = 0; // 0 means VM fail (in this case because of OOG) + results.exceptionError = error.OUT_OF_GAS; + return results; + } + + var data = utils.setLengthRight(opts.data, 128); + + var msgHash = data.slice(0, 32); + var v = data.slice(32, 64); + var r = data.slice(64, 96); + var s = data.slice(96, 128); + + var publicKey; + try { + publicKey = utils.ecrecover(msgHash, new BN(v).toNumber(), r, s); + } catch (e) { + results.return = Buffer.alloc(0); + results.exception = 1; + return results; + } + + results.return = utils.setLengthLeft(utils.publicToAddress(publicKey), 32); + results.exception = 1; + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640}],619:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var error = require('../exceptions.js').ERROR; +var assert = require('assert'); + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + var data = opts.data; + + results.gasUsed = new BN(opts._common.param('gasPrices', 'sha256')); + results.gasUsed.iadd(new BN(opts._common.param('gasPrices', 'sha256Word')).imuln(Math.ceil(data.length / 32))); + + if (opts.gasLimit.lt(results.gasUsed)) { + results.return = Buffer.alloc(0); + results.gasUsed = opts.gasLimit; + results.exceptionError = error.OUT_OF_GAS; + results.exception = 0; // 0 means VM fail (in this case because of OOG) + return results; + } + + results.return = utils.sha256(data); + results.exception = 1; + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640}],620:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var error = require('../exceptions.js').ERROR; +var assert = require('assert'); + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + var data = opts.data; + + results.gasUsed = new BN(opts._common.param('gasPrices', 'ripemd160')); + results.gasUsed.iadd(new BN(opts._common.param('gasPrices', 'ripemd160Word')).imuln(Math.ceil(data.length / 32))); + + if (opts.gasLimit.lt(results.gasUsed)) { + results.return = Buffer.alloc(0); + results.gasUsed = opts.gasLimit; + results.exceptionError = error.OUT_OF_GAS; + results.exception = 0; // 0 means VM fail (in this case because of OOG) + return results; + } + + results.return = utils.ripemd160(data, true); + results.exception = 1; + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640}],621:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var error = require('../exceptions.js').ERROR; +var assert = require('assert'); + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + var data = opts.data; + + results.gasUsed = new BN(opts._common.param('gasPrices', 'identity')); + results.gasUsed.iadd(new BN(opts._common.param('gasPrices', 'identityWord')).imuln(Math.ceil(data.length / 32))); + + if (opts.gasLimit.lt(results.gasUsed)) { + results.return = Buffer.alloc(0); + results.gasUsed = opts.gasLimit; + results.exceptionError = error.OUT_OF_GAS; + results.exception = 0; // 0 means VM fail (in this case because of OOG) + return results; + } + + results.return = data; + results.exception = 1; + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640}],622:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var error = require('../exceptions.js').ERROR; +var assert = require('assert'); + +function multComplexity(x) { + var fac1; + var fac2; + if (x.lten(64)) { + return x.sqr(); + } else if (x.lten(1024)) { + // return Math.floor(Math.pow(x, 2) / 4) + 96 * x - 3072 + fac1 = x.sqr().divn(4); + fac2 = x.muln(96); + return fac1.add(fac2).subn(3072); + } else { + // return Math.floor(Math.pow(x, 2) / 16) + 480 * x - 199680 + fac1 = x.sqr().divn(16); + fac2 = x.muln(480); + return fac1.add(fac2).subn(199680); + } +} + +function getAdjustedExponentLength(data) { + var expBytesStart; + try { + var baseLen = new BN(data.slice(0, 32)).toNumber(); + expBytesStart = 96 + baseLen; // 96 for base length, then exponent length, and modulus length, then baseLen for the base data, then exponent bytes start + } catch (e) { + expBytesStart = Number.MAX_SAFE_INTEGER - 32; + } + var expLen = new BN(data.slice(32, 64)); + var firstExpBytes = Buffer.from(data.slice(expBytesStart, expBytesStart + 32)); // first word of the exponent data + firstExpBytes = utils.setLengthRight(firstExpBytes, 32); // reading past the data reads virtual zeros + firstExpBytes = new BN(firstExpBytes); + var max32expLen = 0; + if (expLen.ltn(32)) { + max32expLen = 32 - expLen.toNumber(); + } + firstExpBytes = firstExpBytes.shrn(8 * Math.max(max32expLen, 0)); + + var bitLen = -1; + while (firstExpBytes.gtn(0)) { + bitLen = bitLen + 1; + firstExpBytes = firstExpBytes.ushrn(1); + } + var expLenMinus32OrZero = expLen.subn(32); + if (expLenMinus32OrZero.ltn(0)) { + expLenMinus32OrZero = new BN(0); + } + var eightTimesExpLenMinus32OrZero = expLenMinus32OrZero.muln(8); + var adjustedExpLen = eightTimesExpLenMinus32OrZero; + if (bitLen > 0) { + adjustedExpLen.iaddn(bitLen); + } + return adjustedExpLen; +} + +// Taken from https://stackoverflow.com/a/1503019 +function expmod(B, E, M) { + if (E.isZero()) return new BN(1).mod(M); + var BM = B.mod(M); + var R = expmod(BM, E.divn(2), M); + R = R.mul(R).mod(M); + if (E.mod(new BN(2)).isZero()) return R; + return R.mul(BM).mod(M); +} + +function getOOGResults(opts, results) { + results.return = Buffer.alloc(0); + results.gasUsed = opts.gasLimit; + results.exception = 0; // 0 means VM fail (in this case because of OOG) + results.exceptionError = error.OUT_OF_GAS; + return results; +} + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + var data = opts.data; + + var adjustedELen = getAdjustedExponentLength(data); + if (adjustedELen.ltn(1)) { + adjustedELen = new BN(1); + } + + var bLen = new BN(data.slice(0, 32)); + var eLen = new BN(data.slice(32, 64)); + var mLen = new BN(data.slice(64, 96)); + + var maxLen = bLen; + if (maxLen.lt(mLen)) { + maxLen = mLen; + } + var Gquaddivisor = opts._common.param('gasPrices', 'modexpGquaddivisor'); + var gasUsed = adjustedELen.mul(multComplexity(maxLen)).divn(Gquaddivisor); + + if (opts.gasLimit.lt(gasUsed)) { + return getOOGResults(opts, results); + } + + results.gasUsed = gasUsed; + + if (bLen.isZero()) { + results.return = new BN(0).toArrayLike(Buffer, 'be', 1); + results.exception = 1; + return results; + } + + if (mLen.isZero()) { + results.return = Buffer.alloc(0); + results.exception = 1; + return results; + } + + var maxInt = new BN(Number.MAX_SAFE_INTEGER); + var maxSize = new BN(2147483647); // ethereumjs-util setLengthRight limitation + + if (bLen.gt(maxSize) || eLen.gt(maxSize) || mLen.gt(maxSize)) { + return getOOGResults(opts, results); + } + + var bStart = new BN(96); + var bEnd = bStart.add(bLen); + var eStart = bEnd; + var eEnd = eStart.add(eLen); + var mStart = eEnd; + var mEnd = mStart.add(mLen); + + if (mEnd.gt(maxInt)) { + return getOOGResults(opts, results); + } + + bLen = bLen.toNumber(); + eLen = eLen.toNumber(); + mLen = mLen.toNumber(); + + var B = new BN(utils.setLengthRight(data.slice(bStart.toNumber(), bEnd.toNumber()), bLen)); + var E = new BN(utils.setLengthRight(data.slice(eStart.toNumber(), eEnd.toNumber()), eLen)); + var M = new BN(utils.setLengthRight(data.slice(mStart.toNumber(), mEnd.toNumber()), mLen)); + + // console.log('MODEXP input') + // console.log('B:', bLen, B) + // console.log('E:', eLen, E) + // console.log('M:', mLen, M) + + var R; + if (M.isZero()) { + R = new BN(0); + } else { + R = expmod(B, E, M); + } + var result = R.toArrayLike(Buffer, 'be', mLen); + + results.return = result; + results.exception = 1; + + // console.log('MODEXP output', result) + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640}],623:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var error = require('../exceptions.js').ERROR; +var assert = require('assert'); + +var bn128 = require('rustbn.js'); + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + var inputData = opts.data; + + results.gasUsed = new BN(opts._common.param('gasPrices', 'ecAdd')); + if (opts.gasLimit.lt(results.gasUsed)) { + results.return = Buffer.alloc(0); + results.exception = 0; + results.gasUsed = new BN(opts.gasLimit); + results.exceptionError = error.OUT_OF_GAS; + return results; + } + + var returnData = bn128.add(inputData); + + // check ecadd success or failure by comparing the output length + if (returnData.length !== 64) { + results.return = Buffer.alloc(0); + results.exception = 0; + results.gasUsed = new BN(opts.gasLimit); + results.exceptionError = error.OUT_OF_GAS; + } else { + results.return = returnData; + results.exception = 1; + } + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640,"rustbn.js":1332}],624:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var ERROR = require('../exceptions.js').ERROR; +var BN = utils.BN; +var assert = require('assert'); + +var bn128 = require('rustbn.js'); + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + var inputData = opts.data; + + results.gasUsed = new BN(opts._common.param('gasPrices', 'ecMul')); + + if (opts.gasLimit.lt(results.gasUsed)) { + results.return = Buffer.alloc(0); + results.exception = 0; + results.gasUsed = new BN(opts.gasLimit); + results.exceptionError = ERROR.OUT_OF_GAS; + return results; + } + + var returnData = bn128.mul(inputData); + + // check ecmul success or failure by comparing the output length + if (returnData.length !== 64) { + results.return = Buffer.alloc(0); + results.exception = 0; + results.gasUsed = new BN(opts.gasLimit); + results.exceptionError = ERROR.OUT_OF_GAS; + } else { + results.return = returnData; + results.exception = 1; + } + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640,"rustbn.js":1332}],625:[function(require,module,exports){ +(function (Buffer){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var error = require('../exceptions.js').ERROR; +var assert = require('assert'); + +var bn128 = require('rustbn.js'); + +module.exports = function (opts) { + assert(opts.data); + + var results = {}; + var inputData = opts.data; + + // no need to care about non-divisible-by-192, because bn128.pairing will properly fail in that case + var inputDataSize = Math.floor(inputData.length / 192); + + var gascost = opts._common.param('gasPrices', 'ecPairing') + inputDataSize * opts._common.param('gasPrices', 'ecPairingWord'); + results.gasUsed = new BN(gascost); + + if (opts.gasLimit.ltn(gascost)) { + results.return = Buffer.alloc(0); + results.gasUsed = opts.gasLimit; + results.exceptionError = error.OUT_OF_GAS; + results.exception = 0; // 0 means VM fail (in this case because of OOG) + return results; + } + + var returnData = bn128.pairing(inputData); + + // check ecpairing success or failure by comparing the output length + if (returnData.length !== 32) { + results.return = Buffer.alloc(0); + results.gasUsed = opts.gasLimit; + results.exceptionError = error.OUT_OF_GAS; + results.exception = 0; + } else { + results.return = returnData; + results.exception = 1; + } + + return results; +}; +}).call(this,require("buffer").Buffer) +},{"../exceptions.js":615,"assert":35,"buffer":113,"ethereumjs-util":640,"rustbn.js":1332}],626:[function(require,module,exports){ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; +var async = require('async'); +var ethUtil = require('ethereumjs-util'); +var Bloom = require('./bloom'); +var rlp = ethUtil.rlp; +var Trie = require('merkle-patricia-tree'); +var BN = ethUtil.BN; + +/** + * Processes the `block` running all of the transactions it contains and updating the miner's account + * @method vm.runBlock + * @param opts + * @param {Block} opts.block the [`Block`](https://github.com/ethereumjs/ethereumjs-block) to process + * @param {Boolean} opts.generate [gen=false] whether to generate the stateRoot, if false `runBlock` will check the stateRoot of the block against the Trie + * @param {runBlock~callback} cb callback + */ + +/** + * Callback for `runBlock` method + * @callback runBlock~callback + * @param {Error} error an error that may have happened or `null` + * @param {Object} results + * @param {Array} results.receipts the receipts from the transactions in the block + * @param {Array} results.results +*/ +module.exports = function (opts, cb) { + if (typeof opts === 'function' && cb === undefined) { + cb = opts; + return cb(new Error('invalid input, opts must be provided')); + } + if (!opts.block) { + return cb(new Error('invalid input, block must be provided')); + } + + var self = this; + + // parse options + var block = opts.block; + var skipBlockValidation = opts.skipBlockValidation || false; + var generateStateRoot = !!opts.generate; + var validateStateRoot = !generateStateRoot; + var bloom = new Bloom(); + var receiptTrie = new Trie(); + // the total amount of gas used processing this block + var gasUsed = new BN(0); + var checkpointedState = false; + var receipts = []; + var txResults = []; + var result; + + // run everything + async.series([beforeBlock, validateBlock, setStateRoot, checkpointState, processTransactions, payOmmersAndMiner], parseBlockResults); + + function beforeBlock(cb) { + /** + * The `beforeBlock` event + * + * @event Event: beforeBlock + * @type {Object} + * @property {Block} block emits the block that is about to be processed + */ + self.emit('beforeBlock', opts.block, cb); + } + + function afterBlock(cb) { + /** + * The `afterBlock` event + * + * @event Event: afterBlock + * @type {Object} + * @property {Object} result emits the results of processing a block + */ + self.emit('afterBlock', result, cb); + } + + function validateBlock(cb) { + if (skipBlockValidation) { + cb(); + } else { + if (new BN(block.header.gasLimit).gte(new BN('8000000000000000', 16))) { + cb(new Error('Invalid block with gas limit greater than (2^63 - 1)')); + } else { + block.validate(self.blockchain, cb); + } + } + } + + function setStateRoot(cb) { + if (opts.root) { + self.stateManager.setStateRoot(opts.root, cb); + } else { + cb(null); + } + } + + function checkpointState(cb) { + checkpointedState = true; + self.stateManager.checkpoint(cb); + } + + /** + * Processes all of the transaction in the block + * @method processTransaction + * @private + * @param {Function} cb the callback is given error if there are any + */ + function processTransactions(cb) { + var validReceiptCount = 0; + + async.eachSeries(block.transactions, processTx, cb); + + function processTx(tx, cb) { + var gasLimitIsHigherThanBlock = new BN(block.header.gasLimit).lt(new BN(tx.gasLimit).add(gasUsed)); + if (gasLimitIsHigherThanBlock) { + cb(new Error('tx has a higher gas limit than the block')); + return; + } + + // run the tx through the VM + self.runTx({ + tx: tx, + block: block + }, parseTxResult); + + function parseTxResult(err, result) { + txResults.push(result); + // var receiptResult = new BN(1) + + // abort if error + if (err) { + receipts.push(null); + cb(err); + return; + } + + gasUsed = gasUsed.add(result.gasUsed); + // combine blooms via bitwise OR + bloom.or(result.bloom); + + if (generateStateRoot) { + block.header.bloom = bloom.bitvector; + } + + var txLogs = result.vm.logs || []; + + var rawTxReceipt = [result.vm.exception ? 1 : 0, // result.vm.exception is 0 when an exception occurs, and 1 when it doesn't. TODO make this the opposite + gasUsed.toArrayLike(Buffer), result.bloom.bitvector, txLogs]; + var txReceipt = { + status: rawTxReceipt[0], + gasUsed: rawTxReceipt[1], + bitvector: rawTxReceipt[2], + logs: rawTxReceipt[3] + }; + + receipts.push(txReceipt); + receiptTrie.put(rlp.encode(validReceiptCount), rlp.encode(rawTxReceipt), function () { + validReceiptCount++; + cb(); + }); + } + } + } + + // credit all block rewards + function payOmmersAndMiner(cb) { + var ommers = block.uncleHeaders; + + // pay each ommer + async.series([rewardOmmers, rewardMiner], cb); + + function rewardOmmers(done) { + async.each(block.uncleHeaders, function (ommer, next) { + // calculate reward + var minerReward = new BN(self._common.param('pow', 'minerReward')); + var heightDiff = new BN(block.header.number).sub(new BN(ommer.number)); + var reward = new BN(8).sub(heightDiff).mul(minerReward.divn(8)); + + if (reward.ltn(0)) { + reward = new BN(0); + } + + rewardAccount(ommer.coinbase, reward, next); + }, done); + } + + function rewardMiner(done) { + // calculate nibling reward + var minerReward = new BN(self._common.param('pow', 'minerReward')); + var niblingReward = minerReward.divn(32); + var totalNiblingReward = niblingReward.muln(ommers.length); + var reward = minerReward.add(totalNiblingReward); + rewardAccount(block.header.coinbase, reward, done); + } + + function rewardAccount(address, reward, done) { + self.stateManager.getAccount(address, function (err, account) { + if (err) return done(err); + // give miner the block reward + account.balance = new BN(account.balance).add(reward); + self.stateManager.putAccount(address, account, done); + }); + } + } + + // handle results or error from block run + function parseBlockResults(err) { + if (err) { + if (checkpointedState) { + self.stateManager.revert(function () { + cb(err); + }); + } else { + cb(err); + } + return; + } + + self.stateManager.commit(function (err) { + if (err) return cb(err); + + self.stateManager.getStateRoot(function (err, stateRoot) { + if (err) return cb(err); + + // credit all block rewards + if (generateStateRoot) { + block.header.stateRoot = stateRoot; + } + + if (validateStateRoot) { + if (receiptTrie.root && receiptTrie.root.toString('hex') !== block.header.receiptTrie.toString('hex')) { + err = new Error((err || '') + 'invalid receiptTrie '); + } + if (bloom.bitvector.toString('hex') !== block.header.bloom.toString('hex')) { + err = new Error((err || '') + 'invalid bloom '); + } + if (ethUtil.bufferToInt(block.header.gasUsed) !== Number(gasUsed)) { + err = new Error((err || '') + 'invalid gasUsed '); + } + if (stateRoot.toString('hex') !== block.header.stateRoot.toString('hex')) { + err = new Error((err || '') + 'invalid block stateRoot '); + } + } + + result = { + receipts: receipts, + results: txResults, + error: err + }; + + afterBlock(cb.bind(this, err, result)); + }); + }); + } +}; +},{"./bloom":613,"async":42,"ethereumjs-util":640,"merkle-patricia-tree":947,"safe-buffer":1334}],627:[function(require,module,exports){ +'use strict'; + +var async = require('async'); + +/** + * Processes blocks and adds them to the blockchain + * @method vm.runBlockchain + * @param {Blockchain} blockchain A [blockchain](https://github.com/ethereum/ethereumjs-blockchain) that to process + * @param {Function} cb the callback function + */ +module.exports = function (blockchain, cb) { + var self = this; + var headBlock, parentState; + + // parse arguments + if (typeof blockchain === 'function') { + cb = blockchain; + blockchain = undefined; + } + + blockchain = blockchain || self.blockchain; + + // setup blockchain iterator + blockchain.iterator('vm', processBlock, cb); + function processBlock(block, reorg, cb) { + async.series([getStartingState, runBlock], cb); + + // determine starting state for block run + function getStartingState(cb) { + // if we are just starting or if a chain re-org has happened + if (!headBlock || reorg) { + blockchain.getBlock(block.header.parentHash, function (err, parentBlock) { + parentState = parentBlock.header.stateRoot; + // generate genesis state if we are at the genesis block + // we don't have the genesis state + if (!headBlock) { + return self.stateManager.generateCanonicalGenesis(cb); + } else { + cb(err); + } + }); + } else { + parentState = headBlock.header.stateRoot; + cb(); + } + } + + // run block, update head if valid + function runBlock(cb) { + self.runBlock({ + block: block, + root: parentState + }, function (err, results) { + if (err) { + // remove invalid block + blockchain.delBlock(block.header.hash(), function () { + cb(err); + }); + } else { + // set as new head block + headBlock = block; + cb(); + } + }); + } + } +}; +},{"async":42}],628:[function(require,module,exports){ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; +var async = require('async'); +var ethUtil = require('ethereumjs-util'); +var BN = ethUtil.BN; +var exceptions = require('./exceptions.js'); +var StorageReader = require('./storageReader'); + +var ERROR = exceptions.ERROR; + +/** + * runs a CALL operation + * @method vm.runCall + * @private + * @param opts + * @param opts.block {Block} + * @param opts.caller {Buffer} + * @param opts.code {Buffer} this is for CALLCODE where the code to load is different than the code from the to account. + * @param opts.data {Buffer} + * @param opts.gasLimit {Buffer | BN.js } + * @param opts.gasPrice {Buffer} + * @param opts.origin {Buffer} [] + * @param opts.to {Buffer} + * @param opts.value {Buffer} + * @param {Function} cb the callback + */ +module.exports = function (opts, cb) { + var self = this; + var stateManager = self.stateManager; + + var vmResults = {}; + var toAccount; + var toAddress = opts.to; + var createdAddress; + var txValue = opts.value || Buffer.from([0]); + var caller = opts.caller; + var account; + var block = opts.block; + var code = opts.code; + var txData = opts.data; + var gasLimit = opts.gasLimit || new BN(0xffffff); + gasLimit = new BN(opts.gasLimit); // make sure is a BN + var gasPrice = opts.gasPrice; + var gasUsed = new BN(0); + var origin = opts.origin; + var isCompiled = opts.compiled; + var depth = opts.depth; + // opts.suicides is kept for backward compatiblity with pre-EIP6 syntax + var selfdestruct = opts.selfdestruct || opts.suicides; + var delegatecall = opts.delegatecall || false; + var isStatic = opts.static || false; + var salt = opts.salt || null; + var storageReader = opts.storageReader || new StorageReader(stateManager); + + txValue = new BN(txValue); + + // run and parse + async.series([checkpointState, loadFromAccount, subTxValue, loadToAccount, addTxValue, loadCode, runCode, saveCode], parseCallResult); + + function checkpointState(cb) { + stateManager.checkpoint(cb); + } + + function loadFromAccount(done) { + stateManager.getAccount(caller, function (err, fromAccount) { + account = fromAccount; + done(err); + }); + } + + function loadToAccount(done) { + // get receiver's account + if (!toAddress) { + // generate a new contract if no `to` + code = txData; + txData = undefined; + var newNonce = new BN(account.nonce).subn(1); + + if (salt) { + createdAddress = toAddress = ethUtil.generateAddress2(caller, salt, code); + } else { + createdAddress = toAddress = ethUtil.generateAddress(caller, newNonce.toArray()); + } + + checkAccountState(createdAddress, setupNewContract, done); + } else { + // else load the `to` account + stateManager.getAccount(toAddress, function (err, account) { + toAccount = account; + done(err); + }); + } + } + + function checkAccountState(address, next, done) { + stateManager.getAccount(address, function (err, account) { + if (err) { + done(err); + return; + } + + if (account.nonce && new BN(account.nonce) > 0 || account.codeHash.compare(ethUtil.KECCAK256_NULL) !== 0) { + toAccount = account; + code = new Buffer('fe', 'hex'); // Invalid init code + done(); + return; + } + + next(address, done); + }); + } + + function setupNewContract(address, done) { + stateManager.clearContractStorage(address, function (err) { + if (err) { + done(err); + return; + } + + async.series([newContractEvent, getAccount], done); + + function newContractEvent(callback) { + self.emit('newContract', { + address: address, + code: code + }, callback); + } + + function getAccount(callback) { + stateManager.getAccount(address, function (err, account) { + toAccount = account; + toAccount.nonce = new BN(toAccount.nonce).addn(1).toArrayLike(Buffer); + callback(err); + }); + } + }); + } + + function subTxValue(cb) { + if (delegatecall) { + cb(); + return; + } + var newBalance = new BN(account.balance).sub(txValue); + account.balance = newBalance; + stateManager.putAccount(ethUtil.toBuffer(caller), account, cb); + } + + function addTxValue(cb) { + if (delegatecall) { + cb(); + return; + } + // add the amount sent to the `to` account + var newBalance = new BN(toAccount.balance).add(txValue); + toAccount.balance = newBalance; + // putAccount as the nonce may have changed for contract creation + stateManager.putAccount(ethUtil.toBuffer(toAddress), toAccount, cb); + } + + function loadCode(cb) { + // loads the contract's code if the account is a contract + if (code || !(toAccount.isContract() || self._precompiled[toAddress.toString('hex')])) { + cb(); + return; + } + + if (self._precompiled[toAddress.toString('hex')]) { + isCompiled = true; + code = self._precompiled[toAddress.toString('hex')]; + cb(); + return; + } + + stateManager.getContractCode(toAddress, function (err, c, comp) { + if (err) return cb(err); + isCompiled = comp; + code = c; + cb(); + }); + } + + function runCode(cb) { + if (!code) { + vmResults.exception = 1; + stateManager.commit(cb); + return; + } + + var runCodeOpts = { + code: code, + data: txData, + gasLimit: gasLimit, + gasPrice: gasPrice, + address: toAddress, + origin: origin, + caller: caller, + value: txValue.toArrayLike(Buffer), + block: block, + depth: depth, + selfdestruct: selfdestruct, + static: isStatic, + storageReader: storageReader + + // run Code through vm + };var codeRunner = isCompiled ? self.runJIT : self.runCode; + codeRunner.call(self, runCodeOpts, parseRunResult); + + function parseRunResult(err, results) { + vmResults = results; + + if (createdAddress) { + // fee for size of the return value + var totalGas = results.gasUsed; + if (!results.runState.vmError) { + var returnFee = new BN(results.return.length * self._common.param('gasPrices', 'createData')); + totalGas = totalGas.add(returnFee); + } + // if not enough gas + if (totalGas.lte(gasLimit) && (self.allowUnlimitedContractSize || results.return.length <= 24576)) { + results.gasUsed = totalGas; + } else { + results.return = Buffer.alloc(0); + // since Homestead + results.exception = 0; + err = results.exceptionError = ERROR.OUT_OF_GAS; + results.gasUsed = gasLimit; + } + } + + gasUsed = results.gasUsed; + if (err) { + results.logs = []; + stateManager.revert(function (revertErr) { + if (revertErr || !isCompiled) cb(revertErr);else { + // Empty precompiled contracts need to be deleted even in case of OOG + // because the bug in both Geth and Parity led to deleting RIPEMD precompiled in this case + // see https://github.com/ethereum/go-ethereum/pull/3341/files#diff-2433aa143ee4772026454b8abd76b9dd + // We mark the account as touched here, so that is can be removed among other touched empty accounts (after tx finalization) + if (err === ERROR.OUT_OF_GAS || err.error === ERROR.OUT_OF_GAS) { + stateManager.getAccount(toAddress, function (getErr, acc) { + if (getErr) cb(getErr);else stateManager.putAccount(toAddress, acc, cb); + }); + } else { + cb(); + } + } + }); + } else { + stateManager.commit(cb); + } + } + } + + function saveCode(cb) { + // store code for a new contract + if (createdAddress && !vmResults.runState.vmError && vmResults.return && vmResults.return.toString() !== '') { + stateManager.putContractCode(createdAddress, vmResults.return, cb); + } else { + cb(); + } + } + + function parseCallResult(err) { + if (err) return cb(err); + var results = { + gasUsed: gasUsed, + createdAddress: createdAddress, + vm: vmResults + }; + + cb(null, results); + } +}; +},{"./exceptions.js":615,"./storageReader":633,"async":42,"ethereumjs-util":640,"safe-buffer":1334}],629:[function(require,module,exports){ +'use strict'; + +/* + +This is the core of the Ethereum Virtual Machine (EVM or just VM). + +NOTES: + +stack items are lazily duplicated. +So you must never directly change a buffer from the stack, +instead you should `copy` it first + +not all stack items are 32 bytes, so if the operation realies on the stack +item length then you must use utils.pad(, 32) first. +*/ +var Buffer = require('safe-buffer').Buffer; +var async = require('async'); +var utils = require('ethereumjs-util'); +var Block = require('ethereumjs-block'); +var lookupOpInfo = require('./vm/opcodes.js'); +var opFns = require('./vm/opFns.js'); +var exceptions = require('./exceptions.js'); +var StorageReader = require('./storageReader'); +var setImmediate = require('timers').setImmediate; +var BN = utils.BN; + +var ERROR = exceptions.ERROR; +var VmError = exceptions.VmError; + +/** + * Runs EVM code + * @method vm.runCode + * @param {Object} opts + * @param {Account} opts.account the [`Account`](https://github.com/ethereumjs/ethereumjs-account) that the executing code belongs to. If omitted an empty account will be used + * @param {Buffer} opts.address the address of the account that is executing this code. The address should be a `Buffer` of bytes. Defaults to `0` + * @param {Block} opts.block the [`Block`](https://github.com/ethereumjs/ethereumjs-block) the `tx` belongs to. If omitted a blank block will be used + * @param {Buffer} opts.caller the address that ran this code. The address should be a `Buffer` of 20bits. Defaults to `0` + * @param {Buffer} opts.code the EVM code to run given as a `Buffer` + * @param {Buffer} opts.data the input data + * @param {Buffer} opts.gasLimit the gas limit for the code + * @param {Buffer} opts.origin the address where the call originated from. The address should be a `Buffer` of 20bits. Defaults to `0` + * @param {Buffer} opts.value the value in ether that is being sent to `opt.address`. Defaults to `0` + * @param {runCode~callback} cb callback + */ + +/** + * Callback for `runCode` method + * @callback runCode~callback + * @param {Error} error an error that may have happened or `null` + * @param {Object} results + * @param {BN} results.gas the amount of gas left + * @param {BN} results.gasUsed the amount of gas as a `bignum` the code used to run + * @param {BN} results.gasRefund a `bignum` containing the amount of gas to refund from deleting storage values + * @param {Object} results.selfdestruct an `Object` with keys for accounts that have selfdestructed and values for balance transfer recipient accounts + * @param {Array} results.logs an `Array` of logs that the contract emitted + * @param {Number} results.exception `0` if the contract encountered an exception, `1` otherwise + * @param {String} results.exceptionError a `String` describing the exception if there was one + * @param {Buffer} results.return a `Buffer` containing the value that was returned by the contract +*/ +module.exports = function (opts, cb) { + var self = this; + var stateManager = self.stateManager; + + var block = opts.block || new Block(); + + // VM internal state + var runState = { + blockchain: self.blockchain, + stateManager: stateManager, + storageReader: opts.storageReader || new StorageReader(stateManager), + returnValue: false, + stopped: false, + vmError: false, + programCounter: 0, + opCode: undefined, + opName: undefined, + gasLeft: new BN(opts.gasLimit), + gasLimit: new BN(opts.gasLimit), + gasPrice: opts.gasPrice, + memory: [], + memoryWordCount: new BN(0), + stack: [], + lastReturned: [], + logs: [], + validJumps: [], + gasRefund: new BN(0), + highestMemCost: new BN(0), + depth: opts.depth || 0, + // opts.suicides is kept for backward compatiblity with pre-EIP6 syntax + selfdestruct: opts.selfdestruct || opts.suicides || {}, + block: block, + callValue: opts.value || new BN(0), + address: opts.address || utils.zeros(32), + caller: opts.caller || utils.zeros(32), + origin: opts.origin || opts.caller || utils.zeros(32), + callData: opts.data || Buffer.from([0]), + code: opts.code, + static: opts.static || false + + // temporary - to be factored out + };runState._common = self._common; + runState._precompiled = self._precompiled; + runState._vm = self; + + // prepare to run vm + preprocessValidJumps(runState); + // load contract then start vm run + loadContract(runVm); + + // iterate through the given ops until something breaks or we hit STOP + function runVm(err) { + if (err) { + return parseVmResults(err); + } + async.whilst(vmIsActive, iterateVm, parseVmResults); + } + + // ensure contract is loaded; only used if runCode is called directly + function loadContract(cb) { + stateManager.getAccount(runState.address, function (err, account) { + if (err) return cb(err); + runState.contract = account; + cb(); + }); + } + + function vmIsActive() { + var notAtEnd = runState.programCounter < runState.code.length; + + return !runState.stopped && notAtEnd && !runState.vmError && !runState.returnValue; + } + + function iterateVm(done) { + var opCode = runState.code[runState.programCounter]; + var opInfo = lookupOpInfo(opCode, false, self.emitFreeLogs); + var opName = opInfo.name; + var opFn = opFns[opName]; + + runState.opName = opName; + runState.opCode = opCode; + + async.series([runStepHook, runOp], function (err) { + setImmediate(done.bind(null, err)); + }); + + function runStepHook(cb) { + var eventObj = { + pc: runState.programCounter, + gasLeft: runState.gasLeft, + opcode: lookupOpInfo(opCode, true, self.emitFreeLogs), + stack: runState.stack, + depth: runState.depth, + address: runState.address, + account: runState.contract, + stateManager: runState.stateManager, + memory: runState.memory, + memoryWordCount: runState.memoryWordCount + /** + * The `step` event for trace output + * + * @event Event: step + * @type {Object} + * @property {Number} pc representing the program counter + * @property {String} opcode the next opcode to be ran + * @property {BN} gasLeft amount of gasLeft + * @property {Array} stack an `Array` of `Buffers` containing the stack + * @property {Account} account the [`Account`](https://github.com/ethereum/ethereumjs-account) which owns the code running + * @property {Buffer} address the address of the `account` + * @property {Number} depth the current number of calls deep the contract is + * @property {Buffer} memory the memory of the VM as a `buffer` + * @property {BN} memoryWordCount current size of memory in words + * @property {StateManager} stateManager a [`StateManager`](stateManager.md) instance (Beta API) + */ + };self.emit('step', eventObj, cb); + } + + function runOp(cb) { + // check for invalid opcode + if (opName === 'INVALID') { + return cb(new VmError(ERROR.INVALID_OPCODE)); + } + + // check for stack underflows + if (runState.stack.length < opInfo.in) { + return cb(new VmError(ERROR.STACK_UNDERFLOW)); + } + + if (runState.stack.length - opInfo.in + opInfo.out > 1024) { + return cb(new VmError(ERROR.STACK_OVERFLOW)); + } + + // calculate gas + var fee = new BN(opInfo.fee); + // TODO: move to a shared funtion; subGas in opFuns + runState.gasLeft = runState.gasLeft.sub(fee); + if (runState.gasLeft.ltn(0)) { + runState.gasLeft = new BN(0); + cb(new VmError(ERROR.OUT_OF_GAS)); + return; + } + + // advance program counter + runState.programCounter++; + var argsNum = opInfo.in; + var retNum = opInfo.out; + // pop the stack + var args = argsNum ? runState.stack.splice(-argsNum) : []; + + args.reverse(); + args.push(runState); + // create a callback for async opFunc + if (opInfo.async) { + args.push(function (err, result) { + if (err) return cb(err); + + // save result to the stack + if (result !== undefined) { + if (retNum !== 1) { + // opcode post-stack mismatch + return cb(new VmError(ERROR.INTERNAL_ERROR)); + } + + runState.stack.push(result); + } else { + if (retNum !== 0) { + // opcode post-stack mismatch + return cb(new VmError(ERROR.INTERNAL_ERROR)); + } + } + + cb(); + }); + } + + // if opcode is log and emitFreeLogs is enabled, remove static context + var prevStatic = runState.static; + if (self.emitFreeLogs && opName === 'LOG') { + runState.static = false; + } + + try { + // run the opcode + var result = opFn.apply(null, args); + } catch (e) { + if (e.errorType && e.errorType === 'VmError') { + cb(e); + return; + } else { + throw e; + } + } + + // restore previous static context + runState.static = prevStatic; + + // save result to the stack + if (result !== undefined) { + if (retNum !== 1) { + // opcode post-stack mismatch + return cb(new VmError(ERROR.INTERNAL_ERROR)); + } + + runState.stack.push(result); + } else { + if (!opInfo.async && retNum !== 0) { + // opcode post-stack mismatch + return cb(new VmError(ERROR.INTERNAL_ERROR)); + } + } + + // call the callback if opFn was sync + if (!opInfo.async) { + cb(); + } + } + } + + function parseVmResults(err) { + // remove any logs on error + if (err) { + runState.logs = []; + runState.vmError = true; + } + + var results = { + runState: runState, + selfdestruct: runState.selfdestruct, + gasRefund: runState.gasRefund, + exception: err ? 0 : 1, + exceptionError: err, + logs: runState.logs, + gas: runState.gasLeft, + 'return': runState.returnValue ? runState.returnValue : Buffer.alloc(0) + }; + + if (results.exceptionError) { + delete results.gasRefund; + delete results.selfdestruct; + } + + if (err && err.error !== ERROR.REVERT) { + results.gasUsed = runState.gasLimit; + } else { + results.gasUsed = runState.gasLimit.sub(runState.gasLeft); + } + + cb(err, results); + } +}; + +// find all the valid jumps and puts them in the `validJumps` array +function preprocessValidJumps(runState) { + for (var i = 0; i < runState.code.length; i++) { + var curOpCode = lookupOpInfo(runState.code[i]).name; + + // no destinations into the middle of PUSH + if (curOpCode === 'PUSH') { + i += runState.code[i] - 0x5f; + } + + if (curOpCode === 'JUMPDEST') { + runState.validJumps.push(i); + } + } +} +},{"./exceptions.js":615,"./storageReader":633,"./vm/opFns.js":635,"./vm/opcodes.js":636,"async":42,"ethereumjs-block":638,"ethereumjs-util":640,"safe-buffer":1334,"timers":1415}],630:[function(require,module,exports){ +'use strict'; + +module.exports = function (opts, cb) { + // for precompiled + var results; + if (typeof opts.code === 'function') { + opts._common = this._common; + results = opts.code(opts); + results.account = opts.account; + cb(results.exceptionError, results); + } else { + var f = new Function('require', 'opts', opts.code.toString()); // eslint-disable-line + results = f(require, opts); + results.account = opts.account; + cb(results.exceptionError, results); + } +}; +},{}],631:[function(require,module,exports){ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; +var async = require('async'); +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var Bloom = require('./bloom'); +var Block = require('ethereumjs-block'); +var Account = require('ethereumjs-account'); +var StorageReader = require('./storageReader'); + +/** + * Process a transaction. Run the vm. Transfers eth. Checks balances. + * @method vm.runTx + * @param opts + * @param {Transaction} opts.tx a [`Transaction`](https://github.com/ethereum/ethereumjs-tx) to run + * @param {Boolean} opts.skipNonce skips the nonce check + * @param {Boolean} opts.skipBalance skips the balance check + * @param {Block} opts.block the block to which the `tx` belongs, if no block is given a default one is created + * @param {runTx~callback} cb the callback + */ + +/** + * Callback for `runTx` method + * @callback runTx~callback + * @param {Error} error an error that may have happened or `null` + * @param {Object} results + * @param {BN} results.amountSpent the amount of ether used by this transaction as a `bignum` + * @param {BN} results.gasUsed the amount of gas as a `bignum` used by the transaction + * @param {BN} results.gasRefund the amount of gas as a `bignum` that was refunded during the transaction (i.e. `gasUsed = totalGasConsumed - gasRefund`) + * @param {VM} vm contains the results from running the code, if any, as described in `vm.runCode(params, cb)` +*/ +module.exports = function (opts, cb) { + if (typeof opts === 'function' && cb === undefined) { + cb = opts; + return cb(new Error('invalid input, opts must be provided')); + } + + var self = this; + var block = opts.block; + var tx = opts.tx; + var gasLimit; + var results; + var basefee; + var storageReader = new StorageReader(self.stateManager); + + // tx is required + if (!tx) { + return cb(new Error('invalid input, tx is required')); + } + + // create a reasonable default if no block is given + if (!block) { + block = new Block(); + } + + if (new BN(block.header.gasLimit).lt(new BN(tx.gasLimit))) { + cb(new Error('tx has a higher gas limit than the block')); + return; + } + + // run everything + async.series([checkpointState, runTxHook, updateFromAccount, runCall, runAfterTxHook], function (err) { + if (err) { + self.stateManager.revert(function () { + cb(err, results); + }); + } else { + self.stateManager.commit(function (err) { + cb(err, results); + }); + } + }); + + function checkpointState(cb) { + self.stateManager.checkpoint(cb); + } + + // run the transaction hook + function runTxHook(cb) { + /** + * The `beforeTx` event + * + * @event Event: beforeTx + * @type {Object} + * @property {Transaction} tx emits the Transaction that is about to be processed + */ + self.emit('beforeTx', tx, cb); + } + + // run the transaction hook + function runAfterTxHook(cb) { + /** + * The `afterTx` event + * + * @event Event: afterTx + * @type {Object} + * @property {Object} result result of the transaction + */ + self.emit('afterTx', results, cb); + } + + function updateFromAccount(cb) { + self.stateManager.getAccount(tx.from, function (err, fromAccount) { + if (err) { + cb(err); + return; + } + + var message; + if (!opts.skipBalance && new BN(fromAccount.balance).lt(tx.getUpfrontCost())) { + message = "sender doesn't have enough funds to send tx. The upfront cost is: " + tx.getUpfrontCost().toString() + ' and the sender\'s account only has: ' + new BN(fromAccount.balance).toString(); + cb(new Error(message)); + return; + } else if (!opts.skipNonce && !new BN(fromAccount.nonce).eq(new BN(tx.nonce))) { + message = "the tx doesn't have the correct nonce. account has nonce of: " + new BN(fromAccount.nonce).toString() + ' tx has nonce of: ' + new BN(tx.nonce).toString(); + cb(new Error(message)); + return; + } + + // increment the nonce + fromAccount.nonce = new BN(fromAccount.nonce).addn(1); + + basefee = tx.getBaseFee(); + gasLimit = new BN(tx.gasLimit); + if (gasLimit.lt(basefee)) { + return cb(new Error('base fee exceeds gas limit')); + } + gasLimit.isub(basefee); + + fromAccount.balance = new BN(fromAccount.balance).sub(new BN(tx.gasLimit).mul(new BN(tx.gasPrice))); + self.stateManager.putAccount(tx.from, fromAccount, cb); + }); + } + + // sets up the environment and runs a `call` + function runCall(cb) { + var options = { + caller: tx.from, + gasLimit: gasLimit, + gasPrice: tx.gasPrice, + to: tx.to, + value: tx.value, + data: tx.data, + block: block, + storageReader: storageReader + }; + + if (tx.to.toString('hex') === '') { + delete options.to; + } + + // run call + self.runCall(options, parseResults); + + function parseResults(err, _results) { + if (err) return cb(err); + results = _results; + + // generate the bloom for the tx + results.bloom = txLogsBloom(results.vm.logs); + + // caculate the total gas used + results.gasUsed = results.gasUsed.add(basefee); + + // process any gas refund + results.gasRefund = results.vm.gasRefund; + if (results.gasRefund) { + if (results.gasRefund.lt(results.gasUsed.divn(2))) { + results.gasUsed.isub(results.gasRefund); + } else { + results.gasUsed.isub(results.gasUsed.divn(2)); + } + } + + results.amountSpent = results.gasUsed.mul(new BN(tx.gasPrice)); + + async.series([loadFromAccount, updateFromAccount, loadMinerAccount, updateMinerAccount, cleanupAccounts], cb); + + var fromAccount; + function loadFromAccount(next) { + self.stateManager.getAccount(tx.from, function (err, account) { + fromAccount = account; + next(err); + }); + } + + function updateFromAccount(next) { + // refund the leftover gas amount + var finalFromBalance = new BN(tx.gasLimit).sub(results.gasUsed).mul(new BN(tx.gasPrice)).add(new BN(fromAccount.balance)); + fromAccount.balance = finalFromBalance; + + self.stateManager.putAccount(utils.toBuffer(tx.from), fromAccount, next); + } + + var minerAccount; + function loadMinerAccount(next) { + self.stateManager.getAccount(block.header.coinbase, function (err, account) { + minerAccount = account; + next(err); + }); + } + + function updateMinerAccount(next) { + // add the amount spent on gas to the miner's account + minerAccount.balance = new BN(minerAccount.balance).add(results.amountSpent); + + // save the miner's account + if (!new BN(minerAccount.balance).isZero()) { + self.stateManager.putAccount(block.header.coinbase, minerAccount, next); + } else { + next(); + } + } + + function cleanupAccounts(next) { + if (!results.vm.selfdestruct) { + results.vm.selfdestruct = {}; + } + + var keys = Object.keys(results.vm.selfdestruct); + + async.series([deleteSelfDestructs, cleanTouched], next); + + function deleteSelfDestructs(done) { + async.each(keys, function (s, cb) { + self.stateManager.putAccount(Buffer.from(s, 'hex'), new Account(), cb); + }, done); + } + + function cleanTouched(done) { + self.stateManager.cleanupTouchedAccounts(done); + } + } + } + } +}; + +/** + * @method txLogsBloom + * @private + */ +function txLogsBloom(logs) { + var bloom = new Bloom(); + if (logs) { + for (var i = 0; i < logs.length; i++) { + var log = logs[i]; + // add the address + bloom.add(log[0]); + // add the topics + var topics = log[1]; + for (var q = 0; q < topics.length; q++) { + bloom.add(topics[q]); + } + } + } + return bloom; +} +},{"./bloom":613,"./storageReader":633,"async":42,"ethereumjs-account":585,"ethereumjs-block":638,"ethereumjs-util":640,"safe-buffer":1334}],632:[function(require,module,exports){ +'use strict'; + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var Buffer = require('safe-buffer').Buffer; +var Trie = require('merkle-patricia-tree/secure.js'); +var Common = require('ethereumjs-common').default; + +var _require = require('ethereumjs-common/dist/genesisStates'), + genesisStateByName = _require.genesisStateByName; + +var async = require('async'); +var Account = require('ethereumjs-account'); +var Cache = require('./cache.js'); +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var rlp = utils.rlp; + +/** + * Interface for getting and setting data from an underlying + * state trie + * @interface StateManager + */ + +module.exports = StateManager; + +/** + * Default implementation of the `StateManager` interface + * @class DefaultStateManager + * @implements StateManager + * @param {Object} [opts={}] + * @param {Common} [opts.common] - [`Common`](https://github.com/ethereumjs/ethereumjs-common) parameters of the chain + * @param {Trie} [opts.trie] - a [`merkle-patricia-tree`](https://github.com/ethereumjs/merkle-patricia-tree) instance + */ +function StateManager() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var self = this; + + var common = opts.common; + if (!common) { + common = new Common('mainnet', 'byzantium'); + } + self._common = common; + + self._trie = opts.trie || new Trie(); + self._storageTries = {}; // the storage trie cache + self._cache = new Cache(self._trie); + self._touched = new Set(); + self._touchedStack = []; + self._checkpointCount = 0; +} + +var proto = StateManager.prototype; + +/** + * Copies the current instance of the `DefaultStateManager` + * at the last fully committed point, i.e. as if all current + * checkpoints were reverted + * @memberof DefaultStateManager + * @method copy + */ +proto.copy = function () { + return new StateManager({ trie: this._trie.copy() }); +}; + +/** + * Callback for `getAccount` method + * @callback getAccount~callback + * @param {Error} error an error that may have happened or `null` + * @param {Account} account An [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account) + * instance corresponding to the provided `address` + */ + +/** + * Gets the [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account) + * associated with `address`. Returns an empty account if the account does not exist. + * @memberof StateManager + * @method getAccount + * @param {Buffer} address Address of the `account` to get + * @param {getAccount~callback} cb + */ +proto.getAccount = function (address, cb) { + this._cache.getOrLoad(address, cb); +}; + +/** + * Saves an [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account) + * into state under the provided `address` + * @memberof StateManager + * @method putAccount + * @param {Buffer} address Address under which to store `account` + * @param {Account} account The [`ethereumjs-account`](https://github.com/ethereumjs/ethereumjs-account) to store + * @param {Function} cb Callback function + */ +proto.putAccount = function (address, account, cb) { + var self = this; + // TODO: dont save newly created accounts that have no balance + // if (toAccount.balance.toString('hex') === '00') { + // if they have money or a non-zero nonce or code, then write to tree + self._cache.put(address, account); + self._touched.add(address.toString('hex')); + // self._trie.put(addressHex, account.serialize(), cb) + cb(); +}; + +/** + * Adds `value` to the state trie as code, and sets `codeHash` on the account + * corresponding to `address` to reference this. + * @memberof StateManager + * @method putContractCode + * @param {Buffer} address - Address of the `account` to add the `code` for + * @param {Buffer} value - The value of the `code` + * @param {Function} cb Callback function + */ +proto.putContractCode = function (address, value, cb) { + var self = this; + self.getAccount(address, function (err, account) { + if (err) { + return cb(err); + } + // TODO: setCode use trie.setRaw which creates a storage leak + account.setCode(self._trie, value, function (err) { + if (err) { + return cb(err); + } + self.putAccount(address, account, cb); + }); + }); +}; + +/** + * Callback for `getContractCode` method + * @callback getContractCode~callback + * @param {Error} error an error that may have happened or `null` + * @param {Buffer} code The code corresponding to the provided address. + * Returns an empty `Buffer` if the account has no associated code. + */ + +/** + * Gets the code corresponding to the provided `address` + * @memberof StateManager + * @method getContractCode + * @param {Buffer} address Address to get the `code` for + * @param {getContractCode~callback} cb + */ +proto.getContractCode = function (address, cb) { + var self = this; + self.getAccount(address, function (err, account) { + if (err) { + return cb(err); + } + account.getCode(self._trie, cb); + }); +}; + +/** + * Creates a storage trie from the primary storage trie + * for an account and saves this in the storage cache. + * @private + * @memberof DefaultStateManager + * @method _lookupStorageTrie + * @param {Buffer} address + * @param {Function} cb Callback function + */ +proto._lookupStorageTrie = function (address, cb) { + var self = this; + // from state trie + self.getAccount(address, function (err, account) { + if (err) { + return cb(err); + } + var storageTrie = self._trie.copy(); + storageTrie.root = account.stateRoot; + storageTrie._checkpoints = []; + cb(null, storageTrie); + }); +}; + +/** + * Gets the storage trie for an account from the storage + * cache or does a lookup + * @private + * @memberof DefaultStateManager + * @method _getStorageTrie + * @param {Buffer} address + * @param {Function} cb Callback function + */ +proto._getStorageTrie = function (address, cb) { + var self = this; + var storageTrie = self._storageTries[address.toString('hex')]; + // from storage cache + if (storageTrie) { + return cb(null, storageTrie); + } + // lookup from state + self._lookupStorageTrie(address, cb); +}; + +/** + * Callback for `getContractStorage` method + * @callback getContractStorage~callback + * @param {Error} error an error that may have happened or `null` + * @param {Buffer} storageValue The storage value for the account + * corresponding to the provided address at the provided key. + * If this does not exists an empty `Buffer` is returned + */ + +/** + * Gets the storage value associated with the provided `address` and `key` + * @memberof StateManager + * @method getContractStorage + * @param {Buffer} address Address of the account to get the storage for + * @param {Buffer} key Key in the account's storage to get the value for + * @param {getContractCode~callback} cb + */ +proto.getContractStorage = function (address, key, cb) { + var self = this; + self._getStorageTrie(address, function (err, trie) { + if (err) { + return cb(err); + } + trie.get(key, function (err, value) { + if (err) { + return cb(err); + } + var decoded = rlp.decode(value); + cb(null, decoded); + }); + }); +}; + +/** + * Modifies the storage trie of an account + * @private + * @memberof DefaultStateManager + * @method _modifyContractStorage + * @param {Buffer} address Address of the account whose storage is to be modified + * @param {Function} modifyTrie function to modify the storage trie of the account + */ +proto._modifyContractStorage = function (address, modifyTrie, cb) { + var self = this; + self._getStorageTrie(address, function (err, storageTrie) { + if (err) { + return cb(err); + } + + modifyTrie(storageTrie, finalize); + + function finalize(err) { + if (err) return cb(err); + // update storage cache + self._storageTries[address.toString('hex')] = storageTrie; + // update contract stateRoot + var contract = self._cache.get(address); + contract.stateRoot = storageTrie.root; + self.putAccount(address, contract, cb); + self._touched.add(address.toString('hex')); + } + }); +}; + +/** + * Adds value to the state trie for the `account` + * corresponding to `address` at the provided `key` + * @memberof StateManager + * @method putContractStorage + * @param {Buffer} address Address to set a storage value for + * @param {Buffer} key Key to set the value at + * @param {Buffer} value Value to set at `key` for account corresponding to `address` + * @param {Function} cb Callback function + */ +proto.putContractStorage = function (address, key, value, cb) { + var self = this; + self._modifyContractStorage(address, function (storageTrie, done) { + if (value && value.length) { + // format input + var encodedValue = rlp.encode(value); + storageTrie.put(key, encodedValue, done); + } else { + // deleting a value + storageTrie.del(key, done); + } + }, cb); +}; + +/** + * Clears all storage entries for the account corresponding to `address` + * @memberof StateManager + * @method clearContractStorage + * @param {Buffer} address Address to clear the storage of + * @param {Function} cb Callback function + */ +proto.clearContractStorage = function (address, cb) { + var self = this; + self._modifyContractStorage(address, function (storageTrie, done) { + storageTrie.root = storageTrie.EMPTY_TRIE_ROOT; + done(); + }, cb); +}; + +/** + * Checkpoints the current state of the StateManager instance. + * State changes that follow can then be committed by calling + * `commit` or `reverted` by calling rollback. + * @memberof StateManager + * @method checkpoint + * @param {Function} cb Callback function + */ +proto.checkpoint = function (cb) { + var self = this; + self._trie.checkpoint(); + self._cache.checkpoint(); + self._touchedStack.push(new Set([].concat(_toConsumableArray(self._touched)))); + self._checkpointCount++; + cb(); +}; + +/** + * Commits the current change-set to the instance since the + * last call to checkpoint. + * @memberof StateManager + * @method commit + * @param {Function} cb Callback function + */ +proto.commit = function (cb) { + var self = this; + // setup trie checkpointing + self._trie.commit(function () { + // setup cache checkpointing + self._cache.commit(); + self._touchedStack.pop(); + self._checkpointCount--; + + if (self._checkpointCount === 0) self._cache.flush(cb);else cb(); + }); +}; + +/** + * Reverts the current change-set to the instance since the + * last call to checkpoint. + * @memberof StateManager + * @method revert + * @param {Function} cb Callback function + */ +proto.revert = function (cb) { + var self = this; + // setup trie checkpointing + self._trie.revert(); + // setup cache checkpointing + self._cache.revert(); + self._storageTries = {}; + self._touched = self._touchedStack.pop(); + self._checkpointCount--; + + if (self._checkpointCount === 0) self._cache.flush(cb);else cb(); +}; + +/** + * Callback for `getStateRoot` method + * @callback getStateRoot~callback + * @param {Error} error an error that may have happened or `null`. + * Will be an error if the un-committed checkpoints on the instance. + * @param {Buffer} stateRoot The state-root of the `StateManager` + */ + +/** + * Gets the state-root of the Merkle-Patricia trie representation + * of the state of this StateManager. Will error if there are uncommitted + * checkpoints on the instance. + * @memberof StateManager + * @method getStateRoot + * @param {getStateRoot~callback} cb + */ +proto.getStateRoot = function (cb) { + var self = this; + + if (self._checkpointCount !== 0) { + return cb(new Error('Cannot get state root with uncommitted checkpoints')); + } + + self._cache.flush(function (err) { + if (err) { + return cb(err); + } + var stateRoot = self._trie.root; + cb(null, stateRoot); + }); +}; + +/** + * Sets the state of the instance to that represented + * by the provided `stateRoot`. Will error if there are uncommitted + * checkpoints on the instance or if the state root does not exist in + * the state trie. + * @memberof StateManager + * @method setStateRoot + * @param {Buffer} stateRoot The state-root to reset the instance to + * @param {Function} cb Callback function + */ +proto.setStateRoot = function (stateRoot, cb) { + var self = this; + + if (self._checkpointCount !== 0) { + return cb(new Error('Cannot set state root with uncommitted checkpoints')); + } + + self._cache.flush(function (err) { + if (err) { + return cb(err); + } + if (stateRoot === self._trie.EMPTY_TRIE_ROOT) { + self._trie.root = stateRoot; + self._cache.clear(); + return cb(); + } + self._trie.checkRoot(stateRoot, function (err, hasRoot) { + if (err || !hasRoot) { + cb(err || new Error('State trie does not contain state root')); + } else { + self._trie.root = stateRoot; + self._cache.clear(); + cb(); + } + }); + }); +}; + +/** + * Callback for `dumpStorage` method + * @callback dumpStorage~callback + * @param {Error} error an error that may have happened or `null` + * @param {Object} accountState The state of the account as an `Object` map. + * Keys are are the storage keys, values are the storage values as strings. + * Both are represented as hex strings without the `0x` prefix. + */ + +/** + * Dumps the the storage values for an `account` specified by `address` + * @memberof DefaultStateManager + * @method dumpStorage + * @param {Buffer} address The address of the `account` to return storage for + * @param {dumpStorage~callback} cb + */ +proto.dumpStorage = function (address, cb) { + var self = this; + self._getStorageTrie(address, function (err, trie) { + if (err) { + return cb(err); + } + var storage = {}; + var stream = trie.createReadStream(); + stream.on('data', function (val) { + storage[val.key.toString('hex')] = val.value.toString('hex'); + }); + stream.on('end', function () { + cb(storage); + }); + }); +}; + +/** + * Callback for `hasGenesisState` method + * @callback hasGenesisState~callback + * @param {Error} error an error that may have happened or `null` + * @param {Boolean} hasGenesisState Whether the storage trie contains the + * canonical genesis state for the configured chain parameters. + */ + +/** + * Checks whether the current instance has the canonical genesis state + * for the configured chain parameters. + * @memberof DefaultStateManager + * @method hasGenesisState + * @param {hasGenesisState~callback} cb + */ +proto.hasGenesisState = function (cb) { + var root = this._common.genesis().stateRoot; + this._trie.checkRoot(root, cb); +}; + +/** + * Generates a canonical genesis state on the instance based on the + * configured chain parameters. Will error if there are uncommitted + * checkpoints on the instance. + * @memberof StateManager + * @method generateCanonicalGenesis + * @param {Function} cb Callback function + */ +proto.generateCanonicalGenesis = function (cb) { + var self = this; + + if (self._checkpointCount !== 0) { + return cb(new Error('Cannot create genesis state with uncommitted checkpoints')); + } + + this.hasGenesisState(function (err, genesis) { + if (!genesis && !err) { + self.generateGenesis(genesisStateByName(self._common.chainName()), cb); + } else { + cb(err); + } + }); +}; + +/** + * Initializes the provided genesis state into the state trie + * @memberof DefaultStateManager + * @method generateGenesis + * @param {Object} initState + * @param {Function} cb Callback function + */ +proto.generateGenesis = function (initState, cb) { + var self = this; + + if (self._checkpointCount !== 0) { + return cb(new Error('Cannot create genesis state with uncommitted checkpoints')); + } + + var addresses = Object.keys(initState); + async.eachSeries(addresses, function (address, done) { + var account = new Account(); + account.balance = new BN(initState[address]).toArrayLike(Buffer); + address = utils.toBuffer(address); + self._trie.put(address, account.serialize(), done); + }, cb); +}; + +/** + * Callback for `accountIsEmpty` method + * @callback accountIsEmpty~callback + * @param {Error} error an error that may have happened or `null` + * @param {Boolean} empty True if the account is empty false otherwise + */ + +/** + * Checks if the `account` corresponding to `address` is empty as defined in + * EIP-161 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md) + * @memberof StateManager + * @method accountIsEmpty + * @param {Buffer} address Address to check + * @param {accountIsEmpty~callback} cb + */ +proto.accountIsEmpty = function (address, cb) { + var self = this; + self.getAccount.bind(this)(address, function (err, account) { + if (err) { + return cb(err); + } + + // should be replaced by account.isEmpty() once updated + cb(null, account.nonce.toString('hex') === '' && account.balance.toString('hex') === '' && account.codeHash.toString('hex') === utils.KECCAK256_NULL_S); + }); +}; + +/** + * Removes accounts form the state trie that have been touched, + * as defined in EIP-161 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md). + * @memberof StateManager + * @method cleanupTouchedAccounts + * @param {Function} cb Callback function + */ +proto.cleanupTouchedAccounts = function (cb) { + var self = this; + var touchedArray = Array.from(self._touched); + async.forEach(touchedArray, function (addressHex, next) { + var address = Buffer.from(addressHex, 'hex'); + self.accountIsEmpty(address, function (err, empty) { + if (err) { + next(err); + return; + } + + if (empty) { + self._cache.del(address); + } + next(null); + }); + }, function () { + self._touched.clear(); + cb(); + }); +}; +},{"./cache.js":614,"async":42,"ethereumjs-account":585,"ethereumjs-common":609,"ethereumjs-common/dist/genesisStates":595,"ethereumjs-util":640,"merkle-patricia-tree/secure.js":953,"safe-buffer":1334}],633:[function(require,module,exports){ +'use strict'; + +module.exports = StorageReader; + +function StorageReader(stateManager) { + this._stateManager = stateManager; + this._storageCache = new Map(); +} + +var proto = StorageReader.prototype; + +proto.getContractStorage = function getContractStorage(address, key, cb) { + var self = this; + var addressHex = address.toString('hex'); + var keyHex = key.toString('hex'); + + self._stateManager.getContractStorage(address, key, function (err, current) { + if (err) return cb(err); + + var map = null; + if (!self._storageCache.has(addressHex)) { + map = new Map(); + self._storageCache.set(addressHex, map); + } else { + map = self._storageCache.get(addressHex); + } + + var original = null; + + if (map.has(keyHex)) { + original = map.get(keyHex); + } else { + map.set(keyHex, current); + original = current; + } + + cb(null, { + original: original, + current: current + }); + }); +}; +},{}],634:[function(require,module,exports){ +'use strict'; + +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var pow32 = new BN('010000000000000000000000000000000000000000000000000000000000000000', 16); +var pow31 = new BN('0100000000000000000000000000000000000000000000000000000000000000', 16); +var pow30 = new BN('01000000000000000000000000000000000000000000000000000000000000', 16); +var pow29 = new BN('010000000000000000000000000000000000000000000000000000000000', 16); +var pow28 = new BN('0100000000000000000000000000000000000000000000000000000000', 16); +var pow27 = new BN('01000000000000000000000000000000000000000000000000000000', 16); +var pow26 = new BN('010000000000000000000000000000000000000000000000000000', 16); +var pow25 = new BN('0100000000000000000000000000000000000000000000000000', 16); +var pow24 = new BN('01000000000000000000000000000000000000000000000000', 16); +var pow23 = new BN('010000000000000000000000000000000000000000000000', 16); +var pow22 = new BN('0100000000000000000000000000000000000000000000', 16); +var pow21 = new BN('01000000000000000000000000000000000000000000', 16); +var pow20 = new BN('010000000000000000000000000000000000000000', 16); +var pow19 = new BN('0100000000000000000000000000000000000000', 16); +var pow18 = new BN('01000000000000000000000000000000000000', 16); +var pow17 = new BN('010000000000000000000000000000000000', 16); +var pow16 = new BN('0100000000000000000000000000000000', 16); +var pow15 = new BN('01000000000000000000000000000000', 16); +var pow14 = new BN('010000000000000000000000000000', 16); +var pow13 = new BN('0100000000000000000000000000', 16); +var pow12 = new BN('01000000000000000000000000', 16); +var pow11 = new BN('010000000000000000000000', 16); +var pow10 = new BN('0100000000000000000000', 16); +var pow9 = new BN('01000000000000000000', 16); +var pow8 = new BN('010000000000000000', 16); +var pow7 = new BN('0100000000000000', 16); +var pow6 = new BN('01000000000000', 16); +var pow5 = new BN('010000000000', 16); +var pow4 = new BN('0100000000', 16); +var pow3 = new BN('01000000', 16); +var pow2 = new BN('010000', 16); +var pow1 = new BN('0100', 16); + +module.exports = function (a) { + if (a.cmp(pow1) === -1) { + return 0; + } else if (a.cmp(pow2) === -1) { + return 1; + } else if (a.cmp(pow3) === -1) { + return 2; + } else if (a.cmp(pow4) === -1) { + return 3; + } else if (a.cmp(pow5) === -1) { + return 4; + } else if (a.cmp(pow6) === -1) { + return 5; + } else if (a.cmp(pow7) === -1) { + return 6; + } else if (a.cmp(pow8) === -1) { + return 7; + } else if (a.cmp(pow9) === -1) { + return 8; + } else if (a.cmp(pow10) === -1) { + return 9; + } else if (a.cmp(pow11) === -1) { + return 10; + } else if (a.cmp(pow12) === -1) { + return 11; + } else if (a.cmp(pow13) === -1) { + return 12; + } else if (a.cmp(pow14) === -1) { + return 13; + } else if (a.cmp(pow15) === -1) { + return 14; + } else if (a.cmp(pow16) === -1) { + return 15; + } else if (a.cmp(pow17) === -1) { + return 16; + } else if (a.cmp(pow18) === -1) { + return 17; + } else if (a.cmp(pow19) === -1) { + return 18; + } else if (a.cmp(pow20) === -1) { + return 19; + } else if (a.cmp(pow21) === -1) { + return 20; + } else if (a.cmp(pow22) === -1) { + return 21; + } else if (a.cmp(pow23) === -1) { + return 22; + } else if (a.cmp(pow24) === -1) { + return 23; + } else if (a.cmp(pow25) === -1) { + return 24; + } else if (a.cmp(pow26) === -1) { + return 25; + } else if (a.cmp(pow27) === -1) { + return 26; + } else if (a.cmp(pow28) === -1) { + return 27; + } else if (a.cmp(pow29) === -1) { + return 28; + } else if (a.cmp(pow30) === -1) { + return 29; + } else if (a.cmp(pow31) === -1) { + return 30; + } else if (a.cmp(pow32) === -1) { + return 31; + } else { + return 32; + } +}; +},{"ethereumjs-util":640}],635:[function(require,module,exports){ +'use strict'; + +var Buffer = require('safe-buffer').Buffer; +var async = require('async'); +var utils = require('ethereumjs-util'); +var BN = utils.BN; +var exceptions = require('../exceptions.js'); +var logTable = require('./logTable.js'); +var ERROR = exceptions.ERROR; +var VmError = exceptions.VmError; +var MASK_160 = new BN(1).shln(160).subn(1); + +// Find Ceil(`this` / `num`) +BN.prototype.divCeil = function divCeil(num) { + var dm = this.divmod(num); + + // Fast case - exact division + if (dm.mod.isZero()) return dm.div; + + // Round up + return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1); +}; + +function addressToBuffer(address) { + return address.and(MASK_160).toArrayLike(Buffer, 'be', 20); +} + +// the opcode functions +module.exports = { + STOP: function STOP(runState) { + runState.stopped = true; + }, + ADD: function ADD(a, b, runState) { + return a.add(b).mod(utils.TWO_POW256); + }, + MUL: function MUL(a, b, runState) { + return a.mul(b).mod(utils.TWO_POW256); + }, + SUB: function SUB(a, b, runState) { + return a.sub(b).toTwos(256); + }, + DIV: function DIV(a, b, runState) { + if (b.isZero()) { + return new BN(b); + } else { + return a.div(b); + } + }, + SDIV: function SDIV(a, b, runState) { + if (b.isZero()) { + return new BN(b); + } else { + a = a.fromTwos(256); + b = b.fromTwos(256); + return a.div(b).toTwos(256); + } + }, + MOD: function MOD(a, b, runState) { + if (b.isZero()) { + return new BN(b); + } else { + return a.mod(b); + } + }, + SMOD: function SMOD(a, b, runState) { + if (b.isZero()) { + return new BN(b); + } else { + a = a.fromTwos(256); + b = b.fromTwos(256); + var r = a.abs().mod(b.abs()); + if (a.isNeg()) { + r = r.ineg(); + } + return r.toTwos(256); + } + }, + ADDMOD: function ADDMOD(a, b, c, runState) { + if (c.isZero()) { + return new BN(c); + } else { + return a.add(b).mod(c); + } + }, + MULMOD: function MULMOD(a, b, c, runState) { + if (c.isZero()) { + return new BN(c); + } else { + return a.mul(b).mod(c); + } + }, + EXP: function EXP(base, exponent, runState) { + if (exponent.isZero()) { + return new BN(1); + } else { + var bytes = 1 + logTable(exponent); + subGas(runState, new BN(bytes).muln(runState._common.param('gasPrices', 'expByte'))); + + var m = BN.red(utils.TWO_POW256); + base = base.toRed(m); + return base.redPow(exponent); + } + }, + SIGNEXTEND: function SIGNEXTEND(k, val, runState) { + val = val.toArrayLike(Buffer, 'be', 32); + var extendOnes = false; + + if (k.lten(31)) { + k = k.toNumber(); + + if (val[31 - k] & 0x80) { + extendOnes = true; + } + + // 31-k-1 since k-th byte shouldn't be modified + for (var i = 30 - k; i >= 0; i--) { + val[i] = extendOnes ? 0xff : 0; + } + } + + return new BN(val); + }, + // 0x10 range - bit ops + LT: function LT(a, b, runState) { + return new BN(a.lt(b) ? 1 : 0); + }, + GT: function GT(a, b, runState) { + return new BN(a.gt(b) ? 1 : 0); + }, + SLT: function SLT(a, b, runState) { + return new BN(a.fromTwos(256).lt(b.fromTwos(256)) ? 1 : 0); + }, + SGT: function SGT(a, b, runState) { + return new BN(a.fromTwos(256).gt(b.fromTwos(256)) ? 1 : 0); + }, + EQ: function EQ(a, b, runState) { + return new BN(a.eq(b) ? 1 : 0); + }, + ISZERO: function ISZERO(a, runState) { + return new BN(a.isZero() ? 1 : 0); + }, + AND: function AND(a, b, runState) { + return a.and(b); + }, + OR: function OR(a, b, runState) { + return a.or(b); + }, + XOR: function XOR(a, b, runState) { + return a.xor(b); + }, + NOT: function NOT(a, runState) { + return a.notn(256); + }, + BYTE: function BYTE(pos, word, runState) { + if (pos.gten(32)) { + return new BN(0); + } + + return new BN(word.shrn((31 - pos.toNumber()) * 8).andln(0xff)); + }, + SHL: function SHL(a, b, runState) { + if (!runState._common.gteHardfork('constantinople')) { + trap(ERROR.INVALID_OPCODE); + } + if (a.gten(256)) { + return new BN(0); + } + return b.shln(a.toNumber()).iand(utils.MAX_INTEGER); + }, + SHR: function SHR(a, b, runState) { + if (!runState._common.gteHardfork('constantinople')) { + trap(ERROR.INVALID_OPCODE); + } + if (a.gten(256)) { + return new BN(0); + } + return b.shrn(a.toNumber()); + }, + SAR: function SAR(a, b, runState) { + if (!runState._common.gteHardfork('constantinople')) { + trap(ERROR.INVALID_OPCODE); + } + var isSigned = b.testn(255); + if (a.gten(256)) { + if (isSigned) { + return new BN(utils.MAX_INTEGER); + } else { + return new BN(0); + } + } + var c = b.shrn(a.toNumber()); + if (isSigned) { + var shiftedOutWidth = 255 - a.toNumber(); + var mask = utils.MAX_INTEGER.shrn(shiftedOutWidth).shln(shiftedOutWidth); + return c.ior(mask); + } else { + return c; + } + }, + // 0x20 range - crypto + SHA3: function SHA3(offset, length, runState) { + var data = memLoad(runState, offset, length); + // copy fee + subGas(runState, new BN(runState._common.param('gasPrices', 'sha3Word')).imul(length.divCeil(new BN(32)))); + return new BN(utils.keccak256(data)); + }, + // 0x30 range - closure state + ADDRESS: function ADDRESS(runState) { + return new BN(runState.address); + }, + BALANCE: function BALANCE(address, runState, cb) { + var stateManager = runState.stateManager; + // stack to address + address = addressToBuffer(address); + + // shortcut if current account + if (address.toString('hex') === runState.address.toString('hex')) { + cb(null, new BN(runState.contract.balance)); + return; + } + + // otherwise load account then return balance + stateManager.getAccount(address, function (err, account) { + if (err) { + return cb(err); + } + cb(null, new BN(account.balance)); + }); + }, + ORIGIN: function ORIGIN(runState) { + return new BN(runState.origin); + }, + CALLER: function CALLER(runState) { + return new BN(runState.caller); + }, + CALLVALUE: function CALLVALUE(runState) { + return new BN(runState.callValue); + }, + CALLDATALOAD: function CALLDATALOAD(pos, runState) { + if (pos.gtn(runState.callData.length)) { + return new BN(0); + } else { + pos = pos.toNumber(); + var loaded = runState.callData.slice(pos, pos + 32); + loaded = loaded.length ? loaded : Buffer.from([0]); + return new BN(utils.setLengthRight(loaded, 32)); + } + }, + CALLDATASIZE: function CALLDATASIZE(runState) { + if (runState.callData.length === 1 && runState.callData[0] === 0) { + return new BN(0); + } else { + return new BN(runState.callData.length); + } + }, + CALLDATACOPY: function CALLDATACOPY(memOffset, dataOffset, dataLength, runState) { + memStore(runState, memOffset, runState.callData, dataOffset, dataLength); + // sub the COPY fee + subGas(runState, new BN(runState._common.param('gasPrices', 'copy')).imul(dataLength.divCeil(new BN(32)))); + }, + CODESIZE: function CODESIZE(runState) { + return new BN(runState.code.length); + }, + CODECOPY: function CODECOPY(memOffset, codeOffset, length, runState) { + memStore(runState, memOffset, runState.code, codeOffset, length); + // sub the COPY fee + subGas(runState, new BN(runState._common.param('gasPrices', 'copy')).imul(length.divCeil(new BN(32)))); + }, + EXTCODESIZE: function EXTCODESIZE(address, runState, cb) { + var stateManager = runState.stateManager; + address = addressToBuffer(address); + stateManager.getContractCode(address, function (err, code) { + if (err) return cb(err); + cb(null, new BN(code.length)); + }); + }, + EXTCODECOPY: function EXTCODECOPY(address, memOffset, codeOffset, length, runState, cb) { + var stateManager = runState.stateManager; + address = addressToBuffer(address); + + // FIXME: for some reason this must come before subGas + subMemUsage(runState, memOffset, length); + // copy fee + subGas(runState, new BN(runState._common.param('gasPrices', 'copy')).imul(length.divCeil(new BN(32)))); + + stateManager.getContractCode(address, function (err, code) { + if (err) return cb(err); + memStore(runState, memOffset, code, codeOffset, length, false); + cb(null); + }); + }, + EXTCODEHASH: function EXTCODEHASH(address, runState, cb) { + if (!runState._common.gteHardfork('constantinople')) { + trap(ERROR.INVALID_OPCODE); + } + var stateManager = runState.stateManager; + address = addressToBuffer(address); + + stateManager.getAccount(address, function (err, account) { + if (err) return cb(err); + + if (account.isEmpty()) { + return cb(null, new BN(0)); + } + + stateManager.getContractCode(address, function (err, code) { + if (err) return cb(err); + if (code.length === 0) { + return cb(null, new BN(utils.KECCAK256_NULL)); + } + + return cb(null, new BN(utils.keccak256(code))); + }); + }); + }, + RETURNDATASIZE: function RETURNDATASIZE(runState) { + return new BN(runState.lastReturned.length); + }, + RETURNDATACOPY: function RETURNDATACOPY(memOffset, returnDataOffset, length, runState) { + if (returnDataOffset.add(length).gtn(runState.lastReturned.length)) { + trap(ERROR.OUT_OF_GAS); + } + + memStore(runState, memOffset, utils.toBuffer(runState.lastReturned), returnDataOffset, length, false); + // sub the COPY fee + subGas(runState, new BN(runState._common.param('gasPrices', 'copy')).mul(length.divCeil(new BN(32)))); + }, + GASPRICE: function GASPRICE(runState) { + return new BN(runState.gasPrice); + }, + // '0x40' range - block operations + BLOCKHASH: function BLOCKHASH(number, runState, cb) { + var blockchain = runState.blockchain; + var diff = new BN(runState.block.header.number).sub(number); + + // block lookups must be within the past 256 blocks + if (diff.gtn(256) || diff.lten(0)) { + cb(null, new BN(0)); + return; + } + + blockchain.getBlock(number, function (err, block) { + if (err) return cb(err); + var blockHash = block.hash(); + cb(null, new BN(blockHash)); + }); + }, + COINBASE: function COINBASE(runState) { + return new BN(runState.block.header.coinbase); + }, + TIMESTAMP: function TIMESTAMP(runState) { + return new BN(runState.block.header.timestamp); + }, + NUMBER: function NUMBER(runState) { + return new BN(runState.block.header.number); + }, + DIFFICULTY: function DIFFICULTY(runState) { + return new BN(runState.block.header.difficulty); + }, + GASLIMIT: function GASLIMIT(runState) { + return new BN(runState.block.header.gasLimit); + }, + // 0x50 range - 'storage' and execution + POP: function POP() {}, + MLOAD: function MLOAD(pos, runState) { + return new BN(memLoad(runState, pos, new BN(32))); + }, + MSTORE: function MSTORE(offset, word, runState) { + word = word.toArrayLike(Buffer, 'be', 32); + memStore(runState, offset, word, new BN(0), new BN(32)); + }, + MSTORE8: function MSTORE8(offset, byte, runState) { + // NOTE: we're using a 'trick' here to get the least significant byte + byte = Buffer.from([byte.andln(0xff)]); + memStore(runState, offset, byte, new BN(0), new BN(1)); + }, + SLOAD: function SLOAD(key, runState, cb) { + var stateManager = runState.stateManager; + key = key.toArrayLike(Buffer, 'be', 32); + + stateManager.getContractStorage(runState.address, key, function (err, value) { + if (err) return cb(err); + value = value.length ? new BN(value) : new BN(0); + cb(null, value); + }); + }, + SSTORE: function SSTORE(key, val, runState, cb) { + if (runState.static) { + trap(ERROR.STATIC_STATE_CHANGE); + } + var stateManager = runState.stateManager; + var address = runState.address; + key = key.toArrayLike(Buffer, 'be', 32); + // NOTE: this should be the shortest representation + var value; + if (val.isZero()) { + value = Buffer.from([]); + } else { + value = val.toArrayLike(Buffer, 'be'); + } + + getContractStorage(runState, address, key, function (err, found) { + if (err) return cb(err); + try { + updateSstoreGas(runState, found, value); + } catch (e) { + cb(e.error); + return; + } + + stateManager.putContractStorage(address, key, value, function (err) { + if (err) return cb(err); + stateManager.getAccount(address, function (err, account) { + if (err) return cb(err); + runState.contract = account; + cb(null); + }); + }); + }); + }, + JUMP: function JUMP(dest, runState) { + if (dest.gtn(runState.code.length)) { + trap(ERROR.INVALID_JUMP + ' at ' + describeLocation(runState)); + } + + dest = dest.toNumber(); + + if (!jumpIsValid(runState, dest)) { + trap(ERROR.INVALID_JUMP + ' at ' + describeLocation(runState)); + } + + runState.programCounter = dest; + }, + JUMPI: function JUMPI(dest, cond, runState) { + if (!cond.isZero()) { + if (dest.gtn(runState.code.length)) { + trap(ERROR.INVALID_JUMP + ' at ' + describeLocation(runState)); + } + + dest = dest.toNumber(); + + if (!jumpIsValid(runState, dest)) { + trap(ERROR.INVALID_JUMP + ' at ' + describeLocation(runState)); + } + + runState.programCounter = dest; + } + }, + PC: function PC(runState) { + return new BN(runState.programCounter - 1); + }, + MSIZE: function MSIZE(runState) { + return runState.memoryWordCount.muln(32); + }, + GAS: function GAS(runState) { + return new BN(runState.gasLeft); + }, + JUMPDEST: function JUMPDEST(runState) {}, + PUSH: function PUSH(runState) { + var numToPush = runState.opCode - 0x5f; + var loaded = new BN(runState.code.slice(runState.programCounter, runState.programCounter + numToPush).toString('hex'), 16); + runState.programCounter += numToPush; + return loaded; + }, + DUP: function DUP(runState) { + // NOTE: this function manipulates the stack directly! + + var stackPos = runState.opCode - 0x7f; + if (stackPos > runState.stack.length) { + trap(ERROR.STACK_UNDERFLOW); + } + // create a new copy + return new BN(runState.stack[runState.stack.length - stackPos]); + }, + SWAP: function SWAP(runState) { + // NOTE: this function manipulates the stack directly! + + var stackPos = runState.opCode - 0x8f; + + // check the stack to make sure we have enough items on teh stack + var swapIndex = runState.stack.length - stackPos - 1; + if (swapIndex < 0) { + trap(ERROR.STACK_UNDERFLOW); + } + + // preform the swap + var topIndex = runState.stack.length - 1; + var tmp = runState.stack[topIndex]; + runState.stack[topIndex] = runState.stack[swapIndex]; + runState.stack[swapIndex] = tmp; + }, + LOG: function LOG(memOffset, memLength) { + var args = Array.prototype.slice.call(arguments, 0); + var runState = args.pop(); + if (runState.static) { + trap(ERROR.STATIC_STATE_CHANGE); + } + + var topics = args.slice(2); + topics = topics.map(function (a) { + return a.toArrayLike(Buffer, 'be', 32); + }); + + var numOfTopics = runState.opCode - 0xa0; + var mem = memLoad(runState, memOffset, memLength); + subGas(runState, new BN(runState._common.param('gasPrices', 'logTopic')).imuln(numOfTopics).iadd(memLength.muln(runState._common.param('gasPrices', 'logData')))); + + // add address + var log = [runState.address]; + log.push(topics); + + // add data + log.push(mem); + runState.logs.push(log); + }, + + // '0xf0' range - closures + CREATE: function CREATE(value, offset, length, runState, done) { + if (runState.static) { + trap(ERROR.STATIC_STATE_CHANGE); + } + + var data = memLoad(runState, offset, length); + + // set up config + var options = { + value: value, + data: data + }; + + var localOpts = { + inOffset: offset, + inLength: length, + outOffset: new BN(0), + outLength: new BN(0) + }; + + checkCallMemCost(runState, options, localOpts); + checkOutOfGas(runState, options); + makeCall(runState, options, localOpts, done); + }, + CREATE2: function CREATE2(value, offset, length, salt, runState, done) { + if (!runState._common.gteHardfork('constantinople')) { + trap(ERROR.INVALID_OPCODE); + } + + if (runState.static) { + trap(ERROR.STATIC_STATE_CHANGE); + } + + var data = memLoad(runState, offset, length); + + // set up config + var options = { + value: value, + data: data, + salt: salt.toArrayLike(Buffer, 'be', 32) + }; + + var localOpts = { + inOffset: offset, + inLength: length, + outOffset: new BN(0), + outLength: new BN(0) + + // Deduct gas costs for hashing + };subGas(runState, new BN(runState._common.param('gasPrices', 'sha3Word')).imul(length.divCeil(new BN(32)))); + checkCallMemCost(runState, options, localOpts); + checkOutOfGas(runState, options); + makeCall(runState, options, localOpts, done); + }, + CALL: function CALL(gasLimit, toAddress, value, inOffset, inLength, outOffset, outLength, runState, done) { + var stateManager = runState.stateManager; + toAddress = addressToBuffer(toAddress); + + if (runState.static && !value.isZero()) { + trap(ERROR.STATIC_STATE_CHANGE); + } + + var data = memLoad(runState, inOffset, inLength); + + var options = { + gasLimit: gasLimit, + value: value, + to: toAddress, + data: data, + static: runState.static + }; + + var localOpts = { + inOffset: inOffset, + inLength: inLength, + outOffset: outOffset, + outLength: outLength + }; + + if (!value.isZero()) { + subGas(runState, new BN(runState._common.param('gasPrices', 'callValueTransfer'))); + } + + stateManager.accountIsEmpty(toAddress, function (err, empty) { + if (err) { + done(err); + return; + } + + if (empty) { + if (!value.isZero()) { + try { + subGas(runState, new BN(runState._common.param('gasPrices', 'callNewAccount'))); + } catch (e) { + done(e.error); + return; + } + } + } + + try { + checkCallMemCost(runState, options, localOpts); + checkOutOfGas(runState, options); + } catch (e) { + done(e.error); + return; + } + + if (!value.isZero()) { + runState.gasLeft.iaddn(runState._common.param('gasPrices', 'callStipend')); + options.gasLimit.iaddn(runState._common.param('gasPrices', 'callStipend')); + } + + makeCall(runState, options, localOpts, done); + }); + }, + CALLCODE: function CALLCODE(gas, toAddress, value, inOffset, inLength, outOffset, outLength, runState, done) { + var stateManager = runState.stateManager; + toAddress = addressToBuffer(toAddress); + + var data = memLoad(runState, inOffset, inLength); + + var options = { + gasLimit: gas, + value: value, + data: data, + to: runState.address, + static: runState.static + }; + + var localOpts = { + inOffset: inOffset, + inLength: inLength, + outOffset: outOffset, + outLength: outLength + }; + + if (!value.isZero()) { + subGas(runState, new BN(runState._common.param('gasPrices', 'callValueTransfer'))); + } + + checkCallMemCost(runState, options, localOpts); + checkOutOfGas(runState, options); + + if (!value.isZero()) { + runState.gasLeft.iaddn(runState._common.param('gasPrices', 'callStipend')); + options.gasLimit.iaddn(runState._common.param('gasPrices', 'callStipend')); + } + + // load the code + stateManager.getAccount(toAddress, function (err, account) { + if (err) return done(err); + if (runState._precompiled[toAddress.toString('hex')]) { + options.compiled = true; + options.code = runState._precompiled[toAddress.toString('hex')]; + makeCall(runState, options, localOpts, done); + } else { + stateManager.getContractCode(toAddress, function (err, code, compiled) { + if (err) return done(err); + options.compiled = compiled || false; + options.code = code; + makeCall(runState, options, localOpts, done); + }); + } + }); + }, + DELEGATECALL: function DELEGATECALL(gas, toAddress, inOffset, inLength, outOffset, outLength, runState, done) { + var stateManager = runState.stateManager; + var value = runState.callValue; + toAddress = addressToBuffer(toAddress); + + var data = memLoad(runState, inOffset, inLength); + + var options = { + gasLimit: gas, + value: value, + data: data, + to: runState.address, + caller: runState.caller, + delegatecall: true, + static: runState.static + }; + + var localOpts = { + inOffset: inOffset, + inLength: inLength, + outOffset: outOffset, + outLength: outLength + }; + + checkCallMemCost(runState, options, localOpts); + checkOutOfGas(runState, options); + + // load the code + stateManager.getAccount(toAddress, function (err, account) { + if (err) return done(err); + if (runState._precompiled[toAddress.toString('hex')]) { + options.compiled = true; + options.code = runState._precompiled[toAddress.toString('hex')]; + makeCall(runState, options, localOpts, done); + } else { + stateManager.getContractCode(toAddress, function (err, code, compiled) { + if (err) return done(err); + options.compiled = compiled || false; + options.code = code; + makeCall(runState, options, localOpts, done); + }); + } + }); + }, + STATICCALL: function STATICCALL(gasLimit, toAddress, inOffset, inLength, outOffset, outLength, runState, done) { + var value = new BN(0); + toAddress = addressToBuffer(toAddress); + + var data = memLoad(runState, inOffset, inLength); + + var options = { + gasLimit: gasLimit, + value: value, + to: toAddress, + data: data, + static: true + }; + + var localOpts = { + inOffset: inOffset, + inLength: inLength, + outOffset: outOffset, + outLength: outLength + }; + + try { + checkCallMemCost(runState, options, localOpts); + checkOutOfGas(runState, options); + } catch (e) { + done(e.error); + return; + } + + makeCall(runState, options, localOpts, done); + }, + RETURN: function RETURN(offset, length, runState) { + runState.returnValue = memLoad(runState, offset, length); + }, + REVERT: function REVERT(offset, length, runState) { + runState.stopped = true; + runState.returnValue = memLoad(runState, offset, length); + trap(ERROR.REVERT); + }, + // '0x70', range - other + SELFDESTRUCT: function SELFDESTRUCT(selfdestructToAddress, runState, cb) { + if (runState.static) { + trap(ERROR.STATIC_STATE_CHANGE); + } + var stateManager = runState.stateManager; + var contract = runState.contract; + var contractAddress = runState.address; + selfdestructToAddress = addressToBuffer(selfdestructToAddress); + + stateManager.getAccount(selfdestructToAddress, function (err, toAccount) { + // update balances + if (err) { + cb(err); + return; + } + + stateManager.accountIsEmpty(selfdestructToAddress, function (error, empty) { + if (error) { + cb(error); + return; + } + + if (new BN(contract.balance).gtn(0)) { + if (empty) { + try { + subGas(runState, new BN(runState._common.param('gasPrices', 'callNewAccount'))); + } catch (e) { + cb(e.error); + return; + } + } + } + + // only add to refund if this is the first selfdestruct for the address + if (!runState.selfdestruct[contractAddress.toString('hex')]) { + runState.gasRefund = runState.gasRefund.addn(runState._common.param('gasPrices', 'selfdestructRefund')); + } + runState.selfdestruct[contractAddress.toString('hex')] = selfdestructToAddress; + runState.stopped = true; + + var newBalance = new BN(contract.balance).add(new BN(toAccount.balance)); + async.waterfall([stateManager.getAccount.bind(stateManager, selfdestructToAddress), function (account, cb) { + account.balance = newBalance; + stateManager.putAccount(selfdestructToAddress, account, cb); + }, stateManager.getAccount.bind(stateManager, contractAddress), function (account, cb) { + account.balance = new BN(0); + stateManager.putAccount(contractAddress, account, cb); + }], function (err) { + // The reason for this is to avoid sending an array of results + cb(err); + }); + }); + }); + } +}; + +function describeLocation(runState) { + var hash = utils.keccak256(runState.code).toString('hex'); + var address = runState.address.toString('hex'); + var pc = runState.programCounter - 1; + return hash + '/' + address + ':' + pc; +} + +function subGas(runState, amount) { + runState.gasLeft.isub(amount); + if (runState.gasLeft.ltn(0)) { + runState.gasLeft = new BN(0); + trap(ERROR.OUT_OF_GAS); + } +} + +function trap(err) { + throw new VmError(err); +} + +/** + * Subtracts the amount needed for memory usage from `runState.gasLeft` + * @method subMemUsage + * @param {Object} runState + * @param {BN} offset + * @param {BN} length + * @returns {String} + */ +function subMemUsage(runState, offset, length) { + // YP (225): access with zero length will not extend the memory + if (length.isZero()) return; + + var newMemoryWordCount = offset.add(length).divCeil(new BN(32)); + if (newMemoryWordCount.lte(runState.memoryWordCount)) return; + + var words = newMemoryWordCount; + var fee = new BN(runState._common.param('gasPrices', 'memory')); + var quadCoeff = new BN(runState._common.param('gasPrices', 'quadCoeffDiv')); + // words * 3 + words ^2 / 512 + var cost = words.mul(fee).add(words.mul(words).div(quadCoeff)); + + if (cost.gt(runState.highestMemCost)) { + subGas(runState, cost.sub(runState.highestMemCost)); + runState.highestMemCost = cost; + } + + runState.memoryWordCount = newMemoryWordCount; +} + +/** + * Loads bytes from memory and returns them as a buffer. If an error occurs + * a string is instead returned. The function also subtracts the amount of + * gas need for memory expansion. + * @method memLoad + * @param {Object} runState + * @param {BN} offset where to start reading from + * @param {BN} length how far to read + * @returns {Buffer|String} + */ +function memLoad(runState, offset, length) { + // check to see if we have enougth gas for the mem read + subMemUsage(runState, offset, length); + + // shortcut + if (length.isZero()) { + return Buffer.alloc(0); + } + + // NOTE: in theory this could overflow, but unlikely due to OOG above + offset = offset.toNumber(); + length = length.toNumber(); + + var loaded = runState.memory.slice(offset, offset + length); + // fill the remaining lenth with zeros + for (var i = loaded.length; i < length; i++) { + loaded[i] = 0; + } + return Buffer.from(loaded); +} + +/** + * Stores bytes to memory. If an error occurs a string is instead returned. + * The function also subtracts the amount of gas need for memory expansion. + * @method memStore + * @param {Object} runState + * @param {BN} offset where to start reading from + * @param {Buffer} val + * @param {BN} valOffset + * @param {BN} length how far to read + * @param {Boolean} skipSubMem + * @returns {Buffer|String} + */ +function memStore(runState, offset, val, valOffset, length, skipSubMem) { + if (skipSubMem !== false) { + subMemUsage(runState, offset, length); + } + + // shortcut + if (length.isZero()) { + return; + } + + // NOTE: in theory this could overflow, but unlikely due to OOG above + offset = offset.toNumber(); + length = length.toNumber(); + + var safeLen = 0; + if (valOffset.addn(length).gtn(val.length)) { + if (valOffset.gten(val.length)) { + safeLen = 0; + } else { + valOffset = valOffset.toNumber(); + safeLen = val.length - valOffset; + } + } else { + valOffset = valOffset.toNumber(); + safeLen = val.length; + } + + var i = 0; + if (safeLen > 0) { + safeLen = safeLen > length ? length : safeLen; + for (; i < safeLen; i++) { + runState.memory[offset + i] = val[valOffset + i]; + } + } + + /* + pad the remaining length with zeros IF AND ONLY IF a value was stored + (even if value offset > value length, strange spec...) + */ + if (val.length > 0 && i < length) { + for (; i < length; i++) { + runState.memory[offset + i] = 0; + } + } +} + +// checks if a jump is valid given a destination +function jumpIsValid(runState, dest) { + return runState.validJumps.indexOf(dest) !== -1; +} + +// checks to see if we have enough gas left for the memory reads and writes +// required by the CALLs +function checkCallMemCost(runState, callOptions, localOpts) { + // calculates the gas need for saving the output in memory + subMemUsage(runState, localOpts.outOffset, localOpts.outLength); + + if (!callOptions.gasLimit) { + callOptions.gasLimit = new BN(runState.gasLeft); + } +} + +function checkOutOfGas(runState, callOptions) { + var gasAllowed = runState.gasLeft.sub(runState.gasLeft.divn(64)); + if (callOptions.gasLimit.gt(gasAllowed)) { + callOptions.gasLimit = gasAllowed; + } +} + +// sets up and calls runCall +function makeCall(runState, callOptions, localOpts, cb) { + var selfdestruct = Object.assign({}, runState.selfdestruct); + callOptions.caller = callOptions.caller || runState.address; + callOptions.origin = runState.origin; + callOptions.gasPrice = runState.gasPrice; + callOptions.block = runState.block; + callOptions.static = callOptions.static || false; + callOptions.selfdestruct = selfdestruct; + callOptions.storageReader = runState.storageReader; + + // increment the runState.depth + callOptions.depth = runState.depth + 1; + + // empty the return data buffer + runState.lastReturned = Buffer.alloc(0); + + // check if account has enough ether + // Note: in the case of delegatecall, the value is persisted and doesn't need to be deducted again + if (runState.depth >= runState._common.param('vm', 'stackLimit') || callOptions.delegatecall !== true && new BN(runState.contract.balance).lt(callOptions.value)) { + cb(null, new BN(0)); + } else { + // if creating a new contract then increament the nonce + if (!callOptions.to) { + runState.contract.nonce = new BN(runState.contract.nonce).addn(1); + } + + runState.stateManager.putAccount(runState.address, runState.contract, function (err) { + if (err) return cb(err); + runState._vm.runCall(callOptions, parseCallResults); + }); + } + + function parseCallResults(err, results) { + if (err) return cb(err); + + // concat the runState.logs + if (results.vm.logs) { + runState.logs = runState.logs.concat(results.vm.logs); + } + + // add gasRefund + if (results.vm.gasRefund) { + runState.gasRefund = runState.gasRefund.add(results.vm.gasRefund); + } + + // this should always be safe + runState.gasLeft.isub(results.gasUsed); + + // save results to memory + if (results.vm.return && (!results.vm.exceptionError || results.vm.exceptionError.error === ERROR.REVERT)) { + memStore(runState, localOpts.outOffset, results.vm.return, new BN(0), localOpts.outLength, false); + + if (results.vm.exceptionError && results.vm.exceptionError.error === ERROR.REVERT && isCreateOpCode(runState.opName)) { + runState.lastReturned = results.vm.return; + } + + switch (runState.opName) { + case 'CALL': + case 'CALLCODE': + case 'DELEGATECALL': + case 'STATICCALL': + runState.lastReturned = results.vm.return; + break; + } + } + + if (!results.vm.exceptionError) { + Object.assign(runState.selfdestruct, selfdestruct); + // update stateRoot on current contract + runState.stateManager.getAccount(runState.address, function (err, account) { + if (err) return cb(err); + + runState.contract = account; + // push the created address to the stack + if (results.createdAddress) { + cb(null, new BN(results.createdAddress)); + } else { + cb(null, new BN(results.vm.exception)); + } + }); + } else { + // creation failed so don't increment the nonce + if (results.vm.createdAddress) { + runState.contract.nonce = new BN(runState.contract.nonce).subn(1); + } + + cb(null, new BN(results.vm.exception)); + } + } +} + +function isCreateOpCode(opName) { + return opName === 'CREATE' || opName === 'CREATE2'; +} + +function getContractStorage(runState, address, key, cb) { + if (runState._common.hardfork() === 'constantinople') { + runState.storageReader.getContractStorage(address, key, cb); + } else { + runState.stateManager.getContractStorage(address, key, cb); + } +} + +function updateSstoreGas(runState, found, value) { + if (runState._common.hardfork() === 'constantinople') { + var original = found.original; + var current = found.current; + if (current.equals(value)) { + // If current value equals new value (this is a no-op), 200 gas is deducted. + subGas(runState, new BN(runState._common.param('gasPrices', 'netSstoreNoopGas'))); + return; + } + // If current value does not equal new value + if (original.equals(current)) { + // If original value equals current value (this storage slot has not been changed by the current execution context) + if (original.length === 0) { + // If original value is 0, 20000 gas is deducted. + return subGas(runState, new BN(runState._common.param('gasPrices', 'netSstoreInitGas'))); + } + if (value.length === 0) { + // If new value is 0, add 15000 gas to refund counter. + runState.gasRefund = runState.gasRefund.addn(runState._common.param('gasPrices', 'netSstoreClearRefund')); + } + // Otherwise, 5000 gas is deducted. + return subGas(runState, new BN(runState._common.param('gasPrices', 'netSstoreCleanGas'))); + } + // If original value does not equal current value (this storage slot is dirty), 200 gas is deducted. Apply both of the following clauses. + if (original.length !== 0) { + // If original value is not 0 + if (current.length === 0) { + // If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0. + runState.gasRefund = runState.gasRefund.subn(runState._common.param('gasPrices', 'netSstoreClearRefund')); + } else if (value.length === 0) { + // If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter. + runState.gasRefund = runState.gasRefund.addn(runState._common.param('gasPrices', 'netSstoreClearRefund')); + } + } + if (original.equals(value)) { + // If original value equals new value (this storage slot is reset) + if (original.length === 0) { + // If original value is 0, add 19800 gas to refund counter. + runState.gasRefund = runState.gasRefund.addn(runState._common.param('gasPrices', 'netSstoreResetClearRefund')); + } else { + // Otherwise, add 4800 gas to refund counter. + runState.gasRefund = runState.gasRefund.addn(runState._common.param('gasPrices', 'netSstoreResetRefund')); + } + } + return subGas(runState, new BN(runState._common.param('gasPrices', 'netSstoreDirtyGas'))); + } else { + if (value.length === 0 && !found.length) { + subGas(runState, new BN(runState._common.param('gasPrices', 'sstoreReset'))); + } else if (value.length === 0 && found.length) { + subGas(runState, new BN(runState._common.param('gasPrices', 'sstoreReset'))); + runState.gasRefund.iaddn(runState._common.param('gasPrices', 'sstoreRefund')); + } else if (value.length !== 0 && !found.length) { + subGas(runState, new BN(runState._common.param('gasPrices', 'sstoreSet'))); + } else if (value.length !== 0 && found.length) { + subGas(runState, new BN(runState._common.param('gasPrices', 'sstoreReset'))); + } + } +} +},{"../exceptions.js":615,"./logTable.js":634,"async":42,"ethereumjs-util":640,"safe-buffer":1334}],636:[function(require,module,exports){ +'use strict'; + +var codes = { + // 0x0 range - arithmetic ops + // name, baseCost, off stack, on stack, dynamic, async + 0x00: ['STOP', 0, 0, 0, false], + 0x01: ['ADD', 3, 2, 1, false], + 0x02: ['MUL', 5, 2, 1, false], + 0x03: ['SUB', 3, 2, 1, false], + 0x04: ['DIV', 5, 2, 1, false], + 0x05: ['SDIV', 5, 2, 1, false], + 0x06: ['MOD', 5, 2, 1, false], + 0x07: ['SMOD', 5, 2, 1, false], + 0x08: ['ADDMOD', 8, 3, 1, false], + 0x09: ['MULMOD', 8, 3, 1, false], + 0x0a: ['EXP', 10, 2, 1, false], + 0x0b: ['SIGNEXTEND', 5, 2, 1, false], + + // 0x10 range - bit ops + 0x10: ['LT', 3, 2, 1, false], + 0x11: ['GT', 3, 2, 1, false], + 0x12: ['SLT', 3, 2, 1, false], + 0x13: ['SGT', 3, 2, 1, false], + 0x14: ['EQ', 3, 2, 1, false], + 0x15: ['ISZERO', 3, 1, 1, false], + 0x16: ['AND', 3, 2, 1, false], + 0x17: ['OR', 3, 2, 1, false], + 0x18: ['XOR', 3, 2, 1, false], + 0x19: ['NOT', 3, 1, 1, false], + 0x1a: ['BYTE', 3, 2, 1, false], + 0x1b: ['SHL', 3, 2, 1, false], + 0x1c: ['SHR', 3, 2, 1, false], + 0x1d: ['SAR', 3, 2, 1, false], + + // 0x20 range - crypto + 0x20: ['SHA3', 30, 2, 1, false], + + // 0x30 range - closure state + 0x30: ['ADDRESS', 2, 0, 1, true], + 0x31: ['BALANCE', 400, 1, 1, true, true], + 0x32: ['ORIGIN', 2, 0, 1, true], + 0x33: ['CALLER', 2, 0, 1, true], + 0x34: ['CALLVALUE', 2, 0, 1, true], + 0x35: ['CALLDATALOAD', 3, 1, 1, true], + 0x36: ['CALLDATASIZE', 2, 0, 1, true], + 0x37: ['CALLDATACOPY', 3, 3, 0, true], + 0x38: ['CODESIZE', 2, 0, 1, false], + 0x39: ['CODECOPY', 3, 3, 0, false], + 0x3a: ['GASPRICE', 2, 0, 1, false], + 0x3b: ['EXTCODESIZE', 700, 1, 1, true, true], + 0x3c: ['EXTCODECOPY', 700, 4, 0, true, true], + 0x3d: ['RETURNDATASIZE', 2, 0, 1, true], + 0x3e: ['RETURNDATACOPY', 3, 3, 0, true], + 0x3f: ['EXTCODEHASH', 400, 1, 1, true, true], + + // '0x40' range - block operations + 0x40: ['BLOCKHASH', 20, 1, 1, true, true], + 0x41: ['COINBASE', 2, 0, 1, true], + 0x42: ['TIMESTAMP', 2, 0, 1, true], + 0x43: ['NUMBER', 2, 0, 1, true], + 0x44: ['DIFFICULTY', 2, 0, 1, true], + 0x45: ['GASLIMIT', 2, 0, 1, true], + + // 0x50 range - 'storage' and execution + 0x50: ['POP', 2, 1, 0, false], + 0x51: ['MLOAD', 3, 1, 1, false], + 0x52: ['MSTORE', 3, 2, 0, false], + 0x53: ['MSTORE8', 3, 2, 0, false], + 0x54: ['SLOAD', 200, 1, 1, true, true], + 0x55: ['SSTORE', 0, 2, 0, true, true], + 0x56: ['JUMP', 8, 1, 0, false], + 0x57: ['JUMPI', 10, 2, 0, false], + 0x58: ['PC', 2, 0, 1, false], + 0x59: ['MSIZE', 2, 0, 1, false], + 0x5a: ['GAS', 2, 0, 1, false], + 0x5b: ['JUMPDEST', 1, 0, 0, false], + + // 0x60, range + 0x60: ['PUSH', 3, 0, 1, false], + 0x61: ['PUSH', 3, 0, 1, false], + 0x62: ['PUSH', 3, 0, 1, false], + 0x63: ['PUSH', 3, 0, 1, false], + 0x64: ['PUSH', 3, 0, 1, false], + 0x65: ['PUSH', 3, 0, 1, false], + 0x66: ['PUSH', 3, 0, 1, false], + 0x67: ['PUSH', 3, 0, 1, false], + 0x68: ['PUSH', 3, 0, 1, false], + 0x69: ['PUSH', 3, 0, 1, false], + 0x6a: ['PUSH', 3, 0, 1, false], + 0x6b: ['PUSH', 3, 0, 1, false], + 0x6c: ['PUSH', 3, 0, 1, false], + 0x6d: ['PUSH', 3, 0, 1, false], + 0x6e: ['PUSH', 3, 0, 1, false], + 0x6f: ['PUSH', 3, 0, 1, false], + 0x70: ['PUSH', 3, 0, 1, false], + 0x71: ['PUSH', 3, 0, 1, false], + 0x72: ['PUSH', 3, 0, 1, false], + 0x73: ['PUSH', 3, 0, 1, false], + 0x74: ['PUSH', 3, 0, 1, false], + 0x75: ['PUSH', 3, 0, 1, false], + 0x76: ['PUSH', 3, 0, 1, false], + 0x77: ['PUSH', 3, 0, 1, false], + 0x78: ['PUSH', 3, 0, 1, false], + 0x79: ['PUSH', 3, 0, 1, false], + 0x7a: ['PUSH', 3, 0, 1, false], + 0x7b: ['PUSH', 3, 0, 1, false], + 0x7c: ['PUSH', 3, 0, 1, false], + 0x7d: ['PUSH', 3, 0, 1, false], + 0x7e: ['PUSH', 3, 0, 1, false], + 0x7f: ['PUSH', 3, 0, 1, false], + + 0x80: ['DUP', 3, 0, 1, false], + 0x81: ['DUP', 3, 0, 1, false], + 0x82: ['DUP', 3, 0, 1, false], + 0x83: ['DUP', 3, 0, 1, false], + 0x84: ['DUP', 3, 0, 1, false], + 0x85: ['DUP', 3, 0, 1, false], + 0x86: ['DUP', 3, 0, 1, false], + 0x87: ['DUP', 3, 0, 1, false], + 0x88: ['DUP', 3, 0, 1, false], + 0x89: ['DUP', 3, 0, 1, false], + 0x8a: ['DUP', 3, 0, 1, false], + 0x8b: ['DUP', 3, 0, 1, false], + 0x8c: ['DUP', 3, 0, 1, false], + 0x8d: ['DUP', 3, 0, 1, false], + 0x8e: ['DUP', 3, 0, 1, false], + 0x8f: ['DUP', 3, 0, 1, false], + + 0x90: ['SWAP', 3, 0, 0, false], + 0x91: ['SWAP', 3, 0, 0, false], + 0x92: ['SWAP', 3, 0, 0, false], + 0x93: ['SWAP', 3, 0, 0, false], + 0x94: ['SWAP', 3, 0, 0, false], + 0x95: ['SWAP', 3, 0, 0, false], + 0x96: ['SWAP', 3, 0, 0, false], + 0x97: ['SWAP', 3, 0, 0, false], + 0x98: ['SWAP', 3, 0, 0, false], + 0x99: ['SWAP', 3, 0, 0, false], + 0x9a: ['SWAP', 3, 0, 0, false], + 0x9b: ['SWAP', 3, 0, 0, false], + 0x9c: ['SWAP', 3, 0, 0, false], + 0x9d: ['SWAP', 3, 0, 0, false], + 0x9e: ['SWAP', 3, 0, 0, false], + 0x9f: ['SWAP', 3, 0, 0, false], + + 0xa0: ['LOG', 375, 2, 0, false], + 0xa1: ['LOG', 375, 3, 0, false], + 0xa2: ['LOG', 375, 4, 0, false], + 0xa3: ['LOG', 375, 5, 0, false], + 0xa4: ['LOG', 375, 6, 0, false], + + // '0xf0' range - closures + 0xf0: ['CREATE', 32000, 3, 1, true, true], + 0xf1: ['CALL', 700, 7, 1, true, true], + 0xf2: ['CALLCODE', 700, 7, 1, true, true], + 0xf3: ['RETURN', 0, 2, 0, false], + 0xf4: ['DELEGATECALL', 700, 6, 1, true, true], + 0xf5: ['CREATE2', 32000, 4, 1, true, true], + 0xfa: ['STATICCALL', 700, 6, 1, true, true], + 0xfd: ['REVERT', 0, 2, 0, false], + + // '0x70', range - other + 0xfe: ['INVALID', 0, 0, 0, false], + 0xff: ['SELFDESTRUCT', 5000, 1, 0, false, true] +}; + +module.exports = function (op, full, freeLogs) { + var code = codes[op] ? codes[op] : ['INVALID', 0, 0, 0, false, false]; + var opcode = code[0]; + + if (full) { + if (opcode === 'LOG') { + opcode += op - 0xa0; + } + + if (opcode === 'PUSH') { + opcode += op - 0x5f; + } + + if (opcode === 'DUP') { + opcode += op - 0x7f; + } + + if (opcode === 'SWAP') { + opcode += op - 0x8f; + } + } + + var fee = code[1]; + + if (freeLogs) { + if (opcode === 'LOG') { + fee = 0; + } + } + + return { name: opcode, opcode: op, fee: fee, in: code[2], out: code[3], dynamic: code[4], async: code[5] }; +}; +},{}],637:[function(require,module,exports){ +(function (Buffer){ +const Common = require('ethereumjs-common').default +const utils = require('ethereumjs-util') +const BN = utils.BN + /** + * An object that repersents the block header + * @constructor + * @param {Array} data raw data, deserialized + * @param {Array} opts Options + * @param {String|Number} opts.chain The chain for the block header [default: 'mainnet'] + * @param {String} opts.hardfork Hardfork for the block header [default: null, block number-based behaviour] + * @param {Object} opts.common Alternatively pass a Common instance instead of setting chain/hardfork directly + * @prop {Buffer} parentHash the blocks' parent's hash + * @prop {Buffer} uncleHash sha3(rlp_encode(uncle_list)) + * @prop {Buffer} coinbase the miner address + * @prop {Buffer} stateRoot The root of a Merkle Patricia tree + * @prop {Buffer} transactionTrie the root of a Trie containing the transactions + * @prop {Buffer} receiptTrie the root of a Trie containing the transaction Reciept + * @prop {Buffer} bloom + * @prop {Buffer} difficulty + * @prop {Buffer} number the block's height + * @prop {Buffer} gasLimit + * @prop {Buffer} gasUsed + * @prop {Buffer} timestamp + * @prop {Buffer} extraData + * @prop {Array.} raw an array of buffers containing the raw blocks. + */ +var BlockHeader = module.exports = function (data, opts) { + opts = opts || {} + + if (opts.common) { + if (opts.chain) { + throw new Error('Instantiation with both opts.common and opts.chain parameter not allowed!') + } + this._common = opts.common + } else { + let chain = opts.chain ? opts.chain : 'mainnet' + let hardfork = opts.hardfork ? opts.hardfork : null + this._common = new Common(chain, hardfork) + } + + var fields = [{ + name: 'parentHash', + length: 32, + default: utils.zeros(32) + }, { + name: 'uncleHash', + default: utils.SHA3_RLP_ARRAY + }, { + name: 'coinbase', + length: 20, + default: utils.zeros(20) + }, { + name: 'stateRoot', + length: 32, + default: utils.zeros(32) + }, { + name: 'transactionsTrie', + length: 32, + default: utils.SHA3_RLP + }, { + name: 'receiptTrie', + length: 32, + default: utils.SHA3_RLP + }, { + name: 'bloom', + default: utils.zeros(256) + }, { + name: 'difficulty', + default: Buffer.from([]) + }, { + name: 'number', + // TODO: params.homeSteadForkNumber.v left for legacy reasons, replace on future release + default: utils.intToBuffer(1150000) + }, { + name: 'gasLimit', + default: Buffer.from('ffffffffffffff', 'hex') + }, { + name: 'gasUsed', + empty: true, + default: Buffer.from([]) + }, { + name: 'timestamp', + default: Buffer.from([]) + }, { + name: 'extraData', + allowZero: true, + empty: true, + default: Buffer.from([]) + }, { + name: 'mixHash', + default: utils.zeros(32) + // length: 32 + }, { + name: 'nonce', + default: utils.zeros(8) // sha3(42) + }] + utils.defineProperties(this, fields, data) +} + +/** + * Returns the canoncical difficulty of the block + * @method canonicalDifficulty + * @param {Block} parentBlock the parent `Block` of the this header + * @return {BN} + */ +BlockHeader.prototype.canonicalDifficulty = function (parentBlock) { + const hardfork = this._common.hardfork() || this._common.activeHardfork(utils.bufferToInt(this.number)) + const blockTs = new BN(this.timestamp) + const parentTs = new BN(parentBlock.header.timestamp) + const parentDif = new BN(parentBlock.header.difficulty) + const minimumDifficulty = new BN(this._common.param('pow', 'minimumDifficulty', hardfork)) + var offset = parentDif.div(new BN(this._common.param('pow', 'difficultyBoundDivisor', hardfork))) + var num = new BN(this.number) + var a + var cutoff + var dif + + if (this._common.hardforkGteHardfork(hardfork, 'byzantium')) { + // max((2 if len(parent.uncles) else 1) - ((timestamp - parent.timestamp) // 9), -99) (EIP100) + var uncleAddend = parentBlock.header.uncleHash.equals(utils.SHA3_RLP_ARRAY) ? 1 : 2 + a = blockTs.sub(parentTs).idivn(9).ineg().iaddn(uncleAddend) + cutoff = new BN(-99) + // MAX(cutoff, a) + if (cutoff.cmp(a) === 1) { + a = cutoff + } + dif = parentDif.add(offset.mul(a)) + } + + if (this._common.hardforkGteHardfork(hardfork, 'constantinople')) { + // Constantinople difficulty bomb delay (EIP1234) + num.isubn(5000000) + if (num.ltn(0)) { + num = new BN(0) + } + } else if (this._common.hardforkGteHardfork(hardfork, 'byzantium')) { + // Byzantium difficulty bomb delay (EIP649) + num.isubn(3000000) + if (num.ltn(0)) { + num = new BN(0) + } + } else if (this._common.hardforkGteHardfork(hardfork, 'homestead')) { + // 1 - (block_timestamp - parent_timestamp) // 10 + a = blockTs.sub(parentTs).idivn(10).ineg().iaddn(1) + cutoff = new BN(-99) + // MAX(cutoff, a) + if (cutoff.cmp(a) === 1) { + a = cutoff + } + dif = parentDif.add(offset.mul(a)) + } else { + // pre-homestead + if (parentTs.addn(this._common.param('pow', 'durationLimit', hardfork)).cmp(blockTs) === 1) { + dif = offset.add(parentDif) + } else { + dif = parentDif.sub(offset) + } + } + + var exp = num.idivn(100000).isubn(2) + if (!exp.isNeg()) { + dif.iadd(new BN(2).pow(exp)) + } + + if (dif.cmp(minimumDifficulty) === -1) { + dif = minimumDifficulty + } + + return dif +} + +/** + * checks that the block's `difficuly` matches the canonical difficulty + * @method validateDifficulty + * @param {Block} parentBlock this block's parent + * @return {Boolean} + */ +BlockHeader.prototype.validateDifficulty = function (parentBlock) { + const dif = this.canonicalDifficulty(parentBlock) + return dif.cmp(new BN(this.difficulty)) === 0 +} + +/** + * Validates the gasLimit + * @method validateGasLimit + * @param {Block} parentBlock this block's parent + * @returns {Boolean} + */ +BlockHeader.prototype.validateGasLimit = function (parentBlock) { + const pGasLimit = new BN(parentBlock.header.gasLimit) + const gasLimit = new BN(this.gasLimit) + const hardfork = this._common.hardfork() ? this._common.hardfork() : this._common.activeHardfork(this.number) + const a = pGasLimit.div(new BN(this._common.param('gasConfig', 'gasLimitBoundDivisor', hardfork))) + const maxGasLimit = pGasLimit.add(a) + const minGasLimit = pGasLimit.sub(a) + + return gasLimit.lt(maxGasLimit) && gasLimit.gt(minGasLimit) && gasLimit.gte(this._common.param('gasConfig', 'minGasLimit', hardfork)) +} + +/** + * Validates the entire block header + * @method validate + * @param {Blockchain} blockChain the blockchain that this block is validating against + * @param {Bignum} [height] if this is an uncle header, this is the height of the block that is including it + * @param {Function} cb the callback function. The callback is given an `error` if the block is invalid + */ +BlockHeader.prototype.validate = function (blockchain, height, cb) { + var self = this + if (arguments.length === 2) { + cb = height + height = false + } + + if (this.isGenesis()) { + return cb() + } + + // find the blocks parent + blockchain.getBlock(self.parentHash, function (err, parentBlock) { + if (err) { + return cb('could not find parent block') + } + + self.parentBlock = parentBlock + + var number = new BN(self.number) + if (number.cmp(new BN(parentBlock.header.number).iaddn(1)) !== 0) { + return cb('invalid number') + } + + if (height) { + var dif = height.sub(new BN(parentBlock.header.number)) + if (!(dif.cmpn(8) === -1 && dif.cmpn(1) === 1)) { + return cb('uncle block has a parent that is too old or to young') + } + } + + if (!self.validateDifficulty(parentBlock)) { + return cb('invalid Difficulty') + } + + if (!self.validateGasLimit(parentBlock)) { + return cb('invalid gas limit') + } + + if (utils.bufferToInt(parentBlock.header.number) + 1 !== utils.bufferToInt(self.number)) { + return cb('invalid heigth') + } + + if (utils.bufferToInt(self.timestamp) <= utils.bufferToInt(parentBlock.header.timestamp)) { + return cb('invalid timestamp') + } + + const hardfork = self._common.hardfork() ? self._common.hardfork() : self._common.activeHardfork(height) + if (self.extraData.length > self._common.param('vm', 'maxExtraDataSize', hardfork)) { + return cb('invalid amount of extra data') + } + + cb() + }) +} + +/** + * Returns the sha3 hash of the blockheader + * @method hash + * @return {Buffer} + */ +BlockHeader.prototype.hash = function () { + return utils.rlphash(this.raw) +} + +/** + * checks if the blockheader is a genesis header + * @method isGenesis + * @return {Boolean} + */ +BlockHeader.prototype.isGenesis = function () { + return this.number.toString('hex') === '' +} + +/** + * turns the header into the canonical genesis block header + * @method setGenesisParams + */ +BlockHeader.prototype.setGenesisParams = function () { + this.timestamp = this._common.genesis().timestamp + this.gasLimit = this._common.genesis().gasLimit + this.difficulty = this._common.genesis().difficulty + this.extraData = this._common.genesis().extraData + this.nonce = this._common.genesis().nonce + this.stateRoot = this._common.genesis().stateRoot + this.number = Buffer.from([]) +} + +}).call(this,require("buffer").Buffer) +},{"buffer":113,"ethereumjs-common":609,"ethereumjs-util":639}],638:[function(require,module,exports){ +(function (Buffer){ +const Common = require('ethereumjs-common').default +const ethUtil = require('ethereumjs-util') +const Tx = require('ethereumjs-tx') +const Trie = require('merkle-patricia-tree') +const BN = ethUtil.BN +const rlp = ethUtil.rlp +const async = require('async') +const BlockHeader = require('./header') + +/** + * Creates a new block object + * @constructor the raw serialized or the deserialized block. + * @param {Array|Buffer|Object} data + * @param {Array} opts Options + * @param {String|Number} opts.chain The chain for the block [default: 'mainnet'] + * @param {String} opts.hardfork Hardfork for the block [default: null, block number-based behaviour] + * @param {Object} opts.common Alternatively pass a Common instance (ethereumjs-common) instead of setting chain/hardfork directly + * @prop {Header} header the block's header + * @prop {Array.
} uncleList an array of uncle headers + * @prop {Array.} raw an array of buffers containing the raw blocks. + */ +var Block = module.exports = function (data, opts) { + opts = opts || {} + + if (opts.common) { + if (opts.chain) { + throw new Error('Instantiation with both opts.common and opts.chain parameter not allowed!') + } + this._common = opts.common + } else { + let chain = opts.chain ? opts.chain : 'mainnet' + let hardfork = opts.hardfork ? opts.hardfork : null + this._common = new Common(chain, hardfork) + } + + this.transactions = [] + this.uncleHeaders = [] + this._inBlockChain = false + this.txTrie = new Trie() + + Object.defineProperty(this, 'raw', { + get: function () { + return this.serialize(false) + } + }) + + var rawTransactions, rawUncleHeaders + + // defaults + if (!data) { + data = [[], [], []] + } + + if (Buffer.isBuffer(data)) { + data = rlp.decode(data) + } + + if (Array.isArray(data)) { + this.header = new BlockHeader(data[0], opts) + rawTransactions = data[1] + rawUncleHeaders = data[2] + } else { + this.header = new BlockHeader(data.header, opts) + rawTransactions = data.transactions || [] + rawUncleHeaders = data.uncleHeaders || [] + } + + // parse uncle headers + for (var i = 0; i < rawUncleHeaders.length; i++) { + this.uncleHeaders.push(new BlockHeader(rawUncleHeaders[i], opts)) + } + + // parse transactions + for (i = 0; i < rawTransactions.length; i++) { + var tx = new Tx(rawTransactions[i]) + tx._homestead = true + this.transactions.push(tx) + } +} + +Block.Header = BlockHeader + +/** + * Produces a hash the RLP of the block + * @method hash + */ +Block.prototype.hash = function () { + return this.header.hash() +} + +/** + * Determines if a given block is the genesis block + * @method isGenisis + * @return Boolean + */ +Block.prototype.isGenesis = function () { + return this.header.isGenesis() +} + +/** + * turns the block into the canonical genesis block + * @method setGenesisParams + */ +Block.prototype.setGenesisParams = function () { + this.header.setGenesisParams() +} + +/** + * Produces a serialization of the block. + * @method serialize + * @param {Boolean} rlpEncode whether to rlp encode the block or not + */ +Block.prototype.serialize = function (rlpEncode) { + var raw = [this.header.raw, [], + [] + ] + + // rlpEnode defaults to true + if (typeof rlpEncode === 'undefined') { + rlpEncode = true + } + + this.transactions.forEach(function (tx) { + raw[1].push(tx.raw) + }) + + this.uncleHeaders.forEach(function (uncle) { + raw[2].push(uncle.raw) + }) + + return rlpEncode ? rlp.encode(raw) : raw +} + +/** + * Generate transaction trie. The tx trie must be generated before the transaction trie can + * be validated with `validateTransactionTrie` + * @method genTxTrie + * @param {Function} cb the callback + */ +Block.prototype.genTxTrie = function (cb) { + var i = 0 + var self = this + + async.eachSeries(this.transactions, function (tx, done) { + self.txTrie.put(rlp.encode(i), tx.serialize(), done) + i++ + }, cb) +} + +/** + * Validates the transaction trie + * @method validateTransactionTrie + * @return {Boolean} + */ +Block.prototype.validateTransactionsTrie = function () { + var txT = this.header.transactionsTrie.toString('hex') + if (this.transactions.length) { + return txT === this.txTrie.root.toString('hex') + } else { + return txT === ethUtil.SHA3_RLP.toString('hex') + } +} + +/** + * Validates the transactions + * @method validateTransactions + * @param {Boolean} [stringError=false] whether to return a string with a dscription of why the validation failed or return a Bloolean + * @return {Boolean} + */ +Block.prototype.validateTransactions = function (stringError) { + var errors = [] + + this.transactions.forEach(function (tx, i) { + var error = tx.validate(true) + if (error) { + errors.push(error + ' at tx ' + i) + } + }) + + if (stringError === undefined || stringError === false) { + return errors.length === 0 + } else { + return arrayToString(errors) + } +} + +/** + * Validates the entire block. Returns a string to the callback if block is invalid + * @method validate + * @param {BlockChain} blockChain the blockchain that this block wants to be part of + * @param {Function} cb the callback which is given a `String` if the block is not valid + */ +Block.prototype.validate = function (blockChain, cb) { + var self = this + var errors = [] + + async.parallel([ + // validate uncles + self.validateUncles.bind(self, blockChain), + // validate block + self.header.validate.bind(self.header, blockChain), + // generate the transaction trie + self.genTxTrie.bind(self) + ], function (err) { + if (err) { + errors.push(err) + } + + if (!self.validateTransactionsTrie()) { + errors.push('invalid transaction trie') + } + + var txErrors = self.validateTransactions(true) + if (txErrors !== '') { + errors.push(txErrors) + } + + if (!self.validateUnclesHash()) { + errors.push('invalid uncle hash') + } + + cb(arrayToString(errors)) + }) +} + +/** + * Validates the uncle's hash + * @method validateUncleHash + * @return {Boolean} + */ +Block.prototype.validateUnclesHash = function () { + var raw = [] + this.uncleHeaders.forEach(function (uncle) { + raw.push(uncle.raw) + }) + + raw = rlp.encode(raw) + return ethUtil.sha3(raw).toString('hex') === this.header.uncleHash.toString('hex') +} + +/** + * Validates the uncles that are in the block if any. Returns a string to the callback if uncles are invalid + * @method validateUncles + * @param {Blockchain} blockChaina an instance of the Blockchain + * @param {Function} cb the callback + */ +Block.prototype.validateUncles = function (blockChain, cb) { + if (this.isGenesis()) { + return cb() + } + + var self = this + + if (self.uncleHeaders.length > 2) { + return cb('too many uncle headers') + } + + var uncleHashes = self.uncleHeaders.map(function (header) { + return header.hash().toString('hex') + }) + + if (!((new Set(uncleHashes)).size === uncleHashes.length)) { + return cb('duplicate uncles') + } + + async.each(self.uncleHeaders, function (uncle, cb2) { + var height = new BN(self.header.number) + async.parallel([ + uncle.validate.bind(uncle, blockChain, height), + // check to make sure the uncle is not already in the blockchain + function (cb3) { + blockChain.getDetails(uncle.hash(), function (err, blockInfo) { + // TODO: remove uncles from BC + if (blockInfo && blockInfo.isUncle) { + cb3(err || 'uncle already included') + } else { + cb3() + } + }) + } + ], cb2) + }, cb) +} + +/** + * Converts the block toJSON + * @method toJSON + * @param {Bool} labeled whether to create an labeled object or an array + * @return {Object} + */ +Block.prototype.toJSON = function (labeled) { + if (labeled) { + var obj = { + header: this.header.toJSON(true), + transactions: [], + uncleHeaders: [] + } + + this.transactions.forEach(function (tx) { + obj.transactions.push(tx.toJSON(labeled)) + }) + + this.uncleHeaders.forEach(function (uh) { + obj.uncleHeaders.push(uh.toJSON()) + }) + return obj + } else { + return ethUtil.baToJSON(this.raw) + } +} + +function arrayToString (array) { + try { + return array.reduce(function (str, err) { + if (str) { + str += ' ' + } + return str + err + }) + } catch (e) { + return '' + } +} + +}).call(this,{"isBuffer":require("../../../is-buffer/index.js")}) +},{"../../../is-buffer/index.js":839,"./header":637,"async":42,"ethereumjs-common":609,"ethereumjs-tx":610,"ethereumjs-util":639,"merkle-patricia-tree":947}],639:[function(require,module,exports){ +arguments[4][612][0].apply(exports,arguments) +},{"assert":35,"bn.js":66,"create-hash":466,"dup":612,"ethjs-util":707,"keccak":868,"rlp":1331,"safe-buffer":1334,"secp256k1":1339}],640:[function(require,module,exports){ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var BN = require("bn.js"); +exports.BN = BN; +var rlp = require("rlp"); +exports.rlp = rlp; +var createKeccakHash = require('keccak'); +var secp256k1 = require('secp256k1'); +exports.secp256k1 = secp256k1; +var assert = require('assert'); +var createHash = require('create-hash'); +var Buffer = require('safe-buffer').Buffer; +var ethjsUtil = require('ethjs-util'); +Object.assign(exports, ethjsUtil); +/** + * The max integer that this VM can handle + */ +exports.MAX_INTEGER = new BN('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16); +/** + * 2^256 + */ +exports.TWO_POW256 = new BN('10000000000000000000000000000000000000000000000000000000000000000', 16); +/** + * Keccak-256 hash of null + */ +exports.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'; +/** + * Keccak-256 hash of null + */ +exports.KECCAK256_NULL = Buffer.from(exports.KECCAK256_NULL_S, 'hex'); +/** + * Keccak-256 of an RLP of an empty array + */ +exports.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'; +/** + * Keccak-256 of an RLP of an empty array + */ +exports.KECCAK256_RLP_ARRAY = Buffer.from(exports.KECCAK256_RLP_ARRAY_S, 'hex'); +/** + * Keccak-256 hash of the RLP of null + */ +exports.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'; +/** + * Keccak-256 hash of the RLP of null + */ +exports.KECCAK256_RLP = Buffer.from(exports.KECCAK256_RLP_S, 'hex'); +/** + * Returns a buffer filled with 0s. + * @param bytes the number of bytes the buffer should be + */ +exports.zeros = function (bytes) { + return Buffer.allocUnsafe(bytes).fill(0); +}; +/** + * Returns a zero address. + */ +exports.zeroAddress = function () { + var addressLength = 20; + var addr = exports.zeros(addressLength); + return exports.bufferToHex(addr); +}; +/** + * Left Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes. + * Or it truncates the beginning if it exceeds. + * @param msg the value to pad (Buffer|Array) + * @param length the number of bytes the output should be + * @param right whether to start padding form the left or right + * @return (Buffer|Array) + */ +exports.setLengthLeft = function (msg, length, right) { + if (right === void 0) { right = false; } + var buf = exports.zeros(length); + msg = exports.toBuffer(msg); + if (right) { + if (msg.length < length) { + msg.copy(buf); + return buf; + } + return msg.slice(0, length); + } + else { + if (msg.length < length) { + msg.copy(buf, length - msg.length); + return buf; + } + return msg.slice(-length); + } +}; +exports.setLength = exports.setLengthLeft; +/** + * Right Pads an `Array` or `Buffer` with leading zeros till it has `length` bytes. + * Or it truncates the beginning if it exceeds. + * @param msg the value to pad (Buffer|Array) + * @param length the number of bytes the output should be + * @return (Buffer|Array) + */ +exports.setLengthRight = function (msg, length) { + return exports.setLength(msg, length, true); +}; +/** + * Trims leading zeros from a `Buffer` or an `Array`. + * @param a (Buffer|Array|String) + * @return (Buffer|Array|String) + */ +exports.unpad = function (a) { + a = ethjsUtil.stripHexPrefix(a); + var first = a[0]; + while (a.length > 0 && first.toString() === '0') { + a = a.slice(1); + first = a[0]; + } + return a; +}; +exports.stripZeros = exports.unpad; +/** + * Attempts to turn a value into a `Buffer`. As input it supports `Buffer`, `String`, `Number`, null/undefined, `BN` and other objects with a `toArray()` method. + * @param v the value + */ +exports.toBuffer = function (v) { + if (!Buffer.isBuffer(v)) { + if (Array.isArray(v)) { + v = Buffer.from(v); + } + else if (typeof v === 'string') { + if (exports.isHexString(v)) { + v = Buffer.from(exports.padToEven(exports.stripHexPrefix(v)), 'hex'); + } + else { + v = Buffer.from(v); + } + } + else if (typeof v === 'number') { + v = exports.intToBuffer(v); + } + else if (v === null || v === undefined) { + v = Buffer.allocUnsafe(0); + } + else if (BN.isBN(v)) { + v = v.toArrayLike(Buffer); + } + else if (v.toArray) { + // converts a BN to a Buffer + v = Buffer.from(v.toArray()); + } + else { + throw new Error('invalid type'); + } + } + return v; +}; +/** + * Converts a `Buffer` to a `Number`. + * @param buf `Buffer` object to convert + * @throws If the input number exceeds 53 bits. + */ +exports.bufferToInt = function (buf) { + return new BN(exports.toBuffer(buf)).toNumber(); +}; +/** + * Converts a `Buffer` into a hex `String`. + * @param buf `Buffer` object to convert + */ +exports.bufferToHex = function (buf) { + buf = exports.toBuffer(buf); + return '0x' + buf.toString('hex'); +}; +/** + * Interprets a `Buffer` as a signed integer and returns a `BN`. Assumes 256-bit numbers. + * @param num Signed integer value + */ +exports.fromSigned = function (num) { + return new BN(num).fromTwos(256); +}; +/** + * Converts a `BN` to an unsigned integer and returns it as a `Buffer`. Assumes 256-bit numbers. + * @param num + */ +exports.toUnsigned = function (num) { + return Buffer.from(num.toTwos(256).toArray()); +}; +/** + * Creates Keccak hash of the input + * @param a The input data (Buffer|Array|String|Number) + * @param bits The Keccak width + */ +exports.keccak = function (a, bits) { + if (bits === void 0) { bits = 256; } + a = exports.toBuffer(a); + if (!bits) + bits = 256; + return createKeccakHash("keccak" + bits) + .update(a) + .digest(); +}; +/** + * Creates Keccak-256 hash of the input, alias for keccak(a, 256). + * @param a The input data (Buffer|Array|String|Number) + */ +exports.keccak256 = function (a) { + return exports.keccak(a); +}; +/** + * Creates SHA256 hash of the input. + * @param a The input data (Buffer|Array|String|Number) + */ +exports.sha256 = function (a) { + a = exports.toBuffer(a); + return createHash('sha256') + .update(a) + .digest(); +}; +/** + * Creates RIPEMD160 hash of the input. + * @param a The input data (Buffer|Array|String|Number) + * @param padded Whether it should be padded to 256 bits or not + */ +exports.ripemd160 = function (a, padded) { + a = exports.toBuffer(a); + var hash = createHash('rmd160') + .update(a) + .digest(); + if (padded === true) { + return exports.setLength(hash, 32); + } + else { + return hash; + } +}; +/** + * Creates SHA-3 hash of the RLP encoded version of the input. + * @param a The input data + */ +exports.rlphash = function (a) { + return exports.keccak(rlp.encode(a)); +}; +/** + * Checks if the private key satisfies the rules of the curve secp256k1. + */ +exports.isValidPrivate = function (privateKey) { + return secp256k1.privateKeyVerify(privateKey); +}; +/** + * Checks if the public key satisfies the rules of the curve secp256k1 + * and the requirements of Ethereum. + * @param publicKey The two points of an uncompressed key, unless sanitize is enabled + * @param sanitize Accept public keys in other formats + */ +exports.isValidPublic = function (publicKey, sanitize) { + if (sanitize === void 0) { sanitize = false; } + if (publicKey.length === 64) { + // Convert to SEC1 for secp256k1 + return secp256k1.publicKeyVerify(Buffer.concat([Buffer.from([4]), publicKey])); + } + if (!sanitize) { + return false; + } + return secp256k1.publicKeyVerify(publicKey); +}; +/** + * Returns the ethereum address of a given public key. + * Accepts "Ethereum public keys" and SEC1 encoded keys. + * @param pubKey The two points of an uncompressed key, unless sanitize is enabled + * @param sanitize Accept public keys in other formats + */ +exports.pubToAddress = function (pubKey, sanitize) { + if (sanitize === void 0) { sanitize = false; } + pubKey = exports.toBuffer(pubKey); + if (sanitize && pubKey.length !== 64) { + pubKey = secp256k1.publicKeyConvert(pubKey, false).slice(1); + } + assert(pubKey.length === 64); + // Only take the lower 160bits of the hash + return exports.keccak(pubKey).slice(-20); +}; +exports.publicToAddress = exports.pubToAddress; +/** + * Returns the ethereum public key of a given private key. + * @param privateKey A private key must be 256 bits wide + */ +exports.privateToPublic = function (privateKey) { + privateKey = exports.toBuffer(privateKey); + // skip the type flag and use the X, Y points + return secp256k1.publicKeyCreate(privateKey, false).slice(1); +}; +/** + * Converts a public key to the Ethereum format. + */ +exports.importPublic = function (publicKey) { + publicKey = exports.toBuffer(publicKey); + if (publicKey.length !== 64) { + publicKey = secp256k1.publicKeyConvert(publicKey, false).slice(1); + } + return publicKey; +}; +/** + * Returns the ECDSA signature of a message hash. + */ +exports.ecsign = function (msgHash, privateKey, chainId) { + var sig = secp256k1.sign(msgHash, privateKey); + var recovery = sig.recovery; + var ret = { + r: sig.signature.slice(0, 32), + s: sig.signature.slice(32, 64), + v: chainId ? recovery + (chainId * 2 + 35) : recovery + 27, + }; + return ret; +}; +/** + * Returns the keccak-256 hash of `message`, prefixed with the header used by the `eth_sign` RPC call. + * The output of this function can be fed into `ecsign` to produce the same signature as the `eth_sign` + * call for a given `message`, or fed to `ecrecover` along with a signature to recover the public key + * used to produce the signature. + */ +exports.hashPersonalMessage = function (message) { + var prefix = exports.toBuffer("\u0019Ethereum Signed Message:\n" + message.length.toString()); + return exports.keccak(Buffer.concat([prefix, message])); +}; +/** + * ECDSA public key recovery from signature. + * @returns Recovered public key + */ +exports.ecrecover = function (msgHash, v, r, s, chainId) { + var signature = Buffer.concat([exports.setLength(r, 32), exports.setLength(s, 32)], 64); + var recovery = calculateSigRecovery(v, chainId); + if (!isValidSigRecovery(recovery)) { + throw new Error('Invalid signature v value'); + } + var senderPubKey = secp256k1.recover(msgHash, signature, recovery); + return secp256k1.publicKeyConvert(senderPubKey, false).slice(1); +}; +/** + * Convert signature parameters into the format of `eth_sign` RPC method. + * @returns Signature + */ +exports.toRpcSig = function (v, r, s, chainId) { + var recovery = calculateSigRecovery(v, chainId); + if (!isValidSigRecovery(recovery)) { + throw new Error('Invalid signature v value'); + } + // geth (and the RPC eth_sign method) uses the 65 byte format used by Bitcoin + return exports.bufferToHex(Buffer.concat([exports.setLengthLeft(r, 32), exports.setLengthLeft(s, 32), exports.toBuffer(v)])); +}; +/** + * Convert signature format of the `eth_sign` RPC method to signature parameters + * NOTE: all because of a bug in geth: https://github.com/ethereum/go-ethereum/issues/2053 + */ +exports.fromRpcSig = function (sig) { + var buf = exports.toBuffer(sig); + // NOTE: with potential introduction of chainId this might need to be updated + if (buf.length !== 65) { + throw new Error('Invalid signature length'); + } + var v = buf[64]; + // support both versions of `eth_sign` responses + if (v < 27) { + v += 27; + } + return { + v: v, + r: buf.slice(0, 32), + s: buf.slice(32, 64), + }; +}; +/** + * Returns the ethereum address of a given private key. + * @param privateKey A private key must be 256 bits wide + */ +exports.privateToAddress = function (privateKey) { + return exports.publicToAddress(exports.privateToPublic(privateKey)); +}; +/** + * Checks if the address is a valid. Accepts checksummed addresses too. + */ +exports.isValidAddress = function (address) { + return /^0x[0-9a-fA-F]{40}$/.test(address); +}; +/** + * Checks if a given address is a zero address. + */ +exports.isZeroAddress = function (address) { + var zeroAddr = exports.zeroAddress(); + return zeroAddr === exports.addHexPrefix(address); +}; +/** + * Returns a checksummed address. + */ +exports.toChecksumAddress = function (address) { + address = ethjsUtil.stripHexPrefix(address).toLowerCase(); + var hash = exports.keccak(address).toString('hex'); + var ret = '0x'; + for (var i = 0; i < address.length; i++) { + if (parseInt(hash[i], 16) >= 8) { + ret += address[i].toUpperCase(); + } + else { + ret += address[i]; + } + } + return ret; +}; +/** + * Checks if the address is a valid checksummed address. + */ +exports.isValidChecksumAddress = function (address) { + return exports.isValidAddress(address) && exports.toChecksumAddress(address) === address; +}; +/** + * Generates an address of a newly created contract. + * @param from The address which is creating this new address + * @param nonce The nonce of the from account + */ +exports.generateAddress = function (from, nonce) { + from = exports.toBuffer(from); + var nonceBN = new BN(nonce); + if (nonceBN.isZero()) { + // in RLP we want to encode null in the case of zero nonce + // read the RLP documentation for an answer if you dare + return exports.rlphash([from, null]).slice(-20); + } + // Only take the lower 160bits of the hash + return exports.rlphash([from, Buffer.from(nonceBN.toArray())]).slice(-20); +}; +/** + * Generates an address for a contract created using CREATE2. + * @param from The address which is creating this new address + * @param salt A salt + * @param initCode The init code of the contract being created + */ +exports.generateAddress2 = function (from, salt, initCode) { + var fromBuf = exports.toBuffer(from); + var saltBuf = exports.toBuffer(salt); + var initCodeBuf = exports.toBuffer(initCode); + assert(fromBuf.length === 20); + assert(saltBuf.length === 32); + var address = exports.keccak256(Buffer.concat([Buffer.from('ff', 'hex'), fromBuf, saltBuf, exports.keccak256(initCodeBuf)])); + return address.slice(-20); +}; +/** + * Returns true if the supplied address belongs to a precompiled account (Byzantium). + */ +exports.isPrecompiled = function (address) { + var a = exports.unpad(address); + return a.length === 1 && a[0] >= 1 && a[0] <= 8; +}; +/** + * Adds "0x" to a given `String` if it does not already start with "0x". + */ +exports.addHexPrefix = function (str) { + if (typeof str !== 'string') { + return str; + } + return ethjsUtil.isHexPrefixed(str) ? str : '0x' + str; +}; +/** + * Validate a ECDSA signature. + * @param homesteadOrLater Indicates whether this is being used on either the homestead hardfork or a later one + */ +exports.isValidSignature = function (v, r, s, homesteadOrLater, chainId) { + if (homesteadOrLater === void 0) { homesteadOrLater = true; } + var SECP256K1_N_DIV_2 = new BN('7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0', 16); + var SECP256K1_N = new BN('fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141', 16); + if (r.length !== 32 || s.length !== 32) { + return false; + } + if (!isValidSigRecovery(calculateSigRecovery(v, chainId))) { + return false; + } + var rBN = new BN(r); + var sBN = new BN(s); + if (rBN.isZero() || rBN.gt(SECP256K1_N) || sBN.isZero() || sBN.gt(SECP256K1_N)) { + return false; + } + if (homesteadOrLater && sBN.cmp(SECP256K1_N_DIV_2) === 1) { + return false; + } + return true; +}; +/** + * Converts a `Buffer` or `Array` to JSON. + * @param ba (Buffer|Array) + * @return (Array|String|null) + */ +exports.baToJSON = function (ba) { + if (Buffer.isBuffer(ba)) { + return "0x" + ba.toString('hex'); + } + else if (ba instanceof Array) { + var array = []; + for (var i = 0; i < ba.length; i++) { + array.push(exports.baToJSON(ba[i])); + } + return array; + } +}; +/** + * Defines properties on a `Object`. It make the assumption that underlying data is binary. + * @param self the `Object` to define properties on + * @param fields an array fields to define. Fields can contain: + * * `name` - the name of the properties + * * `length` - the number of bytes the field can have + * * `allowLess` - if the field can be less than the length + * * `allowEmpty` + * @param data data to be validated against the definitions + */ +exports.defineProperties = function (self, fields, data) { + self.raw = []; + self._fields = []; + // attach the `toJSON` + self.toJSON = function (label) { + if (label === void 0) { label = false; } + if (label) { + var obj_1 = {}; + self._fields.forEach(function (field) { + obj_1[field] = "0x" + self[field].toString('hex'); + }); + return obj_1; + } + return exports.baToJSON(self.raw); + }; + self.serialize = function serialize() { + return rlp.encode(self.raw); + }; + fields.forEach(function (field, i) { + self._fields.push(field.name); + function getter() { + return self.raw[i]; + } + function setter(v) { + v = exports.toBuffer(v); + if (v.toString('hex') === '00' && !field.allowZero) { + v = Buffer.allocUnsafe(0); + } + if (field.allowLess && field.length) { + v = exports.stripZeros(v); + assert(field.length >= v.length, "The field " + field.name + " must not have more " + field.length + " bytes"); + } + else if (!(field.allowZero && v.length === 0) && field.length) { + assert(field.length === v.length, "The field " + field.name + " must have byte length of " + field.length); + } + self.raw[i] = v; + } + Object.defineProperty(self, field.name, { + enumerable: true, + configurable: true, + get: getter, + set: setter, + }); + if (field.default) { + self[field.name] = field.default; + } + // attach alias + if (field.alias) { + Object.defineProperty(self, field.alias, { + enumerable: false, + configurable: true, + set: setter, + get: getter, + }); + } + }); + // if the constuctor is passed data + if (data) { + if (typeof data === 'string') { + data = Buffer.from(ethjsUtil.stripHexPrefix(data), 'hex'); + } + if (Buffer.isBuffer(data)) { + data = rlp.decode(data); + } + if (Array.isArray(data)) { + if (data.length > self._fields.length) { + throw new Error('wrong number of fields in data'); + } + // make sure all the items are buffers + data.forEach(function (d, i) { + self[self._fields[i]] = exports.toBuffer(d); + }); + } + else if (typeof data === 'object') { + var keys_1 = Object.keys(data); + fields.forEach(function (field) { + if (keys_1.indexOf(field.name) !== -1) + self[field.name] = data[field.name]; + if (keys_1.indexOf(field.alias) !== -1) + self[field.alias] = data[field.alias]; + }); + } + else { + throw new Error('invalid data'); + } + } +}; +function calculateSigRecovery(v, chainId) { + return chainId ? v - (2 * chainId + 35) : v - 27; +} +function isValidSigRecovery(recovery) { + return recovery === 0 || recovery === 1; +} + +},{"assert":35,"bn.js":66,"create-hash":466,"ethjs-util":707,"keccak":868,"rlp":1331,"safe-buffer":1334,"secp256k1":1339}],641:[function(require,module,exports){ +'use strict'; + +var Interface = require('./interface.js'); + +var utils = (function() { + var convert = require('../utils/convert.js'); + return { + defineProperty: require('../utils/properties.js').defineProperty, + + getAddress: require('../utils/address.js').getAddress, + + bigNumberify: require('../utils/bignumber.js').bigNumberify, + + arrayify: convert.arrayify, + hexlify: convert.hexlify, + }; +})(); + +var errors = require('../utils/errors'); + +var allowedTransactionKeys = { + data: true, from: true, gasLimit: true, gasPrice:true, nonce: true, to: true, value: true +} + +function copyObject(object) { + var result = {}; + for (var key in object) { + result[key] = object[key]; + } + return result; +} + + +function Contract(addressOrName, contractInterface, signerOrProvider) { + if (!(this instanceof Contract)) { throw new Error('missing new'); } + + // @TODO: Maybe still check the addressOrName looks like a valid address or name? + //address = utils.getAddress(address); + + if (!(contractInterface instanceof Interface)) { + contractInterface = new Interface(contractInterface); + } + + if (!signerOrProvider) { throw new Error('missing signer or provider'); } + + var signer = signerOrProvider; + var provider = null; + + if (signerOrProvider.provider) { + provider = signerOrProvider.provider; + } else { + provider = signerOrProvider; + signer = null; + } + + utils.defineProperty(this, 'address', addressOrName); + utils.defineProperty(this, 'interface', contractInterface); + utils.defineProperty(this, 'signer', signer); + utils.defineProperty(this, 'provider', provider); + + var addressPromise = provider.resolveName(addressOrName); + + function runMethod(method, estimateOnly) { + return function() { + var transaction = {} + + var params = Array.prototype.slice.call(arguments); + + // If 1 extra parameter was passed in, it contains overrides + if (params.length === method.inputs.types.length + 1 && typeof(params[params.length - 1]) === 'object') { + transaction = copyObject(params.pop()); + + // Check for unexpected keys (e.g. using "gas" instead of "gasLimit") + for (var key in transaction) { + if (!allowedTransactionKeys[key]) { + throw new Error('unknown transaction override ' + key); + } + } + } + + // Check overrides make sense + ['data', 'to'].forEach(function(key) { + if (transaction[key] != null) { + throw new Error('cannot override ' + key) ; + } + }); + + var call = method.apply(contractInterface, params); + + // Send to the contract address + transaction.to = addressOrName; + + // Set the transaction data + transaction.data = call.data; + + switch (call.type) { + case 'call': + + // Call (constant functions) always cost 0 ether + if (estimateOnly) { + return Promise.resolve(new utils.bigNumberify(0)); + } + + // Check overrides make sense + ['gasLimit', 'gasPrice', 'value'].forEach(function(key) { + if (transaction[key] != null) { + throw new Error('call cannot override ' + key) ; + } + }); + + var fromPromise = null; + if (transaction.from == null && signer && signer.getAddress) { + fromPromise = signer.getAddress(); + if (!(fromPromise instanceof Promise)) { + fromPromise = Promise.resolve(fromPromise); + } + } else { + fromPromise = Promise.resolve(null); + } + + return fromPromise.then(function(address) { + if (address) { + transaction.from = utils.getAddress(address); + } + return provider.call(transaction); + + }).then(function(value) { + try { + if ((utils.arrayify(value).length % 32) !== 0) { + throw new Error('call exception'); + } + var result = call.parse(value); + } catch (error) { + if ((value === '0x' && method.outputs.types.length > 0) || error.message === 'call exception') { + errors.throwError('call exception', errors.CALL_EXCEPTION, { + address: addressOrName, + method: call.signature, + value: params + }); + } + throw error; + } + if (method.outputs.types.length === 1) { + result = result[0]; + } + return result; + }); + + case 'transaction': + if (!signer) { return Promise.reject(new Error('missing signer')); } + + // Make sure they aren't overriding something they shouldn't + if (transaction.from != null) { + throw new Error('transaction cannot override from') ; + } + + // Only computing the transaction estimate + if (estimateOnly) { + if (signer && signer.estimateGas) { + return signer.estimateGas(transaction); + } + + return provider.estimateGas(transaction) + } + + // If the signer supports sendTrasaction, use it + if (signer.sendTransaction) { + return signer.sendTransaction(transaction); + } + + if (!signer.sign) { + return Promise.reject(new Error('custom signer does not support signing')); + } + + if (transaction.gasLimit == null) { + transaction.gasLimit = signer.defaultGasLimit || 2000000; + } + + var noncePromise = null; + if (transaction.nonce != null) { + noncePromise = Promise.resolve(transaction.nonce) + } else if (signer.getTransactionCount) { + noncePromise = signer.getTransactionCount(); + if (!(noncePromise instanceof Promise)) { + noncePromise = Promise.resolve(noncePromise); + } + } else { + var addressPromise = signer.getAddress(); + if (!(addressPromise instanceof Promise)) { + addressPromise = Promise.resolve(addressPromise); + } + noncePromise = addressPromise.then(function(address) { + return provider.getTransactionCount(address, 'pending'); + }); + } + + var gasPricePromise = null; + if (transaction.gasPrice) { + gasPricePromise = Promise.resolve(transaction.gasPrice); + } else { + gasPricePromise = provider.getGasPrice(); + } + + return Promise.all([ + noncePromise, + gasPricePromise + + ]).then(function(results) { + transaction.nonce = results[0]; + transaction.gasPrice = results[1]; + return signer.sign(transaction); + + }).then(function(signedTransaction) { + return provider.sendTransaction(signedTransaction); + }); + } + }; + } + + var estimate = {}; + utils.defineProperty(this, 'estimate', estimate); + + var functions = {}; + utils.defineProperty(this, 'functions', functions); + + var events = {}; + utils.defineProperty(this, 'events', events); + + Object.keys(contractInterface.functions).forEach(function(methodName) { + var method = contractInterface.functions[methodName]; + + var run = runMethod(method, false); + + if (this[methodName] == null) { + utils.defineProperty(this, methodName, run); + } else { + console.log('WARNING: Multiple definitions for ' + method); + } + + if (functions[method] == null) { + utils.defineProperty(functions, methodName, run); + utils.defineProperty(estimate, methodName, runMethod(method, true)); + } + }, this); + + Object.keys(contractInterface.events).forEach(function(eventName) { + var eventInfo = contractInterface.events[eventName]; + + var eventCallback = null; + + function handleEvent(log) { + addressPromise.then(function(address) { + + // Not meant for us (the topics just has the same name) + if (address != log.address) { return; } + + try { + var result = eventInfo.parse(log.topics, log.data); + + // Some useful things to have with the log + log.args = result; + log.event = eventName; + log.parse = eventInfo.parse; + log.removeListener = function() { + provider.removeListener(eventInfo.topics, handleEvent); + } + + log.getBlock = function() { return provider.getBlock(log.blockHash);; } + log.getTransaction = function() { return provider.getTransaction(log.transactionHash); } + log.getTransactionReceipt = function() { return provider.getTransactionReceipt(log.transactionHash); } + log.eventSignature = eventInfo.signature; + + eventCallback.apply(log, Array.prototype.slice.call(result)); + } catch (error) { + console.log(error); + } + + return null; + }).catch(function(error) { + //console.log(error); + }); + } + + var property = { + enumerable: true, + get: function() { + return eventCallback; + }, + set: function(value) { + if (!value) { value = null; } + + if (!value && eventCallback) { + provider.removeListener(eventInfo.topics, handleEvent); + + } else if (value && !eventCallback) { + provider.on(eventInfo.topics, handleEvent); + } + + eventCallback = value; + } + }; + + var propertyName = 'on' + eventName.toLowerCase(); + if (this[propertyName] == null) { + Object.defineProperty(this, propertyName, property); + } + + Object.defineProperty(events, eventName, property); + + }, this); +} + +utils.defineProperty(Contract.prototype, 'connect', function(signerOrProvider) { + return new Contract(this.address, this.interface, signerOrProvider); +}); + +utils.defineProperty(Contract, 'getDeployTransaction', function(bytecode, contractInterface) { + + if (!(contractInterface instanceof Interface)) { + contractInterface = new Interface(contractInterface); + } + + var args = Array.prototype.slice.call(arguments); + args.splice(1, 1); + + return { + data: contractInterface.deployFunction.apply(contractInterface, args).bytecode + } +}); + +module.exports = Contract; + +},{"../utils/address.js":678,"../utils/bignumber.js":679,"../utils/convert.js":683,"../utils/errors":685,"../utils/properties.js":692,"./interface.js":643}],642:[function(require,module,exports){ +'use strict'; + +var Contract = require('./contract.js'); +var Interface = require('./interface.js'); + +module.exports = { + Contract: Contract, + Interface: Interface, +} + + +},{"./contract.js":641,"./interface.js":643}],643:[function(require,module,exports){ +'use strict'; + +// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI + +var utils = (function() { + var AbiCoder = require('../utils/abi-coder'); + var convert = require('../utils/convert'); + var properties = require('../utils/properties'); + var utf8 = require('../utils/utf8'); + + return { + defineFrozen: properties.defineFrozen, + defineProperty: properties.defineProperty, + + coder: AbiCoder.defaultCoder, + parseSignature: AbiCoder.parseSignature, + + arrayify: convert.arrayify, + concat: convert.concat, + isHexString: convert.isHexString, + + toUtf8Bytes: utf8.toUtf8Bytes, + + keccak256: require('../utils/keccak256'), + }; +})(); + +var errors = require('../utils/errors'); + +function parseParams(params) { + var names = []; + var types = []; + + params.forEach(function(param) { + if (param.components != null) { + if (param.type.substring(0, 5) !== 'tuple') { + throw new Error('internal error; report on GitHub'); + } + var suffix = ''; + var arrayBracket = param.type.indexOf('['); + if (arrayBracket >= 0) { suffix = param.type.substring(arrayBracket); } + + var result = parseParams(param.components); + names.push({ name: (param.name || null), names: result.names }); + types.push('tuple(' + result.types.join(',') + ')' + suffix) + } else { + names.push(param.name || null); + types.push(param.type); + } + }); + + return { + names: names, + types: types + } +} + +function populateDescription(object, items) { + for (var key in items) { + utils.defineProperty(object, key, items[key]); + } + return object; +} + +/** + * - bytecode (optional; only for deploy) + * - type ("deploy") + */ +function DeployDescription() { } + +/** + * - name + * - signature + * - sighash + * - + * - + * - + * - + * - type: ("call" | "transaction") + */ +function FunctionDescription() { } + +/** + * - anonymous + * - name + * - signature + * - parse + * - topics + * - inputs + * - type ("event") + */ +function EventDescription() { } + +function Indexed(value) { + utils.defineProperty(this, 'indexed', true); + utils.defineProperty(this, 'hash', value); +} + +function Result() {} + +function Interface(abi) { + if (!(this instanceof Interface)) { throw new Error('missing new'); } + + if (typeof(abi) === 'string') { + try { + abi = JSON.parse(abi); + } catch (error) { + errors.throwError('could not parse ABI JSON', errors.INVALID_ARGUMENT, { + arg: 'abi', + errorMessage: error.message, + value: abi + }); + } + } + + var _abi = []; + abi.forEach(function(fragment) { + if (typeof(fragment) === 'string') { + fragment = utils.parseSignature(fragment); + } + _abi.push(fragment); + }); + + utils.defineFrozen(this, 'abi', _abi); + + var methods = {}, events = {}, deploy = null; + + utils.defineProperty(this, 'functions', methods); + utils.defineProperty(this, 'events', events); + + function addMethod(method) { + switch (method.type) { + case 'constructor': + var func = (function() { + var inputParams = parseParams(method.inputs); + + var func = function(bytecode) { + if (!utils.isHexString(bytecode)) { + errors.throwError('invalid contract bytecode', errors.INVALID_ARGUMENT, { + arg: 'bytecode', + type: typeof(bytecode), + value: bytecode + }); + } + + var params = Array.prototype.slice.call(arguments, 1); + if (params.length < inputParams.types.length) { + errors.throwError('missing constructor argument', errors.MISSING_ARGUMENT, { + arg: (inputParams.names[params.length] || 'unknown'), + count: params.length, + expectedCount: inputParams.types.length + }); + } else if (params.length > inputParams.types.length) { + errors.throwError('too many constructor arguments', errors.UNEXPECTED_ARGUMENT, { + count: params.length, + expectedCount: inputParams.types.length + }); + } + + try { + var encodedParams = utils.coder.encode(method.inputs, params) + } catch (error) { + errors.throwError('invalid constructor argument', errors.INVALID_ARGUMENT, { + arg: error.arg, + reason: error.reason, + value: error.value + }); + } + + var result = { + bytecode: bytecode + encodedParams.substring(2), + type: 'deploy' + } + + return populateDescription(new DeployDescription(), result); + } + + utils.defineFrozen(func, 'inputs', inputParams); + utils.defineProperty(func, 'payable', (method.payable == null || !!method.payable)) + + return func; + })(); + + if (!deploy) { deploy = func; } + + break; + + case 'function': + var func = (function() { + var inputParams = parseParams(method.inputs); + var outputParams = parseParams(method.outputs); + + var signature = '(' + inputParams.types.join(',') + ')'; + signature = signature.replace(/tuple/g, ''); + signature = method.name + signature; + + var parse = function(data) { + try { + return utils.coder.decode(method.outputs, utils.arrayify(data)); + } catch(error) { + errors.throwError('invalid data for function output', errors.INVALID_ARGUMENT, { + arg: 'data', + errorArg: error.arg, + errorValue: error.value, + value: data, + reason: error.reason + }); + } + }; + + var sighash = utils.keccak256(utils.toUtf8Bytes(signature)).substring(0, 10); + var func = function() { + var result = { + name: method.name, + signature: signature, + sighash: sighash, + type: ((method.constant) ? 'call': 'transaction') + }; + + var params = Array.prototype.slice.call(arguments, 0); + + if (params.length < inputParams.types.length) { + errors.throwError('missing input argument', errors.MISSING_ARGUMENT, { + arg: (inputParams.names[params.length] || 'unknown'), + count: params.length, + expectedCount: inputParams.types.length, + name: method.name + }); + } else if (params.length > inputParams.types.length) { + errors.throwError('too many input arguments', errors.UNEXPECTED_ARGUMENT, { + count: params.length, + expectedCount: inputParams.types.length + }); + } + + try { + var encodedParams = utils.coder.encode(method.inputs, params); + } catch (error) { + errors.throwError('invalid input argument', errors.INVALID_ARGUMENT, { + arg: error.arg, + reason: error.reason, + value: error.value + }); + } + + result.data = sighash + encodedParams.substring(2); + result.parse = parse; + + return populateDescription(new FunctionDescription(), result); + } + + utils.defineFrozen(func, 'inputs', inputParams); + utils.defineFrozen(func, 'outputs', outputParams); + + utils.defineProperty(func, 'payable', (method.payable == null || !!method.payable)) + + utils.defineProperty(func, 'parseResult', parse); + + utils.defineProperty(func, 'signature', signature); + utils.defineProperty(func, 'sighash', sighash); + + return func; + })(); + + // Expose the first (and hopefully unique named function + if (method.name && methods[method.name] == null) { + utils.defineProperty(methods, method.name, func); + } + + // Expose all methods by their signature, for overloaded functions + if (methods[func.signature] == null) { + utils.defineProperty(methods, func.signature, func); + } + + break; + + case 'event': + var func = (function() { + var inputParams = parseParams(method.inputs); + + var signature = '(' + inputParams.types.join(',') + ')'; + signature = signature.replace(/tuple/g, ''); + signature = method.name + signature; + + var result = { + anonymous: (!!method.anonymous), + name: method.name, + signature: signature, + type: 'event' + }; + + result.parse = function(topics, data) { + if (data == null) { + data = topics; + topics = null; + } + + // Strip the signature off of non-anonymous topics + if (topics != null && !method.anonymous) { topics = topics.slice(1); } + + var inputIndexed = [], inputNonIndexed = []; + var inputDynamic = []; + method.inputs.forEach(function(param, index) { + + if (param.indexed) { + if (param.type === 'string' || param.type === 'bytes' || param.type.indexOf('[') >= 0 || param.type.substring(0, 5) === 'tuple') { + inputIndexed.push({ type: 'bytes32', name: (param.name || '')}); + inputDynamic.push(true); + } else { + inputIndexed.push(param); + inputDynamic.push(false); + } + } else { + inputNonIndexed.push(param); + inputDynamic.push(false); + } + }); + + if (topics != null) { + var resultIndexed = utils.coder.decode( + inputIndexed, + utils.concat(topics) + ); + } + + var resultNonIndexed = utils.coder.decode( + inputNonIndexed, + utils.arrayify(data) + ); + + var result = new Result(); + var nonIndexedIndex = 0, indexedIndex = 0; + method.inputs.forEach(function(input, index) { + if (input.indexed) { + if (topics == null) { + result[index] = new Indexed(null); + + } else if (inputDynamic[index]) { + result[index] = new Indexed(resultIndexed[indexedIndex++]); + } else { + result[index] = resultIndexed[indexedIndex++]; + } + } else { + result[index] = resultNonIndexed[nonIndexedIndex++]; + } + if (input.name) { result[input.name] = result[index]; } + }); + + result.length = method.inputs.length; + + return result; + }; + + var func = populateDescription(new EventDescription(), result) + utils.defineFrozen(func, 'topics', [ utils.keccak256(utils.toUtf8Bytes(signature)) ]); + utils.defineFrozen(func, 'inputs', inputParams); + return func; + })(); + + // Expose the first (and hopefully unique) event name + if (method.name && events[method.name] == null) { + utils.defineProperty(events, method.name, func); + } + + // Expose all events by their signature, for overloaded functions + if (methods[func.signature] == null) { + utils.defineProperty(methods, func.signature, func); + } + + break; + + case 'fallback': + // Nothing to do for fallback + break; + + default: + console.log('WARNING: unsupported ABI type - ' + method.type); + break; + } + }; + + _abi.forEach(addMethod, this); + + // If there wasn't a constructor, create the default constructor + if (!deploy) { + addMethod({type: 'constructor', inputs: []}); + } + + utils.defineProperty(this, 'deployFunction', deploy); +} + +utils.defineProperty(Interface.prototype, 'parseTransaction', function(tx) { + var sighash = tx.data.substring(0, 10).toLowerCase(); + for (var name in this.functions) { + if (name.indexOf('(') === -1) { continue; } + var func = this.functions[name]; + if (func.sighash === sighash) { + var result = utils.coder.decode(func.inputs.types, '0x' + tx.data.substring(10)); + return { + args: result, + signature: func.signature, + sighash: func.sighash, + parse: func.parseResult, + value: tx.value, + }; + } + } + return null; +}); + +module.exports = Interface; + +},{"../utils/abi-coder":677,"../utils/convert":683,"../utils/errors":685,"../utils/keccak256":689,"../utils/properties":692,"../utils/utf8":698}],644:[function(require,module,exports){ +'use strict'; + +var version = require('./package.json').version; + +var contracts = require('./contracts'); +var providers = require('./providers'); +var errors = require('./utils/errors'); +var utils = require('./utils'); +var wallet = require('./wallet'); + +module.exports = { + Wallet: wallet.Wallet, + + HDNode: wallet.HDNode, + SigningKey: wallet.SigningKey, + + Contract: contracts.Contract, + Interface: contracts.Interface, + + networks: providers.networks, + providers: providers, + + errors: errors, + utils: utils, + + version: version, +}; + +},{"./contracts":642,"./package.json":667,"./providers":671,"./utils":688,"./utils/errors":685,"./wallet":700}],645:[function(require,module,exports){ +'use strict'; + +var elliptic = exports; + +elliptic.version = require('../package.json').version; +elliptic.utils = require('./elliptic/utils'); +elliptic.rand = require('brorand'); +elliptic.hmacDRBG = require('./elliptic/hmac-drbg'); +elliptic.curve = require('./elliptic/curve'); +elliptic.curves = require('./elliptic/curves'); + +// Protocols +elliptic.ec = require('./elliptic/ec'); +elliptic.eddsa = require('./elliptic/eddsa'); + +},{"../package.json":661,"./elliptic/curve":648,"./elliptic/curves":651,"./elliptic/ec":652,"./elliptic/eddsa":655,"./elliptic/hmac-drbg":658,"./elliptic/utils":660,"brorand":76}],646:[function(require,module,exports){ +arguments[4][549][0].apply(exports,arguments) +},{"../../elliptic":645,"bn.js":66,"dup":549}],647:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function EdwardsCurve(conf) { + // NOTE: Important as we are creating point in Base.call() + this.twisted = (conf.a | 0) !== 1; + this.mOneA = this.twisted && (conf.a | 0) === -1; + this.extended = this.mOneA; + + Base.call(this, 'edwards', conf); + + this.a = new BN(conf.a, 16).umod(this.red.m); + this.a = this.a.toRed(this.red); + this.c = new BN(conf.c, 16).toRed(this.red); + this.c2 = this.c.redSqr(); + this.d = new BN(conf.d, 16).toRed(this.red); + this.dd = this.d.redAdd(this.d); + + assert(!this.twisted || this.c.fromRed().cmpn(1) === 0); + this.oneC = (conf.c | 0) === 1; +} +inherits(EdwardsCurve, Base); +module.exports = EdwardsCurve; + +EdwardsCurve.prototype._mulA = function _mulA(num) { + if (this.mOneA) + return num.redNeg(); + else + return this.a.redMul(num); +}; + +EdwardsCurve.prototype._mulC = function _mulC(num) { + if (this.oneC) + return num; + else + return this.c.redMul(num); +}; + +// Just for compatibility with Short curve +EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) { + return this.point(x, y, z, t); +}; + +EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var x2 = x.redSqr(); + var rhs = this.c2.redSub(this.a.redMul(x2)); + var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2)); + + var y2 = rhs.redMul(lhs.redInvm()); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) { + y = new BN(y, 16); + if (!y.red) + y = y.toRed(this.red); + + // x^2 = (y^2 - 1) / (d y^2 + 1) + var y2 = y.redSqr(); + var lhs = y2.redSub(this.one); + var rhs = y2.redMul(this.d).redAdd(this.one); + var x2 = lhs.redMul(rhs.redInvm()); + + if (x2.cmp(this.zero) === 0) { + if (odd) + throw new Error('invalid point'); + else + return this.point(this.zero, y); + } + + var x = x2.redSqrt(); + if (x.redSqr().redSub(x2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + if (x.isOdd() !== odd) + x = x.redNeg(); + + return this.point(x, y); +}; + +EdwardsCurve.prototype.validate = function validate(point) { + if (point.isInfinity()) + return true; + + // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2) + point.normalize(); + + var x2 = point.x.redSqr(); + var y2 = point.y.redSqr(); + var lhs = x2.redMul(this.a).redAdd(y2); + var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2))); + + return lhs.cmp(rhs) === 0; +}; + +function Point(curve, x, y, z, t) { + Base.BasePoint.call(this, curve, 'projective'); + if (x === null && y === null && z === null) { + this.x = this.curve.zero; + this.y = this.curve.one; + this.z = this.curve.one; + this.t = this.curve.zero; + this.zOne = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = z ? new BN(z, 16) : this.curve.one; + this.t = t && new BN(t, 16); + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + if (this.t && !this.t.red) + this.t = this.t.toRed(this.curve.red); + this.zOne = this.z === this.curve.one; + + // Use extended coordinates + if (this.curve.extended && !this.t) { + this.t = this.x.redMul(this.y); + if (!this.zOne) + this.t = this.t.redMul(this.z.redInvm()); + } + } +} +inherits(Point, Base.BasePoint); + +EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) { + return Point.fromJSON(this, obj); +}; + +EdwardsCurve.prototype.point = function point(x, y, z, t) { + return new Point(this, x, y, z, t); +}; + +Point.fromJSON = function fromJSON(curve, obj) { + return new Point(curve, obj[0], obj[1], obj[2]); +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.x.cmpn(0) === 0 && + this.y.cmp(this.z) === 0; +}; + +Point.prototype._extDbl = function _extDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #doubling-dbl-2008-hwcd + // 4M + 4S + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = 2 * Z1^2 + var c = this.z.redSqr(); + c = c.redIAdd(c); + // D = a * A + var d = this.curve._mulA(a); + // E = (X1 + Y1)^2 - A - B + var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b); + // G = D + B + var g = d.redAdd(b); + // F = G - C + var f = g.redSub(c); + // H = D - B + var h = d.redSub(b); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projDbl = function _projDbl() { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #doubling-dbl-2008-bbjlp + // #doubling-dbl-2007-bl + // and others + // Generally 3M + 4S or 2M + 4S + + // B = (X1 + Y1)^2 + var b = this.x.redAdd(this.y).redSqr(); + // C = X1^2 + var c = this.x.redSqr(); + // D = Y1^2 + var d = this.y.redSqr(); + + var nx; + var ny; + var nz; + if (this.curve.twisted) { + // E = a * C + var e = this.curve._mulA(c); + // F = E + D + var f = e.redAdd(d); + if (this.zOne) { + // X3 = (B - C - D) * (F - 2) + nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F^2 - 2 * F + nz = f.redSqr().redSub(f).redSub(f); + } else { + // H = Z1^2 + var h = this.z.redSqr(); + // J = F - 2 * H + var j = f.redSub(h).redISub(h); + // X3 = (B-C-D)*J + nx = b.redSub(c).redISub(d).redMul(j); + // Y3 = F * (E - D) + ny = f.redMul(e.redSub(d)); + // Z3 = F * J + nz = f.redMul(j); + } + } else { + // E = C + D + var e = c.redAdd(d); + // H = (c * Z1)^2 + var h = this.curve._mulC(this.c.redMul(this.z)).redSqr(); + // J = E - 2 * H + var j = e.redSub(h).redSub(h); + // X3 = c * (B - E) * J + nx = this.curve._mulC(b.redISub(e)).redMul(j); + // Y3 = c * E * (C - D) + ny = this.curve._mulC(e).redMul(c.redISub(d)); + // Z3 = E * J + nz = e.redMul(j); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + // Double in extended coordinates + if (this.curve.extended) + return this._extDbl(); + else + return this._projDbl(); +}; + +Point.prototype._extAdd = function _extAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html + // #addition-add-2008-hwcd-3 + // 8M + + // A = (Y1 - X1) * (Y2 - X2) + var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x)); + // B = (Y1 + X1) * (Y2 + X2) + var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)); + // C = T1 * k * T2 + var c = this.t.redMul(this.curve.dd).redMul(p.t); + // D = Z1 * 2 * Z2 + var d = this.z.redMul(p.z.redAdd(p.z)); + // E = B - A + var e = b.redSub(a); + // F = D - C + var f = d.redSub(c); + // G = D + C + var g = d.redAdd(c); + // H = B + A + var h = b.redAdd(a); + // X3 = E * F + var nx = e.redMul(f); + // Y3 = G * H + var ny = g.redMul(h); + // T3 = E * H + var nt = e.redMul(h); + // Z3 = F * G + var nz = f.redMul(g); + return this.curve.point(nx, ny, nz, nt); +}; + +Point.prototype._projAdd = function _projAdd(p) { + // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html + // #addition-add-2008-bbjlp + // #addition-add-2007-bl + // 10M + 1S + + // A = Z1 * Z2 + var a = this.z.redMul(p.z); + // B = A^2 + var b = a.redSqr(); + // C = X1 * X2 + var c = this.x.redMul(p.x); + // D = Y1 * Y2 + var d = this.y.redMul(p.y); + // E = d * C * D + var e = this.curve.d.redMul(c).redMul(d); + // F = B - E + var f = b.redSub(e); + // G = B + E + var g = b.redAdd(e); + // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D) + var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d); + var nx = a.redMul(f).redMul(tmp); + var ny; + var nz; + if (this.curve.twisted) { + // Y3 = A * G * (D - a * C) + ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c))); + // Z3 = F * G + nz = f.redMul(g); + } else { + // Y3 = A * G * (D - C) + ny = a.redMul(g).redMul(d.redSub(c)); + // Z3 = c * F * G + nz = this.curve._mulC(f).redMul(g); + } + return this.curve.point(nx, ny, nz); +}; + +Point.prototype.add = function add(p) { + if (this.isInfinity()) + return p; + if (p.isInfinity()) + return this; + + if (this.curve.extended) + return this._extAdd(p); + else + return this._projAdd(p); +}; + +Point.prototype.mul = function mul(k) { + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) { + return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true); +}; + +Point.prototype.normalize = function normalize() { + if (this.zOne) + return this; + + // Normalize coordinates + var zi = this.z.redInvm(); + this.x = this.x.redMul(zi); + this.y = this.y.redMul(zi); + if (this.t) + this.t = this.t.redMul(zi); + this.z = this.curve.one; + this.zOne = true; + return this; +}; + +Point.prototype.neg = function neg() { + return this.curve.point(this.x.redNeg(), + this.y, + this.z, + this.t && this.t.redNeg()); +}; + +Point.prototype.getX = function getX() { + this.normalize(); + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + this.normalize(); + return this.y.fromRed(); +}; + +Point.prototype.eq = function eq(other) { + return this === other || + this.getX().cmp(other.getX()) === 0 && + this.getY().cmp(other.getY()) === 0; +}; + +Point.prototype.eqXToP = function eqXToP(x) { + var rx = x.toRed(this.curve.red).redMul(this.z); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(this.z); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + +// Compatibility with BaseCurve +Point.prototype.toP = Point.prototype.normalize; +Point.prototype.mixedAdd = Point.prototype.add; + +},{"../../elliptic":645,"../curve":648,"bn.js":66,"inherits":662}],648:[function(require,module,exports){ +arguments[4][551][0].apply(exports,arguments) +},{"./base":646,"./edwards":647,"./mont":649,"./short":650,"dup":551}],649:[function(require,module,exports){ +arguments[4][552][0].apply(exports,arguments) +},{"../../elliptic":645,"../curve":648,"bn.js":66,"dup":552,"inherits":662}],650:[function(require,module,exports){ +'use strict'; + +var curve = require('../curve'); +var elliptic = require('../../elliptic'); +var BN = require('bn.js'); +var inherits = require('inherits'); +var Base = curve.base; + +var assert = elliptic.utils.assert; + +function ShortCurve(conf) { + Base.call(this, 'short', conf); + + this.a = new BN(conf.a, 16).toRed(this.red); + this.b = new BN(conf.b, 16).toRed(this.red); + this.tinv = this.two.redInvm(); + + this.zeroA = this.a.fromRed().cmpn(0) === 0; + this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0; + + // If the curve is endomorphic, precalculate beta and lambda + this.endo = this._getEndomorphism(conf); + this._endoWnafT1 = new Array(4); + this._endoWnafT2 = new Array(4); +} +inherits(ShortCurve, Base); +module.exports = ShortCurve; + +ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) { + // No efficient endomorphism + if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1) + return; + + // Compute beta and lambda, that lambda * P = (beta * Px; Py) + var beta; + var lambda; + if (conf.beta) { + beta = new BN(conf.beta, 16).toRed(this.red); + } else { + var betas = this._getEndoRoots(this.p); + // Choose the smallest beta + beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1]; + beta = beta.toRed(this.red); + } + if (conf.lambda) { + lambda = new BN(conf.lambda, 16); + } else { + // Choose the lambda that is matching selected beta + var lambdas = this._getEndoRoots(this.n); + if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) { + lambda = lambdas[0]; + } else { + lambda = lambdas[1]; + assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0); + } + } + + // Get basis vectors, used for balanced length-two representation + var basis; + if (conf.basis) { + basis = conf.basis.map(function(vec) { + return { + a: new BN(vec.a, 16), + b: new BN(vec.b, 16) + }; + }); + } else { + basis = this._getEndoBasis(lambda); + } + + return { + beta: beta, + lambda: lambda, + basis: basis + }; +}; + +ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) { + // Find roots of for x^2 + x + 1 in F + // Root = (-1 +- Sqrt(-3)) / 2 + // + var red = num === this.p ? this.red : BN.mont(num); + var tinv = new BN(2).toRed(red).redInvm(); + var ntinv = tinv.redNeg(); + + var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv); + + var l1 = ntinv.redAdd(s).fromRed(); + var l2 = ntinv.redSub(s).fromRed(); + return [ l1, l2 ]; +}; + +ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) { + // aprxSqrt >= sqrt(this.n) + var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2)); + + // 3.74 + // Run EGCD, until r(L + 1) < aprxSqrt + var u = lambda; + var v = this.n.clone(); + var x1 = new BN(1); + var y1 = new BN(0); + var x2 = new BN(0); + var y2 = new BN(1); + + // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n) + var a0; + var b0; + // First vector + var a1; + var b1; + // Second vector + var a2; + var b2; + + var prevR; + var i = 0; + var r; + var x; + while (u.cmpn(0) !== 0) { + var q = v.div(u); + r = v.sub(q.mul(u)); + x = x2.sub(q.mul(x1)); + var y = y2.sub(q.mul(y1)); + + if (!a1 && r.cmp(aprxSqrt) < 0) { + a0 = prevR.neg(); + b0 = x1; + a1 = r.neg(); + b1 = x; + } else if (a1 && ++i === 2) { + break; + } + prevR = r; + + v = u; + u = r; + x2 = x1; + x1 = x; + y2 = y1; + y1 = y; + } + a2 = r.neg(); + b2 = x; + + var len1 = a1.sqr().add(b1.sqr()); + var len2 = a2.sqr().add(b2.sqr()); + if (len2.cmp(len1) >= 0) { + a2 = a0; + b2 = b0; + } + + // Normalize signs + if (a1.negative) { + a1 = a1.neg(); + b1 = b1.neg(); + } + if (a2.negative) { + a2 = a2.neg(); + b2 = b2.neg(); + } + + return [ + { a: a1, b: b1 }, + { a: a2, b: b2 } + ]; +}; + +ShortCurve.prototype._endoSplit = function _endoSplit(k) { + var basis = this.endo.basis; + var v1 = basis[0]; + var v2 = basis[1]; + + var c1 = v2.b.mul(k).divRound(this.n); + var c2 = v1.b.neg().mul(k).divRound(this.n); + + var p1 = c1.mul(v1.a); + var p2 = c2.mul(v2.a); + var q1 = c1.mul(v1.b); + var q2 = c2.mul(v2.b); + + // Calculate answer + var k1 = k.sub(p1).sub(p2); + var k2 = q1.add(q2).neg(); + return { k1: k1, k2: k2 }; +}; + +ShortCurve.prototype.pointFromX = function pointFromX(x, odd) { + x = new BN(x, 16); + if (!x.red) + x = x.toRed(this.red); + + var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b); + var y = y2.redSqrt(); + if (y.redSqr().redSub(y2).cmp(this.zero) !== 0) + throw new Error('invalid point'); + + // XXX Is there any way to tell if the number is odd without converting it + // to non-red form? + var isOdd = y.fromRed().isOdd(); + if (odd && !isOdd || !odd && isOdd) + y = y.redNeg(); + + return this.point(x, y); +}; + +ShortCurve.prototype.validate = function validate(point) { + if (point.inf) + return true; + + var x = point.x; + var y = point.y; + + var ax = this.a.redMul(x); + var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b); + return y.redSqr().redISub(rhs).cmpn(0) === 0; +}; + +ShortCurve.prototype._endoWnafMulAdd = + function _endoWnafMulAdd(points, coeffs, jacobianResult) { + var npoints = this._endoWnafT1; + var ncoeffs = this._endoWnafT2; + for (var i = 0; i < points.length; i++) { + var split = this._endoSplit(coeffs[i]); + var p = points[i]; + var beta = p._getBeta(); + + if (split.k1.negative) { + split.k1.ineg(); + p = p.neg(true); + } + if (split.k2.negative) { + split.k2.ineg(); + beta = beta.neg(true); + } + + npoints[i * 2] = p; + npoints[i * 2 + 1] = beta; + ncoeffs[i * 2] = split.k1; + ncoeffs[i * 2 + 1] = split.k2; + } + var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult); + + // Clean-up references to points and coefficients + for (var j = 0; j < i * 2; j++) { + npoints[j] = null; + ncoeffs[j] = null; + } + return res; +}; + +function Point(curve, x, y, isRed) { + Base.BasePoint.call(this, curve, 'affine'); + if (x === null && y === null) { + this.x = null; + this.y = null; + this.inf = true; + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + // Force redgomery representation when loading from JSON + if (isRed) { + this.x.forceRed(this.curve.red); + this.y.forceRed(this.curve.red); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + this.inf = false; + } +} +inherits(Point, Base.BasePoint); + +ShortCurve.prototype.point = function point(x, y, isRed) { + return new Point(this, x, y, isRed); +}; + +ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) { + return Point.fromJSON(this, obj, red); +}; + +Point.prototype._getBeta = function _getBeta() { + if (!this.curve.endo) + return; + + var pre = this.precomputed; + if (pre && pre.beta) + return pre.beta; + + var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); + if (pre) { + var curve = this.curve; + var endoMul = function(p) { + return curve.point(p.x.redMul(curve.endo.beta), p.y); + }; + pre.beta = beta; + beta.precomputed = { + beta: null, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(endoMul) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(endoMul) + } + }; + } + return beta; +}; + +Point.prototype.toJSON = function toJSON() { + if (!this.precomputed) + return [ this.x, this.y ]; + + return [ this.x, this.y, this.precomputed && { + doubles: this.precomputed.doubles && { + step: this.precomputed.doubles.step, + points: this.precomputed.doubles.points.slice(1) + }, + naf: this.precomputed.naf && { + wnd: this.precomputed.naf.wnd, + points: this.precomputed.naf.points.slice(1) + } + } ]; +}; + +Point.fromJSON = function fromJSON(curve, obj, red) { + if (typeof obj === 'string') + obj = JSON.parse(obj); + var res = curve.point(obj[0], obj[1], red); + if (!obj[2]) + return res; + + function obj2point(obj) { + return curve.point(obj[0], obj[1], red); + } + + var pre = obj[2]; + res.precomputed = { + beta: null, + doubles: pre.doubles && { + step: pre.doubles.step, + points: [ res ].concat(pre.doubles.points.map(obj2point)) + }, + naf: pre.naf && { + wnd: pre.naf.wnd, + points: [ res ].concat(pre.naf.points.map(obj2point)) + } + }; + return res; +}; + +Point.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +Point.prototype.isInfinity = function isInfinity() { + return this.inf; +}; + +Point.prototype.add = function add(p) { + // O + P = P + if (this.inf) + return p; + + // P + O = P + if (p.inf) + return this; + + // P + P = 2P + if (this.eq(p)) + return this.dbl(); + + // P + (-P) = O + if (this.neg().eq(p)) + return this.curve.point(null, null); + + // P + Q = O + if (this.x.cmp(p.x) === 0) + return this.curve.point(null, null); + + var c = this.y.redSub(p.y); + if (c.cmpn(0) !== 0) + c = c.redMul(this.x.redSub(p.x).redInvm()); + var nx = c.redSqr().redISub(this.x).redISub(p.x); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.dbl = function dbl() { + if (this.inf) + return this; + + // 2P = O + var ys1 = this.y.redAdd(this.y); + if (ys1.cmpn(0) === 0) + return this.curve.point(null, null); + + var a = this.curve.a; + + var x2 = this.x.redSqr(); + var dyinv = ys1.redInvm(); + var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv); + + var nx = c.redSqr().redISub(this.x.redAdd(this.x)); + var ny = c.redMul(this.x.redSub(nx)).redISub(this.y); + return this.curve.point(nx, ny); +}; + +Point.prototype.getX = function getX() { + return this.x.fromRed(); +}; + +Point.prototype.getY = function getY() { + return this.y.fromRed(); +}; + +Point.prototype.mul = function mul(k) { + k = new BN(k, 16); + + if (this._hasDoubles(k)) + return this.curve._fixedNafMul(this, k); + else if (this.curve.endo) + return this.curve._endoWnafMulAdd([ this ], [ k ]); + else + return this.curve._wnafMul(this, k); +}; + +Point.prototype.mulAdd = function mulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2); +}; + +Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) { + var points = [ this, p2 ]; + var coeffs = [ k1, k2 ]; + if (this.curve.endo) + return this.curve._endoWnafMulAdd(points, coeffs, true); + else + return this.curve._wnafMulAdd(1, points, coeffs, 2, true); +}; + +Point.prototype.eq = function eq(p) { + return this === p || + this.inf === p.inf && + (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0); +}; + +Point.prototype.neg = function neg(_precompute) { + if (this.inf) + return this; + + var res = this.curve.point(this.x, this.y.redNeg()); + if (_precompute && this.precomputed) { + var pre = this.precomputed; + var negate = function(p) { + return p.neg(); + }; + res.precomputed = { + naf: pre.naf && { + wnd: pre.naf.wnd, + points: pre.naf.points.map(negate) + }, + doubles: pre.doubles && { + step: pre.doubles.step, + points: pre.doubles.points.map(negate) + } + }; + } + return res; +}; + +Point.prototype.toJ = function toJ() { + if (this.inf) + return this.curve.jpoint(null, null, null); + + var res = this.curve.jpoint(this.x, this.y, this.curve.one); + return res; +}; + +function JPoint(curve, x, y, z) { + Base.BasePoint.call(this, curve, 'jacobian'); + if (x === null && y === null && z === null) { + this.x = this.curve.one; + this.y = this.curve.one; + this.z = new BN(0); + } else { + this.x = new BN(x, 16); + this.y = new BN(y, 16); + this.z = new BN(z, 16); + } + if (!this.x.red) + this.x = this.x.toRed(this.curve.red); + if (!this.y.red) + this.y = this.y.toRed(this.curve.red); + if (!this.z.red) + this.z = this.z.toRed(this.curve.red); + + this.zOne = this.z === this.curve.one; +} +inherits(JPoint, Base.BasePoint); + +ShortCurve.prototype.jpoint = function jpoint(x, y, z) { + return new JPoint(this, x, y, z); +}; + +JPoint.prototype.toP = function toP() { + if (this.isInfinity()) + return this.curve.point(null, null); + + var zinv = this.z.redInvm(); + var zinv2 = zinv.redSqr(); + var ax = this.x.redMul(zinv2); + var ay = this.y.redMul(zinv2).redMul(zinv); + + return this.curve.point(ax, ay); +}; + +JPoint.prototype.neg = function neg() { + return this.curve.jpoint(this.x, this.y.redNeg(), this.z); +}; + +JPoint.prototype.add = function add(p) { + // O + P = P + if (this.isInfinity()) + return p; + + // P + O = P + if (p.isInfinity()) + return this; + + // 12M + 4S + 7A + var pz2 = p.z.redSqr(); + var z2 = this.z.redSqr(); + var u1 = this.x.redMul(pz2); + var u2 = p.x.redMul(z2); + var s1 = this.y.redMul(pz2.redMul(p.z)); + var s2 = p.y.redMul(z2.redMul(this.z)); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(p.z).redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mixedAdd = function mixedAdd(p) { + // O + P = P + if (this.isInfinity()) + return p.toJ(); + + // P + O = P + if (p.isInfinity()) + return this; + + // 8M + 3S + 7A + var z2 = this.z.redSqr(); + var u1 = this.x; + var u2 = p.x.redMul(z2); + var s1 = this.y; + var s2 = p.y.redMul(z2).redMul(this.z); + + var h = u1.redSub(u2); + var r = s1.redSub(s2); + if (h.cmpn(0) === 0) { + if (r.cmpn(0) !== 0) + return this.curve.jpoint(null, null, null); + else + return this.dbl(); + } + + var h2 = h.redSqr(); + var h3 = h2.redMul(h); + var v = u1.redMul(h2); + + var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v); + var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)); + var nz = this.z.redMul(h); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.dblp = function dblp(pow) { + if (pow === 0) + return this; + if (this.isInfinity()) + return this; + if (!pow) + return this.dbl(); + + if (this.curve.zeroA || this.curve.threeA) { + var r = this; + for (var i = 0; i < pow; i++) + r = r.dbl(); + return r; + } + + // 1M + 2S + 1A + N * (4S + 5M + 8A) + // N = 1 => 6M + 6S + 9A + var a = this.curve.a; + var tinv = this.curve.tinv; + + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + // Reuse results + var jyd = jy.redAdd(jy); + for (var i = 0; i < pow; i++) { + var jx2 = jx.redSqr(); + var jyd2 = jyd.redSqr(); + var jyd4 = jyd2.redSqr(); + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var t1 = jx.redMul(jyd2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + var dny = c.redMul(t2); + dny = dny.redIAdd(dny).redISub(jyd4); + var nz = jyd.redMul(jz); + if (i + 1 < pow) + jz4 = jz4.redMul(jyd4); + + jx = nx; + jz = nz; + jyd = dny; + } + + return this.curve.jpoint(jx, jyd.redMul(tinv), jz); +}; + +JPoint.prototype.dbl = function dbl() { + if (this.isInfinity()) + return this; + + if (this.curve.zeroA) + return this._zeroDbl(); + else if (this.curve.threeA) + return this._threeDbl(); + else + return this._dbl(); +}; + +JPoint.prototype._zeroDbl = function _zeroDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 14A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // T = M ^ 2 - 2*S + var t = m.redSqr().redISub(s).redISub(s); + + // 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2*Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html + // #doubling-dbl-2009-l + // 2M + 5S + 13A + + // A = X1^2 + var a = this.x.redSqr(); + // B = Y1^2 + var b = this.y.redSqr(); + // C = B^2 + var c = b.redSqr(); + // D = 2 * ((X1 + B)^2 - A - C) + var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c); + d = d.redIAdd(d); + // E = 3 * A + var e = a.redAdd(a).redIAdd(a); + // F = E^2 + var f = e.redSqr(); + + // 8 * C + var c8 = c.redIAdd(c); + c8 = c8.redIAdd(c8); + c8 = c8.redIAdd(c8); + + // X3 = F - 2 * D + nx = f.redISub(d).redISub(d); + // Y3 = E * (D - X3) - 8 * C + ny = e.redMul(d.redISub(nx)).redISub(c8); + // Z3 = 2 * Y1 * Z1 + nz = this.y.redMul(this.z); + nz = nz.redIAdd(nz); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._threeDbl = function _threeDbl() { + var nx; + var ny; + var nz; + // Z = 1 + if (this.zOne) { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html + // #doubling-mdbl-2007-bl + // 1M + 5S + 15A + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // S = 2 * ((X1 + YY)^2 - XX - YYYY) + var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + s = s.redIAdd(s); + // M = 3 * XX + a + var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a); + // T = M^2 - 2 * S + var t = m.redSqr().redISub(s).redISub(s); + // X3 = T + nx = t; + // Y3 = M * (S - T) - 8 * YYYY + var yyyy8 = yyyy.redIAdd(yyyy); + yyyy8 = yyyy8.redIAdd(yyyy8); + yyyy8 = yyyy8.redIAdd(yyyy8); + ny = m.redMul(s.redISub(t)).redISub(yyyy8); + // Z3 = 2 * Y1 + nz = this.y.redAdd(this.y); + } else { + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b + // 3M + 5S + + // delta = Z1^2 + var delta = this.z.redSqr(); + // gamma = Y1^2 + var gamma = this.y.redSqr(); + // beta = X1 * gamma + var beta = this.x.redMul(gamma); + // alpha = 3 * (X1 - delta) * (X1 + delta) + var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta)); + alpha = alpha.redAdd(alpha).redIAdd(alpha); + // X3 = alpha^2 - 8 * beta + var beta4 = beta.redIAdd(beta); + beta4 = beta4.redIAdd(beta4); + var beta8 = beta4.redAdd(beta4); + nx = alpha.redSqr().redISub(beta8); + // Z3 = (Y1 + Z1)^2 - gamma - delta + nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta); + // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2 + var ggamma8 = gamma.redSqr(); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ggamma8 = ggamma8.redIAdd(ggamma8); + ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8); + } + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype._dbl = function _dbl() { + var a = this.curve.a; + + // 4M + 6S + 10A + var jx = this.x; + var jy = this.y; + var jz = this.z; + var jz4 = jz.redSqr().redSqr(); + + var jx2 = jx.redSqr(); + var jy2 = jy.redSqr(); + + var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4)); + + var jxd4 = jx.redAdd(jx); + jxd4 = jxd4.redIAdd(jxd4); + var t1 = jxd4.redMul(jy2); + var nx = c.redSqr().redISub(t1.redAdd(t1)); + var t2 = t1.redISub(nx); + + var jyd8 = jy2.redSqr(); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + jyd8 = jyd8.redIAdd(jyd8); + var ny = c.redMul(t2).redISub(jyd8); + var nz = jy.redAdd(jy).redMul(jz); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.trpl = function trpl() { + if (!this.curve.zeroA) + return this.dbl().add(this); + + // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl + // 5M + 10S + ... + + // XX = X1^2 + var xx = this.x.redSqr(); + // YY = Y1^2 + var yy = this.y.redSqr(); + // ZZ = Z1^2 + var zz = this.z.redSqr(); + // YYYY = YY^2 + var yyyy = yy.redSqr(); + // M = 3 * XX + a * ZZ2; a = 0 + var m = xx.redAdd(xx).redIAdd(xx); + // MM = M^2 + var mm = m.redSqr(); + // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM + var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy); + e = e.redIAdd(e); + e = e.redAdd(e).redIAdd(e); + e = e.redISub(mm); + // EE = E^2 + var ee = e.redSqr(); + // T = 16*YYYY + var t = yyyy.redIAdd(yyyy); + t = t.redIAdd(t); + t = t.redIAdd(t); + t = t.redIAdd(t); + // U = (M + E)^2 - MM - EE - T + var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t); + // X3 = 4 * (X1 * EE - 4 * YY * U) + var yyu4 = yy.redMul(u); + yyu4 = yyu4.redIAdd(yyu4); + yyu4 = yyu4.redIAdd(yyu4); + var nx = this.x.redMul(ee).redISub(yyu4); + nx = nx.redIAdd(nx); + nx = nx.redIAdd(nx); + // Y3 = 8 * Y1 * (U * (T - U) - E * EE) + var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee))); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + ny = ny.redIAdd(ny); + // Z3 = (Z1 + E)^2 - ZZ - EE + var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee); + + return this.curve.jpoint(nx, ny, nz); +}; + +JPoint.prototype.mul = function mul(k, kbase) { + k = new BN(k, kbase); + + return this.curve._wnafMul(this, k); +}; + +JPoint.prototype.eq = function eq(p) { + if (p.type === 'affine') + return this.eq(p.toJ()); + + if (this === p) + return true; + + // x1 * z2^2 == x2 * z1^2 + var z2 = this.z.redSqr(); + var pz2 = p.z.redSqr(); + if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0) + return false; + + // y1 * z2^3 == y2 * z1^3 + var z3 = z2.redMul(this.z); + var pz3 = pz2.redMul(p.z); + return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0; +}; + +JPoint.prototype.eqXToP = function eqXToP(x) { + var zs = this.z.redSqr(); + var rx = x.toRed(this.curve.red).redMul(zs); + if (this.x.cmp(rx) === 0) + return true; + + var xc = x.clone(); + var t = this.curve.redN.redMul(zs); + for (;;) { + xc.iadd(this.curve.n); + if (xc.cmp(this.curve.p) >= 0) + return false; + + rx.redIAdd(t); + if (this.x.cmp(rx) === 0) + return true; + } + return false; +}; + +JPoint.prototype.inspect = function inspect() { + if (this.isInfinity()) + return ''; + return ''; +}; + +JPoint.prototype.isInfinity = function isInfinity() { + // XXX This code assumes that zero is always zero in red + return this.z.cmpn(0) === 0; +}; + +},{"../../elliptic":645,"../curve":648,"bn.js":66,"inherits":662}],651:[function(require,module,exports){ +arguments[4][554][0].apply(exports,arguments) +},{"../elliptic":645,"./precomputed/secp256k1":659,"dup":554,"hash.js":803}],652:[function(require,module,exports){ +'use strict'; + +var BN = require('bn.js'); +var elliptic = require('../../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +var KeyPair = require('./key'); +var Signature = require('./signature'); + +function EC(options) { + if (!(this instanceof EC)) + return new EC(options); + + // Shortcut `elliptic.ec(curve-name)` + if (typeof options === 'string') { + assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options); + + options = elliptic.curves[options]; + } + + // Shortcut for `elliptic.ec(elliptic.curves.curveName)` + if (options instanceof elliptic.curves.PresetCurve) + options = { curve: options }; + + this.curve = options.curve.curve; + this.n = this.curve.n; + this.nh = this.n.ushrn(1); + this.g = this.curve.g; + + // Point on curve + this.g = options.curve.g; + this.g.precompute(options.curve.n.bitLength() + 1); + + // Hash for function for DRBG + this.hash = options.hash || options.curve.hash; +} +module.exports = EC; + +EC.prototype.keyPair = function keyPair(options) { + return new KeyPair(this, options); +}; + +EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) { + return KeyPair.fromPrivate(this, priv, enc); +}; + +EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) { + return KeyPair.fromPublic(this, pub, enc); +}; + +EC.prototype.genKeyPair = function genKeyPair(options) { + if (!options) + options = {}; + + // Instantiate Hmac_DRBG + var drbg = new elliptic.hmacDRBG({ + hash: this.hash, + pers: options.pers, + entropy: options.entropy || elliptic.rand(this.hash.hmacStrength), + nonce: this.n.toArray() + }); + + var bytes = this.n.byteLength(); + var ns2 = this.n.sub(new BN(2)); + do { + var priv = new BN(drbg.generate(bytes)); + if (priv.cmp(ns2) > 0) + continue; + + priv.iaddn(1); + return this.keyFromPrivate(priv); + } while (true); +}; + +EC.prototype._truncateToN = function truncateToN(msg, truncOnly) { + var delta = msg.byteLength() * 8 - this.n.bitLength(); + if (delta > 0) + msg = msg.ushrn(delta); + if (!truncOnly && msg.cmp(this.n) >= 0) + return msg.sub(this.n); + else + return msg; +}; + +EC.prototype.sign = function sign(msg, key, enc, options) { + if (typeof enc === 'object') { + options = enc; + enc = null; + } + if (!options) + options = {}; + + key = this.keyFromPrivate(key, enc); + msg = this._truncateToN(new BN(msg, 16)); + + // Zero-extend key to provide enough entropy + var bytes = this.n.byteLength(); + var bkey = key.getPrivate().toArray('be', bytes); + + // Zero-extend nonce to have the same byte size as N + var nonce = msg.toArray('be', bytes); + + // Instantiate Hmac_DRBG + var drbg = new elliptic.hmacDRBG({ + hash: this.hash, + entropy: bkey, + nonce: nonce, + pers: options.pers, + persEnc: options.persEnc + }); + + // Number of bytes to generate + var ns1 = this.n.sub(new BN(1)); + + for (var iter = 0; true; iter++) { + var k = options.k ? + options.k(iter) : + new BN(drbg.generate(this.n.byteLength())); + k = this._truncateToN(k, true); + if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0) + continue; + + var kp = this.g.mul(k); + if (kp.isInfinity()) + continue; + + var kpX = kp.getX(); + var r = kpX.umod(this.n); + if (r.cmpn(0) === 0) + continue; + + var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg)); + s = s.umod(this.n); + if (s.cmpn(0) === 0) + continue; + + var recoveryParam = (kp.getY().isOdd() ? 1 : 0) | + (kpX.cmp(r) !== 0 ? 2 : 0); + + // Use complement of `s`, if it is > `n / 2` + if (options.canonical && s.cmp(this.nh) > 0) { + s = this.n.sub(s); + recoveryParam ^= 1; + } + + return new Signature({ r: r, s: s, recoveryParam: recoveryParam }); + } +}; + +EC.prototype.verify = function verify(msg, signature, key, enc) { + msg = this._truncateToN(new BN(msg, 16)); + key = this.keyFromPublic(key, enc); + signature = new Signature(signature, 'hex'); + + // Perform primitive values validation + var r = signature.r; + var s = signature.s; + if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0) + return false; + if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) + return false; + + // Validate signature + var sinv = s.invm(this.n); + var u1 = sinv.mul(msg).umod(this.n); + var u2 = sinv.mul(r).umod(this.n); + + if (!this.curve._maxwellTrick) { + var p = this.g.mulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + return p.getX().umod(this.n).cmp(r) === 0; + } + + // NOTE: Greg Maxwell's trick, inspired by: + // https://git.io/vad3K + + var p = this.g.jmulAdd(u1, key.getPublic(), u2); + if (p.isInfinity()) + return false; + + // Compare `p.x` of Jacobian point with `r`, + // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the + // inverse of `p.z^2` + return p.eqXToP(r); +}; + +EC.prototype.recoverPubKey = function(msg, signature, j, enc) { + assert((3 & j) === j, 'The recovery param is more than two bits'); + signature = new Signature(signature, enc); + + var n = this.n; + var e = new BN(msg); + var r = signature.r; + var s = signature.s; + + // A set LSB signifies that the y-coordinate is odd + var isYOdd = j & 1; + var isSecondKey = j >> 1; + if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey) + throw new Error('Unable to find sencond key candinate'); + + // 1.1. Let x = r + jn. + if (isSecondKey) + r = this.curve.pointFromX(r.add(this.curve.n), isYOdd); + else + r = this.curve.pointFromX(r, isYOdd); + + var rInv = signature.r.invm(n); + var s1 = n.sub(e).mul(rInv).umod(n); + var s2 = s.mul(rInv).umod(n); + + // 1.6.1 Compute Q = r^-1 (sR - eG) + // Q = r^-1 (sR + -eG) + return this.g.mulAdd(s1, r, s2); +}; + +EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { + signature = new Signature(signature, enc); + if (signature.recoveryParam !== null) + return signature.recoveryParam; + + for (var i = 0; i < 4; i++) { + var Qprime; + try { + Qprime = this.recoverPubKey(e, signature, i); + } catch (e) { + continue; + } + + if (Qprime.eq(Q)) + return i; + } + throw new Error('Unable to find valid recovery factor'); +}; + +},{"../../elliptic":645,"./key":653,"./signature":654,"bn.js":66}],653:[function(require,module,exports){ +arguments[4][556][0].apply(exports,arguments) +},{"../../elliptic":645,"bn.js":66,"dup":556}],654:[function(require,module,exports){ +arguments[4][557][0].apply(exports,arguments) +},{"../../elliptic":645,"bn.js":66,"dup":557}],655:[function(require,module,exports){ +arguments[4][558][0].apply(exports,arguments) +},{"../../elliptic":645,"./key":656,"./signature":657,"dup":558,"hash.js":803}],656:[function(require,module,exports){ +arguments[4][559][0].apply(exports,arguments) +},{"../../elliptic":645,"dup":559}],657:[function(require,module,exports){ +arguments[4][560][0].apply(exports,arguments) +},{"../../elliptic":645,"bn.js":66,"dup":560}],658:[function(require,module,exports){ +'use strict'; + +var hash = require('hash.js'); +var elliptic = require('../elliptic'); +var utils = elliptic.utils; +var assert = utils.assert; + +function HmacDRBG(options) { + if (!(this instanceof HmacDRBG)) + return new HmacDRBG(options); + this.hash = options.hash; + this.predResist = !!options.predResist; + + this.outLen = this.hash.outSize; + this.minEntropy = options.minEntropy || this.hash.hmacStrength; + + this.reseed = null; + this.reseedInterval = null; + this.K = null; + this.V = null; + + var entropy = utils.toArray(options.entropy, options.entropyEnc); + var nonce = utils.toArray(options.nonce, options.nonceEnc); + var pers = utils.toArray(options.pers, options.persEnc); + assert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + this._init(entropy, nonce, pers); +} +module.exports = HmacDRBG; + +HmacDRBG.prototype._init = function init(entropy, nonce, pers) { + var seed = entropy.concat(nonce).concat(pers); + + this.K = new Array(this.outLen / 8); + this.V = new Array(this.outLen / 8); + for (var i = 0; i < this.V.length; i++) { + this.K[i] = 0x00; + this.V[i] = 0x01; + } + + this._update(seed); + this.reseed = 1; + this.reseedInterval = 0x1000000000000; // 2^48 +}; + +HmacDRBG.prototype._hmac = function hmac() { + return new hash.hmac(this.hash, this.K); +}; + +HmacDRBG.prototype._update = function update(seed) { + var kmac = this._hmac() + .update(this.V) + .update([ 0x00 ]); + if (seed) + kmac = kmac.update(seed); + this.K = kmac.digest(); + this.V = this._hmac().update(this.V).digest(); + if (!seed) + return; + + this.K = this._hmac() + .update(this.V) + .update([ 0x01 ]) + .update(seed) + .digest(); + this.V = this._hmac().update(this.V).digest(); +}; + +HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) { + // Optional entropy enc + if (typeof entropyEnc !== 'string') { + addEnc = add; + add = entropyEnc; + entropyEnc = null; + } + + entropy = utils.toBuffer(entropy, entropyEnc); + add = utils.toBuffer(add, addEnc); + + assert(entropy.length >= (this.minEntropy / 8), + 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'); + + this._update(entropy.concat(add || [])); + this.reseed = 1; +}; + +HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { + if (this.reseed > this.reseedInterval) + throw new Error('Reseed is required'); + + // Optional encoding + if (typeof enc !== 'string') { + addEnc = add; + add = enc; + enc = null; + } + + // Optional additional data + if (add) { + add = utils.toArray(add, addEnc); + this._update(add); + } + + var temp = []; + while (temp.length < len) { + this.V = this._hmac().update(this.V).digest(); + temp = temp.concat(this.V); + } + + var res = temp.slice(0, len); + this._update(add); + this.reseed++; + return utils.encode(res, enc); +}; + +},{"../elliptic":645,"hash.js":803}],659:[function(require,module,exports){ +arguments[4][561][0].apply(exports,arguments) +},{"dup":561}],660:[function(require,module,exports){ +'use strict'; + +var utils = exports; +var BN = require('bn.js'); + +utils.assert = function assert(val, msg) { + if (!val) + throw new Error(msg || 'Assertion failed'); +}; + +function toArray(msg, enc) { + if (Array.isArray(msg)) + return msg.slice(); + if (!msg) + return []; + var res = []; + if (typeof msg !== 'string') { + for (var i = 0; i < msg.length; i++) + res[i] = msg[i] | 0; + return res; + } + if (!enc) { + for (var i = 0; i < msg.length; i++) { + var c = msg.charCodeAt(i); + var hi = c >> 8; + var lo = c & 0xff; + if (hi) + res.push(hi, lo); + else + res.push(lo); + } + } else if (enc === 'hex') { + msg = msg.replace(/[^a-z0-9]+/ig, ''); + if (msg.length % 2 !== 0) + msg = '0' + msg; + for (var i = 0; i < msg.length; i += 2) + res.push(parseInt(msg[i] + msg[i + 1], 16)); + } + return res; +} +utils.toArray = toArray; + +function zero2(word) { + if (word.length === 1) + return '0' + word; + else + return word; +} +utils.zero2 = zero2; + +function toHex(msg) { + var res = ''; + for (var i = 0; i < msg.length; i++) + res += zero2(msg[i].toString(16)); + return res; +} +utils.toHex = toHex; + +utils.encode = function encode(arr, enc) { + if (enc === 'hex') + return toHex(arr); + else + return arr; +}; + +// Represent num in a w-NAF form +function getNAF(num, w) { + var naf = []; + var ws = 1 << (w + 1); + var k = num.clone(); + while (k.cmpn(1) >= 0) { + var z; + if (k.isOdd()) { + var mod = k.andln(ws - 1); + if (mod > (ws >> 1) - 1) + z = (ws >> 1) - mod; + else + z = mod; + k.isubn(z); + } else { + z = 0; + } + naf.push(z); + + // Optimization, shift by word if possible + var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1; + for (var i = 1; i < shift; i++) + naf.push(0); + k.iushrn(shift); + } + + return naf; +} +utils.getNAF = getNAF; + +// Represent k1, k2 in a Joint Sparse Form +function getJSF(k1, k2) { + var jsf = [ + [], + [] + ]; + + k1 = k1.clone(); + k2 = k2.clone(); + var d1 = 0; + var d2 = 0; + while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) { + + // First phase + var m14 = (k1.andln(3) + d1) & 3; + var m24 = (k2.andln(3) + d2) & 3; + if (m14 === 3) + m14 = -1; + if (m24 === 3) + m24 = -1; + var u1; + if ((m14 & 1) === 0) { + u1 = 0; + } else { + var m8 = (k1.andln(7) + d1) & 7; + if ((m8 === 3 || m8 === 5) && m24 === 2) + u1 = -m14; + else + u1 = m14; + } + jsf[0].push(u1); + + var u2; + if ((m24 & 1) === 0) { + u2 = 0; + } else { + var m8 = (k2.andln(7) + d2) & 7; + if ((m8 === 3 || m8 === 5) && m14 === 2) + u2 = -m24; + else + u2 = m24; + } + jsf[1].push(u2); + + // Second phase + if (2 * d1 === u1 + 1) + d1 = 1 - d1; + if (2 * d2 === u2 + 1) + d2 = 1 - d2; + k1.iushrn(1); + k2.iushrn(1); + } + + return jsf; +} +utils.getJSF = getJSF; + +function cachedProperty(obj, name, computer) { + var key = '_' + name; + obj.prototype[name] = function cachedProperty() { + return this[key] !== undefined ? this[key] : + this[key] = computer.call(this); + }; +} +utils.cachedProperty = cachedProperty; + +function parseBytes(bytes) { + return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') : + bytes; +} +utils.parseBytes = parseBytes; + +function intFromLE(bytes) { + return new BN(bytes, 'hex', 'le'); +} +utils.intFromLE = intFromLE; + + +},{"bn.js":66}],661:[function(require,module,exports){ +module.exports={ + "_args": [ + [ + "elliptic@6.3.3", + "/home/yann/Remix/remix-ide" + ] + ], + "_development": true, + "_from": "elliptic@6.3.3", + "_id": "elliptic@6.3.3", + "_inBundle": false, + "_integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "_location": "/ethers/elliptic", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "elliptic@6.3.3", + "name": "elliptic", + "escapedName": "elliptic", + "rawSpec": "6.3.3", + "saveSpec": null, + "fetchSpec": "6.3.3" + }, + "_requiredBy": [ + "/ethers" + ], + "_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "_spec": "6.3.3", + "_where": "/home/yann/Remix/remix-ide", + "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", + "inherits": "^2.0.1" + }, + "description": "EC cryptography", + "devDependencies": { + "brfs": "^1.4.3", + "coveralls": "^2.11.3", + "grunt": "^0.4.5", + "grunt-browserify": "^5.0.0", + "grunt-cli": "^1.2.0", + "grunt-contrib-connect": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-uglify": "^1.0.1", + "grunt-mocha-istanbul": "^3.0.1", + "grunt-saucelabs": "^8.6.2", + "istanbul": "^0.4.2", + "jscs": "^2.9.0", + "jshint": "^2.6.0", + "mocha": "^2.1.0" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/indutny/elliptic", + "keywords": [ + "EC", + "Elliptic", + "curve", + "Cryptography" + ], + "license": "MIT", + "main": "lib/elliptic.js", + "name": "elliptic", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/indutny/elliptic.git" + }, + "scripts": { + "jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js", + "lint": "npm run jscs && npm run jshint", + "test": "npm run lint && npm run unit", + "unit": "istanbul test _mocha --reporter=spec test/index.js", + "version": "grunt dist && git add dist/" + }, + "version": "6.3.3" +} + +},{}],662:[function(require,module,exports){ +arguments[4][36][0].apply(exports,arguments) +},{"dup":36}],663:[function(require,module,exports){ +arguments[4][580][0].apply(exports,arguments) +},{"_process":109,"dup":580}],664:[function(require,module,exports){ +(function (process,global,clearImmediate){ +(function (global, undefined) { + "use strict"; + + if (global.setImmediate) { + return; + } + + var nextHandle = 1; // Spec says greater than zero + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global.document; + var setImmediate; + + function addFromSetImmediateArguments(args) { + tasksByHandle[nextHandle] = partiallyApplied.apply(undefined, args); + return nextHandle++; + } + + // This function accepts the same arguments as setImmediate, but + // returns a function that requires no arguments. + function partiallyApplied(handler) { + var args = [].slice.call(arguments, 1); + return function() { + if (typeof handler === "function") { + handler.apply(undefined, args); + } else { + (new Function("" + handler))(); + } + }; + } + + function runIfPresent(handle) { + // From the spec: "Wait until any invocations of this algorithm started before this one have completed." + // So if we're currently running a task, we'll need to delay this invocation. + if (currentlyRunningATask) { + // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a + // "too much recursion" error. + setTimeout(partiallyApplied(runIfPresent, handle), 0); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + task(); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } + + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } + + function installNextTickImplementation() { + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + process.nextTick(partiallyApplied(runIfPresent, handle)); + return handle; + }; + } + + function canUsePostMessage() { + // The test against `importScripts` prevents this implementation from being installed inside a web worker, + // where `global.postMessage` means something completely different and can't be used for this purpose. + if (global.postMessage && !global.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global.onmessage; + global.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global.postMessage("", "*"); + global.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } + + function installPostMessageImplementation() { + // Installs an event handler on `global` for the `message` event: see + // * https://developer.mozilla.org/en/DOM/window.postMessage + // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages + + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global && + typeof event.data === "string" && + event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; + + if (global.addEventListener) { + global.addEventListener("message", onGlobalMessage, false); + } else { + global.attachEvent("onmessage", onGlobalMessage); + } + + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + global.postMessage(messagePrefix + handle, "*"); + return handle; + }; + } + + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; + + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + channel.port2.postMessage(handle); + return handle; + }; + } + + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + setImmediate = function() { + var handle = addFromSetImmediateArguments(arguments); + // Create a + + + + + + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000000..edf7247913 --- /dev/null +++ b/manifest.json @@ -0,0 +1,31 @@ +{ + "name": "Solidity", + "description": "Realtime compiler and runtime", + "update_url": "https://remix.ethereum.org", + "version": "1.1", + "manifest_version": 2, + "background": { + "scripts": ["background.js"], + "persistent": true + }, + + "icons": { + "32": "icon.png" + }, + + "browser_action": { + "default_icon": "icon.png" + }, + + "permissions": [ + "storage", + "tabs", + "activeTab", + "https://ajax.googleapis.com/", + "webRequest", + "webRequestBlocking", + "" + ], + + "content_security_policy": "script-src 'self' https://solc-bin.ethereum.org/; object-src 'self'" +} diff --git a/meetings.md b/meetings.md new file mode 100644 index 0000000000..ec606da328 --- /dev/null +++ b/meetings.md @@ -0,0 +1,105 @@ +# Team meeting 04/06/2019 + +## documentation + +#### doc update for release + +For each remix IDE PR, check whether the documentation needs to be updated. +If so, either + - update the doc with and link to the PR + - create an issue with the label "documentation" + +Before releasing (better a few days before), we take time to address documentation issues that *needs* to be done. @rob is committing to checking and organize our work on this. + +#### monthly doc update + +We setup a monthly call where we read through the documentation and check what should be added / updated / improved + +#### move to remix IDE + +we move the documentation to the remix-ide repository + +## medium post policy + +Any post that relates to Ethereum could be put in the remix plublication. +Although that is not mandatory and left up to the writter. + +## guided tour + +we still need to validate the framework but "shepherd" seems to be the one. + +It will work as a native plugin, started by default. +Each other native plugin can request a guided tour with: +`this.call('guidedtour', 'start', 'debugger')` +Other type of plugin may be able to the native plugin guided tour but we won't push this if the integration is not working out of the box. +We rather update the remix-plugin doc saying that `guided tour framework name` is the prefferred one. + +## web site + +we commit to have a public web site for general info about us. +It won't be a branded web site. +We are asking a designer for improving the Liana's logo. +We don't need to have a framework (hugo, hexo) if that's too much overhead. +@liana is testing out the easiest solution. + +## solidity tutorial framework + +it will be set of file: + - md + - solidity contract + - test contract + +we only support md for now and move to supporting other format if needded. +It requires the "test" native plugin to extend its API. +@rob/@francois are managing that. + +## remix workshops repository + +the current workshop should either be removed or converted to the md tutorial framework. +@rob/@francois are managing that + + +## coding best practices + +Use html "id" only if needed. +"id" has to be explicit enough so the node can be targeted without using nested css target. + +## file manager / file explorer / file provider + +They are going to be refactored out to a stand alone ts repo / npm module + +## npm module structure + +will likely looks like: + +RemixProject/component: +/Treeview +/tab +/tabs +/dialog +/fs + +RemixProject/libs: +/Solidity +/Tests +/FsProvider + +RemixProject/IDE + +## browser test + +a PR (https://github.com/ethereum/remix-ide/pull/1961) is waiting for merging @yann +It iwll be followed by other PRs, aiming to improve process of writting browser tests. + +## desktop version + +we will propose an offline version using electron (@yann) +first steps : +- put all the public link to the local package +- basic electron wrapper + +## out reach beyond community + +We agree it is something interesting to explore, +It is not 100% dev tool nor remix so we should organize call with other people from EF at least + diff --git a/nightwatch.js b/nightwatch.js new file mode 100644 index 0000000000..42e15ba9d6 --- /dev/null +++ b/nightwatch.js @@ -0,0 +1,84 @@ +'use strict' +require('@babel/register')() + +const crxFile = require('fs').readFileSync('./test-browser/extensions/chrome/metamask.crx') +const metamaskExtension = new Buffer.from(crxFile).toString('base64') // eslint-disable-line + +module.exports = { + 'src_folders': ['test-browser/tests'], + 'output_folder': './reports/tests', + 'custom_commands_path': ['test-browser/commands'], + 'custom_assertions_path': '', + 'page_objects_path': '', + 'globals_path': '', + + 'test_settings': { + 'default': { + 'selenium_port': 4444, + 'selenium_host': 'localhost', + 'globals': { + 'waitForConditionTimeout': 10000, + 'asyncHookTimeout': 100000 + }, + 'screenshots': { + 'enabled': true, + 'path': './reports/screenshots', + 'on_failure': true, + 'on_error': true + }, + 'desiredCapabilities': { + 'browserName': 'firefox', + 'javascriptEnabled': true, + 'acceptSslCerts': true + }, + 'exclude': ['./test-browser/tests/runAndDeploy.js'] + }, + + 'chrome': { + 'desiredCapabilities': { + 'browserName': 'chrome', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'goog:chromeOptions': { + 'args': ['window-size=2560,1440', 'start-fullscreen'] + } + } + }, + + 'chrome-runAndDeploy': { + 'desiredCapabilities': { + 'browserName': 'chrome', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'goog:chromeOptions': { + 'args': ['window-size=2560,1440', 'start-fullscreen'], + 'extensions': [metamaskExtension] + } + } + }, + + 'safari': { + 'desiredCapabilities': { + 'browserName': 'safari', + 'javascriptEnabled': true, + 'acceptSslCerts': true + } + }, + + 'ie': { + 'desiredCapabilities': { + 'browserName': 'internet explorer', + 'javascriptEnabled': true, + 'acceptSslCerts': true + } + }, + + 'firefox': { + 'desiredCapabilities': { + 'browserName': 'firefox', + 'javascriptEnabled': true, + 'acceptSslCerts': true + } + } + } +} diff --git a/nightwatch_debugger.js b/nightwatch_debugger.js new file mode 100644 index 0000000000..84c899d99c --- /dev/null +++ b/nightwatch_debugger.js @@ -0,0 +1,101 @@ +'use strict' +var buildId = process.env.CIRCLE_BUILD_NUM || process.env.TRAVIS_JOB_NUMBER + +module.exports = { + 'src_folders': ['./test-browser-debugger/test'], + 'output_folder': './test-browser-debugger/test/reports', + 'custom_commands_path': '', + 'custom_assertions_path': '', + 'globals_path': '', + 'page_objects_path': '', + + 'selenium': { + 'start_process': false, + 'server_path': '', + 'log_path': '', + 'host': '127.0.0.1', + 'port': 4444, + 'cli_args': { + 'webdriver.chrome.driver': '', + 'webdriver.ie.driver': '', + 'webdriver.firefox.profile': '' + } + }, + + 'test_settings': { + 'default': { + 'launch_url': 'http://ondemand.saucelabs.com:80', + 'selenium_host': 'ondemand.saucelabs.com', + 'selenium_port': 80, + 'silent': true, + 'username': 'yanneth', + 'access_key': '1f5a4560-b02b-41aa-b52b-f033aad30870', + 'use_ssl': false, + 'globals': { + 'waitForConditionTimeout': 10000, + 'asyncHookTimeout': 100000 + }, + 'screenshots': { + 'enabled': false, + 'path': '' + }, + 'desiredCapabilities': { + 'browserName': 'firefox', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'build': 'build-' + buildId, + 'tunnel-identifier': 'remix_tests_' + buildId + } + }, + + 'chrome': { + 'desiredCapabilities': { + 'browserName': 'chrome', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'build': 'build-' + buildId, + 'tunnel-identifier': 'remix_tests_' + buildId + } + }, + + 'safari': { + 'desiredCapabilities': { + 'browserName': 'safari', + 'javascriptEnabled': true, + 'platform': 'OS X 10.11', + 'version': '10.0', + 'acceptSslCerts': true, + 'build': 'build-' + buildId, + 'tunnel-identifier': 'remix_tests_' + buildId + } + }, + + 'ie': { + 'desiredCapabilities': { + 'browserName': 'internet explorer', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'platform': 'Windows 10', + 'version': '11.103', + 'build': 'build-' + buildId, + 'tunnel-identifier': 'remix_tests_' + buildId + } + }, + + 'local': { + 'launch_url': 'http://localhost', + 'selenium_host': '127.0.0.1', + 'selenium_port': 4444, + 'silent': true, + 'screenshots': { + 'enabled': false, + 'path': '' + }, + 'desiredCapabilities': { + 'browserName': 'firefox', + 'javascriptEnabled': true, + 'acceptSslCerts': true + } + } + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000..f571dd4b3f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,19968 @@ +{ + "name": "remix-ide", + "version": "v0.10.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/compat-data": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.6.tgz", + "integrity": "sha512-5QPTrNen2bm7RBc7dsOmcA5hbrS4O2Vhmk5XOL4zWW/zD/hV0iinpefDlkm+tBBy8kDtFaaeEvmAqt+nURAV2g==", + "dev": true, + "requires": { + "browserslist": "^4.11.1", + "invariant": "^2.2.4", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@babel/core": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.6.tgz", + "integrity": "sha512-nD3deLvbsApbHAHttzIssYqgb883yU/d9roe4RZymBCDaZryMJDbptVpEpeQuRh4BJ+SYI8le9YGxKvFEvl1Wg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helpers": "^7.9.6", + "@babel/parser": "^7.9.6", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", + "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", + "dev": true, + "requires": { + "@babel/types": "^7.9.6", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", + "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", + "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-call-delegate": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.0.0-beta.53.tgz", + "integrity": "sha1-ld6Lq9A/nmz08rVkoDhwjBOP/jE=", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "7.0.0-beta.53", + "@babel/traverse": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz", + "integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.53" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.53.tgz", + "integrity": "sha1-uMrXLFcr4yNK/94ivm2sxCUOA0s=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.53.tgz", + "integrity": "sha1-USgEro6cvOVDHr6hnkdijC7WU/I=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.53.tgz", + "integrity": "sha1-3tiKsp+bHbYch9G7jTijXdp3neY=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.53.tgz", + "integrity": "sha1-TCfjuHP6CcWtbpPrQHBMIA+EE3w=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.53.tgz", + "integrity": "sha1-rvVLix+ZYW6jfJhHhxajeAJjMls=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz", + "integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + } + }, + "@babel/parser": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.53.tgz", + "integrity": "sha1-H0XrYXv5Rj1IKywE00nZ5O2/SJI=", + "dev": true + }, + "@babel/template": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.53.tgz", + "integrity": "sha1-MyIpCQDQsYewpxdDgeHzu3EFDS4=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.53.tgz", + "integrity": "sha1-ANMs2NC1j0wB0xFXvmIsZigm00Q=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/generator": "7.0.0-beta.53", + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + } + }, + "@babel/types": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.53.tgz", + "integrity": "sha1-GaRhwNpRVZXftnQLS0Xce7Dms3U=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/helper-compilation-targets": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.9.6.tgz", + "integrity": "sha512-x2Nvu0igO0ejXzx09B/1fGBxY9NXQlBW2kZsSxCJft+KHN8t9XWzIvFxtPHnBOAXpVsdxZKZFbRUC8TsNKajMw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.9.6", + "browserslist": "^4.11.1", + "invariant": "^2.2.4", + "levenary": "^1.1.1", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-regex": "^7.8.3", + "regexpu-core": "^4.7.0" + } + }, + "@babel/helper-define-map": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", + "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/types": "^7.8.3", + "lodash": "^4.17.13" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", + "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", + "dev": true, + "requires": { + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-function-name": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.9.5" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", + "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", + "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-imports": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", + "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-transforms": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", + "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-simple-access": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.9.0", + "lodash": "^4.17.13" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", + "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", + "dev": true, + "requires": { + "lodash": "^4.17.13" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", + "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-wrap-function": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-replace-supers": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.9.6.tgz", + "integrity": "sha512-qX+chbxkbArLyCImk3bWV+jB5gTNU/rsze+JlcF6Nf8tVTigPJSI1o1oBow/9Resa1yehUO9lIipsmu9oG4RzA==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" + } + }, + "@babel/helper-simple-access": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", + "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", + "dev": true, + "requires": { + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", + "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helpers": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.6.tgz", + "integrity": "sha512-tI4bUbldloLcHWoRUMAj4g1bF313M/o6fBKhIsb3QnGVPwRm9JsNf/gqMkQ7zjqReABiffPV6RWj7hEglID5Iw==", + "dev": true, + "requires": { + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.9.6", + "@babel/types": "^7.9.6" + } + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", + "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", + "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", + "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", + "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", + "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.6.tgz", + "integrity": "sha512-Ga6/fhGqA9Hj+y6whNpPv8psyaK5xzrQwSPsGPloVkvmH+PqW1ixdnfJ9uIO06OjQNYol3PMnfmJ8vfZtkzF+A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.9.5" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", + "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", + "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.8", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", + "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", + "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", + "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", + "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", + "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", + "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "lodash": "^4.17.13" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz", + "integrity": "sha512-x2kZoIuLC//O5iA7PEvecB105o7TLzZo8ofBVhP79N+DO3jaX+KYfww9TQcfBEZD0nikNyYcGB1IKtRq36rdmg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-define-map": "^7.8.3", + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-split-export-declaration": "^7.8.3", + "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", + "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz", + "integrity": "sha512-j3OEsGel8nHL/iusv/mRd5fYZ3DrOxWC82x0ogmdN/vHfAP4MYw+AFKYanzWlktNwikKvlzUV//afBW5FTp17Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", + "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", + "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", + "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", + "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-instanceof": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-instanceof/-/plugin-transform-instanceof-7.0.0-beta.53.tgz", + "integrity": "sha1-WC2CtyUYggGtDiIx8fzpTHRaLAY=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.53.tgz", + "integrity": "sha1-1kRYY2/8JYtCcUqd2Trrb4uM8+0=", + "dev": true + } + } + }, + "@babel/plugin-transform-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", + "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", + "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.6.tgz", + "integrity": "sha512-zoT0kgC3EixAyIAU+9vfaUVKTv9IxBDSabgHoUCBP6FqEJ+iNiN7ip7NBKcYqbfUDfuC2mFCbM7vbu4qJgOnDw==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.6.tgz", + "integrity": "sha512-7H25fSlLcn+iYimmsNe3uK1at79IE6SKW9q0/QeEHTMC9MdOZ+4bA+T1VFB5fgOqBWoqlifXRzYD0JPdmIrgSQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.6.tgz", + "integrity": "sha512-NW5XQuW3N2tTHim8e1b7qGy7s0kZ2OH3m5octc49K1SdAKGxYxeIx7hiIz05kS1R2R+hOWcsr1eYwcGhrdHsrg==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", + "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", + "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", + "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-object-assign": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.8.3.tgz", + "integrity": "sha512-i3LuN8tPDqUCRFu3dkzF2r1Nx0jp4scxtm7JxtIqI9he9Vk20YD+/zshdzR9JLsoBMlJlNR82a62vQExNEVx/Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", + "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz", + "integrity": "sha512-0+1FhHnMfj6lIIhVvS4KGQJeuhe1GI//h5uptK4PvLt+BGBxsoUJbd3/IW002yk//6sZPlFgsG1hY6OHLcy6kA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", + "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", + "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", + "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", + "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", + "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", + "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-regex": "^7.8.3" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", + "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", + "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", + "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/polyfill": { + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.8.7.tgz", + "integrity": "sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w==", + "dev": true, + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/preset-env": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.6.tgz", + "integrity": "sha512-0gQJ9RTzO0heXOhzftog+a/WyOuqMrAIugVYxMYf83gh1CQaQDjMtsOpqOwXyDL/5JcWsrCm8l4ju8QC97O7EQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.9.6", + "@babel/helper-compilation-targets": "^7.9.6", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-numeric-separator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.9.6", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.9.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.9.5", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.9.5", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.9.0", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.9.6", + "@babel/plugin-transform-modules-commonjs": "^7.9.6", + "@babel/plugin-transform-modules-systemjs": "^7.9.6", + "@babel/plugin-transform-modules-umd": "^7.9.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.9.5", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.7", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.4", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.9.6", + "browserslist": "^4.11.1", + "core-js-compat": "^3.6.2", + "invariant": "^2.2.2", + "levenary": "^1.1.1", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@babel/preset-es2015": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/preset-es2015/-/preset-es2015-7.0.0-beta.53.tgz", + "integrity": "sha1-SYL6GUjbEJN2Yoj2mRPizjYDEeQ=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/plugin-transform-arrow-functions": "7.0.0-beta.53", + "@babel/plugin-transform-block-scoped-functions": "7.0.0-beta.53", + "@babel/plugin-transform-block-scoping": "7.0.0-beta.53", + "@babel/plugin-transform-classes": "7.0.0-beta.53", + "@babel/plugin-transform-computed-properties": "7.0.0-beta.53", + "@babel/plugin-transform-destructuring": "7.0.0-beta.53", + "@babel/plugin-transform-duplicate-keys": "7.0.0-beta.53", + "@babel/plugin-transform-for-of": "7.0.0-beta.53", + "@babel/plugin-transform-function-name": "7.0.0-beta.53", + "@babel/plugin-transform-instanceof": "7.0.0-beta.53", + "@babel/plugin-transform-literals": "7.0.0-beta.53", + "@babel/plugin-transform-modules-amd": "7.0.0-beta.53", + "@babel/plugin-transform-modules-commonjs": "7.0.0-beta.53", + "@babel/plugin-transform-modules-systemjs": "7.0.0-beta.53", + "@babel/plugin-transform-modules-umd": "7.0.0-beta.53", + "@babel/plugin-transform-object-super": "7.0.0-beta.53", + "@babel/plugin-transform-parameters": "7.0.0-beta.53", + "@babel/plugin-transform-regenerator": "7.0.0-beta.53", + "@babel/plugin-transform-shorthand-properties": "7.0.0-beta.53", + "@babel/plugin-transform-spread": "7.0.0-beta.53", + "@babel/plugin-transform-sticky-regex": "7.0.0-beta.53", + "@babel/plugin-transform-template-literals": "7.0.0-beta.53", + "@babel/plugin-transform-typeof-symbol": "7.0.0-beta.53", + "@babel/plugin-transform-unicode-regex": "7.0.0-beta.53" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz", + "integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.53" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.53.tgz", + "integrity": "sha1-uMrXLFcr4yNK/94ivm2sxCUOA0s=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-beta.53.tgz", + "integrity": "sha1-WZYGKDdcvu+WoH7f4co4t1bwGqg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-define-map": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.0.0-beta.53.tgz", + "integrity": "sha1-SOniJlRTeHl1BD76qx7a0jnqlpU=", + "dev": true, + "requires": { + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.53.tgz", + "integrity": "sha1-USgEro6cvOVDHr6hnkdijC7WU/I=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.53.tgz", + "integrity": "sha1-3tiKsp+bHbYch9G7jTijXdp3neY=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0-beta.53.tgz", + "integrity": "sha1-TCfjuHP6CcWtbpPrQHBMIA+EE3w=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0-beta.53.tgz", + "integrity": "sha1-D7Dviy07kD0cO/Qm2kp0V14BnOQ=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.53.tgz", + "integrity": "sha1-5zXmqjClBLD52Fw4ptRwqfSqgdk=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-module-transforms": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.53.tgz", + "integrity": "sha1-e6IUzcyPhiPy0Xl96v8f80mqzhM=", + "dev": true, + "requires": { + "@babel/helper-module-imports": "7.0.0-beta.53", + "@babel/helper-simple-access": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0-beta.53.tgz", + "integrity": "sha1-j8eO9MD2n4uzu980zSMsIBIEFMg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.53.tgz", + "integrity": "sha1-1kRYY2/8JYtCcUqd2Trrb4uM8+0=", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.0.0-beta.53.tgz", + "integrity": "sha1-bp0hl7Vid54iVWWUaumoXCFbIl4=", + "dev": true, + "requires": { + "lodash": "^4.17.5" + } + }, + "@babel/helper-replace-supers": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.0.0-beta.53.tgz", + "integrity": "sha1-M5tb3BAilElbGifFWBMjBuG3vKc=", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "7.0.0-beta.53", + "@babel/helper-optimise-call-expression": "7.0.0-beta.53", + "@babel/traverse": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-simple-access": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.53.tgz", + "integrity": "sha1-cvbbmr5C+GgfpvAo79WdgVRHUrM=", + "dev": true, + "requires": { + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.53.tgz", + "integrity": "sha1-rvVLix+ZYW6jfJhHhxajeAJjMls=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz", + "integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + } + }, + "@babel/parser": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.53.tgz", + "integrity": "sha1-H0XrYXv5Rj1IKywE00nZ5O2/SJI=", + "dev": true + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0-beta.53.tgz", + "integrity": "sha1-p19fqEl6rBcp0DO/QcJQQWudHgQ=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0-beta.53.tgz", + "integrity": "sha1-CkMiGhsMkM1NCfG0a5Wd0khlf3M=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0-beta.53.tgz", + "integrity": "sha1-nv1uUMofo5jcqnEZYh2j8fu4IbY=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-beta.53.tgz", + "integrity": "sha1-XcLsMb8emAZqzfDEiHt3RMFL7G4=", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "7.0.0-beta.53", + "@babel/helper-define-map": "7.0.0-beta.53", + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-optimise-call-expression": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-replace-supers": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0-beta.53.tgz", + "integrity": "sha1-l0fiYIKulO2lMPmNLCBZ6NLbwAU=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0-beta.53.tgz", + "integrity": "sha1-DwrbDhptzTWjZkEBYJ7AYv8SenY=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0-beta.53.tgz", + "integrity": "sha1-D1WZE6v6GCOcpOCPc+7DbF5XuB8=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0-beta.53.tgz", + "integrity": "sha1-+gZSFeGFacj3TdUktXIeEdzKlzs=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.0.0-beta.53.tgz", + "integrity": "sha1-Kzpbs2TB4cV+zL/iXGv1XygEET4=", + "dev": true, + "requires": { + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0-beta.53.tgz", + "integrity": "sha1-vsTxROmpbvUSHRQwx+vl/QiGV8k=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.0.0-beta.53.tgz", + "integrity": "sha1-WFTXOeZ5IzqId8C0GCaca+t6Miw=", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.53.tgz", + "integrity": "sha1-68P7ocWmyHQ7kJQD7NPn42gcr6U=", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-simple-access": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0-beta.53.tgz", + "integrity": "sha1-uA/NnBWXLcaCMhT1JIUnhgu/BY4=", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.0.0-beta.53.tgz", + "integrity": "sha1-Kjar5AodpnbkOhwwcVeOJ70tZ50=", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.0.0-beta.53.tgz", + "integrity": "sha1-4sTwbts0s9eksnV7oYgp0N8gKcs=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-replace-supers": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.0.0-beta.53.tgz", + "integrity": "sha1-7+YM7IzsoNGdXG+hrnm8TjMnnVY=", + "dev": true, + "requires": { + "@babel/helper-call-delegate": "7.0.0-beta.53", + "@babel/helper-get-function-arity": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0-beta.53.tgz", + "integrity": "sha1-T+u/YISvoMHJ7ISX3mjAaV/p2gs=", + "dev": true, + "requires": { + "regenerator-transform": "^0.13.3" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0-beta.53.tgz", + "integrity": "sha1-38SIG2vXZYoAMew7gWPliPCJjUs=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.53.tgz", + "integrity": "sha1-g+j2Rsok8cmCKPnxREz2DL1JOLw=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0-beta.53.tgz", + "integrity": "sha1-D888mUq92Lq1m6l4L+TZ+KVF1uc=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-regex": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0-beta.53.tgz", + "integrity": "sha1-+msLQXEA0j4tsUwd9HorGzl48dk=", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0-beta.53.tgz", + "integrity": "sha1-ZarocamqQPYRSDZlcxIJrr1cKis=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0-beta.53.tgz", + "integrity": "sha1-CvdOyAGefVnji+ZNt/YikZQv7SU=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-regex": "7.0.0-beta.53", + "regexpu-core": "^4.1.3" + } + }, + "@babel/template": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.53.tgz", + "integrity": "sha1-MyIpCQDQsYewpxdDgeHzu3EFDS4=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.53.tgz", + "integrity": "sha1-ANMs2NC1j0wB0xFXvmIsZigm00Q=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/generator": "7.0.0-beta.53", + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + } + }, + "@babel/types": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.53.tgz", + "integrity": "sha1-GaRhwNpRVZXftnQLS0Xce7Dms3U=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.4.tgz", + "integrity": "sha512-T0QMBjK3J0MtxjPmdIMXm72Wvj2Abb0Bd4HADdfijwMdoIsyQZ6fWC7kDFhk2YinBBEMZDL7Y7wh0J1sGx3S4A==", + "dev": true, + "requires": { + "private": "^0.1.6" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/preset-es2017": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/preset-es2017/-/preset-es2017-7.0.0-beta.53.tgz", + "integrity": "sha1-xRMrJFQnVQt84O/H2SZ6v6IX/u8=", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/plugin-transform-async-to-generator": "7.0.0-beta.53" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz", + "integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0-beta.53" + } + }, + "@babel/generator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.53.tgz", + "integrity": "sha1-uMrXLFcr4yNK/94ivm2sxCUOA0s=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53", + "jsesc": "^2.5.1", + "lodash": "^4.17.5", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-beta.53.tgz", + "integrity": "sha1-WZYGKDdcvu+WoH7f4co4t1bwGqg=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-function-name": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.53.tgz", + "integrity": "sha1-USgEro6cvOVDHr6hnkdijC7WU/I=", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.53.tgz", + "integrity": "sha1-3tiKsp+bHbYch9G7jTijXdp3neY=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.53.tgz", + "integrity": "sha1-5zXmqjClBLD52Fw4ptRwqfSqgdk=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.53.tgz", + "integrity": "sha1-1kRYY2/8JYtCcUqd2Trrb4uM8+0=", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.0.0-beta.53.tgz", + "integrity": "sha1-uDSnVy3sF2OJ/6x+djV5WGSQySI=", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "7.0.0-beta.53", + "@babel/helper-wrap-function": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/traverse": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.53.tgz", + "integrity": "sha1-rvVLix+ZYW6jfJhHhxajeAJjMls=", + "dev": true, + "requires": { + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/helper-wrap-function": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.0.0-beta.53.tgz", + "integrity": "sha1-q/sr+pQBBCurJXwBkPWtbbjfFdU=", + "dev": true, + "requires": { + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/template": "7.0.0-beta.53", + "@babel/traverse": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53" + } + }, + "@babel/highlight": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz", + "integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^3.0.0" + } + }, + "@babel/parser": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.53.tgz", + "integrity": "sha1-H0XrYXv5Rj1IKywE00nZ5O2/SJI=", + "dev": true + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.0.0-beta.53.tgz", + "integrity": "sha1-REx2HMQhXJeptVb/WMp7p99dQVM=", + "dev": true, + "requires": { + "@babel/helper-module-imports": "7.0.0-beta.53", + "@babel/helper-plugin-utils": "7.0.0-beta.53", + "@babel/helper-remap-async-to-generator": "7.0.0-beta.53" + } + }, + "@babel/template": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.53.tgz", + "integrity": "sha1-MyIpCQDQsYewpxdDgeHzu3EFDS4=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "lodash": "^4.17.5" + } + }, + "@babel/traverse": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.53.tgz", + "integrity": "sha1-ANMs2NC1j0wB0xFXvmIsZigm00Q=", + "dev": true, + "requires": { + "@babel/code-frame": "7.0.0-beta.53", + "@babel/generator": "7.0.0-beta.53", + "@babel/helper-function-name": "7.0.0-beta.53", + "@babel/helper-split-export-declaration": "7.0.0-beta.53", + "@babel/parser": "7.0.0-beta.53", + "@babel/types": "7.0.0-beta.53", + "debug": "^3.1.0", + "globals": "^11.1.0", + "invariant": "^2.2.0", + "lodash": "^4.17.5" + } + }, + "@babel/types": { + "version": "7.0.0-beta.53", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.53.tgz", + "integrity": "sha1-GaRhwNpRVZXftnQLS0Xce7Dms3U=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.5", + "to-fast-properties": "^2.0.0" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/preset-stage-0": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/preset-stage-0/-/preset-stage-0-7.8.3.tgz", + "integrity": "sha512-+l6FlG1j73t4wh78W41StbcCz0/9a1/y+vxfnjtHl060kSmcgMfGzK9MEkLvrCOXfhp9RCX+d88sm6rOqxEIEQ==", + "dev": true + }, + "@babel/register": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.9.0.tgz", + "integrity": "sha512-Tv8Zyi2J2VRR8g7pC5gTeIN8Ihultbmk0ocyNz8H2nEZbmhp1N6q0A1UGsQbDvGP/sNinQKUHf3SqXwqjtFv4Q==", + "dev": true, + "requires": { + "find-cache-dir": "^2.0.0", + "lodash": "^4.17.13", + "make-dir": "^2.1.0", + "pirates": "^4.0.0", + "source-map-support": "^0.5.16" + } + }, + "@babel/runtime": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", + "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/traverse": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", + "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", + "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.5", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@f/has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@f/has/-/has-1.0.1.tgz", + "integrity": "sha1-t08TK/OqpdwECe3+jucjN9bnP74=", + "dev": true + }, + "@f/is-svg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@f/is-svg/-/is-svg-1.0.0.tgz", + "integrity": "sha1-Q0fYy1VBkl+F9WMXSMwx3GRQ70Y=", + "dev": true, + "requires": { + "@f/has": "^1.0.0", + "@f/svg-elements": "^1.0.0" + } + }, + "@f/svg-elements": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@f/svg-elements/-/svg-elements-1.0.1.tgz", + "integrity": "sha1-qNMKizODbJiISNKOs8RgXZI1gd0=", + "dev": true + }, + "@f/svg-namespace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@f/svg-namespace/-/svg-namespace-1.0.1.tgz", + "integrity": "sha1-9vGlzl05caSt6RoR0i1MRZrNN18=", + "dev": true + }, + "@fortawesome/fontawesome-common-types": { + "version": "0.2.28", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.28.tgz", + "integrity": "sha512-gtis2/5yLdfI6n0ia0jH7NJs5i/Z/8M/ZbQL6jXQhCthEOe5Cr5NcQPhgTvFxNOtURE03/ZqUcEskdn2M+QaBg==", + "dev": true + }, + "@fortawesome/fontawesome-free": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.13.0.tgz", + "integrity": "sha512-xKOeQEl5O47GPZYIMToj6uuA2syyFlq9EMSl2ui0uytjY9xbe8XS0pexNWmxrdcCyNGyDmLyYw5FtKsalBUeOg==", + "dev": true + }, + "@fortawesome/fontawesome-svg-core": { + "version": "1.2.28", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.28.tgz", + "integrity": "sha512-4LeaNHWvrneoU0i8b5RTOJHKx7E+y7jYejplR7uSVB34+mp3Veg7cbKk7NBCLiI4TyoWS1wh9ZdoyLJR8wSAdg==", + "dev": true, + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.28" + } + }, + "@fortawesome/free-solid-svg-icons": { + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.13.0.tgz", + "integrity": "sha512-IHUgDJdomv6YtG4p3zl1B5wWf9ffinHIvebqQOmV3U+3SLw4fC+LUCCgwfETkbTtjy5/Qws2VoVf6z/ETQpFpg==", + "dev": true, + "requires": { + "@fortawesome/fontawesome-common-types": "^0.2.28" + } + }, + "@improved/node": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@improved/node/-/node-1.1.1.tgz", + "integrity": "sha512-ePDxG9UuU9Kobk90ZUjtmDW8IT9U7aRb1/Rl9683MRNM+ur0ocHL2v7TPH2ajTiVSBUFbbeW8vKIt9jrb0JIAA==", + "dev": true + }, + "@remixproject/engine": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.2.3.tgz", + "integrity": "sha512-3xFbAP83ljuLABx8nO1ywfviGvCOB1U3UvZCS3Ar+XlwzQvxJUvZNMA6vd/ofF81SM0wGcwrPrWBwYxlnuL9UQ==" + }, + "@resolver-engine/core": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@resolver-engine/core/-/core-0.3.3.tgz", + "integrity": "sha512-eB8nEbKDJJBi5p5SrvrvILn4a0h42bKtbCTri3ZxCGt6UvoQyp7HnGOfki944bUjBSHKK3RvgfViHn+kqdXtnQ==", + "dev": true, + "requires": { + "debug": "^3.1.0", + "is-url": "^1.2.4", + "request": "^2.85.0" + } + }, + "@resolver-engine/imports": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@resolver-engine/imports/-/imports-0.3.3.tgz", + "integrity": "sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q==", + "dev": true, + "requires": { + "@resolver-engine/core": "^0.3.3", + "debug": "^3.1.0", + "hosted-git-info": "^2.6.0", + "path-browserify": "^1.0.0", + "url": "^0.11.0" + } + }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, + "@types/bignumber.js": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", + "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", + "dev": true, + "requires": { + "bignumber.js": "*" + } + }, + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "13.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz", + "integrity": "sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g==", + "dev": true + }, + "@types/tape": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@types/tape/-/tape-4.13.0.tgz", + "integrity": "sha512-0V8cKowBdsiA9nbxAg7531sF2cdPZNiUogcfIUeUGm+bejUBE/bvibz3rH36iQP9bQjO/sOzFwU97/uC5mCyoA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@web3-js/scrypt-shim": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@web3-js/scrypt-shim/-/scrypt-shim-0.1.0.tgz", + "integrity": "sha512-ZtZeWCc/s0nMcdx/+rZwY1EcuRdemOK9ag21ty9UsHkFxsNb/AaoucUz0iPuyGe0Ku+PFuRmWZG7Z7462p9xPw==", + "dev": true, + "requires": { + "scryptsy": "^2.1.0", + "semver": "^6.3.0" + } + }, + "@web3-js/websocket": { + "version": "1.0.30", + "resolved": "https://registry.npmjs.org/@web3-js/websocket/-/websocket-1.0.30.tgz", + "integrity": "sha512-fDwrD47MiDrzcJdSeTLF75aCcxVVt8B1N74rA+vh2XCAvFy4tEWJjtnUtj2QG7/zlQ6g9cQ88bZFBxwd9/FmtA==", + "dev": true, + "requires": { + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", + "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "@webcomponents/webcomponentsjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.4.3.tgz", + "integrity": "sha512-cV4+sAmshf8ysU2USutrSRYQkJzEYKHsRCGa0CkMElGpG5747VHtkfsW3NdVIBV/m2MDKXTDydT4lkrysH7IFA==", + "dev": true + }, + "@zeit/schemas": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@zeit/schemas/-/schemas-1.1.1.tgz", + "integrity": "sha512-IV08mGz2ZeBq5WuYuxtT05PHpGHpuswW52s7SSeLBl8yPVgdr8CdPr7Dh89Vd5tmffz/EdUHH8FvJTXbVAYC2g==", + "dev": true + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "ace-mode-move": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/ace-mode-move/-/ace-mode-move-0.0.1.tgz", + "integrity": "sha512-RRckwbouhlCg1n8LQrZ87ojVdJg8FZYxa6d4ot8PNNBRKHLvJagPu/poW9mmRCW4YAGvOfrGpJpZH1kOjitj/Q==", + "dev": true + }, + "ace-mode-solidity": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ace-mode-solidity/-/ace-mode-solidity-0.1.1.tgz", + "integrity": "sha512-OFDYb2DpSUdY/st3o+efbBof4e3M5zFXE8p1DwXNSoeGVT5+8/3KKwX6uhkuKipZ9VgqtPDSJLNcIY1+KSsrIw==", + "dev": true + }, + "ace-mode-zokrates": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ace-mode-zokrates/-/ace-mode-zokrates-1.0.1.tgz", + "integrity": "sha512-+rTOLj1AJzV/XRXsMLNkWIjNQCIa8TYjWRunCTGJ620iUy7WRlMkU7uVRydq//t4GUdr0j2TkNM0fSqVs0zNWw==", + "dev": true + }, + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" + }, + "acorn-es7-plugin": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz", + "integrity": "sha1-8u4fMiipDurRJF+asZIusucdM2s=", + "dev": true + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" + } + } + }, + "acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + }, + "dependencies": { + "acorn": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", + "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", + "dev": true + } + } + }, + "acorn-walk": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", + "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", + "dev": true + }, + "add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", + "dev": true + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", + "dev": true + }, + "agent-base": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", + "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", + "dev": true, + "requires": { + "extend": "~3.0.0", + "semver": "~5.0.1" + }, + "dependencies": { + "semver": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", + "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=", + "dev": true + } + } + }, + "ajv": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", + "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", + "requires": { + "co": "^4.6.0", + "json-stable-stringify": "^1.0.1" + } + }, + "ajv-keywords": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", + "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=" + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "^2.1.5", + "normalize-path": "^2.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, + "array-includes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" + } + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "array.prototype.find": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array.prototype.find/-/array.prototype.find-2.1.1.tgz", + "integrity": "sha512-mi+MYNJYLTx2eNYy+Yh6raoQacCsNeeMUaspFPh9Y141lFSsWxxB8V9mM2ye+eqiRs917J6/pJ4M9ZPzenWckA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.4" + } + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assertion-error": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.0.tgz", + "integrity": "sha1-x/hUOP3UZrx8oWq5DIFRN5el0js=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "ast-types": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.3.tgz", + "integrity": "sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA==", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "dev": true, + "requires": { + "async": "^2.4.0" + } + }, + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "babel-eslint": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", + "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.0", + "@babel/traverse": "^7.7.0", + "@babel/types": "^7.7.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-fast-async": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/babel-plugin-fast-async/-/babel-plugin-fast-async-6.1.2.tgz", + "integrity": "sha1-rEkh+it/Th9RljvkXzsQGP0DzZ0=", + "dev": true, + "requires": { + "nodent": ">=2.6.12" + } + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", + "dev": true + }, + "babel-plugin-transform-object-rest-spread": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", + "integrity": "sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=", + "dev": true, + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.8.0", + "babel-runtime": "^6.26.0" + } + }, + "babel-plugin-yo-yoify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-yo-yoify/-/babel-plugin-yo-yoify-2.0.0.tgz", + "integrity": "sha512-wmNnRBVN3YD14+BqZR4iAxStFEGaJ3oV2x8QTDkYAfA7hc5Auh9dlonQD+DzsnvomNLzsT56zZDvayIlB050+g==", + "dev": true, + "requires": { + "@f/is-svg": "^1.0.0", + "@f/svg-namespace": "^1.0.1", + "camel-case": "^3.0.0", + "hyperx": "^2.3.0", + "is-boolean-attribute": "0.0.1", + "normalize-html-whitespace": "^0.2.0", + "yo-yoify": "^4.0.0" + }, + "dependencies": { + "yo-yoify": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/yo-yoify/-/yo-yoify-4.3.0.tgz", + "integrity": "sha512-txj2+d99KbSg3+GvFawb04vwB7dnIvERzxfndOogbiumKlKKbMR+zFyHInZfdGXDswIo7ce3ZExxD4sb8mD87g==", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "convert-source-map": "^1.5.1", + "hyperx": "^2.0.3", + "on-load": "^3.2.0", + "through2": "^2.0.1", + "transform-ast": "^2.2.1" + } + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + } + } + }, + "babelify": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/babelify/-/babelify-10.0.0.tgz", + "integrity": "sha512-X40FaxyH7t3X+JFAKvb1H9wooWKLRCi8pg3m8poqtdZaIng+bjzp9RvKQCvRjF9isHiPkXspbbXT/zwXLtwgwg==", + "dev": true + }, + "babylon": { + "version": "7.0.0-beta.47", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.47.tgz", + "integrity": "sha512-+rq2cr4GDhtToEzKFD6KZZMDBXhjFAr9JjPw9pAppZACeEWqNM294j+NdBzkSHYXwzzBmVjZ3nEVJlOhbR2gOQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bel": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/bel/-/bel-4.6.0.tgz", + "integrity": "sha1-Ot4W4jarIgTY0cZurEvVc3k6yZk=", + "dev": true, + "requires": { + "global": "^4.3.0", + "hyperx": "^2.3.0", + "on-load": "^3.2.0" + } + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "dev": true + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA==", + "dev": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + } + } + }, + "brace": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/brace/-/brace-0.8.0.tgz", + "integrity": "sha1-6CbG1QVMrl9getexyBI23SzwGXg=", + "dev": true, + "requires": { + "w3c-blob": "0.0.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + } + }, + "browser-process-hrtime": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", + "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", + "dev": true + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "browserify": { + "version": "16.5.1", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.1.tgz", + "integrity": "sha512-EQX0h59Pp+0GtSRb5rL6OTfrttlzv+uyaUVlK6GX3w11SQ0jKPKyjC/54RhPR2ib2KmfcELM06e8FxcI5XNU2A==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^1.11.0", + "browserify-zlib": "~0.2.0", + "buffer": "~5.2.1", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^2.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "mkdirp-classic": "^0.5.2", + "module-deps": "^6.0.0", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^3.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "events": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", + "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + } + } + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-reload": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/browserify-reload/-/browserify-reload-1.1.1.tgz", + "integrity": "sha1-IL01Ch+k37riXlXKS4f7dxuus1M=", + "dev": true, + "requires": { + "browserify-wrap": "^1.0.1", + "chokidar": "^1.6.0", + "ws": "^1.1.1" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "browserify-sha3": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.4.tgz", + "integrity": "sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY=", + "dev": true, + "requires": { + "js-sha3": "^0.6.1", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "js-sha3": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", + "integrity": "sha1-W4n3enR3Z5h39YxKB1JAk0sflcA=", + "dev": true + } + } + }, + "browserify-sign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.1.0.tgz", + "integrity": "sha512-VYxo7cDCeYUoBZ0ZCy4UyEUCP3smyBd4DRQM5nrFS1jJjPJjX7rP3oLRpPoWfkhQfyJ0I9ZbHbKafrFD/SGlrg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.2", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "browserify-wrap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-wrap/-/browserify-wrap-1.0.2.tgz", + "integrity": "sha1-DvJ3xnxplAkVnt8hraPchQF/lqo=", + "dev": true + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.0.tgz", + "integrity": "sha512-UH2GkcEDSI0k/lRkuDSzFl9ZZ87skSy9w2XAn1MsZnL+4c4rqbBd3e82UWHbYDpztABrPBhZsTEeuxVfHppqDg==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001043", + "electron-to-chromium": "^1.3.413", + "node-releases": "^1.1.53", + "pkg-up": "^2.0.0" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", + "dev": true + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "cached-path-relative": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", + "dev": true + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "requires": { + "callsites": "^0.2.0" + } + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001055", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001055.tgz", + "integrity": "sha512-MbwsBmKrBSKIWldfdIagO5OJWZclpJtS4h0Jrk/4HFrXJxTdVdH23Fd+xCiHriVGvYcWyW8mR/CPsYajlH8Iuw==", + "dev": true + }, + "capture-stack-trace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz", + "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", + "dev": true + }, + "cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", + "dev": true, + "requires": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chai-nightwatch": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/chai-nightwatch/-/chai-nightwatch-0.1.1.tgz", + "integrity": "sha1-HKVt52jTwIaP5/wvTTLC/olOa+k=", + "dev": true, + "requires": { + "assertion-error": "1.0.0", + "deep-eql": "0.1.3" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "change-case": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.1.0.tgz", + "integrity": "sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==", + "dev": true, + "requires": { + "camel-case": "^3.0.0", + "constant-case": "^2.0.0", + "dot-case": "^2.1.0", + "header-case": "^1.0.0", + "is-lower-case": "^1.1.0", + "is-upper-case": "^1.1.0", + "lower-case": "^1.1.1", + "lower-case-first": "^1.0.0", + "no-case": "^2.3.2", + "param-case": "^2.1.0", + "pascal-case": "^2.0.0", + "path-case": "^2.1.0", + "sentence-case": "^2.1.0", + "snake-case": "^2.1.0", + "swap-case": "^1.1.0", + "title-case": "^2.1.0", + "upper-case": "^1.1.1", + "upper-case-first": "^1.1.0" + } + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "checkpoint-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", + "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "dev": true, + "requires": { + "functional-red-black-tree": "^1.0.1" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true, + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "cli-cursor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", + "requires": { + "restore-cursor": "^1.0.1" + } + }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true, + "requires": { + "colors": "1.0.3" + } + }, + "cli-usage": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/cli-usage/-/cli-usage-0.1.10.tgz", + "integrity": "sha512-Q/s1S4Jz5LYI0LQ+XiFQCXkhMzn244ddyIffni8JIq/kL95DvQomVQ0cJC41c76hH9/FmZGY7rZB53y/bXHtRA==", + "dev": true, + "requires": { + "marked": "^0.7.0", + "marked-terminal": "^3.3.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "cmd-shim": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.1.0.tgz", + "integrity": "sha512-A5C0Cyf2H8sKsHqX0tvIWRXw5/PK++3Dc0lDbsugr90nOECLLuSPahVQBG8pgmgiXgm/TzBWMqI2rWdZwHduAw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "dev": true, + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "colornames": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", + "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + }, + "colorspace": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "dev": true, + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, + "columnify": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "dev": true, + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + } + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true + }, + "command-join": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/command-join/-/command-join-2.0.1.tgz", + "integrity": "sha512-LBA9kSxtg2SA8itaBeuitpn4pZQOhGVP1dyU1cnXLYrBpF3sikaPhjWPqyqVh7oGpneI05RtJs9a0fftIEgXcA==", + "dev": true, + "requires": { + "@improved/node": "^1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "component-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-type/-/component-type-1.2.1.tgz", + "integrity": "sha1-ikeQFwAjjk/DIml3EjAibyS0Fak=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "config-chain": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", + "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "constant-case": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", + "integrity": "sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY=", + "dev": true, + "requires": { + "snake-case": "^2.1.0", + "upper-case": "^1.1.1" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "conventional-changelog": { + "version": "1.1.24", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.24.tgz", + "integrity": "sha512-2WcSUst4Y3Z4hHvoMTWXMJr/DmgVdLiMOVY1Kak2LfFz+GIz2KDp5naqbFesYbfXPmaZ5p491dO0FWZIJoJw1Q==", + "dev": true, + "requires": { + "conventional-changelog-angular": "^1.6.6", + "conventional-changelog-atom": "^0.2.8", + "conventional-changelog-codemirror": "^0.3.8", + "conventional-changelog-core": "^2.0.11", + "conventional-changelog-ember": "^0.3.12", + "conventional-changelog-eslint": "^1.0.9", + "conventional-changelog-express": "^0.3.6", + "conventional-changelog-jquery": "^0.1.0", + "conventional-changelog-jscs": "^0.1.0", + "conventional-changelog-jshint": "^0.3.8", + "conventional-changelog-preset-loader": "^1.1.8" + } + }, + "conventional-changelog-angular": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", + "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + }, + "dependencies": { + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + } + } + }, + "conventional-changelog-atom": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.8.tgz", + "integrity": "sha512-8pPZqhMbrnltNBizjoDCb/Sz85KyUXNDQxuAEYAU5V/eHn0okMBVjqc8aHWYpHrytyZWvMGbayOlDv7i8kEf6g==", + "dev": true, + "requires": { + "q": "^1.5.1" + }, + "dependencies": { + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + } + } + }, + "conventional-changelog-cli": { + "version": "1.3.22", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-1.3.22.tgz", + "integrity": "sha512-pnjdIJbxjkZ5VdAX/H1wndr1G10CY8MuZgnXuJhIHglOXfIrXygb7KZC836GW9uo1u8PjEIvIw/bKX0lOmOzZg==", + "dev": true, + "requires": { + "add-stream": "^1.0.0", + "conventional-changelog": "^1.1.24", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "tempfile": "^1.1.1" + } + }, + "conventional-changelog-codemirror": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.8.tgz", + "integrity": "sha512-3HFZKtBXTaUCHvz7ai6nk2+psRIkldDoNzCsom0egDtVmPsvvHZkzjynhdQyULfacRSsBTaiQ0ol6nBOL4dDiQ==", + "dev": true, + "requires": { + "q": "^1.5.1" + }, + "dependencies": { + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + } + } + }, + "conventional-changelog-core": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz", + "integrity": "sha512-HvTE6RlqeEZ/NFPtQeFLsIDOLrGP3bXYr7lFLMhCVsbduF1MXIe8OODkwMFyo1i9ku9NWBwVnVn0jDmIFXjDRg==", + "dev": true, + "requires": { + "conventional-changelog-writer": "^3.0.9", + "conventional-commits-parser": "^2.1.7", + "dateformat": "^3.0.0", + "get-pkg-repo": "^1.0.0", + "git-raw-commits": "^1.3.6", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^1.3.6", + "lodash": "^4.2.1", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^1.1.0", + "read-pkg-up": "^1.0.1", + "through2": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "conventional-changelog-ember": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.3.12.tgz", + "integrity": "sha512-mmJzA7uzbrOqeF89dMMi6z17O07ORTXlTMArnLG9ZTX4oLaKNolUlxFUFlFm9JUoVWajVpaHQWjxH1EOQ+ARoQ==", + "dev": true, + "requires": { + "q": "^1.5.1" + }, + "dependencies": { + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + } + } + }, + "conventional-changelog-eslint": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.9.tgz", + "integrity": "sha512-h87nfVh2fdk9fJIvz26wCBsbDC/KxqCc5wSlNMZbXcARtbgNbNDIF7Y7ctokFdnxkzVdaHsbINkh548T9eBA7Q==", + "dev": true, + "requires": { + "q": "^1.5.1" + }, + "dependencies": { + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + } + } + }, + "conventional-changelog-express": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.6.tgz", + "integrity": "sha512-3iWVtBJZ9RnRnZveNDzOD8QRn6g6vUif0qVTWWyi5nUIAbuN1FfPVyKdAlJJfp5Im+dE8Kiy/d2SpaX/0X678Q==", + "dev": true, + "requires": { + "q": "^1.5.1" + }, + "dependencies": { + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + } + } + }, + "conventional-changelog-jquery": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", + "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", + "dev": true, + "requires": { + "q": "^1.4.1" + } + }, + "conventional-changelog-jscs": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz", + "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", + "dev": true, + "requires": { + "q": "^1.4.1" + } + }, + "conventional-changelog-jshint": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.8.tgz", + "integrity": "sha512-hn9QU4ZI/5V50wKPJNPGT4gEWgiBFpV6adieILW4MaUFynuDYOvQ71EMSj3EznJyKi/KzuXpc9dGmX8njZMjig==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + }, + "dependencies": { + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + } + } + }, + "conventional-changelog-preset-loader": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz", + "integrity": "sha512-MkksM4G4YdrMlT2MbTsV2F6LXu/hZR0Tc/yenRrDIKRwBl/SP7ER4ZDlglqJsCzLJi4UonBc52Bkm5hzrOVCcw==", + "dev": true + }, + "conventional-changelog-writer": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz", + "integrity": "sha512-n9KbsxlJxRQsUnK6wIBRnARacvNnN4C/nxnxCkH+B/R1JS2Fa+DiP1dU4I59mEDEjgnFaN2+9wr1P1s7GYB5/Q==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "conventional-commits-filter": "^1.1.6", + "dateformat": "^3.0.0", + "handlebars": "^4.0.2", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "semver": "^5.5.0", + "split": "^1.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "conventional-commits-filter": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz", + "integrity": "sha512-KcDgtCRKJCQhyk6VLT7zR+ZOyCnerfemE/CsR3iQpzRRFbLEs0Y6rwk3mpDvtOh04X223z+1xyJ582Stfct/0Q==", + "dev": true, + "requires": { + "is-subset": "^0.1.1", + "modify-values": "^1.0.0" + } + }, + "conventional-commits-parser": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz", + "integrity": "sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.0", + "lodash": "^4.2.1", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0", + "trim-off-newlines": "^1.0.0" + } + }, + "conventional-recommended-bump": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-1.2.1.tgz", + "integrity": "sha512-oJjG6DkRgtnr/t/VrPdzmf4XZv8c4xKVJrVT4zrSHd92KEL+EYxSbYoKq8lQ7U5yLMw7130wrcQTLRjM/T+d4w==", + "dev": true, + "requires": { + "concat-stream": "^1.4.10", + "conventional-commits-filter": "^1.1.1", + "conventional-commits-parser": "^2.1.1", + "git-raw-commits": "^1.3.0", + "git-semver-tags": "^1.3.0", + "meow": "^3.3.0", + "object-assign": "^4.0.1" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-text-to-clipboard": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-1.0.4.tgz", + "integrity": "sha512-4hDE+0bgqm4G/nXnt91CP3rc0vOptaePPU5WfVZuhv2AYNJogdLHR4pF1XPgXDAGY4QCzj9pD7zKATa+50sQPg==", + "dev": true + }, + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", + "dev": true + }, + "core-js-compat": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", + "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==", + "dev": true, + "requires": { + "browserslist": "^4.8.5", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-js-pure": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", + "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "corser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", + "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=" + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "create-error-class": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", + "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", + "dev": true, + "requires": { + "capture-stack-trace": "^1.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "csjs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/csjs/-/csjs-1.1.0.tgz", + "integrity": "sha1-G1dTxr2QLaJp3rNpIVWFpdjx84A=", + "dev": true + }, + "csjs-inject": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/csjs-inject/-/csjs-inject-1.0.1.tgz", + "integrity": "sha1-3iIRPEC0bP4X09YqAMd8nX2nUnw=", + "dev": true, + "requires": { + "csjs": "^1.0.0", + "insert-css": "^0.2.0" + } + }, + "csslint": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/csslint/-/csslint-1.0.5.tgz", + "integrity": "sha1-Gcw+2jIhYP0/cjKvHLKjYOiYouk=", + "dev": true, + "requires": { + "clone": "~2.1.0", + "parserlib": "~1.1.1" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", + "dev": true + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-uri-to-buffer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", + "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==", + "dev": true + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "debug-log": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=" + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", + "dev": true, + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "deep-eql": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", + "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=", + "dev": true, + "requires": { + "type-detect": "0.1.1" + } + }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + } + } + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dev": true, + "requires": { + "abstract-leveldown": "~2.6.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "degenerator": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", + "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", + "dev": true, + "requires": { + "ast-types": "0.x.x", + "escodegen": "1.x.x", + "esprima": "3.x.x" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + } + } + }, + "deglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", + "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", + "requires": { + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true + }, + "deps-sort": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", + "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "shasum-object": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + } + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "detective": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", + "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", + "dev": true, + "requires": { + "acorn-node": "^1.6.1", + "defined": "^1.0.0", + "minimist": "^1.1.1" + } + }, + "diagnostics": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", + "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", + "dev": true, + "requires": { + "colorspace": "1.1.x", + "enabled": "1.0.x", + "kuler": "1.0.x" + } + }, + "diff": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", + "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=", + "dev": true, + "requires": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "dot-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", + "integrity": "sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "dev": true + }, + "dotignore": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", + "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "dev": true, + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecstatic": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", + "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==", + "requires": { + "he": "^1.1.1", + "mime": "^1.6.0", + "minimist": "^1.1.0", + "url-join": "^2.0.5" + } + }, + "editorconfig": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.13.3.tgz", + "integrity": "sha512-WkjsUNVCu+ITKDj73QDvi0trvpdDWdkDyHybDGSXPfekLCqwmpD7CP7iPbvBgosNuLcI96XTDwNa75JyFl7tEQ==", + "dev": true, + "requires": { + "bluebird": "^3.0.5", + "commander": "^2.9.0", + "lru-cache": "^3.2.0", + "semver": "^5.1.0", + "sigmund": "^1.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "ejs": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.7.tgz", + "integrity": "sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo=", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.434", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.434.tgz", + "integrity": "sha512-WjzGrE6appXvMyc2kH9Ide7OxsgTuRzag9sjQ5AcbOnbS9ut7P1HzOeEbJFLhr81IR7n2Hlr6qTTSGTXLIX5Pg==", + "dev": true + }, + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "enabled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", + "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", + "dev": true, + "requires": { + "env-variable": "0.0.x" + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "encoding-down": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz", + "integrity": "sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw==", + "dev": true, + "requires": { + "abstract-leveldown": "^5.0.0", + "inherits": "^2.0.3", + "level-codec": "^9.0.0", + "level-errors": "^2.0.0", + "xtend": "^4.0.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + }, + "level-codec": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.1.tgz", + "integrity": "sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q==", + "dev": true + }, + "level-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", + "dev": true, + "requires": { + "errno": "~0.1.1" + } + } + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", + "dev": true + }, + "env-variable": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.6.tgz", + "integrity": "sha512-bHz59NlBbtS0NhftmR8+ExBEekE7br0e01jw+kk0NDro7TtZzBYZ5ScGPs3OmwnpyfHTHOtr1Y6uedCdrIldtg==", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + }, + "dependencies": { + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + } + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escodegen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz", + "integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "requires": { + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint": { + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.10.2.tgz", + "integrity": "sha1-yaEOi/bp1lZRIEd4xQM0Hx6sPOc=", + "requires": { + "babel-code-frame": "^6.16.0", + "chalk": "^1.1.3", + "concat-stream": "^1.4.6", + "debug": "^2.1.1", + "doctrine": "^1.2.2", + "escope": "^3.6.0", + "espree": "^3.3.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "glob": "^7.0.3", + "globals": "^9.2.0", + "ignore": "^3.2.0", + "imurmurhash": "^0.1.4", + "inquirer": "^0.12.0", + "is-my-json-valid": "^2.10.0", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.5.1", + "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", + "lodash": "^4.0.0", + "mkdirp": "^0.5.0", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.1", + "pluralize": "^1.2.1", + "progress": "^1.1.8", + "require-uncached": "^1.0.2", + "shelljs": "^0.7.5", + "strip-bom": "^3.0.0", + "strip-json-comments": "~1.0.1", + "table": "^3.7.8", + "text-table": "~0.2.0", + "user-home": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "eslint-config-standard": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-6.2.1.tgz", + "integrity": "sha1-06aKr8cZFjnn7kQec0hzkCY1QpI=" + }, + "eslint-config-standard-jsx": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-3.2.0.tgz", + "integrity": "sha1-wkDibtkZoRpCqk3oBZRys4Jo1iA=" + }, + "eslint-import-resolver-node": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz", + "integrity": "sha1-Wt2BBujJKNssuiMrzZ76hG49oWw=", + "dev": true, + "requires": { + "debug": "^2.2.0", + "object-assign": "^4.0.1", + "resolve": "^1.1.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "eslint-plugin-es": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.1.tgz", + "integrity": "sha512-5fa/gR2yR3NxQf+UXkeLeP8FBBl6tSgdrAz1+cF84v1FMM4twGwQoqTnn+QxFLcPOrF4pdKEJKDB/q9GoyJrCA==", + "dev": true, + "requires": { + "eslint-utils": "^1.4.2", + "regexpp": "^2.0.1" + } + }, + "eslint-plugin-import": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz", + "integrity": "sha1-crowb60wXWfEgWNIpGmaQimsi04=", + "dev": true, + "requires": { + "builtin-modules": "^1.1.1", + "contains-path": "^0.1.0", + "debug": "^2.2.0", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.2.0", + "eslint-module-utils": "^2.0.0", + "has": "^1.0.1", + "lodash.cond": "^4.3.0", + "minimatch": "^3.0.3", + "pkg-up": "^1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "pkg-up": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz", + "integrity": "sha1-Pgj7RhUlxEIWJKM7n35tCvWwWiY=", + "dev": true, + "requires": { + "find-up": "^1.0.0" + } + } + } + }, + "eslint-plugin-node": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-4.2.3.tgz", + "integrity": "sha512-vIUQPuwbVYdz/CYnlTLsJrRy7iXHQjdEe5wz0XhhdTym3IInM/zZLlPf9nZ2mThsH0QcsieCOWs2vOeCy/22LQ==", + "dev": true, + "requires": { + "ignore": "^3.0.11", + "minimatch": "^3.0.2", + "object-assign": "^4.0.1", + "resolve": "^1.1.7", + "semver": "5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.4.2.tgz", + "integrity": "sha1-G+J5Pq/i0YtbEjuBNsJp+AT+cSI=" + }, + "eslint-plugin-react": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.7.1.tgz", + "integrity": "sha1-Gvlq6lRYVoJRV9l8G1DVqPtkpac=", + "requires": { + "doctrine": "^1.2.2", + "jsx-ast-utils": "^1.3.3" + } + }, + "eslint-plugin-standard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-2.0.1.tgz", + "integrity": "sha1-NYlpn/nJF/LCX3apFmh/ZBw2n/M=" + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "requires": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + }, + "estree-is-member-expression": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/estree-is-member-expression/-/estree-is-member-expression-1.0.0.tgz", + "integrity": "sha512-Ec+X44CapIGExvSZN+pGkmr5p7HwUVQoPQSd458Lqwvaf4/61k/invHSh4BYK8OXnCkfEhWuIoG5hayKLQStIg==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true + }, + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "dev": true, + "requires": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + } + }, + "eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + } + } + }, + "ethashjs": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ethashjs/-/ethashjs-0.0.7.tgz", + "integrity": "sha1-ML/kGWcmaQoMWdO4Jy5w1NDDS64=", + "dev": true, + "requires": { + "async": "^1.4.2", + "buffer-xor": "^1.0.3", + "ethereumjs-util": "^4.0.1", + "miller-rabin": "^4.0.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "ethereumjs-util": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz", + "integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=", + "dev": true, + "requires": { + "bn.js": "^4.8.0", + "create-hash": "^1.1.2", + "keccakjs": "^0.2.0", + "rlp": "^2.0.0", + "secp256k1": "^3.0.1" + } + } + } + }, + "ethereum-bloom-filters": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.7.tgz", + "integrity": "sha512-cDcJJSJ9GMAcURiAWO3DxIEhTL/uWqlQnvgKpuYQzYPrt/izuGU+1ntQmHt0IRq6ADoSYHFnB+aCEFIldjhkMQ==", + "dev": true, + "requires": { + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + } + } + }, + "ethereumjs-account": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz", + "integrity": "sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA==", + "dev": true, + "requires": { + "ethereumjs-util": "^6.0.0", + "rlp": "^2.2.1", + "safe-buffer": "^5.1.1" + } + }, + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "dev": true, + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "ethereumjs-util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", + "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "^0.1.3", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "dev": true, + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + } + } + }, + "ethereumjs-blockchain": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.3.tgz", + "integrity": "sha512-0nJWbyA+Gu0ZKZr/cywMtB/77aS/4lOVsIKbgUN2sFQYscXO5rPbUfrEe7G2Zhjp86/a0VqLllemDSTHvx3vZA==", + "dev": true, + "requires": { + "async": "^2.6.1", + "ethashjs": "~0.0.7", + "ethereumjs-block": "~2.2.2", + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "~6.1.0", + "flow-stoplight": "^1.0.0", + "level-mem": "^3.0.1", + "lru-cache": "^5.1.1", + "rlp": "^2.2.2", + "semaphore": "^1.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "ethereumjs-util": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", + "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "dev": true, + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "ethereumjs-common": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.1.tgz", + "integrity": "sha512-aVUPRLgmXORGXXEVkFYgPhr9TGtpBY2tGhZ9Uh0A3lIUzUDr1x6kQx33SbjPUkLkX3eniPQnIL/2psjkjrOfcQ==", + "dev": true + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "dev": true, + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz", + "integrity": "sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^2.0.0", + "rlp": "^2.2.3", + "secp256k1": "^3.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "ethereumjs-vm": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-4.1.3.tgz", + "integrity": "sha512-RTrD0y7My4O6Qr1P2ZIsMfD6RzL6kU/RhBZ0a5XrPzAeR61crBS7or66ohDrvxDI/rDBxMi+6SnsELih6fzalw==", + "dev": true, + "requires": { + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "core-js-pure": "^3.0.1", + "ethereumjs-account": "^3.0.0", + "ethereumjs-block": "^2.2.2", + "ethereumjs-blockchain": "^4.0.3", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.2", + "ethereumjs-util": "^6.2.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1", + "util.promisify": "^1.0.0" + } + }, + "ethers": { + "version": "4.0.47", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.47.tgz", + "integrity": "sha512-hssRYhngV4hiDNeZmVU/k5/E8xmLG8UpcNUzg6mb7lqhgpFPH/t7nuv20RjRrEf0gblzvi2XwR5Te+V3ZFc9pQ==", + "dev": true, + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.5.2", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + } + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dev": true, + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + }, + "events": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "exec-sh": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz", + "integrity": "sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw==", + "dev": true, + "requires": { + "merge": "^1.2.0" + } + }, + "execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } + } + }, + "execr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/execr/-/execr-1.0.1.tgz", + "integrity": "sha1-eYZeialA9W9yvi3WZW///X8rfIs=", + "dev": true, + "requires": { + "node-getopt": "^0.2.3" + } + }, + "exit-hook": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", + "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" + }, + "exorcist": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/exorcist/-/exorcist-0.4.0.tgz", + "integrity": "sha1-EjD/3t2SSPQvvM+LSkTUyrKePGQ=", + "dev": true, + "requires": { + "minimist": "0.0.5", + "mold-source-map": "~0.4.0", + "nave": "~0.5.1" + }, + "dependencies": { + "minimist": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", + "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=", + "dev": true + } + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "^2.1.0" + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true + } + } + }, + "express-ws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/express-ws/-/express-ws-4.0.0.tgz", + "integrity": "sha512-KEyUw8AwRET2iFjFsI1EJQrJ/fHeGiJtgpYgEWG3yDv4l/To/m3a2GaYfeGyB3lsWdvbesjF5XCMx+SVBgAAYw==", + "dev": true, + "requires": { + "ws": "^5.2.0" + }, + "dependencies": { + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==" + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "dev": true, + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fake-merkle-patricia-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", + "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "dev": true, + "requires": { + "checkpoint-store": "^1.1.0" + } + }, + "falafel": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.4.tgz", + "integrity": "sha512-0HXjo8XASWRmsS0X1EkhwEMZaD3Qvp7FfURwjLKjG1ghfRm/MGZl2r4cWUTv41KdNghTw4OUMmVtdGQp3+H+uQ==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "foreach": "^2.0.5", + "isarray": "^2.0.1", + "object-keys": "^1.0.6" + }, + "dependencies": { + "acorn": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz", + "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==", + "dev": true + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, + "fast-async": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/fast-async/-/fast-async-7.0.6.tgz", + "integrity": "sha512-/iUa3eSQC+Xh5tN6QcVLsEsN7b1DaPIoTZo++VpLLIxtdNW2tEmMZex4TcrMeRnBwMOpZwue2CB171wjt5Kgqg==", + "dev": true, + "requires": { + "@babel/generator": "^7.0.0-beta.44", + "@babel/helper-module-imports": "^7.0.0-beta.44", + "babylon": "^7.0.0-beta.44", + "nodent-runtime": "^3.2.1", + "nodent-transform": "^3.2.4" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, + "fast-url-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", + "integrity": "sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0=", + "dev": true, + "requires": { + "punycode": "^1.3.2" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "fecha": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", + "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==", + "dev": true + }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "dev": true, + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "flat-cache": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "requires": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + } + }, + "flow-stoplight": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flow-stoplight/-/flow-stoplight-1.0.0.tgz", + "integrity": "sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s=", + "dev": true + }, + "fnjson": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fnjson/-/fnjson-1.3.0.tgz", + "integrity": "sha1-oD96gM/ynILe5ZrJx3pi6CuHZFk=", + "dev": true + }, + "follow-redirects": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", + "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", + "requires": { + "debug": "^3.0.0" + } + }, + "font-awesome": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=", + "dev": true + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "ftp": { + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", + "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", + "dev": true, + "requires": { + "readable-stream": "1.1.x", + "xregexp": "2.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "ganache-cli": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.9.1.tgz", + "integrity": "sha512-VPBumkNUZzXDRQwVOby5YyQpd5t1clkr06xMgB28lZdEIn5ht1GMwUskOTFOAxdkQ4J12IWP0gdeacVRGowqbA==", + "dev": true, + "requires": { + "ethereumjs-util": "6.1.0", + "source-map-support": "0.5.12", + "yargs": "13.2.4" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "bundled": true, + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "bundled": true, + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "bindings": { + "version": "1.5.0", + "bundled": true, + "dev": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bip66": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "bn.js": { + "version": "4.11.8", + "bundled": true, + "dev": true + }, + "brorand": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "bundled": true, + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "bundled": true, + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "cliui": { + "version": "5.0.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "color-convert": { + "version": "1.9.3", + "bundled": true, + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "bundled": true, + "dev": true + }, + "create-hash": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "bundled": true, + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "drbg.js": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + } + }, + "elliptic": { + "version": "6.5.0", + "bundled": true, + "dev": true, + "requires": { + "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" + } + }, + "emoji-regex": { + "version": "7.0.3", + "bundled": true, + "dev": true + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "ethereumjs-util": { + "version": "6.1.0", + "bundled": true, + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "0.1.6", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + }, + "ethjs-util": { + "version": "0.1.6", + "bundled": true, + "dev": true, + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "find-up": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "hash-base": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "inherits": { + "version": "2.0.4", + "bundled": true, + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-hex-prefixed": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "keccak": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + }, + "lcid": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem": { + "version": "4.3.0", + "bundled": true, + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "nan": { + "version": "2.14.0", + "bundled": true, + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-locale": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "2.2.0", + "bundled": true, + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "bundled": true, + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "pump": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "ripemd160": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.3", + "bundled": true, + "dev": true, + "requires": { + "bn.js": "^4.11.1", + "safe-buffer": "^5.1.1" + } + }, + "safe-buffer": { + "version": "5.2.0", + "bundled": true, + "dev": true + }, + "secp256k1": { + "version": "3.7.1", + "bundled": true, + "dev": true, + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + } + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "bundled": true, + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + }, + "source-map-support": { + "version": "0.5.12", + "bundled": true, + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "string-width": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "strip-hex-prefix": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "which": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "y18n": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "13.2.4", + "bundled": true, + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.0" + } + }, + "yargs-parser": { + "version": "13.1.1", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "requires": { + "is-property": "^1.0.2" + } + }, + "generate-object-property": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", + "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", + "requires": { + "is-property": "^1.0.0" + } + }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "meow": "^3.3.0", + "normalize-package-data": "^2.3.0", + "parse-github-repo-url": "^1.3.0", + "through2": "^2.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=", + "dev": true + }, + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-uri": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.4.tgz", + "integrity": "sha512-v7LT/s8kVjs+Tx0ykk1I+H/rbpzkHvuIq87LmeXptcf5sNWm9uQiwjNAt94SJPA1zOlCntmnOlJvVWKmzsxG8Q==", + "dev": true, + "requires": { + "data-uri-to-buffer": "1", + "debug": "2", + "extend": "~3.0.2", + "file-uri-to-path": "1", + "ftp": "~0.3.10", + "readable-stream": "2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "gists": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gists/-/gists-1.0.1.tgz", + "integrity": "sha512-U/PcgSLfEqnbZhhmhDq/9TE2xtPN3b/FmLY6kKVWjTT4xoDr2srXGgff2Zr0iyukFCjpT/bKuFTu5gRtT0ITGQ==", + "dev": true, + "requires": { + "github-base": "^0.5.4" + } + }, + "git-raw-commits": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.6.tgz", + "integrity": "sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg==", + "dev": true, + "requires": { + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "dev": true, + "requires": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "git-semver-tags": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.6.tgz", + "integrity": "sha512-2jHlJnln4D/ECk9FxGEBh3k44wgYdWjWDtMmJPaecjoRmxKo3Y1Lh8GMYuOPu04CHw86NTAODchYjC5pnpMQig==", + "dev": true, + "requires": { + "meow": "^4.0.0", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "dev": true, + "requires": { + "ini": "^1.3.2" + } + }, + "github-base": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/github-base/-/github-base-0.5.4.tgz", + "integrity": "sha1-kLyqlhda0yICGVwzfhj7ad40m0E=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "is-buffer": "^1.1.5", + "mixin-deep": "^1.2.0", + "object.omit": "^2.0.1", + "parse-link-header": "^0.4.1", + "simple-get": "^2.5.1", + "static-extend": "^0.1.2", + "use": "^3.0.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + } + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "^2.0.0" + } + }, + "glob-slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/glob-slash/-/glob-slash-1.0.0.tgz", + "integrity": "sha1-/lLvpDMjP3Si/mTHq7m8hIICq5U=", + "dev": true + }, + "glob-slasher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/glob-slasher/-/glob-slasher-1.0.1.tgz", + "integrity": "sha1-dHoOW7IiZC7hDT4FRD4QlJPLD44=", + "dev": true, + "requires": { + "glob-slash": "^1.0.0", + "lodash.isobject": "^2.4.1", + "toxic": "^1.0.0" + } + }, + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "growl": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz", + "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", + "dev": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "uglify-js": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.2.tgz", + "integrity": "sha512-zGVwKslUAD/EeqOrD1nQaBmXIHl1Vw371we8cvS8I6mYK9rmgX5tv8AAeJdfsQ3Kk5mGax2SVV/AizxdNGhl7Q==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.3" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "requires": { + "has-symbol-support-x": "^1.4.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, + "header-case": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", + "integrity": "sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.3" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", + "dev": true + }, + "http-proxy": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", + "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", + "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", + "dev": true, + "requires": { + "agent-base": "2", + "debug": "2", + "extend": "3" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "http-server": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.11.1.tgz", + "integrity": "sha512-6JeGDGoujJLmhjiRGlt8yK8Z9Kl0vnl/dQoQZlc4oeqaUoAKQg94NILLfrY3oWzSyFaQCVNTcKE5PZ3cH8VP9w==", + "requires": { + "colors": "1.0.3", + "corser": "~2.0.0", + "ecstatic": "^3.0.0", + "http-proxy": "^1.8.1", + "opener": "~1.4.0", + "optimist": "0.6.x", + "portfinder": "^1.0.13", + "union": "~0.4.3" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "https-proxy-agent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", + "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", + "dev": true, + "requires": { + "agent-base": "2", + "debug": "2", + "extend": "3" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "hyperscript-attribute-to-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hyperscript-attribute-to-property/-/hyperscript-attribute-to-property-1.0.2.tgz", + "integrity": "sha512-oerMul16jZCmrbNsUw8QgrtDzF8lKgFri1bKQjReLw1IhiiNkI59CWuzZjJDGT79UQ1YiWqXhJMv/tRMVqgtkA==", + "dev": true + }, + "hyperx": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/hyperx/-/hyperx-2.5.4.tgz", + "integrity": "sha512-iOkSh7Yse7lsN/B9y7OsevLWjeXPqGuHQ5SbwaiJM5xAhWFqhoN6erpK1dQsS12OFU36lyai1pnx1mmzWLQqcA==", + "dev": true, + "requires": { + "hyperscript-attribute-to-property": "^1.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "dev": true, + "requires": { + "punycode": "2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", + "dev": true + } + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" + }, + "immediate": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", + "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=", + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "~0.5.3" + } + }, + "inquirer": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", + "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", + "requires": { + "ansi-escapes": "^1.1.0", + "ansi-regex": "^2.0.0", + "chalk": "^1.0.0", + "cli-cursor": "^1.0.1", + "cli-width": "^2.0.0", + "figures": "^1.3.5", + "lodash": "^4.3.0", + "readline2": "^1.0.1", + "run-async": "^0.1.0", + "rx-lite": "^3.1.2", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.0", + "through": "^2.3.6" + } + }, + "insert-css": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/insert-css/-/insert-css-0.2.0.tgz", + "integrity": "sha1-0VeJlxZi2YmcKJd/tiINU4HSRRo=", + "dev": true + }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + } + } + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "ip": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.0.1.tgz", + "integrity": "sha1-x+NWzeoiWucbNtcPLnGpK6TkJZA=", + "dev": true + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "ipfs-mini": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ipfs-mini/-/ipfs-mini-1.1.5.tgz", + "integrity": "sha512-BzsoCa3V/gxN2eEHnyqggOdreAwnvbddj4jUvp6Q7jXuzXx9q5XakXe8mG8qV0bn4bMKdH/7BUDbiWBCEMuYBg==", + "dev": true, + "requires": { + "xmlhttprequest": "^1.8.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-boolean-attribute": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/is-boolean-attribute/-/is-boolean-attribute-0.0.1.tgz", + "integrity": "sha1-JKtZt9y52jYSx3PmDGVlZeWgmAw=", + "dev": true + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "dev": true, + "requires": { + "ci-info": "^1.5.0" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-electron": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.0.tgz", + "integrity": "sha512-SpMppC2XR3YdxSzczXReBjqs2zGscWQpBIKqwXYBFic0ERaxNVgwLCHwOLZeESfdJQjX0RDvrJ1lBXX2ij+G1Q==", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "^2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", + "dev": true + }, + "is-lower-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", + "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=", + "dev": true, + "requires": { + "lower-case": "^1.1.0" + } + }, + "is-my-ip-valid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", + "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==" + }, + "is-my-json-valid": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.20.0.tgz", + "integrity": "sha512-XTHBZSIIxNsIsZXg7XB5l8z/OBFosl1Wao4tXLpeC7eKU4Vm/kdop2azkPqULwnfGQjmeDIyey9g7afMMtdWAA==", + "requires": { + "generate-function": "^2.0.0", + "generate-object-property": "^1.1.0", + "is-my-ip-valid": "^1.0.0", + "jsonpointer": "^4.0.0", + "xtend": "^4.0.0" + } + }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", + "dev": true + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" + }, + "is-redirect": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" + }, + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-subset": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", + "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-upper-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", + "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=", + "dev": true, + "requires": { + "upper-case": "^1.1.0" + } + }, + "is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isbinaryfile": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz", + "integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==", + "dev": true, + "requires": { + "buffer-alloc": "^1.2.0" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", + "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "dev": true, + "requires": { + "@babel/generator": "^7.4.0", + "@babel/parser": "^7.4.3", + "@babel/template": "^7.4.0", + "@babel/traverse": "^7.4.3", + "@babel/types": "^7.4.0", + "istanbul-lib-coverage": "^2.0.5", + "semver": "^6.0.0" + } + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "requires": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + } + }, + "javascript-serialize": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/javascript-serialize/-/javascript-serialize-1.6.1.tgz", + "integrity": "sha1-R30ShW/Y2y8WGfhUiLU9O6KIRXg=", + "dev": true, + "requires": { + "circular-json": "^0.3.0", + "component-type": "^1.2.0", + "dom-serialize": "^2.2.1", + "fnjson": "^1.3.0" + } + }, + "jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", + "dev": true + }, + "js-base64": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz", + "integrity": "sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==", + "dev": true + }, + "js-beautify": { + "version": "1.6.14", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.14.tgz", + "integrity": "sha1-07j3Mi0CuSd9WL0jgmTDJ+WARM0=", + "dev": true, + "requires": { + "config-chain": "~1.1.5", + "editorconfig": "^0.13.2", + "mkdirp": "~0.5.0", + "nopt": "~3.0.1" + } + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json3": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz", + "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE=", + "dev": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsonpointer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", + "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsx-ast-utils": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", + "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=" + }, + "keccak": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", + "integrity": "sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "inherits": "^2.0.4", + "nan": "^2.14.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "keccakjs": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.3.tgz", + "integrity": "sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg==", + "dev": true, + "requires": { + "browserify-sha3": "^0.0.4", + "sha3": "^1.2.2" + } + }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + } + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "kuler": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", + "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", + "dev": true, + "requires": { + "colornames": "^1.1.1" + } + }, + "labeled-stream-splicer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", + "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "stream-splicer": "^2.0.0" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lerna": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-2.11.0.tgz", + "integrity": "sha512-kgM6zwe2P2tR30MYvgiLLW+9buFCm6E7o8HnRlhTgm70WVBvXVhydqv+q/MF2HrVZkCawfVtCfetyQmtd4oHhQ==", + "dev": true, + "requires": { + "async": "^1.5.0", + "chalk": "^2.1.0", + "cmd-shim": "^2.0.2", + "columnify": "^1.5.4", + "command-join": "^2.0.0", + "conventional-changelog-cli": "^1.3.13", + "conventional-recommended-bump": "^1.2.1", + "dedent": "^0.7.0", + "execa": "^0.8.0", + "find-up": "^2.1.0", + "fs-extra": "^4.0.1", + "get-port": "^3.2.0", + "glob": "^7.1.2", + "glob-parent": "^3.1.0", + "globby": "^6.1.0", + "graceful-fs": "^4.1.11", + "hosted-git-info": "^2.5.0", + "inquirer": "^3.2.2", + "is-ci": "^1.0.10", + "load-json-file": "^4.0.0", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "npmlog": "^4.1.2", + "p-finally": "^1.0.0", + "package-json": "^4.0.1", + "path-exists": "^3.0.0", + "read-cmd-shim": "^1.0.1", + "read-pkg": "^3.0.0", + "rimraf": "^2.6.1", + "safe-buffer": "^5.1.1", + "semver": "^5.4.1", + "signal-exit": "^3.0.2", + "slash": "^1.0.0", + "strong-log-transformer": "^1.0.6", + "temp-write": "^3.3.0", + "write-file-atomic": "^2.3.0", + "write-json-file": "^2.2.0", + "write-pkg": "^3.1.0", + "yargs": "^8.0.2" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + } + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.0.4", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rx-lite": "^4.0.8", + "rx-lite-aggregates": "^4.0.8", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "dev": true + }, + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dev": true, + "requires": { + "errno": "~0.1.1" + } + }, + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "level-mem": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-3.0.1.tgz", + "integrity": "sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg==", + "dev": true, + "requires": { + "level-packager": "~4.0.0", + "memdown": "~3.0.0" + }, + "dependencies": { + "abstract-leveldown": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + }, + "memdown": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-3.0.0.tgz", + "integrity": "sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA==", + "dev": true, + "requires": { + "abstract-leveldown": "~5.0.0", + "functional-red-black-tree": "~1.0.1", + "immediate": "~3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + } + } + } + }, + "level-packager": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-4.0.1.tgz", + "integrity": "sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q==", + "dev": true, + "requires": { + "encoding-down": "~5.0.0", + "levelup": "^3.0.0" + }, + "dependencies": { + "abstract-leveldown": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz", + "integrity": "sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + }, + "deferred-leveldown": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz", + "integrity": "sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww==", + "dev": true, + "requires": { + "abstract-leveldown": "~5.0.0", + "inherits": "^2.0.3" + } + }, + "level-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", + "dev": true, + "requires": { + "errno": "~0.1.1" + } + }, + "level-iterator-stream": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz", + "integrity": "sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "xtend": "^4.0.0" + } + }, + "levelup": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz", + "integrity": "sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg==", + "dev": true, + "requires": { + "deferred-leveldown": "~4.0.0", + "level-errors": "~2.0.0", + "level-iterator-stream": "~3.0.0", + "xtend": "~4.0.0" + } + } + } + }, + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dev": true, + "requires": { + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dev": true, + "requires": { + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + } + } + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "dev": true, + "requires": { + "leven": "^3.1.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lit-element": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-2.3.1.tgz", + "integrity": "sha512-tOcUAmeO3BzwiQ7FGWdsshNvC0HVHcTFYw/TLIImmKwXYoV0E7zCBASa8IJ7DiP4cen/Yoj454gS0qqTnIGsFA==", + "dev": true, + "requires": { + "lit-html": "^1.1.1" + } + }, + "lit-html": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.2.1.tgz", + "integrity": "sha512-GSJHHXMGLZDzTRq59IUfL9FCdAlGfqNp/dEa7k7aBaaWD+JKaCjsAk9KYm2V12ItonVaYx2dprN66Zdm1AuBTQ==", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "lodash._arraycopy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz", + "integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE=", + "dev": true + }, + "lodash._arrayeach": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz", + "integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=", + "dev": true + }, + "lodash._baseassign": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", + "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", + "dev": true, + "requires": { + "lodash._basecopy": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "lodash._baseclone": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz", + "integrity": "sha1-MDUZv2OT/n5C802LYw73eU41Qrc=", + "dev": true, + "requires": { + "lodash._arraycopy": "^3.0.0", + "lodash._arrayeach": "^3.0.0", + "lodash._baseassign": "^3.0.0", + "lodash._basefor": "^3.0.0", + "lodash.isarray": "^3.0.0", + "lodash.keys": "^3.0.0" + } + }, + "lodash._basecopy": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", + "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", + "dev": true + }, + "lodash._basecreate": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz", + "integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE=", + "dev": true + }, + "lodash._basefor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz", + "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=", + "dev": true + }, + "lodash._bindcallback": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", + "dev": true + }, + "lodash._getnative": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", + "dev": true + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", + "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", + "dev": true + }, + "lodash._objecttypes": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz", + "integrity": "sha1-fAt/admKH3ZSn4kLDNsbTf7BHBE=", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash._stack": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lodash._stack/-/lodash._stack-4.1.3.tgz", + "integrity": "sha1-dRqnbBuWSwR+dtFPxyoJP8teLdA=", + "dev": true + }, + "lodash.clone": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-3.0.3.tgz", + "integrity": "sha1-hGiMc9MrWpDKJWFpY/GJJSqZcEM=", + "dev": true, + "requires": { + "lodash._baseclone": "^3.0.0", + "lodash._bindcallback": "^3.0.0", + "lodash._isiterateecall": "^3.0.0" + } + }, + "lodash.clonedeep": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz", + "integrity": "sha1-oKHkDYKl6on/WxR7hETtY9koJ9s=", + "dev": true, + "requires": { + "lodash._baseclone": "^3.0.0", + "lodash._bindcallback": "^3.0.0" + } + }, + "lodash.cond": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", + "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", + "dev": true + }, + "lodash.create": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz", + "integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=", + "dev": true, + "requires": { + "lodash._baseassign": "^3.0.0", + "lodash._basecreate": "^3.0.0", + "lodash._isiterateecall": "^3.0.0" + } + }, + "lodash.defaultsdeep": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.3.2.tgz", + "integrity": "sha1-bBpYbmxWR7DmTi15gUG4g2FYvoo=", + "dev": true, + "requires": { + "lodash._baseclone": "^4.0.0", + "lodash._stack": "^4.0.0", + "lodash.isplainobject": "^4.0.0", + "lodash.keysin": "^4.0.0", + "lodash.mergewith": "^4.0.0", + "lodash.rest": "^4.0.0" + }, + "dependencies": { + "lodash._baseclone": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-4.5.7.tgz", + "integrity": "sha1-zkKt4IOE711i+nfDD2GkbmhvhDQ=", + "dev": true + } + } + }, + "lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", + "dev": true + }, + "lodash.isarray": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", + "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", + "dev": true + }, + "lodash.isobject": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-2.4.1.tgz", + "integrity": "sha1-Wi5H/mmVPx7mMafrof5k0tBlWPU=", + "dev": true, + "requires": { + "lodash._objecttypes": "~2.4.1" + } + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.keys": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", + "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", + "dev": true, + "requires": { + "lodash._getnative": "^3.0.0", + "lodash.isarguments": "^3.0.0", + "lodash.isarray": "^3.0.0" + } + }, + "lodash.keysin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-4.2.0.tgz", + "integrity": "sha1-jMP7NcLZSsxEOhhj4C+kB5nqbyg=", + "dev": true + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "lodash.mergewith": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", + "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", + "dev": true + }, + "lodash.rest": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.5.tgz", + "integrity": "sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "lodash.toarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", + "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", + "dev": true + }, + "logform": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.1.2.tgz", + "integrity": "sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ==", + "dev": true, + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^2.3.3", + "ms": "^2.1.1", + "triple-beam": "^1.3.0" + }, + "dependencies": { + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + } + } + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lower-case-first": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", + "integrity": "sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=", + "dev": true, + "requires": { + "lower-case": "^1.1.2" + } + }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, + "lru-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", + "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", + "dev": true, + "requires": { + "pseudomap": "^1.0.1" + } + }, + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "dev": true + }, + "magic-string": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.23.2.tgz", + "integrity": "sha512-oIUZaAxbcxYIp4AyLafV6OVKoB3YouZs0UTCJ8mOKBHNyJgGDaMJ4TgA+VylJh6fx7EQCC52XkbURxxG9IoJXA==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.1" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "marked": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", + "dev": true + }, + "marked-terminal": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/marked-terminal/-/marked-terminal-3.3.0.tgz", + "integrity": "sha512-+IUQJ5VlZoAFsM5MHNT7g3RHSkA3eETqhRCdXv4niUMAKHQ7lb1yvAcuGPmm4soxhmtX13u4Li6ZToXtvSEH+A==", + "dev": true, + "requires": { + "ansi-escapes": "^3.1.0", + "cardinal": "^2.1.1", + "chalk": "^2.4.1", + "cli-table": "^0.3.1", + "node-emoji": "^1.4.1", + "supports-hyperlinks": "^1.0.1" + }, + "dependencies": { + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "math-random": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.4.tgz", + "integrity": "sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==", + "dev": true + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dev": true, + "requires": { + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + } + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + }, + "dependencies": { + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + } + } + }, + "merge": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==", + "dev": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-source-map": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz", + "integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=", + "dev": true, + "requires": { + "source-map": "^0.5.6" + } + }, + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dev": true, + "requires": { + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "ethereumjs-util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", + "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", + "dev": true, + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "ethjs-util": "^0.1.3", + "keccak": "^1.0.2", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1", + "secp256k1": "^3.0.1" + } + }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "dev": true, + "requires": { + "bindings": "^1.2.1", + "inherits": "^2.0.3", + "nan": "^2.2.1", + "safe-buffer": "^5.1.0" + } + } + } + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true + }, + "micro": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/micro/-/micro-9.3.1.tgz", + "integrity": "sha512-83uimpPJqfwkfKvJl2WWontBlV3hmzrIgyJ+L2uhDXKNk7Ll+/ezK3zBz7TljubpKPqjM0JdT2Ker4MTPmhjgA==", + "dev": true, + "requires": { + "arg": "2.0.0", + "chalk": "2.4.0", + "content-type": "1.0.4", + "is-stream": "1.1.0", + "raw-body": "2.3.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "arg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-2.0.0.tgz", + "integrity": "sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w==", + "dev": true + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=", + "dev": true + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "dev": true, + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "raw-body": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", + "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "dev": true, + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.2", + "iconv-lite": "0.4.19", + "unpipe": "1.0.0" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "dev": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "requires": { + "dom-walk": "^0.1.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "minixhr": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/minixhr/-/minixhr-3.2.2.tgz", + "integrity": "sha512-5KITy0bwDq5tu39H2B3cHJJV+oeja1RByfqIB6eShf4dQFVRuvw11jq9+hQ8QcS21xIUyD2VDeFTrAA3IOMsJw==", + "dev": true + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "dev": true, + "requires": { + "mkdirp": "*" + } + }, + "mkpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-1.0.0.tgz", + "integrity": "sha1-67Opd+evHGg65v2hK1Raa6bFhT0=", + "dev": true + }, + "mocha-nightwatch": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mocha-nightwatch/-/mocha-nightwatch-3.2.2.tgz", + "integrity": "sha1-kby5s73gV912d8eBJeSR5Y1mZHw=", + "dev": true, + "requires": { + "browser-stdout": "1.3.0", + "commander": "2.9.0", + "debug": "2.2.0", + "diff": "1.4.0", + "escape-string-regexp": "1.0.5", + "glob": "7.0.5", + "growl": "1.9.2", + "json3": "3.3.2", + "lodash.create": "3.1.1", + "mkdirp": "0.5.1", + "supports-color": "3.1.2" + }, + "dependencies": { + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true, + "requires": { + "ms": "0.7.1" + } + }, + "glob": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.5.tgz", + "integrity": "sha1-tCAqaQmbu00pKnwblbZoK2fr3JU=", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.2", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "supports-color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz", + "integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "mock-fs": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.12.0.tgz", + "integrity": "sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ==", + "dev": true + }, + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "dev": true + }, + "module-deps": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.2.tgz", + "integrity": "sha512-a9y6yDv5u5I4A+IPHTnqFxcaKr4p50/zxTjcQJaX2ws9tN/W6J6YXnEKhqRyPhl494dkcxx951onSKVezmI+3w==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^1.7.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.2.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "mold-source-map": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/mold-source-map/-/mold-source-map-0.4.0.tgz", + "integrity": "sha1-z2fgsxxHq5uttcnCVlGGISe7gxc=", + "dev": true, + "requires": { + "convert-source-map": "^1.1.0", + "through": "~2.2.7" + }, + "dependencies": { + "through": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz", + "integrity": "sha1-bo4hIAGR1OtqmfbwEN9Gqhxusr0=", + "dev": true + } + } + }, + "moment": { + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.25.3.tgz", + "integrity": "sha512-PuYv0PHxZvzc15Sp8ybUCoQ+xpyPWvjOuK72a5ovzp2LI32rJXOiIfyoFoYvG3s6EwwrdkMyWuRiEHSZRLJNdg==", + "dev": true + }, + "morphdom": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/morphdom/-/morphdom-2.6.1.tgz", + "integrity": "sha512-Y8YRbAEP3eKykroIBWrjcfMw7mmwJfjhqdpSvoqinu8Y702nAwikpXcNFDiIkyvfCLxLM9Wu95RZqo4a9jFBaA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", + "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=" + }, + "mutexify": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/mutexify/-/mutexify-1.3.0.tgz", + "integrity": "sha512-WNPlgZ3AHETGSa4jeRP4aW6BPQ/a++MwoMFFIgrDg80+m70mbxuNOrevANfBDmur82zxTFAY3OwvMAvqrkV2sA==", + "dev": true + }, + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "dev": true + }, + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=", + "dev": true + }, + "nanoassert": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz", + "integrity": "sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40=", + "dev": true + }, + "nanobench": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nanobench/-/nanobench-2.1.1.tgz", + "integrity": "sha512-z+Vv7zElcjN+OpzAxAquUayFLGK3JI/ubCl0Oh64YQqsTGG09CGqieJVQw4ui8huDnnAgrvTv93qi5UaOoNj8A==", + "dev": true, + "requires": { + "browser-process-hrtime": "^0.1.2", + "chalk": "^1.1.3", + "mutexify": "^1.1.0", + "pretty-hrtime": "^1.0.2" + } + }, + "nanohtml": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/nanohtml/-/nanohtml-1.9.1.tgz", + "integrity": "sha512-4snfp20yKdA6+dT1vv0F4l1oYmnFXPNHk3ZFTfOldD9LamFxQZ9gWk4gJz7wflq3XROLzrGQHfo0HT4V4kSkhQ==", + "dev": true, + "requires": { + "acorn-node": "^1.8.2", + "camel-case": "^3.0.0", + "convert-source-map": "^1.5.1", + "estree-is-member-expression": "^1.0.0", + "hyperx": "^2.5.0", + "is-boolean-attribute": "0.0.1", + "nanoassert": "^1.1.0", + "nanobench": "^2.1.0", + "normalize-html-whitespace": "^0.2.0", + "through2": "^2.0.3", + "transform-ast": "^2.4.0" + } + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "nave": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/nave/-/nave-0.5.3.tgz", + "integrity": "sha1-Ws7HI3WFblx2yDvSGmjXE+tfG6Q=", + "dev": true + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "netmask": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", + "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "nightwatch": { + "version": "0.9.21", + "resolved": "https://registry.npmjs.org/nightwatch/-/nightwatch-0.9.21.tgz", + "integrity": "sha1-nnlKdRS0/V9GYC02jlBRUjKrnpA=", + "dev": true, + "requires": { + "chai-nightwatch": "~0.1.x", + "ejs": "2.5.7", + "lodash.clone": "3.0.3", + "lodash.defaultsdeep": "4.3.2", + "minimatch": "3.0.3", + "mkpath": "1.0.0", + "mocha-nightwatch": "3.2.2", + "optimist": "0.6.1", + "proxy-agent": "2.0.0", + "q": "1.4.1" + }, + "dependencies": { + "minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q=", + "dev": true, + "requires": { + "brace-expansion": "^1.0.0" + } + } + } + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "node-emoji": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz", + "integrity": "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==", + "dev": true, + "requires": { + "lodash.toarray": "^4.4.0" + } + }, + "node-getopt": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/node-getopt/-/node-getopt-0.2.4.tgz", + "integrity": "sha512-06LC4wHO+nyH0J07dUzFsZTVZMsMMKTkXo8BUTmuYbJhbsKX2cVDn2xADoFqjbnBYThVlGSlaM10CDyEi+48Iw==", + "dev": true + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-notifier": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-4.6.1.tgz", + "integrity": "sha1-BW0UJE89zBzq3+aK+c/wxUc6M/M=", + "dev": true, + "requires": { + "cli-usage": "^0.1.1", + "growly": "^1.2.0", + "lodash.clonedeep": "^3.0.0", + "minimist": "^1.1.1", + "semver": "^5.1.0", + "shellwords": "^0.1.0", + "which": "^1.0.5" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "node-releases": { + "version": "1.1.55", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.55.tgz", + "integrity": "sha512-H3R3YR/8TjT5WPin/wOoHOUPHgvj8leuU/Keta/rwelEQN9pA/S2Dx8/se4pZ2LBxSd0nAGzsNzhqwa77v7F1w==", + "dev": true + }, + "nodent": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/nodent/-/nodent-3.2.11.tgz", + "integrity": "sha512-y+ofPYAJvGJB50B95pE26iPJqdTzgYKW3AjsqdLQboetJxH8tGRn1vr1gIe+z7PA7ZwcEUTOrahj6RaVzU2ivA==", + "dev": true, + "requires": { + "nodent-compiler": "^3.2.11", + "nodent-runtime": "^3.2.1", + "resolve": "^1.5.0" + } + }, + "nodent-compiler": { + "version": "3.2.11", + "resolved": "https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.2.11.tgz", + "integrity": "sha512-rfDrGWdgIJYomPUzR8nXiWNuIhJ7cVodPeZP3Ho65LEycuaX2uVNZ0ytpcfrmUKzdFeLRtye9+pHe8OynPZuPQ==", + "dev": true, + "requires": { + "acorn": ">= 2.5.2 <= 5.7.3", + "acorn-es7-plugin": "^1.1.7", + "nodent-transform": "^3.2.9", + "source-map": "^0.5.7" + }, + "dependencies": { + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + } + } + }, + "nodent-runtime": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz", + "integrity": "sha512-7Ws63oC+215smeKJQCxzrK21VFVlCFBkwl0MOObt0HOpVQXs3u483sAmtkF33nNqZ5rSOQjB76fgyPBmAUrtCA==", + "dev": true + }, + "nodent-transform": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.9.tgz", + "integrity": "sha512-4a5FH4WLi+daH/CGD5o/JWRR8W5tlCkd3nrDSkxbOzscJTyTUITltvOJeQjg3HJ1YgEuNyiPhQbvbtRjkQBByQ==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "nopy": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/nopy/-/nopy-0.2.7.tgz", + "integrity": "sha512-1kuUqU7o+Do7mEtvZTU7Ru+Vh4pYjLM1VjnR23zHI3DdAQudqNhCytszAwNjYFL+XEWpSiYf2P5ERYzfsZ2NCA==", + "dev": true + }, + "normalize-html-whitespace": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/normalize-html-whitespace/-/normalize-html-whitespace-0.2.0.tgz", + "integrity": "sha1-EBci9kI1Ucdc24+dEE/4UNrx4Q4=", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + }, + "notify-error": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/notify-error/-/notify-error-1.2.0.tgz", + "integrity": "sha1-BcEpSkv93xrbykq5JH6KVx9waZQ=", + "dev": true, + "requires": { + "get-stdin": "^5.0.0", + "node-notifier": "^4.2.3", + "object-assign": "^4.0.1", + "rc": "^1.1.1" + } + }, + "npm-link-local": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/npm-link-local/-/npm-link-local-1.1.0.tgz", + "integrity": "sha1-r8lvA7ba6FC3UX1/7N/MD9DMoRw=", + "dev": true, + "requires": { + "optimist": "^0.6.1", + "rimraf": "^2.6.1" + } + }, + "npm-merge-driver": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/npm-merge-driver/-/npm-merge-driver-2.3.6.tgz", + "integrity": "sha512-uPjCEWZ93f379zw0AMEgFtZIlpSSnpXc8BEIcs8yYHEZs5Y3d85OZHisLjNhjbYnbdAznxTq+VbyBWAQZDEm9w==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1", + "yargs": "^10.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "execa": { + "version": "0.7.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "get-caller-file": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "lcid": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "mem": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "mimic-fn": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "which": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "10.0.3", + "bundled": true, + "dev": true, + "requires": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^8.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "cliui": { + "version": "3.2.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + } + } + }, + "yargs-parser": { + "version": "8.0.0", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "dev": true + } + } + } + } + }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + } + } + }, + "nyc": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.3.0.tgz", + "integrity": "sha512-P+FwIuro2aFG6B0Esd9ZDWUd51uZrAEoGutqZxzrVmYl3qSfkLgcQpBPBjtDFsUQLFY1dvTQJPOyeqr8S9GF8w==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "arrify": "^1.0.1", + "caching-transform": "^3.0.1", + "convert-source-map": "^1.6.0", + "find-cache-dir": "^2.0.0", + "find-up": "^3.0.0", + "foreground-child": "^1.5.6", + "glob": "^7.1.3", + "istanbul-lib-coverage": "^2.0.3", + "istanbul-lib-hook": "^2.0.3", + "istanbul-lib-instrument": "^3.1.0", + "istanbul-lib-report": "^2.0.4", + "istanbul-lib-source-maps": "^3.0.2", + "istanbul-reports": "^2.1.1", + "make-dir": "^1.3.0", + "merge-source-map": "^1.1.0", + "resolve-from": "^4.0.0", + "rimraf": "^2.6.3", + "signal-exit": "^3.0.2", + "spawn-wrap": "^1.4.2", + "test-exclude": "^5.1.0", + "uuid": "^3.3.2", + "yargs": "^12.0.5", + "yargs-parser": "^11.1.1" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "append-transform": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "arrify": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "async": { + "version": "2.6.2", + "bundled": true, + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "caching-transform": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "hasha": "^3.0.0", + "make-dir": "^1.3.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.3.0" + } + }, + "camelcase": { + "version": "5.0.0", + "bundled": true, + "dev": true + }, + "cliui": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "commander": { + "version": "2.17.1", + "bundled": true, + "dev": true, + "optional": true + }, + "commondir": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "cross-spawn": { + "version": "4.0.2", + "bundled": true, + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "default-require-extensions": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "bundled": true, + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es6-error": { + "version": "4.1.1", + "bundled": true, + "dev": true + }, + "execa": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "bundled": true, + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + } + } + }, + "find-cache-dir": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^1.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "foreground-child": { + "version": "1.5.6", + "bundled": true, + "dev": true, + "requires": { + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "bundled": true, + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "bundled": true, + "dev": true + }, + "handlebars": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "has-flag": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "hasha": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "bundled": true, + "dev": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true, + "dev": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "invert-kv": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "isexe": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "istanbul-lib-coverage": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "istanbul-lib-hook": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, + "istanbul-lib-report": { + "version": "2.0.4", + "bundled": true, + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "supports-color": "^6.0.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "bundled": true, + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.3", + "make-dir": "^1.3.0", + "rimraf": "^2.6.2", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "istanbul-reports": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "handlebars": "^4.1.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "lcid": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "load-json-file": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "bundled": true, + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "bundled": true, + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "bundled": true, + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "1.3.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "bundled": true, + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "mem": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^2.0.0" + } + }, + "merge-source-map": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true + } + } + }, + "mimic-fn": { + "version": "1.2.0", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.10", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "bundled": true, + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-defer": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "p-is-promise": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "p-limit": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "package-hash": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "path-key": { + "version": "2.0.1", + "bundled": true, + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "bundled": true, + "dev": true + }, + "path-type": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "pump": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "read-pkg": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" + } + }, + "release-zalgo": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "resolve": { + "version": "1.10.0", + "bundled": true, + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.6.0", + "bundled": true, + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true + }, + "spawn-wrap": { + "version": "1.4.2", + "bundled": true, + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + } + }, + "spdx-correct": { + "version": "3.1.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "bundled": true, + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.3", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "bundled": true, + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "test-exclude": { + "version": "5.1.0", + "bundled": true, + "dev": true, + "requires": { + "arrify": "^1.0.1", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^1.0.1" + } + }, + "uglify-js": { + "version": "3.4.9", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "uuid": { + "version": "3.3.2", + "bundled": true, + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "bundled": true, + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "bundled": true, + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "write-file-atomic": { + "version": "2.4.2", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "y18n": { + "version": "4.0.0", + "bundled": true, + "dev": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true, + "dev": true + }, + "yargs": { + "version": "12.0.5", + "bundled": true, + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "bundled": true, + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-is": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", + "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "oboe": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.4.tgz", + "integrity": "sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY=", + "dev": true, + "requires": { + "http-https": "^1.0.0" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-load": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/on-load/-/on-load-3.4.1.tgz", + "integrity": "sha512-Q3v6aurn5Pif4Rk1QZhnH/azZiKZqiroCcRkPlEccwTl4UFomAGFAqZz8XRCGN/KtuX4DwXCn9SB/edSSoV+Hg==", + "dev": true, + "requires": { + "global": "^4.3.2", + "nanoassert": "^1.1.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onchange": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/onchange/-/onchange-3.3.0.tgz", + "integrity": "sha512-0ZQIdGkhG8Y+r8BIcjjDV93X59KkZ4Cc+ZxA9N+wA/3vm1cvd8/f2NXlCPCZpowSd78eCERk29dtuS8+X97MLg==", + "dev": true, + "requires": { + "arrify": "~1.0.1", + "chokidar": "~1.7.0", + "cross-spawn": "~5.1.0", + "minimist": "~1.2.0", + "tree-kill": "~1.2.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } + } + }, + "one-time": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", + "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=", + "dev": true + }, + "onetime": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" + }, + "opener": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", + "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=" + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + } + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "options": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", + "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", + "dev": true + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "outpipe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", + "integrity": "sha1-UM+GFjZeh+Ax4ppeyTOaPaRyX6I=", + "dev": true, + "requires": { + "shell-quote": "^1.4.2" + } + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "^1.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pac-proxy-agent": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-1.1.0.tgz", + "integrity": "sha512-QBELCWyLYPgE2Gj+4wUEiMscHrQ8nRPBzYItQNOHWavwBt25ohZHQC4qnd5IszdVVrFbLsQ+dPkm6eqdjJAmwQ==", + "dev": true, + "requires": { + "agent-base": "2", + "debug": "2", + "extend": "3", + "get-uri": "2", + "http-proxy-agent": "1", + "https-proxy-agent": "1", + "pac-resolver": "~2.0.0", + "raw-body": "2", + "socks-proxy-agent": "2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "pac-resolver": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-2.0.0.tgz", + "integrity": "sha1-mbiNLxk/ve78HJpSnB8yYKtSd80=", + "dev": true, + "requires": { + "co": "~3.0.6", + "degenerator": "~1.0.2", + "ip": "1.0.1", + "netmask": "~1.0.4", + "thunkify": "~2.1.1" + }, + "dependencies": { + "co": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/co/-/co-3.0.6.tgz", + "integrity": "sha1-FEXyJsXrlWE45oyawwFn6n0ua9o=", + "dev": true + } + } + }, + "package-json": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", + "dev": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "got": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", + "dev": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + } + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "~0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "parse-link-header": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-0.4.1.tgz", + "integrity": "sha1-9r1hXcZxP9QJNc6XlF5NP1Iu3xQ=", + "dev": true, + "requires": { + "xtend": "~4.0.0" + } + }, + "parserlib": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/parserlib/-/parserlib-1.1.1.tgz", + "integrity": "sha1-pkz6ckBiQ0/fw1HJpOwtkrlMBvQ=", + "dev": true + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascal-case": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", + "integrity": "sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=", + "dev": true, + "requires": { + "camel-case": "^3.0.0", + "upper-case-first": "^1.1.0" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, + "path-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", + "integrity": "sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + } + }, + "pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "requires": { + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + } + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "pluralize": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", + "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=" + }, + "portfinder": { + "version": "1.0.26", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz", + "integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==", + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.1" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", + "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=" + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true + }, + "proxy-addr": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "dev": true, + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.1" + } + }, + "proxy-agent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.0.0.tgz", + "integrity": "sha1-V+tTR6qAXXTsaByyVknbo5yTNJk=", + "dev": true, + "requires": { + "agent-base": "2", + "debug": "2", + "extend": "3", + "http-proxy-agent": "1", + "https-proxy-agent": "1", + "lru-cache": "~2.6.5", + "pac-proxy-agent": "1", + "socks-proxy-agent": "2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "lru-cache": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", + "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "q": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz", + "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=", + "dev": true + }, + "qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=" + }, + "query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "dev": true, + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", + "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", + "dev": true, + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.3", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "read-cmd-shim": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz", + "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "readline2": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", + "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "mute-stream": "0.0.5" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", + "dev": true, + "requires": { + "esprima": "~4.0.0" + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", + "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4", + "private": "^0.1.8" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexp.prototype.flags": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "regexpu-core": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "registry-auth-token": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz", + "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + }, + "registry-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", + "dev": true, + "requires": { + "rc": "^1.0.1" + } + }, + "regjsgen": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "dev": true + }, + "regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remix-analyzer": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/remix-analyzer/-/remix-analyzer-0.5.2.tgz", + "integrity": "sha512-s07UG2uYMdreICfhiABrn+XEr3QZCT+GSIzafxyumAPsjgx/RVzh0TLw5vxqnHWMLohhXc+9VXh+YYvQdy/IfQ==", + "dev": true, + "requires": { + "remix-astwalker": "0.0.24", + "remix-lib": "0.4.29" + } + }, + "remix-astwalker": { + "version": "0.0.24", + "resolved": "https://registry.npmjs.org/remix-astwalker/-/remix-astwalker-0.0.24.tgz", + "integrity": "sha512-t9DncFd48da3hDvnaZw4VrYYYs0hDiSW7LGSbfi+YrwOIhzuSGLL/N8tKYCEfsOsWRKOUXC4fuiRhlOZYDY0fQ==", + "dev": true, + "requires": { + "@types/tape": "^4.2.33", + "nyc": "^13.3.0", + "remix-lib": "0.4.29", + "tape": "^4.10.1", + "ts-node": "^8.0.3", + "typescript": "^3.4.3" + } + }, + "remix-debug": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/remix-debug/-/remix-debug-0.4.4.tgz", + "integrity": "sha512-pM1TXi67Jq7GVDRu5eYIZPIwgIMkH4UVPPG3/Z+zsICOni4sKTQzfxABbvjalVCE/0MjTislFUQEQpprXstpWg==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "ethereumjs-util": "^6.2.0", + "ethereumjs-vm": "4.1.3", + "remix-lib": "0.4.29", + "web3": "^1.2.4" + } + }, + "remix-lib": { + "version": "0.4.29", + "resolved": "https://registry.npmjs.org/remix-lib/-/remix-lib-0.4.29.tgz", + "integrity": "sha512-XeJwACrrP5SOTX7t00BTM4tPjPBaf+RvUmVO5WIrHR+fsOBAXqEymcvxJjbeWmGTyoAS9A9C/Ajv1UVyM/iCuQ==", + "dev": true, + "requires": { + "async": "^2.1.2", + "ethereumjs-block": "^2.2.2", + "ethereumjs-tx": "^2.1.2", + "ethereumjs-util": "^6.2.0", + "ethereumjs-vm": "4.1.3", + "ethers": "^4.0.40", + "events": "^3.0.0", + "solc": "^0.6.0", + "web3": "^1.2.4" + } + }, + "remix-simulator": { + "version": "0.1.9-beta.5", + "resolved": "https://registry.npmjs.org/remix-simulator/-/remix-simulator-0.1.9-beta.5.tgz", + "integrity": "sha512-db391UV0lRc50jOcVrSmTiVrfPWeS6LU/93dp7w4btohd7HeYD5/3oNpy9mkrlCU5FMvixE9x7ygwXwM3JZQyQ==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "async": "^3.1.0", + "body-parser": "^1.18.2", + "color-support": "^1.1.3", + "commander": "^2.19.0", + "cors": "^2.8.5", + "ethereumjs-block": "^2.2.2", + "ethereumjs-util": "^6.2.0", + "express": "^4.16.3", + "express-ws": "^4.0.0", + "merge": "^1.2.0", + "remix-lib": "0.4.29", + "standard": "^10.0.3", + "time-stamp": "^2.0.0", + "web3": "^1.2.4" + }, + "dependencies": { + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eslint": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.19.0.tgz", + "integrity": "sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw=", + "dev": true, + "requires": { + "babel-code-frame": "^6.16.0", + "chalk": "^1.1.3", + "concat-stream": "^1.5.2", + "debug": "^2.1.1", + "doctrine": "^2.0.0", + "escope": "^3.6.0", + "espree": "^3.4.0", + "esquery": "^1.0.0", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "glob": "^7.0.3", + "globals": "^9.14.0", + "ignore": "^3.2.0", + "imurmurhash": "^0.1.4", + "inquirer": "^0.12.0", + "is-my-json-valid": "^2.10.0", + "is-resolvable": "^1.0.0", + "js-yaml": "^3.5.1", + "json-stable-stringify": "^1.0.0", + "levn": "^0.3.0", + "lodash": "^4.0.0", + "mkdirp": "^0.5.0", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.1", + "pluralize": "^1.2.1", + "progress": "^1.1.8", + "require-uncached": "^1.0.2", + "shelljs": "^0.7.5", + "strip-bom": "^3.0.0", + "strip-json-comments": "~2.0.1", + "table": "^3.7.8", + "text-table": "~0.2.0", + "user-home": "^2.0.0" + } + }, + "eslint-config-standard": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz", + "integrity": "sha1-wGHk0GbzedwXzVYsZOgZtN1FRZE=", + "dev": true + }, + "eslint-config-standard-jsx": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.2.tgz", + "integrity": "sha512-F8fRh2WFnTek7dZH9ZaE0PCBwdVGkwVWZmizla/DDNOmg7Tx6B/IlK5+oYpiX29jpu73LszeJj5i1axEZv6VMw==", + "dev": true + }, + "eslint-plugin-promise": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz", + "integrity": "sha1-ePu2/+BHIBYnVp6FpsU3OvKmj8o=", + "dev": true + }, + "eslint-plugin-react": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz", + "integrity": "sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g=", + "dev": true, + "requires": { + "array.prototype.find": "^2.0.1", + "doctrine": "^1.2.2", + "has": "^1.0.1", + "jsx-ast-utils": "^1.3.4", + "object.assign": "^4.0.4" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + } + } + }, + "eslint-plugin-standard": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", + "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "standard": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/standard/-/standard-10.0.3.tgz", + "integrity": "sha512-JURZ+85ExKLQULckDFijdX5WHzN6RC7fgiZNSV4jFQVo+3tPoQGHyBrGekye/yf0aOfb4210EM5qPNlc2cRh4w==", + "dev": true, + "requires": { + "eslint": "~3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-config-standard-jsx": "4.0.2", + "eslint-plugin-import": "~2.2.0", + "eslint-plugin-node": "~4.2.2", + "eslint-plugin-promise": "~3.5.0", + "eslint-plugin-react": "~6.10.0", + "eslint-plugin-standard": "~3.0.1", + "standard-engine": "~7.0.0" + } + }, + "standard-engine": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-7.0.0.tgz", + "integrity": "sha1-67d7nI/CyBZf+jU72Rug3/Qa9pA=", + "dev": true, + "requires": { + "deglob": "^2.1.0", + "get-stdin": "^5.0.1", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, + "remix-solidity": { + "version": "0.3.30", + "resolved": "https://registry.npmjs.org/remix-solidity/-/remix-solidity-0.3.30.tgz", + "integrity": "sha512-4734G83V2BtLwIDXlRx/IM1sy/FYFoiw9tNpxSsD9QH22FQbMYHkNhLTsuG+fDfMMly2e2SfMXOU678Sj2vMzw==", + "dev": true, + "requires": { + "eslint-scope": "^5.0.0", + "remix-lib": "0.4.29", + "solc": "^0.6.0", + "webworkify": "^1.2.1" + } + }, + "remix-store": { + "version": "0.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/remix-store/-/remix-store-0.0.1-alpha.0.tgz", + "integrity": "sha512-OK3ODBig+nxpPh0Aq+oZi5NL99rU1I5bSwNC10Qg4B8ZyIregFt+l5HukzBQBEtNl8kVYfWvjd1NsxizEBekWQ==", + "dev": true, + "requires": { + "events": "^3.0.0" + } + }, + "remix-tabs": { + "version": "1.0.48", + "resolved": "https://registry.npmjs.org/remix-tabs/-/remix-tabs-1.0.48.tgz", + "integrity": "sha512-WWr7ooXXsxyyqeWPuNur5496qzqNyFRYvRGdyZGkGdvfWgV5C8VDNpFWuOPCSFi6eVhBiAFs5pchQzkZi8V+pw==", + "dev": true, + "requires": { + "@fortawesome/fontawesome-svg-core": "^1.2.14", + "@fortawesome/free-solid-svg-icons": "^5.7.1", + "@webcomponents/webcomponentsjs": "^2.2.4", + "events": "^3.1.0", + "font-awesome": "^4.7.0", + "lit-element": "^2.0.0-rc.5", + "remix-store": "0.0.1-alpha.0", + "standard": "^12.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "ajv": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eslint": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", + "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", + "dev": true, + "requires": { + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.2", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" + } + }, + "eslint-config-standard": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", + "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", + "dev": true + }, + "eslint-config-standard-jsx": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", + "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz", + "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", + "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "dev": true, + "requires": { + "contains-path": "^0.1.0", + "debug": "^2.6.8", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + } + } + }, + "eslint-plugin-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", + "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", + "dev": true, + "requires": { + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", + "minimatch": "^3.0.4", + "resolve": "^1.8.1", + "semver": "^5.5.0" + } + }, + "eslint-plugin-promise": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", + "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", + "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.0.1", + "prop-types": "^15.6.2" + } + }, + "eslint-plugin-standard": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", + "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "dev": true, + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "events": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", + "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "inquirer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "jsx-ast-utils": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.3.tgz", + "integrity": "sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "object.assign": "^4.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } + }, + "standard": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/standard/-/standard-12.0.1.tgz", + "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", + "dev": true, + "requires": { + "eslint": "~5.4.0", + "eslint-config-standard": "12.0.0", + "eslint-config-standard-jsx": "6.0.2", + "eslint-plugin-import": "~2.14.0", + "eslint-plugin-node": "~7.0.1", + "eslint-plugin-promise": "~4.0.0", + "eslint-plugin-react": "~7.11.1", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "~9.0.0" + } + }, + "standard-engine": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz", + "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", + "dev": true, + "requires": { + "deglob": "^2.1.0", + "get-stdin": "^6.0.0", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "dev": true, + "requires": { + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + } + } + }, + "remix-tests": { + "version": "0.1.33", + "resolved": "https://registry.npmjs.org/remix-tests/-/remix-tests-0.1.33.tgz", + "integrity": "sha512-gkArJeyAUbngPjghpoQdM5D7cFZnTjFS9QUgBdDKhUldwh5l1xRfsDwzFMZ4xbp3fJB/qEuZHmXPpyeAV7piaw==", + "dev": true, + "requires": { + "async": "^2.6.0", + "change-case": "^3.0.1", + "colors": "^1.1.2", + "commander": "^2.13.0", + "remix-lib": "0.4.29", + "remix-simulator": "0.1.9-beta.5", + "remix-solidity": "0.3.30", + "signale": "^1.4.0", + "web3": "^1.2.4", + "winston": "^3.0.0" + }, + "dependencies": { + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + } + } + }, + "remixd": { + "version": "0.1.8-alpha.16", + "resolved": "https://registry.npmjs.org/remixd/-/remixd-0.1.8-alpha.16.tgz", + "integrity": "sha512-nEvlfZjHXRw2r8bBZicv1Mqg6ELVZ9h+wHPcLJwrSAkkkejR4XAIZ5LgjxZwK/uULZkNp4yXFqFTDc6lwgEz9Q==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "commander": "^2.9.0", + "fs-extra": "^3.0.1", + "isbinaryfile": "^3.0.2", + "lerna": "^2.9.0", + "nopy": "^0.2.6", + "serve": "7.0.0", + "stdout": "0.0.3", + "watch": "^1.0.2", + "websocket": "^1.0.24" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fs-extra": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", + "integrity": "sha1-N5TzeMWLNC6n27sjCVEJxLO2IpE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^3.0.0", + "universalify": "^0.1.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "jsonfile": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz", + "integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + } + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, + "restore-cursor": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", + "requires": { + "exit-hook": "^1.0.0", + "onetime": "^1.0.0" + } + }, + "resumer": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", + "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", + "dev": true, + "requires": { + "through": "~2.3.4" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rlp": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.4.tgz", + "integrity": "sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw==", + "dev": true, + "requires": { + "bn.js": "^4.11.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "run-async": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", + "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", + "requires": { + "once": "^1.3.0" + } + }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" + }, + "rustbn.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", + "dev": true + }, + "rx-lite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", + "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=" + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true, + "requires": { + "rx-lite": "*" + } + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "dev": true, + "requires": { + "symbol-observable": "1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "scryptsy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz", + "integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==", + "dev": true + }, + "secp256k1": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz", + "integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==", + "dev": true, + "requires": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.5.2", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "seek-bzip": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", + "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", + "dev": true, + "requires": { + "commander": "~2.8.1" + }, + "dependencies": { + "commander": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", + "dev": true, + "requires": { + "graceful-readlink": ">= 1.0.0" + } + } + } + }, + "selenium-standalone": { + "version": "6.17.0", + "resolved": "https://registry.npmjs.org/selenium-standalone/-/selenium-standalone-6.17.0.tgz", + "integrity": "sha512-5PSnDHwMiq+OCiAGlhwQ8BM9xuwFfvBOZ7Tfbw+ifkTnOy0PWbZmI1B9gPGuyGHpbQ/3J3CzIK7BYwrQ7EjtWQ==", + "dev": true, + "requires": { + "async": "^2.6.2", + "commander": "^2.19.0", + "cross-spawn": "^6.0.5", + "debug": "^4.1.1", + "lodash": "^4.17.11", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "progress": "2.0.3", + "request": "2.88.0", + "tar-stream": "2.0.0", + "urijs": "^1.19.1", + "which": "^1.3.1", + "yauzl": "^2.10.0" + }, + "dependencies": { + "bl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", + "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "tar-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.0.0.tgz", + "integrity": "sha512-n2vtsWshZOVr/SY4KtslPoUlyNh06I2SGgAOCZmquCEjlbV/LjY2CY80rDtdQRHFOYXNlgBDo6Fr3ww2CWPOtA==", + "dev": true, + "requires": { + "bl": "^2.2.0", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dev": true, + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + } + } + }, + "semaphore": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", + "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "sentence-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", + "integrity": "sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case-first": "^1.1.2" + } + }, + "serve": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/serve/-/serve-7.0.0.tgz", + "integrity": "sha512-A3IxdJBhSt+RbSDO5X4fpoYDtsvGILP73MGZRv7TZyCOf5DVLHCUMLwXnbwEtxkzbnA73NWlGFH6HjNqltCuuQ==", + "dev": true, + "requires": { + "@zeit/schemas": "1.1.1", + "ajv": "6.5.0", + "arg": "2.0.0", + "chalk": "2.4.1", + "dot-prop": "4.2.0", + "fs-extra": "6.0.1", + "micro": "9.3.1", + "serve-handler": "2.3.10", + "update-check": "1.5.2" + }, + "dependencies": { + "ajv": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.0.tgz", + "integrity": "sha512-VDUX1oSajablmiyFyED9L1DFndg0P9h7p1F+NO8FkIzei6EPrR6Zu1n18rd5P8PqaSRd/FrWv3G1TVBqpM83gA==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0", + "uri-js": "^4.2.1" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "arg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-2.0.0.tgz", + "integrity": "sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w==", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "serve-handler": { + "version": "2.3.10", + "resolved": "https://registry.npmjs.org/serve-handler/-/serve-handler-2.3.10.tgz", + "integrity": "sha512-ye8gHjWjTn5s3gsCbB583BtstMIfBX+2lBLYw3+T0kFbW1bOby0vnGBVBGRpw8uVsBoNERHF/XIgWYJKWrImTA==", + "dev": true, + "requires": { + "bytes": "3.0.0", + "fast-url-parser": "1.1.3", + "glob-slasher": "1.0.1", + "mime": "2.3.1", + "minimatch": "3.0.4", + "path-to-regexp": "2.2.1" + }, + "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=", + "dev": true + }, + "mime": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz", + "integrity": "sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg==", + "dev": true + }, + "path-to-regexp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz", + "integrity": "sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "dev": true, + "requires": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "sha3": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.6.tgz", + "integrity": "sha512-KgLGmJGrmNB4JWVsAV11Yk6KbvsAiygWJc7t5IebWva/0NukNrjJqhtKhzy3Eiv2AKuGvhZZt7dt1mDo7HkoiQ==", + "dev": true, + "requires": { + "nan": "2.13.2" + }, + "dependencies": { + "nan": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "dev": true + } + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + }, + "dependencies": { + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + } + } + }, + "shasum-object": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", + "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "dev": true, + "requires": { + "fast-safe-stringify": "^2.0.7" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "signale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", + "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", + "dev": true, + "requires": { + "chalk": "^2.3.2", + "figures": "^2.0.0", + "pkg-conf": "^2.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "dev": true + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "dev": true, + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + } + } + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", + "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" + }, + "smart-buffer": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", + "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", + "dev": true + }, + "snake-case": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", + "integrity": "sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "socks": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", + "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", + "dev": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + } + } + }, + "socks-proxy-agent": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz", + "integrity": "sha512-sFtmYqdUK5dAMh85H0LEVFUCO7OhJJe1/z2x/Z6mxp3s7/QPf1RkZmpZy+BpuU0bEjcV9npqKjq9Y3kwFUjnxw==", + "dev": true, + "requires": { + "agent-base": "2", + "extend": "3", + "socks": "~1.1.5" + } + }, + "solc": { + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.6.7.tgz", + "integrity": "sha512-a3iocjS1yGzw3Wy7jkqSLX3Vg1lMDCyoKZoVfpOagRGWkh37f11BrcUDO8f73rjdpw2WUBSLJtTQ26i52/0JOg==", + "dev": true, + "requires": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "dependencies": { + "commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "dev": true + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", + "dev": true, + "requires": { + "is-plain-obj": "^1.0.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "dev": true, + "requires": { + "through2": "^2.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "standard": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/standard/-/standard-8.6.0.tgz", + "integrity": "sha1-Y1Eyvnv7VnwpIQBfMPnjUOR1Kq0=", + "requires": { + "eslint": "~3.10.2", + "eslint-config-standard": "6.2.1", + "eslint-config-standard-jsx": "3.2.0", + "eslint-plugin-promise": "~3.4.0", + "eslint-plugin-react": "~6.7.1", + "eslint-plugin-standard": "~2.0.1", + "standard-engine": "~5.2.0" + } + }, + "standard-engine": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-5.2.0.tgz", + "integrity": "sha1-QAZgrlrM6K/U22D/IhSpGQrXkKM=", + "requires": { + "deglob": "^2.0.0", + "find-root": "^1.0.0", + "get-stdin": "^5.0.1", + "home-or-tmp": "^2.0.0", + "minimist": "^1.1.0", + "pkg-config": "^1.0.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true + }, + "stdout": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/stdout/-/stdout-0.0.3.tgz", + "integrity": "sha1-QA10MwTtYMdBvZTUyezcRNIhYOE=", + "dev": true, + "requires": { + "through2": "~0.2.3" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz", + "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=", + "dev": true, + "requires": { + "readable-stream": "~1.1.9", + "xtend": "~2.1.1" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz", + "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", + "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "string.prototype.trim": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz", + "integrity": "sha512-MjGFEeqixw47dAMFMtgUro/I0+wNqZB5GKXGt1fFr24u3TzDXCPu7J9Buppzoe3r/LqkSDLDDJzE15RGWDGAVw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "requires": { + "is-natural-number": "^4.0.1" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "dev": true, + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=" + }, + "strong-log-transformer": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz", + "integrity": "sha1-9/uTdYpppXEUAYEnfuoMLrEwH6M=", + "dev": true, + "requires": { + "byline": "^5.0.0", + "duplexer": "^0.1.1", + "minimist": "^0.1.0", + "moment": "^2.6.0", + "through": "^2.3.4" + }, + "dependencies": { + "minimist": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", + "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", + "dev": true + } + } + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "^1.1.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "supports-hyperlinks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", + "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "dev": true, + "requires": { + "has-flag": "^2.0.0", + "supports-color": "^5.0.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + } + } + } + } + }, + "swap-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", + "integrity": "sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM=", + "dev": true, + "requires": { + "lower-case": "^1.1.1", + "upper-case": "^1.1.1" + } + }, + "swarm-js": { + "version": "0.1.39", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.39.tgz", + "integrity": "sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg==", + "dev": true, + "requires": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "decompress": "^4.0.0", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request-promise": "^0.1.2" + }, + "dependencies": { + "fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "^1.0.1" + } + } + } + }, + "swarmgw": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/swarmgw/-/swarmgw-0.3.1.tgz", + "integrity": "sha512-cfJAQrUqMOGK/ZFlUT/iyeiHuBqDXgpa+tLM6eTsPf8uCK9hEqGJJ3i8ad6FnLxabrFcFKM3QCD44ug04h4hLg==", + "dev": true, + "requires": { + "request": "^2.87.0", + "swarmhash": "^0.1.0", + "xhr": "^2.5.0", + "yargs": "^12.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "yargs": { + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" + } + }, + "yargs-parser": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "swarmhash": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/swarmhash/-/swarmhash-0.1.1.tgz", + "integrity": "sha512-adCLHPLe5w+fjs9nw09kGhCYhReEPMKuUIfZTPgMQLulmGJ9toNnGnQJta0Ix3ixuFi5AXWPk38Vu4wiLJONGQ==", + "dev": true, + "requires": { + "keccakjs": "^0.2.3", + "safe-buffer": "^5.1.2" + } + }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", + "dev": true + }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "requires": { + "acorn-node": "^1.2.0" + } + }, + "table": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", + "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", + "requires": { + "ajv": "^4.7.0", + "ajv-keywords": "^1.0.0", + "chalk": "^1.1.1", + "lodash": "^4.0.0", + "slice-ansi": "0.0.4", + "string-width": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "tape": { + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.13.2.tgz", + "integrity": "sha512-waWwC/OqYVE9TS6r1IynlP2sEdk4Lfo6jazlgkuNkPTHIbuG2BTABIaKdlQWwPeB6Oo4ksZ1j33Yt0NTOAlYMQ==", + "dev": true, + "requires": { + "deep-equal": "~1.1.1", + "defined": "~1.0.0", + "dotignore": "~0.1.2", + "for-each": "~0.3.3", + "function-bind": "~1.1.1", + "glob": "~7.1.6", + "has": "~1.0.3", + "inherits": "~2.0.4", + "is-regex": "~1.0.5", + "minimist": "~1.2.0", + "object-inspect": "~1.7.0", + "resolve": "~1.15.1", + "resumer": "~0.0.0", + "string.prototype.trim": "~1.2.1", + "through": "~2.3.8" + }, + "dependencies": { + "resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", + "dev": true + }, + "temp-write": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/temp-write/-/temp-write-3.4.0.tgz", + "integrity": "sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "is-stream": "^1.1.0", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "temp-dir": "^1.0.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "tempfile": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-1.1.1.tgz", + "integrity": "sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I=", + "dev": true, + "requires": { + "os-tmpdir": "^1.0.0", + "uuid": "^2.0.1" + }, + "dependencies": { + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", + "dev": true + } + } + }, + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true + }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "thunkify": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", + "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=", + "dev": true + }, + "time-stamp": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.2.0.tgz", + "integrity": "sha512-zxke8goJQpBeEgD82CXABeMh0LSJcj7CXEd0OHOg45HgcofF7pxNwZm9+RknpxpDhwN4gFpySkApKfFYfRQnUA==", + "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "~0.11.0" + } + }, + "title-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", + "integrity": "sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.0.3" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "toxic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toxic/-/toxic-1.0.1.tgz", + "integrity": "sha512-WI3rIGdcaKULYg7KVoB0zcjikqvcYYvcuT6D89bFPz2rVR0Rl0PK6x8/X62rtdLtBKIE985NzVf/auTtGegIIg==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + }, + "transform-ast": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/transform-ast/-/transform-ast-2.4.4.tgz", + "integrity": "sha512-AxjeZAcIOUO2lev2GDe3/xZ1Q0cVGjIMk5IsriTy8zbWlsEnjeB025AhkhBJHoy997mXpLd4R+kRbvnnQVuQHQ==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "convert-source-map": "^1.5.1", + "dash-ast": "^1.0.0", + "is-buffer": "^2.0.0", + "magic-string": "^0.23.2", + "merge-source-map": "1.0.4", + "nanobench": "^2.1.1" + } + }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", + "dev": true + }, + "ts-node": { + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", + "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz", + "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI=", + "dev": true + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "ultron": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", + "integrity": "sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po=", + "dev": true + }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true + }, + "unbzip2-stream": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.2.tgz", + "integrity": "sha512-pZMVAofMrrHX6Ik39hCk470kulCbmZ2SWfQLPmTWqfJV/oUm0gn1CblvHdUu4+54Je6Jq34x8kY6XjTy6dMkOg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "undeclared-identifiers": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", + "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "dash-ast": "^1.0.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "union": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz", + "integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=", + "requires": { + "qs": "~2.3.3" + } + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "unzip-response": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", + "dev": true + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "update-check": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/update-check/-/update-check-1.5.2.tgz", + "integrity": "sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ==", + "dev": true, + "requires": { + "registry-auth-token": "3.3.2", + "registry-url": "3.1.0" + }, + "dependencies": { + "registry-auth-token": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", + "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", + "dev": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + } + } + } + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "upper-case-first": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", + "integrity": "sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=", + "dev": true, + "requires": { + "upper-case": "^1.1.1" + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urijs": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.2.tgz", + "integrity": "sha512-s/UIq9ap4JPZ7H1EB5ULo/aOUbWqfDi7FKzMC2Nz+0Si8GiT1rIEaprt8hy3Vy2Ex2aJPpOQv4P4DuOZ+K1c6w==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "url-join": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", + "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=" + }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, + "url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=", + "dev": true + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "user-home": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", + "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", + "requires": { + "os-homedir": "^1.0.0" + } + }, + "utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util.promisify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true, + "requires": { + "indexof": "0.0.1" + } + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true + }, + "w3c-blob": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/w3c-blob/-/w3c-blob-0.0.1.tgz", + "integrity": "sha1-sM01KhpQ9RVWNCD/1YYflQ8dhbg=", + "dev": true + }, + "watch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/watch/-/watch-1.0.2.tgz", + "integrity": "sha1-NApxe952Vyb6CqB9ch4BR6VR3ww=", + "dev": true, + "requires": { + "exec-sh": "^0.2.0", + "minimist": "^1.2.0" + } + }, + "watchify": { + "version": "3.11.1", + "resolved": "https://registry.npmjs.org/watchify/-/watchify-3.11.1.tgz", + "integrity": "sha512-WwnUClyFNRMB2NIiHgJU9RQPQNqVeFk7OmZaWf5dC5EnNa0Mgr7imBydbaJ7tGTuPM2hz1Cb4uiBvK9NVxMfog==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "browserify": "^16.1.0", + "chokidar": "^2.1.1", + "defined": "^1.0.0", + "outpipe": "^1.1.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "web3": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.2.4.tgz", + "integrity": "sha512-xPXGe+w0x0t88Wj+s/dmAdASr3O9wmA9mpZRtixGZxmBexAF0MjfqYM+MS4tVl5s11hMTN3AZb8cDD4VLfC57A==", + "dev": true, + "requires": { + "@types/node": "^12.6.1", + "web3-bzz": "1.2.4", + "web3-core": "1.2.4", + "web3-eth": "1.2.4", + "web3-eth-personal": "1.2.4", + "web3-net": "1.2.4", + "web3-shh": "1.2.4", + "web3-utils": "1.2.4" + }, + "dependencies": { + "@types/node": { + "version": "12.12.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.38.tgz", + "integrity": "sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA==", + "dev": true + } + } + }, + "web3-bzz": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.2.4.tgz", + "integrity": "sha512-MqhAo/+0iQSMBtt3/QI1rU83uvF08sYq8r25+OUZ+4VtihnYsmkkca+rdU0QbRyrXY2/yGIpI46PFdh0khD53A==", + "dev": true, + "requires": { + "@types/node": "^10.12.18", + "got": "9.6.0", + "swarm-js": "0.1.39", + "underscore": "1.9.1" + }, + "dependencies": { + "@types/node": { + "version": "10.17.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.21.tgz", + "integrity": "sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ==", + "dev": true + } + } + }, + "web3-core": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.2.4.tgz", + "integrity": "sha512-CHc27sMuET2cs1IKrkz7xzmTdMfZpYswe7f0HcuyneTwS1yTlTnHyqjAaTy0ZygAb/x4iaVox+Gvr4oSAqSI+A==", + "dev": true, + "requires": { + "@types/bignumber.js": "^5.0.0", + "@types/bn.js": "^4.11.4", + "@types/node": "^12.6.1", + "web3-core-helpers": "1.2.4", + "web3-core-method": "1.2.4", + "web3-core-requestmanager": "1.2.4", + "web3-utils": "1.2.4" + }, + "dependencies": { + "@types/node": { + "version": "12.12.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.38.tgz", + "integrity": "sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA==", + "dev": true + } + } + }, + "web3-core-helpers": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.2.4.tgz", + "integrity": "sha512-U7wbsK8IbZvF3B7S+QMSNP0tni/6VipnJkB0tZVEpHEIV2WWeBHYmZDnULWcsS/x/jn9yKhJlXIxWGsEAMkjiw==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-eth-iban": "1.2.4", + "web3-utils": "1.2.4" + } + }, + "web3-core-method": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.2.4.tgz", + "integrity": "sha512-8p9kpL7di2qOVPWgcM08kb+yKom0rxRCMv6m/K+H+yLSxev9TgMbCgMSbPWAHlyiF3SJHw7APFKahK5Z+8XT5A==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.4", + "web3-core-promievent": "1.2.4", + "web3-core-subscriptions": "1.2.4", + "web3-utils": "1.2.4" + } + }, + "web3-core-promievent": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.2.4.tgz", + "integrity": "sha512-gEUlm27DewUsfUgC3T8AxkKi8Ecx+e+ZCaunB7X4Qk3i9F4C+5PSMGguolrShZ7Zb6717k79Y86f3A00O0VAZw==", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "3.1.2" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + } + } + }, + "web3-core-requestmanager": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.2.4.tgz", + "integrity": "sha512-eZJDjyNTDtmSmzd3S488nR/SMJtNnn/GuwxnMh3AzYCqG3ZMfOylqTad2eYJPvc2PM5/Gj1wAMQcRpwOjjLuPg==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core-helpers": "1.2.4", + "web3-providers-http": "1.2.4", + "web3-providers-ipc": "1.2.4", + "web3-providers-ws": "1.2.4" + } + }, + "web3-core-subscriptions": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.2.4.tgz", + "integrity": "sha512-3D607J2M8ymY9V+/WZq4MLlBulwCkwEjjC2U+cXqgVO1rCyVqbxZNCmHyNYHjDDCxSEbks9Ju5xqJxDSxnyXEw==", + "dev": true, + "requires": { + "eventemitter3": "3.1.2", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.4" + }, + "dependencies": { + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + } + } + }, + "web3-eth": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.2.4.tgz", + "integrity": "sha512-+j+kbfmZsbc3+KJpvHM16j1xRFHe2jBAniMo1BHKc3lho6A8Sn9Buyut6odubguX2AxoRArCdIDCkT9hjUERpA==", + "dev": true, + "requires": { + "underscore": "1.9.1", + "web3-core": "1.2.4", + "web3-core-helpers": "1.2.4", + "web3-core-method": "1.2.4", + "web3-core-subscriptions": "1.2.4", + "web3-eth-abi": "1.2.4", + "web3-eth-accounts": "1.2.4", + "web3-eth-contract": "1.2.4", + "web3-eth-ens": "1.2.4", + "web3-eth-iban": "1.2.4", + "web3-eth-personal": "1.2.4", + "web3-net": "1.2.4", + "web3-utils": "1.2.4" + } + }, + "web3-eth-abi": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.2.4.tgz", + "integrity": "sha512-8eLIY4xZKoU3DSVu1pORluAw9Ru0/v4CGdw5so31nn+7fR8zgHMgwbFe0aOqWQ5VU42PzMMXeIJwt4AEi2buFg==", + "dev": true, + "requires": { + "ethers": "4.0.0-beta.3", + "underscore": "1.9.1", + "web3-utils": "1.2.4" + }, + "dependencies": { + "@types/node": { + "version": "10.17.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.21.tgz", + "integrity": "sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "inherits": "^2.0.1" + } + }, + "ethers": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.0-beta.3.tgz", + "integrity": "sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog==", + "dev": true, + "requires": { + "@types/node": "^10.3.2", + "aes-js": "3.0.0", + "bn.js": "^4.4.0", + "elliptic": "6.3.3", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.3", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=", + "dev": true + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + } + } + }, + "web3-eth-accounts": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.2.4.tgz", + "integrity": "sha512-04LzT/UtWmRFmi4hHRewP5Zz43fWhuHiK5XimP86sUQodk/ByOkXQ3RoXyGXFMNoRxdcAeRNxSfA2DpIBc9xUw==", + "dev": true, + "requires": { + "@web3-js/scrypt-shim": "^0.1.0", + "any-promise": "1.3.0", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.7", + "ethereumjs-common": "^1.3.2", + "ethereumjs-tx": "^2.1.1", + "underscore": "1.9.1", + "uuid": "3.3.2", + "web3-core": "1.2.4", + "web3-core-helpers": "1.2.4", + "web3-core-method": "1.2.4", + "web3-utils": "1.2.4" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } + } + }, + "web3-eth-contract": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.2.4.tgz", + "integrity": "sha512-b/9zC0qjVetEYnzRA1oZ8gF1OSSUkwSYi5LGr4GeckLkzXP7osEnp9lkO/AQcE4GpG+l+STnKPnASXJGZPgBRQ==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.4", + "underscore": "1.9.1", + "web3-core": "1.2.4", + "web3-core-helpers": "1.2.4", + "web3-core-method": "1.2.4", + "web3-core-promievent": "1.2.4", + "web3-core-subscriptions": "1.2.4", + "web3-eth-abi": "1.2.4", + "web3-utils": "1.2.4" + } + }, + "web3-eth-ens": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.2.4.tgz", + "integrity": "sha512-g8+JxnZlhdsCzCS38Zm6R/ngXhXzvc3h7bXlxgKU4coTzLLoMpgOAEz71GxyIJinWTFbLXk/WjNY0dazi9NwVw==", + "dev": true, + "requires": { + "eth-ens-namehash": "2.0.8", + "underscore": "1.9.1", + "web3-core": "1.2.4", + "web3-core-helpers": "1.2.4", + "web3-core-promievent": "1.2.4", + "web3-eth-abi": "1.2.4", + "web3-eth-contract": "1.2.4", + "web3-utils": "1.2.4" + } + }, + "web3-eth-iban": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.2.4.tgz", + "integrity": "sha512-D9HIyctru/FLRpXakRwmwdjb5bWU2O6UE/3AXvRm6DCOf2e+7Ve11qQrPtaubHfpdW3KWjDKvlxV9iaFv/oTMQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "web3-utils": "1.2.4" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + } + } + }, + "web3-eth-personal": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.2.4.tgz", + "integrity": "sha512-5Russ7ZECwHaZXcN3DLuLS7390Vzgrzepl4D87SD6Sn1DHsCZtvfdPIYwoTmKNp69LG3mORl7U23Ga5YxqkICw==", + "dev": true, + "requires": { + "@types/node": "^12.6.1", + "web3-core": "1.2.4", + "web3-core-helpers": "1.2.4", + "web3-core-method": "1.2.4", + "web3-net": "1.2.4", + "web3-utils": "1.2.4" + }, + "dependencies": { + "@types/node": { + "version": "12.12.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.38.tgz", + "integrity": "sha512-75eLjX0pFuTcUXnnWmALMzzkYorjND0ezNEycaKesbUBg9eGZp4GHPuDmkRc4mQQvIpe29zrzATNRA6hkYqwmA==", + "dev": true + } + } + }, + "web3-net": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.2.4.tgz", + "integrity": "sha512-wKOsqhyXWPSYTGbp7ofVvni17yfRptpqoUdp3SC8RAhDmGkX6irsiT9pON79m6b3HUHfLoBilFQyt/fTUZOf7A==", + "dev": true, + "requires": { + "web3-core": "1.2.4", + "web3-core-method": "1.2.4", + "web3-utils": "1.2.4" + } + }, + "web3-providers-http": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.2.4.tgz", + "integrity": "sha512-dzVCkRrR/cqlIrcrWNiPt9gyt0AZTE0J+MfAu9rR6CyIgtnm1wFUVVGaxYRxuTGQRO4Dlo49gtoGwaGcyxqiTw==", + "dev": true, + "requires": { + "web3-core-helpers": "1.2.4", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.2.4.tgz", + "integrity": "sha512-8J3Dguffin51gckTaNrO3oMBo7g+j0UNk6hXmdmQMMNEtrYqw4ctT6t06YOf9GgtOMjSAc1YEh3LPrvgIsR7og==", + "dev": true, + "requires": { + "oboe": "2.1.4", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.4" + } + }, + "web3-providers-ws": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.2.4.tgz", + "integrity": "sha512-F/vQpDzeK+++oeeNROl1IVTufFCwCR2hpWe5yRXN0ApLwHqXrMI7UwQNdJ9iyibcWjJf/ECbauEEQ8CHgE+MYQ==", + "dev": true, + "requires": { + "@web3-js/websocket": "^1.0.29", + "underscore": "1.9.1", + "web3-core-helpers": "1.2.4" + } + }, + "web3-shh": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.2.4.tgz", + "integrity": "sha512-z+9SCw0dE+69Z/Hv8809XDbLj7lTfEv9Sgu8eKEIdGntZf4v7ewj5rzN5bZZSz8aCvfK7Y6ovz1PBAu4QzS4IQ==", + "dev": true, + "requires": { + "web3-core": "1.2.4", + "web3-core-method": "1.2.4", + "web3-core-subscriptions": "1.2.4", + "web3-net": "1.2.4" + } + }, + "web3-utils": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.4.tgz", + "integrity": "sha512-+S86Ip+jqfIPQWvw2N/xBQq5JNqCO0dyvukGdJm8fEWHZbckT4WxSpHbx+9KLEWY4H4x9pUwnoRkK87pYyHfgQ==", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "eth-lib": "0.2.7", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "underscore": "1.9.1", + "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + } + } + }, + "websocket": { + "version": "1.0.31", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.31.tgz", + "integrity": "sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ==", + "dev": true, + "requires": { + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "nan": "^2.14.0", + "typedarray-to-buffer": "^3.1.5", + "yaeti": "^0.0.6" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "webworkify": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/webworkify/-/webworkify-1.5.0.tgz", + "integrity": "sha512-AMcUeyXAhbACL8S2hqqdqOLqvJ8ylmIbNwUIqQujRSouf4+eUFaXbG6F1Rbu+srlJMmxQWsiU7mOJi0nMBfM1g==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "winston": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz", + "integrity": "sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw==", + "dev": true, + "requires": { + "async": "^2.6.1", + "diagnostics": "^1.1.1", + "is-stream": "^1.1.0", + "logform": "^2.1.1", + "one-time": "0.0.4", + "readable-stream": "^3.1.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.3.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "winston-transport": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz", + "integrity": "sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A==", + "dev": true, + "requires": { + "readable-stream": "^2.3.6", + "triple-beam": "^1.2.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "requires": { + "mkdirp": "^0.5.1" + } + }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "write-json-file": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", + "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", + "dev": true, + "requires": { + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "write-pkg": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", + "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", + "dev": true, + "requires": { + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" + } + }, + "ws": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz", + "integrity": "sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w==", + "dev": true, + "requires": { + "options": ">=0.0.5", + "ultron": "1.0.x" + } + }, + "xhr": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.5.0.tgz", + "integrity": "sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ==", + "dev": true, + "requires": { + "global": "~4.3.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "~0.5.1" + } + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", + "dev": true + } + } + }, + "xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", + "dev": true, + "requires": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" + } + }, + "xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", + "dev": true, + "requires": { + "xhr-request": "^1.1.0" + } + }, + "xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", + "dev": true, + "requires": { + "cookiejar": "^2.1.1" + } + }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=", + "dev": true + }, + "xregexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", + "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, + "yo-yo": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/yo-yo/-/yo-yo-1.4.1.tgz", + "integrity": "sha1-nOSwD9iA5VM7Xn9GqT1o2RStb2Q=", + "dev": true, + "requires": { + "bel": "^4.0.0", + "morphdom": "^2.1.0" + } + }, + "yo-yoify": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/yo-yoify/-/yo-yoify-3.7.3.tgz", + "integrity": "sha1-yNGoBL4J+lFbJRksH33lAIpmMBE=", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "falafel": "^2.0.0", + "hyperx": "^2.0.3", + "on-load": "^3.2.0", + "through2": "^2.0.1" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000000..16d78d20e4 --- /dev/null +++ b/package.json @@ -0,0 +1,202 @@ +{ + "name": "remix-ide", + "version": "v0.10.1", + "description": "Extendable Web IDE for Ethereum", + "devDependencies": { + "@babel/core": "^7.4.5", + "@babel/plugin-transform-object-assign": "^7.2.0", + "@babel/polyfill": "^7.4.4", + "@babel/preset-env": "^7.4.5", + "@babel/preset-es2015": "latest", + "@babel/preset-es2017": "latest", + "@babel/preset-stage-0": "^7.0.0", + "@babel/register": "^7.4.4", + "@fortawesome/fontawesome-free": "^5.8.1", + "@resolver-engine/imports": "^0.3.0", + "ace-mode-move": "0.0.1", + "ace-mode-solidity": "^0.1.0", + "ace-mode-zokrates": "^1.0.0", + "async": "^2.1.2", + "babel-eslint": "^10.0.0", + "babel-plugin-fast-async": "^6.1.2", + "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-plugin-yo-yoify": "^2.0.0", + "babelify": "^10.0.0", + "brace": "^0.8.0", + "browserify": "^16.2.3", + "browserify-reload": "^1.0.3", + "component-type": "^1.2.1", + "copy-text-to-clipboard": "^1.0.4", + "csjs-inject": "^1.0.1", + "csslint": "^1.0.2", + "deep-equal": "^1.0.1", + "dotenv": "^8.2.0", + "ethereumjs-util": "^6.2.0", + "ethers": "^4.0.27", + "events": "^3.0.0", + "execr": "^1.0.1", + "exorcist": "^0.4.0", + "fast-async": "^7.0.6", + "fast-levenshtein": "^2.0.6", + "ganache-cli": "^6.8.1", + "gists": "^1.0.1", + "ipfs-mini": "^1.1.5", + "is-electron": "^2.2.0", + "javascript-serialize": "^1.6.1", + "jquery": "^3.3.1", + "js-base64": "^2.1.9", + "js-beautify": "1.6.14", + "minixhr": "^3.2.2", + "mkdirp": "^0.5.1", + "nanohtml": "^1.6.3", + "nightwatch": "^0.9.20", + "notify-error": "^1.2.0", + "npm-link-local": "^1.1.0", + "npm-merge-driver": "^2.3.5", + "npm-run-all": "^4.0.2", + "onchange": "^3.2.1", + "remix-analyzer": "0.5.2", + "remix-debug": "0.4.4", + "remix-lib": "0.4.29", + "remix-simulator": "0.1.9-beta.5", + "remix-solidity": "0.3.30", + "remix-tabs": "1.0.48", + "remix-tests": "0.1.33", + "remixd": "0.1.8-alpha.16", + "request": "^2.83.0", + "rimraf": "^2.6.1", + "selenium-standalone": "^6.17.0", + "semver": "^6.1.2", + "solc": "^0.6.0", + "swarmgw": "^0.3.1", + "tape": "^4.5.1", + "uglify-js": "^2.8.16", + "vm-browserify": "0.0.4", + "watchify": "^3.9.0", + "web3": "1.2.4", + "webworkify": "^1.2.1", + "yo-yo": "^1.2.2", + "yo-yoify": "^3.7.3" + }, + "dependencies": { + "@remixproject/engine": "^0.2.3", + "http-server": "^0.11.1", + "standard": "^8.5.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ethereum/remix-ide.git" + }, + "keywords": [ + "ethereum", + "solidity", + "compiler" + ], + "author": "chriseth", + "license": "MIT", + "bugs": { + "url": "https://github.com/ethereum/remix-ide/issues" + }, + "homepage": "https://github.com/ethereum/remix-ide#readme", + "standard": { + "ignore": [ + "build/", + "src/app/editor/mode-solidity.js", + "soljson.js", + "assets/js/0.7.7/app.js" + ], + "parser": "babel-eslint" + }, + "browserify": { + "transform": [ + [ + "babelify", + { + "sourceMapsAbsolute": false, + "sourceMaps": true, + "plugins": [ + [ + "module:fast-async", + { + "runtimePattern": null, + "compiler": { + "es7": true, + "noRuntime": true, + "promises": true, + "wrapAwait": true + } + } + ], + [ + "module:babel-plugin-yo-yoify" + ], + [ + "module:@babel/plugin-transform-object-assign" + ] + ], + "presets": [ + "@babel/preset-env" + ] + } + ] + ] + }, + "bin": { + "remix-ide": "./bin/remix-ide" + }, + "scripts": { + "setupremix": "npm run linkremixdebug && npm run linkremixlib && npm run linkremixsolidity && npm run linkremixanalyzer && npm run linkremixtests && npm run linkremixsimulator", + "pullremix": "git clone https://github.com/ethereum/remix", + "linkremixlib": "cd node_modules && rm -rf remix-lib && ln -s ../../remix/remix-lib remix-lib && cd ..", + "linkremixsolidity": "cd node_modules && rm -rf remix-solidity && ln -s ../../remix/remix-solidity remix-solidity && cd ..", + "linkremixtests": "cd node_modules && rm -rf remix-tests && ln -s ../../remix/remix-tests remix-tests && cd ..", + "linkremixdebug": "cd node_modules && rm -rf remix-debug && ln -s ../../remix/remix-debug remix-debug && cd ..", + "linkremixanalyzer": "cd node_modules && rm -rf remix-analyzer && ln -s ../../remix/remix-analyzer remix-analyzer && cd ..", + "linkremixsimulator": "cd node_modules && rm -rf remix-simulator && ln -s ../../remix/remix-simulator remix-simulator && cd ..", + "build": "browserify src/index.js -o build/app.js --exclude solc", + "build_debugger": "browserify src/app/debugger/remix-debugger/index.js -o src/app/debugger/remix-debugger/build/app.js", + "browsertest": "sleep 5 && npm run nightwatch_local", + "csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='assets/css/font-awesome.min.css' assets/css/", + "downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.6.6+commit.6c089d02.js -O soljson.js", + "lint": "standard | notify-error", + "make-mock-compiler": "node ci/makeMockCompiler.js", + "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", + "nightwatch_parallel": "nightwatch -e chrome,firefox --config nightwatch.js", + "nightwatch_local_firefox": "nightwatch --config nightwatch.js --env firefox", + "nightwatch_local_chrome": "nightwatch --config nightwatch.js --env chrome", + "nightwatch_local_ballot": "nightwatch ./test-browser/tests/ballot.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_libraryDeployment": "nightwatch ./test-browser/tests/libraryDeployment.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_solidityImport": "nightwatch ./test-browser/tests/solidityImport.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_recorder": "nightwatch ./test-browser/tests/recorder.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_transactionExecution": "nightwatch ./test-browser/tests/transactionExecution.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_staticAnalysis": "nightwatch ./test-browser/tests/staticAnalysis.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_signingMessage": "nightwatch ./test-browser/tests/signingMessage.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_specialFunctions": "nightwatch ./test-browser/tests/specialFunctions.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_solidityUnitTests": "nightwatch ./test-browser/tests/solidityUnittests.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_remixd": "nightwatch ./test-browser/tests/remixd.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_terminal": "nightwatch ./test-browser/tests/terminal.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_gist": "nightwatch ./test-browser/tests/gist.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_workspace": "nightwatch ./test-browser/tests/workspace.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_defaultLayout": "nightwatch ./test-browser/tests/defaultLayout.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_pluginManager": "nightwatch ./test-browser/tests/pluginManager.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_publishContract": "nightwatch ./test-browser/tests/publishContract.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_generalSettings": "nightwatch ./test-browser/tests/generalSettings.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_fileExplorer": "nightwatch ./test-browser/tests/fileExplorer.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_debugger": "nightwatch ./test-browser/tests/debugger.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_editor": "nightwatch ./test-browser/tests/editor.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_runAndDeploy": "nightwatch ./test-browser/tests/runAndDeploy.js --config nightwatch.js --env chrome-runAndDeploy ", + "onchange": "onchange build/app.js -- npm-run-all lint", + "prepublish": "mkdirp build; npm-run-all -ls downloadsolc_root build", + "remixd": "remixd -s ./contracts --remix-ide http://127.0.0.1:8080", + "selenium": "selenium-standalone start", + "selenium-install": "selenium-standalone install", + "serve": "npx http-server .", + "sourcemap": "exorcist --root ../ build/app.js.map > build/app.js", + "start": "npm-run-all -lpr serve watch onchange remixd", + "test": "csslint && standard && node test/index.js", + "test-browser": "npm-run-all -lpr selenium downloadsolc_root make-mock-compiler serve browsertest", + "watch": "watchify src/index.js -dv -p browserify-reload -o build/app.js --exclude solc", + "reinstall": "rm ./node-modules/ -rf; rm package-lock.json; rm ./build/ -rf; npm install; npm run build", + "ganache-cli": "npx ganache-cli" + } +} diff --git a/release-process.md b/release-process.md new file mode 100644 index 0000000000..45842919b0 --- /dev/null +++ b/release-process.md @@ -0,0 +1,55 @@ +This document includes: + - how to update remix.ethereum.org. + - how to update remix-alpha.ethereum.org. + - how to release remix IDE. + +# remix IDE release + + - git fetch origin master + - git checkout origin/master + - git checkout -b bumpVersion + - update package.json version + - remove package-lock.json version and generate a new one with `npm install` + - merge PR + - git fetch origin master + - git checkout origin/master + - git tag v(version-number) + - git push --tags + - github-changes -o ethereum -r remix-ide -a --only-pulls --use-commit-body --only-merges --between-tags previous_version...next_version + - publish a release in github using the changelog + - rm -rf node_modules + - npm install + - remove all soljson.js files in root folder + - npm run build + - npm publish + - after remix_live is updated, drop the zip (from https://github.com/ethereum/remix-live/) to the release. + +# remix-ide beta release + - git fetch origin master + - git checkout origin/master + - git checkout -b bumpVersion + - update package.json version to the new version "vx.x.x-beta.1" + - remove package-lock/json version and generate a new one with `npm install` + - merge PR + - git fetch origin master + - git checkout origin/master + - git tag v(version-number) (with "vx.x.x-beta.1") + - git push --tags + - github-changes -o ethereum -r remix-ide -a --only-pulls --use-commit-body --only-merges --between-tags previous_version...next_version + - publish a beta release in github using the changelog + - drop zip file to the beta release (from https://github.com/ethereum/remix-live-alpha) + +# remix.ethereum.org update + +This is not strictly speaking a release. Updating the remix site is done through the Travis build: + + - git co -b remix_live origin/remix_live + - git reset --hard -master-commit-hash- + - git push -f origin remix_live + + CircleCI will build automaticaly and remix.ethereum.org will be updated + +# remix-alpha.ethereum.org update + +remix-alpha.ethereum.org is automaticaly updated every time commits are pushed to master + diff --git a/remix_screenshot.png b/remix_screenshot.png new file mode 100644 index 0000000000..9b43c5aac3 Binary files /dev/null and b/remix_screenshot.png differ diff --git a/research-project.md b/research-project.md new file mode 100644 index 0000000000..1d0a37db0e --- /dev/null +++ b/research-project.md @@ -0,0 +1,9 @@ +# Research Project: Improving the Usability of Remix + +Researchers from the University of Münster (Germany) and Innsbruck (Austria) are conducting a research project on improving the usability of Remix. Part of the project is to develop a questionnaire and to pretest it in a pilot study. We kindly ask you to **take part in the pilot study** by visiting http://informatik-remix.uibk.ac.at. Your participation is highly appreciated and will contribute to research on Smart Contract development. + +If you have any questions, please contact the researcher in charge: +Dominique Machuletz +Department of Information Systems +University of Münster, Germany +d.machuletz@uni-muenster.de diff --git a/seleniumConfig.js b/seleniumConfig.js new file mode 100644 index 0000000000..210c9b6fa6 --- /dev/null +++ b/seleniumConfig.js @@ -0,0 +1,11 @@ +module.exports = { + version: '3.8.1', + baseURL: 'https://selenium-release.storage.googleapis.com', + drivers: { + chrome: { + version: '2.39', + arch: process.arch, + baseURL: 'https://chromedriver.storage.googleapis.com' + } + } +} diff --git a/src/app.js b/src/app.js new file mode 100644 index 0000000000..b6e92535a4 --- /dev/null +++ b/src/app.js @@ -0,0 +1,431 @@ +'use strict' + +var isElectron = require('is-electron') +var csjs = require('csjs-inject') +var yo = require('yo-yo') +var remixLib = require('remix-lib') +var registry = require('./global/registry') +var Remixd = require('./lib/remixd') +var loadFileFromParent = require('./loadFilesFromParent') +var { OffsetToLineColumnConverter } = require('./lib/offsetToLineColumnConverter') +var QueryParams = require('./lib/query-params') +var GistHandler = require('./lib/gist-handler') +var Storage = remixLib.Storage +var RemixDProvider = require('./app/files/remixDProvider') +var Config = require('./config') +var Renderer = require('./app/ui/renderer') +var examples = require('./app/editor/example-contracts') +var modalDialogCustom = require('./app/ui/modal-dialog-custom') +var FileManager = require('./app/files/fileManager') +var FileProvider = require('./app/files/fileProvider') +var toolTip = require('./app/ui/tooltip') +var CompilerMetadata = require('./app/files/compiler-metadata') +var CompilerImport = require('./app/compiler/compiler-imports') + +const Blockchain = require('./blockchain/blockchain.js') +const PluginUDapp = require('./blockchain/pluginUDapp.js') + +const PluginManagerComponent = require('./app/components/plugin-manager-component') +const CompilersArtefacts = require('./app/compiler/compiler-artefacts') + +const CompileTab = require('./app/tabs/compile-tab') +const SettingsTab = require('./app/tabs/settings-tab') +const AnalysisTab = require('./app/tabs/analysis-tab') +const DebuggerTab = require('./app/tabs/debugger-tab') +const TestTab = require('./app/tabs/test-tab') +const FilePanel = require('./app/panels/file-panel') +const Editor = require('./app/editor/editor') +const Terminal = require('./app/panels/terminal') +const ContextualListener = require('./app/editor/contextualListener') +import { basicLogo } from './app/ui/svgLogo' + +import { RunTab, makeUdapp } from './app/udapp' + +import PanelsResize from './lib/panels-resize' +import { Engine } from '@remixproject/engine' +import { RemixAppManager } from './remixAppManager' +import { FramingService } from './framingService' +import { MainView } from './app/panels/main-view' +import { ThemeModule } from './app/tabs/theme-module' +import { NetworkModule } from './app/tabs/network-module' +import { Web3ProviderModule } from './app/tabs/web3-provider' +import { SidePanel } from './app/components/side-panel' +import { HiddenPanel } from './app/components/hidden-panel' +import { VerticalIcons } from './app/components/vertical-icons' +import { LandingPage } from './app/ui/landing-page/landing-page' +import { MainPanel } from './app/components/main-panel' +import FetchAndCompile from './app/compiler/compiler-sourceVerifier-fetchAndCompile' + +import migrateFileSystem from './migrateFileSystem' + +var css = csjs` + html { box-sizing: border-box; } + *, *:before, *:after { box-sizing: inherit; } + body { + /* font: 14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif; */ + font-size : .8rem; + } + pre { + overflow-x: auto; + } + .remixIDE { + width : 100vw; + height : 100vh; + overflow : hidden; + flex-direction : row; + display : flex; + } + .mainpanel { + display : flex; + flex-direction : column; + overflow : hidden; + flex : 1; + } + .iconpanel { + display : flex; + flex-direction : column; + overflow : hidden; + width : 50px; + user-select : none; + } + .sidepanel { + display : flex; + flex-direction : row-reverse; + width : 320px; + } + .highlightcode { + position : absolute; + z-index : 20; + background-color : var(--info); + } + .highlightcode_fullLine { + position : absolute; + z-index : 20; + background-color : var(--info); + opacity : 0.5; + } + .centered { + position : fixed; + top : 20%; + left : 45%; + width : 200px; + height : 200px; + } + .centered svg path { + fill: var(--secondary); + } + .centered svg polygon { + fill: var(--secondary); + } +` + +class App { + constructor (api = {}, events = {}, opts = {}) { + var self = this + self._components = {} + self._view = {} + self._view.splashScreen = yo` +
+ ${basicLogo()} +
+ REMIX IDE +
+
+ ` + document.body.appendChild(self._view.splashScreen) + + // setup storage + var configStorage = new Storage('config-v0.8:') + + // load app config + const config = new Config(configStorage) + registry.put({api: config, name: 'config'}) + + // load file system + self._components.filesProviders = {} + self._components.filesProviders['browser'] = new FileProvider('browser') + registry.put({api: self._components.filesProviders['browser'], name: 'fileproviders/browser'}) + + var remixd = new Remixd(65520) + registry.put({api: remixd, name: 'remixd'}) + remixd.event.register('system', (message) => { + if (message.error) toolTip(message.error) + }) + + self._components.filesProviders['localhost'] = new RemixDProvider(remixd) + registry.put({api: self._components.filesProviders['localhost'], name: 'fileproviders/localhost'}) + registry.put({api: self._components.filesProviders, name: 'fileproviders'}) + + migrateFileSystem(self._components.filesProviders['browser']) + } + + init () { + var self = this + run.apply(self) + } + + render () { + var self = this + if (self._view.el) return self._view.el + // not resizable + self._view.iconpanel = yo` +
+ ${''} +
+ ` + + // center panel, resizable + self._view.sidepanel = yo` +
+ ${''} +
+ ` + + // handle the editor + terminal + self._view.mainpanel = yo` +
+ ${''} +
+ ` + + self._components.resizeFeature = new PanelsResize(self._view.sidepanel) + + self._view.el = yo` + + ` + return self._view.el + } +} + +module.exports = App + +async function run () { + var self = this + + // check the origin and warn message + if (window.location.hostname === 'yann300.github.io') { + modalDialogCustom.alert('This UNSTABLE ALPHA branch of Remix has been moved to http://ethereum.github.io/remix-live-alpha.') + } else if (window.location.hostname === 'remix-alpha.ethereum.org' || + (window.location.hostname === 'ethereum.github.io' && window.location.pathname.indexOf('/remix-live-alpha') === 0)) { + modalDialogCustom.alert(`Welcome to the Remix alpha instance. Please use it to try out latest features. But use preferably https://remix.ethereum.org for any production work.`) + } else if (window.location.protocol.indexOf('http') === 0 && + window.location.hostname !== 'remix.ethereum.org' && + window.location.hostname !== 'localhost' && + window.location.hostname !== '127.0.0.1') { + modalDialogCustom.alert(`The Remix IDE has moved to http://remix.ethereum.org.\n +This instance of Remix you are visiting WILL NOT BE UPDATED.\n +Please make a backup of your contracts and start using http://remix.ethereum.org`) + } + if (window.location.protocol.indexOf('https') === 0) { + toolTip('You are using an `https` connection. Please switch to `http` if you are using Remix against an `http Web3 provider` or allow Mixed Content in your browser.') + } + + const hosts = ['127.0.0.1:8080', '192.168.0.101:8080', 'localhost:8080'] + // workaround for Electron support + if (!isElectron() && !hosts.includes(window.location.host)) { + // Oops! Accidentally trigger refresh or bookmark. + window.onbeforeunload = function () { + return 'Are you sure you want to leave?' + } + } + + // APP_MANAGER + const appManager = new RemixAppManager({}) + const workspace = appManager.pluginLoader.get() + const engine = new Engine(appManager) + await engine.onload() + + // SERVICES + // ----------------- import content servive ------------------------ + const contentImport = new CompilerImport() + // ----------------- theme servive --------------------------------- + const themeModule = new ThemeModule(registry) + registry.put({api: themeModule, name: 'themeModule'}) + themeModule.initTheme(() => { + setTimeout(() => { + document.body.removeChild(self._view.splashScreen) + self._view.el.style.visibility = 'visible' + }, 1500) + }) + // ----------------- editor servive ---------------------------- + const editor = new Editor({}, themeModule) // wrapper around ace editor + registry.put({api: editor, name: 'editor'}) + editor.event.register('requiringToSaveCurrentfile', () => fileManager.saveCurrentFile()) + + // ----------------- fileManager servive ---------------------------- + const fileManager = new FileManager(editor) + registry.put({api: fileManager, name: 'filemanager'}) + + const blockchain = new Blockchain(registry.get('config').api) + const pluginUdapp = new PluginUDapp(blockchain) + + // ----------------- compilation metadata generation servive --------- + const compilerMetadataGenerator = new CompilerMetadata(blockchain, fileManager, registry.get('config').api) + // ----------------- compilation result service (can keep track of compilation results) ---------------------------- + const compilersArtefacts = new CompilersArtefacts() // store all the compilation results (key represent a compiler name) + registry.put({api: compilersArtefacts, name: 'compilersartefacts'}) + + // service which fetch contract artifacts from sourve-verify, put artifacts in remix and compile it + const fetchAndCompile = new FetchAndCompile() + // ----------------- network service (resolve network id / name) ----- + const networkModule = new NetworkModule(blockchain) + // ----------------- represent the current selected web3 provider ---- + const web3Provider = new Web3ProviderModule(blockchain) + // ----------------- convert offset to line/column service ----------- + const offsetToLineColumnConverter = new OffsetToLineColumnConverter() + registry.put({api: offsetToLineColumnConverter, name: 'offsettolinecolumnconverter'}) + + // -------------------Terminal---------------------------------------- + + const terminal = new Terminal( + { appManager, blockchain }, + { + getPosition: (event) => { + var limitUp = 36 + var limitDown = 20 + var height = window.innerHeight + var newpos = (event.pageY < limitUp) ? limitUp : event.pageY + newpos = (newpos < height - limitDown) ? newpos : height - limitDown + return height - newpos + } + } + ) + makeUdapp(blockchain, compilersArtefacts, (domEl) => terminal.logHtml(domEl)) + + const contextualListener = new ContextualListener({editor}) + + engine.register([ + contentImport, + themeModule, + editor, + fileManager, + compilerMetadataGenerator, + compilersArtefacts, + networkModule, + offsetToLineColumnConverter, + contextualListener, + terminal, + web3Provider, + fetchAndCompile + ]) + + // LAYOUT & SYSTEM VIEWS + const appPanel = new MainPanel() + const mainview = new MainView(contextualListener, editor, appPanel, fileManager, appManager, terminal) + registry.put({ api: mainview, name: 'mainview' }) + + engine.register(appPanel) + + // those views depend on app_manager + const menuicons = new VerticalIcons(appManager) + const landingPage = new LandingPage(appManager, menuicons) + const sidePanel = new SidePanel(appManager, menuicons) + const hiddenPanel = new HiddenPanel() + const pluginManagerComponent = new PluginManagerComponent(appManager, engine) + const filePanel = new FilePanel(appManager) + let settings = new SettingsTab( + registry.get('config').api, + editor, + appManager + ) + + // adding Views to the DOM + self._view.mainpanel.appendChild(mainview.render()) + self._view.iconpanel.appendChild(menuicons.render()) + self._view.sidepanel.appendChild(sidePanel.render()) + document.body.appendChild(hiddenPanel.render()) // Hidden Panel is display none, it can be directly on body + + engine.register([ + menuicons, + landingPage, + hiddenPanel, + sidePanel, + pluginManagerComponent, + filePanel, + settings + ]) + + // CONTENT VIEWS & DEFAULT PLUGINS + const compileTab = new CompileTab( + editor, + registry.get('config').api, + new Renderer(), + registry.get('fileproviders/browser').api, + registry.get('filemanager').api + ) + const run = new RunTab( + blockchain, + pluginUdapp, + registry.get('config').api, + registry.get('filemanager').api, + registry.get('editor').api, + filePanel, + registry.get('compilersartefacts').api, + networkModule, + mainview, + registry.get('fileproviders/browser').api, + ) + const analysis = new AnalysisTab(registry) + const debug = new DebuggerTab(blockchain) + const test = new TestTab( + registry.get('filemanager').api, + filePanel, + compileTab, + appManager, + new Renderer() + ) + + engine.register([ + compileTab, + run, + debug, + analysis, + test, + filePanel.remixdHandle + ]) + + try { + engine.register(await appManager.registeredPlugins()) + } catch (e) { + console.log('couldn\'t register iframe plugins', e.message) + } + + await appManager.activatePlugin(['contentImport', 'theme', 'editor', 'fileManager', 'compilerMetadata', 'compilerArtefacts', 'network', 'web3Provider', 'offsetToLineColumnConverter']) + await appManager.activatePlugin(['mainPanel', 'menuicons']) + await appManager.activatePlugin(['home', 'sidePanel', 'hiddenPanel', 'pluginManager', 'fileExplorers', 'settings', 'contextualListener', 'scriptRunner', 'terminal', 'fetchAndCompile']) + + // Set workspace after initial activation + if (Array.isArray(workspace)) await appManager.activatePlugin(workspace) + + // Load and start the service who manager layout and frame + const framingService = new FramingService(sidePanel, menuicons, mainview, this._components.resizeFeature) + framingService.start() + + // get the file list from the parent iframe + loadFileFromParent(fileManager) + + // get the file from gist + const gistHandler = new GistHandler() + const queryParams = new QueryParams() + const loadedFromGist = gistHandler.loadFromGist(queryParams.get(), fileManager) + if (!loadedFromGist) { + // insert example contracts if there are no files to show + self._components.filesProviders['browser'].resolveDirectory('/', (error, filesList) => { + if (error) console.error(error) + if (Object.keys(filesList).length === 0) { + for (let file in examples) { + fileManager.writeFile(examples[file].name, examples[file].content) + } + } + }) + } + + if (isElectron()) { + appManager.activatePlugin('remixd') + } +} diff --git a/src/app/compiler/compiler-abstract.js b/src/app/compiler/compiler-abstract.js new file mode 100644 index 0000000000..aa3b1cfaa7 --- /dev/null +++ b/src/app/compiler/compiler-abstract.js @@ -0,0 +1,42 @@ +'use strict' +var remixLib = require('remix-lib') +var txHelper = remixLib.execution.txHelper + +module.exports = class CompilerAbstract { + constructor (languageversion, data, source) { + this.languageversion = languageversion + this.data = data + this.source = source // source code + } + + getContracts () { + return this.data.contracts + } + + getContract (name) { + return txHelper.getContract(name, this.data.contracts) + } + + visitContracts (calllback) { + return txHelper.visitContracts(this.data.contracts, calllback) + } + + getData () { + return this.data + } + + getAsts () { + return this.data.sources // ast + } + + getSourceName (fileIndex) { + if (this.data && this.data.sources) { + return Object.keys(this.data.sources)[fileIndex] + } + return null + } + + getSourceCode () { + return this.source + } +} diff --git a/src/app/compiler/compiler-artefacts.js b/src/app/compiler/compiler-artefacts.js new file mode 100644 index 0000000000..ecc25cbe93 --- /dev/null +++ b/src/app/compiler/compiler-artefacts.js @@ -0,0 +1,48 @@ +'use strict' +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' +import CompilerAbstract from './compiler-abstract' + +const profile = { + name: 'compilerArtefacts', + methods: [], + events: [], + version: packageJson.version +} + +module.exports = class CompilerArtefacts extends Plugin { + constructor () { + super(profile) + this.compilersArtefacts = {} + } + + clear () { + this.compilersArtefacts = {} + } + + onActivation () { + this.on('solidity', 'compilationFinished', (file, source, languageVersion, data) => { + this.compilersArtefacts['__last'] = new CompilerAbstract(languageVersion, data, source) + }) + + this.on('vyper', 'compilationFinished', (file, source, languageVersion, data) => { + this.compilersArtefacts['__last'] = new CompilerAbstract(languageVersion, data, source) + }) + + this.on('lexon', 'compilationFinished', (file, source, languageVersion, data) => { + this.compilersArtefacts['__last'] = new CompilerAbstract(languageVersion, data, source) + }) + } + + addResolvedContract (address, compilerData) { + this.compilersArtefacts[address] = compilerData + } + + isResolved (address) { + return this.compilersArtefacts[address] !== undefined + } + + get (key) { + return this.compilersArtefacts[key] + } +} diff --git a/src/app/compiler/compiler-helpers.js b/src/app/compiler/compiler-helpers.js new file mode 100644 index 0000000000..a20ffa13b1 --- /dev/null +++ b/src/app/compiler/compiler-helpers.js @@ -0,0 +1,20 @@ +'use strict' +import { canUseWorker } from './compiler-utils' +import { Compiler } from 'remix-solidity' +import CompilerAbstract from './compiler-abstract' + +export const compile = async (compilationTargets, settings) => { + return await (() => { + return new Promise((resolve, reject) => { + const compiler = new Compiler(() => {}) + compiler.set('evmVersion', settings.evmVersion) + compiler.set('optimize', settings.optimize) + compiler.loadVersion(canUseWorker(settings.version), settings.compilerUrl) + compiler.event.register('compilationFinished', (success, compilationData, source) => { + if (!success) return reject(compilationData) + resolve(new CompilerAbstract(settings.version, compilationData, source)) + }) + compiler.event.register('compilerLoaded', _ => compiler.compile(compilationTargets, '')) + }) + })() +} diff --git a/src/app/compiler/compiler-imports.js b/src/app/compiler/compiler-imports.js new file mode 100644 index 0000000000..244d1c4f31 --- /dev/null +++ b/src/app/compiler/compiler-imports.js @@ -0,0 +1,174 @@ +'use strict' +const globalRegistry = require('../../global/registry') +var base64 = require('js-base64').Base64 +var swarmgw = require('swarmgw')() +var resolver = require('@resolver-engine/imports').ImportsEngine() +var request = require('request') +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +const profile = { + name: 'contentImport', + displayName: 'content import', + version: packageJson.version, + methods: ['resolve'] +} + +module.exports = class CompilerImports extends Plugin { + constructor () { + super(profile) + this.previouslyHandled = {} // cache import so we don't make the request at each compilation. + } + + handleGithubCall (root, path, cb) { + let param = '?' + // const token = await this.call('settings', 'getGithubAccessToken') + const token = globalRegistry.get('config').api.get('settings/gist-access-token') // TODO replace with the plugin call above https://github.com/ethereum/remix-ide/issues/2288 + param += token ? 'access_token=' + token : '' + const regex = path.match(/blob\/([^/]+)\/(.*)/) + if (regex) { + // if we have /blob/master/+path we extract the branch name "master" and add it as a parameter to the github api + // the ref can be branch name, tag, commit id + const reference = regex[1] + param += '&ref=' + reference + path = path.replace(`blob/${reference}/`, '') + } + return request.get( + { + url: 'https://api.github.com/repos/' + root + '/contents/' + path + param, + json: true + }, + (err, r, data) => { + if (err) { + return cb(err || 'Unknown transport error') + } + if ('content' in data) { + cb(null, base64.decode(data.content), root + '/' + path) + } else if ('message' in data) { + cb(data.message) + } else { + cb('Content not received') + } + }) + } + + handleSwarmImport (url, cleanUrl, cb) { + swarmgw.get(url, function (err, content) { + cb(err, content, cleanUrl) + }) + } + + handleIPFS (url, cb) { + // replace ipfs:// with /ipfs/ + url = url.replace(/^ipfs:\/\/?/, 'ipfs/') + + return request.get( + { + url: 'https://ipfsgw.komputing.org/' + url + }, + (err, r, data) => { + if (err) { + return cb(err || 'Unknown transport error') + } + cb(null, data, url) + }) + } + + handleHttpCall (url, cleanUrl, cb) { + return request.get( + { + url + }, + (err, r, data) => { + if (err) { + return cb(err || 'Unknown transport error') + } + cb(null, data, cleanUrl) + }) + } + + handlers () { + return [ + { type: 'github', match: /^(https?:\/\/)?(www.)?github.com\/([^/]*\/[^/]*)\/(.*)/, handler: (match, cb) => { this.handleGithubCall(match[3], match[4], cb) } }, + { type: 'http', match: /^(http?:\/\/?(.*))$/, handler: (match, cb) => { this.handleHttpCall(match[1], match[2], cb) } }, + { type: 'https', match: /^(https?:\/\/?(.*))$/, handler: (match, cb) => { this.handleHttpCall(match[1], match[2], cb) } }, + { type: 'swarm', match: /^(bzz-raw?:\/\/?(.*))$/, handler: (match, cb) => { this.handleSwarmImport(match[1], match[2], cb) } }, + { type: 'ipfs', match: /^(ipfs:\/\/?.+)/, handler: (match, cb) => { this.handleIPFS(match[1], cb) } } + ] + } + + isRelativeImport (url) { + return /^([^/]+)/.exec(url) + } + + resolve (url) { + return new Promise((resolve, reject) => { + this.import(url, null, (error, content, cleanUrl, type, url) => { + if (error) return reject(error) + resolve({ content, cleanUrl, type, url }) + }) + }) + } + + import (url, force, loadingCb, cb) { + if (typeof force !== 'boolean') { + let temp = loadingCb + loadingCb = force + cb = temp + force = false + } + if (!loadingCb) loadingCb = () => {} + if (!cb) cb = () => {} + + var self = this + if (force) delete this.previouslyHandled[url] + var imported = this.previouslyHandled[url] + if (imported) { + return cb(null, imported.content, imported.cleanUrl, imported.type, url) + } + var handlers = this.handlers() + + var found = false + handlers.forEach(function (handler) { + if (found) { + return + } + + var match = handler.match.exec(url) + if (match) { + found = true + + loadingCb('Loading ' + url + ' ...') + handler.handler(match, function (err, content, cleanUrl) { + if (err) { + cb('Unable to import "' + cleanUrl + '": ' + err) + return + } + self.previouslyHandled[url] = { + content: content, + cleanUrl: cleanUrl, + type: handler.type + } + cb(null, content, cleanUrl, handler.type, url) + }) + } + }) + if (found) return + + resolver + .resolve(url) + .then(result => { + return resolver.require(url) + }) + .then(result => { + if (url.indexOf(result.provider + ':') === 0) { + url = url.substring(result.provider.length + 1) // remove the github prefix + } + cb(null, result.source, url, result.provider, result.url) + }) + .catch(err => { + err + cb('Unable to import "' + url + '": File not found') + }) + } +} diff --git a/src/app/compiler/compiler-input.js b/src/app/compiler/compiler-input.js new file mode 100644 index 0000000000..c5de89f735 --- /dev/null +++ b/src/app/compiler/compiler-input.js @@ -0,0 +1,21 @@ +'use strict' + +module.exports = (sources, opts) => { + return JSON.stringify({ + language: 'Solidity', + sources: sources, + settings: { + optimizer: { + enabled: opts.optimize === true || opts.optimize === 1, + runs: 200 + }, + libraries: opts.libraries, + outputSelection: { + '*': { + '': [ 'legacyAST' ], + '*': [ 'abi', 'metadata', 'devdoc', 'userdoc', 'evm.legacyAssembly', 'evm.bytecode', 'evm.deployedBytecode', 'evm.methodIdentifiers', 'evm.gasEstimates' ] + } + } + } + }) +} diff --git a/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js b/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js new file mode 100644 index 0000000000..04956b5ac7 --- /dev/null +++ b/src/app/compiler/compiler-sourceVerifier-fetchAndCompile.js @@ -0,0 +1,125 @@ +const ethutil = require('ethereumjs-util') +import * as packageJson from '../../../package.json' +import { Plugin } from '@remixproject/engine' +import { urlFromVersion } from './compiler-utils' +import { compile } from './compiler-helpers' +import globalRegistry from '../../global/registry' + +import remixLib from 'remix-lib' + +const profile = { + name: 'fetchAndCompile', + methods: ['resolve'], + version: packageJson.version +} + +export default class FetchAndCompile extends Plugin { + + constructor () { + super(profile) + this.unresolvedAddresses = [] + this.sourceVerifierNetWork = ['Main', 'Rinkeby', 'Ropsten', 'Goerli'] + } + + /** + * Fetch compiliation metadata from source-Verify from a given @arg contractAddress - https://github.com/ethereum/source-verify + * Put the artifacts in the file explorer + * Compile the code using Solidity compiler + * Returns compilation data + * + * @param {string} contractAddress - Address of the contrac to resolve + * @param {string} compilersartefacts - Object containing a mapping of compilation results (byContractAddress and __last) + * @return {CompilerAbstract} - compilation data targeting the given @arg contractAddress + */ + async resolve (contractAddress, targetPath, web3) { + contractAddress = ethutil.toChecksumAddress(contractAddress) + const compilersartefacts = globalRegistry.get('compilersartefacts').api + + const localCompilation = () => compilersartefacts.get('__last') ? compilersartefacts.get('__last') : null + + const resolved = compilersartefacts.get(contractAddress) + if (resolved) return resolved + if (this.unresolvedAddresses.includes(contractAddress)) return localCompilation() + + // sometimes when doing an internal call, the only available artifact is the Solidity interface. + // resolving addresses of internal call would allow to step over the source code, even if the declaration was made using an Interface. + + let network + try { + network = await this.call('network', 'detectNetwork') + } catch (e) { + return localCompilation() + } + if (!network) return localCompilation() + if (!this.sourceVerifierNetWork.includes(network.name)) return localCompilation() + + // check if the contract if part of the local compilation result + const codeAtAddress = await web3.eth.getCode(contractAddress) + const compilation = localCompilation() + if (compilation) { + let found = false + compilation.visitContracts((contract) => { + found = remixLib.util.compareByteCode('0x' + contract.object.evm.deployedBytecode.object, codeAtAddress) + return found + }) + if (found) { + compilersartefacts.addResolvedContract(contractAddress, compilation) + setTimeout(_ => this.emit('usingLocalCompilation', contractAddress), 0) + return compilation + } + } + + let name = network.name.toLowerCase() + name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main" + let data + try { + data = await this.call('source-verification', 'fetchByNetwork', contractAddress, name.toLowerCase()) + } catch (e) { + setTimeout(_ => this.emit('notFound', contractAddress), 0) // plugin framework returns a time out error although it actually didn't find the source... + this.unresolvedAddresses.push(contractAddress) + return localCompilation() + } + if (!data || !data.metadata) { + setTimeout(_ => this.emit('notFound', contractAddress), 0) + this.unresolvedAddresses.push(contractAddress) + return localCompilation() + } + + // set the solidity contract code using metadata + await this.call('fileManager', 'setFile', `${targetPath}/${name}/${contractAddress}/metadata.json`, JSON.stringify(data.metadata, null, '\t')) + let compilationTargets = {} + for (let file in data.metadata.sources) { + const urls = data.metadata.sources[file].urls + for (let url of urls) { + if (url.includes('ipfs')) { + let stdUrl = `ipfs://${url.split('/')[2]}` + const source = await this.call('contentImport', 'resolve', stdUrl) + file = file.replace('browser/', '') // should be fixed in the remix IDE end. + const path = `${targetPath}/${name}/${contractAddress}/${file}` + await this.call('fileManager', 'setFile', path, source.content) + compilationTargets[path] = { content: source.content } + break + } + } + } + + // compile + const settings = { + version: data.metadata.compiler.version, + languageName: data.metadata.language, + evmVersion: data.metadata.settings.evmVersion, + optimize: data.metadata.settings.optimizer.enabled, + compilerUrl: urlFromVersion(data.metadata.compiler.version) + } + try { + setTimeout(_ => this.emit('compiling', settings), 0) + const compData = await compile(compilationTargets, settings) + compilersartefacts.addResolvedContract(contractAddress, compData) + return compData + } catch (e) { + this.unresolvedAddresses.push(contractAddress) + setTimeout(_ => this.emit('compilationFailed'), 0) + return localCompilation() + } + } +} diff --git a/src/app/compiler/compiler-utils.js b/src/app/compiler/compiler-utils.js new file mode 100644 index 0000000000..f7afcf9307 --- /dev/null +++ b/src/app/compiler/compiler-utils.js @@ -0,0 +1,48 @@ +const semver = require('semver') +/* global Worker */ + +export const baseUrl = 'https://solc-bin.ethereum.org/bin' + +export function urlFromVersion (version) { + return `${baseUrl}/soljson-v${version}.js` +} +/** + * Checks if the worker can be used to load a compiler. + * checks a compiler whitelist, browser support and OS. + */ +export function canUseWorker (selectedVersion) { + // Following restrictions should be deleted when Solidity will release fixed versions of compilers. + // See https://github.com/ethereum/remix-ide/issues/2461 + const isChrome = !!window.chrome + const os = retrieveOS() + // define a whitelist for Linux + const linuxWL = ['0.4.26', '0.5.3', '0.5.4', '0.5.5'] + const version = semver.coerce(selectedVersion) + // defining whitelist for chrome + let isFromWhiteList = false + switch (os) { + case 'Windows': + isFromWhiteList = semver.gt(version, '0.5.2') || version === '0.4.26' + break + case 'Linux': + isFromWhiteList = semver.gt(version, '0.5.13') || linuxWL.includes(version) + break + default : + isFromWhiteList = true + } + return browserSupportWorker() && (!isChrome || (isChrome && isFromWhiteList)) +} + +function browserSupportWorker () { + return document.location.protocol !== 'file:' && Worker !== undefined +} + +function retrieveOS () { + let osName = 'Unknown OS' + if (navigator.platform.indexOf('Win') !== -1) { + osName = 'Windows' + } else if (navigator.platform.indexOf('Linux') !== -1) { + osName = 'Linux' + } + return osName +} diff --git a/src/app/components/hidden-panel.js b/src/app/components/hidden-panel.js new file mode 100644 index 0000000000..048df1fd51 --- /dev/null +++ b/src/app/components/hidden-panel.js @@ -0,0 +1,32 @@ +import { AbstractPanel } from './panel' +import * as packageJson from '../../../package.json' +const csjs = require('csjs-inject') +const yo = require('yo-yo') + +const css = csjs` + .pluginsContainer { + display: none; + } +` + +const profile = { + name: 'hiddenPanel', + displayName: 'Hidden Panel', + description: '', + version: packageJson.version, + methods: ['addView', 'removeView'] +} + +export class HiddenPanel extends AbstractPanel { + + constructor () { + super(profile) + } + + render () { + return yo` +
+ ${this.view} +
` + } +} diff --git a/src/app/components/local-plugin.js b/src/app/components/local-plugin.js new file mode 100644 index 0000000000..f71e10d7bb --- /dev/null +++ b/src/app/components/local-plugin.js @@ -0,0 +1,114 @@ +/* global localStorage */ +const yo = require('yo-yo') +const modalDialog = require('../ui/modaldialog') + +const defaultProfile = { + methods: [], + location: 'sidePanel', + type: 'iframe' +} + +module.exports = class LocalPlugin { + /** + * Open a modal to create a local plugin + * @param {Profile[]} plugins The list of the plugins in the store + * @returns {Promise<{api: any, profile: any}>} A promise with the new plugin profile + */ + open (plugins) { + this.profile = JSON.parse(localStorage.getItem('plugins/local')) || defaultProfile + return new Promise((resolve, reject) => { + const onValidation = () => { + try { + const profile = this.create() + resolve(profile) + } catch (err) { + reject(err) + } + } + modalDialog('Local Plugin', this.form(), + { fn: () => onValidation() }, + { fn: () => resolve() } + ) + }) + } + + /** + * Create the object to add to the plugin-list + */ + create () { + const profile = { + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMjYyIDEwNzVxLTM3IDEyMS0xMzggMTk1dC0yMjggNzQtMjI4LTc0LTEzOC0xOTVxLTgtMjUgNC00OC41dDM4LTMxLjVxMjUtOCA0OC41IDR0MzEuNSAzOHEyNSA4MCA5Mi41IDEyOS41dDE1MS41IDQ5LjUgMTUxLjUtNDkuNSA5Mi41LTEyOS41cTgtMjYgMzItMzh0NDktNCAzNyAzMS41IDQgNDguNXptLTQ5NC00MzVxMCA1My0zNy41IDkwLjV0LTkwLjUgMzcuNS05MC41LTM3LjUtMzcuNS05MC41IDM3LjUtOTAuNSA5MC41LTM3LjUgOTAuNSAzNy41IDM3LjUgOTAuNXptNTEyIDBxMCA1My0zNy41IDkwLjV0LTkwLjUgMzcuNS05MC41LTM3LjUtMzcuNS05MC41IDM3LjUtOTAuNSA5MC41LTM3LjUgOTAuNSAzNy41IDM3LjUgOTAuNXptMjU2IDI1NnEwLTEzMC01MS0yNDguNXQtMTM2LjUtMjA0LTIwNC0xMzYuNS0yNDguNS01MS0yNDguNSA1MS0yMDQgMTM2LjUtMTM2LjUgMjA0LTUxIDI0OC41IDUxIDI0OC41IDEzNi41IDIwNCAyMDQgMTM2LjUgMjQ4LjUgNTEgMjQ4LjUtNTEgMjA0LTEzNi41IDEzNi41LTIwNCA1MS0yNDguNXptMTI4IDBxMCAyMDktMTAzIDM4NS41dC0yNzkuNSAyNzkuNS0zODUuNSAxMDMtMzg1LjUtMTAzLTI3OS41LTI3OS41LTEwMy0zODUuNSAxMDMtMzg1LjUgMjc5LjUtMjc5LjUgMzg1LjUtMTAzIDM4NS41IDEwMyAyNzkuNSAyNzkuNSAxMDMgMzg1LjV6Ii8+PC9zdmc+', + methods: [], + location: 'sidePanel', + type: 'iframe', + ...this.profile, + hash: `local-${this.profile.name}` + } + if (!profile.location) throw new Error('Plugin should have a location') + if (!profile.name) throw new Error('Plugin should have a name') + if (!profile.url) throw new Error('Plugin should have an URL') + localStorage.setItem('plugins/local', JSON.stringify(profile)) + return profile + } + + updateName ({target}) { + this.profile.name = target.value + } + + updateUrl ({target}) { + this.profile.url = target.value + } + + updateDisplayName ({target}) { + this.profile.displayName = target.value + } + + updateProfile (key, e) { + this.profile[key] = e.target.value + } + + /** The form to create a local plugin */ + form () { + const name = this.profile.name || '' + const url = this.profile.url || '' + const displayName = this.profile.displayName || '' + const radioSelection = (key, label, message) => { + return this.profile[key] === label + ? yo`
+ + +
` + : yo`
+ + +
` + } + + return yo` +
+
+ + +
+
+ + +
+
+ + +
+
Type of connection (required)
+
+ ${radioSelection('type', 'iframe', 'Iframe')} + ${radioSelection('type', 'ws', 'Websocket')} +
+
Location in remix (required)
+
+ ${radioSelection('location', 'sidePanel', 'Side Panel')} + ${radioSelection('location', 'mainPanel', 'Main Panel')} + ${radioSelection('location', 'none', 'None')} +
+
` + } +} diff --git a/src/app/components/main-panel.js b/src/app/components/main-panel.js new file mode 100644 index 0000000000..082ccb61c5 --- /dev/null +++ b/src/app/components/main-panel.js @@ -0,0 +1,33 @@ +import { AbstractPanel } from './panel' +import * as packageJson from '../../../package.json' +const yo = require('yo-yo') +const csjs = require('csjs-inject') + +const css = csjs` + .pluginsContainer { + height: 100%; + display: flex; + overflow-y: hidden; + } +` + +const profile = { + name: 'mainPanel', + displayName: 'Main Panel', + description: '', + version: packageJson.version, + methods: ['addView', 'removeView'] +} + +export class MainPanel extends AbstractPanel { + constructor () { + super(profile) + } + + render () { + return yo` +
+ ${this.view} +
` + } +} diff --git a/src/app/components/panel.js b/src/app/components/panel.js new file mode 100644 index 0000000000..bd1d59d176 --- /dev/null +++ b/src/app/components/panel.js @@ -0,0 +1,112 @@ +import { EventEmitter } from 'events' +const csjs = require('csjs-inject') +const yo = require('yo-yo') +import { HostPlugin } from '@remixproject/engine' + +const css = csjs` + .plugins { + height: 100%; + } + .plugItIn { + display : none; + height : 100%; + } + .plugItIn > div { + overflow-y : auto; + height : 100%; + width : 100%; + } + .plugItIn.active { + display : block; + } + .pluginsContainer { + height : 100%; + overflow-y : hidden; + } +` + +/** Abstract class used for hosting the view of a plugin */ +export class AbstractPanel extends HostPlugin { + + constructor (profile) { + super(profile) + this.events = new EventEmitter() + this.contents = {} + this.active = undefined + + // View where the plugin HTMLElement leaves + this.view = yo`
` + } + + /** + * Add the plugin to the panel + * @param {String} name the name of the plugin + * @param {HTMLElement} content the HTMLContent of the plugin + */ + add (view, name) { + if (this.contents[name]) throw new Error(`Plugin ${name} already rendered`) + view.style.height = '100%' + view.style.width = '100%' + view.style.border = '0' + + const isIframe = view.tagName === 'IFRAME' + view.style.display = isIframe ? 'none' : 'block' + const loading = isIframe ? yo` +
+
+ Loading... +
+
+ ` : '' + this.contents[name] = yo`
${view}${loading}
` + + if (view.tagName === 'IFRAME') { + view.addEventListener('load', () => { + if (this.contents[name].contains(loading)) { + this.contents[name].removeChild(loading) + } + view.style.display = 'block' + }) + } + this.contents[name].style.display = 'none' + this.view.appendChild(this.contents[name]) + } + + addView (profile, view) { + this.add(view, profile.name) + } + + removeView (profile) { + this.remove(profile.name) + } + + /** + * Remove a plugin from the panel + * @param {String} name The name of the plugin to remove + */ + remove (name) { + const el = this.contents[name] + delete this.contents[name] + if (el) el.parentElement.removeChild(el) + if (name === this.active) this.active = undefined + } + + /** + * Display the content of this specific plugin + * @param {String} name The name of the plugin to display the content + */ + showContent (name) { + if (!this.contents[name]) throw new Error(`Plugin ${name} is not yet activated`) + // hiding the current view and display the `moduleName` + if (this.active) { + this.contents[this.active].style.display = 'none' + } + this.contents[name].style.display = 'flex' + this.active = name + } + + focus (name) { + this.showContent(name) + } +} + diff --git a/src/app/components/plugin-manager-component.js b/src/app/components/plugin-manager-component.js new file mode 100644 index 0000000000..2b95d250e7 --- /dev/null +++ b/src/app/components/plugin-manager-component.js @@ -0,0 +1,240 @@ +const yo = require('yo-yo') +const csjs = require('csjs-inject') +const EventEmitter = require('events') +const LocalPlugin = require('./local-plugin') +import { ViewPlugin, IframePlugin, WebsocketPlugin } from '@remixproject/engine' +import { PluginManagerSettings } from './plugin-manager-settings' +import * as packageJson from '../../../package.json' +const addToolTip = require('../ui/tooltip') + +const css = csjs` + .pluginSearch { + display: flex; + flex-direction: column; + align-items: center; + background-color: var(--light); + padding: 10px; + position: sticky; + top: 0; + z-index: 2; + margin-bottom: 0px; + } + .pluginSearchInput { + height: 38px; + } + .pluginSearchButton { + font-size: 13px; + } + .displayName { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + } + .description { + font-size: 13px; + line-height: 18px; + text-transform: capitalize; + } + .row { + display: flex; + flex-direction: row; + } + .isStuck { + background-color: var(--primary); + color: + } + .versionWarning { + padding: 4px; + margin: 0 8px; + font-weight: 700; + font-size: 9px; + line-height: 12px; + text-transform: uppercase; + cursor: default; + border: 1px solid; + border-radius: 2px; + } +` + +const profile = { + name: 'pluginManager', + displayName: 'Plugin manager', + methods: [], + events: [], + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNzU1IDQ1M3EzNyAzOCAzNyA5MC41dC0zNyA5MC41bC00MDEgNDAwIDE1MCAxNTAtMTYwIDE2MHEtMTYzIDE2My0zODkuNSAxODYuNXQtNDExLjUtMTAwLjVsLTM2MiAzNjJoLTE4MXYtMTgxbDM2Mi0zNjJxLTEyNC0xODUtMTAwLjUtNDExLjV0MTg2LjUtMzg5LjVsMTYwLTE2MCAxNTAgMTUwIDQwMC00MDFxMzgtMzcgOTEtMzd0OTAgMzcgMzcgOTAuNS0zNyA5MC41bC00MDAgNDAxIDIzNCAyMzQgNDAxLTQwMHEzOC0zNyA5MS0zN3Q5MCAzN3oiLz48L3N2Zz4=', + description: 'Start/stop services, modules and plugins', + kind: 'settings', + location: 'sidePanel', + documentation: 'https://remix-ide.readthedocs.io/en/latest/plugin_manager.html', + version: packageJson.version +} + +class PluginManagerComponent extends ViewPlugin { + + constructor (appManager, engine) { + super(profile) + this.event = new EventEmitter() + this.appManager = appManager + this.views = { + root: null, + items: {} + } + this.localPlugin = new LocalPlugin() + this.filter = '' + this.appManager.event.on('activate', () => { this.reRender() }) + this.appManager.event.on('deactivate', () => { this.reRender() }) + this.appManager.event.on('added', () => { this.reRender() }) + this.engine = engine + } + + isActive (name) { + return this.appManager.actives.includes(name) + } + + renderItem (profile) { + const displayName = (profile.displayName) ? profile.displayName : profile.name + + // Check version of the plugin + let versionWarning + // Alpha + if (profile.version && profile.version.match(/\b(\w*alpha\w*)\b/g)) { + versionWarning = yo`alpha` + } + // Beta + if (profile.version && profile.version.match(/\b(\w*beta\w*)\b/g)) { + versionWarning = yo`beta` + } + + const activationButton = this.isActive(profile.name) + ? yo` + + ` + : yo` + ` + + return yo` +
+
+
+ ${displayName} + ${versionWarning} +
+ ${activationButton} +
+

${profile.description}

+
+ ` + } + + /*************** + * SUB-COMPONENT + */ + /** + * Add a local plugin to the list of plugins + */ + async openLocalPlugin () { + try { + const profile = await this.localPlugin.open(this.appManager.getAll()) + if (!profile) return + if (this.appManager.getIds().includes(profile.name)) { + throw new Error('This name has already been used') + } + const plugin = profile.type === 'iframe' ? new IframePlugin(profile) : new WebsocketPlugin(profile) + this.engine.register(plugin) + this.appManager.activatePlugin(plugin.name) + } catch (err) { + // TODO : Use an alert to handle this error instead of a console.log + console.log(`Cannot create Plugin : ${err.message}`) + addToolTip(`Cannot create Plugin : ${err.message}`) + } + } + + render () { + // Filtering helpers + const isFiltered = (profile) => (profile.displayName ? profile.displayName : profile.name).toLowerCase().includes(this.filter) + const isNotRequired = (profile) => !this.appManager.isRequired(profile.name) + const isNotHome = (profile) => profile.name !== 'home' + const sortByName = (profileA, profileB) => { + const nameA = ((profileA.displayName) ? profileA.displayName : profileA.name).toUpperCase() + const nameB = ((profileB.displayName) ? profileB.displayName : profileB.name).toUpperCase() + return (nameA < nameB) ? -1 : (nameA > nameB) ? 1 : 0 + } + + // Filter all active and inactive modules that are not required + const {actives, inactives} = this.appManager.getAll() + .filter(isFiltered) + .filter(isNotRequired) + .filter(isNotHome) + .sort(sortByName) + .reduce(({actives, inactives}, profile) => { + return this.isActive(profile.name) + ? { actives: [...actives, profile], inactives } + : { inactives: [...inactives, profile], actives } + }, { actives: [], inactives: [] }) + + const activeTile = actives.length !== 0 + ? yo` + ` + : '' + const inactiveTile = inactives.length !== 0 + ? yo` + ` + : '' + + const settings = new PluginManagerSettings().render() + + const rootView = yo` +
+
+ + +
+
+ ${activeTile} +
+ ${actives.map(profile => this.renderItem(profile))} +
+ ${inactiveTile} +
+ ${inactives.map(profile => this.renderItem(profile))} +
+
+ ${settings} +
+ ` + if (!this.views.root) this.views.root = rootView + return rootView + } + + reRender () { + if (this.views.root) { + yo.update(this.views.root, this.render()) + } + } + + filterPlugins ({ target }) { + this.filter = target.value.toLowerCase() + this.reRender() + } +} + +module.exports = PluginManagerComponent diff --git a/src/app/components/plugin-manager-settings.js b/src/app/components/plugin-manager-settings.js new file mode 100644 index 0000000000..04f2744f63 --- /dev/null +++ b/src/app/components/plugin-manager-settings.js @@ -0,0 +1,142 @@ +const yo = require('yo-yo') +const csjs = require('csjs-inject') +const modalDialog = require('../ui/modaldialog') + +const css = csjs` +.permissions { + position: sticky; + bottom: 0; + display: flex; + justify-content: flex-end; + align-items: center; + padding: 5px 20px; +} +.permissions button { + padding: 2px 5px; + cursor: pointer; +} +.permissionForm h4 { + font-size: 1.3rem; + text-align: center; +} +.permissionForm h6 { + font-size: 1.1rem; +} +.permissionForm hr { + width: 80%; +} +.permissionKey { + display: flex; + justify-content: space-between; + align-items: center; +} +.permissionKey i { + cursor: pointer; +} +.checkbox { + display: flex; + align-items: center; +} +.checkbox label { + margin: 0; + font-size: 1rem; +} +` + +export class PluginManagerSettings { + + openDialog () { + const fromLocal = window.localStorage.getItem('plugins/permissions') + this.permissions = JSON.parse(fromLocal || '{}') + this.currentSetting = this.settings() + modalDialog('Plugin Manager Permissions', this.currentSetting, + { fn: () => this.onValidation() }, + ) + } + + onValidation () { + const permissions = JSON.stringify(this.permissions) + window.localStorage.setItem('plugins/permissions', permissions) + } + + /** Clear one permission from a plugin */ + clearPersmission (from, to, method) { + if (this.permissions[to] && this.permissions[to][method]) { + delete this.permissions[to][method][from] + if (Object.keys(this.permissions[to][method]).length === 0) { + delete this.permissions[to][method] + } + if (Object.keys(this.permissions[to]).length === 0) { + delete this.permissions[to] + } + yo.update(this.currentSetting, this.settings()) + } + } + + /** Clear all persmissions from a plugin */ + clearAllPersmission (to) { + if (!this.permissions[to]) return + delete this.permissions[to] + yo.update(this.currentSetting, this.settings()) + } + + settings () { + const permissionByToPlugin = (toPlugin, funcObj) => { + const permissionByMethod = (methodName, fromPlugins) => { + const togglePermission = (fromPlugin) => { + this.permissions[toPlugin][methodName][fromPlugin].allow = !this.permissions[toPlugin][methodName][fromPlugin].allow + } + return Object.keys(fromPlugins).map(fromName => { + const fromPluginPermission = fromPlugins[fromName] + const checkbox = fromPluginPermission.allow + ? yo` togglePermission(fromName)} class="mr-2" type="checkbox" checked id="permission-checkbox-${toPlugin}-${methodName}-${toPlugin}" aria-describedby="module ${fromPluginPermission} asks permission for ${methodName}" />` + : yo` togglePermission(fromName)} class="mr-2" type="checkbox" id="permission-checkbox-${toPlugin}-${methodName}-${toPlugin}" aria-describedby="module ${fromPluginPermission} asks permission for ${methodName}" />` + return yo` +
+
+ ${checkbox} + +
+ +
+ ` + }) + } + + const permissionsByFunctions = Object + .keys(funcObj) + .map(methodName => permissionByMethod(methodName, funcObj[methodName])) + + return yo` +
+
+

${toPlugin} permissions:

+ +
+ ${permissionsByFunctions} +
` + } + + const byToPlugin = Object + .keys(this.permissions) + .map(toPlugin => permissionByToPlugin(toPlugin, this.permissions[toPlugin])) + + const title = byToPlugin.length === 0 + ? yo`

No Permission requested yet.

` + : yo`

Current Permission settings

` + + return yo`
+ ${title} +
+ ${byToPlugin} +
` + } + + render () { + return yo` +
+ +
` + } + +} diff --git a/src/app/components/side-panel.js b/src/app/components/side-panel.js new file mode 100644 index 0000000000..2a0623ebac --- /dev/null +++ b/src/app/components/side-panel.js @@ -0,0 +1,149 @@ +import { AbstractPanel } from './panel' +import * as packageJson from '../../../package.json' +const csjs = require('csjs-inject') +const yo = require('yo-yo') + +const css = csjs` + .panel { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + flex: auto; + } + .swapitTitle { + margin: 0; + text-transform: uppercase; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .swapitTitle i{ + padding-left: 6px; + font-size: 14px; + } + .swapitHeader { + display: flex; + align-items: center; + padding: 16px 24px 15px; + } + .icons i { + height: 80%; + cursor: pointer; + } + .pluginsContainer { + height: 100%; + overflow-y: auto; + } + .titleInfo { + padding-left: 10px; + } + .versionBadge { + background-color: var(--light); + padding: 0 7px; + font-weight: bolder; + margin-left: 5px; + text-transform: lowercase; + cursor: default; + } +` + +const sidePanel = { + name: 'sidePanel', + displayName: 'Side Panel', + description: '', + version: packageJson.version, + methods: ['addView', 'removeView'] +} + +// TODO merge with vertical-icons.js +export class SidePanel extends AbstractPanel { + + constructor (appManager, verticalIcons) { + super(sidePanel) + this.appManager = appManager + this.header = yo`
` + this.renderHeader() + this.verticalIcons = verticalIcons + + // Toggle content + verticalIcons.events.on('toggleContent', (name) => { + if (!this.contents[name]) return + if (this.active === name) { + // TODO: Only keep `this.emit` (issue#2210) + this.emit('toggle', name) + this.events.emit('toggle', name) + return + } + this.showContent(name) + // TODO: Only keep `this.emit` (issue#2210) + this.emit('showing', name) + this.events.emit('showing', name) + }) + // Force opening + verticalIcons.events.on('showContent', (name) => { + if (!this.contents[name]) return + this.showContent(name) + // TODO: Only keep `this.emit` (issue#2210) + this.emit('showing', name) + this.events.emit('showing', name) + }) + } + + removeView (profile) { + super.removeView(profile) + this.verticalIcons.unlinkContent(profile) + } + + addView (profile, view) { + super.addView(profile, view) + this.verticalIcons.linkContent(profile) + } + + /** + * Display content and update the header + * @param {String} name The name of the plugin to display + */ + async showContent (name) { + super.showContent(name) + this.renderHeader() + } + + /** The header of the side panel */ + async renderHeader () { + let name = ' - ' + let docLink = '' + let versionWarning + if (this.active) { + const profile = await this.appManager.getProfile(this.active) + name = profile.displayName ? profile.displayName : profile.name + docLink = profile.documentation ? yo`
` : '' + if (profile.version && profile.version.match(/\b(\w*alpha\w*)\b/g)) { + versionWarning = yo`alpha` + } + // Beta + if (profile.version && profile.version.match(/\b(\w*beta\w*)\b/g)) { + versionWarning = yo`beta` + } + } + + const header = yo` +
+
${name}
+ ${docLink} + ${versionWarning} +
+ ` + yo.update(this.header, header) + } + + render () { + return yo` +
+ ${this.header} +
+ ${this.view} +
+
` + } +} diff --git a/src/app/components/vertical-icons.js b/src/app/components/vertical-icons.js new file mode 100644 index 0000000000..ff64bb3f57 --- /dev/null +++ b/src/app/components/vertical-icons.js @@ -0,0 +1,328 @@ +var yo = require('yo-yo') +var csjs = require('csjs-inject') +var helper = require('../../lib/helper') +let globalRegistry = require('../../global/registry') +const { Plugin } = require('@remixproject/engine') +import * as packageJson from '../../../package.json' +import { basicLogo } from '../ui/svgLogo' + +const EventEmitter = require('events') + +const profile = { + name: 'menuicons', + displayName: 'Vertical Icons', + description: '', + version: packageJson.version, + methods: ['select'] +} + +// TODO merge with side-panel.js. VerticalIcons should not be a plugin +export class VerticalIcons extends Plugin { + + constructor (appManager) { + super(profile) + this.events = new EventEmitter() + this.appManager = appManager + this.icons = {} + this.iconKind = {} + this.iconStatus = {} + + let themeModule = globalRegistry.get('themeModule').api + themeModule.events.on('themeChanged', (theme) => { + this.onThemeChanged(theme.quality) + }) + } + + linkContent (profile) { + if (!profile.icon) return + this.addIcon(profile) + this.listenOnStatus(profile) + } + + unlinkContent (profile) { + this.removeIcon(profile) + } + + listenOnStatus (profile) { + // the list of supported keys. 'none' will remove the status + const keys = ['edited', 'succeed', 'none', 'loading', 'failed'] + const types = ['error', 'warning', 'success', 'info', ''] + const fn = (status) => { + if (!types.includes(status.type) && status.type) throw new Error(`type should be ${keys.join()}`) + if (status.key === undefined) throw new Error(`status key should be defined`) + + if (typeof status.key === 'string' && (!keys.includes(status.key))) { + throw new Error('key should contain either number or ' + keys.join()) + } + this.setIconStatus(profile.name, status) + } + this.iconStatus[profile.name] = fn + this.on(profile.name, 'statusChanged', this.iconStatus[profile.name]) + } + + /** + * Add an icon to the map + * @param {ModuleProfile} profile The profile of the module + */ + addIcon ({kind, name, icon, displayName, tooltip}) { + let title = (tooltip || displayName || name) + title = title.replace(/^\w/, c => c.toUpperCase()) + this.icons[name] = yo` +
+ ${name} +
` + this.iconKind[kind || 'none'].appendChild(this.icons[name]) + } + + /** + * resolve a classes list for @arg key + * @param {Object} key + * @param {Object} type + */ + resolveClasses (key, type) { + let classes = css.status + switch (key) { + case 'succeed': + classes += ' fas fa-check-circle text-' + type + ' ' + css.statusCheck + break + case 'edited': + classes += ' fas fa-sync text-' + type + ' ' + css.statusCheck + break + case 'loading': + classes += ' fas fa-spinner text-' + type + ' ' + css.statusCheck + break + case 'failed': + classes += ' fas fa-exclamation-triangle text-' + type + ' ' + css.statusCheck + break + default: { + classes += ' badge badge-pill badge-' + type + } + } + return classes + } + + /** + * Set a new status for the @arg name + * @param {String} name + * @param {Object} status + */ + setIconStatus (name, status) { + const el = this.icons[name] + if (!el) return + let statusEl = el.querySelector('span') + if (statusEl) { + el.removeChild(statusEl) + } + if (status.key === 'none') return // remove status + + let text = '' + let key = '' + if (typeof status.key === 'number') { + key = status.key.toString() + text = key + } else key = helper.checkSpecialChars(status.key) ? '' : status.key + + let type = '' + if (status.type === 'error') { + type = 'danger' // to use with bootstrap + } else type = helper.checkSpecialChars(status.type) ? '' : status.type + let title = helper.checkSpecialChars(status.title) ? '' : status.title + + el.appendChild(yo``) + + el.classList.add(`${css.icon}`) + } + + /** + * Remove an icon from the map + * @param {ModuleProfile} profile The profile of the module + */ + removeIcon ({kind, name}) { + if (this.icons[name]) this.iconKind[kind || 'none'].removeChild(this.icons[name]) + } + + /** + * Remove active for the current activated icons + */ + removeActive () { + // reset filters + const images = this.view.querySelectorAll(`.image`) + images.forEach(function (im) { + im.style.setProperty('filter', 'invert(0.5)') + }) + + // remove active + const currentActive = this.view.querySelector(`.active`) + if (currentActive) { + currentActive.classList.remove(`active`) + } + } + + /** + * Add active for the new activated icon + * @param {string} name Name of profile of the module to activate + */ + addActive (name) { + if (name === 'home') return + const themeType = globalRegistry.get('themeModule').api.currentTheme().quality + const invert = themeType === 'dark' ? 1 : 0 + const brightness = themeType === 'dark' ? '150' : '0' // should be >100 for icons with color + const nextActive = this.view.querySelector(`[plugin="${name}"]`) + if (nextActive) { + let image = nextActive.querySelector('.image') + nextActive.classList.add(`active`) + image.style.setProperty('filter', `invert(${invert}) grayscale(1) brightness(${brightness}%)`) + } + } + + /** + * Set an icon as active + * @param {string} name Name of profile of the module to activate + */ + select (name) { + this.updateActivations(name) + // TODO: Only keep `this.emit` (issue#2210) + this.emit('showContent', name) + this.events.emit('showContent', name) + } + + /** + * Toggles the side panel for plugin + * @param {string} name Name of profile of the module to activate + */ + toggle (name) { + this.updateActivations(name) + // TODO: Only keep `this.emit` (issue#2210) + this.emit('toggleContent', name) + this.events.emit('toggleContent', name) + } + + updateActivations (name) { + this.removeActive() + this.addActive(name) + } + + onThemeChanged (themeType) { + const invert = themeType === 'dark' ? 1 : 0 + const active = this.view.querySelector(`.active`) + if (active) { + let image = active.querySelector('.image') + image.style.setProperty('filter', `invert(${invert})`) + } + } + + render () { + let home = yo` +
+ ${basicLogo()} +
+ ` + this.iconKind['fileexplorer'] = yo`
` + this.iconKind['compiler'] = yo`
` + this.iconKind['udapp'] = yo`
` + this.iconKind['testing'] = yo`
` + this.iconKind['analysis'] = yo`
` + this.iconKind['debugging'] = yo`
` + this.iconKind['none'] = yo`
` + this.iconKind['settings'] = yo`
` + + this.view = yo` +
+ ${home} + ${this.iconKind['fileexplorer']} + ${this.iconKind['compiler']} + ${this.iconKind['udapp']} + ${this.iconKind['testing']} + ${this.iconKind['analysis']} + ${this.iconKind['debugging']} + ${this.iconKind['none']} + ${this.iconKind['settings']} +
+ ` + return this.view + } +} + +const css = csjs` + .homeIcon { + display: block; + width: 42px; + height: 42px; + margin-bottom: 20px; + margin-left: -5px; + cursor: pointer; + } + .homeIcon svg path { + fill: var(--primary); + } + .homeIcon svg polygon { + fill: var(--primary); + } + .icons { + margin-left: 10px; + margin-top: 15px; + } + .icon { + cursor: pointer; + margin-bottom: 12px; + width: 36px; + height: 36px; + padding: 3px; + position: relative; + border-radius: 8px; + } + .icon img { + width: 28px; + height: 28px; + padding: 4px; + filter: invert(0.5); + } + .image { + } + .icon svg { + width: 28px; + height: 28px; + padding: 4px; + } + .icon[title='Settings'] { + position: absolute; + bottom: 0; + } + .status { + position: absolute; + bottom: 0; + right: 0; + } + .statusCheck { + font-size: 1.2em; + } + .statusWithBG + border-radius: 8px; + background-color: var(--danger); + color: var(--light); + font-size: 12px; + height: 15px; + text-align: center; + font-weight: bold; + padding-left: 5px; + padding-right: 5px; + } +` diff --git a/src/app/editor/SourceHighlighters.js b/src/app/editor/SourceHighlighters.js new file mode 100644 index 0000000000..7bd678148c --- /dev/null +++ b/src/app/editor/SourceHighlighters.js @@ -0,0 +1,52 @@ +'use strict' +const SourceHighlighter = require('./sourceHighlighter') + +// EditorApi: +// - methods: ['highlight', 'discardHighlight'], + +class SourceHighlighters { + + constructor () { + this.highlighters = {} + } + + highlight (position, filePath, hexColor, from) { + try { + if (!this.highlighters[from]) this.highlighters[from] = [] + const sourceHighlight = new SourceHighlighter() + if ( + !this.highlighters[from].length || + (this.highlighters[from].length && !this.highlighters[from].find((el) => { + return el.source === filePath && el.position === position + })) + ) { + sourceHighlight.currentSourceLocationFromfileName(position, filePath, hexColor) + this.highlighters[from].push(sourceHighlight) + } + } catch (e) { + throw e + } + } + + discardHighlight (from) { + if (this.highlighters[from]) { + for (const index in this.highlighters[from]) this.highlighters[from][index].currentSourceLocation(null) + } + this.highlighters[from] = [] + } + + discardHighlightAt (line, filePath, from) { + if (this.highlighters[from]) { + for (const index in this.highlighters[from]) { + const highlight = this.highlighters[from][index] + if (highlight.source === filePath && + (highlight.position.start.line === line || highlight.position.end.line === line)) { + highlight.currentSourceLocation(null) + this.highlighters[from].splice(index, 1) + } + } + } + } +} + +module.exports = SourceHighlighters diff --git a/src/app/editor/contextView.js b/src/app/editor/contextView.js new file mode 100644 index 0000000000..97f1281216 --- /dev/null +++ b/src/app/editor/contextView.js @@ -0,0 +1,194 @@ +'use strict' +const yo = require('yo-yo') +const remixLib = require('remix-lib') +const SourceMappingDecoder = remixLib.SourceMappingDecoder +const globalRegistry = require('../../global/registry') + +const css = require('./styles/contextView-styles') + +/* + Display information about the current focused code: + - if it's a reference, display information about the declaration + - jump to the declaration + - number of references + - rename declaration/references +*/ +class ContextView { + constructor (opts, localRegistry) { + this._components = {} + this._components.registry = localRegistry || globalRegistry + this.contextualListener = opts.contextualListener + this.editor = opts.editor + this._deps = { + compilersArtefacts: this._components.registry.get('compilersartefacts').api, + offsetToLineColumnConverter: this._components.registry.get('offsettolinecolumnconverter').api, + config: this._components.registry.get('config').api, + fileManager: this._components.registry.get('filemanager').api + } + this._view + this._nodes + this._current + this.sourceMappingDecoder = new SourceMappingDecoder() + this.previousElement = null + this.contextualListener.event.register('contextChanged', nodes => { + this.show() + this._nodes = nodes + this.update() + }) + this.contextualListener.event.register('stopHighlighting', () => { + }) + } + + render () { + const view = yo` +
+
+ ${this._renderTarget()} +
+
` + if (!this._view) { + this._view = view + } + return view + } + + hide () { + if (this._view) { + this._view.style.display = 'none' + } + } + + show () { + if (this._view) { + this._view.style.display = 'block' + } + } + + update () { + if (this._view) { + yo.update(this._view, this.render()) + } + } + + _renderTarget () { + let last + const previous = this._current + if (this._nodes && this._nodes.length) { + last = this._nodes[this._nodes.length - 1] + if (isDefinition(last)) { + this._current = last + } else { + const target = this.contextualListener.declarationOf(last) + if (target) { + this._current = target + } else { + this._current = null + } + } + } + if (!this._current || !previous || previous.id !== this._current.id) { + this.previousElement = this._render(this._current, last) + } + return this.previousElement + } + + _jumpToInternal (position) { + const jumpToLine = (lineColumn) => { + if (lineColumn.start && lineColumn.start.line && lineColumn.start.column) { + this.editor.gotoLine(lineColumn.start.line, lineColumn.end.column + 1) + } + } + let lastCompilationResult = this._deps.compilersArtefacts['__last'] + if (lastCompilationResult && lastCompilationResult.languageversion.indexOf('soljson') === 0 && lastCompilationResult.data) { + const lineColumn = this._deps.offsetToLineColumnConverter.offsetToLineColumn( + position, + position.file, + lastCompilationResult.getSourceCode().sources, + lastCompilationResult.getAsts()) + const filename = lastCompilationResult.getSourceName(position.file) + // TODO: refactor with rendererAPI.errorClick + if (filename !== this._deps.config.get('currentFile')) { + const provider = this._deps.fileManager.fileProviderOf(filename) + if (provider) { + provider.exists(filename, (error, exist) => { + if (error) return console.log(error) + this._deps.fileManager.open(filename) + jumpToLine(lineColumn) + }) + } + } else { + jumpToLine(lineColumn) + } + } + } + + _render (node, nodeAtCursorPosition) { + if (!node) return yo`
` + let references = this.contextualListener.referencesOf(node) + const type = (node.attributes && node.attributes.type) ? node.attributes.type : node.name + references = `${references ? references.length : '0'} reference(s)` + + let ref = 0 + const nodes = this.contextualListener.getActiveHighlights() + for (const k in nodes) { + if (nodeAtCursorPosition.id === nodes[k].nodeId) { + ref = k + break + } + } + + // JUMP BETWEEN REFERENCES + const jump = (e) => { + e.target.dataset.action === 'next' ? ref++ : ref-- + if (ref < 0) ref = nodes.length - 1 + if (ref >= nodes.length) ref = 0 + this._jumpToInternal(nodes[ref].position) + } + + const jumpTo = () => { + if (node && node.src) { + const position = this.sourceMappingDecoder.decode(node.src) + if (position) { + this._jumpToInternal(position) + } + } + } + + const showGasEstimation = () => { + if (node.name === 'FunctionDefinition') { + const result = this.contextualListener.gasEstimation(node) + const executionCost = ' Execution cost: ' + result.executionCost + ' gas' + const codeDepositCost = 'Code deposit cost: ' + result.codeDepositCost + ' gas' + const estimatedGas = result.codeDepositCost ? `${codeDepositCost}, ${executionCost}` : `${executionCost}` + return yo` +
+ + ${estimatedGas} +
+ ` + } + } + + return yo` +
${showGasEstimation()} +
${type}
+
${node.attributes.name}
+ + ${references} + + +
+ ` + } +} + +function isDefinition (node) { + return node.name === 'ContractDefinition' || + node.name === 'FunctionDefinition' || + node.name === 'ModifierDefinition' || + node.name === 'VariableDeclaration' || + node.name === 'StructDefinition' || + node.name === 'EventDefinition' +} + +module.exports = ContextView diff --git a/src/app/editor/contextualListener.js b/src/app/editor/contextualListener.js new file mode 100644 index 0000000000..99b492316f --- /dev/null +++ b/src/app/editor/contextualListener.js @@ -0,0 +1,246 @@ +'use strict' +const remixLib = require('remix-lib') +const csjs = require('csjs-inject') +const SourceMappingDecoder = remixLib.SourceMappingDecoder +const AstWalker = remixLib.AstWalker +const EventManager = require('../../lib/events') +const globalRegistry = require('../../global/registry') +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +const profile = { + name: 'contextualListener', + methods: [], + events: [], + version: packageJson.version +} + +/* + trigger contextChanged(nodes) +*/ +class ContextualListener extends Plugin { + constructor (opts) { + super(profile) + this.event = new EventManager() + this._components = {} + this._components.registry = globalRegistry + this.editor = opts.editor + this.pluginManager = opts.pluginManager + this._deps = { + compilersArtefacts: this._components.registry.get('compilersartefacts').api, + config: this._components.registry.get('config').api, + offsetToLineColumnConverter: this._components.registry.get('offsettolinecolumnconverter').api + } + this._index = { + Declarations: {}, + FlatReferences: {} + } + this._activeHighlights = [] + this.editor.event.register('contentChanged', () => { this._stopHighlighting() }) + + this.sourceMappingDecoder = new SourceMappingDecoder() + this.astWalker = new AstWalker() + } + + onActivation () { + this.on('solidity', 'compilationFinished', (file, source, languageVersion, data) => { + if (languageVersion.indexOf('soljson') !== 0) return + this._stopHighlighting() + this._index = { + Declarations: {}, + FlatReferences: {} + } + this._buildIndex(data, source) + }) + + setInterval(() => { + if (this._deps.compilersArtefacts['__last'] && this._deps.compilersArtefacts['__last'].languageversion.indexOf('soljson') === 0) { + this._highlightItems(this.editor.getCursorPosition(), this._deps.compilersArtefacts['__last'], this._deps.config.get('currentFile')) + } + }, 1000) + } + + getActiveHighlights () { + return [...this._activeHighlights] + } + + declarationOf (node) { + if (node.attributes && node.attributes.referencedDeclaration) { + return this._index['FlatReferences'][node.attributes.referencedDeclaration] + } + return null + } + + referencesOf (node) { + return this._index['Declarations'][node.id] + } + + _highlightItems (cursorPosition, compilationResult, file) { + if (this.currentPosition === cursorPosition) return + if (this.currentFile !== file) { + this.currentFile = file + this.currentPosition = cursorPosition + return + } + this._stopHighlighting() + this.currentPosition = cursorPosition + this.currentFile = file + if (compilationResult && compilationResult.data && compilationResult.data.sources[file]) { + const nodes = this.sourceMappingDecoder.nodesAtPosition(null, cursorPosition, compilationResult.data.sources[file]) + this.nodes = nodes + if (nodes && nodes.length && nodes[nodes.length - 1]) { + this._highlightExpressions(nodes[nodes.length - 1], compilationResult) + } + this.event.trigger('contextChanged', [nodes]) + } + } + + _buildIndex (compilationResult, source) { + if (compilationResult && compilationResult.sources) { + const callback = {} + callback['*'] = (node) => { + if (node && node.attributes && node.attributes.referencedDeclaration) { + if (!this._index['Declarations'][node.attributes.referencedDeclaration]) { + this._index['Declarations'][node.attributes.referencedDeclaration] = [] + } + this._index['Declarations'][node.attributes.referencedDeclaration].push(node) + } + this._index['FlatReferences'][node.id] = node + return true + } + for (const s in compilationResult.sources) { + this.astWalker.walk(compilationResult.sources[s].legacyAST, callback) + } + } + } + + _highlight (node, compilationResult) { + if (!node) return + const position = this.sourceMappingDecoder.decode(node.src) + const eventId = this._highlightInternal(position, node) + let lastCompilationResult = this._deps.compilersArtefacts['__last'] + if (eventId && lastCompilationResult && lastCompilationResult.languageversion.indexOf('soljson') === 0) { + this._activeHighlights.push({ eventId, position, fileTarget: lastCompilationResult.getSourceName(position.file), nodeId: node.id }) + } + } + + _highlightInternal (position, node) { + let lastCompilationResult = this._deps.compilersArtefacts['__last'] + if (lastCompilationResult && lastCompilationResult.languageversion.indexOf('soljson') === 0) { + let lineColumn = this._deps.offsetToLineColumnConverter.offsetToLineColumn(position, position.file, lastCompilationResult.getSourceCode().sources, lastCompilationResult.getAsts()) + const css = csjs` + .highlightref_fullLine { + position:absolute; + z-index:2; + opacity: 0.4; + background-color: var(--info); + } + ` + if (node.children && node.children.length) { + // If node has children, highlight the entire line. if not, just highlight the current source position of the node. + lineColumn = { + start: { + line: lineColumn.start.line, + column: 0 + }, + end: { + line: lineColumn.start.line + 1, + column: 0 + } + } + } + const fileName = lastCompilationResult.getSourceName(position.file) + if (fileName) { + return this.editor.addMarker(lineColumn, fileName, css.highlightref_fullLine) + } + } + return null + } + + _highlightExpressions (node, compilationResult) { + const highlights = (id) => { + if (this._index['Declarations'] && this._index['Declarations'][id]) { + const refs = this._index['Declarations'][id] + for (const ref in refs) { + const node = refs[ref] + this._highlight(node, compilationResult) + } + } + } + if (node.attributes && node.attributes.referencedDeclaration) { + highlights(node.attributes.referencedDeclaration) + const current = this._index['FlatReferences'][node.attributes.referencedDeclaration] + this._highlight(current, compilationResult) + } else { + highlights(node.id) + this._highlight(node, compilationResult) + } + this.results = compilationResult + } + + _stopHighlighting () { + for (const eventKey in this._activeHighlights) { + const event = this._activeHighlights[eventKey] + this.editor.removeMarker(event.eventId, event.fileTarget) + } + this.event.trigger('stopHighlighting', []) + this._activeHighlights = [] + } + + gasEstimation (node) { + this._loadContractInfos(node) + let executionCost, codeDepositCost + if (node.name === 'FunctionDefinition') { + const visibility = node.attributes.visibility + if (!node.attributes.isConstructor) { + const fnName = node.attributes.name + const fn = fnName + this._getInputParams(node) + if (visibility === 'public' || visibility === 'external') { + executionCost = this.estimationObj.external[fn] + } else if (visibility === 'private' || visibility === 'internal') { + executionCost = this.estimationObj.internal[fn] + } + } else { + executionCost = this.creationCost + codeDepositCost = this.codeDepositCost + } + } else { + executionCost = '-' + } + return {executionCost, codeDepositCost} + } + + _loadContractInfos (node) { + for (const i in this.nodes) { + if (this.nodes[i].id === node.attributes.scope) { + const contract = this.nodes[i] + this.contract = this.results.data.contracts[this.results.source.target][contract.attributes.name] + this.estimationObj = this.contract.evm.gasEstimates + this.creationCost = this.estimationObj.creation.totalCost + this.codeDepositCost = this.estimationObj.creation.codeDepositCost + } + } + } + + _getInputParams (node) { + const params = [] + let target + for (const i in node.children) { + if (node.children[i].name === 'ParameterList') { + target = node.children[i] + break + } + } + if (target) { + const children = target.children + for (const j in children) { + if (children[j].name === 'VariableDeclaration') { + params.push(children[j].attributes.type) + } + } + } + return '(' + params.toString() + ')' + } +} + +module.exports = ContextualListener diff --git a/src/app/editor/editor.js b/src/app/editor/editor.js new file mode 100644 index 0000000000..bf0055562b --- /dev/null +++ b/src/app/editor/editor.js @@ -0,0 +1,511 @@ +'use strict' +const EventManager = require('../../lib/events') +const yo = require('yo-yo') +const csjs = require('csjs-inject') +const ace = require('brace') +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +const globalRegistry = require('../../global/registry') +const SourceHighlighters = require('./SourceHighlighters') + +const Range = ace.acequire('ace/range').Range +require('brace/ext/language_tools') +require('brace/ext/searchbox') +const langTools = ace.acequire('ace/ext/language_tools') +require('ace-mode-solidity/build/remix-ide/mode-solidity') +require('ace-mode-move/build/remix-ide/mode-move') +require('ace-mode-zokrates') +require('brace/mode/javascript') +require('brace/mode/python') +require('brace/mode/json') +require('brace/mode/rust') +require('brace/theme/chaos') +require('brace/theme/chrome') + +const css = csjs` + .ace-editor { + width : 100%; + } +` +document.head.appendChild(yo` + +`) + +const profile = { + displayName: 'Editor', + name: 'editor', + description: 'service - editor', + version: packageJson.version, + methods: ['highlight', 'discardHighlight', 'discardHighlightAt', 'clearAnnotations', 'addAnnotation'] +} + +class Editor extends Plugin { + + constructor (opts = {}, themeModule) { + super(profile) + // Dependancies + this._components = {} + this._components.registry = globalRegistry + this._deps = { + config: this._components.registry.get('config').api + } + + this._themes = { + 'light': 'chrome', + 'dark': 'chaos' + } + themeModule.events.on('themeChanged', (theme) => { + this.setTheme(theme.quality) + }) + + // Init + this.event = new EventManager() + this.sessions = {} + this.sourceAnnotations = [] + this.readOnlySessions = {} + this.previousInput = '' + this.saveTimeout = null + this.sourceHighlighters = new SourceHighlighters() + this.emptySession = this._createSession('') + this.modes = { + sol: 'ace/mode/solidity', + yul: 'ace/mode/solidity', + mvir: 'ace/mode/move', + js: 'ace/mode/javascript', + py: 'ace/mode/python', + vy: 'ace/mode/python', + zok: 'ace/mode/zokrates', + txt: 'ace/mode/text', + json: 'ace/mode/json', + abi: 'ace/mode/json', + rs: 'ace/mode/rust' + } + + // Editor Setup + const el = yo`
` + this.editor = ace.edit(el) + + ace.acequire('ace/ext/language_tools') + + // Unmap ctrl-l & cmd-l + this.editor.commands.bindKeys({ + 'ctrl-L': null, + 'Command-L': null + }) + + // shortcuts for "Ctrl-"" and "Ctrl+"" to increase/decrease font size of the editor + this.editor.commands.addCommand({ + name: 'increasefontsizeEqual', + bindKey: {win: 'Ctrl-=', mac: 'Command-='}, + exec: (editor) => { + this.editorFontSize(1) + }, + readOnly: true + }) + + this.editor.commands.addCommand({ + name: 'increasefontsizePlus', + bindKey: {win: 'Ctrl-+', mac: 'Command-+'}, + exec: (editor) => { + this.editorFontSize(1) + }, + readOnly: true + }) + + this.editor.commands.addCommand({ + name: 'decreasefontsize', + bindKey: {win: 'Ctrl--', mac: 'Command--'}, + exec: (editor) => { + this.editorFontSize(-1) + }, + readOnly: true + }) + + this.editor.setShowPrintMargin(false) + this.editor.resize(true) + + this.editor.setOptions({ + enableBasicAutocompletion: true, + enableLiveAutocompletion: true + }) + + el.className += ' ' + css['ace-editor'] + el.editor = this.editor // required to access the editor during tests + this.render = () => el + + // Completer for editor + const flowCompleter = { + getCompletions: (editor, session, pos, prefix, callback) => { + // @TODO add here other propositions + } + } + langTools.addCompleter(flowCompleter) + + // zoom with Ctrl+wheel + window.addEventListener('wheel', (e) => { + if (e.ctrlKey && Math.abs(e.wheelY) > 5) { + this.editorFontSize(e.wheelY > 0 ? 1 : -1) + } + }) + + // EVENTS LISTENERS + + // Gutter Mouse down + this.editor.on('guttermousedown', e => { + const target = e.domEvent.target + if (target.className.indexOf('ace_gutter-cell') === -1) { + return + } + const row = e.getDocumentPosition().row + const breakpoints = e.editor.session.getBreakpoints() + for (const k in breakpoints) { + if (k === row.toString()) { + this.event.trigger('breakpointCleared', [this.currentSession, row]) + e.editor.session.clearBreakpoint(row) + e.stop() + return + } + } + this.setBreakpoint(row) + this.event.trigger('breakpointAdded', [this.currentSession, row]) + e.stop() + }) + + // Do setup on initialisation here + this.editor.on('changeSession', () => { + this._onChange() + this.event.trigger('sessionSwitched', []) + + this.editor.getSession().on('change', () => { + this._onChange() + this.event.trigger('contentChanged', []) + }) + }) + } + + highlight (position, filePath, hexColor) { + const { from } = this.currentRequest + this.sourceHighlighters.highlight(position, filePath, hexColor, from) + } + + discardHighlight () { + const { from } = this.currentRequest + this.sourceHighlighters.discardHighlight(from) + } + + discardHighlightAt (line, filePath) { + const { from } = this.currentRequest + this.sourceHighlighters.discardHighlightAt(line, filePath, from) + } + + setTheme (type) { + this.editor.setTheme('ace/theme/' + this._themes[type]) + } + + _onChange () { + const currentFile = this._deps.config.get('currentFile') + if (!currentFile) { + return + } + const input = this.get(currentFile) + if (!input) { + return + } + // if there's no change, don't do anything + if (input === this.previousInput) { + return + } + this.previousInput = input + + // fire storage update + // NOTE: save at most once per 5 seconds + if (this.saveTimeout) { + window.clearTimeout(this.saveTimeout) + } + this.saveTimeout = window.setTimeout(() => { + this.event.trigger('requiringToSaveCurrentfile', []) + }, 5000) + } + + _switchSession (path) { + this.currentSession = path + this.editor.setSession(this.sessions[this.currentSession]) + this.editor.setReadOnly(this.readOnlySessions[this.currentSession]) + this.editor.focus() + } + + /** + * Get Ace mode base of the extension of the session file + * @param {string} path Path of the file + */ + _getMode (path) { + if (!path) return this.modes['txt'] + const root = path.split('#')[0].split('?')[0] + let ext = root.indexOf('.') !== -1 ? /[^.]+$/.exec(root) : null + if (ext) ext = ext[0] + else ext = 'txt' + return ext && this.modes[ext] ? this.modes[ext] : this.modes['txt'] + } + + /** + * Create an Ace session + * @param {string} content Content of the file to open + * @param {string} mode Ace Mode for this file [Default is `text`] + */ + _createSession (content, mode) { + const s = new ace.EditSession(content) + s.setMode(mode || 'ace/mode/text') + s.setUndoManager(new ace.UndoManager()) + s.setTabSize(4) + s.setUseSoftTabs(true) + return s + } + + /** + * Attempts to find the string in the current document + * @param {string} string + */ + find (string) { + return this.editor.find(string) + } + + /** + * Display an Empty read-only session + */ + displayEmptyReadOnlySession () { + this.currentSession = null + this.editor.setSession(this.emptySession) + this.editor.setReadOnly(true) + } + + /** + * Sets a breakpoint on the row number + * @param {number} row Line index of the breakpoint + * @param {string} className Class of the breakpoint + */ + setBreakpoint (row, className) { + this.editor.session.setBreakpoint(row, className) + } + + /** + * Increment the font size (in pixels) for the editor text. + * @param {number} incr The amount of pixels to add to the font. + */ + editorFontSize (incr) { + let newSize = this.editor.getFontSize() + incr + if (newSize >= 6) { + this.editor.setFontSize(newSize) + } + } + + /** + * Set the text in the current session, if any. + * @param {string} text New text to be place. + */ + setText (text) { + if (this.currentSession && this.sessions[this.currentSession]) { + this.sessions[this.currentSession].setValue(text) + } + } + + /** + * Upsert and open a session. + * @param {string} path Path of the session to open. + * @param {string} content Content of the document or update. + */ + open (path, content) { + if (!this.sessions[path]) { + const session = this._createSession(content, this._getMode(path)) + this.sessions[path] = session + this.readOnlySessions[path] = false + } else if (this.sessions[path].getValue() !== content) { + this.sessions[path].setValue(content) + } + this._switchSession(path) + } + + /** + * Upsert and Open a session and set it as Read-only. + * @param {string} path Path of the session to open. + * @param {string} content Content of the document or update. + */ + openReadOnly (path, content) { + if (!this.sessions[path]) { + const session = this._createSession(content, this._getMode(path)) + this.sessions[path] = session + this.readOnlySessions[path] = true + } + this._switchSession(path) + } + + /** + * Content of the current session + * @return {String} content of the file referenced by @arg path + */ + currentContent () { + return this.get(this.current()) + } + + /** + * Content of the session targeted by @arg path + * if @arg path is null, the content of the current session is returned + * @param {string} path Path of the session to get. + * @return {String} content of the file referenced by @arg path + */ + get (path) { + if (!path || this.currentSession === path) { + return this.editor.getValue() + } else if (this.sessions[path]) { + return this.sessions[path].getValue() + } + } + + /** + * Path of the currently editing file + * returns `undefined` if no session is being editer + * @return {String} path of the current session + */ + current () { + if (this.editor.getSession() === this.emptySession) { + return + } + return this.currentSession + } + + /** + * The position of the cursor + */ + getCursorPosition () { + return this.editor.session.doc.positionToIndex( + this.editor.getCursorPosition(), + 0 + ) + } + + /** + * Remove the current session from the list of sessions. + */ + discardCurrentSession () { + if (this.sessions[this.currentSession]) { + delete this.sessions[this.currentSession] + this.currentSession = null + } + } + + /** + * Remove a session based on its path. + * @param {string} path + */ + discard (path) { + if (this.sessions[path]) delete this.sessions[path] + if (this.currentSession === path) this.currentSession = null + } + + /** + * Resize the editor, and sets whether or not line wrapping is enabled. + * @param {boolean} useWrapMode Enable (or disable) wrap mode + */ + resize (useWrapMode) { + this.editor.resize() + const session = this.editor.getSession() + session.setUseWrapMode(useWrapMode) + if (session.getUseWrapMode()) { + const characterWidth = this.editor.renderer.characterWidth + const contentWidth = this.editor.container.ownerDocument.getElementsByClassName( + 'ace_scroller' + )[0].clientWidth + + if (contentWidth > 0) { + session.setWrapLimit(parseInt(contentWidth / characterWidth, 10)) + } + } + } + + /** + * Adds a new marker to the given `Range`. + * @param {*} lineColumnPos + * @param {string} source Path of the session to add the mark on. + * @param {string} cssClass css to apply to the mark. + */ + addMarker (lineColumnPos, source, cssClass) { + const currentRange = new Range( + lineColumnPos.start.line, + lineColumnPos.start.column, + lineColumnPos.end.line, + lineColumnPos.end.column + ) + if (this.sessions[source]) { + return this.sessions[source].addMarker(currentRange, cssClass) + } + return null + } + + /** + * Scrolls to a line. If center is true, it puts the line in middle of screen (or attempts to). + * @param {number} line The line to scroll to + * @param {boolean} center If true + * @param {boolean} animate If true animates scrolling + * @param {Function} callback Function to be called when the animation has finished + */ + scrollToLine (line, center, animate, callback) { + this.editor.scrollToLine(line, center, animate, callback) + } + + /** + * Remove a marker from the session + * @param {string} markerId Id of the marker + * @param {string} source Path of the session + */ + removeMarker (markerId, source) { + if (this.sessions[source]) { + this.sessions[source].removeMarker(markerId) + } + } + + /** + * Clears all the annotations for the current session. + */ + clearAnnotations () { + this.sourceAnnotations = [] + this.editor.getSession().clearAnnotations() + } + + /** + * Add an annotation to the current session. + * @param {Object} annotation + */ + addAnnotation (annotation) { + this.sourceAnnotations[this.sourceAnnotations.length] = annotation + this.setAnnotations(this.sourceAnnotations) + } + + /** + * Set a list of annotations to the current session. + * @param {Array} annotation + */ + setAnnotations (sourceAnnotations) { + this.editor.getSession().setAnnotations(sourceAnnotations) + } + + /** + * Moves the cursor and focus to the specified line and column number + * @param {number} line + * @param {number} col + */ + gotoLine (line, col) { + this.editor.focus() + this.editor.gotoLine(line + 1, col - 1, true) + } +} + +module.exports = Editor diff --git a/src/app/editor/example-contracts.js b/src/app/editor/example-contracts.js new file mode 100644 index 0000000000..945abe0349 --- /dev/null +++ b/src/app/editor/example-contracts.js @@ -0,0 +1,249 @@ +'use strict' + +const storage = `pragma solidity >=0.4.22 <0.7.0; + +/** + * @title Storage + * @dev Store & retreive value in a variable + */ +contract Storage { + + uint256 number; + + /** + * @dev Store value in variable + * @param num value to store + */ + function store(uint256 num) public { + number = num; + } + + /** + * @dev Return value + * @return value of 'number' + */ + function retreive() public view returns (uint256){ + return number; + } +}` + +const owner = `pragma solidity >=0.4.22 <0.7.0; + +/** + * @title Owner + * @dev Set & change owner + */ +contract Owner { + + address private owner; + + // event for EVM logging + event OwnerSet(address indexed oldOwner, address indexed newOwner); + + // modifier to check if caller is owner + modifier isOwner() { + // If the first argument of 'require' evaluates to 'false', execution terminates and all + // changes to the state and to Ether balances are reverted. + // This used to consume all gas in old EVM versions, but not anymore. + // It is often a good idea to use 'require' to check if functions are called correctly. + // As a second argument, you can also provide an explanation about what went wrong. + require(msg.sender == owner, "Caller is not owner"); + _; + } + + /** + * @dev Set contract deployer as owner + */ + constructor() public { + owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor + emit OwnerSet(address(0), owner); + } + + /** + * @dev Change owner + * @param newOwner address of new owner + */ + function changeOwner(address newOwner) public isOwner { + emit OwnerSet(owner, newOwner); + owner = newOwner; + } + + /** + * @dev Return owner address + * @return address of owner + */ + function getOwner() external view returns (address) { + return owner; + } +}` + +const ballot = `pragma solidity >=0.4.22 <0.7.0; + +/** + * @title Ballot + * @dev Implements voting process along with vote delegation + */ +contract Ballot { + + struct Voter { + uint weight; // weight is accumulated by delegation + bool voted; // if true, that person already voted + address delegate; // person delegated to + uint vote; // index of the voted proposal + } + + struct Proposal { + // If you can limit the length to a certain number of bytes, + // always use one of bytes1 to bytes32 because they are much cheaper + bytes32 name; // short name (up to 32 bytes) + uint voteCount; // number of accumulated votes + } + + address public chairperson; + + mapping(address => Voter) public voters; + + Proposal[] public proposals; + + /** + * @dev Create a new ballot to choose one of 'proposalNames'. + * @param proposalNames names of proposals + */ + constructor(bytes32[] memory proposalNames) public { + chairperson = msg.sender; + voters[chairperson].weight = 1; + + for (uint i = 0; i < proposalNames.length; i++) { + // 'Proposal({...})' creates a temporary + // Proposal object and 'proposals.push(...)' + // appends it to the end of 'proposals'. + proposals.push(Proposal({ + name: proposalNames[i], + voteCount: 0 + })); + } + } + + /** + * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. + * @param voter address of voter + */ + function giveRightToVote(address voter) public { + require( + msg.sender == chairperson, + "Only chairperson can give right to vote." + ); + require( + !voters[voter].voted, + "The voter already voted." + ); + require(voters[voter].weight == 0); + voters[voter].weight = 1; + } + + /** + * @dev Delegate your vote to the voter 'to'. + * @param to address to which vote is delegated + */ + function delegate(address to) public { + Voter storage sender = voters[msg.sender]; + require(!sender.voted, "You already voted."); + require(to != msg.sender, "Self-delegation is disallowed."); + + while (voters[to].delegate != address(0)) { + to = voters[to].delegate; + + // We found a loop in the delegation, not allowed. + require(to != msg.sender, "Found loop in delegation."); + } + sender.voted = true; + sender.delegate = to; + Voter storage delegate_ = voters[to]; + if (delegate_.voted) { + // If the delegate already voted, + // directly add to the number of votes + proposals[delegate_.vote].voteCount += sender.weight; + } else { + // If the delegate did not vote yet, + // add to her weight. + delegate_.weight += sender.weight; + } + } + + /** + * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. + * @param proposal index of proposal in the proposals array + */ + function vote(uint proposal) public { + Voter storage sender = voters[msg.sender]; + require(sender.weight != 0, "Has no right to vote"); + require(!sender.voted, "Already voted."); + sender.voted = true; + sender.vote = proposal; + + // If 'proposal' is out of the range of the array, + // this will throw automatically and revert all + // changes. + proposals[proposal].voteCount += sender.weight; + } + + /** + * @dev Computes the winning proposal taking all previous votes into account. + * @return winningProposal_ index of winning proposal in the proposals array + */ + function winningProposal() public view + returns (uint winningProposal_) + { + uint winningVoteCount = 0; + for (uint p = 0; p < proposals.length; p++) { + if (proposals[p].voteCount > winningVoteCount) { + winningVoteCount = proposals[p].voteCount; + winningProposal_ = p; + } + } + } + + /** + * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then + * @return winnerName_ the name of the winner + */ + function winnerName() public view + returns (bytes32 winnerName_) + { + winnerName_ = proposals[winningProposal()].name; + } +} +` + +var ballotTest = `pragma solidity >=0.4.22 <0.7.0; +import "remix_tests.sol"; // this import is automatically injected by Remix. +import "./3_Ballot.sol"; + +contract BallotTest { + + bytes32[] proposalNames; + + Ballot ballotToTest; + function beforeAll () public { + proposalNames.push(bytes32("candidate1")); + ballotToTest = new Ballot(proposalNames); + } + + function checkWinningProposal () public { + ballotToTest.vote(0); + Assert.equal(ballotToTest.winningProposal(), uint(0), "proposal at index 0 should be the winning proposal"); + Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name"); + } + + function checkWinninProposalWithReturnValue () public view returns (bool) { + return ballotToTest.winningProposal() == 0; + } +} +` + +module.exports = { + storage: { name: '1_Storage.sol', content: storage }, + owner: { name: '2_Owner.sol', content: owner }, + ballot: { name: '3_Ballot.sol', content: ballot }, + ballot_test: { name: '4_Ballot_test.sol', content: ballotTest } +} diff --git a/src/app/editor/sourceHighlighter.js b/src/app/editor/sourceHighlighter.js new file mode 100644 index 0000000000..8b45d3dc49 --- /dev/null +++ b/src/app/editor/sourceHighlighter.js @@ -0,0 +1,84 @@ +'use strict' +const csjs = require('csjs-inject') +const globlalRegistry = require('../../global/registry') + +class SourceHighlighter { + constructor (localRegistry) { + this._components = {} + this._components.registry = localRegistry || globlalRegistry + // dependencies + this._deps = { + editor: this._components.registry.get('editor').api, + config: this._components.registry.get('config').api, + fileManager: this._components.registry.get('filemanager').api, + compilerArtefacts: this._components.registry.get('compilersartefacts').api + } + this.position = null + this.statementMarker = null + this.fullLineMarker = null + this.source = null + } + + currentSourceLocation (lineColumnPos, location) { + if (this.statementMarker) this._deps.editor.removeMarker(this.statementMarker, this.source) + if (this.fullLineMarker) this._deps.editor.removeMarker(this.fullLineMarker, this.source) + let lastCompilationResult = this._deps.compilerArtefacts['__last'] + if (location && location.file !== undefined && lastCompilationResult) { + const path = lastCompilationResult.getSourceName(location.file) + if (path) { + this.currentSourceLocationFromfileName(lineColumnPos, path) + } + } + } + + async currentSourceLocationFromfileName (lineColumnPos, filePath, style) { + if (this.statementMarker) this._deps.editor.removeMarker(this.statementMarker, this.source) + if (this.fullLineMarker) this._deps.editor.removeMarker(this.fullLineMarker, this.source) + this.statementMarker = null + this.fullLineMarker = null + this.source = null + if (lineColumnPos) { + this.source = filePath + if (this._deps.fileManager.currentFile() !== this.source) { + await this._deps.fileManager.open(this.source) + this.source = this._deps.fileManager.currentFile() + } + + const css = csjs` + .highlightcode { + position:absolute; + z-index:20; + opacity: 0.3; + background-color: ${style || 'var(--info)'}; + } + .highlightcode_fullLine { + position:absolute; + z-index:20; + opacity: 0.5; + background-color: ${style || 'var(--info)'}; + } + .customBackgroundColor { + background-color: ${style || 'var(--info)'}; + } + ` + + this.statementMarker = this._deps.editor.addMarker(lineColumnPos, this.source, css.highlightcode.className + ' ' + css.customBackgroundColor.className + ' ' + `highlightLine${lineColumnPos.start.line}`) + this._deps.editor.scrollToLine(lineColumnPos.start.line, true, true, function () {}) + this.position = lineColumnPos + if (lineColumnPos.start.line === lineColumnPos.end.line) { + this.fullLineMarker = this._deps.editor.addMarker({ + start: { + line: lineColumnPos.start.line, + column: 0 + }, + end: { + line: lineColumnPos.start.line + 1, + column: 0 + } + }, this.source, css.highlightcode_fullLine.className) + } + } + } +} + +module.exports = SourceHighlighter diff --git a/src/app/editor/styles/contextView-styles.js b/src/app/editor/styles/contextView-styles.js new file mode 100644 index 0000000000..5303a356fa --- /dev/null +++ b/src/app/editor/styles/contextView-styles.js @@ -0,0 +1,59 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .contextview { + opacity : 1; + position : relative; + height : 25px; + } + .container { + padding : 1px 15px; + } + .line { + display : flex; + justify-content : flex-end; + align-items : center; + text-overflow : ellipsis; + overflow : hidden; + white-space : nowrap; + font-size : 13px; + } + .type { + font-style : italic; + margin-right : 5px; + } + .name { + font-weight : bold; + } + .jump { + cursor : pointer; + margin : 0 5px; + } + .jump:hover { + color : var(--secondary); + } + .referencesnb { + float : right; + margin-left : 15px; + } + .gasEstimation { + margin-right : 15px; + display : flex; + align-items : center; + } + .gasStationIcon { + margin-right : 5px; + } + .contextviewcontainer { + z-index : 50; + border-radius : 1px; + border : 2px solid var(--secondary); + } + .contextviewcontainer{ + z-index : 50; + border-radius : 1px; + border : 2px solid var(--secondary); + } +` + +module.exports = css diff --git a/src/app/files/compiler-metadata.js b/src/app/files/compiler-metadata.js new file mode 100644 index 0000000000..fe1f66f67c --- /dev/null +++ b/src/app/files/compiler-metadata.js @@ -0,0 +1,124 @@ +'use strict' +var CompilerAbstract = require('../compiler/compiler-abstract') +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +const profile = { + name: 'compilerMetadata', + methods: ['deployMetadataOf'], + events: [], + version: packageJson.version +} + +class CompilerMetadata extends Plugin { + constructor (blockchain, fileManager, config) { + super(profile) + this.blockchain = blockchain + this.fileManager = fileManager + this.config = config + this.networks = ['VM:-', 'main:1', 'ropsten:3', 'rinkeby:4', 'kovan:42', 'görli:5', 'Custom'] + this.innerPath = 'artifacts' + } + + _JSONFileName (path, contractName) { + return path + '/' + this.innerPath + '/' + contractName + '.json' + } + + onActivation () { + var self = this + this.on('solidity', 'compilationFinished', (file, source, languageVersion, data) => { + if (!self.config.get('settings/generate-contract-metadata')) return + let compiler = new CompilerAbstract(languageVersion, data, source) + var provider = self.fileManager.currentFileProvider() + var path = self.fileManager.currentPath() + if (provider && path) { + compiler.visitContracts((contract) => { + if (contract.file !== source.target) return + + var fileName = self._JSONFileName(path, contract.name) + provider.get(fileName, (error, content) => { + if (!error) { + content = content || '{}' + var metadata + try { + metadata = JSON.parse(content) + } catch (e) { + console.log(e) + } + + var deploy = metadata.deploy || {} + self.networks.forEach((network) => { + deploy[network] = self._syncContext(contract, deploy[network] || {}) + }) + + var data = { + deploy, + data: { + bytecode: contract.object.evm.bytecode, + deployedBytecode: contract.object.evm.deployedBytecode, + gasEstimates: contract.object.evm.gasEstimates, + methodIdentifiers: contract.object.evm.methodIdentifiers + }, + abi: contract.object.abi + } + + provider.set(fileName, JSON.stringify(data, null, '\t')) + } + }) + }) + } + }) + } + + _syncContext (contract, metadata) { + var linkReferences = metadata['linkReferences'] + var autoDeployLib = metadata['autoDeployLib'] + if (!linkReferences) linkReferences = {} + if (autoDeployLib === undefined) autoDeployLib = true + + for (var libFile in contract.object.evm.bytecode.linkReferences) { + if (!linkReferences[libFile]) linkReferences[libFile] = {} + for (var lib in contract.object.evm.bytecode.linkReferences[libFile]) { + if (!linkReferences[libFile][lib]) { + linkReferences[libFile][lib] = '
' + } + } + } + metadata['linkReferences'] = linkReferences + metadata['autoDeployLib'] = autoDeployLib + return metadata + } + + // TODO: is only called by dropdownLogic and can be moved there + deployMetadataOf (contractName) { + return new Promise((resolve, reject) => { + var provider = this.fileManager.currentFileProvider() + var path = this.fileManager.currentPath() + if (provider && path) { + this.blockchain.detectNetwork((err, { id, name } = {}) => { + if (err) { + console.log(err) + reject(err) + } else { + var fileName = this._JSONFileName(path, contractName) + provider.get(fileName, (error, content) => { + if (error) return reject(error) + if (!content) return resolve() + try { + var metadata = JSON.parse(content) + metadata = metadata.deploy || {} + return resolve(metadata[name + ':' + id] || metadata[name] || metadata[id] || metadata[name.toLowerCase() + ':' + id] || metadata[name.toLowerCase()]) + } catch (e) { + reject(e.message) + } + }) + } + }) + } else { + reject(`Please select the folder in the file explorer where the metadata of ${contractName} can be found`) + } + }) + } +} + +module.exports = CompilerMetadata diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js new file mode 100644 index 0000000000..81b1fda533 --- /dev/null +++ b/src/app/files/file-explorer.js @@ -0,0 +1,691 @@ +/* global FileReader */ +/* global fetch */ +const async = require('async') +const Gists = require('gists') +const modalDialogCustom = require('../ui/modal-dialog-custom') +const tooltip = require('../ui/tooltip') +const QueryParams = require('../../lib/query-params') +const helper = require('../../lib/helper') +const yo = require('yo-yo') +const Treeview = require('../ui/TreeView') +const modalDialog = require('../ui/modaldialog') +const EventManager = require('../../lib/events') +const contextMenu = require('../ui/contextMenu') +const css = require('./styles/file-explorer-styles') +const globalRegistry = require('../../global/registry') +const queryParams = new QueryParams() +let MENU_HANDLE + +function fileExplorer (localRegistry, files, menuItems) { + var self = this + this.events = new EventManager() + // file provider backend + this.files = files + // element currently focused on + this.focusElement = null + // path currently focused on + this.focusPath = null + let allItems = + [ + { action: 'createNewFile', + title: 'Create New File', + icon: 'fas fa-plus-circle' + }, + { action: 'publishToGist', + title: 'Publish all [browser] explorer files to a github gist', + icon: 'fab fa-github' + }, + { action: 'uploadFile', + title: 'Add Local file to the Browser Storage Explorer', + icon: 'far fa-folder-open' + }, + { action: 'updateGist', + title: 'Update the current [gist] explorer', + icon: 'fab fa-github' + } + ] + // menu items + this.menuItems = allItems.filter( + (item) => { + if (menuItems) return menuItems.find((name) => { return name === item.action }) + } + ) + + self._components = {} + self._components.registry = localRegistry || globalRegistry + self._deps = { + config: self._components.registry.get('config').api, + editor: self._components.registry.get('editor').api, + fileManager: self._components.registry.get('filemanager').api + } + + self.events.register('focus', function (path) { + self._deps.fileManager.open(path) + }) + + self._components.registry.put({ api: self, name: `fileexplorer/${self.files.type}` }) + + // warn if file changed outside of Remix + function remixdDialog () { + return yo`
This file has been changed outside of Remix IDE.
` + } + + this.files.event.register('fileExternallyChanged', (path, file) => { + if (self._deps.config.get('currentFile') === path && self._deps.editor.currentContent() && self._deps.editor.currentContent() !== file.content) { + if (this.files.isReadOnly(path)) return self._deps.editor.setText(file.content) + + modalDialog(path + ' changed', remixdDialog(), + { + label: 'Replace by the new content', + fn: () => { + self._deps.editor.setText(file.content) + } + }, + { + label: 'Keep the content displayed in Remix', + fn: () => {} + } + ) + } + }) + + // register to event of the file provider + files.event.register('fileRemoved', fileRemoved) + files.event.register('fileRenamed', fileRenamed) + files.event.register('fileRenamedError', fileRenamedError) + files.event.register('fileAdded', fileAdded) + files.event.register('folderAdded', folderAdded) + + function fileRenamedError (error) { + modalDialogCustom.alert(error) + } + + function fileAdded (filepath) { + self.ensureRoot(() => { + var folderpath = filepath.split('/').slice(0, -1).join('/') + + var currentTree = self.treeView.nodeAt(folderpath) + if (currentTree && self.treeView.isExpanded(folderpath)) { + self.files.resolveDirectory(folderpath, (error, fileTree) => { + if (error) console.error(error) + if (!fileTree) return + fileTree = normalize(folderpath, fileTree) + self.treeView.updateNodeFromJSON(folderpath, fileTree, true) + self.focusElement = self.treeView.labelAt(self.focusPath) + // TODO: here we update the selected file (it applicable) + // cause we are refreshing the interface of the whole directory when there's a new file. + if (self.focusElement && !self.focusElement.classList.contains('bg-secondary')) { + self.focusElement.classList.add('bg-secondary') + } + }) + } + }) + } + + function extractNameFromKey (key) { + const keyPath = key.split('/') + + return keyPath[keyPath.length - 1] + } + + function folderAdded (folderpath) { + self.ensureRoot(() => { + folderpath = folderpath.split('/').slice(0, -1).join('/') + self.files.resolveDirectory(folderpath, (error, fileTree) => { + if (error) console.error(error) + if (!fileTree) return + fileTree = normalize(folderpath, fileTree) + self.treeView.updateNodeFromJSON(folderpath, fileTree, true) + }) + }) + } + + function fileRemoved (filepath) { + var label = self.treeView.labelAt(filepath) + if (label && label.parentElement) { + label.parentElement.removeChild(label) + } + } + + function fileRenamed (oldName, newName, isFolder) { + fileRemoved(oldName) + fileAdded(newName) + } + + // make interface and register to nodeClick, leafClick + self.treeView = new Treeview({ + extractData: function extractData (value, tree, key) { + var newValue = {} + // var isReadOnly = false + var isFile = false + Object.keys(value).filter(function keep (x) { + if (x === '/content') isFile = true + if (x[0] !== '/') return true + }).forEach(function (x) { newValue[x] = value[x] }) + return { + path: (tree || {}).path ? tree.path + '/' + key : key, + children: isFile ? undefined + : value instanceof Array ? value.map((item, index) => ({ + key: index, value: item + })) : value instanceof Object ? Object.keys(value).map(subkey => ({ + key: subkey, value: value[subkey] + })) : undefined + } + }, + formatSelf: function formatSelf (key, data, li) { + const isRoot = data.path === self.files.type + const isFolder = !!data.children + return yo` +
+ + ${key.split('/').pop()} + + ${isRoot ? self.renderMenuItems() : ''} +
+ ` + } + }) + + /** + * Extracts first two folders as a subpath from the path. + **/ + function extractExternalFolder (path) { + const firstSlIndex = path.indexOf('/', 1) + if (firstSlIndex === -1) return '' + const secondSlIndex = path.indexOf('/', firstSlIndex + 1) + if (secondSlIndex === -1) return '' + return path.substring(0, secondSlIndex) + } + + self.treeView.event.register('nodeRightClick', function (key, data, label, event) { + if (self.files.readonly) return + if (key === self.files.type) return + MENU_HANDLE && MENU_HANDLE.hide(null, true) + let actions = {} + const provider = self._deps.fileManager.fileProviderOf(key) + actions['Create File'] = () => self.createNewFile(key) + actions['Create Folder'] = () => self.createNewFolder(key) + // @todo(#2386) not fully implemented. Readd later when fixed + if (provider.isExternalFolder(key)) { + /* actions['Discard changes'] = () => { + modalDialogCustom.confirm( + 'Discard changes', + 'Are you sure you want to discard all your changes?', + () => { self.files.discardChanges(key) }, + () => {} + ) + } */ + } else { + const folderPath = extractExternalFolder(key) + actions['Rename'] = () => { + if (self.files.isReadOnly(key)) { return tooltip('cannot rename folder. ' + self.files.type + ' is a read only explorer') } + var name = label.querySelector('span[data-path="' + key + '"]') + if (name) editModeOn(name) + } + actions['Delete'] = () => { + if (self.files.isReadOnly(key)) { return tooltip('cannot delete folder. ' + self.files.type + ' is a read only explorer') } + const currentFoldername = extractNameFromKey(key) + + modalDialogCustom.confirm(`Confirm to delete folder`, `Are you sure you want to delete ${currentFoldername} folder?`, + async () => { + const fileManager = self._deps.fileManager + const removeFolder = await fileManager.remove(key) + + if (!removeFolder) { + tooltip(`failed to remove ${key}. Make sure the directory is empty before removing it.`) + } else { + const { type } = fileManager.currentFileProvider() + + self.updatePath(type) + } + }, () => {}) + } + if (folderPath === 'browser/gists') { + actions['Push changes to gist'] = () => { + const id = key.substr(key.lastIndexOf('/') + 1, key.length - 1) + modalDialogCustom.confirm( + 'Push back to Gist', + 'Are you sure you want to push all your changes back to Gist?', + () => { self.toGist(id) }, + () => {} + ) + } + } + } + MENU_HANDLE = contextMenu(event, actions) + }) + + self.treeView.event.register('leafRightClick', function (key, data, label, event) { + if (key === self.files.type) return + MENU_HANDLE && MENU_HANDLE.hide(null, true) + let actions = {} + const provider = self._deps.fileManager.fileProviderOf(key) + if (!provider.isExternalFolder(key)) { + actions['Create Folder'] = () => self.createNewFolder(self._deps.fileManager.extractPathOf(key)) + actions['Rename'] = () => { + if (self.files.isReadOnly(key)) { return tooltip('cannot rename file. ' + self.files.type + ' is a read only explorer') } + var name = label.querySelector('span[data-path="' + key + '"]') + if (name) editModeOn(name) + } + actions['Delete'] = () => { + if (self.files.isReadOnly(key)) { return tooltip('cannot delete file. ' + self.files.type + ' is a read only explorer') } + const currentFilename = extractNameFromKey(key) + + modalDialogCustom.confirm( + `Delete file`, `Are you sure you want to delete ${currentFilename} file?`, + async () => { + const fileManager = self._deps.fileManager + const removeFile = await fileManager.remove(key) + + if (!removeFile) { + tooltip(`Failed to remove file ${key}.`) + } else { + const { type } = fileManager.currentFileProvider() + self.updatePath(type) + } + }, + () => {} + ) + } + } + MENU_HANDLE = contextMenu(event, actions) + }) + + self.treeView.event.register('leafClick', function (key, data, label) { + self.events.trigger('focus', [key]) + }) + + self.treeView.event.register('nodeClick', function (path, childrenContainer) { + if (!childrenContainer) return + if (childrenContainer.style.display === 'none') return + self.updatePath(path) + }) + + // register to main app, trigger when the current file in the editor changed + self._deps.fileManager.events.on('currentFileChanged', (newFile) => { + const provider = self._deps.fileManager.fileProviderOf(newFile) + if (self.focusElement && self.focusPath !== newFile) { + self.focusElement.classList.remove('bg-secondary') + self.focusElement = null + self.focusPath = null + } + if (provider && (provider.type === files.type)) { + self.focusElement = self.treeView.labelAt(newFile) + if (self.focusElement) { + self.focusElement.classList.add('bg-secondary') + self.focusPath = newFile + } + } + }) + + self._deps.fileManager.events.on('noFileSelected', () => { + if (self.focusElement) { + self.focusElement.classList.remove('bg-secondary') + self.focusElement = null + self.focusPath = null + } + }) + + var textUnderEdit = null + + function selectElementContents (el) { + var range = document.createRange() + range.selectNodeContents(el) + var sel = window.getSelection() + sel.removeAllRanges() + sel.addRange(range) + } + + function editModeOn (label) { + textUnderEdit = label.innerText + label.setAttribute('contenteditable', true) + label.classList.add('bg-light') + label.focus() + selectElementContents(label) + } + + function editModeOff (event) { + let label = this + + const isFolder = label.className.indexOf('folder') !== -1 + function rename () { + var newPath = label.dataset.path + newPath = newPath.split('/') + newPath[newPath.length - 1] = label.innerText + newPath = newPath.join('/') + if (label.innerText === '') { + modalDialogCustom.alert('File name cannot be empty') + label.innerText = textUnderEdit + } else if (helper.checkSpecialChars(label.innerText)) { + modalDialogCustom.alert('Special characters are not allowed') + label.innerText = textUnderEdit + } else { + files.exists(newPath, (error, exist) => { + if (error) return modalDialogCustom.alert('Unexpected error while renaming: ' + error) + if (!exist) { + files.rename(label.dataset.path, newPath, isFolder) + } else { + modalDialogCustom.alert('File already exists.') + label.innerText = textUnderEdit + } + }) + } + } + + if (event.which === 13) event.preventDefault() + if ((event.type === 'blur' || event.which === 13) && label.getAttribute('contenteditable')) { + var save = textUnderEdit !== label.innerText + if (save) { + modalDialogCustom.confirm( + 'Confirm to rename a ' + (isFolder ? 'folder' : 'file'), + 'Are you sure you want to rename ' + textUnderEdit + '?', + () => { rename() }, + () => { label.innerText = textUnderEdit } + ) + } + label.removeAttribute('contenteditable') + label.classList.remove('bg-light') + } + } +} + +fileExplorer.prototype.updatePath = function (path) { + this.files.resolveDirectory(path, (error, fileTree) => { + if (error) console.error(error) + if (!fileTree) return + var newTree = normalize(path, fileTree) + this.treeView.updateNodeFromJSON(path, newTree, true) + }) +} + +fileExplorer.prototype.hide = function () { + if (this.container) this.container.style.display = 'none' +} + +fileExplorer.prototype.show = function () { + if (this.container) this.container.style.display = 'block' +} + +fileExplorer.prototype.init = function () { + this.container = yo`
` + return this.container +} + +fileExplorer.prototype.publishToGist = function () { + modalDialogCustom.confirm( + 'Create a public gist', + 'Are you sure you want to publish all your files in browser directory anonymously as a public gist on github.com? Note: this will not include directories.', + () => { this.toGist() } + ) +} + +fileExplorer.prototype.uploadFile = function (event) { + // TODO The file explorer is merely a view on the current state of + // the files module. Please ask the user here if they want to overwrite + // a file and then just use `files.add`. The file explorer will + // pick that up via the 'fileAdded' event from the files module. + + let self = this + + ;[...event.target.files].forEach((file) => { + let files = this.files + function loadFile () { + var fileReader = new FileReader() + fileReader.onload = function (event) { + if (helper.checkSpecialChars(file.name)) { + modalDialogCustom.alert('Special characters are not allowed') + return + } + var success = files.set(name, event.target.result) + if (!success) { + modalDialogCustom.alert('Failed to create file ' + name) + } else { + self.events.trigger('focus', [name]) + } + } + fileReader.readAsText(file) + } + var name = files.type + '/' + file.name + files.exists(name, (error, exist) => { + if (error) console.log(error) + if (!exist) { + loadFile() + } else { + modalDialogCustom.confirm('Confirm overwrite', `The file ${name} already exists! Would you like to overwrite it?`, () => { loadFile() }) + } + }) + }) +} + +fileExplorer.prototype.toGist = function (id) { + let proccedResult = function (error, data) { + if (error) { + modalDialogCustom.alert('Failed to manage gist: ' + error) + console.log('Failed to manage gist: ' + error) + } else { + if (data.html_url) { + modalDialogCustom.confirm('Gist is ready', `The gist is at ${data.html_url}. Would you like to open it in a new window?`, () => { + window.open(data.html_url, '_blank') + }) + } else { + modalDialogCustom.alert(data.message + ' ' + data.documentation_url + ' ' + JSON.stringify(data.errors, null, '\t')) + } + } + } + + /** + * This function is to get the original content of given gist + * @params id is the gist id to fetch + */ + async function getOriginalFiles (id) { + if (!id) { + return [] + } + + const url = `https://api.github.com/gists/${id}` + const res = await fetch(url) + const data = await res.json() + return data.files || [] + } + + // If 'id' is not defined, it is not a gist update but a creation so we have to take the files from the browser explorer. + const folder = id ? 'browser/gists/' + id : 'browser/' + this.packageFiles(this.files, folder, (error, packaged) => { + if (error) { + console.log(error) + modalDialogCustom.alert('Failed to create gist: ' + error.message) + } else { + // check for token + var tokenAccess = this._deps.config.get('settings/gist-access-token') + if (!tokenAccess) { + modalDialogCustom.alert( + 'Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.' + ) + } else { + const description = 'Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=' + + queryParams.get().version + '&optimize=' + queryParams.get().optimize + '&gist=' + const gists = new Gists({ token: tokenAccess }) + + if (id) { + const originalFileList = getOriginalFiles(id) + // Telling the GIST API to remove files + const updatedFileList = Object.keys(packaged) + const allItems = Object.keys(originalFileList) + .filter(fileName => updatedFileList.indexOf(fileName) === -1) + .reduce((acc, deleteFileName) => ({ + ...acc, + [deleteFileName]: null + }), originalFileList) + // adding new files + updatedFileList.forEach((file) => { + const _items = file.split('/') + const _fileName = _items[_items.length - 1] + allItems[_fileName] = packaged[file] + }) + + tooltip('Saving gist (' + id + ') ...') + gists.edit({ + description: description, + public: true, + files: allItems, + id: id + }, (error, result) => { + proccedResult(error, result) + if (!error) { + for (const key in allItems) { + if (allItems[key] === null) delete allItems[key] + } + } + }) + } else { + // id is not existing, need to create a new gist + tooltip('Creating a new gist ...') + gists.create({ + description: description, + public: true, + files: packaged + }, (error, result) => { + proccedResult(error, result) + }) + } + } + } + }) +} + +// return all the files, except the temporary/readonly ones.. +fileExplorer.prototype.packageFiles = function (filesProvider, directory, callback) { + let ret = {} + filesProvider.resolveDirectory(directory, (error, files) => { + if (error) callback(error) + else { + async.eachSeries(Object.keys(files), (path, cb) => { + if (filesProvider.isDirectory(path)) { + cb() + } else { + filesProvider.get(path, (error, content) => { + if (error) return cb(error) + if (/^\s+$/.test(content) || !content.length) { + content = '// this line is added to create a gist. Empty file is not allowed.' + } + ret[path] = { content } + cb() + }) + } + }, (error) => { + callback(error, ret) + }) + } + }) +} + +fileExplorer.prototype.createNewFile = function (parentFolder = 'browser') { + let self = this + modalDialogCustom.prompt('Create new file', 'File Name (e.g Untitled.sol)', 'Untitled.sol', (input) => { + if (!input) input = 'New file' + helper.createNonClashingName(parentFolder + '/' + input, self.files, async (error, newName) => { + if (error) return tooltip('Failed to create file ' + newName + ' ' + error) + const fileManager = self._deps.fileManager + const createFile = await fileManager.writeFile(newName, '') + + if (!createFile) { + tooltip('Failed to create file ' + newName) + } else { + await fileManager.open(newName) + if (newName.includes('_test.sol')) { + self.events.trigger('newTestFileCreated', [newName]) + } + } + }) + }, null, true) +} + +fileExplorer.prototype.createNewFolder = function (parentFolder) { + let self = this + modalDialogCustom.prompt('Create new folder', '', 'New folder', (input) => { + if (!input) { + return tooltip('Failed to create folder. The name can not be empty') + } + + const currentPath = !parentFolder ? self._deps.fileManager.currentPath() : parentFolder + let newName = currentPath ? currentPath + '/' + input : self.files.type + '/' + input + + newName = newName + '/' + self.files.exists(newName, (error, exist) => { + if (error) return tooltip('Unexpected error while creating folder: ' + error) + if (!exist) { + self.files.set(newName, '') + } else { + tooltip('Folder already exists.', () => {}) + } + }) + }, null, true) +} + +fileExplorer.prototype.renderMenuItems = function () { + let items = '' + if (this.menuItems) { + items = this.menuItems.map(({action, title, icon}) => { + if (action === 'uploadFile') { + return yo` + + ` + } else { + return yo` + { event.stopPropagation(); this[ action ]() }} + class="newFile ${icon} ${css.newFile}" + title=${title}> + + ` + } + }) + } + return yo`${items}` +} + +fileExplorer.prototype.ensureRoot = function (cb) { + cb = cb || (() => {}) + var self = this + if (self.element) return cb() + const root = {} + root[this.files.type] = {} + var element = self.treeView.render(root, false) + element.classList.add(css.fileexplorer) + element.events = self.events + element.api = self.api + self.container.appendChild(element) + self.element = element + if (cb) cb() + self.treeView.expand(self.files.type) +} + +function normalize (path, filesList) { + var prefix = path.split('/')[0] + var newList = {} + Object.keys(filesList).forEach(key => { + newList[prefix + '/' + key] = filesList[key].isDirectory ? {} : { '/content': true } + }) + return newList +} + +module.exports = fileExplorer diff --git a/src/app/files/fileManager.js b/src/app/files/fileManager.js new file mode 100644 index 0000000000..4a2d6a6f96 --- /dev/null +++ b/src/app/files/fileManager.js @@ -0,0 +1,543 @@ +'use strict' + +import yo from 'yo-yo' +import async from 'async' +const EventEmitter = require('events') +const globalRegistry = require('../../global/registry') +const CompilerImport = require('../compiler/compiler-imports') +const toaster = require('../ui/tooltip') +const modalDialogCustom = require('../ui/modal-dialog-custom') +const helper = require('../../lib/helper.js') +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +/* + attach to files event (removed renamed) + trigger: currentFileChanged +*/ + +const profile = { + name: 'fileManager', + displayName: 'File manager', + description: 'Service - read/write to any files or folders, require giving permissions', + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDM4NHE0MCAwIDY4IDI4dDI4IDY4djEyMTZxMCA0MC0yOCA2OHQtNjggMjhoLTk2MHEtNDAgMC02OC0yOHQtMjgtNjh2LTI4OGgtNTQ0cS00MCAwLTY4LTI4dC0yOC02OHYtNjcycTAtNDAgMjAtODh0NDgtNzZsNDA4LTQwOHEyOC0yOCA3Ni00OHQ4OC0yMGg0MTZxNDAgMCA2OCAyOHQyOCA2OHYzMjhxNjgtNDAgMTI4LTQwaDQxNnptLTU0NCAyMTNsLTI5OSAyOTloMjk5di0yOTl6bS02NDAtMzg0bC0yOTkgMjk5aDI5OXYtMjk5em0xOTYgNjQ3bDMxNi0zMTZ2LTQxNmgtMzg0djQxNnEwIDQwLTI4IDY4dC02OCAyOGgtNDE2djY0MGg1MTJ2LTI1NnEwLTQwIDIwLTg4dDQ4LTc2em05NTYgODA0di0xMTUyaC0zODR2NDE2cTAgNDAtMjggNjh0LTY4IDI4aC00MTZ2NjQwaDg5NnoiLz48L3N2Zz4=', + permission: true, + version: packageJson.version, + methods: ['file', 'exists', 'open', 'writeFile', 'readFile', 'copyFile', 'rename', 'readdir', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile'], + kind: 'file-system' +} +const errorMsg = { + ENOENT: 'No such file or directory', + EISDIR: 'Path is a directory', + ENOTDIR: 'Path is not on a directory', + EEXIST: 'File already exists', + EPERM: 'Permission denied' +} +const createError = (err) => { + return new Error(`${errorMsg[err.code]} ${err.message || ''}`) +} + +class FileManager extends Plugin { + constructor (editor) { + super(profile) + this.openedFiles = {} // list all opened files + this.events = new EventEmitter() + this.editor = editor + this._components = {} + this._components.compilerImport = new CompilerImport() + this._components.registry = globalRegistry + this.init() + } + + /** + * Emit error if path doesn't exist + * @param {string} path path of the file/directory + * @param {string} message message to display if path doesn't exist. + */ + async _handleExists (path, message) { + const exists = await this.exists(path) + + if (!exists) { + throw createError({ code: 'ENOENT', message }) + } + } + + /** + * Emit error if path is not a file + * @param {string} path path of the file/directory + * @param {string} message message to display if path is not a file. + */ + async _handleIsFile (path, message) { + const isFile = await this.isFile(path) + + if (!isFile) { + throw createError({ code: 'EISDIR', message }) + } + } + + /** + * Emit error if path is not a directory + * @param {string} path path of the file/directory + * @param {string} message message to display if path is not a directory. + */ + async _handleIsDir (path, message) { + const isDir = await this.isDirectory(path) + + if (!isDir) { + throw createError({ code: 'ENOTDIR', message }) + } + } + + /** The current opened file */ + file () { + const file = this.currentFile() + + if (!file) throw createError({ code: 'ENOENT', message: 'No file selected' }) + return file + } + + /** + * Verify if the path exists (directory or file) + * @param {string} path path of the directory or file + * @returns {boolean} true if the path exists + */ + exists (path) { + const provider = this.fileProviderOf(path) + const result = provider.exists(path, (err, result) => { + if (err) return false + return result + }) + + return result + } + + /** + * Verify if the path provided is a file + * @param {string} path path of the directory or file + * @returns {boolean} true if path is a file. + */ + isFile (path) { + const provider = this.fileProviderOf(path) + const result = provider.isFile(path) + + return result + } + + /** + * Verify if the path provided is a directory + * @param {string} path path of the directory + * @returns {boolean} true if path is a directory. + */ + isDirectory (path) { + const provider = this.fileProviderOf(path) + const result = provider.isDirectory(path) + + return result + } + + /** + * Open the content of the file in the context (eg: Editor) + * @param {string} path path of the file + * @returns {void} + */ + async open (path) { + await this._handleExists(path, `Cannot open file ${path}`) + await this._handleIsFile(path, `Cannot open file ${path}`) + return this.openFile(path) + } + + /** + * Set the content of a specific file + * @param {string} path path of the file + * @param {string} data content to write on the file + * @returns {void} + */ + async writeFile (path, data) { + if (await this.exists(path)) { + await this._handleIsFile(path, `Cannot write file ${path}`) + return await this.setFileContent(path, data) + } else { + return await this.setFileContent(path, data) + } + } + + /** + * Return the content of a specific file + * @param {string} path path of the file + * @returns {string} content of the file + */ + async readFile (path) { + await this._handleExists(path, `Cannot read file ${path}`) + await this._handleIsFile(path, `Cannot read file ${path}`) + return this.getFileContent(path) + } + + /** + * Upsert a file with the content of the source file + * @param {string} src path of the source file + * @param {string} dest path of the destrination file + * @returns {void} + */ + async copyFile (src, dest) { + await this._handleExists(src, `Cannot copy from ${src}`) + await this._handleIsFile(src, `Cannot copy from ${src}`) + await this._handleIsFile(dest, `Cannot paste content into ${dest}`) + const content = await this.readFile(src) + + await this.writeFile(dest, content) + } + + /** + * Change the path of a file/directory + * @param {string} oldPath current path of the file/directory + * @param {string} newPath new path of the file/directory + * @returns {void} + */ + async rename (oldPath, newPath) { + await this.__handleExists(oldPath, `Cannot rename ${oldPath}`) + const isFile = await this.isFile(oldPath) + + this.fileRenamedEvent(oldPath, newPath, !isFile) + } + + /** + * Create a directory + * @param {string} path path of the new directory + * @returns {void} + */ + async mkdir (path) { + if (await this.exists(path)) { + throw createError({ code: 'EEXIST', message: `Cannot create directory ${path}` }) + } + const provider = this.fileProviderOf(path) + + provider.createDir(path) + } + + /** + * Get the list of files in the directory + * @param {string} path path of the directory + * @returns {string[]} list of the file/directory name in this directory + */ + async readdir (path) { + await this._handleExists(path) + await this._handleIsDir(path) + + return new Promise((resolve, reject) => { + const provider = this.fileProviderOf(path) + + provider.resolveDirectory(path, (error, filesProvider) => { + if (error) reject(error) + resolve(filesProvider) + }) + }) + } + + /** + * Removes a file or directory recursively + * @param {string} path path of the directory/file to remove + * @returns {void} + */ + async remove (path) { + await this._handleExists(path, `Cannot remove file or directory ${path}`) + const provider = this.fileProviderOf(path) + + return await provider.remove(path) + } + + init () { + this._deps = { + config: this._components.registry.get('config').api, + browserExplorer: this._components.registry.get('fileproviders/browser').api, + localhostExplorer: this._components.registry.get('fileproviders/localhost').api, + filesProviders: this._components.registry.get('fileproviders').api + } + this._deps.browserExplorer.event.register('fileChanged', (path) => { this.fileChangedEvent(path) }) + this._deps.browserExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) + this._deps.localhostExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) + this._deps.browserExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) + this._deps.localhostExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) + this._deps.localhostExplorer.event.register('errored', (event) => { this.removeTabsOf(this._deps.localhostExplorer) }) + this._deps.localhostExplorer.event.register('closed', (event) => { this.removeTabsOf(this._deps.localhostExplorer) }) + this.getCurrentFile = this.file + this.getFile = this.readFile + this.getFolder = this.readdir + this.setFile = this.writeFile + this.switchFile = this.open + } + + fileChangedEvent (path) { + // @todo(#2386) use only for discard changes function. + // this.syncEditor(path) + } + + fileRenamedEvent (oldName, newName, isFolder) { + if (!isFolder) { + this._deps.config.set('currentFile', '') + this.editor.discard(oldName) + if (this.openedFiles[oldName]) { + delete this.openedFiles[oldName] + this.openedFiles[newName] = newName + } + this.openFile(newName) + } else { + var newFocus + for (var k in this.openedFiles) { + if (k.indexOf(oldName + '/') === 0) { + var newAbsolutePath = k.replace(oldName, newName) + this.openedFiles[newAbsolutePath] = newAbsolutePath + delete this.openedFiles[k] + if (this._deps.config.get('currentFile') === k) { + newFocus = newAbsolutePath + } + } + } + if (newFocus) { + this.openFile(newFocus) + } + } + // TODO: Only keep `this.emit` (issue#2210) + this.emit('fileRenamed', oldName, newName, isFolder) + this.events.emit('fileRenamed', oldName, newName, isFolder) + } + + currentFileProvider () { + var path = this.currentPath() + if (path) { + return this.fileProviderOf(path) + } + return null + } + + currentFile () { + return this._deps.config.get('currentFile') + } + + closeFile (name) { + delete this.openedFiles[name] + if (!Object.keys(this.openedFiles).length) { + this._deps.config.set('currentFile', '') + // TODO: Only keep `this.emit` (issue#2210) + this.emit('noFileSelected') + this.events.emit('noFileSelected') + } + // TODO: Only keep `this.emit` (issue#2210) + this.emit('fileClosed', name) + this.events.emit('fileClosed', name) + } + + currentPath () { + var currentFile = this._deps.config.get('currentFile') + return this.extractPathOf(currentFile) + } + + extractPathOf (file) { + var reg = /(.*)(\/).*/ + var path = reg.exec(file) + return path ? path[1] : null + } + + getFileContent (path) { + const provider = this.fileProviderOf(path) + + if (!provider) throw createError({ code: 'ENOENT', message: `${path} not available` }) + // TODO: change provider to Promise + return new Promise((resolve, reject) => { + if (this.currentFile() === path) return resolve(this.editor.currentContent()) + provider.get(path, (err, content) => { + if (err) reject(err) + resolve(content) + }) + }) + } + + async setFileContent (path, content) { + if (this.currentRequest) { + const canCall = await this.askUserPermission('writeFile', '') + if (canCall) { + this._setFileInternal(path, content) + // inform the user about modification after permission is granted and even if permission was saved before + toaster(yo` +
+ + + ${this.currentRequest.from} + + is modifying + ${path} + +
+ `, '', { time: 3000 }) + } + } + return await this._setFileInternal(path, content) + } + + _setFileInternal (path, content) { + const provider = this.fileProviderOf(path) + if (!provider) throw createError({ code: 'ENOENT', message: `${path} not available` }) + // TODO : Add permission + // TODO : Change Provider to Promise + return new Promise((resolve, reject) => { + provider.set(path, content, (error) => { + if (error) reject(error) + this.syncEditor(path) + resolve(true) + }) + }) + } + + _saveAsCopy (path, content) { + const fileProvider = this.fileProviderOf(path) + if (fileProvider) { + helper.createNonClashingNameWithPrefix(path, fileProvider, '', (error, copyName) => { + if (error) { + copyName = path + '.' + this.currentRequest.from + } + this._setFileInternal(copyName, content) + this.openFile(copyName) + }) + } + } + + removeTabsOf (provider) { + for (var tab in this.openedFiles) { + if (this.fileProviderOf(tab).type === provider.type) { + this.fileRemovedEvent(tab) + } + } + } + + fileRemovedEvent (path) { + if (!this.openedFiles[path]) return + if (path === this._deps.config.get('currentFile')) { + this._deps.config.set('currentFile', '') + } + this.editor.discard(path) + delete this.openedFiles[path] + // TODO: Only keep `this.emit` (issue#2210) + this.emit('fileRemoved', path) + this.events.emit('fileRemoved', path) + this.openFile() + } + + unselectCurrentFile () { + this.saveCurrentFile() + this._deps.config.set('currentFile', '') + // TODO: Only keep `this.emit` (issue#2210) + this.emit('noFileSelected') + this.events.emit('noFileSelected') + } + + openFile (file) { + const _openFile = (file) => { + this.saveCurrentFile() + const provider = this.fileProviderOf(file) + if (!provider) return console.error(`no provider for ${file}`) + file = provider.getPathFromUrl(file) || file // in case an external URL is given as input, we resolve it to the right internal path + this._deps.config.set('currentFile', file) + this.openedFiles[file] = file + provider.get(file, (error, content) => { + if (error) { + console.log(error) + } else { + if (provider.isReadOnly(file)) { + this.editor.openReadOnly(file, content) + } else { + this.editor.open(file, content) + } + // TODO: Only keep `this.emit` (issue#2210) + this.emit('currentFileChanged', file) + this.events.emit('currentFileChanged', file) + } + }) + } + if (file) return _openFile(file) + else { + var browserProvider = this._deps.filesProviders['browser'] + browserProvider.resolveDirectory('browser', (error, filesProvider) => { + if (error) console.error(error) + var fileList = Object.keys(filesProvider) + if (fileList.length) { + _openFile(browserProvider.type + '/' + fileList[0]) + } else { + // TODO: Only keep `this.emit` (issue#2210) + this.emit('noFileSelected') + this.events.emit('noFileSelected') + } + }) + } + } + + getProvider (name) { + return this._deps.filesProviders[name] + } + + fileProviderOf (file) { + if (file.indexOf('localhost') === 0) { + return this._deps.filesProviders['localhost'] + } + return this._deps.filesProviders['browser'] + } + + saveCurrentFile () { + var currentFile = this._deps.config.get('currentFile') + if (currentFile && this.editor.current()) { + var input = this.editor.get(currentFile) + if (input) { + var provider = this.fileProviderOf(currentFile) + if (provider) { + provider.set(currentFile, input) + } else { + console.log('cannot save ' + currentFile + '. Does not belong to any explorer') + } + } + } + } + + syncEditor (path) { + var currentFile = this._deps.config.get('currentFile') + if (path !== currentFile) return + + var provider = this.fileProviderOf(currentFile) + if (provider) { + provider.get(currentFile, (error, content) => { + if (error) console.log(error) + this.editor.setText(content) + }) + } else { + console.log('cannot save ' + currentFile + '. Does not belong to any explorer') + } + } + + setBatchFiles (filesSet, fileProvider, override, callback) { + const self = this + if (!fileProvider) fileProvider = 'browser' + if (override === undefined) override = false + + async.each(Object.keys(filesSet), (file, callback) => { + if (override) { + self._deps.filesProviders[fileProvider].set(file, filesSet[file].content) + self.syncEditor(fileProvider + file) + return callback() + } + + helper.createNonClashingName(file, self._deps.filesProviders[fileProvider], + (error, name) => { + if (error) { + modalDialogCustom.alert('Unexpected error loading the file ' + error) + } else if (helper.checkSpecialChars(name)) { + modalDialogCustom.alert('Special characters are not allowed') + } else { + self._deps.filesProviders[fileProvider].set(name, filesSet[file].content) + self.syncEditor(fileProvider + name) + } + callback() + }) + }, (error) => { + if (callback) callback(error) + }) + } +} + +module.exports = FileManager diff --git a/src/app/files/fileProvider.js b/src/app/files/fileProvider.js new file mode 100644 index 0000000000..116f42b368 --- /dev/null +++ b/src/app/files/fileProvider.js @@ -0,0 +1,241 @@ +'use strict' + +const CompilerImport = require('../compiler/compiler-imports') +const EventManager = require('../../lib/events') +const modalDialogCustom = require('../ui/modal-dialog-custom') +const tooltip = require('../ui/tooltip') +const remixLib = require('remix-lib') +const Storage = remixLib.Storage + +class FileProvider { + constructor (name) { + this.event = new EventManager() + this.type = name + this.providerExternalsStorage = new Storage('providerExternals:') + this.externalFolders = [this.type + '/swarm', this.type + '/ipfs', this.type + '/github', this.type + '/gists', this.type + '/https'] + } + + addNormalizedName (path, url) { + this.providerExternalsStorage.set(this.type + '/' + path, url) + this.providerExternalsStorage.set('reverse-' + url, this.type + '/' + path) + } + + removeNormalizedName (path) { + const value = this.providerExternalsStorage.get(path) + this.providerExternalsStorage.remove(path) + this.providerExternalsStorage.remove('reverse-' + value) + } + + normalizedNameExists (path) { + return this.providerExternalsStorage.exists(path) + } + + getNormalizedName (path) { + return this.providerExternalsStorage.get(path) + } + + getPathFromUrl (url) { + return this.providerExternalsStorage.get('reverse-' + url) + } + + isExternalFolder (path) { + return this.externalFolders.includes(path) + } + + discardChanges (path) { + this.remove(path) + const compilerImport = new CompilerImport() + this.providerExternalsStorage.keys().map(value => { + if (value.indexOf(path) === 0) { + compilerImport.import( + this.getNormalizedName(value), + true, + (loadingMsg) => { tooltip(loadingMsg) }, + (error, content, cleanUrl, type, url) => { + if (error) { + modalDialogCustom.alert(error) + } else { + this.addExternal(type + '/' + cleanUrl, content, url) + } + } + ) + } + }) + } + + exists (path, cb) { + // todo check the type (directory/file) as well #2386 + // currently it is not possible to have a file and folder with same path + return cb(null, this._exists(path)) + } + + _exists (path) { + var unprefixedpath = this.removePrefix(path) + return path === this.type ? true : window.remixFileSystem.existsSync(unprefixedpath) + } + + init (cb) { + cb() + } + + get (path, cb) { + cb = cb || function () {} + path = this.getPathFromUrl(path) || path // ensure we actually use the normalized path from here + var unprefixedpath = this.removePrefix(path) + var exists = window.remixFileSystem.existsSync(unprefixedpath) + if (!exists) return cb(null, null) + window.remixFileSystem.readFile(unprefixedpath, 'utf8', (err, content) => { + cb(err, content) + }) + } + + set (path, content, cb) { + cb = cb || function () {} + var unprefixedpath = this.removePrefix(path) + var exists = window.remixFileSystem.existsSync(unprefixedpath) + if (exists && window.remixFileSystem.readFileSync(unprefixedpath, 'utf8') === content) return true + if (!exists && unprefixedpath.indexOf('/') !== -1) { + this.createDir(path) + } + try { + window.remixFileSystem.writeFileSync(unprefixedpath, content) + } catch (e) { + cb(e) + return false + } + if (!exists) { + this.event.trigger('fileAdded', [this._normalizePath(unprefixedpath), false]) + } else { + this.event.trigger('fileChanged', [this._normalizePath(unprefixedpath)]) + } + cb() + return true + } + + createDir (path, cb) { + var unprefixedpath = this.removePrefix(path) + const paths = unprefixedpath.split('/') + paths.pop() // last element should the filename + if (paths.length && paths[0] === '') paths.shift() + let currentCheck = '' + paths.forEach((value) => { + currentCheck = currentCheck + '/' + value + if (!window.remixFileSystem.existsSync(currentCheck)) { + window.remixFileSystem.mkdirSync(currentCheck) + this.event.trigger('folderAdded', [this._normalizePath(currentCheck)]) + } + }) + if (cb) cb() + } + + // this will not add a folder as readonly but keep the original url to be able to restore it later + addExternal (path, content, url) { + if (url) this.addNormalizedName(path, url) + return this.set(path, content) + } + + isReadOnly (path) { + return false + } + + isDirectory (path) { + const unprefixedpath = this.removePrefix(path) + + return path === this.type ? true : window.remixFileSystem.statSync(unprefixedpath).isDirectory() + } + + isFile (path) { + path = this.removePrefix(path) + return window.remixFileSystem.statSync(path).isFile() + } + + /** + * Removes the folder recursively + * @param {*} path is the folder to be removed + */ + remove (path) { + path = this.removePrefix(path) + if (window.remixFileSystem.existsSync(path)) { + const stat = window.remixFileSystem.statSync(path) + try { + if (!stat.isDirectory()) { + return this.removeFile(path) + } else { + const items = window.remixFileSystem.readdirSync(path) + if (items.length !== 0) { + items.forEach((item, index) => { + const curPath = `${path}/${item}` + if (window.remixFileSystem.statSync(curPath).isDirectory()) { // delete folder + this.remove(curPath) + } else { // delete file + this.removeFile(curPath) + } + }) + if (window.remixFileSystem.readdirSync(path).length === 0) window.remixFileSystem.rmdirSync(path, console.log) + } else { + // folder is empty + window.remixFileSystem.rmdirSync(path, console.log) + } + } + } catch (e) { + console.log(e) + return false + } + } + return true + } + + removeFile (path) { + path = this.removePrefix(path) + if (window.remixFileSystem.existsSync(path) && !window.remixFileSystem.statSync(path).isDirectory()) { + window.remixFileSystem.unlinkSync(path, console.log) + this.event.trigger('fileRemoved', [this._normalizePath(path)]) + return true + } else return false + } + + rename (oldPath, newPath, isFolder) { + var unprefixedoldPath = this.removePrefix(oldPath) + var unprefixednewPath = this.removePrefix(newPath) + if (this._exists(unprefixedoldPath)) { + window.remixFileSystem.renameSync(unprefixedoldPath, unprefixednewPath) + this.event.trigger('fileRenamed', [ + this._normalizePath(unprefixedoldPath), + this._normalizePath(unprefixednewPath), + isFolder + ]) + return true + } + return false + } + + resolveDirectory (path, callback) { + if (!path) return callback(null, { [this.type]: {} }) + path = this.removePrefix(path) + if (path.indexOf('/') !== 0) path = '/' + path + + window.remixFileSystem.readdir(path, (error, files) => { + var ret = {} + if (files) { + files.forEach(element => { + const absPath = (path === '/' ? '' : path) + '/' + element + ret[absPath.indexOf('/') === 0 ? absPath.replace('/', '') : absPath] = { isDirectory: window.remixFileSystem.statSync(absPath).isDirectory() } + // ^ ret does not accept path starting with '/' + }) + } + callback(error, ret) + }) + } + + removePrefix (path) { + path = path.indexOf(this.type) === 0 ? path.replace(this.type, '') : path + return path + } + + _normalizePath (path) { + if (path.indexOf('/') !== 0) path = '/' + path + return this.type + path + } +} + +module.exports = FileProvider diff --git a/src/app/files/remixDProvider.js b/src/app/files/remixDProvider.js new file mode 100644 index 0000000000..15df112559 --- /dev/null +++ b/src/app/files/remixDProvider.js @@ -0,0 +1,226 @@ +'use strict' +var EventManager = require('../../lib/events') +var pathtool = require('path') + +module.exports = class RemixDProvider { + constructor (remixd) { + this.event = new EventManager() + this._remixd = remixd + this.remixd = remixapi(remixd, this) + this.type = 'localhost' + this.error = { 'EEXIST': 'File already exists' } + this._isReady = false + this._readOnlyFiles = {} + this._readOnlyMode = false + this.filesContent = {} + this.files = {} + + var remixdEvents = ['connecting', 'connected', 'errored', 'closed'] + remixdEvents.forEach((value) => { + remixd.event.register(value, (event) => { + this.event.trigger(value, [event]) + }) + }) + + remixd.event.register('notified', (data) => { + if (data.scope === 'sharedfolder') { + if (data.name === 'created') { + this.init(() => { + this.event.trigger('fileAdded', [this.type + '/' + data.value.path, data.value.isReadOnly, data.value.isFolder]) + }) + } else if (data.name === 'removed') { + this.init(() => { + this.event.trigger('fileRemoved', [this.type + '/' + data.value.path]) + }) + } else if (data.name === 'changed') { + this._remixd.call('sharedfolder', 'get', {path: data.value}, (error, content) => { + if (error) { + console.log(error) + } else { + var path = this.type + '/' + data.value + this.filesContent[path] = content + this.event.trigger('fileExternallyChanged', [path, content]) + } + }) + } else if (data.name === 'rootFolderChanged') { + // new path has been set, we should reset + this.event.trigger('folderAdded', [this.type + '/']) + } + } + }) + } + + isConnected () { + return this._isReady + } + + close (cb) { + this.remixd.exit() + this._isReady = false + cb() + } + + init (cb) { + this._remixd.ensureSocket((error) => { + if (error) return cb(error) + this._isReady = !error + this._remixd.call('sharedfolder', 'folderIsReadOnly', {}, (error, result) => { + this._readOnlyMode = result + cb(error) + }) + }) + } + + // @TODO: refactor all `this._remixd.call(....)` uses into `this.remixd[api](...)` + // where `api = ...`: + // this.remixd.read(path, (error, content) => {}) + // this.remixd.write(path, content, (error, result) => {}) + // this.remixd.rename(path1, path2, (error, result) => {}) + // this.remixd.remove(path, (error, result) => {}) + // this.remixd.dir(path, (error, filesList) => {}) + // + // this.remixd.exists(path, (error, isValid) => {}) + + async exists (path, cb) { + const unprefixedpath = this.removePrefix(path) + const callId = await this._remixd.call('sharedfolder', 'exists', {path: unprefixedpath}) + const result = await this._remixd.receiveResponse(callId) + + return cb(null, result) + } + + getNormalizedName (path) { + return path + } + + getPathFromUrl (path) { + return path + } + + get (path, cb) { + var unprefixedpath = this.removePrefix(path) + this._remixd.call('sharedfolder', 'get', {path: unprefixedpath}, (error, file) => { + if (!error) { + this.filesContent[path] = file.content + if (file.readonly) { this._readOnlyFiles[path] = 1 } + cb(error, file.content) + } else { + // display the last known content. + // TODO should perhaps better warn the user that the file is not synced. + cb(null, this.filesContent[path]) + } + }) + } + + set (path, content, cb) { + var unprefixedpath = this.removePrefix(path) + this._remixd.call('sharedfolder', 'set', {path: unprefixedpath, content: content}, (error, result) => { + if (cb) return cb(error, result) + var path = this.type + '/' + unprefixedpath + this.event.trigger('fileChanged', [path]) + }) + return true + } + + isReadOnly (path) { + return this._readOnlyMode || this._readOnlyFiles[path] === 1 + } + + async remove (path) { + var unprefixedpath = this.removePrefix(path) + const callId = await this._remixd.call('sharedfolder', 'remove', {path: unprefixedpath}, (error, result) => { + if (error) console.log(error) + var path = this.type + '/' + unprefixedpath + delete this.filesContent[path] + this.init(() => { + this.event.trigger('fileRemoved', [path]) + }) + }) + + return await this._remixd.receiveResponse(callId) + } + + rename (oldPath, newPath, isFolder) { + var unprefixedoldPath = this.removePrefix(oldPath) + var unprefixednewPath = this.removePrefix(newPath) + this._remixd.call('sharedfolder', 'rename', {oldPath: unprefixedoldPath, newPath: unprefixednewPath}, (error, result) => { + if (error) { + console.log(error) + if (this.error[error.code]) error = this.error[error.code] + this.event.trigger('fileRenamedError', [this.error[error.code]]) + } else { + var newPath = this.type + '/' + unprefixednewPath + var oldPath = this.type + '/' + unprefixedoldPath + this.filesContent[newPath] = this.filesContent[oldPath] + delete this.filesContent[oldPath] + this.init(() => { + this.event.trigger('fileRenamed', [oldPath, newPath, isFolder]) + }) + } + }) + return true + } + + isExternalFolder (path) { + return false + } + + removePrefix (path) { + path = path.indexOf(this.type) === 0 ? path.replace(this.type, '') : path + if (path[0] === '/') return path.substring(1) + return path + } + + resolveDirectory (path, callback) { + var self = this + if (path[0] === '/') path = path.substring(1) + if (!path) return callback(null, { [self.type]: { } }) + path = self.removePrefix(path) + self.remixd.dir(path, callback) + } + + async isDirectory (path) { + const unprefixedpath = this.removePrefix(path) + const callId = await this._remixd.call('sharedfolder', 'isDirectory', {path: unprefixedpath}) + + return await this._remixd.receiveResponse(callId) + } + + async isFile (path) { + const unprefixedpath = this.removePrefix(path) + const callId = await this._remixd.call('sharedfolder', 'isFile', {path: unprefixedpath}) + + return await this._remixd.receiveResponse(callId) + } +} + +function remixapi (remixd, self) { + const read = (path, callback) => { + path = '' + (path || '') + path = pathtool.join('./', path) + remixd.call('sharedfolder', 'get', { path }, (error, content) => callback(error, content)) + } + const write = (path, content, callback) => { + path = '' + (path || '') + path = pathtool.join('./', path) + remixd.call('sharedfolder', 'set', { path, content }, (error, result) => callback(error, result)) + } + const rename = (path, newpath, callback) => { + path = '' + (path || '') + path = pathtool.join('./', path) + remixd.call('sharedfolder', 'rename', { oldPath: path, newPath: newpath }, (error, result) => callback(error, result)) + } + const remove = (path, callback) => { + path = '' + (path || '') + path = pathtool.join('./', path) + remixd.call('sharedfolder', 'remove', { path }, (error, result) => callback(error, result)) + } + const dir = (path, callback) => { + path = '' + (path || '') + path = pathtool.join('./', path) + remixd.call('sharedfolder', 'resolveDirectory', { path }, (error, filesList) => callback(error, filesList)) + } + const exit = () => { remixd.close() } + const api = { read, write, rename, remove, dir, exit, event: remixd.event } + return api +} diff --git a/src/app/files/remixd-handle.js b/src/app/files/remixd-handle.js new file mode 100644 index 0000000000..62a9ecf515 --- /dev/null +++ b/src/app/files/remixd-handle.js @@ -0,0 +1,114 @@ +import isElectron from 'is-electron' +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' +var yo = require('yo-yo') +var modalDialog = require('../ui/modaldialog') +var modalDialogCustom = require('../ui/modal-dialog-custom') + +var csjs = require('csjs-inject') + +var css = csjs` + .dialog { + display: flex; + flex-direction: column; + } + .dialogParagraph { + margin-bottom: 2em; + word-break: break-word; + } +` + +const profile = { + name: 'remixd', + methods: [], + events: [], + description: 'Using Remixd daemon, allow to access file system', + kind: 'other', + version: packageJson.version +} + +export class RemixdHandle extends Plugin { + constructor (fileSystemExplorer, locahostProvider, appManager) { + super(profile) + this.fileSystemExplorer = fileSystemExplorer + this.locahostProvider = locahostProvider + this.appManager = appManager + } + + deactivate () { + this.locahostProvider.close((error) => { + if (error) console.log(error) + }) + } + + activate () { + this.connectToLocalhost() + } + + canceled () { + this.appManager.ensureDeactivated('remixd') + } + + /** + * connect to localhost if no connection and render the explorer + * disconnect from localhost if connected and remove the explorer + * + * @param {String} txHash - hash of the transaction + */ + connectToLocalhost () { + let connection = (error) => { + if (error) { + console.log(error) + modalDialogCustom.alert( + 'Cannot connect to the remixd daemon.' + + 'Please make sure you have the remixd running in the background.' + ) + this.canceled() + } else { + this.fileSystemExplorer.ensureRoot() + } + } + if (this.locahostProvider.isConnected()) { + this.locahostProvider.close((error) => { + if (error) console.log(error) + }) + } else if (!isElectron()) { + // warn the user only if he/she is in the browser context + modalDialog( + 'Connect to localhost', + remixdDialog(), + { label: 'Connect', + fn: () => { + this.locahostProvider.init((error) => connection(error)) + } + }, + { label: 'Cancel', + fn: () => { + this.canceled() + } + } + ) + } else { + this.locahostProvider.init((error) => connection(error)) + } + } +} + +function remixdDialog () { + return yo` +
+
Interact with your file system from Remix. Click connect and find shared folder in the Remix file explorer (under localhost). + Before you get started, check out the Remixd tutorial. + to find out how to run Remixd. +
+
If you have looked at that tutorial and are just looking for the remixd command,
here it is: +
remixd -s absolute-path-to-the-shared-folder --remix-ide your-remix-ide-URL-instance +
+
Connection will start a session between ${window.location.href} and your local file system ws://127.0.0.1:65520 + so please make sure your system is secured enough (port 65520 neither opened nor forwarded). + will show you current connection status. +
+
This feature is still in Alpha, so we recommend you to keep a copy of the shared folder.
+
+ ` +} diff --git a/src/app/files/styles/file-explorer-styles.js b/src/app/files/styles/file-explorer-styles.js new file mode 100644 index 0000000000..7ad4597f12 --- /dev/null +++ b/src/app/files/styles/file-explorer-styles.js @@ -0,0 +1,65 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .label { + margin-top : 4px; + } + .leaf { + overflow : hidden; + text-overflow : ellipsis; + width : 90%; + margin-bottom : 0px; + } + .fileexplorer { + box-sizing : border-box; + } + input[type="file"] { + display: none; + } + .folder, + .file { + font-size : 14px; + cursor : pointer; + } + .file { + padding : 4px; + } + .newFile { + padding-right : 10px; + } + .newFile i { + cursor : pointer; + } + .newFile:hover { + transform : scale(1.3); + } + .menu { + margin-left : 20px; + } + .items { + display : inline + } + .hasFocus { + } + .rename { + } + .remove { + margin-left : auto; + padding-left : 5px; + padding-right : 5px; + } + .activeMode { + display : flex; + width : 100%; + margin-right : 10px; + padding-right : 19px; + } + .activeMode > div { + min-width : 10px; + } + ul { + padding : 0; + } +` + +module.exports = css diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js new file mode 100644 index 0000000000..9ded1bcaac --- /dev/null +++ b/src/app/panels/file-panel.js @@ -0,0 +1,106 @@ +var yo = require('yo-yo') +var EventManager = require('../../lib/events') +var FileExplorer = require('../files/file-explorer') +var { RemixdHandle } = require('../files/remixd-handle.js') +var globalRegistry = require('../../global/registry') +var css = require('./styles/file-panel-styles') +import { ViewPlugin } from '@remixproject/engine' + +import * as packageJson from '../../../package.json' + +var canUpload = window.File || window.FileReader || window.FileList || window.Blob + +/* + Overview of APIs: + * fileManager: @args fileProviders (browser, shared-folder, swarm, github, etc ...) & config & editor + - listen on browser & localhost file provider (`fileRenamed` & `fileRemoved`) + - update the tabs, switchFile + - trigger `currentFileChanged` + - set the current file in the config + * fileProvider: currently browser, swarm, localhost, github, gist + - link to backend + - provide properties `type`, `readonly` + - provide API `resolveDirectory`, `remove`, `exists`, `rename`, `get`, `set` + - trigger `fileExternallyChanged`, `fileRemoved`, `fileRenamed`, `fileRenamedError`, `fileAdded` + * file-explorer: treeview @args fileProvider + - listen on events triggered by fileProvider + - call fileProvider API +*/ + +const profile = { + name: 'fileExplorers', + displayName: 'File explorers', + methods: [], + events: [], + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDM4NHE0MCAwIDY4IDI4dDI4IDY4djEyMTZxMCA0MC0yOCA2OHQtNjggMjhoLTk2MHEtNDAgMC02OC0yOHQtMjgtNjh2LTI4OGgtNTQ0cS00MCAwLTY4LTI4dC0yOC02OHYtNjcycTAtNDAgMjAtODh0NDgtNzZsNDA4LTQwOHEyOC0yOCA3Ni00OHQ4OC0yMGg0MTZxNDAgMCA2OCAyOHQyOCA2OHYzMjhxNjgtNDAgMTI4LTQwaDQxNnptLTU0NCAyMTNsLTI5OSAyOTloMjk5di0yOTl6bS02NDAtMzg0bC0yOTkgMjk5aDI5OXYtMjk5em0xOTYgNjQ3bDMxNi0zMTZ2LTQxNmgtMzg0djQxNnEwIDQwLTI4IDY4dC02OCAyOGgtNDE2djY0MGg1MTJ2LTI1NnEwLTQwIDIwLTg4dDQ4LTc2em05NTYgODA0di0xMTUyaC0zODR2NDE2cTAgNDAtMjggNjh0LTY4IDI4aC00MTZ2NjQwaDg5NnoiLz48L3N2Zz4=', + description: ' - ', + kind: 'fileexplorer', + location: 'sidePanel', + documentation: 'https://remix-ide.readthedocs.io/en/latest/file_explorer.html', + version: packageJson.version +} + +module.exports = class Filepanel extends ViewPlugin { + + constructor (appManager) { + super(profile) + var self = this + self._components = {} + self._components.registry = globalRegistry + self._deps = { + fileProviders: self._components.registry.get('fileproviders').api, + fileManager: self._components.registry.get('filemanager').api, + config: self._components.registry.get('config').api + } + + function createProvider (key, menuItems) { + return new FileExplorer(self._components.registry, self._deps.fileProviders[key], menuItems) + } + + var fileExplorer = createProvider('browser', ['createNewFile', 'publishToGist', canUpload ? 'uploadFile' : '']) + var fileSystemExplorer = createProvider('localhost') + + self.remixdHandle = new RemixdHandle(fileSystemExplorer, self._deps.fileProviders['localhost'], appManager) + + const explorers = yo` +
+
${fileExplorer.init()}
+
${fileSystemExplorer.init()}
+
+ ` + + function template () { + return yo` +
+
+
+ ${explorers} +
+
+
+ ` + } + + var event = new EventManager() + self.event = event + var element = template() + fileExplorer.ensureRoot() + self._deps.fileProviders['localhost'].event.register('connecting', (event) => { + }) + + self._deps.fileProviders['localhost'].event.register('connected', (event) => { + fileSystemExplorer.show() + }) + + self._deps.fileProviders['localhost'].event.register('errored', (event) => { + fileSystemExplorer.hide() + }) + + self._deps.fileProviders['localhost'].event.register('closed', (event) => { + fileSystemExplorer.hide() + }) + + self.render = function render () { return element } + } +} + diff --git a/src/app/panels/main-view.js b/src/app/panels/main-view.js new file mode 100644 index 0000000000..bc12ffd6f6 --- /dev/null +++ b/src/app/panels/main-view.js @@ -0,0 +1,186 @@ +var yo = require('yo-yo') +var EventManager = require('../../lib/events') + +var globalRegistry = require('../../global/registry') +var { TabProxy } = require('./tab-proxy.js') + +var ContextView = require('../editor/contextView') + +var csjs = require('csjs-inject') + +var css = csjs` + .mainview { + display : flex; + flex-direction : column; + height : 100%; + width : 100%; + } +` + +export class MainView { + constructor (contextualListener, editor, mainPanel, fileManager, appManager, terminal) { + var self = this + self.event = new EventManager() + self._view = {} + self._components = {} + self._components.registry = globalRegistry + self.editor = editor + self.fileManager = fileManager + self.mainPanel = mainPanel + self.txListener = globalRegistry.get('txlistener').api + self._components.terminal = terminal + self._components.contextualListener = contextualListener + this.appManager = appManager + this.init() + } + showApp (name) { + this.fileManager.unselectCurrentFile() + this.mainPanel.showContent(name) + this._view.editor.style.display = 'none' + this._components.contextView.hide() + this._view.mainPanel.style.display = 'block' + } + getAppPanel () { + return this.mainPanel + } + init () { + var self = this + self._deps = { + config: self._components.registry.get('config').api, + fileManager: self._components.registry.get('filemanager').api + } + + self.tabProxy = new TabProxy(self.fileManager, self.editor, self.appManager) + /* + We listen here on event from the tab component to display / hide the editor and mainpanel + depending on the content that should be displayed + */ + self.fileManager.events.on('currentFileChanged', (file) => { + // we check upstream for "fileChanged" + self._view.editor.style.display = 'block' + self._view.mainPanel.style.display = 'none' + self._components.contextView.show() + }) + self.tabProxy.event.on('openFile', (file) => { + self._view.editor.style.display = 'block' + self._view.mainPanel.style.display = 'none' + self._components.contextView.show() + }) + self.tabProxy.event.on('closeFile', (file) => { + }) + self.tabProxy.event.on('switchApp', self.showApp.bind(self)) + self.tabProxy.event.on('closeApp', (name) => { + self._view.editor.style.display = 'block' + self._components.contextView.show() + self._view.mainPanel.style.display = 'none' + }) + self.tabProxy.event.on('tabCountChanged', (count) => { + if (!count) this.editor.displayEmptyReadOnlySession() + }) + self.data = { + _layout: { + top: { + offset: self._deps.config.get('terminal-top-offset') || 150, + show: true + } + } + } + + const contextView = new ContextView({contextualListener: self._components.contextualListener, editor: self.editor}) + + self._components.contextView = contextView + + self._components.terminal.event.register('resize', delta => self._adjustLayout('top', delta)) + if (self.txListener) { + self._components.terminal.event.register('listenOnNetWork', (listenOnNetWork) => { + self.txListener.setListenOnNetwork(listenOnNetWork) + }) + } + } + _adjustLayout (direction, delta) { + var limitUp = 0 + var limitDown = 32 + var containerHeight = window.innerHeight - limitUp // - menu bar containerHeight + var self = this + var layout = self.data._layout[direction] + if (layout) { + if (delta === undefined) { + layout.show = !layout.show + if (layout.show) delta = layout.offset + else delta = 0 + } else { + layout.show = true + self._deps.config.set(`terminal-${direction}-offset`, delta) + layout.offset = delta + } + } + var tmp = delta - limitDown + delta = tmp > 0 ? tmp : 0 + if (direction === 'top') { + var mainPanelHeight = containerHeight - delta + mainPanelHeight = mainPanelHeight < 0 ? 0 : mainPanelHeight + self._view.editor.style.height = `${mainPanelHeight}px` + self._view.mainPanel.style.height = `${mainPanelHeight}px` + self._view.terminal.style.height = `${delta}px` // - menu bar height + self.editor.resize((document.querySelector('#editorWrap') || {}).checked) + self._components.terminal.scroll2bottom() + } + } + getTerminal () { + return this._components.terminal + } + getEditor () { + var self = this + return self.editor + } + refresh () { + var self = this + self._view.tabs.onmouseenter() + } + log (data = {}) { + var self = this + var command = self._components.terminal.commands[data.type] + if (typeof command === 'function') command(data.value) + } + logMessage (msg) { + var self = this + self.log({type: 'log', value: msg}) + } + logHtmlMessage (msg) { + var self = this + self.log({type: 'html', value: msg}) + } + render () { + var self = this + if (self._view.mainview) return self._view.mainview + self._view.editor = self.editor.render() + self._view.editor.style.display = 'none' + self._view.mainPanel = self.mainPanel.render() + self._view.terminal = self._components.terminal.render() + self._view.mainview = yo` +
+ ${self.tabProxy.renderTabsbar()} + ${self._view.editor} + ${self._view.mainPanel} + ${self._components.contextView.render()} + ${self._view.terminal} +
+ ` + // INIT + self._adjustLayout('top', self.data._layout.top.offset) + + document.addEventListener('keydown', (e) => { + if (e.altKey && e.keyCode === 84) self.tabProxy.switchNextTab() // alt + t + }) + + return self._view.mainview + } + registerCommand (name, command, opts) { + var self = this + return self._components.terminal.registerCommand(name, command, opts) + } + updateTerminalFilter (filter) { + this._components.terminal.updateJournal(filter) + } +} + diff --git a/src/app/panels/styles/file-panel-styles.js b/src/app/panels/styles/file-panel-styles.js new file mode 100644 index 0000000000..4db78296b9 --- /dev/null +++ b/src/app/panels/styles/file-panel-styles.js @@ -0,0 +1,62 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .container { + display : flex; + flex-direction : row; + width : 100%; + height : 100%; + box-sizing : border-box; + } + .fileexplorer { + display : flex; + flex-direction : column; + position : relative; + width : 100%; + padding-left : 6px; + padding-top : 6px; + } + .fileExplorerTree { + cursor : default; + } + .gist { + padding : 10px; + } + .gist i { + cursor : pointer; + } + .gist i:hover { + color : orange; + } + .connectToLocalhost { + padding : 10px; + } + .connectToLocalhost i { + cursor : pointer; + } + .connectToLocalhost i:hover { + color : var(--secondary) + } + .uploadFile { + padding : 10px; + } + .uploadFile label:hover { + color : var(--secondary) + } + .uploadFile label { + cursor : pointer; + } + .treeview { + overflow-y : auto; + } + .dialog { + display: flex; + flex-direction: column; + } + .dialogParagraph { + margin-bottom: 2em; + word-break: break-word; + } +` + +module.exports = css diff --git a/src/app/panels/styles/terminal-styles.js b/src/app/panels/styles/terminal-styles.js new file mode 100644 index 0000000000..46dd30cf22 --- /dev/null +++ b/src/app/panels/styles/terminal-styles.js @@ -0,0 +1,164 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .panel { + position : relative; + display : flex; + flex-direction : column; + font-size : 12px; + min-height : 3em; + } + .bar { + display : flex; + z-index : 2; + } + .menu { + position : relative; + display : flex; + align-items : center; + width : 100%; + max-height : 35px; + min-height : 35px; + } + .clear { + margin-right : 20px; + width : 10px; + cursor : pointer; + display : flex; + } + .clear:hover { + color : var(--secondary); + } + .toggleTerminal { + margin-right : 20px; + margin-left : 2px; + font-size : 14px; + font-weight : bold; + cursor : pointer; + } + .toggleTerminal:hover { + color : var(--secondary); + } + .terminal_container { + display : flex; + flex-direction : column; + height : 100%; + overflow-y : auto; + font-family : monospace; + margin : 0px; + background-image : url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCgk8ZyBvcGFjaXR5PSIwLjEiPg0KCQk8Zz4NCgkJCTxwYXRoIGZpbGw9IiM0MTQwNDIiIGQ9Ik03MC41ODIsNDI4LjkwNGMwLjgxMSwwLDEuNjIyLDAuMjg1LDIuNDM3LDAuODUzYzAuODExLDAuNTcxLDEuMjE4LDEuMzQsMS4yMTgsMi4zMTQNCgkJCQljMCwyLjI3Ny0xLjA1OSwzLjQ5Ni0zLjE2OCwzLjY1NmMtNS4wMzgsMC44MTQtOS4zODEsMi4zNTYtMTMuMDM3LDQuNjNjLTMuNjU1LDIuMjc2LTYuNjYzLDUuMTE3LTkuMDE2LDguNTI4DQoJCQkJYy0yLjM1NywzLjQxMS00LjEwNCw3LjI3Mi01LjIzOSwxMS41NzVjLTEuMTM5LDQuMzA3LTEuNzA2LDguODE0LTEuNzA2LDEzLjUyNHYzMi42NTNjMCwyLjI3My0xLjEzOSwzLjQxMS0zLjQxMiwzLjQxMQ0KCQkJCWMtMi4yNzcsMC0zLjQxMi0xLjEzOC0zLjQxMi0zLjQxMXYtNzQuMzIzYzAtMi4yNzMsMS4xMzUtMy40MTEsMy40MTItMy40MTFjMi4yNzMsMCwzLjQxMiwxLjEzOCwzLjQxMiwzLjQxMXYxNS4xMDgNCgkJCQljMS40NjItMi40MzcsMy4yMDYtNC43NTIsNS4yMzktNi45NDVjMi4wMjktMi4xOTMsNC4yNjQtNC4xNDMsNi43MDEtNS44NDhjMi40MzctMS43MDYsNS4wNzYtMy4wODUsNy45MTktNC4xNDMNCgkJCQlDNjQuNzcxLDQyOS40MzMsNjcuNjU4LDQyOC45MDQsNzAuNTgyLDQyOC45MDR6Ii8+DQoJCQk8cGF0aCBmaWxsPSIjNDE0MDQyIiBkPSJNMTM3Ljc3Myw0MjcuMTk4YzUuNjg1LDAsMTAuOTY2LDEuMTgxLDE1LjgzOSwzLjUzNGM0Ljg3NCwyLjM1Niw5LjA1NSw1LjQ4MiwxMi41NSw5LjM4MQ0KCQkJCWMzLjQ5MiwzLjg5OSw2LjIxNCw4LjQwNyw4LjE2NCwxMy41MjRjMS45NDksNS4xMTcsMi45MjQsMTAuNDQsMi45MjQsMTUuOTYxYzAsMC45NzYtMC4zNjYsMS43OS0xLjA5NywyLjQzOA0KCQkJCWMtMC43MzEsMC42NS0xLjU4MywwLjk3NS0yLjU1OSwwLjk3NWgtNjcuOTg3YzAuNDg3LDQuMjI2LDEuNTg0LDguMjg1LDMuMjksMTIuMTg0YzEuNzA2LDMuODk5LDMuOTM3LDcuMzEyLDYuNzAxLDEwLjIzNA0KCQkJCWMyLjc2MSwyLjkyNSw2LjAwOCw1LjI4MSw5Ljc0OCw3LjA2N2MzLjczNSwxLjc4OSw3Ljg3NywyLjY4MSwxMi40MjgsMi42ODFjMTIuMDIxLDAsMjEuMzYtNC43OSwyOC4wMjMtMTQuMzc3DQoJCQkJYzAuNjQ3LTEuMTM2LDEuNjIyLTEuNzA2LDIuOTI0LTEuNzA2YzIuMjczLDAsMy40MTIsMS4xMzksMy40MTIsMy40MTJjMCwwLjE2My0wLjE2NCwwLjczLTAuNDg3LDEuNzA1DQoJCQkJYy0zLjQxMiw2LjAxMy04LjIwNSwxMC40NzktMTQuMzc3LDEzLjQwMmMtNi4xNzYsMi45MjQtMTIuNjcxLDQuMzg3LTE5LjQ5NSw0LjM4N2MtNS42ODksMC0xMC45MjgtMS4xODEtMTUuNzE4LTMuNTMzDQoJCQkJYy00Ljc5My0yLjM1NC04LjkzNi01LjQ4My0xMi40MjgtOS4zODJjLTMuNDk1LTMuODk5LTYuMjE0LTguNDA3LTguMTYzLTEzLjUyNGMtMS45NS01LjExOC0yLjkyNC0xMC40MzctMi45MjQtMTUuOTYyDQoJCQkJYzAtNS41MjEsMC45NzUtMTAuODQ0LDIuOTI0LTE1Ljk2MWMxLjk0OS01LjExNyw0LjY2OC05LjYyNSw4LjE2My0xMy41MjRjMy40OTItMy44OTgsNy42MzQtNy4wMjQsMTIuNDI4LTkuMzgxDQoJCQkJQzEyNi44NDYsNDI4LjM3OSwxMzIuMDg0LDQyNy4xOTgsMTM3Ljc3Myw0MjcuMTk4eiBNMTY5Ljk0LDQ2Ni4xODhjLTAuMzI4LTQuMjIzLTEuMzQxLTguMjg1LTMuMDQ2LTEyLjE4NA0KCQkJCWMtMS43MDYtMy44OTktMy45ODItNy4zMTItNi44MjMtMTAuMjM1Yy0yLjg0NC0yLjkyNC02LjE3NS01LjI3Ny05Ljk5MS03LjA2N2MtMy44MTktMS43ODUtNy45Mi0yLjY4LTEyLjMwNi0yLjY4DQoJCQkJYy00LjU1LDAtOC42OTIsMC44OTUtMTIuNDI4LDIuNjhjLTMuNzM5LDEuNzktNi45ODcsNC4xNDQtOS43NDgsNy4wNjdjLTIuNzY0LDIuOTI0LTQuOTk1LDYuMzM2LTYuNzAxLDEwLjIzNQ0KCQkJCWMtMS43MDYsMy44OTgtMi44MDIsNy45NjEtMy4yOSwxMi4xODRIMTY5Ljk0eiIvPg0KCQkJPHBhdGggZmlsbD0iIzQxNDA0MiIgZD0iTTMwNC42OSw0MjcuNDQxYzUuMDM0LDAsOS41MDQsMS4wMTgsMTMuNDAyLDMuMDQ3YzMuODk5LDIuMDMzLDcuMTg5LDQuNjcyLDkuODcsNy45Mg0KCQkJCWMyLjY4LDMuMjUxLDQuNzA5LDcuMDY2LDYuMDkyLDExLjQ1MmMxLjM3OSw0LjM4NywyLjA3LDguODU2LDIuMDcsMTMuNDAydjQzLjYyYzAsMC45NzUtMC4zNjUsMS43ODktMS4wOTcsMi40MzgNCgkJCQljLTAuNzMsMC42NDYtMS41MDMsMC45NzUtMi4zMTMsMC45NzVjLTIuMjc2LDAtMy40MTItMS4xNC0zLjQxMi0zLjQxMnYtNDMuNjJjMC0zLjU3MS0wLjUyOS03LjEwNC0xLjU4NC0xMC42DQoJCQkJYy0xLjA1OS0zLjQ5MS0yLjYwMi02LjYxOC00LjYzLTkuMzgyYy0yLjAzMy0yLjc2MS00LjU5Mi00Ljk1My03LjY3Ny02LjU4Yy0zLjA4OC0xLjYyMS02LjY2Mi0yLjQzNi0xMC43MjItMi40MzYNCgkJCQljLTUuMiwwLTkuNTg3LDEuMjE4LTEzLjE1OSwzLjY1NGMtMy41NzQsMi40MzgtNi40NTcsNS41NjYtOC42NSw5LjM4MmMtMi4xOTMsMy44MTktMy44MTgsOC4wNDItNC44NzQsMTIuNjcyDQoJCQkJYy0xLjA1OSw0LjYzLTEuNTg0LDkuMDU4LTEuNTg0LDEzLjI4djMzLjYyOWMwLDAuOTc1LTAuMzY1LDEuNzg5LTEuMDk2LDIuNDM4Yy0wLjczMSwwLjY0Ni0xLjUwNSwwLjk3NS0yLjMxNSwwLjk3NQ0KCQkJCWMtMi4yNzYsMC0zLjQxMS0xLjE0LTMuNDExLTMuNDEydi00My42MmMwLTMuNTcxLTAuNTMtNy4xMDQtMS41ODUtMTAuNmMtMS4wNTgtMy40OTEtMi42MDEtNi42MTgtNC42MjktOS4zODINCgkJCQljLTIuMDM0LTIuNzYxLTQuNTkyLTQuOTUzLTcuNjc3LTYuNThjLTMuMDg3LTEuNjIxLTYuNjYzLTIuNDM2LTEwLjcyMi0yLjQzNmMtNS4wMzcsMC05LjM0NCwwLjg5NS0xMi45MTUsMi42OA0KCQkJCWMtMy41NzUsMS43OS02LjU0Miw0LjI2Ni04Ljg5NSw3LjQzM2MtMi4zNTcsMy4xNjctNC4wNjMsNi45NDQtNS4xMTcsMTEuMzMxYy0xLjA1OSw0LjM4Ni0xLjU4NCw5LjEtMS41ODQsMTQuMTM0djMuODk5djAuMjQzDQoJCQkJdjMyLjg5N2MwLDIuMjcyLTEuMTM4LDMuNDEyLTMuNDEyLDMuNDEyYy0yLjI3NiwwLTMuNDExLTEuMTQtMy40MTEtMy40MTJ2LTc0LjU2N2MwLTIuMjczLDEuMTM1LTMuNDExLDMuNDExLTMuNDExDQoJCQkJYzIuMjczLDAsMy40MTIsMS4xMzgsMy40MTIsMy40MTF2MTIuNDI4YzIuOTI0LTUuMTk3LDYuODYxLTkuMzgyLDExLjgxOS0xMi41NWM0Ljk1NC0zLjE2NywxMC41MTctNC43NTIsMTYuNjkyLTQuNzUyDQoJCQkJYzYuOTgzLDAsMTIuOTk1LDEuOTkxLDE4LjAzMiw1Ljk3YzUuMDMzLDMuOTgzLDguNjg4LDkuMjIzLDEwLjk2NiwxNS43MTljMi43Ni02LjMzNiw2LjczOS0xMS41MzMsMTEuOTQtMTUuNTk2DQoJCQkJQzI5MS4xMjUsNDI5LjQ3NSwyOTcuMzgsNDI3LjQ0MSwzMDQuNjksNDI3LjQ0MXoiLz4NCgkJCTxwYXRoIGZpbGw9IiM0MTQwNDIiIGQ9Ik0zNzguNzUzLDQyOS4zOTJjMC44MTEsMCwxLjU4NCwwLjM2NSwyLjMxNCwxLjA5N2MwLjczMSwwLjczLDEuMDk3LDEuNTA0LDEuMDk3LDIuMzE0djc0LjA4DQoJCQkJYzAsMC44MTQtMC4zNjUsMS41ODQtMS4wOTcsMi4zMTVjLTAuNzMsMC43My0xLjUwNCwxLjA5Ny0yLjMxNCwxLjA5N2MtMC45NzUsMC0xLjc5LTAuMzY2LTIuNDM4LTEuMDk3DQoJCQkJYy0wLjY1LTAuNzMxLTAuOTc1LTEuNTAxLTAuOTc1LTIuMzE1di03NC4wOGMwLTAuODExLDAuMzI0LTEuNTg0LDAuOTc1LTIuMzE0QzM3Ni45NjMsNDI5Ljc1NywzNzcuNzc4LDQyOS4zOTIsMzc4Ljc1Myw0MjkuMzkyeiINCgkJCQkvPg0KCQkJPHBhdGggZmlsbD0iIzQxNDA0MiIgZD0iTTQ3My4zNCw0MjguNjZjMi4yNzMsMCwzLjQxMiwxLjEzOSwzLjQxMiwzLjQxMWwtMC40ODcsMS45NWwtMjQuMzY4LDM1LjMzNGwyNC4zNjgsMzUuNTc3DQoJCQkJYzAuMzIzLDAuOTc2LDAuNDg3LDEuNjI2LDAuNDg3LDEuOTVjMCwyLjI3Mi0xLjEzOSwzLjQxMi0zLjQxMiwzLjQxMmMtMS4zMDIsMC0yLjE5My0wLjQ4OC0yLjY4LTEuNDYzbC0yMi45MDYtMzMuMzg0DQoJCQkJbC0yMi42NjMsMzMuMzg0Yy0wLjgxNCwwLjk3NS0xLjc5LDEuNDYzLTIuOTI0LDEuNDYzYy0yLjI3NywwLTMuNDExLTEuMTQtMy40MTEtMy40MTJjMC0wLjMyNCwwLjE1OS0wLjk3NSwwLjQ4Ni0xLjk1DQoJCQkJbDI0LjM2OS0zNS41NzdsLTI0LjM2OS0zNS4zMzRsLTAuNDg2LTEuOTVjMC0yLjI3MiwxLjEzNC0zLjQxMSwzLjQxMS0zLjQxMWMxLjEzNCwwLDIuMTA5LDAuNDg3LDIuOTI0LDEuNDYybDIyLjY2MywzMy4xNDENCgkJCQlsMjIuOTA2LTMzLjE0MUM0NzEuMTQ2LDQyOS4xNDcsNDcyLjAzOCw0MjguNjYsNDczLjM0LDQyOC42NnoiLz4NCgkJPC9nPg0KCQk8Zz4NCgkJCTxnPg0KCQkJCTxnIG9wYWNpdHk9IjAuNDUiPg0KCQkJCQk8Zz4NCgkJCQkJCTxwb2x5Z29uIGZpbGw9IiMwMTAxMDEiIHBvaW50cz0iMTUwLjczNCwxOTYuMjEyIDI1NS45NjksMzQ0LjUwOCAyNTUuOTY5LDI1OC4zODciLz4NCgkJCQkJPC9nPg0KCQkJCTwvZz4NCgkJCQk8ZyBvcGFjaXR5PSIwLjgiPg0KCQkJCQk8Zz4NCgkJCQkJCTxwb2x5Z29uIGZpbGw9IiMwMTAxMDEiIHBvaW50cz0iMjU1Ljk2OSwyNTguMzg3IDI1NS45NjksMzQ0LjUwOCAzNjEuMjY3LDE5Ni4yMTIiLz4NCgkJCQkJPC9nPg0KCQkJCTwvZz4NCgkJCQk8ZyBvcGFjaXR5PSIwLjYiPg0KCQkJCQk8Zz4NCgkJCQkJCTxwb2x5Z29uIGZpbGw9IiMwMTAxMDEiIHBvaW50cz0iMjU1Ljk2OSwxMjYuNzgxIDE1MC43MzMsMTc0LjYxMSAyNTUuOTY5LDIzNi44MTggMzYxLjIwNCwxNzQuNjExIi8+DQoJCQkJCTwvZz4NCgkJCQk8L2c+DQoJCQkJPGcgb3BhY2l0eT0iMC40NSI+DQoJCQkJCTxnPg0KCQkJCQkJPHBvbHlnb24gZmlsbD0iIzAxMDEwMSIgcG9pbnRzPSIxNTAuNzM0LDE3NC42MTIgMjU1Ljk2OSwyMzYuODE4IDI1NS45NjksMTI2Ljc4MiAyNTUuOTY5LDAuMDAxIi8+DQoJCQkJCTwvZz4NCgkJCQk8L2c+DQoJCQkJPGcgb3BhY2l0eT0iMC44Ij4NCgkJCQkJPGc+DQoJCQkJCQk8cG9seWdvbiBmaWxsPSIjMDEwMTAxIiBwb2ludHM9IjI1NS45NjksMCAyNTUuOTY5LDEyNi43ODEgMjU1Ljk2OSwyMzYuODE4IDM2MS4yMDQsMTc0LjYxMSIvPg0KCQkJCQk8L2c+DQoJCQkJPC9nPg0KCQkJPC9nPg0KCQk8L2c+DQoJPC9nPg0KPC9zdmc+DQo=') + background-repeat : no-repeat; + background-position : center 15%; + background-size : auto calc(75% - 1.7em); + } + .terminal { + position : relative; + display : flex; + flex-direction : column; + height : 100%; + } + .journal { + margin-top : auto; + font-family : monospace; + } + .block { + word-break : break-word; + white-space : pre-wrap; + line-height : 2ch; + padding : 1ch; + margin-top : 2ch; + } + .cli { + line-height : 1.7em; + font-family : monospace; + padding : .4em; + color : var(--primary) + border-top : solid 2px var(--secondary); + } + .prompt { + margin-right : 0.5em; + font-family : monospace; + font-weight : bold; + font-size : 14px; + } + .input { + word-break : break-word; + outline : none; + font-family : monospace; + } + .search { + display : flex; + align-items : center; + width : 330px; + padding-left : 20px; + height : 100%; + padding-top : 1px; + padding-bottom : 1px; + } + .filter { + padding-right : 0px; + margin-right : 0px; + height : 100%; + white-space : nowrap; + overflow : hidden; + text-overflow : ellipsis; + } + .searchIcon { + height : 100%; + width : 25px; + border-top-left-radius : 3px; + border-bottom-left-radius : 3px; + display : flex; + align-items : center; + justify-content : center; + margin-right : 5px; + } + .listen { + margin-right : 30px; + min-width : 40px; + height : 13px; + display : flex; + align-items : center; + } + .listenLabel { + min-width: 50px; + } + .verticalLine { + border-left : 1px solid var(--secondary) + height : 65%; + } + .listenOnNetworkLabel { + white-space : nowrap; + } + .pendingTx { + border-radius : 50%; + margin-right : 30px; + min-width : 13px; + height : 13px; + display : flex; + justify-content : center; + align-items : center; + font-size : 14px; + user-select : none; + } + .dragbarHorizontal { + position : absolute; + top : 0; + height : 0.5em; + right : 0; + left : 0; + cursor : ns-resize; + z-index : 999; + } + .ghostbar { + position : absolute; + height : 6px; + opacity : 0.5; + cursor : row-resize; + z-index : 9999; + left : 0; + right : 0; + } +` + +module.exports = css diff --git a/src/app/panels/tab-proxy.js b/src/app/panels/tab-proxy.js new file mode 100644 index 0000000000..019283d09c --- /dev/null +++ b/src/app/panels/tab-proxy.js @@ -0,0 +1,220 @@ +var yo = require('yo-yo') +var $ = require('jquery') +const EventEmitter = require('events') +const globalRegistry = require('../../global/registry') + +require('remix-tabs') + +export class TabProxy { + constructor (fileManager, editor, appManager) { + this.event = new EventEmitter() + this.fileManager = fileManager + this.appManager = appManager + this.editor = editor + this.data = {} + this._view = {} + this._handlers = {} + + globalRegistry.get('themeModule').api.events.on('themeChanged', (theme) => { + // update invert for all icons + this.updateImgStyles() + }) + + fileManager.events.on('fileRemoved', (name) => { + this.removeTab(name) + }) + + fileManager.events.on('fileClosed', (name) => { + this.removeTab(name) + }) + + fileManager.events.on('currentFileChanged', (file) => { + if (this._handlers[file]) { + this._view.filetabs.activateTab(file) + return + } + this.addTab(file, '', () => { + this.fileManager.open(file) + this.event.emit('openFile', file) + }, + () => { + this.fileManager.closeFile(file) + this.event.emit('closeFile', file) + }) + }) + + fileManager.events.on('fileRenamed', (oldName, newName, isFolder) => { + if (isFolder) return + // should change the tab title too + this.addTab(newName, '', () => { + this.fileManager.open(newName) + this.event.emit('openFile', newName) + }, + () => { + this.fileManager.closeFile(newName) + this.event.emit('closeFile', newName) + }) + this.removeTab(oldName) + }) + + appManager.event.on('activate', ({ name, location, displayName, icon }) => { + if (location === 'mainPanel') { + this.addTab( + name, + displayName, + () => this.event.emit('switchApp', name), + () => { + this.event.emit('closeApp', name) + this.appManager.deactivatePlugin(name) + }, + icon + ) + this.switchTab(name) + } + }) + + appManager.event.on('deactivate', (profile) => { + this.removeTab(profile.name) + }) + + appManager.event.on('ensureActivated', (name) => { + if (name === 'home') { + // if someone force activation of home, we switch to it + this.event.emit('switchApp', name) + this._view.filetabs.activateTab(name) + } + }) + } + updateImgStyles () { + const images = this._view.filetabs.getElementsByClassName('image') + if (images.length !== 0) { + for (let element of images) { + globalRegistry.get('themeModule').api.fixInvert(element) + }; + } + } + + switchTab (tabName) { + if (this._handlers[tabName]) { + this._handlers[tabName].switchTo() + this._view.filetabs.activateTab(tabName) + } + } + + switchNextTab () { + const active = this._view.filetabs.active + if (active && this._handlers[active]) { + const handlers = Object.keys(this._handlers) + let i = handlers.indexOf(active) + if (i >= 0) { + i = handlers[i + 1] ? i + 1 : 0 + this.switchTab(handlers[i]) + } + } + } + + switchPreviousTab () { + const active = this._view.filetabs.active + if (active && this._handlers[active]) { + const handlers = Object.keys(this._handlers) + let i = handlers.indexOf(active) + if (i >= 0) { + i = handlers[i - 1] ? i - 1 : handlers.length - 1 + this.switchTab(handlers[i]) + } + } + } + + switchToActiveTab () { + const active = this._view.filetabs.active + if (active && this._handlers[active]) { + this.switchTab(active) + } + } + + addTab (name, title, switchTo, close, icon) { + if (this._handlers[name]) return + + var slash = name.split('/') + if (!title) { + title = name.indexOf('/') !== -1 ? slash[slash.length - 1] : name + } + this._view.filetabs.addTab({ + id: name, + title, + icon, + tooltip: name + }) + this.updateImgStyles() + this._handlers[name] = { switchTo, close } + } + + removeTab (name) { + this._view.filetabs.removeTab(name) + delete this._handlers[name] + this.switchToActiveTab() + } + + addHandler (type, fn) { + this.handlers[type] = fn + } + + onZoomOut () { + this.editor.editorFontSize(-1) + } + + onZoomIn () { + this.editor.editorFontSize(1) + } + + renderTabsbar () { + this._view.filetabs = yo`` + this._view.filetabs.addEventListener('tabClosed', (event) => { + if (this._handlers[event.detail]) this._handlers[event.detail].close() + this.event.emit('tabCountChanged', this._view.filetabs.tabs.length) + }) + this._view.filetabs.addEventListener('tabActivated', (event) => { + if (this._handlers[event.detail]) this._handlers[event.detail].switchTo() + this.event.emit('tabCountChanged', this._view.filetabs.tabs.length) + }) + + this._view.filetabs.canAdd = false + + const zoomBtns = yo` +
+ this.onZoomOut()}> + this.onZoomIn()}> +
+ ` + + // @todo(#2492) remove style after the mainPanel layout fix. + this._view.tabs = yo` +
+ ${zoomBtns} + ${this._view.filetabs} +
+ ` + + // tabs + var $filesEl = $(this._view.filetabs) + + // Switch tab + var self = this + $filesEl.on('click', '.file:not(.active)', function (ev) { + ev.preventDefault() + var name = $(this).find('.name').text() + self._handlers[name].switchTo() + return false + }) + + // Remove current tab + $filesEl.on('click', '.file .remove', function (ev) { + ev.preventDefault() + var name = $(this).parent().find('.name').text() + self._handlers[name].close() + return false + }) + + return this._view.tabs + } +} diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js new file mode 100644 index 0000000000..bf48f6677f --- /dev/null +++ b/src/app/panels/terminal.js @@ -0,0 +1,757 @@ +/* global Node, requestAnimationFrame */ +var yo = require('yo-yo') +var javascriptserialize = require('javascript-serialize') +var jsbeautify = require('js-beautify') +var ethers = require('ethers') +var type = require('component-type') +var vm = require('vm') +var EventManager = require('../../lib/events') +var Web3 = require('web3') +var swarmgw = require('swarmgw')() + +var CommandInterpreterAPI = require('../../lib/cmdInterpreterAPI') +var AutoCompletePopup = require('../ui/auto-complete-popup') +var TxLogger = require('../../app/ui/txLogger') + +var csjs = require('csjs-inject') + +var css = require('./styles/terminal-styles') +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +var packageV = require('../../../package.json') + +var KONSOLES = [] + +function register (api) { KONSOLES.push(api) } + +var ghostbar = yo`
` + +const profile = { + displayName: 'Terminal', + name: 'terminal', + methods: [], + events: [], + description: ' - ', + version: packageJson.version +} + +class Terminal extends Plugin { + constructor (opts, api) { + super(profile) + var self = this + self.event = new EventManager() + self.blockchain = opts.blockchain + self._api = api + self._opts = opts + self.data = { + lineLength: opts.lineLength || 80, // ???? + session: [], + activeFilters: { commands: {}, input: '' }, + filterFns: {} + } + self._view = { el: null, bar: null, input: null, term: null, journal: null, cli: null } + self._components = {} + self._components.cmdInterpreter = new CommandInterpreterAPI(this, null, self.blockchain) + self._components.autoCompletePopup = new AutoCompletePopup(self._opts) + self._components.autoCompletePopup.event.register('handleSelect', function (input) { + let textList = self._view.input.innerText.split(' ') + textList.pop() + textList.push(input) + self._view.input.innerText = textList + self._view.input.focus() + self.putCursor2End(self._view.input) + }) + self._commands = {} + self.commands = {} + self._JOURNAL = [] + self._jobs = [] + self._INDEX = {} + self._INDEX.all = [] + self._INDEX.allMain = [] + self._INDEX.commands = {} + self._INDEX.commandsMain = {} + self.registerCommand('html', self._blocksRenderer('html'), { activate: true }) + self.registerCommand('log', self._blocksRenderer('log'), { activate: true }) + self.registerCommand('info', self._blocksRenderer('info'), { activate: true }) + self.registerCommand('warn', self._blocksRenderer('warn'), { activate: true }) + self.registerCommand('error', self._blocksRenderer('error'), { activate: true }) + self.registerCommand('script', function execute (args, scopedCommands, append) { + var script = String(args[0]) + scopedCommands.log(`> ${script}`) + self._shell(script, scopedCommands, function (error, output) { + if (error) scopedCommands.error(error) + else if (output) scopedCommands.log(output) + }) + }, { activate: true }) + function basicFilter (value, query) { try { return value.indexOf(query) !== -1 } catch (e) { return false } } + + self.registerFilter('log', basicFilter) + self.registerFilter('info', basicFilter) + self.registerFilter('warn', basicFilter) + self.registerFilter('error', basicFilter) + self.registerFilter('script', basicFilter) + + self._jsSandboxContext = {} + self._jsSandboxRegistered = {} + + if (opts.shell) self._shell = opts.shell // ??? + register(self) + } + onActivation () { + this.on('scriptRunner', 'log', (msg) => { + this.commands['log'].apply(this.commands, msg.data) + }) + this.on('scriptRunner', 'info', (msg) => { + this.commands['info'].apply(this.commands, msg.data) + }) + this.on('scriptRunner', 'warn', (msg) => { + this.commands['warn'].apply(this.commands, msg.data) + }) + this.on('scriptRunner', 'error', (msg) => { + this.commands['error'].apply(this.commands, msg.data) + }) + } + onDeactivation () { + this.off('scriptRunner', 'log') + this.off('scriptRunner', 'info') + this.off('scriptRunner', 'warn') + this.off('scriptRunner', 'error') + } + logHtml (html) { + var command = this.commands['html'] + if (typeof command === 'function') command(html) + } + focus () { + if (this._view.input) this._view.input.focus() + } + render () { + var self = this + if (self._view.el) return self._view.el + self._view.journal = yo`
` + self._view.input = yo` + { this.focus() }} onpaste=${paste} onkeydown=${change}> + ` + self._view.input.setAttribute('spellcheck', 'false') + self._view.input.setAttribute('contenteditable', 'true') + self._view.input.setAttribute('id', 'terminalCliInput') + self._view.input.setAttribute('data-id', 'terminalCliInput') + + self._view.input.innerText = '\n' + self._view.cli = yo` +
+ ${'>'} + ${self._view.input} +
+ ` + + self._view.icon = yo` + ` + self._view.dragbar = yo` +
` + + self._view.pendingTxCount = yo`
0
` + self._view.inputSearch = yo` + ` + self._view.bar = yo` +
+ ${self._view.dragbar} +
+ ${self._view.icon} +
+ +
+ ${self._view.pendingTxCount} +
+
+ + +
+
+ + ${self._view.inputSearch} +
+
+
+ ` + self._view.term = yo` +
+ ${self._components.autoCompletePopup.render()} +
+
+ ${self._view.journal} + ${self._view.cli} +
+
+ ` + self._view.el = yo` +
+ ${self._view.bar} + ${self._view.term} +
+ ` + setInterval(async () => { + try { + self._view.pendingTxCount.innerHTML = await self.call('udapp', 'pendingTransactionsCount') + } catch (err) {} + }, 1000) + + function listenOnNetwork (ev) { + self.event.trigger('listenOnNetWork', [ev.currentTarget.checked]) + } + function paste (event) { + const selection = window.getSelection() + if (!selection.rangeCount) return false + event.preventDefault() + event.stopPropagation() + var clipboard = (event.clipboardData || window.clipboardData) + var text = clipboard.getData('text/plain') + text = text.replace(/[^\x20-\xFF]/gi, '') // remove non-UTF-8 characters + var temp = document.createElement('div') + temp.innerHTML = text + var textnode = document.createTextNode(temp.textContent) + selection.getRangeAt(0).insertNode(textnode) + selection.empty() + self.scroll2bottom() + placeCaretAtEnd(event.currentTarget) + } + function placeCaretAtEnd (el) { + el.focus() + var range = document.createRange() + range.selectNodeContents(el) + range.collapse(false) + var sel = window.getSelection() + sel.removeAllRanges() + sel.addRange(range) + } + function throttle (fn, wait) { + var time = Date.now() + return function debounce () { + if ((time + wait - Date.now()) < 0) { + fn.apply(this, arguments) + time = Date.now() + } + } + } + var css2 = csjs` + .anchor { + position : static; + border-top : 2px dotted blue; + height : 10px; + } + .overlay { + position : absolute; + width : 100%; + display : flex; + align-items : center; + justify-content : center; + bottom : 0; + right : 15px; + min-height : 20px; + } + .text { + z-index : 2; + color : black; + font-weight : bold; + pointer-events : none; + } + .background { + z-index : 1; + opacity : 0.8; + background-color : #a6aeba; + cursor : pointer; + } + .ul { + padding-left : 20px; + padding-bottom : 5px; + } + ` + var text = yo`
` + var background = yo`
` + var placeholder = yo`
${background}${text}
` + var inserted = false + + window.addEventListener('resize', function (event) { + self.event.trigger('resize', []) + self.event.trigger('resize', []) + }) + + function focusinput (event) { + if ( + event.altKey || + event.ctrlKey || + event.metaKey || + event.shiftKey || + event.key === 'Down' || + event.key === 'ArrowDown' || + event.key === 'Up' || + event.key === 'ArrowUp' || + event.key === 'Left' || + event.key === 'ArrowLeft' || + event.key === 'Right' || + event.key === 'ArrowRight' || + event.key === 'Esc' || + event.key === 'Escape' + ) return + + refocus() + } + + function refocus () { + self._view.input.focus() + reattach({ currentTarget: self._view.term }) + delete self.scroll2bottom + self.scroll2bottom() + } + function reattach (event) { + var el = event.currentTarget + var isBottomed = el.scrollHeight - el.scrollTop - el.clientHeight < 30 + if (isBottomed) { + if (inserted) { + text.innerText = '' + background.onclick = undefined + if (placeholder.parentElement) self._view.journal.removeChild(placeholder) + } + inserted = false + delete self.scroll2bottom + } else { + if (!inserted) self._view.journal.appendChild(placeholder) + inserted = true + check() + if (!placeholder.nextElementSibling) { + placeholder.style.display = 'none' + } else { + placeholder.style = '' + } + self.scroll2bottom = function () { + var next = placeholder.nextElementSibling + if (next) { + placeholder.style = '' + check() + var messages = 1 + while ((next = next.nextElementSibling)) messages += 1 + text.innerText = `${messages} new unread log entries` + } else { + placeholder.style.display = 'none' + } + } + } + } + function check () { + var pos1 = self._view.term.offsetHeight + self._view.term.scrollTop - (self._view.el.offsetHeight * 0.15) + var pos2 = placeholder.offsetTop + if ((pos1 - pos2) > 0) { + text.style.display = 'none' + background.style.position = 'relative' + background.style.opacity = 0.3 + background.style.right = 0 + background.style.borderBox = 'content-box' + background.style.padding = '2px' + background.style.height = (self._view.journal.offsetHeight - (placeholder.offsetTop + placeholder.offsetHeight)) + 'px' + background.onclick = undefined + background.style.cursor = 'default' + background.style.pointerEvents = 'none' + } else { + background.style = '' + text.style = '' + background.onclick = function (event) { + placeholder.scrollIntoView() + check() + } + } + } + function hover (event) { event.currentTarget.classList.toggle(css.hover) } + function minimize (event) { + event.preventDefault() + event.stopPropagation() + if (event.button === 0) { + var classList = self._view.icon.classList + classList.toggle('fa-angle-double-down') + classList.toggle('fa-angle-double-up') + self.event.trigger('resize', []) + } + } + var filtertimeout = null + function filter (event) { + if (filtertimeout) { + clearTimeout(filtertimeout) + } + filtertimeout = setTimeout(() => { + self.updateJournal({ type: 'search', value: self._view.inputSearch.value }) + self.scroll2bottom() + }, 500) + } + function clear (event) { + refocus() + self._view.journal.innerHTML = '' + } + // ----------------- resizeable ui --------------- + function mousedown (event) { + event.preventDefault() + if (event.which === 1) { + moveGhostbar(event) + document.body.appendChild(ghostbar) + document.addEventListener('mousemove', moveGhostbar) + document.addEventListener('mouseup', removeGhostbar) + document.addEventListener('keydown', cancelGhostbar) + } + } + function cancelGhostbar (event) { + if (event.keyCode === 27) { + document.body.removeChild(ghostbar) + document.removeEventListener('mousemove', moveGhostbar) + document.removeEventListener('mouseup', removeGhostbar) + document.removeEventListener('keydown', cancelGhostbar) + } + } + function moveGhostbar (event) { // @NOTE HORIZONTAL ghostbar + ghostbar.style.top = self._api.getPosition(event) + 'px' + } + function removeGhostbar (event) { + if (self._view.icon.classList.contains('fa-angle-double-up')) { + self._view.icon.classList.toggle('fa-angle-double-down') + self._view.icon.classList.toggle('fa-angle-double-up') + } + document.body.removeChild(ghostbar) + document.removeEventListener('mousemove', moveGhostbar) + document.removeEventListener('mouseup', removeGhostbar) + document.removeEventListener('keydown', cancelGhostbar) + self.event.trigger('resize', [self._api.getPosition(event)]) + } + + self._cmdHistory = [] + self._cmdIndex = -1 + self._cmdTemp = '' + + var intro = yo` +
- Welcome to Remix ${packageV.version} -

+
You can use this terminal for:
+
    +
  • Checking transactions details and start debugging.
  • +
  • Running JavaScript scripts. The following libraries are accessible: + +
  • +
  • Executing common command to interact with the Remix interface (see list of commands above). Note that these commands can also be included and run from a JavaScript script.
  • +
  • Use exports/.register(key, obj)/.remove(key)/.clear() to register and reuse object across script executions.
  • +
+
+ ` + + self._shell('remix.help()', self.commands, () => {}) + self.commands.html(intro) + + self._components.txLogger = new TxLogger(this, self.blockchain) + self._components.txLogger.event.register('debuggingRequested', async (hash) => { + // TODO should probably be in the run module + if (!await self._opts.appManager.isActive('debugger')) await self._opts.appManager.activatePlugin('debugger') + this.call('debugger', 'debug', hash) + this.call('menuicons', 'select', 'debugger') + }) + + return self._view.el + + function change (event) { + if (self._components.autoCompletePopup.handleAutoComplete( + event, + self._view.input.innerText)) return + if (self._view.input.innerText.length === 0) self._view.input.innerText += '\n' + if (event.which === 13) { + if (event.ctrlKey) { // + self._view.input.innerText += '\n' + self.putCursor2End(self._view.input) + self.scroll2bottom() + self._components.autoCompletePopup.removeAutoComplete() + } else { // + self._cmdIndex = -1 + self._cmdTemp = '' + event.preventDefault() + var script = self._view.input.innerText.trim() + self._view.input.innerText = '\n' + if (script.length) { + self._cmdHistory.unshift(script) + self.commands.script(script) + } + self._components.autoCompletePopup.removeAutoComplete() + } + } else if (event.which === 38) { // + var len = self._cmdHistory.length + if (len === 0) return event.preventDefault() + if (self._cmdHistory.length - 1 > self._cmdIndex) { + self._cmdIndex++ + } + self._view.input.innerText = self._cmdHistory[self._cmdIndex] + self.putCursor2End(self._view.input) + self.scroll2bottom() + } else if (event.which === 40) { // + if (self._cmdIndex > -1) { + self._cmdIndex-- + } + self._view.input.innerText = self._cmdIndex >= 0 ? self._cmdHistory[self._cmdIndex] : self._cmdTemp + self.putCursor2End(self._view.input) + self.scroll2bottom() + } else { + self._cmdTemp = self._view.input.innerText + } + } + } + putCursor2End (editable) { + var range = document.createRange() + range.selectNode(editable) + var child = editable + var chars + + while (child) { + if (child.lastChild) child = child.lastChild + else break + if (child.nodeType === Node.TEXT_NODE) { + chars = child.textContent.length + } else { + chars = child.innerHTML.length + } + } + + range.setEnd(child, chars) + var toStart = true + var toEnd = !toStart + range.collapse(toEnd) + + var sel = window.getSelection() + sel.removeAllRanges() + sel.addRange(range) + + editable.focus() + } + updateJournal (filterEvent) { + var self = this + var commands = self.data.activeFilters.commands + var value = filterEvent.value + if (filterEvent.type === 'select') { + commands[value] = true + if (!self._INDEX.commandsMain[value]) return + self._INDEX.commandsMain[value].forEach(item => { + item.root.steps.forEach(item => { self._JOURNAL[item.gidx] = item }) + self._JOURNAL[item.gidx] = item + }) + } else if (filterEvent.type === 'deselect') { + commands[value] = false + if (!self._INDEX.commandsMain[value]) return + self._INDEX.commandsMain[value].forEach(item => { + item.root.steps.forEach(item => { self._JOURNAL[item.gidx].hide = true }) + self._JOURNAL[item.gidx].hide = true + }) + } else if (filterEvent.type === 'search') { + if (value !== self.data.activeFilters.input) { + var query = self.data.activeFilters.input = value + var items = self._JOURNAL + for (var gidx = 0, len = items.length; gidx < len; gidx++) { + var item = items[gidx] + if (item && self.data.filterFns[item.cmd]) { + var show = query.length ? self.data.filterFns[item.cmd](item.args, query) : true + item.hide = !show + } + } + } + } + var df = document.createDocumentFragment() + self._JOURNAL.forEach(item => { + if (item && item.el && !item.hide) df.appendChild(item.el) + }) + self._view.journal.innerHTML = '' + requestAnimationFrame(function updateDOM () { + self._view.journal.appendChild(df) + }) + } + _appendItem (item) { + var self = this + var { el, gidx } = item + self._JOURNAL[gidx] = item + if (!self._jobs.length) { + requestAnimationFrame(function updateTerminal () { + self._jobs.forEach(el => self._view.journal.appendChild(el)) + self.scroll2bottom() + self._jobs = [] + }) + } + if (self.data.activeFilters.commands[item.cmd]) self._jobs.push(el) + } + scroll2bottom () { + var self = this + setTimeout(function () { + self._view.term.scrollTop = self._view.term.scrollHeight + }, 0) + } + _blocksRenderer (mode) { + if (mode === 'html') { + return function logger (args, scopedCommands, append) { + if (args.length) append(args[0]) + } + } + mode = { + log: 'text-info', + info: 'text-info', + warn: 'text-warning', + error: 'text-danger' }[mode] // defaults + + if (mode) { + return function logger (args, scopedCommands, append) { + var types = args.map(type) + var values = javascriptserialize.apply(null, args).map(function (val, idx) { + if (typeof args[idx] === 'string') val = args[idx] + if (types[idx] === 'element') val = jsbeautify.html(val) + return val + }) + append(yo`${values}`) + } + } else { + throw new Error('mode is not supported') + } + } + _scopeCommands (append) { + var self = this + var scopedCommands = {} + Object.keys(self.commands).forEach(function makeScopedCommand (cmd) { + var command = self._commands[cmd] + scopedCommands[cmd] = function _command () { + var args = [...arguments] + command(args, scopedCommands, el => append(cmd, args, blockify(el))) + } + }) + return scopedCommands + } + registerFilter (commandName, filterFn) { + this.data.filterFns[commandName] = filterFn + } + registerCommand (name, command, opts) { + var self = this + name = String(name) + if (self._commands[name]) throw new Error(`command "${name}" exists already`) + if (typeof command !== 'function') throw new Error(`invalid command: ${command}`) + self._commands[name] = command + self._INDEX.commands[name] = [] + self._INDEX.commandsMain[name] = [] + self.commands[name] = function _command () { + var args = [...arguments] + var steps = [] + var root = { steps, cmd: name } + var ITEM = { root, cmd: name } + root.gidx = self._INDEX.allMain.push(ITEM) - 1 + root.idx = self._INDEX.commandsMain[name].push(ITEM) - 1 + function append (cmd, params, el) { + var item + if (cmd) { // subcommand + item = { el, cmd, root } + } else { // command + item = ITEM + item.el = el + cmd = name + } + item.gidx = self._INDEX.all.push(item) - 1 + item.idx = self._INDEX.commands[cmd].push(item) - 1 + item.step = steps.push(item) - 1 + item.args = params + self._appendItem(item) + } + var scopedCommands = self._scopeCommands(append) + command(args, scopedCommands, el => append(null, args, blockify(el))) + } + var help = typeof command.help === 'string' ? command.help : [ + '// no help available for:', + `terminal.commands.${name}(...)` + ].join('\n') + self.commands[name].toString = _ => { return help } + self.commands[name].help = help + self.data.activeFilters.commands[name] = opts && opts.activate + if (opts.filterFn) { + self.registerFilter(name, opts.filterFn) + } + return self.commands[name] + } + async _shell (script, scopedCommands, done) { // default shell + if (script.indexOf('remix:') === 0) { + return done(null, 'This type of command has been deprecated and is not functionning anymore. Please run remix.help() to list available commands.') + } + var self = this + if (script.indexOf('remix.') === 0) { + // we keep the old feature. This will basically only be called when the command is querying the "remix" object. + // for all the other case, we use the Code Executor plugin + var context = domTerminalFeatures(self, scopedCommands, self.blockchain) + try { + var cmds = vm.createContext(Object.assign(self._jsSandboxContext, context, self._jsSandboxRegistered)) + var result = vm.runInContext(script, cmds) + self._jsSandboxContext = Object.assign(cmds, context) + return done(null, result) + } catch (error) { + return done(error.message) + } + } + try { + await this.call('scriptRunner', 'execute', script) + done() + } catch (error) { + done(error.message) + } + } +} + +function domTerminalFeatures (self, scopedCommands, blockchain) { + return { + swarmgw, + ethers, + remix: self._components.cmdInterpreter, + web3: new Web3(blockchain.web3().currentProvider), + console: { + log: function () { scopedCommands.log.apply(scopedCommands, arguments) }, + info: function () { scopedCommands.info.apply(scopedCommands, arguments) }, + warn: function () { scopedCommands.warn.apply(scopedCommands, arguments) }, + error: function () { scopedCommands.error.apply(scopedCommands, arguments) } + }, + setTimeout: (fn, time) => { + return setTimeout(() => { self._shell('(' + fn.toString() + ')()', scopedCommands, () => {}) }, time) + }, + setInterval: (fn, time) => { + return setInterval(() => { self._shell('(' + fn.toString() + ')()', scopedCommands, () => {}) }, time) + }, + clearTimeout: clearTimeout, + clearInterval: clearInterval, + exports: { + register: (key, obj) => { self._jsSandboxRegistered[key] = obj }, + remove: (key) => { delete self._jsSandboxRegistered[key] }, + clear: () => { self._jsSandboxRegistered = {} } + } + } +} + +function blockify (el) { return yo`
${el}
` } + +module.exports = Terminal diff --git a/src/app/tabs/analysis-tab.js b/src/app/tabs/analysis-tab.js new file mode 100644 index 0000000000..e1cec92d26 --- /dev/null +++ b/src/app/tabs/analysis-tab.js @@ -0,0 +1,50 @@ +var yo = require('yo-yo') +var StaticAnalysis = require('./staticanalysis/staticAnalysisView') +var EventManager = require('../../lib/events') + +import { ViewPlugin } from '@remixproject/engine' +import { EventEmitter } from 'events' +import * as packageJson from '../../../package.json' + +const profile = { + name: 'solidityStaticAnalysis', + displayName: 'Solidity static analysis', + methods: [], + events: [], + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMjA0OCIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMjA0OCAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0yMDQ4IDE1MzZ2MTI4aC0yMDQ4di0xNTM2aDEyOHYxNDA4aDE5MjB6bS0xMjgtMTI0OHY0MzVxMCAyMS0xOS41IDI5LjV0LTM1LjUtNy41bC0xMjEtMTIxLTYzMyA2MzNxLTEwIDEwLTIzIDEwdC0yMy0xMGwtMjMzLTIzMy00MTYgNDE2LTE5Mi0xOTIgNTg1LTU4NXExMC0xMCAyMy0xMHQyMyAxMGwyMzMgMjMzIDQ2NC00NjQtMTIxLTEyMXEtMTYtMTYtNy41LTM1LjV0MjkuNS0xOS41aDQzNXExNCAwIDIzIDl0OSAyM3oiLz48L3N2Zz4=', + description: 'Checks the contract code for security vulnerabilities and bad practices.', + kind: 'analysis', + location: 'sidePanel', + documentation: 'https://remix-ide.readthedocs.io/en/latest/static_analysis.html', + version: packageJson.version +} + +class AnalysisTab extends ViewPlugin { + + constructor (registry) { + super(profile) + this.event = new EventManager() + this.events = new EventEmitter() + this.registry = registry + } + + render () { + if (!this.staticanalysis) this.staticanalysis = new StaticAnalysis(this.registry, this) + this.staticanalysis.event.register('staticAnaysisWarning', (count) => { + if (count > 0) { + this.emit('statusChanged', {key: count, title: `${count} warning${count === 1 ? '' : 's'}`, type: 'warning'}) + } else if (count === 0) { + this.emit('statusChanged', {key: 'succeed', title: 'no warning', type: 'success'}) + } else { + // count ==-1 no compilation result + this.emit('statusChanged', {key: 'none'}) + } + }) + this.registry.put({api: this.staticanalysis, name: 'staticanalysis'}) + + return yo`
${this.staticanalysis.render()}
` + } + +} + +module.exports = AnalysisTab diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js new file mode 100644 index 0000000000..1efb67415d --- /dev/null +++ b/src/app/tabs/compile-tab.js @@ -0,0 +1,447 @@ +/* global */ +const EventEmitter = require('events') +const $ = require('jquery') +const yo = require('yo-yo') +const copy = require('copy-text-to-clipboard') +var QueryParams = require('../../lib/query-params') +const TreeView = require('../ui/TreeView') +const modalDialog = require('../ui/modaldialog') +const copyToClipboard = require('../ui/copy-to-clipboard') +const modalDialogCustom = require('../ui/modal-dialog-custom') +const parseContracts = require('./compileTab/contractParser') +const addTooltip = require('../ui/tooltip') +const globalRegistry = require('../../global/registry') + +var css = require('./styles/compile-tab-styles') + +const CompileTabLogic = require('./compileTab/compileTab.js') +const CompilerContainer = require('./compileTab/compilerContainer.js') + +import { ViewPlugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' +import publishToStorage from '../../publishToStorage' + +const profile = { + name: 'solidity', + displayName: 'Solidity compiler', + icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAASdAAAEnQF8NGuhAAAAB3RJTUUH4wQMDx84DVYryQAAAjBJREFUSMe1102ITmEUB/DfO4aZRuM7otQgqSlCFmIhSRaSJClWs9BY2RAba1tLZTGxmbJWImFsWBhhZONzpJSEaJhhPl6bM/V2ux/vnTtz6untPvc857z/8/E/z61pXnZjHeoFejcwUWSs1qTTFjzHOP7l2PqCAVxuxmAzcgbLsSQH8SQ+YxM6igzOa8LpMvSH4dYI43iK3nDs17AND6oiPt+Qs3qgTso4fjU8r0Z3Fcfd6E0505nYe52olyn0VAn1FaxM2W/HSETgN76l6HREet6URbwPe3LeLw5k73OK7UDZdmrBIJYWROse3hak8gluJ1+0ZhyYwlNsLyCMHjOUvFCfij+Q19vmwjFcy9D5gUdVHDdDmY8xP3HmULDUnCGGswmnL3Oc7sBxsygDUeVDaMvR68fDnKItPSROBNo+/M3QOYwtwWq9s4n6ajBWltyJqAziVQbjlZpO03IzZ8CfDpab7vmJGKP3q14E8mQR7qaAaMdJvKiS4zw5lxG5MVyoWlxZshFHI8RpazP2lgl1DRdjAmVxdR070VVAUIM4Uqa4PuFg6LSlrFVRQJ3hIG2NY1fZUH/Asxy0a+L3a07H9M20nYZjmE8mnK5omNWTWJgCYhTHZup4BAuwPjHDNyT0/iTuYbXo7XdVqvpWA/fWI7dpF4exhufvwWSVmGv66ro10HdlVPpokEkd+/FzNobEQKBY23AuuWpx4xzCxyKDrSXI4nrkPO+DrA2XmjH2H8KUd4MWwdIJAAAAAElFTkSuQmCC', + description: 'Compile solidity contracts', + kind: 'compiler', + permission: true, + location: 'sidePanel', + documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html', + version: packageJson.version, + methods: ['getCompilationResult', 'compile'] + +} + +// EditorApi: +// - events: ['compilationFinished'], +// - methods: ['getCompilationResult'] + +class CompileTab extends ViewPlugin { + + constructor (editor, config, renderer, fileProvider, fileManager) { + super(profile) + this.events = new EventEmitter() + this._view = { + el: null, + warnCompilationSlow: null, + errorContainer: null, + contractEl: null + } + this.queryParams = new QueryParams() + this.fileProvider = fileProvider + // dependencies + this.editor = editor + this.config = config + this.renderer = renderer + this.fileManager = fileManager + + this.data = { + contractsDetails: {}, + eventHandlers: {} + } + } + + onActivationInternal () { + this.compileTabLogic = new CompileTabLogic(this.queryParams, this.fileManager, this.editor, this.config, this.fileProvider) + this.compiler = this.compileTabLogic.compiler + this.compileTabLogic.init() + + this.compilerContainer = new CompilerContainer( + this.compileTabLogic, + this.editor, + this.config, + this.queryParams + ) + } + + /************ + * EVENTS + */ + + listenToEvents () { + this.data.eventHandlers.onContentChanged = () => { + this.emit('statusChanged', {key: 'edited', title: 'the content has changed, needs recompilation', type: 'info'}) + } + this.editor.event.register('contentChanged', this.data.eventHandlers.onContentChanged) + + this.data.eventHandlers.onLoadingCompiler = () => { + this.emit('statusChanged', {key: 'loading', title: 'loading compiler...', type: 'info'}) + } + this.compiler.event.register('loadingCompiler', this.data.eventHandlers.onLoadingCompiler) + + this.data.eventHandlers.onCompilerLoaded = () => { + this.emit('statusChanged', {key: 'none'}) + } + this.compiler.event.register('compilerLoaded', this.data.eventHandlers.onCompilerLoaded) + + this.data.eventHandlers.onStartingCompilation = () => { + if (this._view.errorContainer) { + this._view.errorContainer.innerHTML = '' + } + this.emit('statusChanged', {key: 'loading', title: 'compiling...', type: 'info'}) + } + this.compileTabLogic.event.on('startingCompilation', this.data.eventHandlers.onStartingCompilation) + + this.data.eventHandlers.onCurrentFileChanged = (name) => { + this.compilerContainer.currentFile = name + } + this.fileManager.events.on('currentFileChanged', this.data.eventHandlers.onCurrentFileChanged) + + this.data.eventHandlers.onNoFileSelected = () => { + this.compilerContainer.currentFile = '' + } + this.fileManager.events.on('noFileSelected', this.data.eventHandlers.onNoFileSelected) + + this.data.eventHandlers.onCompilationFinished = (success, data, source) => { + if (success) { + // forwarding the event to the appManager infra + this.emit('compilationFinished', source.target, source, 'soljson', data) + if (data.errors && data.errors.length > 0) { + this.emit('statusChanged', { + key: data.errors.length, + title: `compilation finished successful with warning${data.errors.length > 1 ? 's' : ''}`, + type: 'warning' + }) + } else this.emit('statusChanged', {key: 'succeed', title: 'compilation successful', type: 'success'}) + // Store the contracts + this.data.contractsDetails = {} + this.compiler.visitContracts((contract) => { + this.data.contractsDetails[contract.name] = parseContracts( + contract.name, + contract.object, + this.compiler.getSource(contract.file) + ) + }) + } else { + const count = (data.errors ? data.errors.filter(error => error.severity === 'error').length : 0 + data.error ? 1 : 0) + this.emit('statusChanged', {key: count, title: `compilation failed with ${count} error${count.length > 1 ? 's' : ''}`, type: 'error'}) + } + // Update contract Selection + let contractMap = {} + if (success) this.compiler.visitContracts((contract) => { contractMap[contract.name] = contract }) + let contractSelection = this.contractSelection(contractMap) + yo.update(this._view.contractSelection, contractSelection) + + if (data['error']) { + this.renderer.error( + data['error'].formattedMessage || data['error'], + this._view.errorContainer, + {type: data['error'].severity || 'error'} + ) + if (data['error'].mode === 'panic') { + return modalDialogCustom.alert(yo` +
+ The compiler returned with the following internal error:
${data['error'].formattedMessage}.
+ The compiler might be in a non-sane state, please be careful and do not use further compilation data to deploy to mainnet. + It is heavily recommended to use another browser not affected by this issue (Firefox is known to not be affected).

+ Please join remix gitter channel for more information.
`) + } + } + if (data.errors && data.errors.length) { + data.errors.forEach((err) => { + if (this.config.get('hideWarnings')) { + if (err.severity !== 'warning') { + this.renderer.error(err.formattedMessage, this._view.errorContainer, {type: err.severity}) + } + } else { + this.renderer.error(err.formattedMessage, this._view.errorContainer, {type: err.severity}) + } + }) + } + } + this.compiler.event.register('compilationFinished', this.data.eventHandlers.onCompilationFinished) + + this.data.eventHandlers.onThemeChanged = (theme) => { + const invert = theme.quality === 'dark' ? 1 : 0 + const img = document.getElementById('swarmLogo') + if (img) { + img.style.filter = `invert(${invert})` + } + } + globalRegistry.get('themeModule').api.events.on('themeChanged', this.data.eventHandlers.onThemeChanged) + + // Run the compiler instead of trying to save the website + $(window).keydown((e) => { + // ctrl+s or command+s + if ((e.metaKey || e.ctrlKey) && e.keyCode === 83) { + e.preventDefault() + this.compileTabLogic.runCompiler() + } + }) + } + + getCompilationResult () { + return this.compileTabLogic.compiler.state.lastCompilationResult + } + + // This function is used by remix-plugin + compile (fileName) { + return this.compileTabLogic.compileFile(fileName) + } + + // This function is used for passing the compiler remix-tests + getCurrentVersion () { + return this.compilerContainer.data.selectedVersion + } + + // This function is used for passing the compiler configuration to 'remix-tests' + getCurrentCompilerConfig () { + return { + currentVersion: this.compilerContainer.data.selectedVersion, + evmVersion: this.compileTabLogic.evmVersion, + optimize: this.compileTabLogic.optimize + } + } + + /********* + * SUB-COMPONENTS + */ + + /** + * Section to select the compiled contract + * @param {string[]} contractList Names of the compiled contracts + */ + contractSelection (contractMap) { + // Return the file name of a path: ex "browser/ballot.sol" -> "ballot.sol" + const getFileName = (path) => { + const part = path.split('/') + return part[part.length - 1] + } + const contractList = contractMap ? Object.keys(contractMap).map((key) => ({ + name: key, + file: getFileName(contractMap[key].file) + })) : [] + let selectEl = yo` + + ` + // define swarm logo + const swarmImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA9kAAAPZCAQAAACvvSFhAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfjCQINKw8VChrdAAAgAElEQVR42uy9d7glZZ3v+6mqtXYOvXcnuukWAUVQEBwTqChCE7sRMIAIg9AwzhhpuHc853nOPRPu85y5c++ZM2egARnjGccRFDM5SVIcBwN6lCw2KNBh5xX2SlV1/6iqtfbu3t07rVBvre/nDx8Ddu9d4f28v/f31ve1EEIIkTQcPHzgLC7jjRSZxsKu/q8+g/TgYYX/2QX6sbmf7TwEOOF/J2KGpUsghBCJwgY84G1cxonYZEIJs19lA1SwWUGW73MdTwAOPp4uppQthBCiUbq2cIHDuIwz6SdDhdQ+/9RcygafCp30s5OvcSO7gRSetC1lCyGEqP947lABhvkI57OWHCWcOUf5uZUN4OHRTQ9PcyP/RgFIU8HXxZWyhRBC1IsUFSDNuVzC65imMKt7vVBlQ9DF7qWDR7mO22dU7kLKFkIIsUyizWYncRlvwyWLvV9dz6/sSNsrKHEX23lM2payhRBC1EPXwTaxN3A5J9PFFN4c3evFKjvobHcwwBi3cD070IY0KVsIIcSSsbGpAOu4hPNYQY7yfrrXi1c2BJ3tLnp5gS/xFSZRZ1vKFkIIsYTRO9hs1suHuIhXk6U4z3L44pUdabuXbn7BDdyCR9Q1F1K2EEKIBYzcdthZ3sylvJESuQXrerHKBnDxGQQeYDsPos62lC2EEGJBRJvN3srlvBNnjqiUeisboILDIFl+wLU8iRLSpGwhhBAHJOpeH8ZlnEUvWSoL6l4vX9ng49JBP7v4Kp9nF+psS9lCCCH2M17PjEpZR4byAb69rr+yIYpa6eWpatRKClfalrKFEELUxuqge53i/fwpr2Oa6UV1r+ulbAg62/2k+AnXc1v4s3nStpQthBBiZlTKVt6CT5bFdq/rqWwIDhEZpMg9XMPP0IY0KVsIIUR1m9cbuJxT6CCLO29USuOVHXS20/Qzwc18jh3oEBEpWwgh2nqEDrrX6/lTzmOYDBXsOozb9VA2BJ3tTgb4fTVqRZ1tKVsIIdpwdA661z18mA9zKFmKS9gb3lhlB9p26aOLX3IjN+NTW8YXUrYQQrQBzoyolGMoLzIqpZnKhmDhfgCfh7iGh5gZ9SKkbCGESLSug+M33sIVvAuLHP6yNps1XtlBZztFP3m+x3aeRJ1tKVsIMe8bbWmYNJpaVMqlbKaPKby6dK8brexI22kG2cm/8EV2os62lC2EOEB15uFjg7Rt6HgcLCcPcxEfZD0ZSnXrXjdD2RB0tnvo5Um+wFcpos62lC2EmKM6C76LTVNWdWOwroOolCMokq9r97pZyoYoasXhp2zndkBnf9VxVi6EMH+4T4dnLf2f/F+4/DYc/FVrmzMSB93r9/C3fIQVZKiQamhJ1UUav0F/g41NgTKHcTbH8CKv4OFgaxKpKlsIEVQwDhfyGY6jRJGH2M4DKJHKDKK7dDSXcSppMvgN6F43s8qO/g6XFIOMczM38nu0IU3KFkLVGR6wiW2cDExRwmcFOX7Adn47458Qcdb1ei7hHFYytaRzueKp7ODvqdDFAM/zv/giU6izLWUL0ba6JqzOruZcepmkQpoKJVw66WcX/8bn2KXqJrajbxSVcgEf4RDyTDd4Mbz5yoYoaqWTX3ED38RDOy2kbCHarjpzKAPr+ASXsnbG3uIyFazwiMQenuGf+RrT6GTjuBFtyDqLyziGMnmaubeomcoGcLHoAx7kWh6i9imbkLKFSPxbG+RO9/BRPsFRZGcdwxgom7AC76WDf2d79YhEdbbjQLQ+8la28m4ssk3oXrdW2UFn22GQPN/hep5Aaz9SthBt8MZGJxOfx5WcQJkM1qzqrKbsSNuDlLmb7fwH2pDWeqI7cBiXcSb9TOE2pXvdamVH2k4zyCt8jX9mF9ppIWULkejqLBjgjudqzqCDSbx9jmGcrezgv0kzyDi3cB07NEzGQNdDXMwHWUeWYtO613FQNgSd7V66eZrPh1Er6mxL2UIkcLiPgiyv5MOsIENpzuF+X2VHRyT28SJf5stMoM52Kwi612nO5aO8lgIFrIZFpcRX2RC1bFL8lGu5g1qrR0jZQiTiPQ2GtGGu4GO8mimK+03GmkvZkbZ76OFxrueWMGpFw2SziFY2TuIy3k6FHK0NsmqtssHHw2KACndyLT+j1t8XUrYQRr+jwaYxm4v4NG9imizOAaqz/Sk7qG58BrB4kOv4IepsN4co8/1otnIKnUw1fbNZ/JQd/AxB1MoY3+QGtWykbCHMJ+rzbeIqTsIKwygOxIGUDVDBYZAct3INT6i6abiug0nROj7KOQyT3U87ox2VHfwcFbrpYwdfCaNW1NmWsoUwEgeLCnA0V/F+uhe4t3g+ZQfVTQd97OZf+Xx4RKI+t2nE6Bq0M3r5EBfxKqYpNPCgDzOVDcHaTy+d/IrruSWMWlHLRsoWwqg3M0UZWM/HuYy1TFJe4KdA8ysbgs52F308XY1aUXVT7wlX8DHeWVzGGyky3cLNZvFWNuFyeD82P2Q7D6K1HylbCOOqsy628he8niz5A3avl6LsSNv9pPgp13ErM7/5Fssj6l6/ja28C5sMcTs1MV7KDqhgs4Is3+e6sGWjzraULUTMiRYFz+Uq3k5ln6iU+ik7GiYHKHMP1ypqpU66jqJStnIG/eExmnEjjsoOOtud9LOzGrWilo2ULURsiZYD387VnEWKqTmiUuqr7CiRqp9JvsENOiJxmeNp9DHeRzifteSqye9S9kKppePfyNcooAwBKVuIWFZnQVTK4Xyaj7CCySUew7hYZUfDZCcD7ODLfIVx1NleCrWolEt4HdMtjUoxV9lQS8f/Cdu5Ha39SNlCxLI6G+JjXMGhTFFY8qdAS1F2oG2XPrp4nBu5GQ+dbLwYomv1Xi7lbbhkY7M33ERlR9peQYm72M5j0raULUS8dG1zEZ/hWArzRKU0StnRMDmAz8NcywPo7K+F6jrYJvUGLudkupbUzpCy5/oZK3QwwBi3cL2iVqRsIVpP1Dc+hat5Lz7ZZQ/3y1F2dETiAHl+wLXhEYm+tL1fonbGev6U81hBbsEf40nZCyH4GLGXF/gSX2GStu9sS9lCtHq4P4Yr+SDdTNblGMblKTvSdppBdvFVvsArqLO9v9Eziko5n4/warKUYty9NlPZkbZ76OGXilqRsoVora7X8UkuYR2TdQuyXL6yg2HSpYdenuILfJUC6mzvPXJGLYPNXMobKZGLeffaXGVDkJA2CDwQRq20bWdbyhaiVdVZF1v5OEeSJ7es7nUjlB0Nk/04PMZ2bgUUJBkRTV/eyuW8k9QCkt+l7OUTpONn+QHb2zcdX8oWorlE2juHq3k75bofw1g/ZQfDpE0/Fe7mWh5DQZIzo1Iu4yx6yS7xYzwpeyk/tUsH/eziq3yeXbRhZ1vKFqKZ1VkgvOPZxhachhzDWF9l145InFDUyl5RKevIUDame50EZUMUtdLLU/xzGLXSVjstpGwhmludHc5n+DDDjNdls1njlR0M8BW66GcH/4svMUE7draj7nWKD3Axr2OaaaO610lRdqTtflL8O9dxG22Vji9lC9EMXQebzVbw51zBq8ky3bBTkxuh7GCYdOmjk19zA98I9+22T3XjhO2Ak9jKW/DJYlr3OknKhqBlM0iRe7iGn9E2G9KkbCEaTZoy4HAhV3IsBXKLPOgjHsqOhsk+LB4Ko1aiqUjSdR20M97A5ZxCB1nc2EelLETZvbhGGyBKxw9aNjtoi5aNlC1EM4b7TWzjFLwmHMPYSGUHJxvbDJLne1zHbxM/TEbd6yAqZZgMlbrvPlCVvXRq6fhfDKNWEr72I2UL0Siipbpj2MZ59DKB14S9xY1Vdq26GWQn/8aN7CSpQZJR97qXC/gwh5KlaODe8GQrO9B2kI7/S27kZnwSvdNCyhaiMbqOolI+xSUcxBTFhnWvm63saJjsoYdn+HwYtZK06sapRqVcxtGUDYtKaSdlQy0d/yGu5UESnI4vZQtR/7cqRRno5lI+yRHkm7q3uDnKjobJXtL8B9dyG5CcqJVo1eCtXM67sMjhG73ZLPnKjj5G7A9bNolNx5eyhagvUbV5Ltt4B8W6R6XER9lBZ9tiAJc72c5/kISolah7fTgfZQu9TOElonuddGVD0NkOWjZf5QvsJIGdbSlbiPpXZyewjbNIh18wN5dmKrtW3Qwyzi1cz+8xu7Nt4QPDXMQHWU+GUmK61+2g7EDbQTr+k3yBr1Ks3lMpWwgxg1qQ5TYuYIhJyk3qXrdW2YEAgqiVF/hKGLVi5j5yC58hzuJDHEmJfKK61+2ibKil4/+U67gTN0nSdhBCLH+oT+PiM8Rn+CdOwSUDLRF2sDhoNf33d6iQZ4hT2ESeJ3HxSRknbQs4mb/iMMaYpiPRJU0XafyE/oY2NgXKHM65ZPkPbClbCBERVJQOF3EdF9HBFF6LdN0qZUfDZIkCB3M2b2U3O/CwDRwsn+UhUryWQQp4ia2yk61sH4sUHrsp8gIPJOlXk7KFWN4bFCyHn8o1fIY1jFMh1dKB3mvhcqeNRYESr+dsXsvv2Y2PY9yy5Aj38QSrOJwURfyEajupyvbD5zDPBFkcfsUjSfotpWwhlv722Lj4HM3f8185kgzTLdZ1q5VNeK5VDoe3cDYreYoMPqlwKDWDFB4vcjsvcQgbgDJJ3PWTRGVHui4ywSQVoIcneFjKFqLdsUlRwWcd/4l/4B0UyWLH4n3yWr6pyMLBJU8v7+Z0fJ6khE/aGGl74W/wJHeS53DW4FJK3IdeSVO2H04YK0wyTimcPHbyWylbiPbGIoWLRw9XcC3nYTEVLgDHQzhx2AdsYVNmmtWcybuY5JlQhKZo28fGZprHeJAUh7OCIi5Wggb/ZCnbD6dZWcaYDmttH58uKVuI9tZ19NXxeWznzxhgvCnJ4aYpO1iJsClS4HC28EZe5o+hCM3Qth/+tOM8yC8Y5DV0UcJLjLaTo2y/2o4ZJ4tfXQ+xpGwh2hsH8IDj+Uf+kkOYbFpyuInKjrSdw+dYzmYDzzJu1IY0P/xU7RXu4HcczCE4lBKyIS0Zyo661wXG5zhlTcoWom2xcXDxOYy/4e84lmlyMelex1nZwSjjkaeDE9hMF08ybVxnO4XH77idcV7NQfiUMH9DmvnKjnRdZoJJymGtPfuf6JayhWg/gqgUj2E+zT9xGmWyENMoSy+GmVbBuUp5VnAaJ1PgSSpgUNSKF351/ivuw+U1rAwz5kxWgenK9sMAnynGKWDNuT1QVbYQbahrBw8Pm4vZzkV0Vhd346qXeMZQWtiUyLOBzbyNPfzeqKiVqLOd4VEepZsj6DO8s22ysoPutU+WcfJhrT33PydlC9FWpMLNZpvYzqerUSlxHgK8GCdHB7uwKxzF2RxRjVoxSdsOsId7+Q2rOZQ0ZWMT0kxVth9W1NOMk5nnlDVfH3kJ0T444TGMR/P3/BVHkGEaJ/YDtBfzwx5sII/Dn/A+hnjasKiVKArzRW7jFV7FBqzwtCgpuxlXf3ZUynzfyquXLUSbYJGmgsd6Psv/4B1Mk8My4iBGL/bnM0Wd7R7ey2nVqJWUgVErd5HnUA6iQtm4JXLzlB11r2dGpcz3/9DCuBBtoOvgoI9uPsY1nAdMgjHnJntGHKkY5FTlWMsZnMgUT4ciNEcfNg55HuMhbI5gkKJhnW2zlB1FpWRmRKUs5P8lZQuRcKKTns/lei5nkHHcmHevTVR2pO0CJQ5jC8fyR14yLGoliNAZ5yF+xgoOD6NWTOlsm6Ps2VEp3iKiY9XLFiLRBAd9BFEpn2UjUxRjcNBHUpUNQWd7GjiGczg4jFoxqbPt4+DzCnfwe9bzKlIUMKOzbYayDxyVoipbiLYliko5nL/m7ziOHPlYRqUkS9lBrR1ErbyDs+jiKfJGdbb9MMT2uTBqZT0eJQOWyOOv7OigjxITTFBewsEsUrYQiSQ66GOIK/lHTqfMFLYx3WuzlR1p2yXLEJs4mSK/xTVqdAr2kQdRK2Vea0TUStyVHXWva1EpS/kztGNciATqOopKuY4L6QoXZ019zU1UdnAfHEpMs5EzOZ49/L5av5py3WtRKz28hl5KsT77K87KjqJScowdMCpl/j9HvWwhEkUKcIFT2M6nWc0UJdJGv+KmKhtqUStHcjavNTpq5bes4VA6KMb2EJG4KjvoXhN2r71lnVOuhXEhEoSNQwWfY/h/+BteR4aCkd3r5CgboqgVm7dyNkM8w5SRne0XuZWdbGQDxPQQkTgqe7FRKfP/eVoYFyIxunbxWM9/4v/jXUyTNbZ7nSxlRxvSsvRyEqdi81tKmNfZdnmCu8hxOGupUI6dtuOm7GCz2eKiUlRlC9EGRJvNgqiUc7GZBIO710lTNuHgXSbPWk7jPUzwDD6mnf3lkOdnPIDDaxmI3Ya0eCk76l4vLipl/j9VvWwhDCeKSjmH67mcASZjf9BHOyo7WAkJolYO5ewwasUzqrPt4QATPMjPGOIweijGKGolPsqOolLyjJHDr5Ougz9ZC+NCGP28R1Ep/4P/zEamKGEbehJT8pUdaBum8TmW97Ge3zFm3CEiQdTK7fyedRyCE5tDROKh7JlRKVO4ddR18KdrYVwIg2u2ICrlb/hv/AkZprHrPERI2fUn+tyng3dyJj08aWDUSgqP57iDUQ7lYNxYdLZbr+yoe11mgsklRaVI2UIkVNdBstkQ2/hHTqVicFRKuyk70rZLlmFOYROFMGrFpNx3ixRFfsW9lDmCYSot72y3Wtl+uM1wknGK0JC1LilbCANJ4+LhcBHXcyFdTOIlqnudfGUT1mNFihzMWRzPbl4w7OjI4BCRLI/yKL0cTj8l3BY2ZVqp7HpFpcz/92j7mRCGPeE2FWAT13Alq5ikbNxBH1J2RBCxUeH1vJ8Jfm7MVrRIIFHUyj08ySoOpYNCy6JWWqXsekaltGGVndKYLhKLjYULHMNVnEsvE2GlI0zFx6IDlx10cwgYJeyAIDvd5WEe5X18lKOYXnKCton3L9B1kQz5pkxWEve2S9kiqboOqut1fIpLOIgpRknpeU/AcD/NFHk8csb+Jm4YGfIdfsiFXMA68hQT9+XCXPfPwqZMhixe20xTpGwh5p1Zpyjj0c2lfJIjyDOCTVoXxnhdl8iQxwPDp19+GMY5wee4g62cxRAZKgkej4PudYUMGSrStZQtRO2ZDj6iOZdtvIMiY3rOEzHcl8mSpYKNjYdv4KL4bLxwGvICf80P2Mq76WWKJO4vijabZclQlK6lbCEiHHwqwAls4yzSjKEtluYP98GpyRnKWOHd9BPy23mAg8fP+TmncxlvokQ+UVKrbTabaslWOz9pL4SULZJCtNnsMLZxAUNMkknwp1ztU1375MhQoPblrp+ou+pikaLC3TzMB7mYVzNNIRGd7b3bGa2ILdL2MyFiSNC9hiH+jI/xKrKMqnudiOG+yBTTe1VnVsJqp6izPc2/cg+XcB4ryVIyfMJZ615ncVu2cqAqW4gYPsUVyjhcyJUcR55RbD3ZhuvawqZElmyLqrNmE3W2d/HfuY2tbGKIKWN/96idkWGKsrrXUrYQEVH3+lS28V5gBEtPteHCru0tLif+06e9te3g8yR/yYlcxgm45DBtN0a0PrJ3O6M1aGFciBjpOoimOJr/g3PoZRJXT3QCdO2TZYpSdbNZO+ESrBo9wk94H5fyOgoGRa00PypFVbYQRmDjUAbW8wk+yloyjOHoeTZa163dWxwfKuE6w3e4n4s4n/XkKMS+s62oFClbiDkJsqM8evgon+RIMupeJ0LXFkUy5PDbont94OsRnBw9yQ3cwaVsZpgpKjGO241rVIq2nwnRYl3beFSA87iSEyizR7o2Xte1qJSF7S322+C6eOE0Zgd/w61s5T3YMd2Mp6gUKVuIOXHwcYHjuZoz6GAcX8+w4cK2sPCqUSkLG+7bpQYPolkrYdTKVo6lTJ44bUhTO0PKFmJOooM+DuNKLmSQDFlFpRhfX9v45GOxtziuVMJG0N08zIe4KEZRK3GISpGyhYgh0UEfw1zBx3g1U4wpKiUBup47KkXsfa2iqJWvcjeXcB6ryFBucWd73+T3eI4cUrYQTX7pbFzK2FzMp3gT0+zW3nDjJRREpWTIaW/xgog620HUymWcTi+ZcJNaq+6ft1fyu5CyhZ5QXFxgE1dzEkFUiqpr03Xt6BjGJWrbweNJPssPuJy345HHa7Iw1c6QsoWYEweLCnA0V3Me3UwpKiUR1XUtKkXD/WKJDhH5ET/hXC7hSIrkm7YsragUKVuIOYkO+ljPx7mMtUwyro+5DNd1bW/xtKqzZVzHStgs+jb3cREfYgMZSk3obPsGRqXou2whmqBrhwplutnKX3AUWfaoe50AXVthdeZJ18u+ni42dhi18lHOZqjBne3ooI9JtTOkbCFmP5OVMCplG2+nwh51r43XtYWF2+JjGJOGh4eDzw7+llu5nHfjkG1IZ3t2O8Os9RHtGBeigThAhSAq5UxSTOLpGTVc2MEibnZRUSliYbiAg8sv+AWns5U34pKta2fb9KgULYwL0SCiqJTD+QwXsoJJKloON76+tvFjcgxjcrUdTIru5mHO50IOI0+hLp3tmVEpSn6XsoWoEh30McSfczmHMsUIKT2dxutaUSnNudYuFg7T/At3czEfYCWZMH5lOX9qdNCH2hlSthB76bqCzUV8hmMpsBtH3WvDdW1hUVZUShOveaDonfwDt7GV0+ghu+Szv6KolAxThrcz1MsWos5PYHAuVxCV4jOGL10bLo+gOstpb3GTiaJWnuKz3MpW3gZkWewhIlE7Y5optTOkbCFqRN3rY9jGB+hmEjfGJwKLhQ/3ikppFW74MdYjPLqEqBVFpUjZQhxA1x7r+SSXsI4JRtW9ToCumxOV4utyH+DauGGz6dvcz4VcwMFkKM2r7dq55SZFpbTdk6IhUjSfaLNZN1v5OK8jp+51QnRdalJUilZi5rsfwdlaE3yOO7iUs1kxT2fbr347n6x2hnrZQiz7mQuiUs7lKt5OmVGQrg0XRO0YRu0tjgtB1IrHC/wtt3IFJ9JLZs6olSgqJZfAdoaqbCGWQRSVcgLb2IzDpL72TICuHVymFrT4KppL1Nn+BZ/gDC7lOMrkZt0lJb9L2ULMiY2FCxzOlVzAMOO4OBoiDK9gZkal6NTkON6jqLN9Fw/zAS7mMHIUqtPkpCe/a2FciCXpOtgbPsSfcwWHkGGPNpslQNeKSjHjXlWwcMjzr9zDn/IBhsmEG8yU/C5lC7EXacp4OFzIlRxLgREd9GG8rhWVYp62HXx28Q/cxuWcQi9eGyS/q5ctxKJwgDKwias4GY8xPXXGD4KKSjGT4BARj6f4S07kP/NqJsLJV3LRwrgQCybqXr+RbZxHDxN4ikoxXtcOnqJSjNZ2igqPcAgfoZMBXDyS+9mcqmwhFqjroHu9jk9xCQcxpaiUBAx+NoRBlupem0sFCx+HPRRYyyo6cMNmh5CyRRtikaKMRw+X8gmOIM8ItrrXCdB1FJWi+trs99OvvqUvM8EaVuDg4SdQ2loYF2LeZ8qlDJzLNt5BUd3rBAhbUSlJvKs+Ng55djDAGgawcVVrS9minXDww6iUqziTNGPoa13zdR1FpZSl64TVn374fk6SZYjV9OElrLOtXrYQ+yHabHYYV3E+Q0ySIaU5u/HVdS0qRbpOorYDD/iMMMVKVtGVKG1rYVyIOV+MFGVgmD/jz3gVWUbVvTa+OlFUSnu9wRVeYYLVDJPGTWRnW8oWguCjkTIOH+EzHEeeUWw9WYbr2sKmFEalKAW+PbCxKfIHxlnDIE4iOttaGBdiFlH3+lS28V5gBEtPleGDXBCVMkWWsg76aDttQ5Ycg6yhH4zXthbGhZih6+CVPoarOYdeJnH1RCVA1z4ZMpSwtHWwbafh42QYZg3dhne2VWULEc7GHcrAej7Bpawho6gU43WtYxhFNHFL4bObSVYZHrWiKluI8DA/jx4+yic5kow2myVC18ExjDltNmv79zv41xRlXmKC1QyRoqINaVK2MPF1tvGoAOdxJSdQZo82mxmva0WliLmwscnzAuOsYSD8iNMy7umWskXb4uDjAidwNafTwTi+niHDhW1h4SkqRez3nYcpsqxgLT34hnW2tTAu2nrGXQEO50o+zCAZsopKMb6+tvHJKypFHHBS5+AzyhSrEhe1ImWLRBId9DHMFXyMVzPFmLrXCdC1olLEwupUixSeolakbGHCK2vjUsbmYj7Fm5hmN46eHOMrJ0WliMVP3KOolRWGHCKiXrZou0mdiwucylWcRBCVouradF07YVRKRd1rsShMi1pRL1u0EQ5QAY7hKs6jmylcHFVkxlfXPlmmKEnXYonjgs9EQqJWpGyREKKDPoKolLVMMq6PuQzXdXKiUnzdzhaPDo4hUStaGBdt8kJWKNPNVv6Co8iwR93rBOg6iErJ4xlfXaumi8uk/qVwQ1oqphvStDAuEk+KShiVso23U2GPutfG6zo46COjqBRRV4KolRfDqJU4bkhTlS0STdS9Pp6rOROHSTw9I4YLO9jxr6gU0agxw2eKLEOsiWHUiqpskegZcxCV8hk+wiCTVLQcbnx9beOTU1SKaKgWHXxGws62olakbNGUl66CxxB/zuUcyhQjOpcrAbpWVIpo1giSwt0rakXalrJFw3RdweZiPs2xFNiNo+614cK2sCiHUSlaDhfNwMamMCNqxYvBhjT1skXihB10rzdxNSfhM4YvXRuPQ4UcGUWliCZPFB3MilqRsoVhwvaBo7mKD9DNpKJSEjIJS3ZUiq/vsmP75AUTRp9xMgyzmh51tqVsUU9hd/BZPskqJsire52IOqfIaMI3m1kSQOzvUMqQqBXj0KJZu8+K1/J+UuzSt9eJkVmOHLbebBEDbZd5mefYAzjhil6rKn9V2SIx7KREJ6voxtISlibiQtT1SczzQgujVrT9TJg3DJoAACAASURBVCQMnxRpMhQYYIjO2EUhCCFMxoEWRq2oyhYJwwpfK59xsqxgkDSeOk/G31Eh4qRtnxGmWNn0qBVV2SJxVXawA9fGocIeMgzRjxOLbyqFEEmZSKao7BW1ovFlCajrpVep9q82DkV28hLZMIRQH9MIIepTHNikKPIHfsdYWHlrfFGVLeowicsxTT9DdKuzLYSoY3Fg09yoFfWyRWJfphoOPpPkGGQFHepsCyHqSDOjVtTLFgnDn/OxtnDwGCXDEIPqbBt3R4WId5GQxlPUylJQL1svz/7/F4cyu/kDU6jzJISoH141auVZRvBJtShqRVW2SNyUrsDL9DFED6izbfQkTIh4PaU2MM0OBhoWtaJetmhLbWfIK2pFCFF3HGCSLEOspk+HiEjZoj6vlaJWhBCN8lAQtTLM6jpHrWj7mUgYC32kLUWtCCEaRBC1sotJRa0cGG0/06uy8PmsolaEEI2zkTMjaiWl8UVVtpi7yvYX9VopaiX+d1QIc4vIZkatSNmiDYiiVgYYUtSKEKLu40sQtbKGbm1Ik7LF8gmiVsbIMsQAKXW2Y1JfL6bNIUR8n+MUvqJW5kK9bMl3Odous4s/KmolVvdSd0Ek4TkOolZe4jn24JPSk60qW9RnyjcdRq30qrMthKjr+GKT5wXGWcMAljrbUrZYPg6+olZiV6MIkZTxBabIsoK19Cx6fFH6mRBzvBaKWhFCNLIsGGWKVayqc9SKlC3aWNuKWokD6viJJI4vKTxeYWKRUSuJexu0/UwDfP3mq7WolYyiVoQQddd2IYxaadvxRVW2qO9MVFErQohG4bC4qBX1skXiZq6NeK2CqJVBVihqJRF3VIg4adtnggzDrG6/skDKVoXdGG04eIySUdSKEKIB48vColbUyxaqyRbxWgVRK5MoakUIUd/xpRa1AimsOccXLYwLscgpYYGdZBiiB9TZFkLUcXyxyfNiGLVit0PUipQtGv9aKWpFCNEYHPxlRK1I2ULsw1xRK5K2EKJ+48vcUSuJa8ZJ2e2O38TXylXUSoLuqBBx0nYKd6+olUSi7Wd61Js7Gw6iVrJY2NqQJlkLUUebpSjyB55jjOAL7gSiKlvDfPMniYpaEZqciPo/FVY4vvy+GrWSuGdFylaV3XwUtdLIe2npqRVtPZYFO2cyDDPMQNJWkqVs0ZqXK4haybKiGrWigVgVqBD1GV/SuOxknO6k/WpStmiVKi0cSuxmimH6cBZ8No9QBSrEgalgM0CZm7hNyhaqy+pFELXyMn2KWlGVLURd8PDpxuZ33MljsJ9cNClbaIBfsrYVtSKEqMd45tFBFy9xPw9SAmw8VdkiOcRDjvtGrUjbZt9RIVqha4cBJriHexkHnDBWRcoWqrLrLhqHiqJWhBBL1LVNLyUe4Q7+QLB65ybvF5WyVZPFBxsospMphultj5B/IcSy8YAe4Alu5zeAhZW06lrKFvGqsmdqW1ErQoiF19eddPACd/MjfIKDiLyk/rpStqrs+KGoFSHEwnSdoo89/JAHyJLI7rWULeJcZUcTiSBqJcNQNWpF0jb5jgpRf1079JHnHu5mV6hrN+m/tpStKju+P5lDeVbUimpts++oEPXCxaIXl59zB88SdK/ddvjFpWwRZxS1IoSYTRCV4vAsd/FYOE547bK6JGULE7StqBUhRKDrDrp4mXt5mCJt0L2WsoV5KGpFiHYn2GzWzeSsqBS3vS6ClC3MQFErCx/YhEgeLjZ9FPlRsqNSpGyRHBS1srDJjRDJwsOnB/gNd/K/SXRUipQtkqdtRa0I0U66jqJSfowH4UG9bYqULcwjiloZYEhRK0IkFh+PNF2Mcj8/JEdbdq+lbGE+QdTKGFlFrQiRWF079JHjPu5kN23bvZayRXK0XWaXolaESBwe7BOV4umySNnCbBS1Mld1ot9RmK1rny5S1aiUQNe651K2SIy2FbVSw9LvKIzWdQedvMK9PESJNt9sJmWLZKKoFSFMpxaVci93M0FwjKarCyNliyTWXQ6uolaEMFbXVhiVcicvEqyeqXstZYuEazuIWhmiT1ErQhiCB3RjV6NSpGspW7QJiloRwixd+3SS5kXu4tFqVIqQskXbEEWtDLKiDaNWtFVHmPOsunTQxQgPcL+iUqRs0a4DfBC1MkpGUSuJfWZ1P02/ix42A2S5j7vYhTabSdliQXJL7m+mqJUkP7cehPsVhHm69oFePB7jTp5F3WspWwiiqJVX6G2jqJXkT0ssvPBbXZcUnoZ6w/CATlI8y538DFD3WsoWi5jvJl/bvqJWEoULdHM+L3ITFSBFRRfFmPHG2ycqRd1rKVuoJpv1OypqJTkVmk8faxgEruFDXMt9VLCxNOwboWuHfia4l3sYR91rKVuoyj6AtittEbWS3Dvq4dHNaoZJ4ZEjz3t4K7dxHb8i+E5AS+TxfSp9LPoo8Qh3hVEpul9SthAHwIYZUStWQpfIkzoRcelgJavoxKWChYPFKB1cwMl8nc/xsrQd48kWdGHxG+7gN+hcLilbiEVoW1ErZk1BfFwcVrGGbnwq4ZAPFmlcRunlSrbweb5KDkhT0bfpsdJ1cC7Xi9zNj6tRKbpDUrZQTbZA2jtqxTQqWAywhgGofqhXa2rY2BQosIH/lw9wHd+jjKUNaTEhOOijhz3VqBR1r6VsIZYwUQmiVrKsqEatSNvxrNB6WMMKnLC6nnsKBjlyvJkvcgHbeVQb0mKia4d+ctzD3ewi2Buu5XApWyzzxWpnbZfYzZTO/orpk+nSyWqG6cDdS9jWnNoeJ81m3sl3uI7nUGe7lbjY9ODxGHfwHEFDSlMoKVvUQVztTBS1kmGInsRuSDPvmfTwSLGS1XTjHaC+nk0aj1E62crpfIUvMgak1DdtOh4+3dg8p6gUKVuoym6EtoOolRV0JWBDmvl3tILNEKvpq2422/d3tPZzL23KjDLMf+VcbuAblFHUSnOfPpdOuniJ+3mQEupeS9lCVXbdUdRKnCq0ICrFWmIqvI3NNHlex3Y+xHXcq85203Tt4TDIBPdwL+Ooey1lC9GwqUtSolbMnWoEnwMFUSku3gF+k/l+RweYwuYk3sbtXMuvQdpuuK5teinxMHfyB9S9lrKFaDC1qJVhesNTolRrN2ea4e0VlbL8K5/CZ4wOPsR7+Tdu5GXQISINwsWiB58nuF1RKVK2EM3VttlRKyb2sis4rGI1vYvYbLaQiUCKCmP0cBVnV6NWtCGt/vV1Jx3s4B5+hI+iSKVs0fAaR8zE7KgV0+6mi8Ugq+nHqqOua1MwmxIjbODveT838N0w7NSTtuuk6xR97OGHPEAWda+lbKG6rCXaC6JWMgxVo1Y0sak/C4tKqYe2s1i8hc9zAdfwE1zssPEhlqNrhz7ys6JSdE2lbCFapu0yu5limD5FrTRkyO9kFStJ1XU5fH8jnc8EKc7gnXyL63kOdbaXg4tFLy4/53aeI+heS9dStlCF3VKCqJWX6TMoasU34qlzSbOKVXSHlZm1yP//4u+CRQqPcTq4gjP4Ml9mFHW2l0IQleLwLHfxWPieqNEgZQsRG21nyNPPUCKiVuJRoQ0fMCplfv0u9V7aVBhhmL/iXG7kJiqgzvYidd1BFy9xHw9RQt1rKVs0FclnITj4TJAzImol3nd0+VEpy5+CBVErR3IN53Mt9+JiKVJzQWsbHim6mJoVlaLrJmULEUMRJiVqpbW6DqJSosqsVVcwiFpxeBdvCaNWXBwU/XEgXGz6KPJj7lBUipQtRPypRa0M0aeolUVNeGZHpcThygUb0tKcz8l8jX/mJSBNRUvk+5ls9QC/4U7+N4pKkbJFy9AAtXhtxztqJY53tBxGpfQsuXu99+9Yj2tukcJllG6uYgtf5F/Ioc72XLoOolLu5lE8tNlMyhYtrX/EYomiVgYYMjBqpdkEUSlr6K9j97p+V9vGpkiBjfwdH+A6vouL9pHXpkYeaboY4Yf8sDqhUX0tZQtp27Ar5uAxRjaGUStxupu1qBQb74AHfbSiyq5NwSCLzZv4POdzLT+hoqiValRKjvu4k92oey1li9i8nGJp2i6zqxq1os723k+VSxcrWUU6Jt3rA4+EPpOkOIsT+SY3tH3UigdhVModPIu611K2EAlgdtQK+mZ7hq5rUSn1TzZrxDW2qmd/fYwz+Be+wBjtuUQe7OxP8Sx38rOqrjWxl7KFSIi2g6iVYToVtUIUlbKGXmhQEGmj2hDB2V+7WcV/4Rxu5OtU2kzbQVRKJ69wDw+HUSnq60vZQiQKk6JWGj/ktzYqZflTMJs8eY7gn/gQ13AflVDlSSeISulmknu4hwmCYzTVvZayRaxeU1Gf+qzdo1YsXDy6Wc0wKdyGrjY0+so6+GSxOZG38QO282sqie9su1j0UeRHM6JS1L2WskXsBlp1X+tXn7Vv1IpPZUZUSqPP5Wr8dMjCwWecNB/mZL7OjbxE8jakRRN2D+jB4jfcwW+kaylbqNJuJ23HO2qlEc+Ph8Mq1tBdp6iUuExnU7jsoZcr2cyX+Ap5ktXZtkI1d5DmRe4Ko1KUty5lC9FGRFErg6xog6gVF4uBOkelLEQ1zZqC2RQosJH/xvvZzvfCDWlJ6Gxb4c7+LkZ4gPurUSkStpQtRFsRRK2Mkolh1Eo9CaJSVjMURqUkc2ri4JPD4k18iQvCqBXzDxEJNpb1k+U+7mIX2mwmZQtjBCMao+0gaiXYkJa0znYQlbKKYTqaHpXS7AmQFa6cOGzmnXybG3g2VLnJHd8eSjzGnTyLutcGzR9FO0vFZ5Bz6MaVtht0hW3KZCni0IHVhCVyixzT2A1XpofDajYwVF0Ot5p6XS0qlJv8d9pAlg5O4Cz6eJI8PinM2wsSXLW3YfMlvs8YOgpFyhZStpgxQBbJUqGDdMO13Qxlu1isYAOrwpgNqwVPT/OVHVXbFfIM8l5OpciTVPBJGVmfTnAXL4QOUH0tZQspW8yoz3ymyeLREdZljftiubHKdvHp42AOorNlum6dsiHYkFaiwDq2cDx7eB4PG9u4KnWcopbDpWwhZYv9adsjRx6LDhz8BmnbIkuhQcr2cOlmHQfT2+LNZn4LlR1o26JIkddxNkfyIjvxccIVFFOw0eedUraQssUBtV0JldrZoCVyi1xDlB18DrSGDQxWvza3WnglW6vsqLOdw+bNnM0anmLKMG1L11K2kLLFAmRTJEuJdEM2pFnk67wwbuHjYTPMRoarmW5Wy69ja5Ud/AwOHnl6eBdn4vAERXxSkqGQsoWUnRyCIzuzuHSQDusdq273tN69bBcYYANrSbe0ez27QoyDsqNqu8w0KzmDdzPFU3hYhm5IE1K2kLLFfgZ6nzw5qG5Iq4+269vL9vDo4WDW0R0bXcenyq5NwWxKTHMoZ/MmXuEPhm5IE1K2kLLFAbTthhvSOnGozz7y+i2M+7h0chAH0x+7rHQrVsqOtJ3D4xi2cAjPMWrghjQhZYvYK3tAym6xeuobtVKfhfFaVMqK2HSvZ/98cVN2MJp65Ong7Wyhtxq1ImkLKVuoyk6UtgtkqdRlQ1o9FsZnRqV4sVoOn/l7xk/Z0cpJngE2sSmMWkGdbSFlCyk7SQRRK7kZUStL1fZyF8Y9PPpjEJUy/zQnjsqOtF0iz8Fs5nhGjI1aEVK2kLLFAeuzWtTKUjvby1kY9/DoYh3rw6gUK8ZPRXyVHUzBbKYpcSRbeD072IkvbQspWyxf2eplx0vbQdSKQwf2krZ8LU3ZwbfXe0elxBc/5soOtA15bI7jfazmGaYMPURESNlCyhb7vSdR1EpqSZ3tpSm7gsMwG1gZy81m5lXZtSmYS55u3s0Z2DypqBUhZQspO2ksJ2pl8cp2gUEOZg0dMe5e7zuxib+yI21XyLGK03k3mTBqReOukLLFkpStXnZcB/qlRa0sbsd4LSqlK7Z7w+fCN0bZ0d0sUOBQNvNmXuYP6mwLKVtI2cnTdrAhzV7EhrSF7xj38ejgIDbQZ0D32tQqO8LGYhqPo3kfr+J3jKqzLaRsIWUn7Q5ZlMksImplYQvjPi4pVrGBISxDutd7/55mKTs6fjVPihPYQi9PkcMnLWkLKVtI2cnS9sKjVhayMO4CQ2FUimvQcvjMKYd5yo607ZJjgE2cTIXfUtEoLKRssXBla/uZCSw8amW+87I9PPrYEPOolIVMY0xUdqTtIGrlTN7BCM/jY+Go2hZStpCyk3OvFha1cqBedhSVcjA9xnWvk1Fl16ZgNtNUeC1ncxQ72IWPow1pQsoW8ylbC+NmabsSLnx37idqZe5etoWPu09UimXwlTBb2YG2YRqLP+F9rOQZJtXZFlK2WIiye6hI2QbJ6kBRK3Mr28VipVFRKfNfB9OVXduQ1s1JnE6KJyiAolaElC32r+wBKdvI+izYkDY7aiXoTO+t7CAqZSOrDYpKmQ8/EcqOtF0hx2pO5aQwakXaFlK2OECVrYVxEwf6vaNWAhVHyg463TOjUvyYH/TRflX2zLtZoMQhbOHNvMQfdfaXkLLF/qtsKdvUgd4ly3QYtRL1p4NjRYLudaehUSntpWyIOtseR3MOG3leUStCyhZSdhK1PTtqxSJPAYsKKVYbHJXSbsqurZykOIGz6AujVrRELqRsIWUn6i4GUStlOkhjkSGHzRAbWUUqMd3rfX/npCk70rZLlhWczCbKYdSK3k0hZQvUy04OQdRKBo9uSlhsYK3RUSnz4SdU2cFb6VBimnWcyQns4XlJW0jZQspOXt3pU2Qci8NYgYubUF0nucquTcEsCpQ5kg/SzYOStohI6RIIkYCqExw8xtlFPwXWsQqHyoLO/hLxvJ9p4GU6OJpOiuEX+ELK1iUQIgG69plihCw+MMIoa9jIAH649UyYdT+jbYVTdDEhWQspW4ikDO/BScx7mMTDxsKigzI7GQvTxJO4RJ7c1QM/3II2SZYyHinSesyFlC1mDvrCXF3bFBlljDIODuABPjY2FXawhw0cRAeVRMWoJPuO+uSYohj+e72hQsoWM9AwburgbuFQYZQRCtjhmxxVn0Gt5jDNM+xiI6tJU5nnpG09ta3XNRTIMI0/z4nnQsoWQhg0vDv4jDNCDmvGWzx7k1IQxDFJhpVsZAg//OxLxHECZlEmQw4PS8IWUrYQydE15NjDFP48n2kGO4899jDO2jC6tKIl8pjd0ehQ1SwV6VpI2WK+QV2Yc69sbKYZZRwXe0HDu49FGo8/Msp61tOVgM52UtYKfCwcXDJkKEnXQsoW86F6yxxdB7lYY4xRDDebLUYNHZT4HXs4mLV0GN7ZthJyR20gzxSF8N8LIWULVdmJqMZsPEYZYXpW93oxf4aNTYan2c1GVmIZHLViepUd6brEFHltNhNSthBJmlQ5+GTYQ3be7vV8okvjM8Ykq42OWrEMv59RVEoOV8vhQsoWixv8tDge72rMIs8Ik3jLPBPACv/EFD6vMMY61tNrZNSKuVX2zKiU0gJ3IwghZYu9xCDiWY05FBllnNIiu9fzybsjjFo5mHXGd7bNmoD5ZMlQRIcyCSlbSNeJuS9BNbaHEYpL7F4f+M8PolaeZTcbWa1DRJqia0WlCClbLLPeEnEc3h08JsKoFKdhf8vMqJUVoENEGnalFZUipGwhEqpryDKygKiU5U7WoqiV3WHUSj+eEVErllF3NIpKyVBR91pI2WK5ihDxuReLj0qph1I69opaUWe7nrr2q1Ep6l4LKVu0Tb2SdF0vPSpluXhYdFDkeXazgbWkcGOtbRO67lH3elpRKULKFtJ28qqx2VEpzdRSsEgeZJcHUSvD2pBWB10rKkVI2aIhA4xo5dWPolIy1D79aY0sHZgVtRLPzrYV8zuqqBQhZQuR0GqsXlEp9SKNF0atHEwPLh5aiVmMrh1FpQgpW4jk6drCpsQoY5Sb3L2eTzuKWllqda2oFCFli4aiobhVw3uFsQZFpSwXL9y7HkStrCIVq852/HrsikoRUrZo0lCjXnbzr3njo1LqMY1zgEmmWKWolXmnELWoFFvXSEjZQhV2cnTdjKiUepHGnxG1Eo/OthWrO2rhUCFLlrK610LKFiI5uraxKDDCRNOiUurxU3fgxipqJS4L44pKEVK2EAnVdS0qpYRt1PAedLZLPM9uNrKGFC5em9eTikoRUrYQCR3eZ0elmFaNBTWtjU2Op9jFRlbiUGlZrW21/H4qKkVI2UIktBpz8JlihKwR3esDUYta2cAKvBZtSPNbviyvqBQhZQuRQF3HLypluURRKwexoUVRK1YL72iwXjJJlrJ0LaRsIZKl6yAqpWJY9/pAeGHUyguMVKNWvKYGm7amyg7uqE+eKYrStZCyhUiOsC0cykwwQiFGyWb1qnH9vaJW0k2NWmnFUryiUoSULURC62sHn/EwKiW5b1kQtZJhJRsZwk9o1EotWlZRKULKFi0fjkS9qzHLoKiU5ZLGq0at9OEl7hCRKFp2iiwVLYcLKVu0EtUL9dd1gVHGq1EpST9zOjhExOWlatSKi9vgznazrmm02SyKSpGuhZQtVGUnRl0OJcYZpTije221xe8eRK38Loxa6YjVISLLmYApKkVI2UIkUte1qJT2fK9mR61YLYxaqZeui2QUlSKkbBEftDBej+E9OVEpyx9R/DBqZSMDRm5IizabKSpFSNlCJE7XM6NSdI6TT7AhbSdjrONguvEa0Nm2GvjzW9i4ikoRUrYQSZOThUORUcYoJ+zb6+VqL0WFHexhA2vpNKSzHUWl5JiiiLrXQsoWIlG6rrCHEQrYepP2IYhaeYZdbGR1nQ8Rqf8EQFEpQsoWIrHCbo+olOXSqKgVq+7308IKu9eKShFSthCJ0jXk2NMmUSnLJY3HnmrUSvw2pEVRKVky2mwmpGwhkqTrYLl3ZlSKmF+JaTz+WI1aWf4hIvVaGFdUipCyhUioroOolDHGZkWliIWpsSOMWtnA2jBqZenVtlWnO6qoFCFlC5FI5dhtH5Wy3GtoY5PlaXZXo1ZatY880nWJKUWlCClbiGTV1w4+GfYoKmXZE590XaJWlqN6RaUIKVuIxOp6ZlSKdL0cLMDDIoXPK2HUSk8TDhHZW/aKShFSthAJ1LWiUhqhbbDoCKNWDmbdEjrb1pLvqI1PloyiUoSULUwVk9h/NbabUYrqXjfg+to4TPMsu6tRKwtf7l78wriiUoSULRJT9Yi9h3cHj4kwKkXVdaOucwq/GrWyAhbc2bYWfT9tqEalaDlcSNlC2k6Mrm0ssowoKqXheOE327urUSsLO0RkMVW2olKElC0Spymxb1SKdN2MyWLwzfbsqJXlfLO9r659RaUIKVuoyk6arhWV0spqu4Miz4dRKyncZX+zragUIWWLRKpKVfZcUSm+gVMZU+9k8PlXkN0eRK0MH/DsL2sB10FRKULKFiKRk5YoKiUD1eraxLUHy+DpV3C9HVhA1MqBp1N+NSolq81mQsoWSaK9F8UVlRJH0nizola8RTynPhZOGJVS0sEtQsoWIjm6trApKSoldndmaVEr0WazKCpF91NI2UIkRgs2FcYYUVRKDPHCvftB1MoqUlTwqjWzNecETFEpQsoWbVBrtuPv7OArKiXGWOESN0wyxaq9olb27mX7WFiKShFStkj+0NiOukZRKcY8mWn8atRKf9jZ3lvXDhWyZKlI10LKFiI5uraxKDDCBK42Jxlz1zpwZ0WteOHqkKJShJQt2m5AbJffsxaVUsJWfW0QQWc7iFrZyBrSobQVlSKkbNF2JH9xPDroI4pKka5NfEKDqJUn2cVGVpLCokhGUSlCyhbtNRgmu9KONptNMTIrKkWYSBC1MsFBrCRLhoraG0LKFiI5ulZUStJI4/Eyu+mgkxR+3Q4REULKFqLFug6iUirqXifozlqk8ChSoZM0Nr6RifBCSNlCVId1hzITjFBQslkCsQGXPKlQ24uJNRVCyhYiRvW1g894GJWipzypWECFyowlcklbSNlCGKVrG0tRKW2kbZ8iZTroxFFnW0jZQpil69lRKaq8ki9tC58CZTrpUGdbSNlCmCDsWlRKcUb3WoN3u2jbI0+JrrCzrfsupGwhYqzrWlSKnut21bZLjjSdpEBL5ELKFiJ+uq5FpWTVvW57bUOJMh10hZ1tSVtI2ULERtczo1KUhCXAxqdEmU461dkWUrYQcdG1hUORUcYo69trMavW9pmmrKgVIWULERddlxlllAK2nmSxj7atGVErljrbQsoWyZCfiT+zolKScjcbXW2Xw6gVB33wJ6RskYBBzTxdo6iU/dxNSXtvos52LWpF2hZSthBN0XUQlTLKeDUqRYj5p6WKWhFStlCl3VRdzx2VIsRCnnELj+kZUSvqbAspWxhZufoG/JQWtqJSFnQ3xYGmpjOjVtTbFlK2UIXdAA0pKmWhd1PSnv8KlanMSEiTtIWULUTddD0zKkW6FvWYpAZnfylqRUjZQtRR14pKEY3RtlWNWtGGNCFlC6PEGFdd27jsZpSiuteiIdp2yVMKo1a0SC6kbGHAwBVPYTt4TIRRKaquReOe/goV0nTp7C8hZQuxNF0rKkU0T9s+pWpCmpbIhZQtxIJ1bWMzHUalSNeiOdK2FLUipGwhFqdrRaWIVmp7ZtSKtC2kbCH2K+x9o1I0ZIpma3tm1IrO/hJSthBz1tdRVEoGqtW1BkvRCm37lCnTQZc620LKFnEUZmv/dkWliLjV2j7FcEOalsiFlC1iNkC1Ute2olJEDN+KoLNdplOdbSFlCxF0ryuMMlKNStGwKOKlbZc8qTBqRZ1tIWWLGKizNX/nvlEpEraIn7aDqJXgm209o0LKFjEYlJqtaxtrjqgUDYYinm9IcIiIolaElC3arqK3sSgwwgQuNrYuijBA2opaEVK2aDtd16JSStjabCYM03YtakWHiAgpWyRa2MG5XFFUinQtTNS2olaElC1iMRQ1tr6eKypFCDPflRKVUNtabOHo+wAAIABJREFUIhdStmhBDdzIP1lRKSJZ2OGGtE5FrQgpWyRN1yVGGaOi7rVIUK1t4StqRUjZovmDT2MWxn0sHMpMMEJByWYikdpW1IqQsoXxlXbUvR4Po1L0lInkTnijqBV1toWULYzU/9xRKUIkU9t7R62o2hZStjCgwq5FpYwyXo1KUeUhki5tRa0IKVs0abipn7BrUSnFGd1rDV6iPbRdi1qx8fTkCylbxLXKjg76iKJS9FyJ9pz+1qJWtL4kpGwRwyp7ZlRKVt1r0fbvU4kyHXSpsy2kbBG/Gn1mVIq610LY+JQUtSKkbBE/XdsUGWWMsrrXQsx4A6KoFW1IE1K2iIGug6iUEUYpYOtJEmIvbQdRKyVFrQgpW7Ra2IpKEWIh1XZZUStCyhat1TWKShFiQUSd7VrUirQtpGzRJF3vG5UihJiv1lbUipCyRZN1PXdUihBifm3PjlqRtoWULRoobAtbUSlCLLParkWtWOhzSCFliyUOJQeurxWVIkS93rUyFdJ04YD2kQspWyyufj5QaOneUSnStRDL13Zw9peiVoSULepWYUfd632jUoQQy3vrLEWtCClb1LP2trCpMMooRXWvhWiAtmdGraizLaRssWRhO3hMhFEpjoYTIRqibahUo1bU2RZStliAnvfV9b5RKRpIhGiMtoPOtqJWhJQtFjTPj8QdHfQxzQgTVPR0CNGUd9BS1IqQssXCq+yokzYzKkXPhhDN1LaiVoSULRYsbmevqBQNGUI0V9uzo1Z8XRIhZYu5dW0xxQgZUPdaiBZq26ccdrZTeLogQsoWe2OTZ5wJRaUIEYtaO4paCQ7sFELKFlVdp9nDC/iKShEiNtq28MkDg/TocogaGqTbnSJFBugDXCwthieAbjq0D8F4PDy66OUFbuK3uhyiNpsT7X3/feBQzuZP6CCnQz+Mx2eYPly92UbfQ5cUfUxwD99gV/U9FUIvtp4Agg1ob2Izr8dlGgtbl0XKFi26fx4WfZR5hJt5CrC1CU1I2WImDi6Q4kTOZCMlitK2lC1agItFNw6PcxM/Icj5d3VZhJQt9n4OgqFhgFM5mWEKlLH1dEjZoml4eHTTyfN8izspEyQlaEFcSNliTmzAA9azmePpIYcnbUvZoil3zSVNH7u5jW8zIV0LKVssRttHsZnjsMiD9pFL2aKhd8zDpp8c9/NNdgAOvvrXQsoWC8MJu2fHs5nDqVAMVS6kbFFvXCx6gJ9yE48DNpa610LKFot7KoLOdhcncxprKVLE0bMiZYu64uHTTZqn+Ab3zZouCyFli0U+GRYesIozOJEB8rjqbEvZom73yaWTHv7I9/g+edS9FlK2WCZRZ/tQNvNW0uRQZ1vKFsu/Rx4OfUxwF99ip3QtpGxRL6LB5Di2cBQeBdTZlrLFcnRt00uZR7iJp9FmMyFli7pr2wUc3sMZilqRssWScYEebH7NTTw6490SQsoWdX1Ogs52P6dzEqvIU1FnW8oWi7ozbhiV8m1up4KWw4WULRr6rAT7yNdzFu+gW1ErUrZY8F3xSNHHbm7lu4xL10LKFs0g2pB2JFs4Fotpnf0lZYt5de3QS577+QYvoO61kLJFE4m6byewmcOoUFBnW8oW+8HFohePx/g6j6ODPoSULVrw1ASd7S5OYRPrKChqRcoW++Dh0bNXVIqWw4WULVry5ATVwipO5z0MkFPUipQtZujap4Me/sh3+YGiUoSULVrP7KiVFNPakCZli3CzWQ9T3Mkt7AJSuNK1kLJF64k628exhSPxFbUiZbc5Lja9lPgxX+fpGRNbIaRsEYtnKOhs16JWCupsS9ltiYdHHzaP8w1+jDabCSlbxPQ5CoamAU7lZFYqakXKbkNd+3TSze/4FndSRt1rIWULA7QdRK10Ma0NaVJ221x1jxS97KlGpah7LaRsEXtsfHzgSM7mjdjkFbUiZSeeCil6yfEANysqRUjZwqwnygqHq3dwJocrakXKTjQu0IfHY9zEL2c9/0JI2cKQpypYIu/iZE5lHdOUtUQuZScOD59uOniCb1ajUrTZTEjZwmBtB1Er/eTV2ZayE6brDrp5ie9wK3nUvRZStjCcWtTKFt5MB3k8dbal7ARcY5c0PUxyN99kF+peCylbJEbbwYa0N7GZo/CYVmdbyjYaF4t+ivyYm3gKRaUIKVskjKDDl+LdnM4hFClK21K2kXj49ODwODfzKNpsJqRskdDnLIpa2cQpDDOtqBUp20Bdd9LF89zCXZSBFBVdFiFli2QSLSCuZzPH062oFSnboKvq0kEPe7iV7zCBks2ElC3aQttBZ/sotvBGbHJaIpeyDdC1Qz/ZalSKutdCyhZtpO1guDuBs3gNZUWtSNkxvpo+Pn34/JSb+aV0LaRs0Y441aiV01hLgbK0LWXHjiAqJc1T3Mz9M55bIaRs0XZPXrAhbSVnciIDTFPWkZ1Sdox07dFJNy/xXX5AHnWvhZQt2py9o1ZyOkREyo7FNXRJ0ceEolKElC3EbG1HUStn8QZcRa1I2S2+fh4WfZR5hJt5SroWUrYQs4miVk7kTDZSUtSKlN0iXCy6cXicm/gJtfaNEFK2EDOew2Bo7Oc03stKCjr7S8puMh4e3XTyPLdwJxXUvRZSthD7ZXbUSg85PGlbym7SVXNJ08dubuPbikoRUrYQi9H2UWzmWGzyBDnOQspu3BXzsOknx/18kx2oey2kbCEWTPTt6/Fs5nAqFEOVCym7/rhY9AA/5SYeB2wsda+FlC3EYp5Kuxq1cioHUaSkJXIpu+4EUSkpnlZUipCyhVjekxkcaxhFreR1iIiUXdfr5NJJD3/g+3xfUSlCyhatqU59rMQMPbWolc28lTQ51NmWsutxjTwc+hnnLr7FzsTqOmnjgZCyE3UnnerpvUn6mjQaTI9jC0fhUUCd7QPJCCl7Xl3b9FLmEW7iaZK72Wzmad5a8E8MiodMzn10gZO4nBF24eNgJ2Ju7YeD6k5+zCgHsRooa7J5gCl4Nx34uj5z4uLTQwe/5lr+ldFQZn4Cx4Ng0n48HyfDywkaDzTU6xIYj02KCj6v4a/5v9nEqQzyNFl80gl5SX0sbDx28O+UWM8QLq6WyPeDlD03Hi7d9PICX+I6XghHPy+x48FG/gt/x6mcxmqeYTJB44GULQyuqlK4eAxzJf/IaZQZo4dT2ITHE5SAVIK07VDgCR7HYQN9lPGkbSl7gU+PR4pBxvgG/5Nf4SVU19F40McnuIYteIzRyUmcQYonKSRoPGjjIV+Ye++cMFbxYj7FsRTI4uBRxGcAm39nO3eEE7OkdLKiDWlHsoVjsZgOz/6SompyUi97X1079JLnfr4RVtd+InUd7WY5n/+fvTf/s6Ou8/2fVad679OdBOICgs4II14d8IrLoBK2QEiCOuoAM4qOjhuDEJrwf8x3SAIIrriRAAKCLIrgAIKMIsJ1JLgvLANJd6f7bH3Wqu8PVdXndKfT6zl1qj71ev1278Mh3afO6/Wqqve7n58reQdV8kEeuGTp5Umu5XYAHCOHAapsKdYKbbeZqzkDjzweDlCjjkWdDFmq3McunqI56zZB4Q3IaWzjjdQp6xARVfYR1cBiCJef8x2extyDPhxcXOB0dnIuNnncIA8aQB2bLA0eZBePI2CMKluK+FnTpg6czBgfpp8cDTJYeFjUqWERUpNHmORmruevQA8NQ54twr/Z7uccNvNaylTI6Lusyp4nF5dBetjPLfwouN0z8Q+ewjx4E1dyEVly1BfMA4cR8tzKdfyupeQlVbYUgT2P5TI+wWuYpjanrkKLQoiLGOEPfJWvkcOkV2Lh09LRbGEToxSFWlFlz6lrj16G+Ct3cpfBqJTwdfhGPs+nOY5pqovmQS8jPM9NfJkJ9IpclS1FYs8BPs2lvIkiJTLzXgq3WtSPrgZZenma69gHRtk0nGy/gQt4Jw4zOvtLlU24bDZIjvu4lVeMraYwD3r4Vy7j7ylRXFYeDDHA/3AD36au2lZlS51SiEb4EFfxLurksRbY+J9vUf//zyaLy39xDY+2PKmboHCy/TYu4CS81KNWVNkNbIao8hjf4TctN3bm5YFftedzNe/Dnd1mWToP/JPpLR5jFw8wF8MkqbKlthSTb7TTuIptwXLJwtPbhSzqvxLLMEqR73Itz2HSJCucbGc4gy0cT5Vyiifb6a5sF5dhLJ5hL49j7rJZBos68HbG+CB9s9ssK8uDLFXuYg/PoMm2Kltqm8Jn4hPYwT+znkNHtOeRLRratIdRXuKb3MgBTJxsj3AuZ3E0JeopfUWe3sp28ehjgD9wK/dTw/Rls+O5nEvYyFSwbLaaPHBYxwG+ww28oNpWZUvts+d6LuXTvJ48ZZxFr9qRLerHmj/J2s+NfDNArZhW28ewjffQz0wqF9LSWdn+9HqIg9zFnRzC9On1MJ/lc5xAgZnDptcrzYMBhvk9X+FrFNFkW5UtrUFOsB7yUXbw91QoLji9XolFwX/BPkyGJ9jFfS3/jhm3OB4ecBLv52RsSgFqRZVtsuo4DFHkx9zMXzH/oI8LGeMdVCm0KQ88hunhKXZzh2F5oMqWIlMYO5vZyVm45FkeXnZpi/rPJBYj1LiHPfwCH2PYMOQbbQVxnU7UStoq278BdfkZe/nlnOtvWh74v+vpXMX5QH6ZN6PLyQMfOJPF44fs5nHMQi+psqUInhV9NtEpjPGPDDJ1xGWz1Vq0OckaZx/X8xfMWkjzX5H3czbn8lpmqKXmFXmaKtvFY4Benm1BpTSMzAN/PHYSO7iIEaYW3WZZfR5kWMc03+VafmfwuwpVttSRuj6Gy/k4r2Ga6hLT69VZ1LdpnQGG+RNf5auGolaO4nzOIEspJZPttFS2j0oZ4EVu525KmDqFDev6aC7jU7yOHJWO5kE/WV7gG9zAJFpIU2VLS1wNhxowyKe4jBMpMYO9wpe6K7Eo+JOsIXp5hj3chodZk+0QtfJ+TqWXUnCCkyo76b9jgx6GmOL+AJVi6kEffh708nEu5y3MUOp4HviQ136e5XpupoYm26ps6QgKnxI+xBj/QJUiqzkcdaUW9WvbYhiLB9nNI5g1yQoX0v4v23kzHiXDJ9vmV7Y/d62kAJXiP+Gez042UacQYR7AMA6PBqgVHSKiypbmKSzJ9zDGNjJMB0YhEos2USsF7uBa9hv13BK+Inc4nfN5PWWqBte22ZXt4jFIhl+yL0ClmLlsFpbkqYzxAfqZwos4D1wsRinzffbwNJpsq7Klw+x5AmNcyHqmqdGz6v/a6izq27ROHyO8xLf4IgeNrO0RNnMOG5gxFrVibmX7qJR+/sgt/MDgV7ZhHhzHDj7Kq1a8zdLOPOhllAPs5TpeVG2rsqUmGmEDn+OzHEeB8hJohM5Z1I9Fl0EGeI4v8m0qmHiIyGvZzmkMGIpaMbOy/TOoBjnI3dzOFOaey+VPr4f5DJfyt5QWOPgn6jwYYJA/ciPfoIBQK6rsVCtEpfwLO3gbJUrLQCN01qLgv6AfooefBqgVkw4NCCfbb2Y7p2Cvcl9AlR2t6mTIUuDH7OUvmH/Qx4WM8U7KwZGhcciDQfp4kt3ciQ4RUWWnVOFLpvMY4yxccm2o6/ZYtDnJqnIve3gSs16J2S2olROoGYZaMauy/W/dMB5PsI9fGlzX4TbLJsbYgr2GbZb254H/k43S4AH28BhCraiyU1fX/hf+ZHbywQCV4rTtiaTWlqvqUaeHUSa4lT3GYSAzAWrlLLbwasrUjKltkyq7AQzQw3728lDLdTM1D97EVXyEUaaor2GbpTN54L/rWMc0t7NHqBVVdnoUohGO4Qv8K68iv0I0QnQW9SdZ/QzxZ77C14xFrWzldEaYoWbEkZ2mVLaLSx8DvMgd3BW8InaNRqX8O5/mGApLHvzTvTzwUSvDvMjX+TITaLKtyjb+0w5RKZ/kC7yJPOUVoxGitGj4pDNIP780GLXyN1zAqfRSNOAQERMq24fpDjPFD7jFYFRK6KVeLuEK3kpxFeikqPPAX0gb4ldcz16hVlTZJn/SdvCU8GF2cBpVCm23ZycsGtb2CB4PsYeHMQut0EStbOMtNJhJ9CtyDxJe2f4exTA1HmEfzxlc1+HvtY0xNtFo2zZLFHngMYLNo+zhhwi1oso22J7vYSdb6GEKr23T685b1P/vZhglz/fYHQSpOQsomVnUylaOo0olwbWd7KfsBhYDZHiam/kpzfGFqXnwdnZyAQNt3WaJKg9sRilzD7t5WrWtyjZJ4bTqjYxxMaPk14RG6JZFm5Os/+Wb3MgBTDz7K8t5nMVRlBN79ldyK9t/5drHH7mV+6hj+vT6OK7gEo5u+zZLlHnQR5ZxvsP1vIgOEYnobk/qbBX00MBlAzv4T84JSMFOBwPVxe3Qf90iQ4MSw5zFedR5jioejiEm9YGQFfbzND0cyzA1XKwEVt8AvXgJ+7n96fUoE9zCf/D/guNbXGPzIMu/s4vtuOTxEp4HA2xiKzb7KePRo3U0PWUn97PNBM8Kl3B5gEqxO/7CtXN31a0hkMXhcfZwL2a9vAwX0kLUSgkSVtvJe8r2cLHJUuRB9vEXzD2XK/TJRezgXVQ6tM3SjTwYpo+fcy2307q1I6myE/X+wv/ansdVnAFMd2S5pBsW9f8Vm1Eq3M8ufoFZk6zwb3//ge28kTqVoMpV2e3+SS386fUg8N/cbPRMNLwN2cRONpNhumPbLN3IAx+1UuchdvEYmmyrshNnz1ZUygA5GpHYMzqLhocGZDnEPq7lr5g42e7nbM7lNVQSdPZXkp6yXTwGcPgNe3lwzu2SaXlgUQfexBj/xAi5NR38E9c8aOAwQo7vsoffI9SKKjsxn6j/t9fH8u98klczTS2C11/RW9SPXJc+svyJL3MT00APdWNQK/6xjiFqpZSQQ0SSUtkeDfoY5Hm+x53MYPpBHxv5PJ/hWHJUI8sDDyvyPOhlhBf4Gl9hwqg8UGUb+mn60+tB/o1LOakjqJQ4VXZo0yH6eYrruCV4pnANO/vrb9jOO+mhSPwn20mobA+XDFkOcT+38bLBdZ0JUCkf5wucTDGSbZbu58Egg/yKL3IzNWOvrSrbGHvChxnjXdTJYXdhIz9qi0KIWnF5mF08jGkLaT5q5W1cwJtxKRPvyXbcK9tfNhuixiPs5TeYjErxq2obV/G+Nh78k4Q88BjB4jF280PM/et6VXai7enHzmlczRYcch1DI8TRov6/65ClyJ3GolYybEoAaiXele3jb22eCVApph/04aNS+iPdZolLHmTIUuH77OYZdPaXKjtWz2EZasAJ7OBfGGWaehcPmOiWRcNJVpaXuYkvcQATJ9s+auVoSrE9RCS+ld1EpdzGvUajUvw8OJ4v8AmOItfV70r38sCjQQ8jjPNtvsiLaLKtyo7F5+e/Dt/A5/gMb2CaapejvHsWbcbyEM9yI9+igolnfx3DNk5jkCJuDBfS4lnZHi4Owxzgbu7gEKZPr7N8ms9zYle2WeKWB/1k+R1f5qYAI6Wzv1TZXbZnhku4gpMpUyDT9Rem3bUoNA8NeILd3AuY9PIzXEg7iQs4BYuZ2J39Fb/K9pfNhijxI/YZd/L64XkAF7ODd1AlrzwAXBpk6eXJALWi2lZld0Xh1+5cdnIGXgAe7L66b1H/p8iQpTqLWjFvst1ErZRjNdmOW2U3sBjC5WcBKsXUVaSQSnA6V7MZm3zXtlnimQc2WRo8xDU8jlArquzIn7V8sP/JXMWHguWSuEw242HR5iRrkr1cz18goCub4Rp/st3HZjbzWspUYnP941TZ/h/89LCfW/hRcLtj8kEfJ7GDixkm19VtlvjmgcMIeW7lOn6HDhFRZUdsz2O5jH8NUClxWkSKi0VDm/Yxwh/5Cl8jh4mT7aPZwiZGKcYEtRKXynbx6GWQ57mTuyhh+vR6I5fybxwXg22WeOdBLyM8zzf4EhPoFbkqOyJ7DvAZPs+bKFKKwbQqvhb1o9ufZD3NdewDo2waTrbfwAW8E4eZGCykxaGy/WWzIaa5l9t4xdhoDvOgh3/lC7yVEkXlwTLyYIgB/ocb+DZ11bYqu3NyguWSD3EV76JOvitohKRZ1P+ZbLK4PMw1PNLypsIEhZPtt3EBJ+FR7vJCWvcru4HNEFV+ws38puXGxrw88KtmKzt5Hy55UB4s8xsCWSweYxcP0Lq4J6my2xbM/hftNHayNVguieff5cbRov4rsQwjlLidPTyHWYeI+JPtDGewheOpUu7id6O7le0fxGjxDHt5HHOXzcKDPt7OVXyAvlhtsyQjD/wDV6vcxR6eQZNtVXYbFT4TnsgV/DPrORRbe8bXomFt9zDKS3yTGzmAiZPtETZzNkdTot6lV+Tdq2wXjz4G+D23cb/BdOkwD47nci5hI1MxWjZLWh44rOMA3+EGXlBtq7Lbac/1XMpnOJ48ZZxYf2rxtagf6w0GGeQ5bjAWtfJatvEeBpjpykJadyo7nF4f5C7uYArTp9fDfJbPcSJ5ZpQHa/re1BlgmN/zZb5OEU22VdlrkhOsR3yUHfw9FYqxnF4nyaLgDxiGyfAEu7iv5XM24xbPP0TkJC7gZOwuoFa6Udl1HIYo8hB7DUalNL+nF3El76BKQXnQljzwGKaHX7CbOw3LA1V2hApjZzM7OSu2yyVJtKj/TGYxQo172c0vAAfPIEKaX1ensa0LqJWoK9u/AXP5GXv5Jc3Jvnl54P+up7OTLUA+dty75OaBD9zJ4vIAu/gpOkRElb3i0PXZPKcwxj8yyBReDGnSSbZoc5I1MYtaMWkhzX9F3s/ZnMtrmaEW2fcnysp28Rigl2fZx4NBsTWMzIMQlXIlFzLCVKy3WZKbBxnWMc13uZbfYe67GlV2h+r6GK7gEl7DNNWYT6uSaVHfpv4k6098la8ailo5ii2cSZaZiBbSoqpsH5UywIvczt2UMHUKGdb10VzGp3gdOSrKgw7mQT9Znucb3MikaluVvfSn4VADBvkUl3EipRiiUkyyKPiTrCH6eJpruRUPsybbIWrl/ZxKLyXcjr9MjaKy/d3/Qaa5n1t5BdMP+ujl41zOW5ih1OVzuczPAx9y28+zXMdeamghTZV9RIVfjQ8xxj9QpUgyptfJtqhf2xbDWDzELh7BrElWuJD2f9nOm/EodXiy3fnK9ueOlRSgUvxBzfnsZBN1CsqDyPLAX1B9lN08gA4RUWUvoLAk3sNVbCXDdPBFQRaNRP4ka5QCd3At+416bmuiVjZxPq+nQqWDtd3ZynbxGCTDL9kXoFLMXDYLS+JUxvgA/YnaZjEjD1wsRilzN9fyNHpFrspewJ4nMMaFrGeKeqKmVSZY1LdpnT5GeIlvcQMHDKttO8A0nss5bOjgZLtzle2jUvr5I7fwg+CVZd3gPDiOHXyMjYnbZmn9LlgJz4NeRjnAXq7jRdW2Ktv//f1p1QY+x2c5jiIziZtem1LZfi24DDLAc3yRbxuGWglfIL+W7ZwWoFba/6K1M5Xtn8E0yEHu5namMP1crmE+w6W8MZYH/6QtDwYY5A98iW9QQJPtlFd2KyrlFEqUEoBGMNui4A8ohujhpwFqxaRDA8LJ9pvZzslkKLX9r3s7Udl1MmQp8GP28hdMnl7737MLGeOdlIMjQ5UH3c+DQfp4MkCtpPwQkfRWdviS5TzGOAuXnAF1bYZFm5OsKveyhycx65VYE7WylROptRm10t7K9vDwGMbjCfbxS4PrOtxm2cRVnIed4G0WM/MARmnwAHt4jFSjVtJZ2eEFP5mdfJBBpnBxDPndTLCob9M6PYwywa3sMQ6DmQlQK2dxHq+hTK1ttd3OyvZRKT3sZy8PtfzcpubBSYzxEUaZok6P8iB2v0mGdUxxB7v5PamdbKevskM0wjFczid4FfmEoRHSY1F/ktXPEH/mK3zNWNTK+WxipG0Lae2qbBeXPgZ4kTu4K3hF7BqNSvl3Ps0xFGJ/8E9688BHrQzzIl/ny0yQysm2lbLfthWV8ncUKCcOjZAmi0I4yernl+zhNkNRK3/DBZxKL8U2TLbbUdk+THaYKX7ALQajUqCHGtDLJVzBWykyY8h4zNw88BfShvgV18+iVlI12bZS9JvawVPCR9jBaVQoGFfXJlo0rO0RPB5iDw9jFlqhiVrZxltoMLPGV+RrrWx/j2CYGo+wj+cMruvw99rGGJtoGLPNkoY88BjB5lH28ENShlpJS2WH9nwPO9lCD1N4xkyvzbeo/3v5qJXvsTtArZizgOJPiB3ex1aOp7om1MraKruBxQAZnuZmfkrz9b2peXAqO9nOgFHbLGnJA5tRytzDLp5JU22nobLDadUJXMnFjJKjZtS0Kh0WbU6yXuYb3MgBTDz7K8t5nMVRlFd99tfqK9t/5djLn7iV+6hj+vT6OK7gEo4ml1hUivKgj2HGuZnredGoPFj0btP0W5IeGrhsYAfXcE5ACnYMvlVxcQ397SwyNCgxzFmcR4P9VPFwDDGpD8SssJ9f0sOxDFPDXdWz9gC9eCv8DvjTa38//z/4f8HxJa6xeZDl39nFdlzyyoOE58EAm9iKxXOU8egxfR3NMvp3ywTPCpdwOW+jlMBzeHRXvXAIZXF4nGu5B7Ne3oYLaW9mO6dgU8LneHfyKdvDxSZLkQfZx18w91yu8HtyMVfwLmO3WdKYB8P08nOu43Zat5ZU2Ql7f+BftvO4ijOAaSOXS9JoUf+3tBmlwv3s5knMmmSFf/v8D2znjdSpBFXemcpuYDEIPMFensbcmWB4G7KJnWwmw7Sx2yxpzIMGMEqdh7iGxzF6sm3mxZyLShkgRyMV9kyPRcNDA7IcYh/X8ldMnGz3czbn8hoqVJc92V5JZfuoFIffsJcH59wumJkHb2KMC8mSo2YMKkV5EH7vGziMkOO77DEZtWIZ+Bv5f3t9LJfxSTaSo5aC11/ps6hfOS59ZPkzX+ImpoEe6sagVvxjLY9iK6emH92gAAAgAElEQVQzQok6mWVc2eVWtkeDPgZ5njv5HjOYe9CHnwcb+Tyf4VhyVJUHBudBLyO8wNf4ChNG5YGhlR1Orwf5Ny7lJPIGolJk0cNtOkQ/T3E9t+AZVT1N1Mp23kkPRZaebC+nsj1cMmQ5xH18l5cx/VyuXj7BZZxMMRXbLMqDQQb5FV/kOyb+3YNlnD3hI1zJu6mRw07F9DrdFgUfrTCKx3+xi4cxbSHNR628je38H1zKLD7ZXqqy/WWzIWo8ws38FpNRKX5Ub+Mq3mfQwT/Kg+XkwQgWj7GbHxqWB8ZczDB2TuNqtuCQMxaNIIse6fd2yFLkTnYHzC7TUCsZNrGV45ZArSxe2f7BphbPBKgU06fXb2cnF9Cfqm0W5YH/e2fIUuH77OYZk/LAhItpk6EGnMAO/oVRppc59ZNFzZI/ycryMjfxJQ5g4mTbR60cTYnaEb7jR65sH5XSxx+5jXuNRqX4eXA8X+ATHEXuiJ+V8sBkeTToYYRxvs0XedGUPLAS//P7r8M38Dk+y+uZpppie6bbos1aGuJZbuRbVDDr7C+/to9hK+9hkCLuAnvkC1e2h4vDMK/wfe7gEKZPr7N8hs9xIjkqqZteKw/m5kE/WX7Hl7kpwGglPA8sA+yZ4eNczsmUKZBJtT1lUfAnWVkyPMEe7gFMevkbLqSdxAWcgsVMQE1brLL9ZbMhSvyIfcadPH54HsDF7OAdVMkrD5QHuDTI0suTXMvtkPTaTu7FDD/2c9nJGXjkU4JGkEWX9ylkyFLlfnbxC0ycbDdRK+U5k+35ld3AYgiXn3EzT2PuQR/hX+WfztVsxiaf2m0W5cFCn4JNlgYPsivpqJVkXswQ7H8yV/GhYLkkoy+mLDrnadOfZE2yl+v5C2ahVvxX5H2cw7m8ljKV2e9/a2X7f/DSw35u4UdB3Zt80MdJ7OBihsmleptFeXCkPHAYIc+tXMvvk5sHVmLteSyX8a+8mulUL5fIokvZtI8R/shX+DrTmDXZ9p+Wj2YLmxilSAMba7aywaWXQZ7nDu6mhOnT641cyr9xnLZZlAeL5kEvIzzPTXyZiWTmgZVIew7wGS7l7yhS0rRKFl1U4STraa5jHxhV2+HrvTdwAe/EYQYXi6MYokYPQ0xzL7fxilG/80J50MMnuYy3UqKoPFAeLJkHQwzwP9zAt6knzxtJuphOsFzyYcZ4F3XyqUQjyKKr+Uxssrg8zDU8QvNNjQkKn53fxgW8GZcZ1jFKPzV+wnf4Lc2VNdMURu1WdvK+4BhN5YHyYGn5J9NbPMYuHqB1cVGV3cZg8j/o09jJVmzyh23KSrLokeXRIMMIJW5nD89h4mQ7wxls4XUcxSC/ZB+PY+6yWQaLOvB2ruKD9JDXNovyYMV5kKXKXezhmSTlQRIuZvhMdCJX8M+s55DsKYuu0qY9jPIS3+RGDmDiZHuYrbyXh7kr4KWZvGx2PJdzCRuZ0rKZ8mCVeeCwjgPczBd5ISm1bSXEnhu4lE/zenKUcfQVlEVXKZcGgwyxnxv5BlUja7vPMITM3N/Rf4U5zOf4LCdQYEZ5sEgpWcqDJT6hOgMM83u+wtcoJsE38b6YTrAe8DGu4O+pUNT0WpW9ZvlPoxn+m13c2/I9M0H+32ybO732r9NFjHEqVQrKA+VBG/LAY5genmI3d8Q/D6wY29N/SXEuOzlTyyWyaFvvrV0sRqhxL7v5BeDgGTLzDSfbpincZjmdnWwB8njKA+VB22rbIovHD9nN48QavRTPixn+8copjPGPDDKlZTNZtO217U+yJtjHdYahVkxTOB57Mzu4kBGmtM2iPOhAHmRYxzTf5Vp+R2yxvlYM7enX9bFczsd5NdNUNa2SRTtkU3+S9Se+ylfJYeoE2IS6PprL+BSvI0dFeaA86Fge9JPleb7JjUzEs7bj9WrJCiJzkM+ziwuwAmKVvnLLl4urz2vZ37cMNUpsYDNnU2Q/bvC0LcUnD1x6+SR7+Cd6mMZTHigPOpgHDYqMcibnUuNZ6ng48bqJj9PFDJ9wPsRVvJsqRTS91l11FGpgMYzFg+ziUcw6RCS5CgcVW9nJ6dQpKA+UBxHlgb+g+pMAtRKrQ0TicjHDkHwPV7GVDNPBByXJolHIn2SNUuAOrmU/ph5QmRSFIXkqY3yAfm2zKA8izgMXi1HK3M21PB2nPLBiZM8TGOMi1jFFXS+/ZNEu2LROHyO8xLf4IgdV213Og+O5go+xUdssyoOu5UEvIxxkL9fxYlzyoNsvmsLp9QbG+P84hzo5LBl0DdLsavXfRX+SleUMttDgWWrxm2QZfw38PMhyGdewDbTNojzoYh64lBjkfWzDZj+VOORBdy9miEr5KDs4hRIloRF0V911NYAhenic3dxHwg4NSLT8PLD4J8Z4J+XgyFBJedDtPBikjyfZzZ3dz4PuXczwJcN5jHGWUCmyaIwUTrKq3MMefoFekUeRB344nsEY52Frm0V5EKs8gBFcHmAPj9HVBVWrq/Y8hZ18gEGmcHH0zZBFY2XTOj2MMsGt7OGvqu0I8uAkxvgIo0xRp0cfi/IgZp+kj1q5nT3dRK1EfzFDNMKxfIFP8CryQiPIojGVS4MBhvgzX+FrQq10NA82cimf5hgKOvhHeRDj2/h+hnmRm/gSE93Jg2hfRVv00MBlkM+xiw/gk4Jl0PbWjNZN2vd9zVBjhvWcx1lCrXRAPbOolN1cSIYcrvJAeRDjPGhQIss5bKbK/mAXy432h4juX7KD03s/wg5Oo0IBG1vfA91Vx14NYASPh9jDw8QMrZBYhS8WtzHGJhrktHyqPEhIHniMYPMoe/hh1HlgRWzP97CTLfQwhafptSyaqM81wyh5vsdunkOEtPbkwansZDsDHFIeKA8S9rnajFLmHnbzdJS1HcXFDKdVJ3AlFzNKjppefsmiiVM4yfpfvsmNHEBnf60tD45jBx/jaHJCpSgPEpoHfQwzwXe4nhejyoNOv4gKp9dHcSX/yTkBKVgG7Zw0u+rcd9mfZA1zFudRZ3+AWlFprzwPslzGLrbhkVceKA8SnQcDbGIrFs9RxqOn0+toVod/JX88/zEu522UKGl6rbvqxMunczk8zh7uxd/S0Cvy5eRB+DldzA7eqW0W5YExN0XD9PJzruN2Wre2ElbZmeDHPo+dbAKmtVwiixr0KduMUuF+dvELtJC2nDzwp9eb2Mnm4OAf5YHywJTbeBilzkPs4rHO5oHVIXv6v8TJ7OSDDJCjoeUSWdQo+YcGZDnEPq7lr2iyvXQevImr+Cey5KgJlaI8MO6Tdhghx+3s5vd0DLVideC/6FADjuUyPslGctT0+ksWNVIuLn1k+RNf5uvkgB7qQq0smAcb+Tyf5RhyVJUHygNj86CXLC/ydb7MRGfyINN2e7q4DPJ5ruEfg+WSjL4yEX9t9HlHVUc2DYps4DzOpMSvcdHr3sPzoJdPsYuLscnhKQ+UB0bnQYkRzuEcajxLrf15YLXxvxSeb/IRruTd1MhhK750V50CNfAYxeW/2M3DaCEtfBzwt1m2sZP34gqVojxIUR6MYPE4u/hhu/PAaps9/ff2p3E1W3AC8KAki6bnc3fIUuROoVZafvu3czXb6dc2i/IgdZ97hiwV7mEXz7QzD9pxMW0y1IATuYJ/YYQcdb38kkVTp3CS9TI38SUOkNbJdpgHx3M5H+coctSUB8qD1MmjQQ8jjPNtbuCFduXBWl9UWTgBKmWM/+BcqhSwZNAuF4c+/W4onGQNczbn4vIsVcBJVWmHeZDlC/wnF+Bqm0V5kOI8cCkxwBlswWE/5XbkgbWm/1t/ep3h41zOyZQpkNEuqO6qU67w0IAn2MM9pGey3dxmuZgrOZUqeeWB8kA3TTTI0ssv2MPtwYPyGlArq7+Y4Umh53I1m/CCYzQlWVQKJ1lV7ucaniINqJXwr9JP52o2Y5PXNovyQJq9CjZZGjzENTy+tjxY3cUMwf4ncxUfCpZL9PJLFpWaCidZk+zlev6CyaiVMA9O4kouYljbLMoDaYE8cBghz21cy+9WnwfWqu15LF/gE7yaaS2XyKLSEW3axwh/4Kt8jRzNd1PmKHwdvpFL+TSvY5qq8kB5IB0hD3oZ4QVu4ktMrC4PMiu0p79cMsilXMMHsAJSsL4S8ZHWTeJUZzYNChzFuZzNTIBaMWchLUSl9PBpdnEhDlPKA+WBtEQejHI2m6nz6+DYLG9l/5HlywmWSz7MGO+iTl5oBN1VS8u6JjZZXP6La3iU5puqZCt8QtjK1bx3djdcUh5Ii6sBZLF4nGt4gNbFzTZWdviH4Kexk63BconupmVRaXnyaJBhhBK3s4fnSPpkO4NFHTiVMT5ID3ltsygPpBXmQZYqd7ObZ1aSB8u5mOEzwYns4GLWMSV7yqLSqmzawygv8U1u5ABJnWyHeXA8l3MJG5nSspnyQFpVHjis4yDf4Yu8sNzazixpzwwNXDZwFf/B5llyuL4EcZVmV3GVj1YoMMJZnIfLr6mRtMl2uM0yzOX8J9txmVYeKA+kVeaBR4EBNnE+PfyaCt7SebD4xXSC8fjHuIK/p0JR02vdVUtrVAMYJsMT7OK+Fp/FX+HPeRFjnDpLOpSUB9Ja8sBjmB6eYjd3LJ0H1iL29B/Sz2UnZ9KggJZLZFGpHfJoYDNCjXvZxVPBs3a8USvhNsvp7GQLkMdTHigPpDbVtkUWjwfYxeMseojIwhczZLOcwhgfYoApLZvJolLba9thNBGolXB6/WZ2cCEj2mZRHkgdyIMM65jmu4ujVqwj1vWxXM7HeTXTVHF00WVRqQM2rTPAMH/iq3w1pqiVsK43chmf4lhyVJQHygOpQ3nQxwgv8A1uZILmodYtyswrcD8yBvk8u3h/gEqRQZMkrZskRxYZapQ4is2cTYlnA9SKG5ufz1826+VT7OYjASpFeaA8kDqVBw2KjHAm51LjWeqHL6S1XszwDv/DjPFuqhTR9Fp31VLn1cBiGIsH2cWjLDrJilDhi7mt7OR06tpmUR5IEeWBv6D6E3bxAPPQS1bL03YDeC9jbCXDNP4rckkWlTovDxebUQrcwbXsZ8FXYhEqHI+9gyv5AP1M4SkPEvitspQHic0Di1Eq3M0enm7NA6vFnidyJRexjinq9OhTU2VLEdvUn2S9xLe4gQNdq+0wD45nBx9lI1PU9DJceSB1IQ96GeUAe7mOF8M8yASvwzcwxn9wNg1yWDrnNsHS7CqpCidZWc7gPBo8Sw0v8sm2nwdZvsA1bAWmsVTYygOpK3ngUmCI97GNDPt91IoFOHyUHZxCiZLQCLqrlrqsBjBEDz8NUCtW5DvkFzHGOygLnaQ8kGKRB4P08SR7uAMszmeMM3QOjywqxUb+JGuEGvexi19EWtqbuJrNWOTQNovyQIpLHsAILg+y22I/xzNDXfaURaVY2bSBw1Hcz0XUsSN4PW7jMsSdnMUhGtig75HyQIpRHvQwzH6HKSY5mnVkcPFkU0nqujnDIwMmOEglUgJ5DzmeoZ+jlQeSFLM8OMTzlB1cLA6SZwPZwKYyqSR1z6AWNg0K5CmTjZiG5uFhMUGJ9YwoDyQpJnlQJEcVh4aDDWSo8L/kWM8QFq7urSWpS/fTNh5FclSwyGBhR/wzWFhkqPIKedYzjE1DeSBJXcsDKJKnjL9bYod/zmUDBUpkWc9AMO6WTSUpanuWyTODhw1dQqk0g2KGYdYzqDyQpC65sEKeUpAHHjDnL7AzeExTZJR19GqSJUkRGtTGokqeIm4Xnq3nPmc38yBHiRHW06valqQI69rCok6eIo25eeDMM2sGlwkKmmRJUmQGtchQp0CBepfrmgXyYJIC6xjFUR5IUiR5YNMgT36hPHAWtGmVl8mxnqwmWZLU8bp2yZOnGqu6bs2DGgfIs54sGeWBJHW4rj0K5KksnAcLo0ltoESZHBsYAL0Sk6QO2DN0Wi5YLomr/Bn7/5JjA4PKA0nqYB6UyVEOptcst7LBn2Tlg0lWnyZZktQBe1bJzS6XxFv+vf8MWdbTrzyQpA7kQY0cpcW3WRY7AMQig8ehYJLVo0mWJLXJoBY2NQoU5i+XxFh+HkwFC6o9WlCVpDbmQZ0C+aXzwFmGTescJK+FNElqkz0zNJimQBU7IXXdmgcNxufkgWo7zt81KRl5sOxtluUcs+n/ddjL5IVakaQ1302HyyVxPYZnKdpaiFrJsYFhLN3Gx/gGS4p3Hqxim2W5J2M3USsbNMmSpFXbs0JuFpWS3KAPF1SHWa8FVUlaQx7kV7bN4qzgHxFqRZJWa08LexaVYsapeT5qpcioUCuStOI88FEphZWik5wV/VNN1Mo6RjXJkqRlGdRfLslRoJa46fVSeeDNQ60oDyRp6Tw4IiqlvZUd2rQ6i1awaWiSJUmL2tObXS7JGPcbzketaLItSUvlQbjNsorbd2dV/7ANzAi1IkmL2jN0StxRKWvVXNSKFlQl6ch5sAQqpTOV7dtUqBVJWtyeyUGltKO2C0EeaEFVkhbOgzyltW2zOGv4MULUSpFRoVYkqcWgTVRK3ajp9eI6HLWiPJCkcJsl3w50krPGH8afZAm1IklNe4aolJqR0+ul8kCoFUmaW9cuOfLU2kE6dNrwQwm1IklNe3oUya12ucSQ2m6iVrSgKqU9D9q6zeK06YcTakVKuz2TgkqJQv7a3UtCrUipz4N8e7dZnDb+kEKtSOm1ZxOV0iCj7z3+gmqOEiOso095IKUwDwoU273N4rT1RxVqpdtfFX3W3bKnj0qpp256vXQeCLWiPEjbp27TYDpApbQ5D5yO2DRErQxrIS3iiJSit6fVgkqx9ZEskAdCrSgP0lTXa0KlRF/ZEE6yZsiyngEtpEnGPl/73/Q8M6C6XjQPhFqR0pEHa0SldKeyQ5vmKAq1IhlrT4tKalAp7ciDQnAbrwVVybw8sLCDZbOOHvzjdPQX8VErBdaxTpMsyTB71oJlM70OX0kezEWtKA8kM/LAClgMHc8Dp8O/jkWGulArkkEGtbDaiUZIlRZCrSgPpOTnQZFcNHngRPBLzUWt2DR0by0l9n7axqNEjorqeg21PRe1ojyQkpwHkR7840T0yzVRK+sZ0CRLSqg9oUxeqJS25EGJMsOsZ1B5ICUyEWwsyu1GpcSlskGoFSnJdd1EpXR0uSRFysyiVtYrD6TE5UGmO9ssTqS/6kKoFZlUir89LRqzqBQ9X7c3D4RakZKVCHNRKRHngdMVm7aiVjTJkuJuT5eCUCkdzINW1IoOEZHingchKqUreeB05Rf3ARSaZElxf772Z65CpXQ+D3zUynqG0CEiUpzzoEyum3ngdNGmXgtqRa/EpDjasypUSoS1LdSKFN88sLCozqJSuianix+D1YJaGRVaQYqZPetCpUQsH7Xio5eUB1Kc8sCmTj4KVEqcKzusbaFWpDgZ1F8uKQiV0qU8cIVakWKXB/moUClxr2yYj1rRoQFSN++nbTyK5Dp1Do+0rNqu8kqwoCrUitTdPIAi+ehQKUmo7LC2hVqRum9PoVLikgdFZrSgKnU5DypRo1KSUtkg1IrUTYPawXJJEVevw2OTBzmKjAq1IkVe17HdZnFi9VE1USuaZEnRGdTfqCiQ17JZ7PLAm4daUR5Inc8DmzrF7qBSklXZoU2rvExOqBUpInt65IVKiXFtz0WtKA+kTudBF1EpyatsaB4aMMQGBhBaQeqMPUOoTy4+yyXSEfLAR61sYFB5IHU0D8rkKMd3m8WJ7QeYwSMfHBrQpwUUqSP2FColObXtCbUidTwPfFRKjN+3OTH+GBdCrcikUjsMamFToxAHNIK0ojwQakXqTB4kZJvFSYBNhVqR2mvPDA1y5Kliq64TV9vzUSuqbak9eZAIdJKTgA9VqBWpnXfT4XIJZPSRJLS2q7xCjg0BakW38dLq8iCGqBQTKjusbaFWpLXbs0JOqJTEK1xQHWa9FlSlNeVBPlnbLE6CPmShVqTV29PCohagUmx9bwxQE7WyTguq0orzwKZGnkLS0ElOoj7qJmplHaOaZEnLNGi4XFKgpum1QRJqRVptHjSYJp/EPHASadPqLFpBkyxpaXs2USmaXptY262oFdW2tHQeJHibxUnkB+8DMMrkhFqRlrCnUCnmay5qRQuq0sJ5kAhUipmV7dtUqBVpKXsKlZKm2i4EeSDUinSkPPBRKQneZnESfBlC1EqRUaFWpMOer31USl3T69TIR634C2lCrUhz86BO3oQ8cBJ+MfxJllArUqs9MzSYpkBN0+uUyb/2Qq1Ic+vanUWlJD4PHAMuilArUqs9PYrkqKDpdXpruxW1otv4tOeBUdssjiEXp4la2aBJVkrt2USllFTXKZe/dvhSgFrRbXya8yBv1jaLY9BFEmolzfa0sKmSp0hDL8Ml/AXVHCVGhFpJbR4UkodKSVNlC7WSZnvWyVGgrum1NC8P5qJW0pQH6RwItKJS6uad0+cYadMQtTKshbQU2NNqQaXodbh0eB6kFbVipTIPWlEpBuaBY+SF8ydZM8EhIppkmft8LVSKtLw8EGolLXmQcFRKOis7tGmOolArxhrUxgqWzYRKaXf0mZkHQq2Y/J21sINlM6MP/nGMvpA+aqXAOtalcJJltj0zwblcDb0Ol1aQB0KtmJgIFlbAYjAeneQYfjEtMtSFWjHOnu4sKkV13X7PmJ0H81EryoOk54GNS8EUVEraKxvmo1ZsGrq3TvDztY1HSagUaU213YpaUR4kPQ9Stc3ipOTiNlEr6xnQJCux9oQyeWY0vZbWnAclygyznkHlQYLzwDhUiiq7KaFWkmzPJirF6OUSKdI8yAV50Kc8SGAepHKbxUnVpV4ItSKTJsGeFg1y5LVsJrU5D7wUo1aSmghGo1JU2QvZtBW1oklW/O3pL5cIlSJ1Jg9aUSsN3cbHPg9CVEoq88BJ5YX3ARxlhtigSVasn6/9mWOeGbRsJnUyD5qoFZQHsc6DMrk054GTapvmA7SCJllxtWdVqBQpsjwoBMREoVbimAcWFtVZVEpq5aT6i9BErYwKrRA7e9YpUND0Woo0D4RaiWseNMgrD9Je2SFa4WAqDw2Iq0H95ZIQjaC6lqLOA6FW4pcHRXLKA1V206ZN1IoODeju/bTh5/BIiciDKq8EC6pCrXQ7D6BIXgf/qLLnSqiVuNhTqBQpHnlQZEaola7nQepQKars5UuolW7bsxagUvT6S4pHHviolfX0qrYjzoPUolJU2StRE7WynmyAVpBJO29QCztYNqvLnlKs8mA+akV5EE0epBaVospejU39QwOEWonKnh55oVKk2ObBXNSK8qDzeZBiVIoqezUKDw0YYgMDCK3QKXuGUJuclkukmOeBj1pZz5DyoMN5UCZHWdNrVfZKlcFrQa1oktUZewqVIiWltj2hViLIAx+VoudrVfYqZC2AWpFJ22NQf7lEqBQpaXkwRYF1Qq10IA/qQqWosttj03qAWhnRJKtN9szQYJoCVWzZU0pYHrjzUCtKhHbkQY6CtllU2e2R/9eBL5NjgyZZbbibbqJSMvpIpETWtr+guoFhLL19W0MeCJWiyu5gbReDSZZQK2uxZ4WcUCkJuFbSUnlQosww67WgusY8ECpFld0hCbWyFntaWEKlJOY5UlpeHuSCPNCC6srzwEelFJQHquxORlmIWlnHqCZZyzZoE5VS0/RaMioPhFpZbR7kySsPVNnR2LQ6i1awacimS9qziUrR9FoyLw9aUSuq7eXkgbZZVNmRygeAlMkJtbKoPYVKkdKSBz5qZQODOgtwiTwQKkWV3SWbCrWytD2FSpHSU9uFIA+EWlkoEYRKUWV3WUKtHNmeQqVI6ZOPWvEX0oRamZsHGaFSVNlxqe1W1IpquxWVUpM9pdTlQUOolcNu311y5JUHqux4aC5qJc2TrHC5pEiOCppeS2mt7SZqJc0Lqv54zNM2iyo7nrWdbtRKc7kkL1RK4q+ktPY8mOGlFKNWhEpRZcde6UWthGiEaoBKsTXBS/RTotSe2m5FraQzD/xtFv3ttSo7tmGXRtRKiEbIUaCuaZUkteTBfNRKWvKgwTR56mIxqLKTYNMQtTJs/ELafFSK6lqS5udBLVhQzaYmD0JUivJAlZ0I+ZOsGYbZwICxC2laLpGk5eZBE7ViG3qEbysqZUZ5oMpOok1NRq142FhUhEqRpGXmgbmolXB6XQlQKcoDVXYidThqxQSb+r9FJjiXS2gESVp+HpiHWgnrus60UCmq7KTLPNSKh4WFK1SKJK0qD+ajVszIA6FSVNnGKESt5FnPUKInWeH0ukSOiuxpqPR32Z2v7bmolaTngbZZVNlG1naBUoJRK0KlpKdSpCjyoESZYdYzmNDJtidUiirbbCUXtSJUiiR1Ig9ylBhJHGqldZuloHO5VNkmP78cjlqxEmFPiwY58loukaQ250HSUCvzUSnKA1W28TZtRa3Ee5IVnsNTECpFkjqUB7UgD7JkYn6ISDi99lEpygNVdko0F7US10MDwul1ScslktThPPBRK+sZin0eCJWiyk6tTeOLWtE5PJIUdR4UgrMA+2OZBxYWVaFSVNlpVjxRK6E960KlSFLEeRA/1EpzmyUvVIoqO+3y0QpxQq2EyyUFoREkqSt5MB7DPCiSUx6osqXQpu1BrazV3nOXSzStSqeEUul+HsQDtRLmQZG8tllU2VKr2oNasdZsT6FSJP3NfTzyoLuoFW2zqLKlJdQ91Epoz1qAStHrL0mKQx40USvR1rY3u80iVIoqW1rk+aYbqBUvOIenIFSKJMUuD+aiVqLJgwx1ikKlqLKl5dm0yisRoVa8IBbyQqVIUkzzYC5qpdN5oG0WVba0QoWTrKGOolaESpGkpORB51ErXnDLXiZHWdNrVba0MmXwOohaCeu6So5SMLmSJCm+te11ELXSzAMflaL3bapsacWyFkCtWG0yqIVNjYLQCJKUqDyYoqJ18ksAACAASURBVMC6NqNWwm0WoVJU2VIbbFpvQa2sfZLlBbiGaQpUsWVPSUpUHrjzUCtr/eNOPw9yFLTNosqW2iH/ryNfJseGNU6y5i+XZPThSlICa7uJWrHW8PYtfB0uVIoqW+pAbReDSdbqUCtNNEJOqBRJSnwehKiV1S2oCpWiypY6rNWjVkKwv1ApkmRSHuSCPFjpgmq4zSJUiipb6qAWQq0sbdMmKqVATdNrSTIoD7wVo1ZCVEpeqBRVthSNTasBWsFHrSxm03B6HaJSNL2WJNPyoBW1svhtvFApqmypC7KBmQVQK3PL25v9XwqVIklm54GPWtnA4BEX0poH/wiVosqWumLTI6NW5qNSZE9JMj0PCkEe9C+SBz4qxRY6SZUtRa8joVaayyVF6ppeS1Jq8mAqWEg7PA+ESlFlS13XfNSKP8kKUSk1Ta8lKWV50DgMteKjUvLUVNeqbKn7aqJW1jOMExyjqeUSSUprbfuolfVkcWgIlaLKluJX2x5FKozQQ1HTa0lKfR6UqFCil1IwvZZU2VJM5C+XOMzwP/Swjl4yeG07RESSpCTmQZlnsdmgPFBlS/Gyp/8qbJJJKhxNlRp99GLLppKU0jyocZBJZthAlaryQJUtxcWgFjYNJhhnBosMNlCnQZV+nAX+WluSJLPzwGWScUqzeeAyQ40+epQHqmypu/fTPmd4nHywG+7fR1tY1CnQSx+OTCpJKcqDAgfJ45HBhywBWNSp00M/Gay2nbMtqbKlFdjTxqLEONO4c/6UywtM6lGhRi99mmRJUiryYIYJpmgs8KedFlClrjxQZUvdsKdFhgrjHKJG5gh/e21h4VHWZFuSUpAHVSaYpHrEPPD3yJUHqmwpYoP6JKMJJqhgLXEFLSxcZqjSr0mWJBmaBw3GGae8gjzoo1d5oMqWOn8/ncFlinGKRySbWQv8vxsU6aEPR5MsSTIqDzxyHKSwbNKhnwclarN5oDRQZUsdsaeNRYFxcsFyyfKlSZYkmZgHRcbJzdtmWW4e1IIFVeWBKlvqgD1tZhhnisYqD/oIJ1m99GmSJUmJz4MyE4tusyydBxVq9CkPVNlSe+3pn8s1ySRV7CXt6S1yb23hagFFkhKfB3XGl7XNsviztoU3O9lWHqiypTYY1F8umZxFpaxV4SQrRK1osi1JSSrsDC6HZlEpa88Daw5qRXmgypbWZM8QlcKy7Wkt63/RRK14sqkkJSQPIM/4LCqlPfLzwEetaLKtypZWac8joVLaZdP5qBXVtiTFOw9mGGd6QVRKO/JAC6qqbGkN9vTRCPVlTK9Xa1KhViQpCXnQRKXUlAeqbCleBvXP4ZlinErH7Nlq0+YkSzaVpDjmQX0WlRJNHmghTZUtLfN+OoPHoUVRKe23aTjJ6qNn9q5ekqR45MEU4ytApbQjD+aiVpQHqmxpQXuuHpWydpvOn2TJppLU/TxYHSqlHbU9F7WiPFBlS4fZs7wmVMpaTWoJtSJJMcqDChMc6uA2y+ISakWVLR3BoP5yySQTi57DE01th5NtTbIkqXt5UOMQExFssyx9G+8fKqQ8UGVLs/Z0mWCcEnYMroeFJdSKJHXt+TqDy2TbUCntuY0vURVqRZUtezZRKQW8GF0LoVYkqTt50AlUSnvyoBW1ojxQZafQnq2olG5Mr5ey6XzUikwqSZ3NgxCVEs88qAm1ospOrz1tKh1ApXhtNanQCpIURR5EgUppx7O28kCVnVJ71hhngnLbl82stts0RCv0C7UiSR3KAx+VMhPbup6bB6VZ1IqLXpGrso02qIXdgkpJxqfvoxWK9AitIEltLuwmKoXE5EHrgqrQS6pso+1Jl1Apa7fp/EmWbCpJa8sDf5vlYBdQKe3IAy2oqrKNt2c0qBSvQyZFqBVJalse2JS7ikppRx4ItaLKNtKgISplkkpXUSlrt6lQK5LUjjyocZDJDmyzRJ0Hng4RUWWbZ08flTIT0fTa6rhNW1EryKaStMI8CFEpyc/fuWcBKg9U2Ym251xUSsaY38yClsm2FtIkafl5UOBgzFAp7ciDELWiPFBlJ9aeraiUjHG/YfPQgF6hFSRpWXkww0TXDv7pdG0LtaLKTrQ9bcpMMkkt0dOqxU2qSZYkLScRmqiUqsF5INSKKjuRdR2iEfxzeMz+hOeiVjTJkqSF8qDBOOOUjZheL50HJd3Gq7KTczdt486iUjKpqDChVkz7Fnv6ENpW2Bk8phmnCKnJA39BtaY8UGXH356Ho1LS8WXVJMusyJXakQc2FkXGW1ApXmryAGoBw8FRHqiy42lPmxnGmaLe5U/V65pJhVqRpPmolNZtljQ5wtKCqio7rvaci0pJ72cq1IqkPGAeKiXdeeDpUCFVdrwMamHTiBSVspzn3e7aVKgVKc15YBIqpT238SWcALWiybYqu6v30yEqJR8sm0nhTUPz0ACVtpSmPDAPldKePAhRKzr7S5XdJXuajUpZu039SZYW0qS05IFNKUClKA8Wqu2qFlRV2d2yp0WGCuPzlkvi8/PFw6SW0ApSavLAdFTK2mUrD1TZ3TCohU2dCSaoaFq1jNoWakUyu67t1KBS2pcHffQqD1TZURg0g8tUCyoljraI388j1Ipkah545DhIQdssK8qDVtSK0kCV3SF72liHoVKk5dnU0yRLMjAP5qJSpOXXdlWoFVV2Z+0ZF1RKUk1qCbUiGZUHh6NSpOWreRag8kCV3WZ7WtjUmGSCmvEHfXS6tl0toEgG5EF48I+m12u/jdchIqrsNhrUP5drMkCl6G567TZlDmpFJpWSVdiZ4OCfkvKgTXkQEhOFWlFlt8Ge/jk8eZA922rTJmrFk02lxOQB5BkXKqUDeeCjVpQHquxV21OolM7aVKgVKWl5MMM400KldCgPtKCqyl6TPX00Qh1bBu2QSYVakZKRB/42ywST1JQHygNVdrwM6p/DM8U4FdkzApsKtSLFPQ/qTASoFOVBNHmg2lZlL/N+OlwuKcqekdm0iVrpQYcGSPHKA48pxoVKiTgPWlErygNV9hHsKVRK92w6f5Ilm0pxyAOhUrpV27U5qBXlgSp7AXuWGWeKBja2PpTITSrUihSvPKgwwSFts3TxNl6oFVX2gvb0z+EJUSmyZzdrO/wbTU2ypG4lgr/NcohxqsqDrt/Gh5suygNVNuG5XA0mhEqJkU3nolb0SkyK8gY+g8ukUCmxuo0v4Qi1ospunsMzTkHT61jZVKgVqTt5IFRKXPOgiVrRU3ZK7SlUSrxtKtSKFHUehKgUbbPEMQ+EWklpZTfP4ZkUKiXWJhVaQYomEfxtFqFSlAeq7BjWtb9cMs4EZSOPzfMMs6mrBRSpo3ngUGeccWZU14nIg9IsasUldSMzJ2UGtbDxOMRBSjo2LzE2baJWdPaX1N7CDlEpRbSMm5zabi6opg695KTMnqQAlWIZ+Tt51IRakdqaB0KlJDnj6rO38anKAydV9hQqJdkmFWpFal8e2JSFSkn4bXwKUStOKgzaRKVUjZxep8ekQq1I7cmDGgeZNHSbJU154KXtEBEnFfZ0GWeCGU2vDbGpUCvS2vIgRKUoD0y6jU/FWYCO0fYMUSkHKQqNYJRNhVqRVpsHBQ4KlWJgHviolYzpt/GOwfZsRaVoem2eTcNJVq9QK9Iy82CGCW2zGJsHtTSgVhxj7RmiUmqaVhlr0hROsqRVJYJFhgqTTGqbxehn7RSgVhzjzOmjUuqMM0EFW9Mq42u7iVpJwSRLWlUeNBhnnLKm16nIg5LJt/GOYQa1sHE5xDjF1J7D46XOpvNRK5psS6ETMnhMM04Bn8ugW7o01LbBC6qOYfZMAypFWsimKZlkSSvMgyLjTM/mgb4X6bmNn7ugasx1d4yxp43NDONMUU/5yy8rtb+1UCtSax74qJQamdllM30j0nUbb+CCqmOEPUNUyiQVMppWpdikQq2orpmHSlEepDkPwgVVY27jncQb1J9eTzAuVIrE4ZMsvQxNV2H7eSBUinT4bbwRC6pOou0ZolLGyad22UxayKatkyyVdnqer/1tFqFSpMPzwBDUipNge7aiUmRPab5N/UmWFtLSUtetqBTlgXR4bVdNWFB1EmpPH40wHiyXyKDSQia10oBWUF0TbrNMCJUiLSL7sDxI4NO2k0CDWtjUmWCCiqZV0pK1LdSK2YVtYQuVIq0wD/roTWYeOAmzJ2RwmUo1KkVaqU2FWjH3+bqJSlEeSMvPg1bUSqLSwEmUPW0soVKkVdq0KtSKYXVtY81DpUjScvMgRC8lDLXiJMqeZca1XCKtUrZQK0bV9UKoFElaSR74qJVE5YGTCHta2NSYZIIatgp7GZ+YtPC9tYWrhbTEf7v9bZaDTFDV9FpaUx4k7ixAJ/YG9ZdLJgNUiupaWqtNEz3JUmGTCQ7+KSkPpDbdxicIteLE3p5CpUidqO25hwZoIS0pdQ15xoVKkdqeBz5qJfboJSfG9hQqZfVfQGnpT0molWTVtY9KGWda2yxSR/Jg7oJqTJPUibE9q4xziLqm16v4/KTlmFSolaR8n5uoFG2zSJ3Mg0rc88CJoUH9c3imGKcie0odt6lQK/EubIsM9VlUivJA6mQe0IJaiWVtOzGzZ3O5RKiUtXztpJV9XiFqpWf2qU6KSx54TAmVIkWcByVq8UQvObGyp1ApUrdsmpBJVqrqOkSl5LTNIkVe27Vg0yVmC6pOrOwZolJsoRGkyE1qCbUSs7quMKFtFqmLt/ExRK04sTCov1wiVIrU/doWaiUeeVDjEONUdC6X1OXb+HDTJSZ54MTCni4TjFNSXUsxsOl81IpekUf7fJ3BZTJApYhsJsXhNr6EE6BWup4HTtft6ZHjIEU82bONn6u01toWaqUb31sbS6gUKZZ54KNWuv6tdLpsT6FSpLjaVKiV6PMgRKVom0WKXx7U4nAWoNM1e9qUmWRSyyUduSeU2vE5CrUSVSIIlSIlIVdjkAdO5OYkWC4ZZ4Kylkuk2Ne2G7cFFMOeri2cAJUyo7qWEpAHpW6iVpyIDWpht6BSNL3uVAxK7b27notaUWm375vaikpRHkjJqO0uLqg6EdsToVKkRNp0/iRLA4i154FQKVJyb+NrNOiJfkHVidSeQqVE9XWSOvGpCrXSzjywKQuVIiVWdndQK04kBm2iUqqaXkcSiFJnatufbGshbW3fTn+b5SCT2maREp4HXtSHiDgdN6iPShlnghlNqyQjbNoIFlB09tdq8sAWKkUy8jY+EtSK01F7zkWl6G46qi+R1PlPuB5Mth109tfK8qDAQaFSJAPzIEStdDQPnA7a83BUip5HJHNsKtTKyvNghgkO4WqbRTIwD6pRoFacDtnTIhOgUmot0yqFWlTxKEVhUqFWlvuNtMhQYZJJbbNIyoM4VXZzuWQiQKVoWiWZbdMmakWT7SPlQYNxxilrei2lJA86VttOmw0aolIOarmki18bKerPO0St6Oyv+YWdwWM6QKXo6VpKSx50DLXitNmeQqXEIyilqG0ak0MDYvUtPByVos9FSktth2cBZtr7vXfaaE+bGcaZoq6naz1lp/JTF2plbh74qBRts0hpvY2vBJPtNt7GO22xZ4hKmaSi6bWUYpMKtXI4KkV5IKU3D0LUSttu4501G9TCpsEE40KlSNJhhwak62WwUCmSdKTb+LYsqDprsmeIShknr+USSZq1aXOSlR7USpgHecaFSpGkeXkQolbWuJDmrMGeh6NSJEkKbZom1EorKmWKhvJAkg6r7bagVpxV29Omwvi85RJJkpomTQdqpbnNMiFUiiQdUfZhebCKp21nFQa1sKkzzgQVTaskaYnaNhu1Em6zCJUiScvPgz56V5cHzgrtCRlcphinqOl1jJ96pDjZdD5qxTLomyZUiiStPA9WjVpxVmRPG0uoFElahU0jOjQg0roOUSnTygNJWmFt12bPAlxRHjgrsGeIStFySfy/DlL8roplDGqliUoZZ4oaGZ3LJUkrlD2LWllRHjjLsqeFTY1JJqhhq7ATEKhSXGvbTfhCWpgHdQ4yQRVb02tJWsNt/AoPEXGWNKhFhjqTASpFda2nbGmtV6eDhwZ0vLDDg398VIryQJLWfhu/AtSKs8T9dLhcIlSKnrKldtZ2E7XiJaS2w4N/hEqRpPbngY9aWRK95CxiT6FS9JQtde4qJQm10kSljDOtbRZJ6kBqz11QPUKSO4vYs8o4h6hrei1JHTFpMlArzW2WCSa1zSJJHZK9nDxwFjCofw7PFONUZE9J6nBtN1ErcaztcJtlIkClKA8kqfN5cMTadg67n84EyyVCpUhSNDadj1rp9nDDm5MHHlNCpUhSpHlQorZwHjhzbOqjUg5quUSSIrapN4tWyHR5Ic0L9labqJSctlkkKeLargWbLvMWVJ05dV0OUCm20AiSFLlJPcpUW9AK3bt98LCxqDChbRZJ6poP56JWZivbC87hESpFkrpr0rkLaW7XnrIdahxinKryQJK6mgfNybbrV7aLg8sE45RkT0mKwdN2iFqxgUbE/76LDUwKlSJJMantJmoFGg5DHOAAJR2bJ0kxqu06BWCQ4Uhn2jaDFPkjZW2zSFKs8qCOTZZshhOwqOMiBIcZGqDHuDOZ0ygXGKDBo/w4wn/V43UMUsXF0nfIAHkM0Kc8MCQP+oH/zvAg0xzD0UBVNjWisntl0cTbs8EgA/yGXXwDgj/0iOJuvs5PeIVj2AhUdRuvypZikgcDDPFHbuB6/1KOsoUz2UCJOrYub6ItuoFhGrqGCb6CDfoY5K/cyV3MRFjYzP5bw2zmHDYqDwwI+/VkcXUNE50HvQzxEndxJ3l/uG3TAF7HNk6jjxKubKrKlrpy9VwchpjiXm7jAODQiPiPvcI8eA1beR8DzNBQHqiypS7lQYYhCvyQW3jRzwP/UmZw8YC3cAFvxWJGyycJruwhWTSRamAzRJVHuZnfAjZ06c+8wn/577iAt5FhRigVVbYUeR5YDNHgp3yHX+OTUxrNWZW/Sg7wPrbyN9QpYwmoosqWIrInDGHxNHv5acuzbvcU/lX4u9nGiTSYUR6osqXIrpvLEBl+zV4eDh6rG2FVNxXGxCDnsJlXM0NNr8QSWNl6MZ48e/YzwO+4jfup03zr1V2Ft/G9nM25HEuZqvJAlS1FkAd9DPJnbuf7VObngXWYTf3afhXnczrDlDTJUmVLHbSnRw9DvMJd3MkU3ZheL17bfh5s4DzOZFR5oMqWOprf/jbLJN/ndsYXyoOFLmU4yXojF/B2HE2yVNlSR65VA4chijzIXp7HPzXLjd3PGebB8VzAO4MFVeWBKltqt+pkGKLMw+zlD0fKA+uINvX/p+9gO3+Hq0mWKltqqxrAMA1+xs08Qxym14vXtn8swclcwP8BSsoDVbbU5jwYAp7iZn6+WB4c+VKGk6wezuQ8jtMkS5UttS1IXQbp4Vn28RAQl+n1YgrzwOZ0zucNVKmotlXZUpvyYIA+fsut/AB38TywlrCp3/SjnMdZQq2osqU22NOjl0Ge53a+T4m4Ta+XkwfDnMNmNmpBVZUttSEPehjif7mT75FfOg+WvpThJOt1bOfd9AutEPvK1h95xffqNOhhkGnu41YOENfp9eJ5YM2iVt7LoPJAlS2tMQ/yPBCgUpaRB9YyberNQa1okqXKllaqBhZZyvyk66iUtde2nwchaqUk9JIqW1pFHgxT4wlu5n+WnwfLvZThJMvivWzlb6kJtRLbytaL8ThGp8cQNk+xL0ClWAmt6/m1/W628iblgSpbWmEeDOLwK/bx8MryYCWXsolaOZtzA9SKbKrKlpa2Zx/9/IFb+EGASmkY8Zv5v0cfZ7KFYyhTVR6osqVl5EEvg/yZ73IvZcChvpIaXpnC2t7IVk5niLIW0lTZ0iLXo0Evgxzgbm5nmiQtm60kD9ZzPmcwyozyQJUtLZoHPQwxyT18l3FW8bciq7mU4SuxN/J+/i89FDXJUmVLC6hOhiwFHuJmnifJ0+vF8yBErbyfdwi1osqWFsmDYWZ4hJv5w2rzwFq1Tf3afgfbOEmHBqiypXnXwQWGcXmCfTxtbF3Pz4NT2MZb8bSgqsqW5l0JjyEsnmQfP2MN2yxruZT+JKuHTWzldZpkqbKlFnsO0Muv2cuPiTvZrF3y8yDDe9nG64VaUWVLLXnQTx+/5RYeCFyy6jxY26Vsola2cCbrNclSZcueuPQxwAvczt3MYNr0ejl5MMxmzuFoykKtqLKVB/QxwMt8jzuXg0rpbGVDK2rlAt5FvyZZquwUf/r+cskh7k8sKqVdefAatvEehnT2lyo71XngMEyOH7FvuaiUzle2b1N/kvVWtnEyOjSgu5UtlEp3PnkXiywVHmEfv8H06fVyaruJWvFnd5IqO015AFnqPM7elaBSoqlsCN/OW7yHbfytJlmq7FSpgcUAGZ5iL0/QxHqmV+Efr7yLbbyJGpUgtCRVdhryAAbo4Vfs5RHaus3SzkvZRK2cw2ZeRUVnf3WlsvViPOpY9Oinlz/OolJWhEYwVmEe+KiV11LRgqoqOxWfuUs//fyV27iHCm3eZmn3pQwf/jeyjfeS1SRLlW34592glyFemUWlxP8YzWhr2/9TlvWczybWU6JGRt9OVbbBedDDEBPcx61M0IFtlk5cyrC2T2A7b6eHIppkqbJN/KxdbLIUeJB9/JU0LputJA9ez3beGaBWdBuvyjYxD/yDf/6Lffy+U3lgdcym/kLaqWznJOqaZKmyDbTnEB4/ZS/PkOZls5XU9sls5624lJUHqmzj8mAQiyfZy8/p4DZLJy9liFo5g/M5Vgtpqmxj5C+XODzHzfy45bsuLZ0HNu9jG8dTUx6oso35lP1tlt+zL0CldHCbpbOXMpxk+aiVDZpkqbIN+IQb9DHA89zJXcyg6fXK82CI8zibjcxQVR6oshOfB70M8RJ3czuFzueBFZlNX8d23s0ARU2yVNmJ/XRdMmSZbEGlqK5XlwevYSvvZUh5oMpOdB7YZMnxALe0C5XS/cqG5iTrLWznZGAGLaR1rrL1d9mds+cQVR5hL79Fy2Zrz4O/Yztvx6aEp9pWZScuDyyGaPA4N/Pr6PIgukvZRK1s5w3UKWuSpcpOjHxUis3T3MwTpOWgj87nAbyL7ZyoPFBlJywPYJAMv+ZmHpnzfTaospsxN8BmNvNqTbI6VNl6Md7u2Pv/2zv39iiqfAu/fU3S1RkmjAFURIURHEQeh4uohHsglw5fk3SuBIggAwcO6FFGOTzeGB9FPAqKyIMIhqS7k+7q88euggQFOklf6rLWJ4Da2eut2uvXa9u00MRVhjjh3MOj4/Dq+UGSvRzgWQoU5AdCtg88tkQzzfzAKOMU6u0HkbpvU5NkLaObDv7CpKpWhGyPb88EaW4yzmHuCtc18oOldLGTNvmBkO1xP7CJk+Y2xxnhdiP8oBFL6SZZa8iwhRg5DaAI2R7dnjEspjjFoKpSaugH5hesq8iwjaSqVoRsz/pBFIsCZxngaqP8oFFL6Z78bybDOlUrCNmeU8kZLvmYfqcqJaL0uoZ+YL5VXucg6zEDqvIDIdtbfpACLnGIizRwmqVxS+n+l+Ps4QArmSavJKsqyNb42eKNzsYizn8Y4MycV0yp1n4QZQc9vMgMOaLCtpDtET9IkeAKQ5zEpqHxWKTB2/TRqpWijsT0ld3gJ1iiiRTXVJXSMD9I08k+2uUHQrYn/MBUpRxljInG+0HEA9vUvF2vpJe3dWmAkN3Qp2cTx+IuxxnmFlW+Nk+ahx+soJsdtJDTQJqQ3UA/iGFxn5MM8ZM3/MAbS+leIrKeg2wgQo4yMf3FLBDZOhhfmEpOVcr7HOIKuuijkX5gnvwrHOQNZ0BVfiBk19sPzDTLRxziMp6ZZvHOUrppYQc9vKxqBX1l13l7gkWET8nyEapK8QK2zeuSqVopkZMfCNl1fG42FjEuk+XcHD4J2XP+LVGnVWafU7UyoyMxIbsu27OFZq4wzHsUUXrtFT8wyXaSveznefJMyw+E7Lr4QRMpvm9MVYqfkD0b28voYidpppRkCdk13Z5lElj8wlHGuIvSa2/6wVIOsJsl5DSQJmTX1D/NNMsdxhnlthf9wItL+bBqpY9NxJVkzRPZyrIrfVYl4lhM8l9kuY6qUrwp1w9W0cdWZ0BVfiBkV19FYljkOUe2cVUpfkS22abmUW2hl3XYSrKE7CqrBKRnVaUovfY2ts2A6kb6WA9MyQ+E7Kr7gQVcop9PvOwH3l1KN8lKsIsuXlCSVTGydTD+dCMz1Qizq1KUXntbrh9E2UE3LzFNQdgWsqvmBy008TXDja9K8S+ymfWms4QD7FHVir6yq7I9yyRJcZ0Rxsmh9NpP2I46pyP76KRdA6pCdlX8IIHFz4xxhAnv+4H3l9JNslaSYRvNqlYQshfxdEokSHGXE05Vir6u/Sb317HL6WU7KfmBkL1oP5jgFIP8hC+mWSI+2aYmyXqNPjYQUZL1RGTrYPzPVSJCK3k+oJ9vUFWKn7Ft/GAtfbxBjClVLwnZC/KDNDNcoJ8v/eMHfllKN8kyVSurmVHVipA9L+sqYxHlEgNOVUpEuA4EtrfRw1pVLwnZ8/aDFHG+YIBz/vIDPy3lw6qVvex3qla0TYXsSrZnE81cZZCTTlWKZsODILOOTeyim+fIMy0/ELIr8oMkKb5nhHcpAHGKfsKgv+Riu50edmApyRKyn/I8SiRJcYujHOYeGjYLllw/aKObXapaEbIr8IMEFnd4l2F+xYfTLH5cSvdIzFStJJhUkiVk/6mKxGhlgjNOVYrS6yBKVStCduV+kCbHefq56lc/iPh2mxpsb6GXV3VpgJD9h+dg7l22ucAAnwrXgce2W7WSYQNlDagK2X94EmUsIlwk61Sl+HSaxc9LaZKsBDvpdqpWtE2FbHd7tpDgP2Q5i5rNwiHjB1E66FHVipD9iB8008Q3DHKKEr6eX0/EWQAAD7lJREFUZvH3Us6tWmlTkiVkY2PTTDM/MsoxVaWESq4fWOxnH8+QD33VipBdpkQTLdzkCGN+qEoJNrLhj1Ur4U6ywo1sd7jkN95jyKlK0UUf4ZLrByvo5R2skN8FGG5km4t/0vzOaQb8UpUSfGSbbepWrWTYSJgvDQgvssvYRGilwHmyqkoRtoG1ZPgnMaYw2aWQHS4/gFaKfEjWT1Up4UA2uOlEhHfoZXVok6ywIrtEhBZiXCLLBR7WWkphlfvjna1kWEuRgmPaQnY4/t9mmuULspwnUNMsQVrKuVUryyiE8O6vMCLbDJck+e5BVYqvqhGkGr/GJ9lDF89SCOGAahiR7U6z/DCrKiVA0yxBW0r38KOdXrbTGrokK2zINlUpFjcZZ5R76KIPaa6/mZ/ytNHNTv5KjhliIfKDsCHbnWb5lRMMOVUpAZtmCeJSutj+OxmnaiU8SVaYkF3GJkor9znNINfQsJn0JD94kcyDqpWwvMaHCdnuNEuOcwzwbVD9IBLYbWoG0jaT4VVK5AlHkhWWyzfN9rSwuUCWz9CwmVQJtl+njw3YofGDsCDb+EGKCBfp5yIBnmYJ8lI+rFrp4fmQDKSF4yu7BLQQ5yunKkUXfUiV+kGUDnpZxUwo/CAcyHanWa4wyL+wCfQ0S7CX0k2yltDFbpYyFfgkK/hf2W41wnXGOEoOpddS5X4wu2qlnRzTAfeD4CPb+EGKGxxjlPvB94NICLZpxKla6eUtWpgMdJIVbGSXsYnRyh1OMOxUpQjX0kL8YAU9bMcKuB8EG9nuNMvvnGIwKFUpQjY8TLLW08dGIEc5oNs0uAfjZntaTD+oStGwmbQ4P1hLhk1EmQqsHwQX2Q+nWf6Hfi6Hxw/C83OH2VUrL1MkH8gkK6jINlUpUT6lnwvoog+pOn4Ab5LhlcBWrQQV2aZ/I8aXTlVKiKZZwvQTe9fmW+ikk2XkA5hkBRHZNjYtNHGVIU449/DoOFyqlh8k2ct+nqNAIXB+EERklyk5VSmjjFMImx9EQrdNTZK1jG46+AuTAataCRqyTTVCWlUpUk39wFSttAXOD4KG7DI2cdLc5jgj3A6jH4SxKt9NstaQYQsxcgEaQAnS+JkZNrOY5DQDXBeupRr5gfkF7yoybCMZqKqVICHbTLOkyXOWAa4S0mmWsF5K5yYfm8mwLkDVCsFBdokIFiU+5hCfo4s+pNr6gXkZfJ2DrMcMqAbhCt/gILtEhBRwiUNcJMTTLOG9+txd8ji76WIl0+QDkGQF42DcxsYixlcMcGbOK5Yk1dYPouyghxeZIUfU96/xwUC2mWZJcoUhTmIT6vO2SMi36aNVK0WfH4n5H9luNcI1DnNMVSlSA/zAYj97WRYAP/A/st2Lf25wlDEm5AcRbVPn7Xolvbzt+0sD/I1sk16nucu7jHCLgF2bJ/nID1bQTQeWz+8C9Dey3WmW+5xkiJ/kB0K2K/cSkfUcZAMRHydZfkZ2iSgWBd6nnyvoog+pcX5g/vJe4SBvOAOq/vQDPyO7RJQURS5wiMtomkXIfkRuWtpBj4+rVvyKbNP8HFFViuQZbJvXRVO1UiLnSz/wK7LdaZYQVqUI2fN5FibJSrGPTpaTY8Z3R2J+nBh3q1K+ZVhVKZLn/CDJHg7wPHmmfecHfkS2qUpp4ftwVqUI2fN9Hubrrp1udpL2XZLlt69smzIJLH7hCGPcQ2mV5EU/aKOL3Swh57OBNL8h21SlWNxhnFFuyw+E7ErkJlmrOcgm4r5Ksvz0lV2mRPyRqhRd9CF51Q9W0cdWkr6qXvITssuUiGGR5xzZ8FalCNkL3abmT8WtWvFLkuUfZJeANCU+pp/PUHotedsPzIDqRvpYD0z5xA/8g2zjB2Uu0c8n8gMheyFPxiRZCXbRxQs+SbL8cTBuY5MiwWUGH1SlKK2S/OAHUXbQzUtMU/ABtv2BbHea5WuGVZUiZC/u6Zg3vSUcYI8vqla8j2ybMklSXGeEcXIorZL85gdp9tFJuw8GVL2PbHea5WfGOMKE/EDIXqzcJOt5+thGMzlPD6R5+2Dc3MuV4i4nGOaW3qYlH/qB+XXwcnrZTsrjfuBtZLt+MMEpBriB0mshu2rb1CRZr9HHBqJMgkcH0ryM7BIRWsnzAf18g6pSJL/7wVr6eIMYU56tXvIysktESDMzqypFfiBkV/E5RZw/pw56WM2MR6tWvHowblPGIsolBvhozvOUJD9j+016WevZ6iWvItumTIo4nzPIOfmBkF2rZ2WSrBR72T+naqXsmefoLWSb52JTpolmvmWIkxRRk5EUDJm/4yZ20c1z5Jn2HLa9iGx3muV7hjlOAYhT1B+TkF1bbLfTww4s8h4bSPPaV7a5hyfFLY5yWFUpUkD9wKtVK15Dtpte/8Y4I/yKplmE7DrIPRJbQx+bSDDpoSTLW8guEqOVCc6Q5TpKq6Rg+sHsqhVzF6BX/MBbyC4SI03uQVWK/EDIrju2t9DDPzx0aYBXkG3mPtPYXCDLZ9qeUij8YCMZNlD2TNWKd5BtplkiXCTrVKUovRay6yyTZCXYSbdTtdL4beoNZNuUaSHJZbKcRU1GUnj8IEoHPZ6pWvEGsm3KNNPENwxwyqlKkR8I2Q15erOrVto8kGQ1Htk2Ns008yOjHFNVihRCP7DopJNnyDe8aqXxyC5TookWbqoqRcj2htwD35Vk2EZzg5OsxiLbDJdY/MZ7DDlVKapGkMLoB8vJ8A5Wg+8CbCyyzcU/aX7nNFlVpQjZXtqmbtVKho008tKAxlWplLGJ0EqB82RVlSIJ26wlwz+JMYXJbsOEbIPmVop8SJYv5QdCttdk0pkI79DL6oYlWY1CdokILcS4RD//5mGtoySF1Q/Mj5e2kmEdMxQcaIUD2WaaJcEX9PM+mmYRsj36LGdXrSyj0IC7vxpxMG6GS5J8x6BTlaJqBElyX+OT7KGLZyk0YEC1Ech2p1l+YIR3naoUpddCtkflHv6008t2WuueZNUb2aYqxeIm44xyD1UjSNJsfzU/ZWqjm520McUMsTr6Qb2R7U6z/Mpxhp2qFKXXQrZPsL2GDJtJMEn9kqx6IruMTZRW7nOaQa5pe0rSE/zgRXp506laqddrfD2R7U6z5PhvBrgqPxCy/bVNzUDaZjK8Sok89Umy6oVssz0tbC7Qz+douESSno7t1+ljA3bd/KBeyDZulyLCRfq5iKZZhGwfanbVyso6DaTVB9kloIU4XzlVKapGkKTK/CBKB72sYqYuflAfZLvTLFceVKVomkXI9unTNUnWErrYzdI6JFm1R3aZEs00c50xjpBH6bUkVeoHbtXKfvbRTo7pGvtB7ZFtqlJS3OAoh7kvPxCyg4LtlfTyFi1M1jTJqu2PvEw1Qit3OMGwU5Wi7SlJ8/eDFfSwHavGflBbZLvTLL9zikF+Qum1kB0QuUnWevrYCOSo1UBa7ZBttqfFNOcY4BttT0lapB+8Qh+biDJFuUbYrh2y3WmWEh/Sz2X5gZAdNM2uWnmZIvmaJFm1QrapSonyKYf4N6pGkKRq+AFspY+/U6qRH9QK2aZ/IsaXTlWKplmE7EA+66gzuNVJJ8vJU6h6klWLLNvGpoUmrjLECUroOFySqucHSfZwgOco1MAPaoFsd5rlB0YZpyA/ELKD/bwjTtVKDx38hckqV61U+yvbVCOkuckxDqsqRZJq4gdtdLGLtqr7QbWR7frBbY4zwm35gZAdBs2uWtlCjFwVB1CqiewyNjEsJjnFINe1PSWpJn5gfsG8igzbSFa1aqWayHanWQqcVVWKkB02ucnPJvpYV8VqheodjJec4ZKPOeRUpagaQZJq5QfmZfh1+ngNyFGuyhW+1UN2iQgp4H+dqhRNswjZoXvy5k8+zm66WMk0+SokWdVBto2NRYyvGODMnFcMSZJq6QdRdtDNS8xUZSCtOsi2sUmR4AqD/AsbnbcJ2aF9+g+rVnbxN6YoLvJIbPHIdqsRrnGYY+S0PSWpzn5gsZ+9LKuCHywe2e7FPzc4yhgT8gMhWytg3q5X0svbi740YHHILmMTx+Iu7zLCLXRtniQ1xg9W0E0H1iLvAlwcss00S5oJTjLET/IDIVsyci8RWc9BNhBZRJK1GGSXnOGS9+nnCrroQ5Ia5Qdu1cpB3nAGVBfmB4tBdokoKYpc4BCX0TSLkC3NkZsWb19U1cpCJ8ZN83GET+nnAhoukaRGY9u8Lr9JL2spkVuQHywU2TZlpyoly/k5/iQJ2dKDtTBJVgud7GMFOWbmfSS2EGS7VSnfMqyqFEnymB+YqpXnyTM9bz9YCLJNVUoL/8dhVaUI2dLT1sN83bbTzU7S806y5nswXsYmgcUvHGGMeyitkiTv+UEbXezmr/OuWpkvst1pljuMM8pt+YGQLT1dbpK1moNsIj6vJGs+yDb3cllMcpoBpypF1QiS5E0/WEUfW50B1Ur9YH7INtMsec7Rz3fyAyFbms82NVtlMxnWYVecZFWO7BLQSpGP6eczlF5Lkpf9wAyobiTDa8BUhX5QObJLQJoyl+jnE/mBkC3Nf2VMkmWqVl6oMMmqDNluNcJlBh9UpSitkiTv+4FbtTJNoQJsV4Zsd5rla4ZUlSJkS4tZHfOmu4QD7GFpBdUKT0e2TZkkKa4xyjg5lFZJkr/8IM0+OmmvYED16ci2KZPA4mfGOMKE/EDIlhYnN8l6ngxv0UyO0hOSrCcj29zDk+IuJxjmlt6mJcmn2F5OL9tJkXviQNqTke36wQSnGOAGSq+FbKlK2DZJ1mv0sYEoU4+tWnkSsktESFPgAw6pKkWSfO8HbtXK4/3gScg2fjCjqhQhW6rFOkUcvG6nhzWPvTTgcci2KWMR5RJZpyolIlxLku+xbapWHle99Dhkm6qUOJ8zwHn5gZAt1WatzJFYir3sZzk5ZpxtWn6wjn+GbJsyTTTzLUOcpIiajCQpCDL7OMluupyqlUexPRfZxieMH7TwPcMcpwDEKephCtlSLbHdTg8dpMk/MpD2KLLNPTwpbnGUw6pKkaRA+oGpWllC7hE/ePQr2/WDO4wzwq9omkXIlmouN4NeQx+bSDA5K8mai+wicSzuc4Ys11F6LUnB9YM/q1qZi+wiMdLkOEeWq/IDIVuq5zY1SdZmevnHrEsD3I5xsxXT2Fwgy2fanpIUAj94tGrlIbLNNEuEi2SdqhSl10K2VFeZJCvBTrqdqpUIEZZiUQRaSPIlA5xFTUaSFBY/iLKd3gdVK9BGKyXKNNPE1wxyyqlKkR8I2VIDVm921UobOWb4GykStPAjI6pKkaQQ+oFFJ508Q54CS0kTJ8VNxhjjvvxAyJYaq4dVK31sI0krz3CH9xhyqlJUjSBJ4fMDU7XSjMUy7qkqJTj6f0DO9j23rwOYAAAAAElFTkSuQmCC' + + const ipfsImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAYAAAB/HSuDAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNS0wMy0yOVQyMDowMzowMTwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjMuMTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj41PC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMDI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4xMDI0PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cqs1kDUAAEAASURBVHgB7N17jGT5ddj3X9269epn9ezu8CWJr5WiFenRLGUYkaxIVmwlFgIDysOwBlkK8W5gcjiUEMnwXwsJRoj9K8gMsNLsjAIslVALL/8KHCgIEERAFCCBHSPel0WvRa1EUtwhV5zp7e7qrud9VM653dXbM9PTXY9bVfee+y2y0b3dVbd+v8/vTnfdU79zTslxQwABBBBAAAHTAs/9yduvxmH499rff2917zvfdt1795wbDp0rlVzj8cfd5sc/4VY/8uG25/t/+PJnn7piGoPJIYAAAgggUGCBUoHnztQRQAABBBAwLfDLr7/e3AiGf9Z57/uP77zzjtOL/2EcPzTnkuclQYCtJ590Kx/+yL1WpfSj//zpp3cfuiPfQAABBBBAAIFcC/i5Hj2DRwABBBBAAIFHCvjf+8HPfu+bf/r43nf/0sVB8Mj7aVBg91t/4Vrvftdt/vCPPN78sX/vZ+XO/+sjH8APEEAAAQQQQCCXAuwAyOWyMWgEEEAAAQTOFvhbv//7zfa//Xevxb3eJ8++58M/9er1b63+xI9/7o//4T9kF8DDPHwHAQQQQACB3AqUcztyBo4AAggggAACpwp84p/+03rpW9/+PReGP3fqHc755jAMt3rvvfcj9V/6pf9t94//ODzn7vwYAQQQQAABBHIiQAAgJwvFMBFAAAEEEBhH4DPPPXdhbRD9vlcq/YNx7v+o+8gWwb9Wb3efeuzSZ//o7uuvdx91P76PAAIIIIAAAvkRIAUgP2vFSBFAAAEEEDhT4NKv//pn/Wj4f0hRvw+feccJfij1Ad4Ly6VffOvFF/9kgodxVwQQQAABBBDIoAABgAwuCkNCAAEEEEBgEoEf+o3faDzei54t+6XfneRxk9w3Codfvlcvf/XdGzfYDTAJHPdFAAEEEEAgQwIEADK0GAwFAQQQQACBCQW8S9euXS6XvFe9kvdjEz524rvHw/ib0TC+8tbNm2/Igx/uJzjxEXkAAggggAACCCxSgADAIrV5LgQQQAABBFIS+MkvfvFjXrn2vOe5qykdcuzDSNfAW3HUf+HN27fvjP0g7ogAAggggAACSxcgALD0JWAACCCAAAIIjC+g2/0fG4RXfM97efxHzeeeYRw/t131XyUtYD6+HBUBBBBAAIG0BQgApC3K8RBAAAEEEJiPgPe5q7/+tCu7PyiVSk/N5ykmP+pwOHzbRe7zr9168XV5NGkBkxPyCAQQQAABBBYmQABgYdQ8EQIIIIAAAtMJfOZLX3qy4sq/VS57vzrdEeb/qCiKvxa46CvfeOmld+b/bDwDAggggAACCEwjQABgGjUegwACCCCAwAIENM/fr1R+0zlPPvJyi6+HQXCd+gB5WS/GiQACCCBQJAECAEVabeaKAAIIIJALgSTPP4h+xS+VvpqLAZ8yyHA4fHa7Uv469QFOweFbCCCAAAIILEmAAMCS4HlaBBBAAAEEThFI2vr5pfIrWcrzP2WcY31L6wOEw+gZ2gaOxcWdEEAAAQQQmLsAAYC5E/MECCCAAAIInC+wzLZ+549utnvQNnA2Px6NAAIIIIBAWgIEANKS5DgIIIAAAghMIZCltn5TDH+ih9A2cCIu7owAAggggEDqAgQAUiflgAgggAACCIwlkMm2fmONfIY70TZwBjweigACCCCAwIwCBABmBOThCCCAAAIITCqQh7Z+k85p0vvTNnBSMe6PAAIIIIDA7AIEAGY35AgIIIAAAgiMJZDPtn5jTW2GO9E2cAY8HooAAggggMBEAgQAJuLizggggAACCEwuYKGt3+SznuwRtA2czIt7I4AAAgggMI0AAYBp1HgMAggggAAC4wkUMs9/PJqH70V9gIdN+A4CCCCAAAJpChAASFOTYyGAAAIIIHAkQJ7/9KcC9QGmt+ORCCCAAAIInCVAAOAsHX6GAAIIIIDAhALk+U8IdubdqQ9wJg8/RAABBBBAYEIBAgATgnF3BBBAAAEEThMgz/80lXS+R32AdBw5CgIIIIAAAgQAOAcQQAABBBCYTYA8/9n8xno09QHGYuJOCCCAAAIInClAAOBMHn6IAAIIIIDAowXI83+0zbx+Qn2AeclyXAQQQACBIggQACjCKjNHBBBAAIFUBcjzT5VzyoNRH2BKOB6GAAIIIFBgAQIABV58po4AAgggMJkAef6TeS3i3tQHWIQyz4EAAgggYEWAAICVlWQeCCCAAALzFPAuXbt22S+VXymVSk/N84k49uQCWh8gHEbPvHXz5hvy6HjyI/AIBBBAAAEEiiFAAKAY68wsEUAAAQSmFNDt/l659rznuatTHoKHLUggjt2tOOq/8Obt23cW9JQ8DQIIIIAAArkSIACQq+VisAgggAACixJItvsPwiu+5728qOfkedIRCOP4ue2q/+q7N2500zkiR0EAAQQQQMCGAAEAG+vILBBAAAEE0hOgrV96lks7Em0Dl0bPEyOAAAIIZFiAAECGF4ehIYAAAggsVoC2fov1XsSz0TZwEco8BwIIIIBAXgQIAORlpRgnAggggMDcBGjrNzfaDB2YtoEZWgyGggACCCCwJAECAEuC52kRQAABBJYvQFu/5a/BokdA28BFi/N8CCCAAAJZEiAAkKXVYCwIIIAAAosSoK3foqQz+Dy0DczgojAkBBBAAIGFCBAAWAgzT4IAAgggkBUB2vplZSWWPw7aBi5/DRgBAggggMBiBQgALNabZ0MAAQQQWJIAbf2WBJ+Dp6VtYA4WiSEigAACCKQiQAAgFUYOggACCCCQYQHa+mV4cbIyNNoGZmUlGAcCCCCAwDwFCADMU5djI4AAAggsVYC2fkvlz+WT0zYwl8vGoBFAAAEExhQgADAmFHdDAAEEEMiPAG398rNW2R0pbQOzuzaMDAEEEEBgWgECANPK8TgEEEAAgcwJ0NYvc0uS+wHRNjD3S8gEEEAAAQROCBAAOIHBlwgggAACuRUgzz+3S5f9gVMfIPtrxAgRQAABBMYTIAAwnhP3QgABBBDIqAB5/hldGIPDoj6AwUVlSggggEDBBAgAFGzBmS4CCCBgRYA8fysrmcd5UB8gj6vGmBFAAAEEnCMAwFmAAAIIIJArAfL8c7VcpgdLfQDTy8vkEEAAAZMCBABMLiuTQgABBEwKeJeuXbvsl8qvlEqlp0zOkEnlTkDrA4TD6Jm3bt58QwYf524CDBgBBBBAoFACBAAKtdxMFgEEEMingG7398q15z3PXc3nDBi1dYE4drfiqP/Cm7dv37E+V+aHAAIIIJBfAQIA+V07Ro4AAgiYF0i2+w/CK77nvWx+skzQhEAYx89tV/1X371xo2tiQkwCAQQQQMCUAAEAU8vJZBBAAAEzArT1M7OUxZsIbQOLt+bMGAEEEMiLAAGAvKwU40QAAQQKIkBbv4IsdAGmSdvAAiwyU0QAAQRyJkAAIGcLxnARQAABqwK09bO6ssxLagNeD4PgOvUBOBcQQAABBJYtQABg2SvA8yOAAAIFF6CtX8FPgAJNn7aBBVpspooAAghkVIAAQEYXhmEhgAACBRAgz78Ai8wU7xegPsD9HvwXAggggMBiBQgALNabZ0MAAQQQEAHy/DkNii5AfYCinwHMHwEEEFiOAAGA5bjzrAgggEAhBcjzL+SyTzXpUqnk1jabbij/67TbLg6CqY6T/QdRHyD7a8QIEUAAATsCBADsrCUzQQABBDIrQJ5/ZpcmcwMreZ6rra27lWbTebWqXP47N4xiN2gfuF6r5cJuN3NjTmNA1AdIQ5FjIIAAAgicJ0AA4Dwhfo4AAgggMIuAd+natct+qfyKvKP71CwHyuJj9WK10mi41bU1F4Sh6+0fuHDQz+JQczGmysqKa2xdcOWVxunjlUBAf7/lBhoI6Ntz1voA4TB65q2bN98QgPh0BL6LAAIIIIDA9AIEAKa345EIIIAAAmcI6HZ/r1x7Xq6Rr55xt1z+yKtUXFUu+uvr686r1tzw6K9pqQDvVM9jwfxazVU3NlxtY9M5b4yXJkHouq09F0jAJQoG8xjSUo8Zx+5WHPVfoG3gUpeBJ0cAAQRMCozxV9bkvJkUAggggMCcBJLt/oPwiu95L8/pKZZ2WH3HvyoX/fXNTdmeXnv0OPSd6r09NzjYN/lO9aMnPtlPytWqq0ggpaEX/hV/sgfLveP+wPX2dt1gf98N5arZ2i2M4+e2q/6r7964YTPvwdqCMR8EEEAgBwIEAHKwSAwRAQQQyImA6bZ+uj29Lnnp/urq2MsxlMJ1mrceHMg71QN771SPDfHAHZML/1XZQbG54Uqym2LWWyhFAnu7uy7odGY9VOYeT9vAzC0JA0IAAQRyLUAAINfLx+ARQACBbAhYbuuXbE9fl+3p8q7/WNvTT1kSAgGHKGlf+N9HHQ8Pd11IjQCL9QFoG3jfavMfCCCAAAJTChAAmBKOhyGAAAIIOGe5rd+s29NPOz+GkruuRewCecc67PVOu4vJ7/n1uqvIzomapE+k8Y7/mUij+gBmd13QNvDM9eeHCCCAAAJnChAAOJOHHyKAAAIInCZgua1fuXKYl16TonRedfbt6af5OakRoNvV9SPsdU2mB2gAxa83nKZO6Icre6dSzOub8SBw/VH6hcFCgbQNnNeZw3ERQAAB2wIEAGyvL7NDAAEE0hYwm+c/KvCnW/3LZxX4S1lUdwUMuhII0GCA9LiPpZ1gXm+e7ztf2iL6csFfbazIu/2TF/ZLe+6RtAtMCjIaLBRIfYC0zxaOhwACCNgXIABgf42ZIQIIIJCKgOU8f32HurbZlIr04xf4SwX1gYPoxaqmBwQd2RXQ7+Wmsr1u8fdXVqU14upCgycP8J35n8FBWwIBNgsFUh/gzKXnhwgggAACJwQIAJzA4EsEEEAAgYcFrOf5H7b1ay58i/rD0ie+M3QukhoBmh6gBe1i6SAQSUeBrLS6K5XLrizV+/2a5vavJFv9F73F/4TW+F9K6sWobaDNrgzUBxj/ZOCeCCCAQDEFCAAUc92ZNQIIIHCugOU8f93uXzuq7O/VqudaLP0OcuGqAYBo0JePwMWS0x7rf0u6wDCK5ja85EJftvV7crGffMjXZb/iylIboSS1ElxOX0XE/UGSFqAFGbMSVElzEakPkKYmx0IAAQRsCeT0T7etRWA2CCCAQMYEzOb5q3NWtvvPvOYaFAg1GCBBgDh2Q/mf/n/mm7wyKOn/JEjiSQ6/XvDn4t39KSZuOS2A+gBTnBA8BAEEECiAAAGAAiwyU0QAAQTGFbCc569V6avyrn9divxZvaAdd5253wmBJC1gzw1kN4DFtADqA5xYa75EAAEEEMjr5j1WDgEEEEAgTQHLef6j7f71ZtOV5tXWL83F4FhLERhKakVvd9dZTQtwjvoASzmxeFIEEEAgYwLsAMjYgjAcBBBAYJEClvP81VG3+9ebW86XQnXcEBhHIGx3JBCwI50YOuPcPXf3oT5A7paMASOAAAKpChAASJWTgyGAAAK5EfAuXbt22S+VXymVSk/lZtRjDlS3+9c2NuVjg+3+Y5pxtxMCkhbQb7XkY89kWoDWBwiH0TNv3bz5hsw6PjFzvkQAAQQQMC5AAMD4AjM9BBBA4EEB3e7vlWvPS423qw/+LO//Pdru39iStn5SuZ4bAjMJSKeF7o7dtACpHXkrjvovvHn79p2ZnHgwAggggEBuBAgA5GapGCgCCCAwm0Cy3X8QXvE97+XZjpTNR+t2/8bWBVdeaWRzgIwqtwJRpyuBgPftpgXE8XPbVf/Vd2/c6OZ2kRg4AggggMBYAgQAxmLiTggggECuBUy39fNrNVeX7f4V3e7v8Wct12dqlgcfD10gaQE9SQsI+/0sj3SqsdE2cCo2HoQAAgjkToBXSrlbMgaMAAIIjC9gv63fenLx7/zy+CjcE4FZBMIoCQIM9vdN1gegbeAsJwePRQABBLIvQAAg+2vECBFAAIGJBSy39StXqq6ytubqmxuuRJ7/xOcGD0hHYCj1AXp7LRccHLgoGKRz0EwdhbaBmVoOBoMAAgikJEAAICVIDoMAAghkQcByWz8t8Fddl3f8N5vOq1WzwM0YEHBxfyCBgF2nOwKGUlXP2o22gdZWlPkggEDRBQgAFP0MYP4IIGBFwHSevxb4q8mFf2Vt1cp6MQ9jAsFB2/UlEBB0OsZm5hz1AcwtKRNCAIECCxAAKPDiM3UEELAhYD3PvybF/WpS5M+VPRsLxizsCkSx60uRwL4UC4wG9tICqA9g99RlZgggUBwBAgDFWWtmigACxgQs5/nrdv/a+oarN5uuVK0YWzmmY11gOJD6ALu7rr/fMpkW4Bz1Aayfw8wPAQTsChAAsLu2zAwBBIwKWM7z1yXT7f715pbzV1eMriDTKopA2O5IIGDHZFqAriH1AYpyJjNPBBCwJEAAwNJqMhcEELAuYDrP36/VXHW03d/jz5P1k7kw84uHSVrAQNICwn7f3LSpD2BuSZkQAggYF+AVlvEFZnoIIGBDwHSev7b1W19zjU3J8/d9GwvGLBB4UCAMXXdvzwX7NtsGUh/gwQXnvxFAAIFsChAAyOa6MCoEEEAgEbCe509bP070oglYbxtIfYCindHMFwEE8iZAACBvK8Z4EUCgEALFyPNvSp4/bf0KcUIzyYcEwnY7KRRosW2gTpb6AA8tOd9AAAEEMiFAACATy8AgEEAAgWMB79K1a5f9UvmVUqn01PF3jXyR5PlLdf+abvcnz9/IqjKNqQW0PoCkBQykW4DV+gDhMHrmrZs33xCjeGonHogAAgggkJoAAYDUKDkQAgggMJuAbvf3yrXnpQPe1dmOlL1HlzXPf23N1eXCv1Qhzz97K8SIlikwDELX0/oABzbrA8SxuxVH/RfevH37zjKdeW4EEEAAAecIAHAWIIAAAksWSLb7D8Irvue9vOShpP70JYlmkOefOisHNCpgvT5AGMfPbVf9V9+9caNrdAmZFgIIIJB5AQIAmV8iBogAAoYFTLf1q6ysyFb/przzT56/4XOYqc1BIDhoS2rArrNYH4C2gXM4YTgkAgggMIEAAYAJsLgrAgggkJaA6bZ+1aqrbUie/4bk+Ze9tMg4DgLFEohi12/tyUfLRYOBubnTNtDckjIhBBDIiQABgJwsFMNEAAEbAtbb+tWkwF+92XSlasXGgjELBJYsMBwESbeAvhQKHEoyvb1bfD0MguvUB7C3sswIAQSyKUAAIJvrwqgQQMCYQBHa+jW2tlxZtv1zQwCB9AWiTsd1d3ZMpgWoFm0D0z9nOCICCCBwmgABgNNU+B4CCCCQnoDpPP+krd9ouz9t/dI7azgSAqcJaNtASQsYSFqA1baBLnKff+3Wi6/L9C1udzhtVfkeAgggsFABAgAL5ebJEECgSAKm8/ylrd9hdf8N53za+hXpvGauGRAItW1gyw32910UUB8gAyvCEBBAAIHcCBAAyM1SMVAEEMiLgPU8f73wbyR5/tW8LAnjRMCkwFCKA3Z3d5NAAPUBTC4xk0IAAQRSFyAAkDopB0QAgaIKkOdf1JVn3ggsV4D6AMv159kRQACBPAkQAMjTajFWBBDIqoB36dq1y36p/EqpVHoqq4Ocdlzk+U8rx+MQWKBAAeoDhMPombdu3nxDVKkPsMBTi6dCAAFbAgQAbK0ns0EAgQUL6HZ/r1x73vPc1QU/9dyfrlyVPP+1dVeXIn+uQp7/3MF5AgTSEAikPoAUCRwcSH0ASRGwdpNOiLfiqP8CbQOtrSzzQQCBRQkQAFiUNM+DAAKmBJLt/oPwiu95L5uamEymLAX+Kmtrrr654UqVirXpMR8ECiEwDIKkUGBwcGCyUGAYx89tV/1X371xo1uIBWWSCCCAQEoCBABSguQwCCBQGAGzbf1Kso1BC/zVNjdduVYrzIIyUQQsC0T9vuvvSetA6RhgrVDgcDh8m7aBls9e5oYAAvMQIAAwD1WOiQACJgUst/WrrKzIhX9T3vlfNbl2TAqBogsEB20JBOy6oNMxRxFF8dcCF33lGy+99I65yTEhBBBAIGUBAgApg3I4BBCwJ2C5rZ8W+Dvc7t+Uvf+evcVjRggg8IFAFEtagAQBJC0glJ0B9m7x9TAIrlMfwN7KMiMEEEhPgABAepYcCQEEjAlYbutHnr+xk5XpIDCBgPn6AMPhs9uV8tepDzDBScFdEUCgMAIEAAqz1EwUAQQmECDPfwIs7ooAAvkUoD5APteNUSOAAAKzCBAAmEWPxyKAgDkB8vzNLSkTQgCBcwSoD3AOED9GAAEEDAkQADC0mEwFAQSmF7Cc51+uVpPq/nUp8kee//TnCI9EwLTAUX0A7RYQDQYGp0p9AIOLypQQQGAKAQIAU6DxEAQQsCNgOc9f2/rV1jeStn5erWpn0ZgJAgjMTSDuD5K2gf39lrm2gYoWUh9gbucOB0YAgXwIEADIxzoxSgQQSF/AbJ6/UtHWL/0ThiMiUCQBy2kBw+HwbRe5z79268XXZU3jIq0rc0UAAQQIAHAOIIBA4QQs5/kfbvffcPXNTbb7F+7MZsIIpCyQpAXsuYHsBrCYFhBF8dcCF33lGy+99E7KchwOAQQQyKwAAYDMLg0DQwCBtAUs5/mPtvvXm01XqlbSpuN4CCBQYIHhIHC93V1nNS1ANgFcD4Pg+pu3b98p8DIzdQQQKIgAAYCCLDTTRKDIApbz/HVddbu/Xvj7q6tFXmbmjgACcxYI2+0kEBB0OnN+puUcnvoAy3HnWRFAYLECBAAW682zIYDAYgVM5/n7tZpU9z8s8uc8fp0v9tTi2RAoqEA8TIoEalpA2O+bQ6A+gLklZUIIIPCAAK8YHwDhPxFAwIaA6Tz/StVV1tZcQ/P8K76NBWMWCCCQL4EgdN29PRccHLgosNc2kPoA+TodGS0CCIwvQABgfCvuiQACORCwnudfXV+XAn9NR1u/HJyMDBGBAgho28De3q4UCtw32TaQ+gAFOImZIgIFEyAAULAFZ7oIWBUoRJ6/XPj7a+T5Wz2HmRcCeRYID6Q+gAQCqA+Q51Vk7AggUAQBAgBFWGXmiIBtAe/StWuX/VL5lVKp9JS1qZLnb21FmQ8ChgUKUB8gHEbPvHXz5huyirHhlWRqCCBgWIAAgOHFZWoIWBfQ7f5eufa857mr1uZa1jz/9TVX39h0JfL8rS0v80HAtMBQ6gP0WlIfYN9mfYA4drfiqP8CbQNNn8ZMDgGzAgQAzC4tE0PArkCy3X8QXvE972VrsyxJNIM8f2urynwQKKaA9foAYRw/t131X333xo1uMVeYWSOAQB4FCADkcdUYMwLFFTDd1q+ysuJqkudfIc+/uGc4M0fAoEAg9QH6RusD0DbQ4AnLlBAwLkAAwPgCMz0ErAhYbut3mOe/7mqy3d+VPStLxjwQQACBDwSi2PUlLUC7BYT9/gffN/IVbQONLCTTQKAAAgQACrDITBGBPAtYbuuX5PmvSZ7/Jnn+eT5HGTsCCIwvkNQH2JP6AAc26wPQNnD8c4F7IoDAcgQIACzHnWdFAIFzBCy39Rvl+dfkwr9cq50jwY8RQAABewKR7ALoSyBAdwQMpaqetVs4HD67XSl/nfoA1laW+SCQfwECAPlfQ2aAgDUB8vytrSjzQQABBB4hQH2AR8DwbQQQQGBOAgQA5gTLYRFAYHIBy3n+5WpVqvtvJNv9yfOf/NzgEQggYFhA6gP0kt0ALRcNBuYmSn0Ac0vKhBDItQABgFwvH4NHwIaA5Tx/3e5f0wv/ZtOVqhUbC8YsEEAAgTkIDAeB6+3uuv5+y2RaAPUB5nDScEgEEJhYgADAxGQ8AAEE0hKwnOevRtrWTy/8/dXVtMg4DgIIIGBeIGy3k0BA0OmYnCv1AUwuK5NCIDcCBABys1QMFAFTAt6la9cu+6XyK6VS6SlTM5PJHLb123Ba5M95/Jq1tr7MBwEEFiAQD4+KBLZMtg0cDodvh8Pombdu3nxDNO1VQVzAKcJTIIDAdAK8Mp3OjUchgMCUArrd3yvXnped8VenPERmH6Z5/hVt67dBW7/MLhIDQwCBXAkkbQNbR20DDdYHkAYIt+Ko/8Kbt2/fydXCMFgEEMitAAGA3C4dA0cgXwLJdv9BeMX3vJfzNfLzR1uuHF741zY2nEee//lg3AMBBBCYUCCW+gD9VssFBwcuCuwVCgzj+Lntqv8qbQMnPDG4OwIITCxAAGBiMh6AAAITCpht66cF/qrr68lW/3KtNiELd0cAAQQQmFQg6vePUgP2zRUK1LQAF7nPv3brxdfFhbSASU8O7o8AAmMJEAAYi4k7IYDANAKW2/ppgb/aZlO2/FPgb5pzg8cggAACswgEB20JBOw6i4UCaRs4y5nBYxFA4DwBAgDnCfFzBBCYWMByWz/N89d3/ety8e/K3sQ2PAABBBBAICWBKHY9CQIM9vddZLA+AG0DUzpPOAwCCNwnQADgPg7+AwEEZhGw3NZPt/vX1g8r+3u16ixMPBYBBBBAIEWBuD9I0gL6+y1zaQHKRNvAFE8WDoUAAo4AACcBAgikIWA2z19x2O6fxinCMRBAAIH5ClhOC6A+wHzPHY6OQJEECAAUabWZKwJzELCc53+43X9Dtvtvst1/DucOh0QAAQRSF0jSAvYkLaBlMi2A+gCpnzEcEIHCCRAAKNySM2EE0hGwnOc/2u5fbzZdibZ+6ZwwHAUBBBBYoMBQ2gb2dned1bQA6gMs8GTiqRAwJkAAwNiCMh0E5i1gOc9f7XS7f7255fzVlXlTcnwEEEAAgTkLhO2OBAJ2THYLUDrqA8z5BOLwCBgUIABgcFGZEgJzEvAuXbt22S+VXymVSk/N6TmWdli/VnPVDSnytyHb/T1+NS5tIXhiBBBAIG2BeOj6LUkLaLVc2O+nffSlH0/rA4TD6Jm3bt58QwYTL31ADAABBDItwKvcTC8Pg0MgGwK63d8r156XQvhXszGi9EZRrlRdZX3NNfTCv+Knd2COhAACCCCQLYEgdF0JBAT7By4KBtkaWwqjiWN3K476L7x5+/adFA7HIRBAwKgAAQCjC8u0EEhDINnuPwiv+J73chrHy9IxNM+/ur4uBf6ajrZ+WVoZxoIAAgjMV0DbBvb2dqVQ4L7NtoFx/Nx21X/13Rs3uvOV5OgIIJBHAQIAeVw1xozA/AXMt/XTAn/+6ur8JXkGBBBAAIFMCoTtdlIoMOh0Mjm+WQZF28BZ9HgsArYFCADYXl9mh8DEAtbb+mmOf01y/V3Zm9iGByCAAAIIGBOQtoF9qQ2gNQKigb20ANoGGjtfmQ4CKQgQAEgBkUMgYEGgEG39tqStX6ViYbmYAwIIIIBAigLDQNoG7tA2MEVSDoUAAhkVIACQ0YVhWAgsSqAIbf0aW1uuLO39uCGAAAIIIHCWQCTpAN0d2gaeZcTPEEAg3wIEAPK9fowegVkETOf5a1s/3epfpa3fLOcIj0UAAQSKJyBtAweSEqCpAVbbBrrIff61Wy++LotL28DineHMuOACBAAKfgIw/WIKmM7zl7Z+VWnrp9X9nV8u5gIzawQQQACB2QXC6KhbgM22gdQHmP0U4QgI5FGAAEAeV40xIzClgPU8f23r12huuVKVPP8pTxEehgACCCDwgMBwELju7o7ZtoGyCeB6GATX37x9+84DU+c/EUDAoAABAIOLypQQeFCgCHn+dbnw91fJ839w7flvBBBAAIF0BMJ2R9oGUh8gHU2OggACyxIgALAseZ4XgcUImM/zr0qev7b2cx6/zhZzSvEsCCCAQIEFpD6AtgwcUB+gwCcBU0cg3wK8Ys73+jF6BB4pYD3PvyJ5/o1NufD3/Uca8AMEEEAAAQTmIhCGrru354J96gPMxZeDIoDA3AQIAMyNlgMjsByBIuT5a4E/r1ZdDjDPigACCCCAwJFA3B8cFQrcd8PYYkF96gNwsiNgTYAAgLUVZT6FFSDPv7BLz8QRQAABBJYsQH2AJS8AT48AAmMLEAAYm4o7IpBZAe/StWuX/VL5lVKp9FRmRznlwPxaTdr6SZ6/bvcnz39KRR6GAAIIIDB3Aa0PIGkBg/2WC/v9uT/dop9gOBy+HQ6jZ966efMNeW6L2x0WTcrzIbAUAQIAS2HnSRFIR0C3+3vl2vOe566mc8TsHKVcqbokz18L/FXI88/OyjASBBBAAIEzBQKpDyCFAq3WB5BMh1tx1H+BtoFnngX8EIHMChAAyOzSMDAEHi2QbPcfhFd8z3v50ffK509KEs2orq878vzzuX6MGgEEEEDgUMB6fYAwjp/brvqvvnvjRpc1RwCB/AgQAMjPWjFSBFTAdFu/ysqKqzebzl9dZbURQAABBBAwIRC22663u+uCTsfEfE5OQtMCXOQ+/9qtF1+X75MWcBKHrxHIqAABgIwuDMNC4EEB0239qlVX25A8f93uX/YenDr/jQACCCCAQL4Fotj1JS2g32q5aDDI91xOGX0UxV8LXPSVb7z00jun/JhvIYBAhgQIAGRoMRgKAqcJWG/rV5MCf/quf6laOW36fA8BBBBAAAEzAsNBkOwG6EuhQNoGmllWJoJArgQIAORquRhskQSK0NavsbXlyrLtnxsCCCCAAAJFEogkHaC7s2MyLUDXMRwOn92ulL9OfYAindXMNS8CBADyslKMs0gCpvP8k7Z+o+3+tPUr0nnNXBFAAAEETgpo20BJCxhIWoDVtoHUBzi54HyNQDYECABkYx0YBQKJgPU8/6S6v+b5+2VWHAEEEEAAAQRUIIxcTwMB+/vUB+CMQACBuQsQAJg7MU+AwPkClvP8y5Wqq6ytSVu/DVeqkOd//tnAPRBAAAEEiigwDKQ+wF7LBQcHLgrsFQqUJgHXwyC4/ubt23eKuL7MGYGsCBAAyMpKMI5CCljO8y95ntN3/Gubm65cqxVyfZk0AggggAACkwpE/b7r7x3uCLBYKJD6AJOeEdwfgXQFCACk68nREBhXwHSef0UK+9U2m/LO/+q4HtwPAQQQQAABBE4IBAdtCQTsmiwUOBwO36Y+wInF5ksEFihAAGCB2DwVAipgPc9f2/rpu/6u7LHgCCCAAAIIIDCLQBQnuwG0bWA0sJcWEEXx1wIXfeUbL730zixMPBYBBMYXIAAwvhX3RGAmAct5/rrdP7nwb246r1qdyYkHI4AAAggggMD9ArFc/Pd395wGAiymBVAf4P715r8QmKcAAYB56nJsBETAcp6/LrBu9683t5y/usJ6I4AAAggggMAcBcJ2x/V2d0ymBSgb9QHmePJwaASOBAgAcCogMD8B79K1a5f9UvmVUqn01PyeZjlH9qWwX3W03d/jV8lyVoFnRQABBBAonEA8PCoS2HKhFAy0dtP6AOEweuatmzffkLnF1ubHfBBYtgCv2pe9Ajy/SQHd7u+Va8/Lzvir1iY4auvX0Dz/im9teswHAQQQQACBfAgEoetKtwCrbQPj2N2Ko/4LtA3Mx+nIKPMjQAAgP2vFSHMgkGz3H4RXfM97OQfDnWiIo7Z+danu79XI858IjzsjgAACCCAwJ4G4P3A96RYw2N83WR8gjOPntqv+q+/euNGdEyGHRaBQAgQACrXcTHaOArT1myMuh0YAAQQQQACBswVoG3i2Dz9FAIFDAQIAnAkIzChgua3fYZ7/urT1azpHnv+MZwoPRwABBBBAYM4CSX2Aw90AFusD0DZwzucPhy+EAAGAQiwzk5yHgOW2fqM8//rmhitVKvPg45gIIIAAAgggMCeBYRBIWkDLbH0A2gbO6cThsIUQIABQiGVmkmkKWG7r90Ge/6bk+dfSZONYCCCAAAIIILBggVi6BPSkUKDZ+gDD4bPblfLXqQ+w4BOLp8u1AAGAXC8fg1+wAHn+Cwbn6RBAAAEEEEBgdgHqA8xuyBEQsCJAAMDKSjKPuQpYzvMvV6uutr4hef7S1q/szdWRgyOAAAIIIIDAkgSi2PVlN0B/v+WiwWBJg5jf01IfYH62HNmWAAEAW+vJbFIWsJznr9v99cK/3my6UpU8/5RPHQ6HAAIIIIBAJgWGA6kPsLubBAKGcZzJMc42qPh6GATX37x9+85sx+HRCNgUIABgc12Z1YwClvP8laaysiIX/lvOX12ZUYqHI4AAAggggEAeBcJ2RwIBOy7odPI4/HPHHFIf4Fwj7lBMAQIAxVx3Zv1oAe/StWuX/VL5lVKp9NSj75bPnxy29Tva7k9bv3wuIqNGAAEEEEAgLYGkbaAWCWw5i20Dh8Ph2+EweuatmzffEDKL2x3SOhM4ToEECAAUaLGZ6tkCut3fK9eel53xV8++Z/5+mrT1W19zjQ3J86/4+ZsAI0YAAQQQQACB+QkEoeu29lywf+CiwF59AMl0uBVH/RdIC5jfKcSR8yNAACA/a8VI5ySQbPcfhFd8z3t5Tk+xtMN+0NavKW39qksbB0+MAAIIIIAAAtkXiPsDaRu4a7dtYBw/t131X6VtYPbPRUY4PwECAPOz5cjZFzDf1q++2XT+2mr2V4IRIoAAAggggEBmBMKDdhIIsFgfQNMCXOQ+/9qtF18XcNICMnPWMZBFCRAAWJQ0z5MpActt/Q7z/NelrV/TOfL8M3XeMRgEEEAAAQRyI5DUBzjcDWCxPgBtA3NzJjLQlAUIAKQMyuGyLWC5rd8oz78uef4l8vyzfSIyOgQQQAABBHIiMJT6AD3D9QFkEwBtA3NyLjLMdAQIAKTjyFEyLmC5rR95/hk/+RgeAggggAACBgTM1wegbaCBs5QpjCNAAGAcJe6TZwHzef661b9Cnn+ez1HGjgACCCCAQG4EAqkP0JdCgdQHyM2SMVAE7hMgAHAfB/9hScBynn+5WnW1jQ35kLZ+Zc/SsjEXBBBAAAEEEMi6QBS7vqQF9FstFw3stQ2kPkDWT0DGN4sAAYBZ9HhsJgUs5/nrdv/a+oarN5uuVK1k0p9BIYAAAggggEAxBIaDwPV2d11/v+WGscWC+tQHKMaZXKxZEgAo1nqbnq3lPH9duMrKims0t1x5dcX0OjI5BBBAAAEEEMiXQNTuuO7ujsm0AF2JkPoA+TohGe2ZAgQAzuThhzkRMJ3nn7T1G233p61fTk5JhokAAggggEDBBLRtoKQFDCQtwGLbwOFw+LaL3Odfu/Xi67KyFrc7FOyELe50CQAUd+1NzNx6nn9lbc01NiXP3/dNrBeTQAABBBBAAAHjAmHount7Ljg4oD6A8aVmevkUIACQz3Ur/Kgt5/mXK1Wp6r/m6psbrlQhz7/wJzsACCCAAAII5FBgGEh9gL3WYSAgsFcoUDYBXA+D4Pqbt2/fyeHyMOQCCxAAKPDi53HqlvP8tcBfdX3d1eQd/3KtlsflYcwIIIAAAggggMB9AlG/L20DJTVgf99koUDqA9y33PxHDgQIAORgkRhiIuBdunbtsl8qv1IqlZ6yZqIF/mqbTXnnf9Xa1JgPAggggAACCCAgOwHaEgjYNVkoUOsDhMPombdu3nxDlpr6AJzvmRYgAJDp5WFwKqDb/b1y7Xl5g/yqNZFytZq861+Xi39X9qxNj/kggAACCCCAAAIfCESxpAXsJrsBooG9tADphHgrjvovkBbwwZLzVfYECABkb00Y0ZFAst1/EF7xPe9layi63b+2vpFs9/dqVWvTYz4IIIAAAggggMAjBeL+IEkL6O+3bKYFxPFz21X/1Xdv3Og+EoEfILAkAQIAS4Lnac8UMN3Wj+3+Z649P0QAAQQQQACBgghYTwugbWBBTuScTZMAQM4WzPpwrbf1q23Iu/4b0taP7f7WT2XmhwACCCCAAALjCEhaQL+1Jx8t2gaO48V9EJhRgADAjIA8PB0By239Rtv9682mK1Vp65fOGcNREEAAAQQQQMCSwHAgbQN3d53VtADaBlo6W/M9FwIA+V6/3I/ecls/XRzd7t/Y2nJl+cwNAQQQQAABBBBA4GyBqNNx3Z0dk90CdOa0DTx7/fnp/AUIAMzfmGc4XcB0nr9fq7nqaLu/xz+z008BvosAAggggAACCJwiEA+TtICBpAWE/f4pd8j3t7RtIPUB8r2GeR49VyZ5Xr2cjt10nn9F2/qtufqm5Pn7fk5XiGEjgAACCCCAAAIZEAhDaRu4J20DD1wU2GsbGEXx1wIXfeUbL730Tga0GUJBBAgAFGShszBN63n+1fV112hukeefhZONMSCAAAIIIICAGQGtD9Dd3ZFAwL7JtoHUBzBzquZiIgQAcrFM+R5kIfL85cK/vEqef77PVEaPAAIIIIAAAlkWiNpSH0ACAYHUCbB4oz6AxVXN3pwIAGRvTSyNyLt07dplv1R+pVQqPWVpYjoX8vytrSjzQQABBBBAAIHMCxSgPkA4jJ556+bNN2Qt4syvBwPMnQABgNwtWT4GrNv9vXLtec9zV/Mx4vFHWZY8/4rk+Tc2JM+/Qp7/+HLcEwEEEEAAAQQQSEkgCF23tecCo/UB4tjdiqP+C2/evn0nJTEOg0AiQACAEyFVgWS7/yC84nvey6keOAMHK0k04zDPvyl5/tUMjIghIIAAAggggAACxRYYDgaSFrBrtj5AGMfPbVf9V9+9caNb7JVm9mkJEABIS5LjmG7rV1lZcfVm0/mrq6w0AggggAACCCCAQMYEwnbb9SQQYLE+AG0DM3ay5Xw4BAByvoAZGH7p8he+8KSrVH67XCo/k4HxpDqEJM9/fcPVtK2fxz+XVHE5GAIIIIAAAgggkKaA1gdI2ga2XNjvp3nkTByLtoGZWIbcD4Irmtwv4fIm8Nl/9GufrlbcP5Gt8V9Y3ijm88xJnv+a5PnrhT95/vNB5qgIIIAAAggggMA8BLQ+gAQCgoMDFwWDeTzDko8ZXw+D4Dr1AZa8DDl9egIAOV24ZQ776S9/+aNeqfSP5S3x31zmOObx3KM8//pm03k18vznYcwxEUAAAQQQQACBRQjE/YHr7RmuDzAcPrtdKX+d+gCLOJvsPAcBADtrOfeZJAX+guhX/FLpq3N/siU8geb51+TCv7JGnv8S+HlKBBBAAAEEEEBgLgLBQVtSA6gPMBdcDpo7AQIAuVuypQzYu3Tt2mW/VH6lVCo9tZQRzPFJD/P8111N2/qVvTk+E4dGAAEEEEAAAQQQWIpAFLu+tA0c7O9TH2ApC8CTZkWAAEBWViKj4/jJL37xY1659rx0wLua0SFOPaxRnn99c8OVKpWpj8MDEUAAAQQQQAABBPIhMAwCSQtoUR8gH8vFKOcgQABgDqgWDpls9x+EV3zPe9nCfE7O4YM8/03J86+d/BFfI4AAAggggAACCBRAIJYuAb2kY8C+G8axuRmH1Acwt6ZpTYgAQFqSdo7jfe7qrz/tyu4PLG73J8/fzonKTBBAAAEEEEAAgVkFqA8wqyCPz5sAAYC8rdgcx/uZL33pyYor/1a57P3qHJ9mKYcuV6uuur7h6trWjzz/pawBT4oAAggggAACCGRSQOoDHO4GaLloYK9tYBTFXwtc9JVvvPTSO5n0Z1ALFSAAsFDubD6Z5vn7lYq09LPZ1q+mF/7NpitVyfPP5hnIqBBAAAEEEEAAgeULDAdSH2B31/X3WybTApyLr4dBcP3N27fvLF+bESxLgADAsuQz8LxFaOtXb245f3UlA9oMAQEEEEAAAQQQQCAPAmG7I4GAHRd0OnkY7sRjpD7AxGSmHkAAwNRyjj0Z03n+h239NlxNt/t7nOJjnxXcEQEEEEAAAQQQQOBQIB66flIksGWybeBwOHzbRe7zr9168XWZsL0qiJzHjxTg6uiRNDZ/YDrPv1J1lfU119iQC/+Kb3MBmRUCCCCAAAIIIIDA4gSC0HVbey7YP3BRQH2AxcHzTPMSIAAwL9mMHdd6nn91fV0K/DWlrV81Y/IMBwEEEEAAAQQQQCDvAnF/IIUCd91g32bbQOoD5P0MHX/8BADGt8rlPYuR59+UPP/VXK4Pg0YAAQQQQAABBBDIj0DYbieFAqkPkJ81Y6T3CxAAuN/D0n+ZzvPXtn412epf29igrZ+ls5a5IIAAAggggAACWReQtoH9Vks+9ky2DaQ+QNZPwNnGRwBgNr9MPtpynn/J81zS1m9L2vpVaOuXyROQQSGAAAIIIIAAAgUQGAbSNnDHbtvAKIq/FrjoK9946aV3CrCchZkiAQBDS205z1+XqbKy4hpbF1x5pWFo1ZgKAggggAACCCCAQJ4Fok7XdXfeN9s2kPoAeT47Hx47AYCHTXL3Het5/trWT7f6V7W6P239cnd+MmAEEEAAAQQQQMC8gLQNHEhKgKYGhP2+yemGw+Gz25Xy19+9caNrcoIFmRQBgHwvtHfp2rXLfqn8SqlUeirfU3l49GVp63dY3V8u/P3yw3fgOwgggAACCCCAAAIIZEkgjKRbwF7SLcBi20CtDxAOo2feunnzDWGPs0TPWMYTIAAwnlPm7qXb/b1y7XlJib+aucHNOCDN89cL/0Zzy5Wq5PnPyMnDEUAAAQQQQAABBBYsMBwErru7Y7ZtYBy7W3HUf+HN27fvLJiWp5tRgADAjICLfniy3X8QXvE97+VFP/cink/z/Oty4e+vrizi6XgOBBBAAAEEEEAAAQTmJhC2O9I2cMdsfYAwjp/brvqvkhYwt1Mo9QMTAEiddG4HNN3Wjzz/uZ03HBgBBBBAAAEEEEBgmQLG6wPQNnCZJ9fkz00AYHKzRT+idPkLX3jSVSq/XS6Vn1n0k8/7+TTPv7K+5hpa4K/iz/vpOD4CCCCAAAIIIIAAAssRCELXlUKBwf6Bs1gfIBpGr7gg+G/f+L3f07aBw+Ug86znCRAAOE9oiT//7D/6tU9LCvw/kZz4LyxxGHN56lGef32z6bxadS7PwUERQAABBBBAAAEEEMiaQNwfSKHAXbP1AYZx/HtSAuG/+5P/4Xf+PGv2jMc5AgAZPAue/vKXP+qVSv9Yet79ZgaHN/OQDvP8m5LnvzrzsTgAAggggAACCCCAAAJ5FAjbbakPsGu2PoA0CbgeD4f//eu/+7vfy+P6WB0zAYAMrWxS4C+IfsUvlb6aoWGlNhTN86+ub7japmz39zj1UoPlQAgggAACCCCAAAL5FJD6AP2kbWDLhf1+PudwzqjD4fDZ7Ur56xQKPAdqQT/mKmxB0Oc8jXfp2rXLfqn8SqlUeuqc++bux+Wq5Pmvrbm65PmXyPPP3foxYAQQQAABBBBAAIH5CgylPkBP6wMcSH2AwWC+T7aEo2uhwHAYPfPWzZtvyNPHSxgCT3kkQABgyafCT37xix/zyrXnPc9dXfJQUn/6pMCfXPjXNjacJ8UMuCGAAAIIIIAAAggggMCjBWJJnu+3WoeBgMBeICCO3a046r/w5u3bdx6twE/mKUAAYJ66Zxw72e4/CK/4nvfyGXfL5Y9kF4OrykW/bvUvy7Z/bggggAACCCCAAAIIIDC+QCTpAIepAftOiuqN/8Cc3DOM4+e2q/6rpAUsfsEIACze3Pvc1V9/2pXdH1jc7q95/rXmlgQA1hcvyzMigAACCCCAAAIIIGBIIDhoSyDAZqFATQtwkfv8a7defF2WzF6UI6PnIQGABS7MZ770pScrrvxb5bL3qwt82oU9lV+vu9WLF6WtH+/6LwydJ0IAAQQQQAABBBCwLRDFx20DLdYHiKL4a4GLvvKNl156x/ZCZmN2BAAWsA6a5+9XKtLSz2ZbPyWU+bnmx37IRRT5W8AZxVMggAACCCCAAAIIFE0g7g+StoH9/ZZzw6HB6cfXwyC4Tn2A+S4tAYA5+lpv63eSbmWz6WoXnzj5Lb5GAAEEEEAAAQQQQACBlAUG0jaw+/77Lg7DlI+cjcPRNnC+60AAYD6+pvP8TyNbeewxV7tw4bQf8T0EEEAAAQQQQAABBBBIUWDY7brWe++ZDQJQHyDFk+WBQxEAeABk1v+0nuf/KJ+VJ56Q4n/NR/2Y7yOAAAIIIIAAAggggECKAtUgcHsSBOj1eikeNVuHoj5A+utBACAl0yLk+Z9FtSLF/7TtHzcEEEAAAQQQQAABBBCYv4AvT1GSLgE/+P735v9kS38G6gOktQQEAGaULFKe/1lUBADO0uFnCCCAAAIIIIAAAgikL+C12277e0UIABzaUR9g9nPIm/0QhT2Cd+natc9dDKJ/7ZdKXy2swvHEiSUdU/AFAggggAACCCCAAAILEIhdsV6D63WXXn/pdZjwci07xTlWrDNmCqDTHqLb/b1y7XnPc1dP+3kRv7dy8UOSArBRxKkzZwQQQAABBBBAAAEEliIw7HTd7p13l/Lcy37SOHa34qj/Am0DJ1sJAgATeD35a79WW4tLv1L2Sv/jBA8rxF0JABRimZkkAggggAACCCCAQIYE4k7H7d25k6ERLX4oUTz8rw684dff+Z3f6S/+2fP3jGybGHPN9F3/9aH3h1z8jwnG3RBAAAEEEEAAAQQQQGCuAtIub67Hz8PB9fpMr9P0ei0P4132GAkAjLECl7/whR/1K7V3vZL7xTHuzl0QQAABBBBAAAEEEEAAgfkLcP2fGOt1ml6v6XXb/NHz/QwEAM5Zv7929eqWq9T+5Tl348cIIIAAAggggAACCCCAAALLFJDrtuT6bZljyPhzEwA4Z4F8z79WLpUunHM3fowAAggggAACCCCAAAIIILBEAb1u0+u3JQ4h809NAOCMJfrMl770Yc/zvnLGXfgRAggggAACCCCAAAIIILAUATIAHmbX6ze9jnv4J3xHBQgAnHEeVEr+f3zGj/kRAggggAACCCCAAAIIILA0AVq6nU7PddzpLvpdAgCPtinJ7b989I/5CQIIIIAAAggggAACCCCwTAH2AJymf3QdR3zkFBwCAKeg6Lc+8/f/foWq/4/A4dsIIIAAAggggAACCCCwfIE4Xv4YMjgCvY7T67kMDm3pQyIA8IglKH/845wwj7A59dv0ID2VhW8igAACCCCAAAIIIDAvgSEBgEfScj13Og0BgNNdXOf7/fIjfsS3TxVg+9GpLHwTAQQQQAABBBBAAIE5CJTjoQs73Tkc2cYhuZ47fR0JAJzu4uLVPjkjj7A57dtEH09T4XsIIIAAAggggAACCMxBIIrdwb27rts+mMPBbRyS67nT19E//dt8F4HJBKLBYLIHcG8EEEAAAQQQQAABBBCYWCDq9V1v5303OODif2I8HuAIAHASpCIQ9nrOBYFzFUonpALKQRBAAAEEEEAAAQQQOCEwlNfavb2WXPjvu1hfd3NDYAoBAgBToPGQhwX0l1D73j238tjjrlQlCPCwEN9BAAEEEEAAAQQQQGAKAdnu32/Jhf9+y4X9/hQH4CEIfCBAAOADC76aUUC3IcVh5GqbG666vuEcVRRmFOXhCCCAAAIIIIAAAkUWCA7arr+364JOp8gMzD1FAQIAKWJyKOfCXjf5CNptV9vYdP7qCiwIIIAAAggggAACCCAwgUDcH8h2/11513/fUWx7Ajjueq4AAYBzibjDNAK6GyDodl1tbV12BGw6r1ad5jA8BgEEEEAAAQQQQACBwggMg1Au/PdcIK+lo4Ai24VZ+AVOlADAArGL9lTDKEoil7plqbK25uoSCChVOOWKdh4wXwQQQAABBBBAAIFzBOJhstVf3/Enz/8cK348kwBXYzPx8eBxBDR6GUmrkrDTltoAuiOg6ZxHgYBx7LgPAggggAACCCCAgG2BUPL8dbs/ef621zkrsyMAkJWVKMA4NJqpH/rLTYMAlbXVAsyaKSKAAAIIIIAAAggg8LBAPBi4/u6e60t1f/L8H/bhO/MRIAAwH1eOeoaABgDCXs9VO+uSFtCkPsAZVvwIAQQQQAABBBBAwJiAtPUbFfiLJAjADYFFChAAWKQ2z3UsoFHOvhQ4CTvdpD5AQ+oDOOoDHPvwBQIIIIAAAggggIA9Adr62VvTvM2IAEDeVszYeO+vD7CRdAygPoCxRWY6CCCAAAJBAAfcAABAAElEQVQIIIBAwQUiSYPVN79o61fwEyED0ycAkIFFYAguqQ0Q9u9KfYC2qze3nL+6AgsCCCCAAAIIIIAAArkWGAaBbPdv0dYv16toa/AEAGytZ+5nc1wfQLoFNJpNV6pWcz8nJoAAAggggAACCCBQMIFQ22HLO/4H+448/4KtfcanSwAg4wtUxOGdrA9QXV9z9Q3qAxTxPGDOCCCAAAIIIIBA7gTioeu35MK/1Up2uOZu/AzYvAABAPNLnN8Jan2A7vvvS+T0wNVkR0BNCwWWy/mdECNHAAEEEEAAAQQQMCsQSaer7s5O0vLa7CSZWO4FCADkfgntT0C3TXW2t5NAgLYNrEgwgEKB9tedGSKAAAIIIIAAArkQkO3+3d0deee/5YZRlIshM8jiChAAKO7a527moVRPPfjBX7mK5FI1Llxw5UYjd3NgwAgggAACCCCAAAJ2BHSrv174h92unUkxE9MCBABML6/NyY0KBdakNkCjqfUBKjYnyqwQQAABBBBAAAEEMikQHLSlpV8r2aGayQEyKAQeIUAA4BEwfDvbAloosCdbrZK2gVIboKqFAr1StgfN6BBAAAEEEEAAAQRyLRDJO/293V0XtNtuOBzmei4MvpgCBACKue5mZq31Adp377qB/BJubG258sqKmbkxEQQQQAABBBBAAIFsCAyDILnw7+/vk+efjSVhFFMKEACYEo6HZUvgOC1gfcPVt5quRFpAthaI0SCAAAIIIIAAAnkU0LZ+e3tJaz9944kbAnkXIACQ9xVk/McCSVrAnmzJ6nZcbWNDPrRtoHf8c75AAAEEEEAAAQQQQGBcgbDdOUo57Yz7EO6HQOYFCABkfokY4KQCSdvAe/eSHqzaNtBfW530ENwfAQQQQAABBBBAoKACcX/gevKm0kC3+0vdKW4IWBIgAGBpNZnLfQLHaQEd2Q0g3QK8avW+n/MfCCCAAAIIIIAAAggcCwSh67X25ML/wEUB2/2PXfjClAABAFPLyWQeFDiZFlBdX3e6I4C0gAeV+G8EEEAAAQQQQKDAAkd5/trWL+z3CwzB1IsgQACgCKvMHJ2mBXS3t10orVtqEgSokBbAWYEAAggggAACCBRegDz/wp8ChQMgAFC4JS/2hEdpAdXOugQCNl25Vis2CLNHAAEEEEAAAQQKKDAcjNr6tUzn+ZdKJTccDgu4wkz5UQIEAB4lw/fNCmhagLZzCTtd2QmwJmkBG7QNNLvaTAwBBBBAAAEEEDghEMnrQMnz77dayQ7REz8x9aVe+JfLZRfL614CAKaWdubJEACYmZAD5FVAi7tEO+9LIKDtqmuHOwKoD5DX1WTcCCCAAAIIIIDA2QLBQVveBJKW0R27bf1GF/5y1e+iKOLi/+xTopA/JQBQyGWfbNL6i6RSqbgwDJMo4mSPzv69tdiLfgTdDvUBsr9cjBABBBBAAAEEEJhIoCht/fQdf33dru/66wc3BE4TIABwmgrfu09Atw3pL5F6vZ4EAYIgMBlNPFkfoC71ATzqA9x3HvAfCCCAAAIIIIBAngSG2tZP0j6DA9tt/TzPc/qhr9f1XX9uCJwlQADgLB1+diyg7/7rLxTdCdBoNJwGAfTD2o36ANZWlPkggAACCCCAQOEEjvL8B/v7ptv66bv9vu8nRQzZ7l+4s3zqCRMAmJqueA/UnQADaaenF/41eXdcgwF92TpvMdJ4X32AdakPsLHpqA9QvHOeGSOAAAIIIIBAvgRCyfPvFSHPX97x15u+SUeRv3ydo8seLQGAZa9ADp9ff8n0ej3nS55RtVpNfuloYMBirtFxfQApFlPfbDp/bTWHK8aQEUAAAQQQQAAB2wJFyPPXd/x1qz95/rbP5XnPjgDAvIUNHz+UlICwK630ZCdAUh9A8qyCsAj1AZpSH6BqeGWZGgIIIIAAAgggkBMBef3ZLVCev74Rp+/6c0NgWgECANPK8bhjAU0J0F9EmhbQqDSSNAGLv5gerA/Q2NxwEv04duALBBBAAAEEEEAAgQUJxENp6bfnBvst83n+Wt1fb+T5L+jcMv40BACML/CipjdKC9BtSZoWMKoPYDEtYFQfIGgfuNqoPoB/+It5Ud48DwIIIIAAAgggUFSBsC15/ru7Tjs4Wb0db/eXCXLhb3WVlzMvAgDLcTf7rHrBn9QHkIqkuiNAAwNaKFA/W7tFUvegs73tBtJapi5FAisbsiPAK1mbJvNBAAEEEEAAAQQyITAcBMmFf1/e9dedmVZvWmdLEv2T18+acssNgTQFCACkqcmxjgU0BUCjlRX/sG1gKPlZg2Bw/HNLX2ihwIO7P3AV2RHQuHDBlaVNIjcEEEAAAQQQQACBlASkrV/vaLu/vgFj9abv+ut2f33jLJbX0RbfQLO6dnmaFwGAPK1Wzsaqv7T0ol8LAyb1AfyGC+SXttVIpm5DC6U7Qk12AjSaTeoD5Ox8ZbgIIIAAAgggkD2BQNr69QvU1o/t/tk7B62NiACAtRXN4Hw0EKBpARrR1NoAVUkN6Er3AItRTd2ONspJq21uSjBgk7SADJ6TDAkBBBBAAAEEsi0Qyw7Lw3f9981u90/e8Zf6Wbrdnwv/bJ+PlkZHAMDSamZ8LvqLTT98qQ+gbQP1a+0gYDEQkNQHuHvXBVKkptHccuXVlYyvDsNDAAEEEEAAAQSWLzCU14a9vZYLpMaSFl62etM3xrRyVHy03d/qPJlX9gQIAGRvTcyP6MH6ABoE0A+Lt+O0gPUNV5e0gFKVtoEW15k5IYAAAggggMCMAmHkei1t67fvLOf5a8cs/ZB3wFwkO0ctvhE245nAw+csQABgzsAc/nQB/WV3sj6A7goYSH0A3RVg7ZakBWjuWrcjbQM3nKYGuLL84ueGAAIIIIAAAggUXSCW14Ry4d9vtZwWVrZ6O97uLxPU17tc+Ftd6ezPiwBA9tfI9Aj1l9+oPoAWCtQ2grbbBt47DARsNl1lbdX02jI5BBBAAAEEEEDgLIGo03Xdnfed7pi0etML/9G7/roLlgt/qyudn3kRAMjPWpkeqUZCO/LLX4sENqSNnv6C1B0BFm/HaQGdw90AXq1qcZrMCQEEEEAAAQQQOFUgyfPf3U3e9dedklZvyYW/BAA0z99quqvVtbM8LwIAllc3h3PTX4568a+BgJWVlSQIoP9t7XYyLaC6vu7qsiOAtABrq8x8EEAAAQQQQOA+gUh2espW/75s+bec56/v+mt6q77eI8//vjOA/8iAAAGADCwCQ7hfIKkPIO/+azBAuwXoL1D92mJ9AP3j193edqG0RayRFnD/icB/IYAAAggggIAZgVA6I41aJZuZ1AMTGW33189s938Ah//MjAABgMwsBQN5UEADAV25MPalTYrWB9AAgKYFWMydGqUFVDvrSZHAssyXGwIIIIAAAgggkHeBuD+Qtn67SXV/q9v9Rxf+uuWfC/+8n7H2x08AwP4a536GoVz4h1IfoFqpmq4PoH8U+3t7MteuFAhck7SADVeSVAhuCCCAAAIIIIBA7gSC0HVlq3+wf+CiwGZdJ12TUYE/eYeKPP/cnaTFHDABgGKuey5nPWobWPGP6gNIqxgNDli76R/JSCrihp32USCA+gDW1pj5IIAAAgggYFZA2vrpGxqDfftt/TRNVTtYFaGtn74RV2/U3f7+vsnduGb/PZ4yMQIAp6DwrewKJPUB5AI5jMIkLcA/irZarA+gvXCTD+oDZPeEZGQIIIAAAgggcCwQtjuS579jvq1fWbb6u4Lk+esOh83NTecefzxZ5+aHPuT2v/WtJNXheOH5IlcCBABytVxnD7YkufLV1TVXW111pbLn+lJsRbfO60WktZtGW5P6ABJ5pT6AtdVlPggggAACCCCQJ4HhIEgK/PXlXX/ref6a76+vQ2ODu1BPnnM6z1W5pqh85CMnv518vf7JT7reu+8mr8Uf+iHfyLwAAYDML9F4A/SlWr5Wka9urB8/oNFouKTPqmzD0pYrQ4O/qLTQin4c1weQfDNNFbB2oz6AtRVlPggggAACCBgQkLZ+vaPt/pbb+p3M89fXndZv2oWr8cM/fOY06z/0Q65+757b2dk58378MHsCBACytyYTj6iqBeMuXHCnVY7XInIN2bJTkWCA5dYro/oAuhtgpbLi+rLrwWJawMn6ANW1w44BTnZ7cEMAAQQQQAABBBYpEBy0Jdd/txjb/QW2CHn+WtNA390f+ybXGB+qVt22trQuQGBkbJeM35EAQMYX6Kzh6Zb/uuTk1Le2tATpWXd1vmzhWZMgQH+vZbYoi9YH6PV6rqypEPLLKKkXIG0DdZuWtduoPkDQ7SQ7Pyprq9amyHwQQAABBBBAIIMCsbzJcviuvxSDM/gaS8l1+7vm+ZfkQy/8Lb6WPHlq6Q6HjQ3pPvXEEye/PdbXA3ncunwE3/++Ozg4GOsx3Gm5AgQAlus/9bNXVlZcY0ve9V9pjH8M+cdd22q6muwY6Mp2rUD+kVpsy6K/qEf1AXQLk/73QAIBGhCwdgu0xoMEPaqd9SQY5MkOCG4IIIAAAggggEDaAodppS2zrx9HXqPt/kmefxCMvm3285pcF5yW5z/phPUY8pakO/j2t2mHOCnegu9PAGDB4LM+nS8XeFWJstU2pBqnV5rucBVf0gIec7X1NdMRXN2KpBf/uhtA6yEE8ktcP6zdHq4PsOlKssbcEEAAAQQQQACBmQWStn67soN032Rh6ZFP8q6/7CLVm75+tPjG0Wiu+llfH69+/OMnv5XK12uf+IQb3r3rWlJ/zPrOiVTAlnAQrhKWgD7NU5blH6nmfNfl4t+ldHGn7xavXLzoKiurZnO49Je31gPQaK7+oqtITYRC1AdYl/oAGiSiPsA0/9x4DAIIIIAAAgiIQKHy/GXbfxEu/H0Jcqx/6lNzPb81lWBTPjQtoC1dyawHU+aKOYeDEwCYA2qahzy88JfWfnLhrwX95nHT/HEtEtjXKq4HNqO7GoF8sD6ABgIs/kI6rg8g6QF16QzhUx9gHv9sOCYCCCCAAAJmBeL+QHaJHr7rbz3PXxL+C9PWb319w5U/dHFh562mBTTl2fp37iTpuRZfdy8MM8UnIgCQImaah9K2fhUp3FeTf6gL2c4t7xTXLmy5apIWYDe/SyO7Wh9AdwJoWoCmCWh9AIu3++sDNJ1Xq1qcJnNCAAEEEEAAgbQEpJ2y5TpRI6ZRnr9ekMYF2O6vr3m1bd+ybrWPfcxplardd94x+ebbslynfV4CANPKzelxeuGv7/brdv9lbN8+bBv4WBIISHYESL6Xxciv1gLQi/+T9QEsti+5rz6ABHcamhaQUgrJnP4JcFgEEEAAAQQQWLRAkucvO0H3W6bz/JMLf3nHX29F2O5frUie/yfSz/Nf9OnJ86UrQAAgXc+ZjrYi27XrFy64oX9YgGSmg8344HKB6wNYLFii3R6i9993oeRhVWVXSU3aR05dRHLGc4uHI4AAAggggEB2BPS1QW931+nOQau3UVs/3e5fhAt/bYm9Mec8f6vnShHmRQAgI6vsS4Ru5bHHXJSxom2j+gCjPLDI4Hb5UX0ALYpivW3gYX2Au/JHvu3qTakPIGkm3BBAAAEEEECgeALDQeC6uztJdX+Luz1HK6oXwxoA0Nd7ut3f8k3nuSqv7dJo62fZqehzIwCQkTOg3JB+9Rm7+D+mkXHpzoSq9Ant7+65vmwPs/iHIpQ/CqFEv4/rA0ge3EDeObd4G9UH0BoTteam86RDAjcEEEAAAQQQKICA5vm39lywf+B0h6DVm27314t/vfC3/K6/XvT7jRVXW11xq9LZa6VacbtWF5V5pSJAACAVxtkPUp5Thf/ZR/bBEfQisXHxiaQ4YU8ixla3ip2sD7CysuIG0i1AgwPWbhrE0Z0dQbeTpAXUNS0gq0Eoa/jMBwEEEEAAgUULSJ7/QC78+9KfXXcEWr0db/eXCWp9J8uV5yvyOrUmKcT6WVM7NZxzWOHA6uoyrzQECACkoZjGMSRKmZebLxHGNSlW2Jc/IgMpEmjxj4j+sdA2gRo9rkk9BP/ovy3+EdG0ju72PRdKICD5I0LbwLz8U2ScCCCAAAIIjCUQtTvJdn+rb94ogl74j6r7W7/w9+W1aXV9XQqHP/zmjd3QzlinOncaQ4AAwBhIi7hLqZSfAEDiIe8U17a2XE26FVjeRqbbxrRtoO/7x20DdYeAxUDAKC2g2pE/KLIbQAtBckMAAQQQQACB/AoMNcgvBf70DRuL6ZujlRld+OvrNn2dZvVWlpphFbo6WV3ehc2LAMDCqM95orzu15GWcg0pXqiBgFGhQIt/YDSSrB/aTkV7qeofF4t/YHTttP1j2Om6itR8qG9uOG0NyQ0BBBBAAAEEciQgr1l6e63kwt9ynn+S/y5v0uiFv75Os3oryY5Ufce/Ltv9vRp1m6yu86LmRQBgUdLGn0d/Ga1cvOiqUnwkySs32kpGiwIGYZCkBWixQKv1AZK2gTvSNlC6BVQluJO0DaQ+gPF/xUwPAQQQQCD3AuT5534JH5yA5vfrhb9PiuaDNPz3lAIEAKaE42GnC+gvpzV5h1zfRdZuARbbBur2/16vl1SWTeoD6LvmUi/AYlrAYdvAflIokPoAp5/zfBcBBBBAAIEsCETy5kt3x26RZjUeFfjTd8St5/mXpfh20q2JIs1Z+OdlagwEAEwtZ0Ymo/UBLmwlbQN7kndmtW2gtpTpnGwbKFvPilAfQLsFeNQHyMg/NoaBAAIIIFB0geEgcJZfb43Wd5Tnr2+4hIbz/DW4oRf+9WbTlaSlHzcE0hYgAJC2KMc7FtBfWto2sLq6arryrF70axS64st8ZffDQAruWMxDoz7A8anNFwgggAACCCxfIJIdiEdt/SzuuBwBJ+/6l8vJTkt988XijsvRXHW7f6O55crScYsbAvMSIAAwL1mOeyygv8SStABtG2i096z+MXqwPkCggQD5Q2Xtdl99AG1BI3lp2nuWGwIIIIAAAggsRiA8aJuuuaSKo+3+8oWzfuGftPXb2Dhs68drqsX8IyrwsxAAKPDiL3Tq8susJluZalJZvif1AQb7B85iVVoNBGh9AF8i1RXJ3fLlv83XB5A0COoDLPRfE0+GAAIIIFBQgbg/SC78Lbf10wt/3e6vn7W6f2zwzZTR6att/arS1k/TK6Xn9OjbfEZgrgKcaXPl5eAPCcgvt7q2DZR3ji33pdV3/sNu97htoKYEFKM+AO1pHjrn+QYCCCCAAAKzCgSh68obKMGBzTdQRjz35fkXoK1fI8nzp63faP35vBgBAgCLceZZHhAoybvjSdvAVdkRsGu3Yu3JtICkPoB0C7CYFnBffQCJZDc2JJJd4dfLA6c9/4kAAggggMBkAtLWTzsrDaSzknbmsXo73u4vE7S+3T9p6yd5/j55/lZP58zPi1fomV8i2wPUX36jtoFW/7iN0gI0qp20DZS0AN0NoH/grN2S+gDvv+/Cdlu2tEkum25pI5fN2jIzHwQQQACBBQiE7Y7pN0mU8PjCvyh5/rw2WsC/HJ7iPAECAOcJ8fP5C2h9gK3D+gBdKRQYGK0PoHlsXUkL8CUNoio7IDQwYLs+wF0XdNpJGxtfOkFwQwABBBBAAIHzBYqQ568Ko+3+Rcjzr7A78vwTn3ssTIAAwMKoeaJzBWTLeEPrA6ytmy5wo/UA9N3/SuWwbaDuBtAPi7dACgSGUhSxKjUfyHOzuMLMCQEEEEAgNQF5fZDk+Rt9I2TkNLrwl3dCTLZNHs2zJDs/9fVPXboleTXy/EcufF6+AAGA5a8BI3hAQH9JHtYHWJWtb7vyLnLngXvk/z+TtoHSJlAv/DUtQIMBgwLUB0gq3VIfIP8nMDNAAAEEEEhPQPP8DbdKHkEdb/eXbxQjz78pef7sgBytP5+zI0AAIDtrwUgeENBfmmuNFSl+syvFb/ZNFr8Z1QcoS9tATQvQtoEDCQzodjhrN60P0JX6AIHWB6DXrbXlZT4IIIAAAlMIRJLn3zVcDFlJji/8C5Pnv560R6YG0hT/IHjIQgQIACyEmSeZWiCpD7DlqmvSLWCvZbb9jUbCtT6A7gSo1+tJZFwDARogsHbTKsbhXakPIIGAhlTBLVMF19oSMx8EEEAAgXMEhrIDsLez6/pS3V876Vi96RscuuVf39iIDLf1K1eqriKvVeubG64kr+W4IZBlAQIAWV4dxnYsoL9MG49LfQDJpeod7Qiw+AdTUwK0RsAoEKBfF6M+wJYrVfmDeXzC8wUCCCCAgE2BKE62+/dbLRdJoN/qLcnzl3f89W0MfS1j8Q0NXTvy/K2ewbbnRQDA9vqam92oPkBlZTVJDbBcH0C3zCVtA6VrgO4GsNg2UIM42t847HSlUI5GzpvO+WVz5y0TQgABBBBAIDhom33tMlrdIm33r6ysJFv9K2vk+Y/Wn8/5ECAAkI91YpQPCOgvW/3FW6T6ABo9t9o28GR9gJrUB6hqoUBJ/+CGAAIIIIBA3gWK0NZPL/z1XX/9bL3Any/Fm7W6f03ftOC1St7/eRZy/AQACrnsRiZdsPoAvuwEaDQayVY63RFg8TaqDzDQ+gBbUh9AgjzcEEAAAQQQyKWApPV1DdcvGq2JXvhrrr9e+FvcrTiaJ3n+Iwk+512AAEDeV5DxJ8VWDusDaKHAvaRjgMX6AJpDp39YtT7AilwYaxBAv2fxpqkdYa8nNR82XL3ZpD6AxUVmTggggIBVgTA6zPOXDkaW8/yPt/vLOhYjz3/TefLuPzcE8i5AACDvK8j4jwX0l/LKxYuSGmC/PoD+odW2gfrRkwtli20DNYijBR+DbsdpWkBN0wLK3vF68wUCCCCAAAKZEoilla8U9+u3pLaNdLyxeksu/OUdf6ns5yL5W221wJ+uH3n+Vs/iYs+LAECx19/k7JP6ALJVXovLaXsdi9F3veDXC39f/gBbbxuo69e5d8/prgAtEuhTbMfkv1smhQACCORZIJJWvt3330/+VuV5HueNXbf6awBAX4dYfPNhNP+yvMGiuxBrm7z5MDLhsx0BAgB21pKZnBSQd4prF7ZcVXqy9nbt9tkNJSUglAtjTQtI6gMEoRsENusDHKcFdOQPclO24ckfZ24IIIAAAggsVUDz/PV1hrzzbzH9cGRblDx/betH+uFo1flsVYAAgNWVZV6JgPaWb1x8wlVWV5JAgMW2gTrRQF6AjNICLNcHOJkWoBV4k7aBpAXwrx0BBBBAYNECst1ft/rrbkOLOw1HnCe3+1vO89f56nZ/rTvkr9LWb7T+fLYpQADA5royqwcE9Jf5WkPbBmqRwJbJ3LxRm0CN0mttAO0aoIUCLW7R0xdb3e1tF8qWS23DQw/eB054/hMBBBBAYG4CYbsjbyrsmN7uf7LAXzHa+h1t96et39z+3XDg7AgQAMjOWjCSeQskbQObriZpAV2J2gf7B077z1u7HdcHkACA1gfQiL3uELBYpGeUFlDtaD/eTVemOq+105n5IIAAApkRGA4C02mFI2h9I0E/9HWD+bZ+62uuoUWGK1wSjdafz/YFONvtrzEzfFBAfsk3HntMAgHrSZX5gbTpsZi3pxf+SVpApZrUB9AggH5Yu+na6c6OsNOVnQBrkhawkbSGtDZP5oMAAgggsCSB6PDvjNXCwiNVfddfdw/qGwn6+sHqTfP8R2mEXo16QlbXmXk9WoAAwKNt+IlxAf2lb71toC6hFgUMwsDV5N1x/cMeyPZ5LR5o7aa7OaIdqcDcPkgCAQ2t3Cvz5YYAAggggMC0AsFBW4LM0pJWCu5avR3n+csE9cLf4o7B0drR1m8kweciC/DquMirz9wTgaRtoBR+sV4fQNsGavuepD6AbOvrS49ii3/ktT5AJK2YwnbbVTckp0+39pHTx792BBBAAIEJBOL+wPQuwRHFqK0fef4jET4jYF+AAID9NWaG4wgc1QdI2gbKdvLgwGZ9AP0D35XCecdtAw3XBwglwBHevSs7Atqu0dxyZekEwQ0BBBBAAIGzBIbSTrdn+HXAaO564a95/ta3+5clDfIwPXBT0gO57BmtP5+LLcC/hGKvP7N/QED/ODQel/oAUhRGXwBYrQ9wsm1go9FIugVYzfc7LhQobQM1EKCtIbkhgAACCCBwn4C29ZOt/vp3XwPIVm/H2/1lJ6Dl7f4f5PlvOo8CwVZPZ+Y1pQABgCnheJhtAf1jYb0+gG7/1zQAfTGg9QF0V4C2DbRY8fdkocDqxrqra1qAX7Z9EjM7BBBAAIGxBIqW5299uz95/mOd9typwAIEAAq8+Ez9fIGkPoC8Q96XtoH9Vstpfrm1mwYCtD6Af1QfYBQYMFkfQAoFdre3kxSPmtQHqFIfwNrpzHwQQACBsQWKkOevQX7d6q+frV/4l6tVqftzVPun7I19HnBHBIomQACgaCvOfCcXkD8ita0tV1lddf1dCQTst2y2DZT6AKHUB6getQ0MJQ9SOwhYvI3qAwy0PsDWBVdeaVicJnNCAAEEEDhNQP6+dQuQ568X/vqhAX2raX66vLrdv7YuF/5N2e4vQQBuCCBwtgABgLN9+CkCxwL6R6Vx8YkkENDb3THbEmjUNlC7BaxIdwRNC7D6wmFUH0BfONSbTeoDHJ/tfIEAAggYFEjy/LW+T6swef7W3/XX7f51qe/jU+jX4D9YpjQvAQIA85LluGYF9I/M2lFawEDSAiwWCxqlAeg7B1ofwPf9JBCg1YKt3bQ+QO+oxzP1AaytLvNBAAEEDgXCdsdZDt7rLJMCf/J3W74wv93fl9cmtPrlXzcC0wkQAJjOjUcVXUDbBso7xrW1tQ+2ERqsD6AX/No2UOsDaCBgFBigPkDR/wEwfwQQQCAfAkXI89eVGLX103f8Y/mwetM8f23r19jUYr5cxlhdZ+Y1XwH+5czXl6NbF5A/Po3HHnN12ULek90AwcGBiwzmzYfyYiKSQoEVv+K0bSD1Aayf2MwPAQQQyLlAeJTnv2/z7/JodR7M87cYoNe5lqU+kV7416XIH+18R6vPZwSmEyAAMJ0bj0LgPgH9Y9R4/DFXXV+TPsKaX7hvrlCgvqh4qD6AtBHU4IDF23F9AHmx0ZDdHtIn0eI0mRMCCCBgS0Dz/KVzj9UUvdFiJdv9ZXeebM0zvd1fC/xV19ddTd7xL8tORG4IIDC7AAGA2Q05AgLHAvrHaeXiRVdZkY4BR3nlxz808sUoDeC4PoAGBiT9wWx9gN3dpOBjTVoG6gsQJ+kf3BBAAAEEsidQlDx//ftbhLZ+WuCvttmUd/5Xs3eyMSIEcixAACDHi8fQsyugf6wqslVei8vpboDIcn0ASYOo1+vJOxAaCLC4/VDXr3PvrgQC2lQbzu4/O0aGAAIFFRgOAteV7jwWd9+dXFK98Ndcf83z1w+rN83z13f963Lx76QVMzcEEEhXgABAup4cDYEPBOSPVv3CBVddPUwL6EvbIa04b+2mLQL1hUhFtshrfYAgCJIPa/PU+RynBdA20OLyMicEEMibQBhJ/R3d7i+BdoP1d0bLMdrurwF2/ZtrMdCuc9Xt/tqWV3fbebXqaPp8RgCBlAUIAKQMyuEQeFBA/4g1Lj7hfNnKZjktQN/914v/qkTuV3SuUh/A4jsUx20Du53jFyq8Q/HgWc9/I4AAAnMUkDz/gVz494224h3JjS78ref563zZ7j9adT4jMH8BAgDzN+YZEEgERmkBWpxIX7RYTAsY1QfQLYraNlDrAmggwOK7FUlawPY9F2gggBxF/pUjgAACCxGIOl3X3Xk/2ZG1kCdc0pPo39Ei5Pnrdv+aFNvVOjsE05d0svG0hRMgAFC4JWfCSxWQtIDa1laSFtCT4nJW0wL0nf9Op3OcFqBbFnV3gMVAwCgtoNo5zFdk2+JS/4Xx5AggYFRgKH9Dejt2/26Olq0oef6j7f516bJDW7/R6vMZgcUIEABYjDPPgsB9AknbQEkLqK6uJoWL9CLS4m1UD0DTArQ+gKYJaDDA2k3TArT9YyjvTCV9ijelTzFtA60tM/NBAIFlCETy+1V2zenuOYs750akJ7f7zyvPvyK7Cqryt6lW8V1FCvjW/EryuSpfR/J3LNBgvQTwB/r5xNc6nljqD6R10+3+jeaWK6+upHVIjoMAAhMIEACYAIu7IpC2gP7xW5MLY+s9i0f1ATQtQIsFalqAxbaBWoQqkq2poXQLOOxbLBWMaRuY9j8bjocAAgURCNttp7vlrAbJdRmTC38pfqc33T03zk65mvwdfUyq5D8mW+cf2zj6LP/9uPz3heT78j2toq/V9OUiv+qXkwt9fa5pbxogOA4MSECgJzsy9mR9dg4Ojj7abvfo692DD76/K/c56HaTp/XlNUB1tN2fv43TLgWPQ2BmAQIAMxNyAARmFJA/gjXZAldbW5O2gVLNeP/AZDVjfVHT6/WcL+9AaNtAy/UBQglw6Ie+aKU+wIz/Png4AggUTiCW3WL9XamXY7R7zmhBR3n++vfwwaB4WYICP/T44+5TH/6w++SHP+Q+/ZGPJJ8/euExeeOgPjrEwj7reBq6m08+RrePPfbY6MszP+uugt12x/3gYN/d2Wu578lrne/J+t45+nww6J/5eH6IAALpChAASNeToyEwvYBswavLH9OaRO278o6H1X7GobwQCOXCuFo5TAsIA91qSH2A6U8cHokAAggYEZDt/oeBcJuFckerpHn++qGBcd1e/1H52/8TP/LDxxf7etH/IxcvOt2yb+Gm83hCdirox2c++tGHptSSNwdOBgQ0QPCuvA76i3vbbhDZSxt8CIBvILBgAQIACwbn6RA4T6Ak0fUV+cOv9QEsb30cyHZ5vfDXtIC6X3eB1geQ4IC124P1ARrS31j2YlqbJvNBAAEEZhIIZNu41Va5I5hRnv/H5W/8pU983H3uySfd5z79afehLUkXK/BtQ3YFbny47n5cdjqcvGnawbe333ff/MEP3J/+1Q+Sz9/a3nahfJ8bAghML8Cr0OnteOScBR6TC+Bq2dYpele2v437h8uX+a81VhZeH+BX/87fdp//D39hzqv78OFHuYnj5D8+/OgcfUdyMHWuo/meHLmWWArlHTB9x2MQRq4v7wyNvtbPffme5mAmHxIs0Z/r1srkfkc/062UdyWN5J7kXW7Llst4yAulk8Z5+Lpc8txF2QnEDYEsC9yTfO8gnj1oG0m6lBZRtbrrTX/XPynb93/qR590Tz/5aff0pz6V5OlneW2zMjZNO/j0E48nH7/0mZ9IhqV/8/783j33zb+6mwQEvimBge/s7PC3LiuLxjhyIWDr6ioX5AxyXIHf/qW/637iIx8e9+65uN+zf/DP3Hd3d8Yf66g+wOqa60oF5GAB9QE0v29L6hFwy7+AVm1+X4IA+kJdAwJ39XPy0U4+35V33O615UW8wZ0XeV69D8k22f/pV5/J8xQYewEEnnvln7m/lAuvaW9JWz/JBw/kd5IWULV00+39f13e3f87n7vsfuHSJf6mpri4mk7w4x/6UPIxOqwWJPzG999z/99f/qX713/5Xae7BLghgMCjBQgAPNqGnyCQHQHZMt7Q+gBr65Ifabc+QHbAbYzEk3eeHl9bTT7OmtFet5cEBLQg05/f1XdV7rp35PPuUeXmsx7LzxBAoJgCetE11U3b+uk7/rojTt79t3I7vuh/Wi76f5KL/kWua126IvyU1FDQD71p4HsUDHjtu9/lb9kiF4PnyoUAAYBcLBODROBQwKsd1QdYkfoAEgiw3BqJNV+cwKZUlNYP3Wr5c7JFdXTTHQMaCPgzCQgkH/L1tuwk4IYAAgh0pwgAWMvz14v+n5Lfmb/49NNc9Gfon8QFabH8Hz3148mHptZpYFt3BujHn3z/++x6y9BaMZTlCBAAWI47z4rATAL+mtQHWJH6AEneZMvUuygzwfDgVAWekFQQ/fjpT37y+Lg70sFhFAx4RwMD8sLqr/b3j3/OFwggUAyBnnRwGfcWyzv9h9X9950WRs37bVNq9Pznf/Nn3H/xH/ysu6iFXbllVqAkI3vyiSeSj3/wU59zunPl//32d9z/+c0/c//qO98hGJDZlWNg8xQgADBPXY6NwDwFtD6AVA6uygWavrCymEc5Tz6OPZ3AlgSe/oZUr9aP0e2vWvvuX3zrW+5ffuvb7q0730ulMNjo2HxGAIHsCWjHlnEKAFrL8/+0FPO78rd+3v3SX/8pV5Nt59zyJ6DpAj8vBRn140ACU//3n/9FEgx44907FBLM33Iy4ikFCABMCcfDEMiKQEnrAzwu9QGkajj1AbKyKsUahxat+2XJedWPjrRz1NzLf/EX307eXdH+ztwQQMCWQE86kJx5i4dJSz+t7J/3PH+t4v+zUoFeL/z/xo/92JnT5of5EliTNsR/9yeeSj7el91t/9efvZMEA95+7718TYTRIjChAAGACcG4OwJZFRjVB6hIfQDrvZSzugaMy7kV6SLxc1L9Wj+0C8G/lcrMujNAdwjMUjEcWwQQyI7AWfn/oXQXsVCjpur77pd/5qfdlZ//effDUh+Fm22BC7K77T+VILZ+vNdqJYGAP/p3f8rfLdvLXtjZEQAo7NIzcasCFakPUNH6ALvSLcBYlWWra2Z1XtqF4LMf/Ujy8V//zZ9235NUFQ0G/D9/8S1JFbhjddrMCwHzAt3Bwx0A4v7AxC40fcdfi/p9+e/9J+6j0n2HW/EEPryx4a5Imod+aOHAf/7mW+5fSd2A2GlJQW4I5F+AAED+15AZIPCwgNYHuLDlqutaH8Bmn+WHJ813si7wUSmW9Z9d/snk4zvvv+/+59ffdH/0p990g+ic7cRZnxjjQ6BgAvftAJBigN2W1KHZP3BRMMi1xNOf/pT7b375l91nPv4juZ4Hg09PYNReUAPY/8ub/8b972+/7dqS6sYNgTwLEADI8+oxdgTOEShJsRutD6CBgMOOATYqMJ8zbX6cA4GPX7jgfuNv/4J79mf+ffeH/+b/Z+8+wOO4rkOPH7Rd9EqAAHsVi0iKFCmKoqolWZZkNcty73bixCXFTuK85MXxl2LHjhPHsV/iGpe4N8m2itVMNUoUKYq9915B9F7fOUOuBFIEuQC2zNz5X37zLbbN3Pu7iyXmzL3nbtZto9gcTAoCCPhfwAsAePP8G6WrOfgr0UysqpI/vftOuX7uXP/jU8O0CFgA+yPXXSPvW3KlPLFtmzcq4JCOtKQgEEQBAgBB7DXqjMAQBbI00U2+/oFDfoAhwvHypAuU5OXJuxcvkrcvXCDLdFmm+9etl921tUk/LgdAAIHhC7R1tEvLUV3xI+BBuzJdRefDt90q9+qSflmZmcMH4Z2hEciP5Mjd8+bKXbqt1mUEH1i3QRPfHtTJAUwPCM2HwIGGEgBwoBNpAgLxCnj5AfSEK7ZaQC/D2OKl43VJFsjOypJbZs30NluOyQIBli+AP6qSDM/uERiGQEtTc+BP/m2e//95631SUlAwDAHeEnaBDAW4YuJEb7Mpbd97cZUuKbg77Cy0PyACBAAC0lFUE4GECWRlSq4Ov47olY/Ohkbp1OGb/X19Cds9O0JgpALzx40V2w7r5/MBDQQ8smWLdOu64xQEEPCHQJuunx7UUqxJcj9135vlVk3wRkEgEQI2pe0zt98qO0+clO+seNFbCjcR+2UfCCRLgPFOyZJlvwj4XCBTl2vLq6qUwupqb9UAn1eX6oVQYGxpiXz8huvkW+98h8wfOzaEAjQZAX8KBDUAsGTmTPnp3/w1J//+/FgFvlbT9W+qf9FcEl9685tk7pgxgW8PDXBXgBEA7vYtLUMgLoFsHf5YmJsnnbrubadmcqYg4DcBCwR88d575PGt2+Qby5+Xpo4Ov1WR+iAQKoH2gI0AyNWA95/fc7fcd83VoeonGpseATv5tyDA6gMH5LsrVsqOEyfSUxGOisAgAgQABoHhYQRCJaDTAqJlpRItLJDsaG6omk5jgyNgOQKunDRJvv7ccl0+cHtwKk5NEXBMIEgjAObqd8Y/vufdMr5ylGO9QHP8LrBowgSx7fndezRHwErZp7kCKAj4QYApAH7oBeqAgF8EdNnAnIJ8v9SGeiDwGoGSvFz561tuli/o1TxblomCAAKpFwjKCIC7dMm2b/3Zn3Dyn/qPCEccIHD11CnyyZtuHPAIPyKQXgECAOn15+gIIIAAAsMQuHz8OPnmO98u71i4ULJZvmsYgrwFgeELtHV2Df/NKXhnRkaGfPSON8rfa/4QW2GEgkC6BR7cuCndVeD4CLwiQADgFQp+QAABBBAIkkA0O1s+uHSJfO3tb5PZmsySggACqRFo6/LvKgARHcn22fe9Vz54y+tTg8FRELiIgOWteWbnrou8iqcRSJ0AAYDUWXMkBBBAAIEkCEyqKJcv33evvGfxFUnYO7tEAIFzBTp8OgKgTJe3/frHPya3XL7g3CpzH4G0CTy6Zat09fak7fgcGIFzBUgCeK4I9xFAAAEEAidgQ37fe+ViGV1UJF9+6mnp6esLXBuoMAJBEfBjEsBJo0fLf/7xh2VsRUVQGKlnCAT6tY0PbdwcgpbSxCAJMAIgSL1FXRFAAAEELijwhtmz5LN33SkFuuwXBQEEkiPgtwDAnIkT5buf/HNO/pPT3ex1BAKr9++XoyyxPAJB3poMAQIAyVBlnwgggAACaROwBIH/oVMCKnU4MAUBBBIv0O6jHABTNP/HVz7yR1KUl5f4hrJHBEYo8NsNJP8bISFvT4IAAYAkoLJLBBBAAIH0CkzWYcBfect9MnUUa3+ntyc4uosCflkFoKa8XP7rYx+R4nyWr3Xxcxb0Nh1vapZV+/YHvRnU30EBAgAOdipNQgABBBAQGVVYIF96872yaMIEOBBAIIEC7Z3pXwWgXPN92Ml/ZUlJAlvGrhBInMBDmzZLn1gWAAoC/hIgAOCv/qA2CCCAAAIJFMiP5Mg/3/lGuX327ATulV0hEF6B/v5+ae/qShuAJfwsLijwhv1PqKxMWz04MAIXEujp7ZVHt2y50Et4DoG0CRAASBs9B0YAAQQQSIVAVmamfOKm18kHlixJxeE4BgJOC3R0d4sFAVJd7MQ/KytL8qJR+eIHPyAzx41LdRU4HgJxCzyza7c0tLfH/XpeiEAqBQgApFKbYyGAAAIIpE3gnVcslHddsShtx+fACLgg0N6Z+qv/mRrEy84+vXL137/z7bJw+jQXKGmDwwIPkvzP4d4NftMIAAS/D2kBAggggECcAu9bcqVcN21qnK/mZQggcK5AKlcAsKv+2XrVP1Nve3p65E1XLZGb588/t0rcR8BXAntqa2XzsaO+qhOVQWCgAAGAgRr8jAACCCDgtECGtu5Tr79ZLqmscrqdNA6BZAm0pSABYOzE34b89/b1ic2nnlRVJZ940z3Jahb7RSBhAiz9lzBKdpQkAQIASYJltwgggAAC/hSI6lDif7zzdqnQRGIUBBAYmkCyVwCw4f524m9ZBuyqv+UbyNH7n33/eyWakzO0yvJqBFIs0KoJMn+/fUeKj8rhEBiaAAGAoXnxagQQQAABBwTs5P+f7nijRLNOzyt2oEk0AYGUCCRrBIBd9c/RE3y77dUr/rbFysfvulMuGTs2dpdbBHwr8MTWbdLR0+3b+lExBEyAAACfAwQQQACBUApMr6qUT91ys2ToPwoCCMQn0JbgJICvDPfXK/92xd9O/AeuMnDlzBnyzhuuj69yvAqBNAs8uHFTmmvA4RG4uAABgIsb8QoEEEAAAUcFLCHge69c7GjraBYCiRdI5BQAG+pvW58O87d5/gNP/K3mJTpS5x/e/S5vVEDiW8IeEUiswLpDh+VAfX1id8reEEiCAAGAJKCySwQQQACB4Ai8e/EiufGSS4JTYWqKQBoFEjEFYOCyfnbVv08T/Z2v/MW9b5JRxcXne4rHEPCdwIMbN/quTlQIgfMJEAA4nwqPIYAAAgiESuAvbr5RZo0eHao201gEhiPQrknOhlu84f6ahPN88/zP3afN+b9t0cJzH+Y+Ar4UONXaKs/v3uvLulEpBM4VIABwrgj3EUAAAQRCJxDRYch/d9sbJI8s46Hrexo8NIHhTAGIzfPP1pP/WIK/c4f7n1uLj991B0P/z0Xhvm8FHtm0RXr7zz+SxbeVpmKhFSD9cWi7noYjgAACCAwUqCoqkj9YepV89ZlnBz7MzwggMEBgqFMAbI6/BQBsmH9fd3zZ0RdNny5LZ80acFR+HKmALavYqf7tZ7aOAT+3d51+3B4TTYoayc4SC4rakqn2c46ulmK3tmpKfiQi5QX53nMjrZMr7+/Vz/Yjm7e40hzaEQIBAgAh6GSaiECYBfYcOybLN20ODEG2/tFVpImvivPzJD8alQLdCnPzpDAvV29zJcIV6qT25Z3z5spTO3bKpqNHk3ocdo5AUAXa41wFwOb522ZX+m2e/1DKn+iyf5ShC7R0dsr+ujo5UFd/etOEdPZzQ3u7dGof9Ou/RJUCDQSU5edrMKBAyu3W+/n0/bGlJTKhrEwK9f+vMJQX9uyV2taWMDSVNjoiQADAkY6kGQggcH6BbQcPyVd+++D5n/Txo3bFLKJ/YNnVsy6dcxv7AzpH7xfmxQICp28tSdbM8eNl1vhx3q0FDijDE7AFAT95043yxz/5mXT1Du2kZXhH5F0IBEugravzghW27y773tIz/9cs6XfBN5558qb5l8mlEyfE89JQv8ZO9L2s897Jfp2e+NdLfXtbykxa9f8l2w41NAx6zFL9v8oCAeO9rfTMbZlUFxc5Nb2Dpf8G/QjwhE8FCAD4tGOoFgIIhFvArpp16tUcu4IW1RN6mztrgYBuXSqrvqXF2wYK/W71y95d++N7QmWlzJpgAQGCAgON4v15fFmpvGfxFfI/K1bE+xZeh0BoBAabAuCd+Ov3VYZuFrC82Bz/84Fl6Xs/dscd53sq9I/Ztfvtx497ieae371HDjb4f7k5G3lg24YjR87qP8u1cklVlczUxKszq3XT21GFBWe9Jih3Duooi7WHDgWlutQTAU+AAAAfBAQQQMDHAjZvtl3/gLIAgAUC7L4FAgb749oe33/ihLc9ep6gwGwNCrzusnlSU17u41anv2pvuXy+PLplixxubEx/ZRyoQaN+hu1qYdiK/T726++sbQkcfZ1WxoaW1tccPzbcfyjz/F+zE33gjRp4m1BVeb6nQvmYzS3fcPiInvTvkef3uDPM3PIQrD982NtiHVuhUwlsJRYLCMzQ21l6azkI/F64+u/3HqJ+5xPw/2/W+WrNYwgggEDIBOyKmm2RnIjk6bDKnu4e6eqO74Tq3KDAf/z6N7J4xiVy95Ir5YZ58zS5E/8VnPtxsiuR71efzz72+LlPcX8YAt9ZsVKTZAUnF8cwmnj2W3r7pFODR53NTdLrcOAjduJv3zGxaUpnQwzt3r1XLx3aGxx9tc3l/9nLa+VhzV/T3NnhaCvPbpYto7d8zx5vs2dyMrPk0ppquVxHsy3UbbqObLNRJn4qljTx8a3b/VQl6oJAXAL81RcXEy9CAAEE/CFgJ/3dPd3eaIC87Dzp1pOLHp0WMJRif6yv3Lbd24o1cdNtixbJ3VddKbbuNuVVgesvmS4/fXmN7K6tffVBfkLgIgLdeoW8s7FButtSNx/7IlVK+NOx4f62Y1vWz75TRlqm1tTInIkTR7qbQL/fpnj9ZsNG+fFLL4fmxH+wDuvu65V1OkrAtu+seFGKorlyuea5sYCA3VZr7pt0l2WaMLb1Ijkx0l1Hjo/A+QQIAJxPhccQQAABHwvYH9sdHR1eoi1LFJit921agA2/HWpp0pOUnz37rLdZzoC79Kr3rYsWSpGOMgh7sWtNH1q6RP72tw+FnYL2xyHQp1dtO/Sqf1dz8+kh/3G8J2gvsRN/u+pvt4k68Y8Z3H3VktiPobu17/QnNCj7/RdXyYmW5tC1P54G20iIZ3bt8jZ7/diSErly0iS5ZtoUmaPBo3SMDmD4fzw9x2v8KEAAwI+9Qp0QQCBhAlk6bz5Lh833xjlcPmEHTsGO7A9wyw+QowmVcnWJQLt/ofwAF6vS1oMHxbYv6xSBm+bPl4/ecbtUa/bmMJcr9IrkvDFjXpPEKswmtP1sgX4dBtzR2CTdmpzTxe+ZWGsts7+dZNnJaiKG+8f2a7c2DemNVywa+FBofn5p/3751vMrZO+pU6FpcyIaavlZ7l+/3tvK8vLl6qmT5ZqpU2X+uLFiU7iSXbboEsO7Tp5M9mHYPwJJESAAkBRWdooAAn4RyI5GpFDnEbp8Za5bT0DsD3ILBFh+ALtv23BLp773kZdekqc3bJCP3flGecu110qmz+ZeDrdtw3mf5QL45P0PDOetvMdlgT5dqUOH+tsV/x69+u9qic3z1zP/hF/1j5ldP3eulGgSuLCVH65aLd9fuTJszU54e235w4c0X4JtNlVg6RQdGaDBAMsdYEvnJqM8uGFTMnbLPhFIiQABgJQwcxAEEEinQKaOAsjXJYdy8gucnZtrV+Xs6r+XKNCmBegVNbtvowKGW2y5ry/+8n55dPUa+fQ73i5TNJASxjJ37BiZOmoUuQDC2PmDtJl5/oPADPPhe0I2/N++r//rmefkNxs3DlOMtw0mYFMFHtu6zdvydfTf0imT5ZZZM2W+5g1IVArBxvbT0xEGqwOPI+B3geSPkfG7APVDAIHQCOToOsOF1TWSXzFKsvQk2cVieQAsP4AlB7RlA21qwEjnRm7ct0/e9a9flG888juxJFVhLPfo0okUBPo6u6RNl9lsPX7M2SR/9n1hw/1t67Ph/vo7byesySpjdElSW5UkLMU8P/fYE5z8p6DD23Tq35Pbt8undFrbu7/7v/K9F1fKkQQs7WpLxIb1/8IUdBuHSIEAAYAUIHMIBBDwkUBWpkTLy6SoZozklpRKRgrmCqaj9fZHZpsm+LMRADYtwJYPHEmxP3a+9ehj8s7P/6ts2Lt3JLsK5HtfpysC2NBSSkgFdNnN9tpT0nL0qLe8X/8wEm4GQc6G+9voISs2mmg4iUWH2s6bL18w4iDlUI+Zrte36/Sqv3vwYXl65850VSG0x7Xkij96abW8739/KJ+wkW1btkpb19CnylkwzKYaUBAIsgABgCD3HnVHAIFhC2REdL58VaU3IiBHl8JztVguAEsUmJGZIfnaztgf98Nt797jx+VDX/6K/Osvfik2RSAsJaonRbddOisszaWdMQGb51/fIM1Hj0hHfZ2zSf7sqn+2XvG3XB924j+SqUMxunhvr7wkHFf/W3VU1l/d/2t5WROtUtIrsEkDef/++2Xytv/5jnzh8Sdl3aHDcVdo1f4DcqypKe7X80IE/ChADgA/9gp1QgCBlAlkF+RLoV4h72zS5bv0P3UXk3nZFYtOPVm3q3u2bKAlC7T7w726Z/v7+XPLZeO+/fKVj/yRlBUWpqy/0nmguzRR2S/XrJM+Sd5w6HS2j2OfLdDT2iYdDfXODvW31saG+9vPdtKfzKH+doxziyVou0znaIehfPv5F2S7Th+h+EegQ4NdNkXAtok6FeXueXPl5pkzJE//jxys/HYDeRsGs+Hx4AgwAiA4fUVNEUAgWQJ6dTxaWnp6WoD+ERCG/ACWG8ByBIwkP4AtGfih//hPOVJXl6ye8dV+RxcXyWXjxvqqTlQm8QL9Oiy4/cRJaTl21OmTfwsIevP8dTqDXfVP9cm/9dzcyZMk19F8LAM/mZv1ivPDm7YMfIiffSawX/8f+8rTz8g7vvN9+dqzy+VwQ+NramhX/lfrCAAKAkEXIAAQ9B6k/gggkDiBnGzJq6g4HQgo00DACOfNJ65iid1TLD9Avw5vtvwANiJguOWAroP8wS99WXYdOTrcXQTqfddNmxqo+lLZIQj09klnXf3p4f66vJ/r8/wt+GdX/Yc7EmgIsoO+dNH0troHvQAAQABJREFU6YM+58oTPRpg+fKyp3XcECOHgtCnrV2dcv/69fKBH/xI/u9vH5KX9u9/pece2riZEWBB6ETqeFEBAgAXJeIFCCAQNgEvP8CoCinQZe+iJSXOJgrs0gzJlh/ArgR6+QF0OO5wSq1eFfnwV74qB/Sqqevl6qlTJDNhi0m5rhWc9tmyfnbFv+1UrfTqXG0XizfPX3NZ2Dx/O/FPx5D/c13DkP3/F2vWyr6QjJI6t3+DfN8CNqv05P9vNQjwAU0c+Ku1673EgUFuE3VHICZAACAmwS0CCCBwjkCWDpHPr6qSgtHV4mqiwFh+AFs6MFtHAtiIAAsIDLU06YoDf/r1b0hDa+tQ3xqo15dpIsU5Y8cEqs5UdnCBXs2FEYZl/SzBX5b+XttJf7KX9Rtc++xn8nTo/5yJE89+0LF7tuTcD1etdqxV4WvOYe3Hry9fLo0d7eFrPC12UmDof+U5yUCjEEAAgcEFcgoLvNUCbHqA8/kBdNUAyw9gyQKHmh/gUG2t/MW3vi1dOp/Y5XI90wAC3739tjqGLuvXevSY88v6efP8NXGnX078Yx+e+TqaxgITLpevPPWMdPW6/X3ocv/RNgRcFSAA4GrP0i4EEEisQFam5GqCwMLqGsktKXV2WoAlA2vTq/lWhpMfYP2evfKPP/5JYu19trdrpk5N7jQAnYtOSZJAT690nKqT5iMhWNZPh/v7YZ7/YD15+bRpgz3lxON7NCDKkn9OdCWNQMA5AQIAznUpDUIAgWQKZEYjkldV6fS0APPr0nnQlh/Arh5afgC7jbc8uvplsc3VUq5LR06tHJXw5vWq9+ns88cSvu9077CruVmsfWkrmvCyq6FBT/wPS3vdKefn+dvvq1/m+Q/W51OqRw/2lBOPP7trtxPtoBEIIOCeQLZ7TaJFCCCAQPIFbFpAjs6X72xq1K3JyRMKyw9guQHsZMKmBMTyBcSzXNgXf3W/WIKv8qKi5HdGGo4wV/MA7NQVEBJRejQBXWdzk3Rr/gSz7dXVKFwrPe1t0nz4sOQUFEi0qFiy9fcnVaVXR7S019c7vaSfWdrvaeyKfzy/o6nyH+w44ysrB3vKicefIwDgRD/SCARcFGAEgIu9SpsQQCA1AjotIFpWdnrZQIenBdiVRBsNYNMDbFpAPPkBGvVk9vM//0Vq+iENR5k3ZoSJAHWYf7cGjlp1KLpln+9qaUnLOuyppLOTUmuntdfabe2XJE538Ob568oUzboGe/eZaS2pbG+qjmVJO2NLedrvaBBO/m0lgnGjEj+KJlXmFzvOPp1mckCDThQEEEDAjwLuXWbwozJ1QgABpwW8ZQN1WkBEr2q6fKXRTi4sGGAnGxYI6NZEarYNVpat3yC/X7debpp/2WAvCezjczQAkKH/hry2t85Bt6v9diLco6Mrwli8QIAGiLp0y85t1N+bQm9UgGaESwyHBhVcHpkTQ7Kr/XbV3zyDcuIfq3u1Bk4jmqPA1fLsrl2uNo12IYCAAwKMAHCgE2kCAgj4QyBL58oX1oyRfB3amq1LCLpYvJO3AfkBLBBgJyGDlf966GHp63MvqV1JXq5MKC8brNmvfVznoHeemYPepsnBwnryfy6MOZiHzc03H1GnkRSbTmEjDGyfvfo5dbHYib+3rJ/+3vl9nv9g/uM1YOpyYfi/y71L2xAIvgABgOD3IS1AAAE/CWRmSLS0VIr0CnGerhqQlRPxU+0SVhcLBFh+gG49yYpqsMOWDrQTk3PLgRMn5LE1a8992In78zQPQDylt61dWo4ekTbNGdCj685TXitgLuZjTuY11NJnQSkd7t9y/JjTw/0t2GZbXwCv+g/s04kOz/8/qEP/99XVDWwuPyOAAAK+EiAA4KvuoDIIIOCMgA5vza2o0EBAjURLStxdNlCnBNiygXYl0ssPoAGPcwMB3370Me+ExZm+PdOQ2dXVF26SDkW3teab9Yq0y3PQL4wwtGfNybzMLa78AGrcoSdbLTrPv6OxQfodHG1igjbPP/vMkHkb7h/0UTUuJwBcsWff0D70vBoBBBBIsQABgBSDczgEEAiXQIZmz8+vqpLC6hrJ0SkCrhbLBWCJAjM1MaIFAmInK9be/ToK4AkHRwFM0MDOYCepPWrRqlejO+rrpF+DI5T4BczL3MzvQksHdp8Z7t9+yv1l/SxpXmy4f/yS/n3lBIenAByyqSwUBBBAwMcC7mZg8TE6VUMAgfAJZOva8YV6YmzJybo0+7mLQ8Fj0wLsaqVNC7AggAUG7MTlZ88+K29YeLlTHT9xVIW06pVnW9IuWlAomZrErrerWzp0zfuulmbpu0CCRKcgktQYSxLYo0P7I7qUZJ4uHZipySftCn+3Tj3pVN9uWznB0Sv+XoI//T3S4TTe74/9brlUxujoKFfLMVvdgoIAAgj4WIAAgI87h6ohgIBjAmfyA9jJYrsGAuwExsVEZTY82UYDWADAAgF2f+O+/XJYr9SOdegP/6iekFbm58lhnbveofN+My0pmy3DxhX/hP3iWhDFhvhb0CxbvS2YZI+5dkI8EMzm+FsAwH5v+hz9LBVozhBXywkNAFIQQAABPwswBcDPvUPdEEDATYGcbMnTE2FbMSC3zN1EgTZX2QIBdiJj0wJcTAY4peZ0HoA+bauN6uDkPzm/subbpZ8lC5i5evLv2jz/wT4Jlhg1P+pmAMDGaZzQwC4FAQQQ8LMAAQA/9w51QwABpwUyIzmSp8PIC/Qk0tVEgXay1mUZ2vXk7Ym165zrzykXSwToXItpUKIF7Gq/jZZxbZ7/uU4ZNjVI82bY912efve5WOpb26Tb0VEbLvYXbUIgrAIEAMLa87QbAQR8I5Clw+QtUWDB6NHOJgq0QMDOQ4dk+6HDvnFPREUIACRCMZz78E78zyzrZ1MbenRzdXSDJUC17zf7nsvVn7Msv4GD5TjD/x3sVZqEgHsCbn4Du9dPtAgBBEIgkFNYKIWjq3VaQJlk6ImBi2Xl9u1ONaumvNyp9tCY1AjYcH+b629Dxm2qjKsn/vY9Zt9n9r1m329W8jSXg6uFAICrPUu7EHBLgACAW/1JaxBAIOgCmkk+b9QoKXJ02cB1e/YEvYfOqv+o4uKz7nMHgQsJhGW4vxnYVX/7HrPvM9HvtVjJzXY3AHCiiQSAsX7mFgEE/CvAKgD+7RtqhgACIRbI0uzyhbljNPt5oy4d6M6yget27/GudtqJkAulorjIhWbQhiQL2Ofdrvjrh9/JZf0G8mXrlKaoBsYixSWiiQ0GPuX97Or8f2vcqbbW17SXBxBAAAG/CRAA8FuPUB8EEEAgJqB/PEdKSyVSWCQdjY3e2vJBXzawqa1N9h47LrHs+bGmBvXWljPLjUSkQxMdUhA4n0C2nfhrAMDm+bs61N/anaW/B/ZdlauJ/gZe8T/XxOUpALmazJGCAAII+F2AKQB+7yHqhwACCOjw2dyKcika48aygev2ujUNoKKIUQD8kr5WILasn+vz/G1ZP1vO1Pt+0u+pC538m5LLJ8mFOvqBggACCPhdgFCl33uI+iGAAAJnBDI0eZYtGxgpKpROGxGgGaf7+/oC57Pv+InA1flCFa7Q4c6HT5260Et4LkQCYRnub8v6RTT4ZUv72Uom8RYLiLhaCAC42rO0CwG3BAgAuNWftAYBBEIgEFs2MCe/QAMBDdKtw+qDVA7XunWyPIo8AEH6+CWtrmE58TdAS/AXLSnVzP4FQ/bs0lUPXC0EAFztWdqFgFsCBADc6k9agwACIRKwP75z8vJO5wdobpKg5Ac4fKrWqV7Kj+Y61R4aM3QBS/BnAYA+HZFjm6vFm+dfVHx6nn/W8GaRdmkuBFcLAQBXe5Z2IeCWAAEAt/qT1iCAQNgE9I/w3PIyieoa2x0NDdKpgQC/Tws4cqrOqV6K5PBfqVMdOoTG2Dx/2yy5X4/DV7ZtuH/UTvw1KWlGZGTL+HX1uBsAqNTpWRQEEEDA7wLDC9/6vVXUDwEEEAiZgP1RnldVKYXV1d7wXD83v62zU+qaW/xcxSHVLaq5GSjhErCr/dma8T3zTHZ/y/DvarHh/va9Yt8vIz35N6NOhwMlYzVAUjSEfAiufmZoFwII+FuAAIC/+4faIYAAAkMSyC4o0D/WayR/VKW3LNeQ3pzCF9dpAkNXSg5Lf7nSlRdth3fir8P9bci/nfT3OLy0nw33t+8R+z6x75VEla5ed3MAZCjSjNGjE0XFfhBAAIGkCBAASAorO0UAAQTSKKDTAqJleiXKlg3URF02fNdvpb2r029VGnZ9ogQAhm0XpDfaSb9tfWeG+9uwfxeLfV/Y94Z9f9j3iAxzrv9gNi6PALA2zyQAMFjX8zgCCPhEgImLPukIqoEAAggkWsBbNlCH7UY0P0B7fZ2vVgto7+pKdHPTtr8IUwDSZp+KA8ey+7s+z98sbbh/Xlm5ZOXnJY22vbvbmwbgauBsZjUjAJL24WHHCCCQEAECAAlhZCcIIICAfwXsj/nC3DHS1dQonU1N0qNz8NNdOrq6012FhB0/wgiAhFn6aUfeib+Nnjkzz9/VK/5mnq3z1qPFxRIpLhFNbJD0bjjV2ipjSvRYDpbZGgDIycyS7j5380I42G00CYFQCfhvXGio+GksAgggkCIB/aM+YgmqxoyVvIoKycqJpOjA5z9Mh0NTAM7fQh4NqkDsir83z1+X9LPs/q6e/Nv3gH0f2PeCfT+k4uTfPhe1La1B/XhctN5FubmydMrki76OFyCAAALpEiAAkC55josAAgikQyA7S5cNLD89v1evwKUrP4BLIwA6dUgzxQ0BW9LPTvxjw/1dPfH3lvXT338vT4h+H4h+L6Sy2AgAl8vtcy51uXm0DQEEAi7AFICAdyDVRwABBIYjYMt55VdVSbRA8wM01Kc8P0CWDxMTDsfR3kMAYLhy/nlf7Kq/nvl72f1dPfE3cW+ef2mZZBXkp60DalvcWQb0fIgLxo+TGp1OcVSnXVEQQAABvwkwAsBvPUJ9EEAAgRQK2ElAYc0YKais9OYBp+rQubrEmCulq9vdZc1c6aPB2mEn/tlnsvu7vqyfzfO333P7fU/nyb/1xanWtsG6xInHLYvCbZfOcqItNAIBBNwTIADgXp/SIgQQQGBoAq/kBxgjeeWaHyAFJ+e5OgLBldLZwxSAoPalBQBcX9bPfp/t99qG+6dynv+FPhNHG92/Mn7n3DlSlpe+URYX8uc5BBAItwABgHD3P61HAAEEXhXQbPa5FafzA+TaUmBJTBSYm8R9v9qg1PzEFIDUOCfjKH2a5M82F4v9/trvsTfPX3+vxUerVew5dcpF8rPaVKgjLj5y3TVnPcYdBBBAwA8CBAD80AvUAQEEEPCRQIaua583qkIKaqolmqREgXlRl6YAMALARx/f0FclluDPfn/t99h+n/1Wjjc1S5tDS4EO5vu6S6bLogkTBnuaxxFAAIG0CBAASAs7B0UAAQT8L5ClV7AsUWDB6GovcVgia8wIgERqsi8ETgtYgj/7fbXfW/v99Wvpl37ZF4JRAOb/pzdcL9Escm779bNIvRAIowABgDD2Om1GAAEEhiCQU1gghdU13nrhicoP4FQOAJIADuHTxEuTIeDN86+o8H5P7fc1CGVPbW0QqjniOtaUFMuf3HDdiPfDDhBAAIFECRCSTJQk+0EAAQRcFsjKlFxdLzxSWCidDY3S2dwk/SOYO50b8e/VyaF2IzkAhirG6xMl4A33LyqWaGmJZKYgeWei6m37CUMegJjXG2bPksb2DvnWCy/EHuIWAQQQSJsAAYC00XNgBBBAIHgCdpKRV1UpObp8YEdDg3S3DX05rxxddq00IFcp4+mhpmEYxLNfXoPAhQRsuH9uaalkFwTjiv+5bdl14uS5Dzl9/60LF0h9e5v8cu06p9tJ4xBAwP8CBAD830fUEAEEEPCdgJ10FOoSV52NDdLV3Cw9nZ1x17FGhypn6vJrrpQTGgihIJAqgWyd2x8pKtIEnaWiv0ipOmzCj7NDAwBtXV2SH7CRCyOB+PA1V0tzR6c8tnXrSHbDexFAAIERCZADYER8vBkBBBAIsYCefETLyqSwZoy33Fi8ywaO0wCAK6Wrp0caGQHgSnf6uh2xZf3s981+74J88m/Qvf19suHwEV+bJ7pyFq75y5tvlD/SQEBWBn+CJ9qX/SGAQHwCfPvE58SrEEAAAQQGEcjIyfaWGyusqYlr2cCxujSZK6W2SXMh9Pe70hza4UOB2LJ+9vt1elk/dwZvrjl40Ifiya/SfQvmy7/de49UBHT6RvKFOAICCCRTgABAMnXZNwIIIBAigcxoJK5lA8c6NALgpCZEpCCQLIGBy/rZ75drZe3BQ641Ke72zBlTI19/x9vk8vHj434PL0QAAQQSIUAAIBGK7AMBBBBA4BWB2LKB+RWj5HzLBro0AuCE5kCgIJBoAfu9sd8fW34zKMv6DcdgX12d1IV4Ck1pXp584Z675NO33SrjNKEjBQEEEEiFAAGAVChzDAQQQCBsArpsYLS8TIosP4AmK7NhzLHCCICYBLcInC1gvyf2+2K/N/b7I/p75HpZvf+A6028aPuumzZVvv2ud8if3XC9lOvqDhQEEEAgmQLu/8+STD32jQACCCBwQYGMSI63bKB3JVP/sC3IzZWpOpfZlXKikSkArvRlutthw/3t98SW2bTfm7CUp3bsDEtTL9jOLA3+3DF3jnz/ve+WP1y6VMaWlFzw9TyJAAIIDFfAnUwywxXgfQgggAACSRfILtCTGx3uumRMtV7UdCf2fIIcAEn/7Lh+ABvuH9WTvWixnvAFeFm/4fbTGs0DYNMAuPJ9WjA3J0feunCBt20+elQe37pdntm5S1q74l9qdbh9wfsQQCAcAgQAwtHPtBIBBBBIv4Ce3CydPTv99UhgDY7V1yVwb+wqTAJedv/iYsmzud960hfW0qfLAT6zY5e8af68sBIM2u5LdbSUbR+97hp5Yc9eDQZsEwuYmBkFAQQQGK4AAYDhyvE+BBBAAIEhCyyaOGHI7/HrG2z5v11Hjvq1etTLxwI23D+vvFyydFQMReT327cTALjAByGanS2vu2S6t9loCRsR8LROndh67Lj06z8KAgggMBQBAgBD0eK1CCCAAALDFphcXiGVhYXDfr/f3nio9pS0dTIs12/94uf6ZEejkqtD/XP0yn8Yh/sP1jfbT5yQwzqdZmwp894HM4o9blMl3nTZPG870dzsBQOe3bVbth0/HnsJtwgggMAFBQgAXJCHJxFAAAEEEiVwxSR3rv6byY7DhxNFw34cF8jK0Xn+xUWn5/lnZzne2uE17+FNm+XD1ywd3ptD+q6qoiJ5y+ULvO24BgOe00CAFwxgZEBIPxE0G4H4BAgAxOfEqxBAAAEERiiweNLEEe7BX2/ffuiQvypEbXwn4M3zLyqWXJ3nH6bM/sPpiEc2b5Z3L14k+ZoUkTJ0gdEaDLhvwXxvO9nSIst37ZHndu+WzTpNqY9pAkMH5R0IOCxAAMDhzqVpCCCAgF8EJup853ljx/qlOgmpByMAEsLo7E6Y5z+0rm3t6pKHdBTAW/WKNmVkAjbVypIq2mY5A57fvUeW67b+0GHpJYHgyHB5NwIOCBAAcKATaQICCCDgd4G3LbxcMvxeySHWb4f+MU1B4FwBm+cf1Tn+kZAu63eux1DuP7Bug9w7/zLJdmip0KG0PxmvtZwBd86d423NHR2yYu8+b6rAywcPSndvbzIOyT4RQMDnAgQAfN5BVA8BBBAIukCVXo2yDNYulYbWVjnR2OhSk2jLCAWydOh6RIdhW5I/YZ7/sDRrW1tk2fYdcsusmcN6P2+6sEBRbq5na75tXd2yav9+nSqw27tt7+6+8Jt5FgEEnBEgAOBMV9IQBBBAwJ8C9y1Y4NwVPYb/+/Ozlo5aWYK/HA1y5ZVoZv+cnHRUwalj/mLNWnn9zBmSkeHamCF/dVN+JEdumD7N27p0JMCaAwe9aQIr9u6VJh0pQEEAAXcFCAC427e0DAEEEEi7QLFecbrt0llpr0eiK7Bp3/5E75L9BUzAEvx5V/xLSiRTh/1TEiOwr65Ofrdlq9x+6ezE7JC9XFQgkpUlSyZP8ra+/n7ZoCucWBLB5/fsFRuVQUEAAbcECAC41Z+0BgEEEPCVwN3z5kqug1dFV2zd6itnKpNagey8fC+zf05hQWoPHJKjfXfFi3plerquCMCIilR3eaaOvJg/bpy3feyG62S7LiloCQRtO9zYkOrqcDwEEEiCAAGAJKCySwQQQAABkdzsHLnnsnnOUbTq8NgNmkiLEkIBPTnKLSmVPF3VQrIyQwiQmiY3tLfLj1evlj9YelVqDshRzitgkzBmVo/2tj+4+irZd6pOAwG7vWDA7tra876HBxFAwP8CBAD830fUEAEEEAikwB/qH4w2BcC1smrHDunt63OtWbTnIgI2J72oarRkFRdd5JU8nQiB+9etlzvmXCrVuqICxR8CkyrKxbZ3L75CjjY26RQBHRmgUwW2HDsm/fqPggACwRAgABCMfqKWCCCAQKAEFk+cKHfp8H8Xy4ot21xsFm26gECOTmMpra6Rnlzm+l+AKaFP2RJ131j+gnzm9lsTul92lhiBGk16ed+C+d5W19p2Ohig0wTW6/Kovf0ESBOjzF4QSI4AAYDkuLJXBBBAILQCpXl58pc33+hs+1dsIwDgbOcO0rDisjKd02KjWbjKOQhRUh624eZP79zlZapPygHYaUIEygvy5c65c7ytpbNTXtDkgZYz4GVdWaCrtychx2AnCCCQOAECAImzZE8IIIAAAirwFzfdKGX5+U5a7Dt+XI5qlnJKuAR6dfh/Hyf/aen0rzz1tMypqZFRJFxMi/9QD1qoK2LcMmumt3V0d8uq/fu9aQIv7tsn7XqfggAC6RcgAJD+PqAGCCCAgDMCNmfXlpNytbywlav/rvbthdrVl5EpWRd6Ac8lTaBZryj/+++Xyb/cfWfSjsGOkyNgK8BcN22at3X29MgKTZ66bPsOWb3/gHT39SbnoOwVAQQuKkAA4KJEvAABBBBAIB6BcaWl8sfXXhPPSwP7muWbNge27lR8BAKWDp2SNoHVBw7IbzdsdDavSNpgU3jgaHa2N5XjhunTxKYJPLtrtzylwYANh48wuiaF/cChEDABAgB8DhBAAAEERixQEInK3956i9gfea6WIzr0f/XOna42j3ZdQICZ/xfASdFT39SEgJeNGysTbQlGSqAFbJrA7ZfO9rballZ5Rr9Xl23fKTtOngh0u6g8AkERcPcvtaD0APVEAAEEAi5QkV8gn7v7DpkyalTAW3Lh6v/2xZXS18+p4IWVzv/sn959l/zhbcHN5p6ZmSmi0wDCVB7bulW+p595v5ROTSb36Qcfkf/3tvucXF7UL86profldnizriZg28H6enl40xZ5QhOtNnV0pLoqHA+B0AgQAAhNV9NQBBBAIPECNuz/83pyN9rxtdH7+vrktyteTDxgSPZYpCtD2EYJjoBdpfVbOdrUKP/wyKPyhXvukmwLylCcEhivq2388bVXy4eWLvGmCDysU642HjniVBtpDAJ+EODb0w+9QB0QQACBAArMqKqSL9/3ZudP/q1rnt+yVU40Ngawl6gyAm4JbDh8WL761DNuNYrWnCWQk5UlN824RL705jfJ/7zrnXLv/MukKGrLcFIQQCARAgQAEqHIPhBAAIGQCSyaMEH+7d57pCQvHH+UPbBiRch6mOYi4F+BR7ZskfvXrfdvBalZwgQmlJfJRzS57E8/9H75P7fcLLNGj07YvtkRAmEVYApAWHuediOAAALDFLh5xgz5i5tvDM0Q3JN65X/55i3D1OJtCCCQDIFvaFLA8vx8ueGS6cnYPfv0mUDEGxUwQ0cGzJCNunLAz9aslVX79ku//qMggMDQBAgADM2LVyOAAAKhFSjOzZUPX71U3jB7VqgMHly5SiwHAAUBBPwj0NffJ//y+JOSmZnhrTPvn5pRk2QLzB07Rmzbryuz/EIDAb/X5QR7+I5ONjv7d0iAAIBDnUlTEEAAgWQJ2FV/S85UErJEbl09PfKr559PFiv7RQCBEQhYEOBzjz4hGbdmyLXTpo5gT7w1iAK2JORf3nyTvH/JEm9KyCObN0trV1cQm0KdEUipADkAUsrNwRBAAIFgCVxaUyNffNPd8tc69zJsJ//WU798brkcr28IVqdRWwRCJNBrQYDHHpfn9+wNUatp6kABW0rww9cslR994H0aDLhSCiL+W8FiYH35GYF0CzACIN09wPERQAABHwosGDdO3rV4kVw2dqwPa5eaKrV1dsp3Hn8iNQfjKAggMGwBG/79z797VP7mDa9nOsCwFYP/xoJIRN51xSK5a+4c+cnqNfKbDRulq7cn+A2jBQgkWIAAQIJB2R0CCCAQVIFoVrZcPXWK3HPZPJlVTablHy57ShpaW4PandQbgVAJnA4CPK5ryDfJ2xZeHqq209izBYosX42OCLDlA3+w6iV5TJdxtZEiFAQQOC1AAIBPAgIIIBBygdnV1XLLrJleNm27gkIR78TfAgAUBBAIjoBlhP/2CyvkcEOj/NnrrpesTGa6Bqf3El9TmxrwiRtvkLdcPl++t2KlPLtrN6sGJJ6ZPQZQgABAADuNKiOAAAIjEciUDJkxukqunDzJGy47vqx0JLtz8r029N+mAFAQQCB4Ar/bskWONTXJZ954m84HJ6gZvB5MbI3HlZbK3932Btlx4oR85alnZLveUhAIswABgDD3Pm1HAIHQCFhSpEUTxnsn/YsnTghlQr94O9uS/lnyPwoCCARXYO2hQ/Jnv/iVfOb224QgZ3D7MZE1v6SqSr761vvkwY2b5TsrXtQVAwjyJtKXfQVHgABAcPqKmiKAAAJxCWToFX77g9fm8c8cPVpvq2XyqArJzMiI6/1hf9HXH3lEbPk/CgIIBFvA1on/6E9/Lh+//lp5w+xZwW4MtU+IQIb+P3jXvDlyzbQp8o3nnpdlO3YkZL/sBIEgCRAACFJvUVcEEEBggICd6FfqHMexOrxxbGmJjCkp8U707aS/MMoySAOo4v7xxW3b5MGVq+J+PS9EAAF/C3T0dMu//X6ZvHzwkPy55gXIZ0qAvzssRbUrz8/3Vo24VQNDX3n6GTnUwHKvKaLnMD4QIADgg06gCgggkDyB0rx8mV5ZKW1d3dKpV3W7e3vFskX36K1lBe7r65c+TQvkh2Jz87OzsiQnK9P7I7VYMxmX5uVJsW6leblSnHv6tqygQMbpCX+NnvBH9PWUxAi0tHfIP/74p4nZGXtBAAFfCTylV3q3HTsuf3vr672RUb6qHJVJm8CC8ePkm+98u/xQVwv4qS4d6Je/B9IGwoFDIUAAIBTdTCMRCK/AQp33btuFip3+92lQoK9fgwG69Xu34mULPv2zPWZ7OPP86R9fySZsz1n26Vix98TKqz/FHjl9a8PxszVDdY53wp/l/UzG6rONUn3v3351v5zgKlCq2TkeAikTONrUKJ/45f3yjkULvc2+fykI2OfgA1ct0b8VJsjnNQHsyZYWUBBwWoAAgNPdS+MQQCAeAZsZbyff/CkYj5abr3l24yZ5aBVD/93sXVqFwKsCNgLM1oZ/asdOb6nA+ePGvfokP4VaYN7YMd5ogC/9/il5bvfuUFvQeLcFWCDV7f6ldQgggAACFxFobG2Vz/7s5xd5FU8jgIBLAjbn+68e+I184fEnpbG93aWm0ZYRCFj+nL+//Vb5xI2vk9xsrpOOgJK3+liAAICPO4eqIYAAAggkX+ALv/ilnNI1wykIIBA+gSe3b5cP/ODH8rvNW7zpX+EToMXnE7j90tny329/q0yuqDjf0zyGQKAFCAAEuvuoPAIIIIDASAQeX7NGHl+zdiS74L0IIBBwgebODvnSsqfkj378M1mxd2/AW0P1EyUwvqxMvnzfm2XxxImJ2iX7QcAXAgQAfNENVAIBBBBAINUC2w8dkn8i63+q2TkeAr4V2Ft3Sv7+oUfkz37xK9l4+Ihv60nFUieQH8mRf7rzjXL3vLmpOyhHQiDJAgQAkgzM7hFAAAEE/CdwslGzgX/jW9Le1eW/ylEjBBBIq8CWY8fkk/c/IP/3tw/J7pO1aa0LB0+/gK3a8/Hrr5OPXXetZGZw6pT+HqEGIxUgu8VIBXk/AggggECgBDr0pP+T3/y2nNAgAAUBBBAYTGDV/v3y0v4DsnjSRHnL5fPlsrFjB3spj4dA4J7L5smYkhL57KOPS1s3weMQdLmzTSSM5WzX0jAEEEAAgXMF+vv75e9/+CPZevDguU9xHwEEEHiNQL/0y8p9++Qv7/+1fOynv/CWD+zVpQQp4RSwYNAX771bCiLRcALQaicECAA40Y00AgEEEEAgHoGvPfyILFu3Pp6X8hoEEEDgLIEdJ0/I5x57XN77/R/Kr9aul7au7rOe5044BC6pqpLP332n5OdEwtFgWumcAAEA57qUBiGAAAIInE/gkZdWy3cef+J8T/EYAgggELfAiZZm+fry5fL273xX/v33y2Tz0aNxv5cXuiEws3q0fPauOyQ3O8eNBtGKUAkQAAhVd9NYBBBAIJwCL2zZqhn/fxLOxtNqBBBIikB7d7c8qt8tf/7L++WDP/ix/OzlNVLX2paUY7FT/wnMGVMj/3zXGyWaRUo1//UONbqQAAGAC+nwHAIIIIBA4AUeXf2yfPJb35bu3t7At4UGIICAPwUONtTLt19YIe/47ve9pQSf371HesgV4M/OSmCtLDHkP9xxu+RkZSVwr+wKgeQKELJKri97RwABBBBIo8AvV66SL+iVf0v+R0EAAQSSLdDX3ycr9u71tpLcPHndJdPlppmXyMzRo5N9aPafJoGFE8bLn95wvTcdJE1V4LAIDEmAAMCQuHgxAggggEBQBL734kr5wfIXJEOvzPT39ASl2tQTAQQcEWjsaJdfb9jgbTXFJRoMmCY3aEBgckWFIy2kGTGBW2fPkm3HjsvDmzfHHuIWAd8KEADwbddQMQQQQACB4QjY1f6vPP2sPLRpk2RGI5Kdlyddzc3D2RXvQQABBBIicLSpUX6s05FsG19aJtdOmyrXT58qU0aNSsj+2Un6BT5+/bWyp7ZWth4/nv7KUAMELiBADoAL4PAUAggggECwBHp0nv9nH33cO/mP1TwnPz/2I7cIIIBA2gUsX8CPV6+WP/rJz+T9//tD+dbzL8hWvXrMRKW0d82IKpCto80+ffutUqpBZwoCfhZgBICfe4e6IYAAAgjELVDX1iaff+wJWXvo0FnvieQXSEckIr1dXWc9zh0EEEAg3QKHGxvl52vWeltFQYFcPWWKXD11iswbO0ayM7lOl+7+GerxKwsL5e9ue4N86oHfiuWDoCDgRwECAH7sFeqEAAIIIDAkgWd27tJh/89IU0fHa9+XnSXZmoyLAMBraXgEAQT8I3CqtVV+u3GjtxVEorJ44gRZOmWyXDFpohRoEJMSDAFbGeDey+bJL9etC0aFqWXoBAgAhK7LaTACCCDgjkCznvDbfP+nd+68YKMiemWtU+fgUhBAAIEgCLR2dcpT+r1mm40EsJNKCwZcpZtdZab4W+B9SxbLs7t2y4kW8s/4u6fCWTsCAOHsd1qNAAIIBF7gxb375D+WPSU29P9iJVvzAGTn5krP+UYIXOzNPI8AAgikUaCnr09ePnjQ2776zLMyvbLydDBg8mSZWkkSwTR2zaCHzs3JkT+54Tr59EMPD/oankAgXQIEANIlz3ERQAABBIYl0KZz+b/23HJ5dMvW+N+fmSGRoiICAPGL8UoEEPCpwM6TJ8W2769cJVU6GmDxpEmyZPIkmT9urESz+dPeL91mfXLN1KmyfPduv1SJeiDgCfAtwQcBAQQQQCAwAmsOHpJ/f3LZsIZVRguLpFMTbpELIDDdTUURQOAiAidaWrxVT2zZ02hWtiwYP84LBizWvAFMFbgIXgqe/th118qaAwelrZsktCng5hBxChAAiBOKlyGAAAIIpE9gmy6RZVe7Vh84MPxKaDLAaFGxtJ2qHf4+eCcCCCDgU4HO3h55cd8+b7MqTh01ygsGLNERAjNGV0lGRoZPa+5utUYVFsi7Fi/ylnp0t5W0LGgCBACC1mPUFwEEEAiRwM4Tp4e5rtQ/ahNRoiXF0qVJmXo6OxOxO/aBAAII+FZgd22t2Pajl1Z7a9MvnjhRrpw8URZOmMCqAinstbvmzpGfv7xWGjvaU3hUDoXA4AIEAAa34RkEEEAAgTQJ7D5Z613xX7F3b2JrkKWjAIqLpUfnz1JSJ7D76FE5Vl+fugMO4UhZurxaZnbOEN4Rjpfur6sLR0ND0sqG9nZ5fNs2b8vKyJQ5Y2o0d4AGBHSbWF4eEoX0NNMSAr55wWXynRUvpqcCHBWBcwQIAJwDwl0EEEAAgfQJ7D11Sv535Uvy/O490q//klEixSXSpettd8exekAyjh/Gff5UM5c/8MIK3zU9R1eHKKwZI6JJIikIhEWgt79P1h8+7G3fev4FqdapURYIuHLyJLlMEwlGNFBKSazA3fPmeqMAWnR5RwoC6RYgAJDuHuD4CCCAQMgF7DR/g/4x+uCGTd66yck68X+FWU/28srKvRUB+nV5LUo4BTJ0bXX7HHDyH87+p9WvChxrbpLfbNzobbm6isCC8eNPBwQ0d4DNYaeMXCBfRxq9af48+cGql0a+M/aAwAgFCACMEJC3I4AAAggMT+BYU5M8vnWbPLFtu9jPqSxZ+XneVICOhoZUHpZj+UjApoLY54CCAAKvCnT09IhNvYpNv5peWSlLp0yR66dPk/Flpa++kJ+GLHDv/MvkV2vXsyLAkOV4Q6IFCAAkWpT9IYAAAggMKtDe3S3P7dotj+mJ/8bDR5I2zH/QCgx4Iq+01JsGwLKAA1BC8qPN+7f+pyCAwIUFdmq+FNu+v3KlTKkYJTdcMs0LBowpKbnwG3n2NQKF0ajcduls+dW6da95jgcQSKUAAYBUanMsBBBAIIQCsSH+j2/ZJs/t3i0WBPBF0cRMuSWl0nryhC+qQyVSJ2D9Ltr/FAQQiF9gjy6humdFrZfMzkYG2KgA26p1NA0lPoFbZs0gABAfFa9KogABgCTismsEEEAgrAKdOox005GjsvbgIXlm166UD/GP1z2iV7G629t0acCWeN/C6wIuECksFOt3CgIIDF8gNjLg25rcc+bo0XLPZfPkBg0GZGluDcrgAlNGjZKputnyjBQE0iVAACBd8hwXAQQQcEigv7/fGya65sAhWXPwoGw+eky6env830JN/l6gf4z1acCip6PD//WlhiMSyM7N9fpbSPo/IkfejMBAgW3Hj8vnH39CvvPCi3Lfgvk6zH2W2NJ3lPMLvH7mTNm9fPn5n+RRBFIgQAAgBcgcAgEEEHBR4Ehjo6w5cFBP+A/JukOHpbkzoCfQ+odqvgYBWo+fkN7uLhe7ijapQFZOxOtnhv7zcUAgOQInWprlv597zst0f9e8Od6ogNI8Em2eq33jjOliyy/acowUBNIhQAAgHeocEwEEEAiYQEtnp+w9dUr21tbJLk0IZUP7bekoV0qW/pGaW14mbSdOiI1moLglkJGR4fWv9TMFAQSSK2DB4B+9tFp+sWad3DJrprzrikUsJziAvCw/XxZNnCAr9+0b8Cg/IpA6AQIAqbPmSAgggIDvBWzu/oG6+tMn+3rCv+9UnffzqdZW39d9pBWMaCIrWxGgo75+pLvi/T4TiGrGf+tfCgIIpE7ApoE9tGmTLNu+Qz64dIncNXeOWDCOInLzzBkEAPggpE2AAEDa6DkwAgikQqCtq1s6e7qlWOf+kpzotHibnuSeam2T+rY2vW31Tvj32dV93Y42NkmfLs4X1pJXVi59ukoBSQHd+QRY0j/rVwoCCKRHoE2nVv2/Z56VJ7dtl0/ceINYIrywlyt0BEBmRqb0MQ0g7B+FtLSfAEBa2DkoAgikSmDF3j2anOhJ73CFkagU5+VKiQYDinQr0eHAFhiwLT+SI3k6FzzPu9U1wu3nV+6f/jmq9/167aKnt1caNYldnZ7U1505ubfbOj3Bjz1mt/VtrdKhV/kpgwhkZUpeeYX0qWdPe/sgL+LhoAhk6++49adG/4JSZeqJgLMClizwoz/9hZco8D1XXiHR7PCehhREIjJjdJVsPXbM2f6mYf4VCO9vnn/7hJohgECSBFq6OsU2S143nJKhp/+RrCzJ1i1HTyhyvFu9r8sexX6O3dpjtmXqcEcb8hi7Pf2z6J5efcx7Titkz1lSoG49+ezq6T19qz+fvt+jt31eZv3zPd8f4qv2w+nLC70nM6rJ4ipGSVvtSVYGuBCUz5+zjP/Wj9afFAQQ8IeA/R/3szVrvOVh//r1N8ucMTX+qFgaarFw/HgCAGlw55AiBAD4FCCAAAJxCthJdqfOabSN4rZAlo4UydNhqu26VjPLAwavr+3k3/rP+pGCAAL+EzjW1CSf+vVv5FM33yQ3XDLdfxVMQY0uHz9OfvjSSyk4EodA4GwBxsSd7cE9BBBAAAEEPAFv+LheQbaTSUpwBLyTf+s3Mv4Hp9OoaSgFbDTb5x57Qn66ek0o2z+rptqbahjKxtPotAoQAEgrPwdHAAEEEPCzQHa+Lg9YUSHZUYIAfu6nWN2sn7z+0n6jIICA/wVsZN3/rFgh//nU05oQL1wJaG2a4NwxY/zfSdTQOQECAM51KQ1CAAEEEEikQI6u2UwQIJGiydlX7OTf+ouCAALBEnho02b59IMPS7uuwhKmYtMAKAikWoAAQKrFOR4CCCCAQOAEcgryvTnlTAfwZ9fF5vxbP1EQQCCYAqv275fPPvq49IdoJMD0qqpgdha1DrQAAYBAdx+VRwABBBBIlYBNB8gjJ0CquOM+zitz/hn2H7cZL0TArwIr9+2T769c5dfqJbxekyvKE75PdojAxQQIAFxMiOcRQAABBBA4I+AFATS7PCMB/PGRiF35t36hIICAGwI/fulleX7PXjcac5FWFGmS2VEFhRd5FU8jkFgBAgCJ9WRvCCCAAAKOC1h2+fxRlWSZT3M/0w9p7gAOj0CSBCwx4L8+/qQcqKtP0hH8tdspoyr8VSFq47wAAQDnu5gGIoAAAggkWsDWly+orJJIIVduEm0bz/7M3fytHygIIOCeQFt3l3zm4UekravLvcad06LJBADOEeFusgUIACRbmP0jgAACCDgpkBmNSEHVaMktK5OMjAwn2+i3RpmzeZu7+VMQQMBdgUMNDfKT1WvcbeCZlk3RpWYpCKRSgABAKrU5FgIIIICAWwJZmd7qAPmayTkrhxPSZHau+ZpznuZgEHWnIICA+wK/Xr9BGtrbnW7oFPtOoyCQQgH+B00hNodCAAEEEHBTIFJcLAWjq0gOmKTutWR/5mvOFAQQCI9AR0+3jgJ42ekG15TwveZ0B/uwcQQAfNgpVAkBBBBAIHgCWZocsKi6mrwACe46m+9vruZLQQCB8Ak8tHGz1La0OtvwaHa2FEaizraPhvlPgACA//qEGiGAAAIIBFUgJ0cKqmu8BHXZUf6gG0k3mp8l+jNPUVcKAgiEU6Crt0d+9NJqpxtfUVjgdPtonL8ECAD4qz+oDQIIIIBA0AU0H2CktESKasZowrpycgMMsT9trr+5mZ85CvkVhyjIyxFwT+DRLVukqaPDvYadaVFFAQEAZzvXhw0jAODDTqFKCCCAAAIOCORka8K6CimsqZFoSYlkZPJf7oV61XzMybzMTdSPggACCJhAT1+fvHzgoLMYBACc7VpfNoy/RnzZLVQKAQQQQMAVAVuuzrLXF4yulpz8fFealdB2mIv5mBPL+yWUlp0h4IzAS/sPONOWcxtCAOBcEe4nU4DwejJ12TcCCCCAAAJnBHJ0jqed6HY1NUlnc7P0dLi9tFU8HZ+dmyfRoqLT2f0zGesfjxmvQSCsAqs1ANCvjXfxm6K8gOBwWD/X6Wg3AYB0qHNMBBBAAIFwCuhJrs1rj+hJb3dLi3Q0NWogwN15rYN1si3rl1tcIjma4V+yGIw4mBOPI4DAqwL17W2y6+RJmV5Z+eqDjvzECABHOjIgzeB/3YB0FNVEAAEEEHBIQE96c3Tt52JNdJenJ8JhKnbib+229nPyH6aep60IjFzARgG4WAoiERebRZt8KkAAwKcdQ7UQQAABBNwX6M/OkoJRoyQ7JH/8ZdoyieXlYu2mIIAAAkMV2HTk6FDfEojXR/hODEQ/uVJJAgCu9CTtQAABBBAIpECvjgawufBhKDb0v4/s/mHoatqIQFIE6tvakrLfdO80ksWs7HT3QZiOTwAgTL1NWxFAAAEEfClgV8bDULJCMtIhDH1JGxFIh0BDu5vJUxkBkI5PU3iPSQAgvH1PyxFAAAEEfCKQEZJEeBmZ/Nnhk48c1UAgkAINbY4GABgBEMjPY1Arzf/EQe056o0AAggg4I5AhosLW52ve8LSzvO1nccQQGCkAt19vdLa1TXS3fju/YwA8F2XOF0hAgBOdy+NQwABBBBAwEcCoQl0+MicqiDgmICLeQAiWSRGdexj6uvmEADwdfdQOQQQQAABBBBAAAEEEIgJNDqYByCHKQCx7uU2BQIEAFKAzCEQQAABBBBAAAEEEEBg5AIZ4t5UIgZHjfxzwR7iFyAAEL8Vr0QAAQQQQAABBBBAAIE0CuQ6uJRoe3d3GkU5dNgECACErcdpLwIIIIAAAggggAACARWIZru3bGoHAYCAfhqDWW0CAMHsN2qNAAIIIIAAAggggEDoBFwcAUAAIHQf47Q2mABAWvk5OAIIIIAAAggggAACCMQrkJvj4giAnnibz+sQGLEAAYARE7IDBBBAAAEEEEAAAQQQSLZAfk5ECiKRZB8m5fsnB0DKyUN9QAIAoe5+Go8AAggggAACCCCAQDAEqouLg1HRIdaSAMAQwXj5iAQIAIyIjzcjgAACCCCAAAIIIIBAKgSqi4tScZiUH4McACknD/UBCQCEuvtpPAIIIIAAAggggAACwRCoKSkJRkWHWEtGAAwRjJePSIAAwIj4eDMCCCCAAAIIIIAAAgikQmB8WWkqDpPyYxAASDl5qA9IACDU3U/jEUAAAQQQQAABBBAIhsDsmupgVHSItaxvaxviO3g5AsMXIAAwfDveiQACCCCAAAIIIIAAAikQKIxEZVJFRQqOlPpDHG5oTP1BOWJoBQgAhLbraTgCCCCAAAIIIIAAAsEQsKv/GcGo6pBrebihYcjv4Q0IDFeAAMBw5XgfAggggAACCCCAAAIIpERgzpialBwn1Qfp7++Xo41NqT4sxwuxAAGAEHc+TUcAAQQQQAABBBBAIAgC106bGoRqDrmOx5ubpbuvd8jv4w0IDFeAAMBw5XgfAggggAACCCCAAAIIJF3gksoqGVfq5goAzP9P+seHA5wjQADgHBDuIoAAAggggAACCCCAgH8EXjdjun8qk+CaMP8/waDs7qICBAAuSsQLEEAAAQQQQAABBBBAIB0CmRmZcv30aek4dEqOyQiAlDBzkAECBAAGYPAjAggggAACCCCAAAII+EfgBj35ryws9E+FElyTQ6wAkGBRdncxAQIAFxPieQQQQAABBBBAAIG0CHz6tltl4fjxaTk2B02/QIYu/PfOKxamvyJJrMH+urok7p1dI/BagezXPsQjCCCAAAIIIIAAAgikV2DqqFFynWZ+t23j4SPy3RdXysYjR9JbKY6eUoGrp06RieXlKT1mKg92rKlJbBUACgKpFGAEQCq1ORYCCCCAAAIIIIBAXAJLp0x+5XVzx46RL735TfL5u++SmaNHv/I4P7grYHP/37P4CncbqC1bd+iw0+2jcf4UYASAP/uFWiGAAAIIIIAAAqEWuGryqwGAGMTCCePFthV798r3X1wlu2trY09x65jAfQsukymjKhxr1dnNWXvw0NkPcA+BFAgQAEgBModAAAEEEEAAAQQQiF/Akr5Nr6oc9A0WHFii27M7d8n/rlwlB+rrB30tTwRPYExJibz3ysXBq/gQa7zuEAGAIZLx8gQIEABIACK7QAABBBBAAAEEEEicwJLJky66swx9hS0PZzkCXty3T365dr1sOMyQ6ovC+fwFlvjvEzfeINFst09TDtTVS11bm897g+q5KOD2b5aLPUabEEAAAQQQQAABxwUGzv+/WFMzMjLERgTYtuvkSfmVBgKe3rlTevr6LvZWnvehwLsXL5L548b5sGaJrdJarv4nFpS9xS1AEsC4qXghAggggAACCCCAQLIF8nMiMn/s2GEdZlplpfz1LTfLD9//XnnHwoVSFM0d1n54U3oErp82Td4TgqH/pruO+f/p+ZBxVCEAwIcAAQQQQAABBBBAwDcCV0ycINlZWSOqT0VBgXxw6RL5yQffJ39y/fUytqR0RPvjzckXmK7Bm796/U06AcD90t/fL+uZruJ+R/u0hUwB8GnHUC0EEEAAAQQQQCCMAlcNWP5vpO23eeR3zZsjd+r20r798rstW2Xl3n3S3dc70l3z/gQKTKkYJZ+7+07n5/3HyDYcOSLNnZ2xu9wikFIBAgAp5eZgCCCAAAIIIIAAAoMJZOna71dOmjjY08N+3K4qL9b92tbY3iHLtu+Qx7ZuZRnBYYsm7o2zRo/2Tv4Lo9HE7dTne3p081af15DquSxAAMDl3qVtCCCAAAIIIIBAgATmjqmRZJ8IluTlypvmz/O23SdrvUDA7zUg0NTRESApN6q6QJP9/cMdt0teTo4bDYqjFS165f+5XbvjeCUvQSA5AgQAkuPKXhFAAAEEEEAAAQSGKJDI4f/xHHpq5Sj5aOW18uGrl8oKnRrw2NZt8tL+A9LXzwoC8fgN9zU5muPhvYsXy1sXLpBMXcUhTGXZ9p3S2dsTpibTVp8JEADwWYdQHQQQQAABBBBAIKwCQ1n+L5FGlnTw2mlTvc3WZn9h9x5ZrpslamM5wURKi8yurpa/vPlGGV9WltgdB2Rvj27ZEpCaUk1XBQgAuNqztAsBBBBAAAEEEAiQwOTyCqkuLk57jcvz8+WOuXO8zYZrv6gjA57XYMDqAweko4crt8PtoFxNyPj+JUvkXp1+kRGyq/4xM5tysvPkydhdbhFIiwABgLSwc1AEEEAAAQQQQACBgQKpHv4/8NiD/Wz5CG6eOcPbOvXkf7VOD7CRARYUaOkii/tgbuc+Pm/sWPmLm14nY0pKzn0qVPd/t5mr/6HqcJ82lgCATzuGaiGAAAIIIIAAAmESSNfw/3iNbUnBq6dO8TabFrD+0GFZuW+frDt4WPbV1Um//qOcLVBZWCjvWLTQG00Rrpn+ZzvYva7eXlm2Y8drn+ARBFIsQAAgxeAcDgEEEEAAAQQQQOBsgYqCArlkdNXZD/r4XnZmpiycMN7brJqN7e1evoC1GgywwMDBhnof1z65VcvJzJKrpkySW2fPlkVqFNbh/ucqP7ltuzTrlBIKAukWIACQ7h7g+AgggAACCCCAQMgFrpo8SYJ8hbgkL0+umzbN26wrT7W2yjoNBFgwwG6PNjU638OTysv1pH+WN13CPCivCtj0kR+sfOnVB/gJgTQKEABIIz6HRgABBBBAAAEEEBC5avJkpxhsRMNNMy7xNmvYieZm2Xb8uOw+eUr21NbKbt1OtrQEvs35ORG5Yfo0ufXS2TKrenTg25OsBjywboPUtga/v5Plw35TK0AAILXeHA0BBBBAAAEEEEBggEBeTo4sGD9uwCPu/VhVVCS22SiBWGnu6NBAwJmAgGaHt6DAgbp66e7rjb3EV7c2tH9SRblMr6yU6VWVMk23KaNGSUSXUKQMLmD9/LOX1wz+Ap5BIMUCBABSDM7hEEAAAQQQQAABBF4VWDhhguSE8CSyKDdX5o8b620xDUsueLihQY43NXsjBGyUwMlm3ZUCbCUAAEAASURBVPT2hN7W6m1nb/KXIrT+mFJRoSf6Vd7Jvp3wT9Yh/tkh7KdY3wz39ier17BixHDxeF9SBAgAJIWVnSKAAAIIIIAAAgjEI+D37P/xtCFRr7HkghP1RNu2wUqTXlGOBQXs5y6dX25zzDvstls3DRB4t2cet+f6+vvFRloURCNSEIlKfkR/1lu7nx+xx85sZ54vzssVqwtlZAIWuPnNho0j2wnvRiDBAgQAEgzK7hBAAAEEEEAAAQTiE8jMyJQrJ02M78W8yhMo1pEDtk2tHIWIzwW+/+IqXf4v+SM2fM5A9XwmQGjPZx1CdRBAAAEEEEAAgbAIzKmp9k5mw9Je2hkegX2n6uSJrdvC02BaGhgBAgCB6SoqigACCCCAAAIIuCXA8H+3+pPWnBawXA5ffOL30if9kCDgOwECAL7rEiqEAAIIIIAAAgiEQ+CqKW4t/xeOXqOVFxP43osrZcfJExd7Gc8jkBYBAgBpYeegCCCAAAIIIIBAuAUs0d2YkpJwI9B65wTWHTosv3h5rXPtokHuCBAAcKcvaQkCCCCAAAIIIBAYgasmc/U/MJ1FReMSaOnslH994kmG/selxYvSJUAAIF3yHBcBBBBAAAEEEAixAPP/Q9z5jjb9P5Y9Jbb0HwUBPwsQAPBz71A3BBBAAAEEEEDAQYHy/HyZWT3awZbRpLAKPLplqzy7a3dYm0+7AyRAACBAnUVVEUAAAQQQQAABFwSWTJokGS40hDYgoAKHGhrkv599DgsEAiFAACAQ3UQlEUAAAQQQQAABdwTI/u9OX4a9JXWtbfK3v3lI2ru7w05B+wMiQAAgIB1FNRFAAAEEEEAAARcEcrOz5fIJ411oCm0IuYAl/fub3zwoR5saQy5B84MkQAAgSL1FXRFAAAEEEEAAgYALLJwwQSJZWQFvBdUPu0BnT4/83YMPy55TtWGnoP0BEyAAELAOo7oIIIAAAggggECQBa6aPCnI1afuCEhvX5/84yOPyuajR9FAIHACBAAC12VUGAEEEEAAAQQQCKZApqb+WzJ5UjArT60RUIF+3f7tyWWyav9+PBAIpAABgEB2G5VGAAEEEEAAAQSCJzCrplpK8vKCV3FqjMAZga9ptv8nt2/HA4HACmQHtuZUHAEEEEAAAQQQQCBQAkunTA5UfaksAjGB/v5++dpzy+WB9RtiD3GLQCAFCAAEstuoNAIIIIAAAgggEDwBAgDB6zNqLN4Sf5979HF5cd8+OBAIvAABgMB3IQ1AAAEEEEAAAQT8LzChrEzGlZb6v6LUEIEBArUtrZrt/yHZXUu2/wEs/BhgAQIAAe48qo4AAggggAACCARF4KrJDP8PSl9Rz9MCu06e9Jb6O9XaCgkCzgiQBNCZrqQhCCCAAAIIIICAfwVW7N0rL+zZ698KUjMEBgjY5/UTv3xAOPkfgMKPTggwAsCJbqQRCCCAAAIIIICAvwUO1NfLZx5+RC6trpEPXb1E5o4Z4+8KU7vQCty/br1847nnpc9b9C+0DDTcUQECAI52LM1CAAEEEEAAAQT8KLD52FH55K8ekCWTJskHly6RyRUVfqwmdQqhQGN7u3x52dOyfM+eELaeJodFgABAWHqadiKAAAIIIIAAAj4SsIzqq/btl5tmzpD3LVkso4uKfFQ7qhI2ged375EvP/W0NGgQgIKAywIEAFzuXdqGAAIIIIAAAgj4WMCGWD+xbZs8vXOn3Dl3jrxz0SIpycv1cY2pmmsCLZ2d8l/PPCdPbt/uWtNoDwLnFSAAcF4WHkQAAQQQQAABBBBIlUB3b6/YvOvHtmyV+xYskHsumyuF0WiqDs9xQirw8oGD8u+/XyYnW1pCKkCzwyhAACCMvU6bEUAAAQQQQAABHwq0dnXJ91eulJ+vWSO3zZ4t986/TEYXMzXAh10V6Cp1dHfLt55fIb/duDHQ7aDyCAxHgADAcNR4DwIIIIAAAggggEDSBNr1BO3+9evl1xs2yrVTp8h9l8+XmaNHJ+147DgcAv3azGXbd8h3V7wox5ubw9FoWonAOQIEAM4B4S4CCCCAAAIIIICAPwT6+vvkmV27vG1OTY0GAhbI0smTJCMjwx8VpBaBEVhz8JBe9X9Bdp08GZg6U1EEkiFAACAZquwTAQQQQAABBBBAIKECm44elU0PH5WxJaXe1IA3zJ4p0Wz+lE0osoM721N7yjvxX33ggIOto0kIDF2Ab82hm/EOBBBAAAEEEEAAgTQJHG5skK8+84yXK+COOZfKG2bPkjElJWmqDYf1q4Al9vveipXy5LbtYqtNUBBA4LQAAQA+CQgggAACCCCAAAKBE2jq6JAfr37Z2y6trpHXz5oh10+fxuoBgevJxFa4tqVVHrD8Ees3SldvT2J3zt4QcECAAIADnUgTEEAAAQQQQACBMAtsPnZUbPuvZ5/THAGTNRgwUxZNGC9ZmZlhZglV27ccPaYn/hvkuV27pVdzR1AQQOD8AgQAzu/CowgggAACCCCAAAIBE+ju7X0laWBZXr7cOOMSef3MGTK1clTAWkJ14xGw/n565y759boNsuPkiXjewmsQCL0AAYDQfwQAQAABBBBAAAEE3BOob2+TX61b521TKkbJzTMvkaVTpsjYUvIFBL23T7W2yoMbN8nDmzZLQ3t70JtD/RFIqQABgJRyczAEEEAAAQQQQACBVAvsOVUr33zethe8VQSunDxRrpw0SeaNqZHsrKxUV4fjDUOgs6dHVu7bL8/s3Ckv7NkrPX0M8x8GI29BQAgA8CFAAAEEEEAAAQQQCI2ArSJw/zrb1kteTo4sHD9erpw8SRZPnCjlBfmhcQhCQ9u6uvWkf583r/+l/fulQ4MAFAQQGJkAAYCR+fFuBBBAAAEEEEAAgYAKtHd3y/I9e7wtQzJkmuYKsJEBV06aKDNGV0lGRkZAWxbcard2dckKvcL/rCbze/nAQTL5B7crqblPBQgA+LRjqBYCCCCAAAIIIIBA6gT6da34nSdPetsPX3pJCiIRDQKMltnV1TKrerS3FeXmpq5CITlSX3+/7K6tlU2Hj8rqAwdk7cFD0t3XG5LW00wEUi9AACD15hwRAQQQQAABBBBAwOcCdiV6zcGD3mZVtREC40pLZXaNBQMsKFAtkyvKGSUwxH7s0sz9248fl416wr/xyBGx5fvauruGuBdejgACwxVgXNMgclM+/OGSsmhewyBPJ/zhAo0wR4qLE75fdogAAggg4H+BrqYmadU/iFNZcvVKZkdHRyoPKflVoyVawv91KUXnYEkVyM+xUQJVp4MBoypkQlmprjJQKtFsrrHF4Ovb2mSXjqyInfBvP3FCbPk+SvgEGnbtkn4d8ZGqUt/ZXrrnm99sTNXxgnIcvp2C0lPUEwEEEEAAAQQQQMBXAnbleu2hQ94Wq5iNFKgsLJQJ5WXeiIHxGhQYX6Y/66097mKxU7oTTc1yoL5O9tfVy4HYpvebOztdbDJtQiCwAgQAAtt1VBwBBBBAAAEEEEDAbwKWS+BES7O32Zz2gcVWHbBpBOM0IFBVVChleflSlp+nm92e/rlYR+f4Lflgj16xr29vF7uaX992+ra2pVUO1uvJvm6HdCND/8Ce5mcE/CtAAMC/fUPNEEAAAQQQQAABBBwSsFUHYokGB2tWZkamlOblvhIUKM07HSAo0cciOrUgkpUlObq9cpsdu599+vEz9+01NhrBhtvHNpt/H/vZbrt6e87c75MuXWLP8h4MPMk//XObtHR2aVgjdUO3B7PhcQQQGLkAAYCRG7IHBBBAAAEEEEAAAQQSItDX3yd1eqXdNgoCCCCQaIHMRO+Q/SGAAAIIIIAAAggggAACCCCAgP8ECAD4r0+oEQIIIIAAAggggAACCCCAAAIJFyAAkHBSdogAAggggAACCCCAAAIIIICA/wQIAPivT6gRAggggAACCCCAAAIIIIAAAgkXIACQcFJ2iAACCCCAAAIIIIAAAggggID/BAgA+K9PqBECCCCAAAIIIIAAAggggAACCRcgAJBwUnaIAAIIIIAAAggggAACCCCAgP8ECAD4r0+oEQIIIIAAAggggAACCCCAAAIJFyAAkHBSdogAAggggAACCCCAAAIIIICA/wQIAPivT6gRAggggAACCCCAAAIIIIAAAgkXIACQcFJ2iAACCCCAAAIIIIAAAggggID/BAgA+K9PqBECCCCAAAIIIIAAAggggAACCRcgAJBwUnaIAAIIIIAAAggggAACCCCAgP8ECAD4r0+oEQIIIIAAAggggAACCCCAAAIJFyAAkHBSdogAAggggAACCCCAAAIIIICA/wQIAPivT6gRAggggAACCCCAAAIIIIAAAgkXIACQcFJ2iAACCCCAAAIIIIAAAggggID/BAgA+K9PqBECCCCAAAIIIIAAAggggAACCRcgAJBw0mHusH+Y7+NtCCCAAAIIIIAAAggggAACCMQhQAAgDqRUvKS/nwhAKpw5BgIIIIAAAggggAACCCAQVgECAH7p+b5ev9SEeiCAAAIIIIAAAggggAACCDgoQADAJ53a293jk5pQDQQQQAABBBBAAAEEEEAAARcFCAD4pFd7O9olq6/PJ7WhGggggAACCCCAAAIIIIAAAq4JEADwSY/2dHVJZ2OjZPaRC8AnXUI1EEAAAQQQQAABBBBAIAECXUeOCDnPEgCZgF1kJ2Af7CJBAs21tRLp6JC88nLJjEYTtFd2gwACCCCAAAIIIIAAAgikXqDz8GFpa2tL/YE54qACBAAGpUnPE10tLdLT2SmRwkLJLSmRjJyc9FSEoyKAAAIIIIAAAggggAACwxDgxH8YaCl6CwGAFEEP5TB93d3SUV8v3a2tkmOBgGILBNBVQzHktQgggAACCCCAAAIIIJBage6jR6VVz2EY7p9a96EcjbPKoWil+LW9mhegt65OevSXKFJULNGSYpFM0jakuBs4HAIIIIAAAggggAACCFxAoO/ECWlqauLE/wJGfnmKAIBfeuIC9bApAT2dJ6W7rVVyS8skuyD/Aq/mKQQQQAABBBBAAAEEEEAgNQIt+/ZJt45gpgRDgABAMPrJq2W3JtCwYEBUpwTklZWJZDEaIEDdR1URQAABBBBAAAEEEHBGwIb7t2j+MkqwBAgABKu/pL+3V/MD1EmfTg/I1SBAVl5uwFpAdRFAAAEEEEAAAQQQQCDIAs179kiPnpdQgidAACB4febVuKu1RXq7uyRaWqq5AUoC2gqqjQACCCCAAAIIIIAAAkESaNi1i7n+Qeqwc+pKAOAckCDdtSSB7SdPSm9HpzcaIDPCkoFB6j/qigACCCCAAAIIIIBAUAQ6Dh2S9vb2/9/evcTGlayHHa/TT4ria+a+fHMNZJEggBJAka1NkKyyDowAXvkCmiAZbSwzMHCzFbwaaMuBx6BIA7kOMlFwAxjwJsgicJCsA2Q0kpLBIMnY8I2vRhL1ItndJLvPK1+1RFHS8NHdPI+qr/4NDEZinz6n6veVyHOKVd/nS3Np5wkCTACcAOPLl22JjeHujkkO9s2crAToLK8YE/nSetqJAAIIIIAAAggggAACLgt0JLv/82fPWPLvcpCmaBsTAFNguXyoXQ0wkNUA8f6Bufj97xvTJrQux4u2IYAAAggggAACCCDgvIA8+D95+dL5ZtLAyQV4SpzcyosjR/2eydLELP7wR8awJcCLmNFIBBBAAAEEEEAAAQRcE0ifbJldWWnMS5cAdeR0xXPcm0T25vSePDa5lAzkhQACCCCAAAIIIIAAAghMI2BL/PHwP42YP8cyAeBPrKZqaXJwYPpbWyaTBIG8EEAAAQQQQAABBBBAAIFJBGyyv36/P8mhHOOhABMAHgZt0ibbSYDB0y2TSl4AXggggAACCCCAAAIIIIDAaQL7f/3XZPo/DUjBe0wAKAjiaV2wkwB7tlQgJTtOY+I9BBBAAAEEEEAAAQSCFhj81S/NgTw78NItwASA7viOe5cM7STAM1YCBBBruogAAggggAACCCCAwLQC9jf/o3g07cc43kMBJgA8DNosTR5PAjx7Sk6AWfD4DAIIIIAAAggggAACSgWGDx/ym3+lsT2uW0wAHKei9GuHOQGoDqA0wHQLAQQQQAABBBBAAIEpBGy2/729vSk+waG+CzAB4HsEp2z/YXUAWeMz5Sc5HAEEEEAAAQQQQAABBLQIpE+2yPavJZhT9IMJgCmwtBxqJwF6W0+MSRItXaIfCCCAAAIIIIAAAgggMKFA48ULs7u7M+HRHKZJgAkATdGcoi+JVAUYSHWAKM+n+BSHIoAAAggggAACCCCAgM8C3V7PvJAJAF5hCjABEGbcx70e9fvm4OXLgAXoOgIIIIAAAggggAACYQk8k18C5vwSMKygv9VbJgDewgjxj/vb2yaT1QC8EEAAAQQQQAABBBBAQLeAzfifpKnuTtK7UwWYADiVR/+buXwD2LNLgNJMf2fpIQIIIIAAAggggAACgQpEz5+T8T/Q2L/dbSYA3tYI9M+xlP7YZytAoNGn2wgggAACCCCAAAIhCLzkfj+EMJ/ZRyYAziQK44ChZAFNBtQADSPa9BIBBBBAAAEEEEAgJIHBX/2Sff8hBfyUvjIBcApOSG/ZrQAH25IQkK0AIYWdviKAAAIIIIAAAggoF0ifPDGjeKS8l3RvUgEmACaVCuA4uxVguEM90ABCTRcRQAABBBBAAAEEAhHoSdk/XggcCjABcCjB/8cCw96uyYbMEDIcEEAAAQQQQAABBBDwXWDwS5b++x7DotvPBEDRop6fLx2NWAXgeQxpPgIIIIAAAggggAACVmAk9/a8EHhbgAmAtzX481jArgKI+wM0EEAAAQQQQAABBBBAwFOB3b/8S09bTrPLFGACoExdT8+dZ5msAtgmIaCn8aPZCCCAAAIIIIAAAmEL2MR/qST55oXA+wJMALwvwt/HAuOEgLu7aCCAAAIIIIAAAggggIBnAiT+8yxgFTaXCYAKsX271Ei2Apg48a3ZtBcBBBBAAAEEEEAAgWAFksePTZ7nwfafjp8uwATA6T5Bv5sMh+bATgLwQgABBBBAAAEEEEAAAS8E+v2+F+2kkfUIMAFQj7s3Vx3ZuqEJqwC8CRgNRQABBBBAAAEEEAhXYBTz2/9woz9Rz5kAmIgp3IPGZQF3ZRKAFwIIIIAAAggggAACCDgtcNDnvt3pADnQOCYAHAiC600YDWQZkVQG4IUAAggggAACCCCAAAKOCmS5iQeU8nY0Os40iwkAZ0LhbkOSgwMT7+2720BahgACCCCAAAIIIIBA4AK2ipe9b+eFwGkCTACcpsN7bwSYTXxDwR8QQAABBBBAAAEEEHBOgPt150LiZIOYAHAyLO41KjnYN3mSutcwWoQAAggggAACCCCAQOAC9j7d3q/zQuAsASYAzhLi/bGATQYY77GniOGAAAIIIIAAAggggIBrAvY+3d6v80LgLAEmAM4S4v03AnZfES8EEEAAAQQQQAABBBBwS4D7dLfi4XJrmABwOTqOtS3Z3zfZkJlFx8JCcxBAAAEEEEAAAQQCFrD35/Y+nRcCkwgwATCJEseMBbIkMeOSgHgggAACCCCAAAIIIICAEwL2/tzep/NCYBIBJgAmUeKYNwLjcoD5m7/yBwQQQAABBBBAAAEEEKhLQO7LKdddF76f12UCwM+41dbqdHgg2wCGtV2fCyOAAAIIIIAAAggggMArAXtfbu/PeSEwqQATAJNKcdxYIM8yE1NihNGAAAIIIIAAAggggEDtAva+3N6f80JgUgEmACaV4rg3AskBs4xvMPgDAggggAACCCCAAAI1CXBfXhO8x5dlAsDj4NXV9GwUG8NMY138XBcBBBBAAAEEEEAAgfH9+Pi+HAsEphBgAmAKLA59JZDGI5PFMgnACwEEEEAAAQQQQAABBGoRsPfj9r6cFwLTCDABMI0Wx44F7D6jNKbUCMMBAQQQQAABBBBAAIG6BOz9OPv/69L397pMAPgbu1pbniWsAKg1AFwcAQQQQAABBBBAIGgB7seDDv/MnWcCYGa6sD+YJawACHsE0HsEEEAAAQQQQACBOgW4H69T399rMwHgb+xqbTk5AGrl5+IIIIAAAggggAACgQtwPx74AJix+0wAzAgX+sfG33BSao6GPg7oPwIIIIAAAggggEANAnIfzgRADe4KLskEgIIg1tGFVLYApFQCqIOeayKAAAIIIIAAAggELmDvw+39OC8EphVgAmBaMY4fC+Rpath3xGBAAAEEEEAAAQQQQKB6AXsfbu/HeSEwrQATANOKcfwbAcqOvKHgDwgggAACCCCAAAIIVCbAfXhl1OouxATACSFtDLr5CW/x5dcCuYGIwYAAAggggAACCCCAQNUC3IefLc7z3PFGTAAc72Lmf9xlTc0JNm++zPP/Gwr+gAACCCCAAAIIIIBAZQLch59JzfPc8URMABzvYtJf/jI+4S2+jAACCCCAAAIIIIAAAggg4LAAz3PHB4cJgONdzFd/+qdxlps/P+FtvowAAggggAACCCCAAAIIIOCggH2Os89zDjat9iYxAXByCHJ5/fuT3+YdBBBAAAEEEEAAAQQQQAAB1wReP8exUeKYwDABcAzK4ZfiPPnPh3/m/wgggAACCCCAAAIIIIAAAu4L8Bx3coyYADjZxnx1+/bjLMv+4JRDeAsBBBBAAAEEEEAAAQQQQMARAfv8Zp/jHGmOc81gAuCMkCRZsp7m+YszDuNtBBBAAAEEEEAAAQQQQACBGgXsc5t9fquxCc5fmgmAM0L0Pzc2Xpp4+A/OOIy3EUAAAQQQQAABBBBAAAEE6hSQ57bx81udbXD82kwATBCge3/8x/83iYe/TlWACbA4BAEEEEAAAQQQQAABBBCoUMA+p9nnNfvcVuFlvbwUEwAThu3+5ubDXpT9Vprl/3zCj3AYAggggAACCCCAAAIIIIBAiQL2+cw+p9nntRIvo+bULTU9qaAj3/zRHw3lMv/27//u7/6XRrN7s9EwNyq4LJdAAAEEEEAAAQQQQAABBBB4SyDLzEaWDm/x4P8WygR/jCY4hkOOF2hcXl290oqad6IounT8Ibq/Ov+DH5ruyrLuTtI7BBBAoAKB0e6uGTx5UsGVji4xNzdnDg4Ojr5QwZ/mf/gj011equBKXAIBBBDQLTDc3jF7T7d0d/KE3uV5/nWSp9cerK/fk0OyEw7jyycIsAXgBJgJvpzJoLu71W5eTfL84wmOV3hIrrBPdAkBBBBAAAEEEEAAAdcFwrwPt89d9vnLPodJhHj4n2GYsgJgBrTjPiLbAn7Sarf/lTEN+S+M14Xvfc/MffhhGJ2llwgggECJAqwAKBGXUyOAAAIKBQ5evDD7z58r7NlJXcrWkjheY7n/ST6Tf50JgMmtJjry7/3e7/3ttmn+QbPZ+GcTfcDjgzqLS+bir/3I4x7QdAQQQMANASYA3IgDrUAAAQR8ERg8fmJGvV1fmjtzO9M0+zw26Sdf3b79zcwn4YPvCDAB8A5HYX9p/OaN3/8N0zT/TnN+gGa7Y5Z/8hOTt8klWdjI4UQIIBCkABMAQYadTiOAAAIzCURxYnYePjRpPJrp8z58yO7zN6n56O7GZ19Ke1nqX2DQyAFQIOZbp8pksH6hPT+A/aazv/3SRFJ4kxcCCCCAAAIIIIAAAgiUK2Dvu+39t+aH/8N9/vZ5SjR5+C94SLECoGDQ406nPT9AZ2HBXJBcAI1u97ju8zUEEEAAgTMEWAFwBhBvI4AAAgiYbDg0+7L3f9TvK9Vgn38VgWUCoArl19fQnB/AbgfoLC2aueUVY5osLKlwWHEpBBBQIMAEgIIg0gUEEECgLIE0Mwc722a021P5m3/2+Zc1cI4/LxMAx7uU+VXV+QHa8/NS43nFtBculmnIuRFAAAFVAkwAqAonnUEAAQQKE4j7AzOUh/94b6+wc7pyIvb51xMJflVbvbvq/AD2m9PgyWOzt7VlUlmmxAsBBBBAAAEEEEAAAQSmE7D30fZ+2t5Xa3z4Z5//dOOhyKNZAVCk5gzn0pwfwG4LaEt+gLnlJRO12zPo8BEEEEAgDAFWAIQRZ3qJAAIInCWQx7Es9981sezz15noj33+Z42Bst9nAqBs4QnPrzk/QEuSA3YWFmVrwDL5ASYcDxyGAAJhCTABEFa86S0CCCDwHQHZ5z/c2ZEEfz2TKFxFyz7/70S8ti8wAVAb/bEXJj/AsSx8EQEEENAtwASA7vjSOwQQQOA0Afb5n6bDe0ULkAOgaNHzne8oP0CWXT/fqdz79Nv5AWwZE14IIIAAAggggAACCIQqYO+HVe/zl+eZrXbz6t2Nz76QGGehxtm1frMCwLWIvNUemx+g0ezebDTMjbe+rOKP5AdQEUY6gQACBQmwAqAgSE6DAAIIeCCgfZ9/lpmNLB3eur+5+dCDcATXRCYA3A954/Lq6pVW1LwTRdEl95s7XQvf5AdYWTGmwXCcTo+jEUBAiwATAFoiST8QQACBUwSy3Ay3t9Xu87dl/ZI8vfZgff2eKPAb/1OGQp1vsQWgTv3Jrp3JP6K7dvmMLZcx2Uf8OcomOdl7/sz0H30r2U4H/jScliKAAAIIIIAAAgggMKGAvc+197v2vldjkr/Dsn72uUVIePifcFzUcRi/cq1D/RzX1Fw2MJK9Dp3FRSkbuGIa3c45lPgoAggg4JcAKwD8ihetRQABBCYVyIYjKesnv/Xv9Uwua+P1vSjr51tMmQDwLWKv26u5bOBhfoALy0vGtNueRohmI4AAApMLMAEwuRVHIoAAAl4IxLHZ39mVFa59k8YjL5o8TSMp6zeNllvHMgHgVjymbY3qsoHNTsd0ZUVAd2nZmFZzWhuORwABBLwRYALAm1DRUAQQQOB0gSQ1w90dM5Tf+KcjfQ/+dp+/Sc1Hktn/S4HQuKTh9PgqeJccAH4H8ahsoML8APab5t7z56b37UMTb+/It5jc72jRegQQQAABBBBAAAGdAnKfau9X7X2rvX/V+PB/uM+fsn5+D2FWAPgdv3darzk/gO1oe37eXPjwQ9O8cOGdfvMXBBBAwHcBVgD4HkHajwACIQuk+/tm/8ULE+/tKWVgn7+mwDIBoCmar/uiOT+ATRTYXVoyF2zZQPIDKBy9dAmBMAWYAAgz7vQaAQQ8F7D7/KWs33B3V2WCP/b5ez4+T2g+EwAnwCj4sv78AMvLr/IDNBjGCsYrXUAgaAEmAIIOP51HAAHfBGS5/3if/86OyqX+7PP3bUBO115yAEzn5dPRR/kBsuy6Tw2fpK3j/ABPn47rqSYDrcutJpHgGAQQQAABBBBAAIGqBOx9Z//Rt2ZP7kNV7vOX54atdvMq+/yrGlHVX4dfnVZvXssVbX6ARrN7U1bQ36ilASVe1G4L6Ei1ALstIJLKAbwQQAAB3wRYAeBbxGgvAgiEJpBLcmq73H8k2f3zTF/ye+nSRpYOb93f3HwYWmxD6y8TAGFFvHF5dfVKK2reiaLokrauN9sdmQhYMHOyNcC0Wtq6R38QQECxABMAioNL1xBAwG+BJDEHstR/1OubNNZZ1i/J02sP1tfvSaD0zWz4PfpKaT1bAEphdfakmfzjvmuX9dgyHs62csaG2W/KNgNr79tvzVBmaCkbOCMkH0MAAQQQQAABBEIXsPv85X7S3lfa+0uND/+HZf3s84GEm4f/QMY8KwACCfRx3QyibODKB6Z5cf647vM1BBBAwBkBVgA4EwoaggACCJhU9vnvb7+krB9jQaUAEwAqwzpdp9SXDVxcMnPj/ADt6WA4GgEEEKhIgAmAiqC5DAIIIHCKQD6KzYEt69ejrN8pTLzluQATAJ4HsMDm6y8bKBMBXZsfoMnOlwLHDadCAIECBJgAKACRUyCAAAKzCqSZGco+f/vgrzGzP2X9Zh0YOj/Hk5DOuM7Sq6OygRrzA0jm1r3nz0z/8SMT9wez+PAZBBBAAAEEEEAAAWUC9r7Q3h/a+0SND/+H+/wp66ds4J6jO6wAOAee5o9qzg9wWDZwbnnFNLqUDdQ8jukbAr4IsALAl0jRTgQQ0CKQDUeS3V9vWT/J6beWtFpr9z/9lLJ+WgZtQf1gAqAgSK2n0ZwfwJYNbC8smAt2W0CbsoFaxzD9QsAHASYAfIgSbUQAARUCcWL2Zbl/3NdZ1i9Ns89jk37y1e3b36iIF50oXIAJgMJJVZ5QdX6AVrdrOof5ARr8k1A5gukUAo4LMAHgeIBoHgII+C9gy/rJg/9I9vknw6H//XmvB+zzfw+Ev54oQA6AE2l44y0B1fkB7A+BvWdPTf/RtyYZkB/grbjzRwQQQAABBBBAwHsBe39n7/Ps/Z7Gh3/2+Xs/RCvtAL/urJRbx8XID6AjjvQCAQTcEWAFgDuxoCUIIKBHIIh9/nG8dn9zk33+eoZt6T1hAqB0Yr0XUJ8fYPF1foAW+QH0jmJ6hoAbAkwAuBEHWoEAAkoEktf7/Hvs81cSUbpRoAATAAViBnoq/fkBlpZMd0kSBZIfINAhTrcRKF+ACYDyjbkCAggEIGD3+e/KPv9d9vkHEG26OKMAOQBmhONjbwT05wd4+io/QDrYe9Np/oAAAggggAACCCDgjoC9Txvv85f7Nvb5uxMXWuKeACsA3IuJ1y0KIT/AhZUPTNRpex0nGo8AAm4JsALArXjQGgQQ8EcgH8Vmf/ulZPfvmTzL/Gn4xC3N1hL2+U+sxYFnCzABcLYRR8wgoD0/QGdx0cwty7aAVnMGHT6CAAIIvCvABMC7HvwNAQQQOFMgSc3BuKxfz6Tx6MzDfTsgTbPPY5N+8tXt29/41nba67YAEwBux8f31qnPD9CV/AAd8gP4Pk5pPwK1CzABUHsIaAACCPgiIPv8R7LPf8g+f18iRjsdEyAHgGMBUdYc9fkBBof5Afb2lYWO7iCAAAIIIIAAAm4JpHK/Zff52/sv9vm7FRta448AKwD8iZX3LdWeH6C7uGTmVlbID+D9SKUDCFQvwAqA6s25IgII+CNg9/kfbG+bYW+Xff7+hI2WOirABICjgdHcLPX5AZYkP4DdFkB+AM3DmL4hUKgAEwCFcnIyBBDQImD3+Y/L+rHPX0tI6Uf9AkwA1B+DUFtAfoBQI0+/EUDgOwJMAHyHhC8ggEDIAuzzDzn69L1kAXIAlAzM6U8UOMoPkGXXTzzK0zfsvrQ3+QH2yQ/gaRhpNgIIIIAAAghULJDKfZPqff5y37vVbl69u/HZF0KrsW5hxSOGy00rwAqAacU4vhQBmx+g0ezebDTMjVIuUONJI+mUzQ9w4YMVY9rtGlvCpRFAwFUBVgC4GhnahQAClQnEsdl/qXeff5aZjSwd3rq/ufmwMlMuhMAxAkwAHIPCl2oTaFxeXb3Sipp3oii6VFsrSrpws9MxXckNYEsHmiaLb0pi5rQIeCnABICXYaPRCCBQhECajUv6DWWvfzoaFXFGp86R5/nXSZ5ee7C+fk8axm/8nYpOmI3hKSTMuLva60y+Od61y6KSPP/Y1UbO2i77Q23v2VPTf/zIJIO9WU/D5xBAAAEEEEAAARUC9n7I3hfZ+yOND//2ftbe19r7WwkYD/8qRq3/nWAFgP8xVNsDygaqDS0dQwCB9wRYAfAeCH9FAAHVApT1Ux1eOue4ABMAjgeI5hmjumyg3RYg+QG6y1I2kG0BDHcEghVgAiDY0NNxBMISsMv9d3bMsLer8jf+aZp9Hpv0k69u3/4mrMDSW58EmADwKVpht1V12cD2/LxMAqyY9sLFsKNM7xEIVIAJgEADT7cRCEgg7g/k4X/bxHv6tkHaff4mNR9JZv8vJaQs9Q9oXPvYVXIA+Bi1MNt8VDZQYX4A+8Nw8OSx2d96arKhvgQ4YQ5Zeo0AAggggAAC9r7G3t/Y+xyND/+H+/wp68dY90WAFQC+RIp2viOgOT+ArRbQWVw0c7IigG0B74SdvyCgVoAVAGpDS8cQCFdAlvsfyG/8R72eyuX+8ov+tSSO1yjrF+4Q97XnTAD4GjnaPRbQnB+AbQEMcgTCEWACIJxY01MEQhDQvNyfff4hjGDdfWQCQHd8Q+md2vwAUaMxXg1gkwQ2u91Q4kk/EQhOgAmA4EJOhxFQKZAOh+Mkf/a3/nmmays8+/xVDtkgO0UOgCDDrq7TavMD2B+eNlvu4JHkB3j23GSjWF3w6BACCCCAAAII+C1g70/sfYq9X7H3Ldoe/tnn7/f4pPXvCrAC4F0P/qZAQHt+gPbCgrmwJGUD2y0F0aILCCBgBVgBwDhAAAEvBeLE7O/umLjfZ5+/lwGk0SEKMAEQYtQD6bPm/AAt2Q7QWVoyXTsR0OCfcSBDmm4qFmACQHFw6RoCGgWy3Azlwd9+70pk2b+2F/v8tUWU/rwtwJPD2xr8WaOA2vwANlg2UeDcygemdXFeY+zoEwLBCDABEEyo6SgC3gskgz1zsP1SZUk/9vl7PzzpwAQC5ACYAIlDvBY4yg+QZde97skxjbf1dPuPH5m9rS2Tj0bHHMGXEEAAAQQQQACB8wvY+wx7v2HvO+z9h7ZXIveJW+3m1bsbn30hfdOVwVBbsOjPuQRYAXAuPj7sm4DND9Bodm9Kcv0bvrX9rPY22x3TXpT8AFIxwLTID3CWF+8j4JIAKwBcigZtQQCBdwQS2ecvif3inuzzj/X9skHyLW9k6fDW/c3Nh+/0m78goFSACQClgaVbpwo0Lq+uXmlFzTtRFF069UgP3yQ/gIdBo8nBCzABEPwQAAAB9wSU7/O3y/2TPL32YH39nuDzG3/3RiAtKkmALQAlwXJapwUy+WZ/1y7zsmVdnG7pDI2zyXj2nj41/UffGrtPjxcCCCCAAAIIIDCNgL1/sPcR9n5CY5K/w7J+9n5QXHj4n2ZwcKz3AqwA8D6EdOC8AprLBkay16GzuGguSKLAqNM+LxWfRwCBkgRYAVASLKdFAIGpBPJRbPYlwd+o1zO5rI3X98rWkjheY7m/vsjSo8kFmACY3IojlQtoLhto8wN0JD/A3PKK5AdoKo8k3UPAPwEmAPyLGS1GQJVAkpqDnW158Ne5z5+yfqpGK505pwATAOcE5OPqBFSXDbT5AbpLS6azJIkCG/zzVzd66ZC3AkwAeBs6Go6A3wKyz3+0u2OGu7sql/pT1s/v4UnryxEgB0A5rpzVX4GjsoFK8wMMXucHSBWW8PF32NFyBBBAAAEEqhWw9wF2n7+9L9C8z5+yftWOK67mvgC/AnQ/RrSwRgHt+QG6i0tmbmWF/AA1jjEujYAVYAUA4wABBKoSsPv8D7a3zbC3yz7/qtC5DgIOCTAB4FAwaIq7AqrzA3Q6420BXbstoMmiIHdHIS3TLMAEgObo0jcEHBFIM1nq/2q5fzoaOdKo4prBPv/iLDmTbgEmAHTHl94VK6A6P0B7fn6cJLC1cLFYNc6GAAJnCjABcCYRByCAwDkEkv5gnOQvVrj9j33+5xgYfDRIAX7dF2TY6fSMAkf5AbLs+ozncPZj9qag/+Sx2d96arKhvt8MOAtPwxBAAAEEEChJwP48tz/X7c93jQ//idyPbbWbV9nnX9IA4rQqBVgBoDKsdKoKAZsfoNHs3mw0zI0qrlflNZqyLaCzuPiqbCDbAqqk51qBCrACINDA020EyhKQ5f6vyvr1jMbl/llmNrJ0eOv+5ubDsgg5LwJaBZgA0BpZ+lWVQOPy6uqVVtS8E0XRpaouWtV17LaA7vKKabMtoCpyrhOoABMAgQaebiNQgkAsy/2HO9sqf+Nvl/sneXrtwfr6PaHLSuDjlAioF2ALgPoQ08GSBTL5IXTXLj9LFJYNtMsFB7JscG9ry6TDYcmUnB4BBBBAAAEEZhWwP6ftz2v7c1vlcn+5z7L3W/a+S4x4+J91oPC54AVYARD8EACgSAHNZQOb7Y6sBFiQbQFLJmq3i2TjXAgEL8AKgOCHAAAIzCyQx1LWb2fXxP2+SWONOXyytSSO11juP/MQ4YMIvCPABMA7HPwFgWIENJcNbHW7prOwKFsDKBtYzGjhLAgYwwQAowABBKYWsGX9dnbMqN8zicJVepT1m3pE8AEEJhJgAmAiJg5CYCYB9WUDyQ8w07jgQwh8R4AJgO+Q8AUEEDhFQPs+f5OajySz/5dCwFL/U8YBbyEwiwA5AGZR4zMITCZwVDZQeX6ATOFvHiYLMUchgAACCCBQnYD9eRvCPn/K+lU3prhSeAKsAAgv5vS4JgHyA9QEz2UR8ECAFQAeBIkmIlCjAPv8a8Tn0ggoE2ACQFlA6Y77AurzAyxKfoAl8gO4PxJpoUsCTAC4FA3agoBDAnaf/67s8++xz9+hqNAUBLwWYALA6/DReI8F1OcHmFteMa2Fix6HiKYjUJ0AEwDVWXMlBHwRSPoDye6/rbKkX57nX7PP35eRSDu1CZADQFtE6Y8vAurzA/SlDrHdp5gNNZYk8mWY0U4EEEAAAd8E7M9N+/PT/hyN9/Z8a/6Z7U0kL9JWu3mVff5nUnEAAqUIsAKgFFZOisB0AurzAywumAt2W0C7NR0MRyMQiAArAAIJNN1E4DSBODH7stw/7vVNGmucPM/Wkjheu7+5+fA0Bt5DAIFyBZgAKNeXsyMwlYD+/ABLprssEwENvvVMNTA4WL0AEwDqQ0wHEThZIMvNcMfu8981icKqOmmafR6b9JOvbt/+5mQE3kEAgaoEuAuvSprrIDC5APkBJrfiSARUCDABoCKMdAKBqQXY5z81GR9AAIFzCpAD4JyAfByBEgSO8gNk2fUSzl/rKe1+RvID1BoCLo4AAgggULOA+n3+cv/CPv+aBxmXR+AEAVYAnADDlxFwRcDmB2g0uzcbDXPDlTYV1Y5mu2Pa5AcoipPzeCzACgCPg0fTEZhGQPk+/ywzG1k6vMU+/2kGBcciUK0AEwDVenM1BGYVaFxeXb3Sipp3oii6NOtJXP1cq9s1nSXJD2ATBZIfwNUw0a4SBZgAKBGXUyPggoDd5y8J/uy/dY37/G1ZvyRPrz1YX78n3JkL5LQBAQSOF2ALwPEufBUB1wQy+aF61y6ns+VzXGvcedtjb4b2nj41/UffmmSgr+TReX34PAIIIICAvwL255r9+WZ/zml8+D8s62fvUyRKPPz7O1RpeSACrAAIJNB0U5eA5rKBkex16C4umbmVFRN12roCR28QOEGAFQAnwPBlBDwWyEexOdjeNkPJ7p/L2nh9L8r66YspPQpBgAmAEKJMH9UKaC4b2Ox0xhMB47KBTRYrqR3EdGwswAQAAwEBRQJpNi7rZx/809FIUcdedYWyfupCSocCE2ACILCA012VAurLBnaXV0x74aLK4NEpBKwAEwCMAwR0CMT9gTz8bxtb8Ubby+7zN6n56O7GZ19K3zQuadAWMvqDwLEC/FrtWBa+iIBXAkdlAxXmB7A3UYMnj83e1paxZZN4IYAAAggg4JrAYVk/+/NK48P/4T5/efj/Qux5+HdtANIeBKYQYAXAFFgcioAPAprzA4zLBi4smLnlZRO1Wz6EgzYiMJEAKwAmYuIgBJwTyKWs38HOjon7fZPGGiep2efv3KCjQQicU4AJgHMC8nEEXBXQnB9gXDZwcdHYrQGUDXR1BNKuaQSYAJhGi2MRcEDAlvWTpf6jXk9lZn/2+TswxmgCAiUJMAFQEiynRcARAfIDOBIImoHAaQJMAJymw3sIuCXAPn+34kFrEEBgOgFyAEznxdEI+CZwlB8gy6771viz2nuYH2B/6yn5Ac7C4n0EEEAAgXMJ2H3+9ueN2n3+cp+w1W5eZZ//uYYJH0bAeQFWADgfIhqIQHECNj9Ao9m92WiYG8Wd1Y0z2bKBHdkWMGe3BVA20I2g0IqJBVgBMDEVByJQvYCU9Tt4vdxfY1m/LDMbWTq8dX9z82H1uFwRAQSqFmACoGpxrodA/QKNy6urV1pR804URZfqb06xLWjPz49zA1A2sFhXzlauABMA5fpydgRmFdC+3D/J02sP1tfviQ+Z/WcdJHwOAc8E2ALgWcBoLgIFCGTyw/6uXeZny/oUcD6nTnG4LcCWDUyHQ6faRmMQQAABBPwQsD8/7M8Rtcv95ee/vQ+w9wMSER7+/RiWtBKBQgRYAVAIIydBwF+BIMoGLi2ZqNP2N0i0XL0AKwDUh5gOeiKQj2JzsLtLWT9P4kUzEUBgegEmAKY34xMIqBTQXDZwnB9gQfIDyESAabdUxo9O+S3ABIDf8aP1CgTiZPzgP+r3jMZ9/pT1UzBG6QICBQkwAVAQJKdBQImA6rKBrW7XdGQSoLu0bEyDb39KxqyKbjABoCKMdMJHgSw3w90dY/8NJgq3jeV5/rVJzUeS2f9LCQ9L/X0co7QZgYIFyAFQMCinQ8BzgaOygQrzA9ibu72nT03/0bcmHex5HiqajwACCCBwHgH7c8D+PLA/FzQ+/Ns8P5T1O88I4bMI6BTgV2A640qvEChEQHN+gEhqIXYXl8zcygr5AQoZLZzkPAKsADiPHp9FYDqB8T7/7W0z7O2aXGrg6Xtla0kcr1HWT19k6RECRQgwAVCEIudAQLmA9vwA3cNtAU0WRSkfys52jwkAZ0NDwzQJpNl4uf9Qlvuzz19TYOkLAghMI8AEwDRaHItA2AKq8wO05+dNd3nFtBcuhh1lel+LABMAtbBz0YAE4v7ADHe2jS0Vq+3FPn9tEaU/CJQrwK+7yvXl7AhoElCdH8DeFNp6z7buczYcaYobfUEAAQSCFbDfz+33dfv9XePDP/v8gx3adByBmQVYATAzHR9EIGwBzfkBmu2OaS8uSNnAZRNRNjDsgV5R71kBUBE0lwlGIB+X9dsxca9v0ljjpC77/IMZzHQUgYIFmAAoGJTTIRCagOb8AOOygYuL460BlA0MbWRX218mAKr15mqKBWxZP1nqP+r1VGb2T9Ps89ikn3x1+/Y3iqNI1xBAoEQBJgBKxOXUCAQkoD4/gK0W0LpIfoCAxnSlXWUCoFJuLqZUIBkMzIFk99e41J99/koHLd1CoAYBcgDUgM4lEVAocJQfIMuua+ufvZnsP35s9reemmykcSmptojRHwQQCEnAfl+235/t92mND/+J/Fzdajev3t347AuJq8a6hSENV/qKQO0CrACoPQQ0AAF9AjY/QKPZvdlomBvaetfsdExHtgXMScUAQ9lAbeGtrT+sAKiNngv7LCBl/Q5eL/fXWNYvy8xGlg5v3d/cfOhzmGg7Agi4JcAEgFvxoDUIaBJoXF5dvdKKmneiKLqkqWO2L5QN1BbRevvDBEC9/lzdPwHtZf2SPL32YH39nkSG3/j7NzxpMQJOC7AFwOnw0DgEvBbI5Oblrl22aMsUed2TYxpvl5kelg1Mh8NjjuBLCCCAAAJFC9jvtyGU9bM/P8WOh/+iBxDnQwABwwoABgECCFQioL5s4IKUDVxekrKB7Uo8uYguAVYA6IonvSleII9jWe6/a+I+Zf2K1+WMCCAQkgATACFFm74i4ICA+rKBC7Zs4DL5ARwYaz41gQkAn6JFWysVkH3+w50dM+pT1q9Sdy6GAAJqBZgAUBtaOoaA0wLqywZ2JUlge4GygU6PQocaxwSAQ8GgKc4IaN/nb1LzkWT2/1LAWervzKijIQjoFyAHgP4Y00MEXBQ4KhuoPD9ARn4AF8cfbUIAAYcF7PfNEPb5U9bP4UFI0xBQLMAKAMXBpWsI+CJAfgBfIkU7yxJgBUBZspzXJwH2+fsULdqKAAK+CjAB4GvkaDcCCgWCyA+wsmJMg2+9CofvubrEBMC5+Piw7wJZbobb2+zz9z2OtB8BBLwQ4C7UizDRSASCEiA/QFDhprNWgAkAxkGoAuzzDzXy9BsBBOoSIAdAXfJcFwEEThIIKD/A6CQDvo4AAgioFsiGI/b5q44wnUMAAVcFWAHgamRoFwIIjAVCyA9wwZYNbLeIeMACrAAIOPihdT1OzL6U9Yv7fZPGGidBs7Ukjtfub24+DC209BcBBPwQYALAjzjRSgSCF9CcH6DZ6Zju4qLpLslEQKsZfKxDBGACIMSoB9bnJDXD3R0z7PVMOtL34J+m2eexST/56vbtbwKLLN1FAAHPBJgA8CxgNBeBwAVU5wdodbtmTlYDtBeXSBQY2EBnAiCwgIfUXUnwF/d2zYH81j9RWBY1z/OvTWo+kpJ+X0pYs5BCS18RQMBPAXIA+Bk3Wo1AqAJH+QGy7Lo2BHtz3N/aMv1H35p0f19b9+gPAggEJmC/j9nvZ/b7msaH/0R+Dm21m1fl4f8LCS0P/4GNb7qLgK8CrADwNXK0GwEEjM0P0Gh2bzYa5oY2jkg61V1aMhds2cB2W1v36M97AqwAeA+Ev/otEMdmX8r6DXd3TZ7pey6WLm1k6fAW+/z9Hqa0HoFQBZgACDXy9BsBPQKNy6urV1pR804URZf0dOtVT8b5AWRbwDg/QINv2drie9gfJgAOJfi/1wKy3H+8z1+W+2vc52+X+yd5eu3B+vo9iZO+mQ2vBx+NRwCBSQXYAjCpFMchgICrApncjN21yzCTPP/Y1UbO2i57E7339Ol4GW0y2Jv1NHwOAQQQKFXAfn+yy/3t9yuND//254v9OWN/3ggkD/+ljiZOjgACZQrw66QydTk3AghULqC5bKDdFtCRagF2W0AklQN46RFgBYCeWIbWk1wmKe1y/5Fk99e43F+e9SnrF9qgpr8IKBdgAkB5gOkeAqEKqC4b2O7IRMDCuGKAabVCDbGqfjMBoCqcYXQmScaZ/Ue9vkljyvqFEXR6iQACGgSYANAQRfqAAAInCagvG9iRRIHkBzgp/P58nQkAf2IVfEtf7/O3Y1ZjZn/K+gU/wgFAQL0AOQDUh5gOIhC0wFHZQIX5AezN92F+gJT8AEEPdDqPQBUC9vvM4T5/jQ//h/v8KetXxWjiGgggUJcAKwDqkue6CCBQuYD2/ADdxSUzN84PQNnAygfXOS/ICoBzAvLxUgXyUWwObFm/ns6yfuzzL3X4cHIEEHBMgAkAxwJCcxBAoHwB1fkBJDlg93BbQJNFXuWPpmKuwARAMY6cpWCBNHtV1k+W+2vM7J+m2eexST/56vbtbwqW43QIIICAswJMADgbGhqGAAIlC6jOD9Cen5ckgSumtXCxZEZOX4QAEwBFKHKOIgWS/kCS/G2beE9f+VH2+Rc5UjgXAgj4JsCvh3yLGO1FAIGiBI7yA2TZ9aJO6sp57E17/8ljs7e1ZbKhvgzdrjjTDgS0CdjvF/b7hv3+ofHhP5Hv91vt5lX2+WsbufQHAQQmFWAFwKRSHIcAAqoFbH6ARrN7s9EwN7R1tCllA9sLr8oGRm3KBroYX1YAuBiVsNqUx6/K+sV9nWX9ssxsZOnw1v3NzYdhRZbeIoAAAu8KMAHwrgd/QwCBsAUal1dXr7Si5p0oii5po2h1u6YjiQK7y8vGNPj271J8mQBwKRqBtcWW9dvZMSNJ8Kcxs79d7p/k6bUH6+v3JLJZYNGluwgggMB3BNgC8B0SvoAAAgELZHKTeNcuD7XloLQ5jMsGPns6LuOVDAbaukd/EEBgSgH7fWBc1k++L2h8+D8s62e/rwsND/9Tjg8ORwABnQL8CkhnXOkVAggUIKC9bGBncXGcKLDR7RSgxSnOI8AKgPPo8dlpBew+f5vgb9TrmVzWxut7ZWtJHK+x3F9fZOkRAgicX4AJgPMbcgYEEFAuoLpsoM0PsLhgLthtAS3yA9Q1lJkAqEs+sOsmidmX5f5xT+c+f8r6BTae6S4CCMwkwATATGx8CAEEAhRQXTZwnB9gSfIDLJEfoI6xzQRAHeoBXdPu89+Vff67evf5m9R8JJn9v5SoalzSENBgpasIIFC2ADkAyhbm/AggoEXgqGyg1vwAT1/lB0gH+up+axmE9AOBaQXsv+fxPn/59615nz9l/aYdGRyPAAKhCrACINT1smvKAAAVa0lEQVTI028EEDiXQAj5AS6sfGCiTvtcTnx4MgFWAEzmxFGTC+Sj2Oxvv2Sf/+RkHIkAAggEIcAEQBBhppMIIFCWgPb8AK8SBdr8AM2yCDmvCDABwDAoTCBJJcGfLevXM2k8Kuy0rpyIff6uRIJ2IICArwJMAPgaOdqNAAIuCajPD9CV/AAd8gOUNuaYACiNNpwTyz7/kezzH7LPP5yY01MEEEBgBgFyAMyAxkcQQACB9wTU5wcYHOYH2Nt/r+v8FQEE6hZI5d+l3edv/52yz7/uaHB9BBBAwG0BVgC4HR9ahwACHgpozw/QXVwycysr5AcocGyyAqBAzIBOZff5H2xvm2Fv1+SZxuT32VoSx2v3NzcfBhRWuooAAgiUKsAEQKm8nBwBBEIWUJ8fYGnRzNltAeQHOPcwZwLg3IRhncDu8x+X9WOff1iBp7cIIIDA+QWYADi/IWdAAAEEThMgP8BpOrw3FmACgIEwkQD7/Cdi4iAEEEAAgZMFyAFwsg3vIIAAAkUIHOUHyLLrRZzQpXPY/cbkB3ApIrRFq4D6ff7y/XGr3bx6d+OzLySGGvczaB2a9AsBBDwTYAWAZwGjuQgg4LeAzQ/QaHZvNhrmht89+W7rI+mUrRZwQfIDmHb7uwfwlRMFWAFwIg1vxLHZt/v8Jbu/xn3+krpgI0uHt9jnz1BHAAEEqhFgAqAaZ66CAAIIvC3QuLy6eqUVNe9EUXTp7Tc0/LnZ6chEwLLpLkt+gAY/ZiaJKRMAkygFdows9x/u2LJ+OyYdjdR1Ps/zr5M8vfZgff2edI7f+KuLMB1CAAFXBdgC4GpkaBcCCGgWyOSm965d7prk+cfaOmofVvaePR2XJUsGe9q6R38QKF3A/ruxZf3svyOND//2+579/me/DwomD/+ljygugAACCBwJ8KuZIwv+hAACCNQiQNnAWtiduigrAJwKR22NoaxfbfRcGAEEEAhGgAmAYEJNRxFAwHUB1WUDZVtAZ3HJzNltAU0Wn70/FpkAeF8ksL+nmTmQ5f6j3q7K3/inafZ5bNJPvrp9+5vAIkt3EUAAAecEmABwLiQ0CAEEAhdQXTawPT8vuQFWTHvhYuBhfrf7TAC86xHS3+L+QPb6b5t4T992GbvP36TmI8ns/6XElKX+IQ1s+ooAAs4K8GsYZ0NDwxBAIFCBo7KBCvMD2IecwZPHZm9ry2RDfYnNAh2zdHsGATv+7b8D++9B48P/4T5/yvrNMDj4CAIIIFCiACsASsTl1AgggMB5BTTnB2i2O7ISYEG2BSyZKPCygawAOO+/FH8+n0tZv4OdXRP3+yaNNU6CZWtJHK9R1s+fMUlLEUAgLAEmAMKKN71FAAFPBTTnB2h1u5IfYHG8NSDUsoFMAHj6D3OaZo/L+m3LPv+eSYbDaT7pxbHs8/ciTDQSAQQQMEwAMAgQQAABfwTU5weYk/wArQDzAzAB4M8/wllamsg+/wP2+c9Cx2cQQAABBAoWIAdAwaCcDgEEEChRQH1+gD75AUocPpy6aoHDff52XLPPv2p9rocAAgggcJwAKwCOU+FrCCCAgAcCIeQHuGDLBrZbHkTjfE1kBcD5/Jz7dJyYfSnrxz5/5yJDgxBAAIHgBZgACH4IAIAAAr4L6M8PsCT5AWQioKH3RxYTAL7/K3zd/vE+/x3Z57/LPn8lIaUbCCCAgDYBvXdT2iJFfxBAAIHTBfTnB1iR/AAXL56u4Om7TAB4Gri3mp0MZJ//9rbKpf55nn9tUvORlPT7UrqcvdVt/ogAAggg4JkAOQA8CxjNRQABBE4QOMoPkGXXTzjG2y/b/dP9x4/HddPzkcbSad6GJviG2/G4t7U1Hp8q9/nL95OtdvOqPPx/IcHm4T/4EQ8AAgj4LsAKAN8jSPsRQACBYwRsfoBGs3uz0TA3jnnb6y812x3TXlww4/wALR35AVgB4OGQTF7v8+/1TRrrm5TKMrORpcNb9zc3H3oYHZqMAAIIIHCCABMAJ8DwZQQQQECBQOPy6uqVVtS8E0XRJQX9eacLrW7XdJYkP8CS//kBmAB4J7Ru/8Xu89+Vff67Ovf52+X+SZ5ee7C+fk8CwW/83R6NtA4BBBCYWoAtAFOT8QEEEEDAG4FMbuLv2uW7SZ5/7E2rJ2xoMhyavadPTf/RtyYZ7E34KQ5DYHYBO87seLPjzo4/bS/7fcJ+v7DfN6RvPPxrCzD9QQABBESAFQAMAwQQQCAQAc1lAyPZ69BZXDQXVj4wUaftXURZAeB2yPJRbPa3X0p2/57JZW28vle2lsTxGsv99UWWHiGAAALvCzAB8L4If0cAAQSUC2guG2jzA9iJgDlbNrDV9CaSTAA4GqokNQc7tqxfT+U+/zTNPo9N+slXt29/42gEaBYCCCCAQMECTAAUDMrpEEAAAU8EVJcNtPkBupIfoONJfgAmABz7VyP7/Eeyz3+oeJ8/Zf0cG3M0BwEEEKhIgBwAFUFzGQQQQMAxAdVlA+3+7MHr/ACplBDk9V0BSQz53S/yFWPHi93nb8ePyn3+lPVjlCOAAAJBC/DTP+jw03kEEEDglYDmsoE2P0B3ccnMraw4mx+AFQD1/0u0+/wPtrfNsLercp8/Zf3qH2O0AAEEEHBBgAkAF6JAGxBAAAE3BFSXDWx2OuNtAeOygU23FsDVMQFgVwBIybdKR978D39kustLlV7zzIul2bisn13un45GZx7u2wGU9fMtYrQXAQQQKFfArTugcvvK2RFAAAEEThdQXTbQPtztPXtm+o8fmaQ/OF0igHerfvgfk1Y84XBWGO04sOPBjguND/+U9TtrBPA+AgggEJ4AKwDCizk9RgABBCYS0F420G4L6K4sm4asDKj7NZJM84OtrbqbUfr153/wAzFfKf06Z10gk8mg4bYk+VO63N8YyvqdNQZ4HwEEEAhVgAmAUCNPvxFAAIEJBVSXDZSH/1dlA+WhtMZtAcMXL83e82cTRsTfwy5873tm7sMP6+uALPc/2Nl+VdZP4XJ/yvrVN7S4MgIIIOCLABMAvkSKdiKAAAL1CqguG9ien5e96SumvXCxFuX9J1vmQMrOaX91ZNXFxV/7US3djGW5/1Ae/mOFVSHsPn/K+tUyrLgoAggg4J1A07sW02AEEEAAgToE8kf/478/av6jf/gnc2n2F40o+qd1NKKsa2ZxLA+GA5MliWm0WuP/yrrW++dtSc35vZcvTJam77+l7++SA+DC4qLJpTJDVa9USkIevHgx/k/rPv9n7ebv/+8/+sP/J6bVZnWsKohcBwEEEECgMAFWABRGyYkQQACBcAQ05wdotjuyEmDBzEm2+qjdLjWoDXn4H8lvpfvPn1eekb/Ujp1y8gXZBtBd+cBkjXJvQXKZ1DnY2TVxv2/SWF92f/b5nzLIeAsBBBBA4ESBcn/6nnhZ3kAAAQQQ0CCgPj/AwuJ4IsDIqoCiX7n8ZnpPfjM9kgfU0F4dmWCZl1wAUbdbfNdlFYd98B/1eyoz+7PPv/ghwxkRQACBkASYAAgp2vQVAQQQKEdAdX6AljykdpakYsDSsjEF/Nb61W+md8YP/nbrQaivhqyusBMBc8vLxay0kNUUQ8mjMNrdNYlMrmh7sc9fW0TpDwIIIFCPABMA9bhzVQQQQECdwK//7GcXvhenv9OKoj9R1znpkE0UeEGWrjcvzs/UvfGDvzycjpekK8xAPxOKfKgplRjGWy5kkmXWLRfpYM/sb79UmeDPuiZ5/vHzdvM//OrTT/dndeZzCCCAAAIIWAEmABgHCCCAAAKFCmjODxBJ8rquZLKfk1r2UWfC/ABSem64Y3/j31P5m+miBs94pYVsuejKioBJSzLmI9nnv71thr1dk2dZUU1x6DzZWhLHa/c3Nx861CiaggACCCDgsQATAB4Hj6YjgAACLgtozw9gJwLOeljVXHqurLE3UUnG15Mq9sFfY2Z/9vmXNbo4LwIIIIAAEwCMAQQQQACBMgV05we4cMHMydL19sWFN7+1jqQQW3pwYA5kub/9rb/O30yXOWRkeaKstOjYBIxi25ybM/nh3Yo8+MeD/tg22de3Gp59/uWOK86OAAIIIMAWAMYAAggggEAFAtrzA7Q6kihQcgN0pITgnjz0x/JwKg9zFcjqvkQURaYtkyzzMhkwklJ+I9nrn4z0JfizUWSfv+6xTO8QQAABVwQO59RdaQ/tQAABBBBQLKA5P4DisNG1UgXY518qLydHAAEEEHhHgAmAdzj4CwIIIIBAFQKa8wNU4cc1/Bdgn7//MaQHCCCAgI8CTAD4GDXajAACCOgQUJ0fQEeI6EXRAuzzL1qU8yGAAAIITCPABMA0WhyLAAIIIFC4wDg/wCj5aavR+HnhJ+eECDgkkGTZ9eed1i9+9emn+jIYOuRMUxBAAAEEThZgAuBkG95BAAEEEKhQwOYHaDS7NyUB/I0KL8ulEChdIMvMRpYOb93f3HxY+sW4AAIIIIAAAqcIMAFwCg5vIYAAAghULtC4vLp6pRU170gG+EuVX50LIlCggF3un+TptQfr6/fktFmBp+ZUCCCAAAIIzCTABMBMbHwIAQQQQKBMAe1lA8u049xuCFDWz4040AoEEEAAgXcFmAB414O/IYAAAgg4JEDZQIeCQVMmFKCs34RQHIYAAgggUIMAEwA1oHNJBBBAAIHpBCgbOJ0XR1cvQFm/6s25IgIIIIDA9AJMAExvxicQQAABBOoRoGxgPe5c9RQByvqdgsNbCCCAAALOCTAB4FxIaBACCCCAwGkC5Ac4TYf3qhRgn3+V2lwLAQQQQKAIASYAilDkHAgggAAClQuQH6Byci74RoB9/m8o+AMCCCCAgFcCTAB4FS4aiwACCCDwvgD5Ad4X4e9lCbDPvyxZzosAAgggUJUAEwBVSXMdBBBAAIEyBcgPUKZu4Odmn3/gA4DuI4AAAooEmABQFEy6ggACCIQuMM4PMEp+2mo0fh66Bf0vRiDJsuvPO61f/OrTT/eLOSNnQQABBBBAoD4BJgDqs+fKCCCAAAIlCdj8AI1m92ajYW6UdAlOq1wgy8xGlg5v3d/cfKi8q3QPAQQQQCAgASYAAgo2XUUAAQQCE2hcXl290oqad6IouhRY3+nujAJ2uX+Sp9cerK/fk1NkM56GjyGAAAIIIOCkABMAToaFRiGAAAIIFCVA2cCiJPWfh7J++mNMDxFAAIHQBZgACH0E0H8EEEAgEAHKBgYS6Jm6SVm/mdj4EAIIIICAdwJMAHgXMhqMAAIIIHAeAcoGnkdP12cp66crnvQGAQQQQOBsASYAzjbiCAQQQAABfQKUDdQX04l7RFm/iak4EAEEEEBAmQATAMoCSncQQAABBCYXoGzg5FZajqSsn5ZI0g8EEEAAgVkEmACYRY3PIIAAAgioEqBsoKpwHtsZyvody8IXEUAAAQQCE2ACILCA010EEEAAgRMFKBt4Io2/b1DWz9/Y0XIEEEAAgeIFmAAo3pQzIoAAAgh4LEDZQI+D917TKev3Hgh/RQABBBAIXoAJgOCHAAAIIIAAAscJUDbwOBVfvkZZP18iRTsRQAABBKoVYAKgWm+uhgACCCDgmQBlA/0JGGX9/IkVLUUAAQQQqEeACYB63LkqAggggIBfApQNdDhelPVzODg0DQEEEEDAKQEmAJwKB41BAAEEEHBZgPwA7kWHff7uxYQWIYAAAgi4K8AEgLuxoWUIIIAAAo4KkB/AhcCwz9+FKNAGBBBAAAG/BJgA8CtetBYBBBBAwCEB8gNUHwz2+VdvzhURQAABBPQIMAGgJ5b0BAEEEECgHgHyA1Tgzj7/CpC5BAIIIICAegEmANSHmA4igAACCFQhQH6A8pTZ51+eLWdGAAEEEAhLgAmAsOJNbxFAAAEEShYgP0CRwOzzL1KTcyGAAAIIIMAEAGMAAQQQQACBEgTIDzA7Kvv8Z7fjkwgggAACCJwmwATAaTq8hwACCCCAwPkEyA8whR/7/KfA4lAEEEAAAQRmEGACYAY0PoIAAggggMA0AuP8AKPkp61G4+fTfC6kY5Msu/680/rFrz79dD+kftNXBBBAAAEEqhRgAqBKba6FAAIIIBC0gM0P0Gh2bzYa5kbQEG91PsvMRpYOb93f3Hz41pf5IwIIIIAAAgiUIMAEQAmonBIBBBBAAIFTBBqXV1evtKLmnSiKLp1ynOq37HL/JE+vPVhfvycdzVR3ls4hgAACCCDgiAATAI4EgmYggAACCIQlEHLZQMr6hTXW6S0CCCCAgDsCTAC4EwtaggACCCAQoEBYZQMp6xfgEKfLCCCAAAIOCTAB4FAwaAoCCCCAQLgCmssGUtYv3HFNzxFAAAEE3BJgAsCteNAaBBBAAIGwBVSVDaSsX9iDmd4jgAACCLgnwASAezGhRQgggAACgQtoKBtIWb/ABzHdRwABBBBwUoAJACfDQqMQQAABBBAwxseygZT1Y+QigAACCCDgrgATAO7GhpYhgAACCCBgBbwoG0hZPwYrAggggAAC7gswAeB+jGghAggggAACxuWygZT1Y4AigAACCCDghwATAH7EiVYigAACCCAwFnCrbCBl/RiWCCCAAAII+CTABIBP0aKtCCCAAAIIvBaos2wgZf0YhggggAACCPgpwASAn3Gj1QgggAACCFiBSssGUtaPQYcAAggggIDfAkwA+B0/Wo8AAggggMCr/ACj5KetRuPnZXFQ1q8sWc6LAAIIIIBAdQJMAFRnzZUQQAABBBAoVaCMsoGU9Ss1ZJwcAQQQQACBSgWYAKiUm4shgAACCCBQukB0eXX1N5pR4xeNqPF3Zr1almf/J82znz5YX/9SzpHPeh4+hwACCCCAAALuCDTcaQotQQABBBBAAIECBHJ5aL/7tN26kib5v5zlfPZz9vP2PPJ5Hv5nQeQzCCCAAAIIOCjACgAHg0KTEEAAAQQQKErgN2/cuJw12/+tGUUfnnXONM9fNNL4H9/d2Hhw1rG8jwACCCCAAAL+CbACwL+Y0WIEEEAAAQQmFrAP88lB9Hez3Pz5aR+y79vjePg/TYn3EEAAAQQQ8FuACQC/40frEUAAAQQQOFPgf/3rP3wy9/2/+TuymP+/HnuwfN2+b4879n2+iAACCCCAAAIqBNgCoCKMdAIBBBBAAIGzBf7Jn/3ZpYOH3/7HeKf3t0wuW/ujyLSXF/9i7id/47f+02//9tdnn4EjEEAAAQQQQMBnASYAfI4ebUcAAQQQQGAagTxv/IsHX388ePTw0/6jRxcXfvzjwcUf/+Rn/+bypT+RyYBsmlNxLAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCDgo8P8ByXofA3Y61p0AAAAASUVORK5CYII=' + + let result = contractList.length + ? yo`
+ +
+ + ${selectEl} +
+
+ + + + +
+
+
+ + +
+
+
+ +
` + : yo`
+ No Contract Compiled Yet +
` + + if (contractList.length) { + this.selectedContract = selectEl.value + } else { + delete this.selectedContract + } + return result + } + + // TODO : Add success alert when compilation succeed + contractCompiledSuccess () { + return yo`
` + } + // TODO : Add error alert when compilation failed + contractCompiledError () { + return yo`
` + } + + /************ + * METHODS + */ + + selectContract (contractName) { + this.selectedContract = contractName + } + + details () { + const help = { + 'Assembly': 'Assembly opcodes describing the contract including corresponding solidity source code', + 'Opcodes': 'Assembly opcodes describing the contract', + 'Runtime Bytecode': 'Bytecode storing the state and being executed during normal contract call', + 'bytecode': 'Bytecode being executed during contract creation', + 'functionHashes': 'List of declared function and their corresponding hash', + 'gasEstimates': 'Gas estimation for each function call', + 'metadata': 'Contains all informations related to the compilation', + 'metadataHash': 'Hash representing all metadata information', + 'abi': 'ABI: describing all the functions (input/output params, scope, ...)', + 'name': 'Name of the compiled contract', + 'swarmLocation': 'Swarm url where all metadata information can be found (contract needs to be published first)', + 'web3Deploy': 'Copy/paste this code to any JavaScript/Web3 console to deploy this contract' + } + if (!this.selectedContract) throw new Error('No contract compiled yet') + const contractProperties = this.data.contractsDetails[this.selectedContract] + const log = yo`
` + Object.keys(contractProperties).map(propertyName => { + const copyDetails = yo`${copyToClipboard(() => contractProperties[propertyName])}` + const questionMark = yo`` + log.appendChild(yo`
+
${propertyName} ${copyDetails} ${questionMark}
+ ${this.insertValue(contractProperties, propertyName)} +
`) + }) + modalDialog(this.selectedContract, log, { label: '' }, { label: 'Close' }) + } + + insertValue (details, propertyName) { + var node + if (propertyName === 'web3Deploy' || propertyName === 'name' || propertyName === 'Assembly') { + node = yo`
${details[propertyName]}
` + } else if (propertyName === 'abi' || propertyName === 'metadata') { + const treeView = new TreeView({ + extractData: function (item, parent, key) { + var ret = {} + if (item instanceof Array) { + ret.children = item.map((item, index) => ({ key: index, value: item })) + ret.self = '' + } else if (item instanceof Object) { + ret.children = Object.keys(item).map((key) => ({key: key, value: item[key]})) + ret.self = '' + } else { + ret.self = item + ret.children = [] + } + return ret + } + }) + if (details[propertyName] !== '') { + try { + node = yo` +
+ ${treeView.render(typeof details[propertyName] === 'object' ? details[propertyName] : JSON.parse(details[propertyName]))} +
` // catch in case the parsing fails. + } catch (e) { + node = yo`
Unable to display "${propertyName}": ${e.message}
` + } + } else { + node = yo`
-
` + } + } else { + node = yo`
${JSON.stringify(details[propertyName], null, 4)}
` + } + return yo`
${node || ''}
` + } + + getContractProperty (property) { + if (!this.selectedContract) throw new Error('No contract compiled yet') + const contractProperties = this.data.contractsDetails[this.selectedContract] + return contractProperties[property] || null + } + + copyContractProperty (property) { + let content = this.getContractProperty(property) + if (!content) { + addTooltip('No content available for ' + property) + return + } + + try { + if (typeof content !== 'string') { + content = JSON.stringify(content, null, '\t') + } + } catch (e) {} + + copy(content) + addTooltip('Copied value to clipboard') + } + + copyABI () { + this.copyContractProperty('abi') + } + + copyBytecode () { + this.copyContractProperty('bytecode') + } + + render () { + if (this._view.el) return this._view.el + this.onActivationInternal() + this._view.errorContainer = yo`
` + this._view.contractSelection = this.contractSelection() + this._view.compilerContainer = this.compilerContainer.render() + this.compilerContainer.activate() + this._view.el = yo` +
+ ${this._view.compilerContainer} + ${this._view.contractSelection} + ${this._view.errorContainer} +
` + return this._view.el + } + + onActivation () { + this.listenToEvents() + } + + onDeactivation () { + this.compilerContainer.deactivate() + this.editor.event.unregister('contentChanged', this.data.eventHandlers.onContentChanged) + this.compiler.event.unregister('loadingCompiler', this.data.eventHandlers.onLoadingCompiler) + this.compiler.event.unregister('compilerLoaded', this.data.eventHandlers.onCompilerLoaded) + this.compileTabLogic.event.removeListener('startingCompilation', this.data.eventHandlers.onStartingCompilation) + this.fileManager.events.removeListener('currentFileChanged', this.data.eventHandlers.onCurrentFileChanged) + this.fileManager.events.removeListener('noFileSelected', this.data.eventHandlers.onNoFileSelected) + this.compiler.event.unregister('compilationFinished', this.data.eventHandlers.onCompilationFinished) + globalRegistry.get('themeModule').api.events.removeListener('themeChanged', this.data.eventHandlers.onThemeChanged) + } +} + +module.exports = CompileTab diff --git a/src/app/tabs/compileTab/compileTab.js b/src/app/tabs/compileTab/compileTab.js new file mode 100644 index 0000000000..b75fc26130 --- /dev/null +++ b/src/app/tabs/compileTab/compileTab.js @@ -0,0 +1,156 @@ +const async = require('async') +const EventEmitter = require('events') +var remixTests = require('remix-tests') +var Compiler = require('remix-solidity').Compiler +var CompilerImport = require('../../compiler/compiler-imports') + +// TODO: move this to the UI +const addTooltip = require('../../ui/tooltip') + +class CompileTab { + + constructor (queryParams, fileManager, editor, config, fileProvider) { + this.event = new EventEmitter() + this.queryParams = queryParams + this.compilerImport = new CompilerImport() + this.compiler = new Compiler((url, cb) => this.importFileCb(url, cb)) + this.fileManager = fileManager + this.editor = editor + this.config = config + this.fileProvider = fileProvider + } + + init () { + this.optimize = this.queryParams.get().optimize + this.optimize = this.optimize === 'true' + this.queryParams.update({ optimize: this.optimize }) + this.compiler.set('optimize', this.optimize) + + this.evmVersion = this.queryParams.get().evmVersion + if (this.evmVersion === 'undefined' || this.evmVersion === 'null' || !this.evmVersion) { + this.evmVersion = null + } + this.queryParams.update({ evmVersion: this.evmVersion }) + this.compiler.set('evmVersion', this.evmVersion) + } + + setOptimize (newOptimizeValue) { + this.optimize = newOptimizeValue + this.queryParams.update({ optimize: this.optimize }) + this.compiler.set('optimize', this.optimize) + } + + setEvmVersion (newEvmVersion) { + this.evmVersion = newEvmVersion + this.queryParams.update({ evmVersion: this.evmVersion }) + this.compiler.set('evmVersion', this.evmVersion) + } + + /** + * Set the compiler to using Solidity or Yul (default to Solidity) + * @params lang {'Solidity' | 'Yul'} ... + */ + setLanguage (lang) { + this.compiler.set('language', lang) + } + + /** + * Compile a specific file of the file manager + * @param {string} target the path to the file to compile + */ + compileFile (target) { + if (!target) throw new Error('No target provided for compiliation') + const provider = this.fileManager.fileProviderOf(target) + if (!provider) throw new Error(`cannot compile ${target}. Does not belong to any explorer`) + return new Promise((resolve, reject) => { + provider.get(target, (error, content) => { + if (error) return reject(error) + const sources = { [target]: { content } } + this.event.emit('startingCompilation') + // setTimeout fix the animation on chrome... (animation triggered by 'staringCompilation') + setTimeout(() => this.compiler.compile(sources, target), 100) + }) + }) + } + + runCompiler () { + try { + this.fileManager.saveCurrentFile() + this.editor.clearAnnotations() + var currentFile = this.config.get('currentFile') + return this.compileFile(currentFile) + } catch (err) { + console.error(err) + } + } + + importExternal (url, cb) { + this.compilerImport.import(url, + + // TODO: move to an event that is generated, the UI shouldn't be here + (loadingMsg) => { addTooltip(loadingMsg) }, + (error, content, cleanUrl, type, url) => { + if (error) return cb(error) + + if (this.fileProvider) { + this.fileProvider.addExternal(type + '/' + cleanUrl, content, url) + } + cb(null, content) + }) + } + + /** + * import the content of @arg url. + * first look in the browser localstorage (browser explorer) or locahost explorer. if the url start with `browser/*` or `localhost/*` + * then check if the @arg url is located in the localhost, in the node_modules or installed_contracts folder + * then check if the @arg url match any external url + * + * @param {String} url - URL of the content. can be basically anything like file located in the browser explorer, in the localhost explorer, raw HTTP, github address etc... + * @param {Function} cb - callback + */ + importFileCb (url, filecb) { + if (url.indexOf('remix_tests.sol') !== -1) return filecb(null, remixTests.assertLibCode) + + var provider = this.fileManager.fileProviderOf(url) + if (provider) { + if (provider.type === 'localhost' && !provider.isConnected()) { + return filecb(`file provider ${provider.type} not available while trying to resolve ${url}`) + } + provider.exists(url, (error, exist) => { + if (error) return filecb(error) + if (!exist && provider.type === 'localhost') return filecb(`not found ${url}`) + + /* + if the path is absolute and the file does not exist, we can stop here + Doesn't make sense to try to resolve "localhost/node_modules/localhost/node_modules/" and we'll end in an infinite loop. + */ + if (!exist && url.startsWith('browser/')) return filecb(`not found ${url}`) + if (!exist && url.startsWith('localhost/')) return filecb(`not found ${url}`) + + if (exist) return provider.get(url, filecb) + + // try to resolve localhost modules (aka truffle imports) - e.g from the node_modules folder + const localhostProvider = this.fileManager.getProvider('localhost') + if (localhostProvider.isConnected()) { + var splitted = /([^/]+)\/(.*)$/g.exec(url) + return async.tryEach([ + (cb) => { this.importFileCb('localhost/installed_contracts/' + url, cb) }, + (cb) => { if (!splitted) { cb('URL not parseable: ' + url) } else { this.importFileCb('localhost/installed_contracts/' + splitted[1] + '/contracts/' + splitted[2], cb) } }, + (cb) => { this.importFileCb('localhost/node_modules/' + url, cb) }, + (cb) => { if (!splitted) { cb('URL not parseable: ' + url) } else { this.importFileCb('localhost/node_modules/' + splitted[1] + '/contracts/' + splitted[2], cb) } }], + (error, result) => { + if (error) return this.importExternal(url, filecb) + filecb(null, result) + } + ) + } else { + // try to resolve external content + this.importExternal(url, filecb) + } + }) + } + } + +} + +module.exports = CompileTab diff --git a/src/app/tabs/compileTab/compilerContainer.js b/src/app/tabs/compileTab/compilerContainer.js new file mode 100644 index 0000000000..5c51fd8ce9 --- /dev/null +++ b/src/app/tabs/compileTab/compilerContainer.js @@ -0,0 +1,445 @@ + +const yo = require('yo-yo') +const minixhr = require('minixhr') +const helper = require('../../../lib/helper') +const addTooltip = require('../../ui/tooltip') +const semver = require('semver') +const modalDialogCustom = require('../../ui/modal-dialog-custom') +const css = require('../styles/compile-tab-styles') +import { canUseWorker } from '../../compiler/compiler-utils' + +class CompilerContainer { + + constructor (compileTabLogic, editor, config, queryParams) { + this._view = {} + this.compileTabLogic = compileTabLogic + this.editor = editor + this.config = config + this.queryParams = queryParams + + this.data = { + hideWarnings: config.get('hideWarnings') || false, + autoCompile: config.get('autoCompile'), + compileTimeout: null, + timeout: 300, + allversions: null, + selectedVersion: null, + defaultVersion: 'soljson-v0.6.6+commit.6c089d02.js', // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler + baseurl: 'https://solc-bin.ethereum.org/bin' + } + } + + /** + * Update the compilation button with the name of the current file + */ + set currentFile (name = '') { + if (name && name !== '') { + this._setCompilerVersionFromPragma(name) + } + if (!this._view.compilationButton) return + const button = this.compilationButton(name.split('/').pop()) + this._disableCompileBtn(!name || (name && !this.isSolFileSelected(name))) + yo.update(this._view.compilationButton, button) + } + + isSolFileSelected (currentFile = '') { + if (!currentFile) currentFile = this.config.get('currentFile') + if (!currentFile) return false + const extention = currentFile.substr(currentFile.length - 3, currentFile.length) + return extention.toLowerCase() === 'sol' || extention.toLowerCase() === 'yul' + } + + deactivate () { + // deactivate editor listeners + this.editor.event.unregister('contentChanged') + this.editor.event.unregister('sessionSwitched') + } + + activate () { + this.currentFile = this.config.get('currentFile') + this.listenToEvents() + } + + listenToEvents () { + this.editor.event.register('sessionSwitched', () => { + if (!this._view.compileIcon) return + this.scheduleCompilation() + }) + + this.compileTabLogic.event.on('startingCompilation', () => { + if (!this._view.compileIcon) return + this._view.compileIcon.setAttribute('title', 'compiling...') + this._view.compileIcon.classList.remove(`${css.bouncingIcon}`) + this._view.compileIcon.classList.add(`${css.spinningIcon}`) + }) + + this.compileTabLogic.compiler.event.register('compilationDuration', (speed) => { + if (!this._view.warnCompilationSlow) return + if (speed > 1000) { + const msg = `Last compilation took ${speed}ms. We suggest to turn off autocompilation.` + this._view.warnCompilationSlow.setAttribute('title', msg) + this._view.warnCompilationSlow.style.visibility = 'visible' + } else { + this._view.warnCompilationSlow.style.visibility = 'hidden' + } + }) + + this.editor.event.register('contentChanged', () => { + if (!this._view.compileIcon) return + this.scheduleCompilation() + this._view.compileIcon.classList.add(`${css.bouncingIcon}`) // @TODO: compileView tab + }) + + this.compileTabLogic.compiler.event.register('loadingCompiler', () => { + if (!this._view.compileIcon) return + this._disableCompileBtn(true) + this._view.compileIcon.setAttribute('title', 'compiler is loading, please wait a few moments.') + this._view.compileIcon.classList.add(`${css.spinningIcon}`) + this._view.warnCompilationSlow.style.visibility = 'hidden' + this._updateLanguageSelector() + }) + + this.compileTabLogic.compiler.event.register('compilerLoaded', () => { + if (!this._view.compileIcon) return + this._disableCompileBtn(false) + this._view.compileIcon.setAttribute('title', '') + this._view.compileIcon.classList.remove(`${css.spinningIcon}`) + if (this.data.autoCompile) this.compileIfAutoCompileOn() + }) + + this.compileTabLogic.compiler.event.register('compilationFinished', (success, data, source) => { + if (!this._view.compileIcon) return + this._view.compileIcon.setAttribute('title', 'idle') + this._view.compileIcon.classList.remove(`${css.spinningIcon}`) + this._view.compileIcon.classList.remove(`${css.bouncingIcon}`) + }) + } + + /************** + * SUBCOMPONENT + */ + compilationButton (name = '') { + const displayed = name || '' + const disabled = name && this.isSolFileSelected() ? '' : 'disabled' + return yo` + + ` + } + + _disableCompileBtn (shouldDisable) { + let btn = document.getElementById('compileBtn') + if (!btn) return + if (shouldDisable) { + btn.classList.add('disabled') + } else if (this.isSolFileSelected()) { + btn.classList.remove('disabled') + } + } + + // Load solc compiler version according to pragma in contract file + _setCompilerVersionFromPragma (filename) { + if (!this.data.allversions) return + this.compileTabLogic.fileManager.readFile(filename).then(data => { + const pragmaArr = data.match(/(pragma solidity (.+?);)/g) + if (pragmaArr && pragmaArr.length === 1) { + const pragmaStr = pragmaArr[0].replace('pragma solidity', '').trim() + const pragma = pragmaStr.substring(0, pragmaStr.length - 1) + const releasedVersions = this.data.allversions.filter(obj => !obj.prerelease).map(obj => obj.version) + const allVersions = this.data.allversions.map(obj => this._retrieveVersion(obj.version)) + const currentCompilerName = this._retrieveVersion(this._view.versionSelector.selectedOptions[0].label) + // contains only numbers part, for example '0.4.22' + const pureVersion = this._retrieveVersion() + // is nightly build newer than the last release + const isNewestNightly = currentCompilerName.includes('nightly') && semver.gt(pureVersion, releasedVersions[0]) + // checking if the selected version is in the pragma range + const isInRange = semver.satisfies(pureVersion, pragma) + // checking if the selected version is from official compilers list(excluding custom versions) and in range or greater + const isOfficial = allVersions.includes(currentCompilerName) + if (isOfficial && (!isInRange && !isNewestNightly)) { + const compilerToLoad = semver.maxSatisfying(releasedVersions, pragma) + const compilerPath = this.data.allversions.filter(obj => !obj.prerelease && obj.version === compilerToLoad)[0].path + if (this.data.selectedVersion !== compilerPath) { + this.data.selectedVersion = compilerPath + this._updateVersionSelector() + } + } + } + }) + } + + _retrieveVersion (version) { + if (!version) version = this._view.versionSelector.value + return semver.coerce(version) ? semver.coerce(version).version : '' + } + + render () { + this.compileTabLogic.compiler.event.register('compilerLoaded', (version) => this.setVersionText(version)) + this.fetchAllVersion((allversions, selectedVersion) => { + this.data.allversions = allversions + this.data.selectedVersion = selectedVersion + if (this._view.versionSelector) this._updateVersionSelector() + }) + + this._view.warnCompilationSlow = yo`` + this._view.compileIcon = yo`` + this._view.autoCompile = yo`` + this._view.hideWarningsBox = yo`` + if (this.data.autoCompile) this._view.autoCompile.setAttribute('checked', '') + if (this.data.hideWarnings) this._view.hideWarningsBox.setAttribute('checked', '') + + this._view.optimize = yo`` + if (this.compileTabLogic.optimize) this._view.optimize.setAttribute('checked', '') + + this._view.versionSelector = yo` + ` + this._view.languageSelector = yo` + ` + this._view.version = yo`` + + this._view.evmVersionSelector = yo` + ` + if (this.compileTabLogic.evmVersion) { + let s = this._view.evmVersionSelector + let i + for (i = 0; i < s.options.length; i++) { + if (s.options[i].value === this.compileTabLogic.evmVersion) { + break + } + } + if (i === s.options.length) { // invalid evmVersion from queryParams + s.selectedIndex = 0 // compiler default + this.onchangeEvmVersion() + } else { + s.selectedIndex = i + } + } + + this._view.compilationButton = this.compilationButton() + + this._view.includeNightlies = yo` + this._updateVersionSelector()}> + ` + this._view.compileContainer = yo` +
+ +
+
+
+ + ${this._view.versionSelector} +
+
+ ${this._view.includeNightlies} + +
+
+ + ${this._view.languageSelector} +
+
+ + ${this._view.evmVersionSelector} +
+
+

Compiler Configuration

+
+ ${this._view.autoCompile} + +
+
+ ${this._view.optimize} + +
+
+ ${this._view.hideWarningsBox} + +
+
+ ${this._view.compilationButton} +
+
+ +
` + + return this._view.compileContainer + } + + promtCompiler () { + modalDialogCustom.prompt( + 'Add a custom compiler', + 'URL', + '', + (url) => this.addCustomCompiler(url) + ) + } + + addCustomCompiler (url) { + this.data.selectedVersion = this._view.versionSelector.value + this._updateVersionSelector(url) + } + + updateAutoCompile (event) { + this.config.set('autoCompile', this._view.autoCompile.checked) + } + + compile (event) { + const currentFile = this.config.get('currentFile') + if (!this.isSolFileSelected()) return + + this._setCompilerVersionFromPragma(currentFile) + this.compileTabLogic.runCompiler() + } + + compileIfAutoCompileOn () { + if (this.config.get('autoCompile')) { + this.compile() + } + } + + hideWarnings (event) { + this.config.set('hideWarnings', this._view.hideWarningsBox.checked) + this.compileIfAutoCompileOn() + } + + onchangeOptimize () { + this.compileTabLogic.setOptimize(!!this._view.optimize.checked) + this.compileIfAutoCompileOn() + } + + onchangeLanguage (event) { + this.compileTabLogic.setLanguage(event.target.value) + this.compileIfAutoCompileOn() + } + + onchangeEvmVersion (_) { + let s = this._view.evmVersionSelector + let v = s.value + if (v === 'default') { + v = null + } + this.compileTabLogic.setEvmVersion(v) + this.compileIfAutoCompileOn() + } + + onchangeLoadVersion (event) { + this.data.selectedVersion = this._view.versionSelector.value + this._updateVersionSelector() + this._updateLanguageSelector() + } + + _shouldBeAdded (version) { + return !version.includes('nightly') || + (version.includes('nightly') && this._view.includeNightlies.checked) + } + + _updateVersionSelector (customUrl = '') { + // update selectedversion of previous one got filtered out + if (!this.data.selectedVersion || !this._shouldBeAdded(this.data.selectedVersion)) { + this.data.selectedVersion = this.data.defaultVersion + } + this._view.versionSelector.innerHTML = '' + this.data.allversions.forEach(build => { + const option = build.path === this.data.selectedVersion + ? yo`` + : yo`` + + if (this._shouldBeAdded(option.innerText)) { + this._view.versionSelector.appendChild(option) + } + }) + this._view.versionSelector.removeAttribute('disabled') + this.queryParams.update({ version: this.data.selectedVersion }) + let url + if (customUrl !== '') { + this.data.selectedVersion = customUrl + this._view.versionSelector.appendChild(yo``) + url = customUrl + } else if (this.data.selectedVersion === 'builtin') { + let location = window.document.location + location = `${location.protocol}//${location.host}/${location.pathname}` + if (location.endsWith('index.html')) location = location.substring(0, location.length - 10) + if (!location.endsWith('/')) location += '/' + url = location + 'soljson.js' + } else { + if (this.data.selectedVersion.indexOf('soljson') !== 0 || helper.checkSpecialChars(this.data.selectedVersion)) { + return console.log('loading ' + this.data.selectedVersion + ' not allowed') + } + url = `${this.data.baseurl}/${this.data.selectedVersion}` + } + + // Workers cannot load js on "file:"-URLs and we get a + // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, + // resort to non-worker version in that case. + if (canUseWorker(this.data.selectedVersion)) { + this.compileTabLogic.compiler.loadVersion(true, url) + this.setVersionText('(loading using worker)') + } else { + this.compileTabLogic.compiler.loadVersion(false, url) + this.setVersionText('(loading)') + } + } + + _updateLanguageSelector () { + // This is the first version when Yul is available + if (!semver.valid(this._retrieveVersion()) || semver.lt(this._retrieveVersion(), 'v0.5.7+commit.6da8b019.js')) { + this._view.languageSelector.setAttribute('disabled', '') + this._view.languageSelector.value = 'Solidity' + this.compileTabLogic.setLanguage('Solidity') + } else { + this._view.languageSelector.removeAttribute('disabled') + } + } + + setVersionText (text) { + if (this._view.version) this._view.version.innerText = text + } + + fetchAllVersion (callback) { + minixhr(`${this.data.baseurl}/list.json`, (json, event) => { + // @TODO: optimise and cache results to improve app loading times #2461 + var allversions, selectedVersion + if (event.type !== 'error') { + try { + const data = JSON.parse(json) + allversions = data.builds.slice().reverse() + selectedVersion = this.data.defaultVersion + if (this.queryParams.get().version) selectedVersion = this.queryParams.get().version + } catch (e) { + addTooltip('Cannot load compiler version list. It might have been blocked by an advertisement blocker. Please try deactivating any of them from this page and reload.') + } + } else { + allversions = [{ path: 'builtin', longVersion: 'latest local version' }] + selectedVersion = 'builtin' + } + callback(allversions, selectedVersion) + }) + } + + scheduleCompilation () { + if (!this.config.get('autoCompile')) return + if (this.data.compileTimeout) window.clearTimeout(this.data.compileTimeout) + this.data.compileTimeout = window.setTimeout(() => this.compileIfAutoCompileOn(), this.data.timeout) + } + +} + +module.exports = CompilerContainer diff --git a/src/app/tabs/compileTab/contractParser.js b/src/app/tabs/compileTab/contractParser.js new file mode 100644 index 0000000000..de9abb5c34 --- /dev/null +++ b/src/app/tabs/compileTab/contractParser.js @@ -0,0 +1,120 @@ +'use strict' + +var solcTranslate = require('solc/translate') +var remixLib = require('remix-lib') +var txHelper = remixLib.execution.txHelper + +module.exports = (contractName, contract, compiledSource) => { + return getDetails(contractName, contract, compiledSource) +} + +var getDetails = function (contractName, contract, source) { + var detail = {} + detail.name = contractName + detail.metadata = contract.metadata + if (contract.evm.bytecode.object) { + detail.bytecode = contract.evm.bytecode.object + } + + detail.abi = contract.abi + + if (contract.evm.bytecode.object) { + detail.bytecode = contract.evm.bytecode + detail.web3Deploy = gethDeploy(contractName.toLowerCase(), contract.abi, contract.evm.bytecode.object) + + detail.metadataHash = retrieveMetadataHash(contract.evm.bytecode.object) + if (detail.metadataHash) { + detail.swarmLocation = 'bzzr://' + detail.metadataHash + } + } + + detail.functionHashes = {} + for (var fun in contract.evm.methodIdentifiers) { + detail.functionHashes[contract.evm.methodIdentifiers[fun]] = fun + } + + detail.gasEstimates = formatGasEstimates(contract.evm.gasEstimates) + + detail.devdoc = contract.devdoc + detail.userdoc = contract.userdoc + + if (contract.evm.deployedBytecode && contract.evm.deployedBytecode.object.length > 0) { + detail['Runtime Bytecode'] = contract.evm.deployedBytecode + } + + if (source && contract.assembly !== null) { + detail['Assembly'] = solcTranslate.prettyPrintLegacyAssemblyJSON(contract.evm.legacyAssembly, source.content) + } + + return detail +} + +var retrieveMetadataHash = function (bytecode) { + var match = /a165627a7a72305820([0-9a-f]{64})0029$/.exec(bytecode) + if (!match) { + match = /a265627a7a72305820([0-9a-f]{64})6c6578706572696d656e74616cf50037$/.exec(bytecode) + } + if (match) { + return match[1] + } +} + +var gethDeploy = function (contractName, jsonInterface, bytecode) { + var code = '' + var funABI = txHelper.getConstructorInterface(jsonInterface) + + funABI.inputs.forEach(function (inp) { + code += 'var ' + inp.name + ' = /* var of type ' + inp.type + ' here */ ;\n' + }) + + contractName = contractName.replace(/[:./]/g, '_') + code += 'var ' + contractName + 'Contract = web3.eth.contract(' + JSON.stringify(jsonInterface).replace('\n', '') + ');' + + '\nvar ' + contractName + ' = ' + contractName + 'Contract.new(' + + funABI.inputs.forEach(function (inp) { + code += '\n ' + inp.name + ',' + }) + + code += '\n {' + + '\n from: web3.eth.accounts[0], ' + + "\n data: '0x" + bytecode + "', " + + "\n gas: '4700000'" + + '\n }, function (e, contract){' + + '\n console.log(e, contract);' + + "\n if (typeof contract.address !== 'undefined') {" + + "\n console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);" + + '\n }' + + '\n })' + + return code +} + +var formatGasEstimates = function (data) { + if (!data) return {} + if (data.creation === undefined && data.external === undefined && data.internal === undefined) return {} + + var gasToText = function (g) { + return g === null ? 'unknown' : g + } + + var ret = {} + var fun + if ('creation' in data) { + ret['Creation'] = data.creation + } + + if ('external' in data) { + ret['External'] = {} + for (fun in data.external) { + ret['External'][fun] = gasToText(data.external[fun]) + } + } + + if ('internal' in data) { + ret['Internal'] = {} + for (fun in data.internal) { + ret['Internal'][fun] = gasToText(data.internal[fun]) + } + } + return ret +} diff --git a/src/app/tabs/debugger-tab.js b/src/app/tabs/debugger-tab.js new file mode 100644 index 0000000000..84959edad2 --- /dev/null +++ b/src/app/tabs/debugger-tab.js @@ -0,0 +1,85 @@ +const yo = require('yo-yo') +const remixLib = require('remix-lib') +const css = require('./styles/debugger-tab-styles') +import toaster from '../ui/tooltip' +const DebuggerUI = require('./debugger/debuggerUI') +import { ViewPlugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +const profile = { + name: 'debugger', + displayName: 'Debugger', + methods: ['debug', 'getTrace'], + events: [], + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDk2MHEwIDI2LTE5IDQ1dC00NSAxOWgtMjI0cTAgMTcxLTY3IDI5MGwyMDggMjA5cTE5IDE5IDE5IDQ1dC0xOSA0NXEtMTggMTktNDUgMTl0LTQ1LTE5bC0xOTgtMTk3cS01IDUtMTUgMTN0LTQyIDI4LjUtNjUgMzYuNS04MiAyOS05NyAxM3YtODk2aC0xMjh2ODk2cS01MSAwLTEwMS41LTEzLjV0LTg3LTMzLTY2LTM5LTQzLjUtMzIuNWwtMTUtMTQtMTgzIDIwN3EtMjAgMjEtNDggMjEtMjQgMC00My0xNi0xOS0xOC0yMC41LTQ0LjV0MTUuNS00Ni41bDIwMi0yMjdxLTU4LTExNC01OC0yNzRoLTIyNHEtMjYgMC00NS0xOXQtMTktNDUgMTktNDUgNDUtMTloMjI0di0yOTRsLTE3My0xNzNxLTE5LTE5LTE5LTQ1dDE5LTQ1IDQ1LTE5IDQ1IDE5bDE3MyAxNzNoODQ0bDE3My0xNzNxMTktMTkgNDUtMTl0NDUgMTkgMTkgNDUtMTkgNDVsLTE3MyAxNzN2Mjk0aDIyNHEyNiAwIDQ1IDE5dDE5IDQ1em0tNDgwLTU3NmgtNjQwcTAtMTMzIDkzLjUtMjI2LjV0MjI2LjUtOTMuNSAyMjYuNSA5My41IDkzLjUgMjI2LjV6Ii8+PC9zdmc+', + description: 'Debug transactions', + kind: 'debugging', + location: 'sidePanel', + documentation: 'https://remix-ide.readthedocs.io/en/latest/debugger.html', + version: packageJson.version +} + +class DebuggerTab extends ViewPlugin { + + constructor (blockchain) { + super(profile) + this.el = null + this.blockchain = blockchain + } + + render () { + if (this.el) return this.el + + this.el = yo` +
+
+
` + + this.on('fetchAndCompile', 'compiling', (settings) => { + toaster(yo`
Recompiling and debugging with params
${JSON.stringify(settings, null, '\t')}
`) + }) + + this.on('fetchAndCompile', 'compilationFailed', (data) => { + toaster(yo`
Compilation failed... continuing without source code debugging.
`) + }) + + this.on('fetchAndCompile', 'notFound', (contractAddress) => { + toaster(yo`
Contract ${contractAddress} not found in source code repository continuing without source code debugging.
`) + }) + + this.on('fetchAndCompile', 'usingLocalCompilation', (contractAddress) => { + toaster(yo`
Using compilation result from Solidity module
`) + }) + + this.on('fetchAndCompile', 'sourceVerificationNotAvailable', () => { + toaster(yo`
Source verification plugin not activated or not available. continuing without source code debugging.
`) + }) + + this.debuggerUI = new DebuggerUI( + this.el.querySelector('#debugger'), + this.blockchain, + (address, receipt) => { + const target = (address && remixLib.helpers.trace.isContractCreation(address)) ? receipt.contractAddress : address + return this.call('fetchAndCompile', 'resolve', target || receipt.contractAddress || receipt.to, '.debug', this.blockchain.web3()) + }) + + this.call('manager', 'activatePlugin', 'source-verification') + // this.call('manager', 'activatePlugin', 'udapp') + + return this.el + } + + debug (hash) { + if (this.debuggerUI) this.debuggerUI.debug(hash) + } + + getTrace (hash) { + return this.debuggerUI.getTrace(hash) + } + + debugger () { + return this.debuggerUI + } +} + +module.exports = DebuggerTab diff --git a/src/app/tabs/debugger/debuggerUI.js b/src/app/tabs/debugger/debuggerUI.js new file mode 100644 index 0000000000..8359762412 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI.js @@ -0,0 +1,229 @@ +var TxBrowser = require('./debuggerUI/TxBrowser') +var StepManagerUI = require('./debuggerUI/StepManager') +var VmDebugger = require('./debuggerUI/VmDebugger') +var toaster = require('../../ui/tooltip') + +var Debugger = require('remix-debug').TransactionDebugger + +var SourceHighlighter = require('../../editor/sourceHighlighter') + +var EventManager = require('../../../lib/events') + +var globalRegistry = require('../../../global/registry') + +var remixLib = require('remix-lib') + +var init = remixLib.init + +var yo = require('yo-yo') +var csjs = require('csjs-inject') + +var css = csjs` + .statusMessage { + margin-left: 15px; + } + .innerShift { + padding: 2px; + margin-left: 10px; + } +` + +class DebuggerUI { + + constructor (container, blockchain, fetchContractAndCompile) { + this.registry = globalRegistry + this.blockchain = blockchain + this.fetchContractAndCompile = fetchContractAndCompile + this.event = new EventManager() + + this.isActive = false + + this.sourceHighlighter = new SourceHighlighter() + + this.startTxBrowser() + this.stepManager = null + + this.statusMessage = '' + this.currentReceipt + + this.view + + container.appendChild(this.render()) + + this.setEditor() + } + + setEditor () { + const self = this + this.editor = this.registry.get('editor').api + + self.editor.event.register('breakpointCleared', (fileName, row) => { + if (self.debugger) self.debugger.breakPointManager.remove({fileName: fileName, row: row}) + }) + + self.editor.event.register('breakpointAdded', (fileName, row) => { + if (self.debugger) self.debugger.breakPointManager.add({fileName: fileName, row: row}) + }) + + self.editor.event.register('contentChanged', function () { + if (self.debugger) self.debugger.unload() + }) + } + + listenToEvents () { + const self = this + if (!self.debugger) return + + this.debugger.event.register('debuggerStatus', function (isActive) { + self.sourceHighlighter.currentSourceLocation(null) + self.isActive = isActive + }) + + this.debugger.event.register('newSourceLocation', async function (lineColumnPos, rawLocation) { + const contracts = await self.fetchContractAndCompile( + self.currentReceipt.contractAddress || self.currentReceipt.to, + self.currentReceipt) + if (contracts) { + const path = contracts.getSourceName(rawLocation.file) + if (path) self.sourceHighlighter.currentSourceLocationFromfileName(lineColumnPos, path) + } + }) + + this.debugger.event.register('debuggerUnloaded', self.unLoad.bind(this)) + } + + startTxBrowser () { + const self = this + let txBrowser = new TxBrowser() + this.txBrowser = txBrowser + + txBrowser.event.register('requestDebug', function (blockNumber, txNumber, tx) { + if (self.debugger) self.debugger.unload() + self.startDebugging(blockNumber, txNumber, tx) + }) + + txBrowser.event.register('unloadRequested', this, function (blockNumber, txIndex, tx) { + if (self.debugger) self.debugger.unload() + }) + } + + isDebuggerActive () { + return this.isActive + } + + getDebugWeb3 () { + return new Promise((resolve, reject) => { + this.blockchain.detectNetwork((error, network) => { + let web3 + if (error || !network) { + web3 = init.web3DebugNode(this.blockchain.web3()) + } else { + const webDebugNode = init.web3DebugNode(network.name) + web3 = !webDebugNode ? this.blockchain.web3() : webDebugNode + } + init.extendWeb3(web3) + resolve(web3) + }) + }) + } + + async startDebugging (blockNumber, txNumber, tx) { + if (this.debugger) this.unLoad() + + let web3 = await this.getDebugWeb3() + this.currentReceipt = await web3.eth.getTransactionReceipt(txNumber) + this.debugger = new Debugger({ + web3, + offsetToLineColumnConverter: this.registry.get('offsettolinecolumnconverter').api, + compilationResult: async (address) => { + try { + return await this.fetchContractAndCompile(address, this.currentReceipt) + } catch (e) { + console.error(e) + } + return null + } + }) + + this.listenToEvents() + this.debugger.debug(blockNumber, txNumber, tx, () => { + this.stepManager = new StepManagerUI(this.debugger.step_manager) + this.vmDebugger = new VmDebugger(this.debugger.vmDebuggerLogic) + this.txBrowser.setState({ blockNumber, txNumber, debugging: true }) + this.renderDebugger() + }).catch((error) => { + toaster(error) + this.unLoad() + }) + } + + getTrace (hash) { + return new Promise(async (resolve, reject) => { + const web3 = await this.getDebugWeb3() + + this.currentReceipt = await web3.eth.getTransactionReceipt(hash) + const debug = new Debugger({ + web3, + offsetToLineColumnConverter: this.registry.get('offsettolinecolumnconverter').api, + compilationResult: async (address) => { + try { + return await this.fetchContractAndCompile(address, this.currentReceipt) + } catch (e) { + console.error(e) + } + return null + } + }) + debug.debugger.traceManager.traceRetriever.getTrace(hash, (error, trace) => { + if (error) return reject(error) + resolve(trace) + }) + }) + } + + debug (txHash) { + this.startDebugging(null, txHash, null) + } + + render () { + this.debuggerPanelsView = yo`
` + this.debuggerHeadPanelsView = yo`
` + this.stepManagerView = yo`
` + + var view = yo`
+
+ ${this.txBrowser.render()} + ${this.debuggerHeadPanelsView} + ${this.stepManagerView} +
+
${this.statusMessage}
+ ${this.debuggerPanelsView} +
` + if (!this.view) { + this.view = view + } + return view + } + + unLoad () { + yo.update(this.debuggerHeadPanelsView, yo`
`) + yo.update(this.debuggerPanelsView, yo`
`) + yo.update(this.stepManagerView, yo`
`) + if (this.vmDebugger) this.vmDebugger.remove() + if (this.stepManager) this.stepManager.remove() + if (this.txBrowser) this.txBrowser.setState({debugging: false}) + this.vmDebugger = null + this.stepManager = null + if (this.debugger) delete this.debugger + this.event.trigger('traceUnloaded') + } + + renderDebugger () { + yo.update(this.debuggerHeadPanelsView, this.vmDebugger.renderHead()) + yo.update(this.debuggerPanelsView, this.vmDebugger.render()) + yo.update(this.stepManagerView, this.stepManager.render()) + } + +} + +module.exports = DebuggerUI diff --git a/src/app/tabs/debugger/debuggerUI/ButtonNavigator.js b/src/app/tabs/debugger/debuggerUI/ButtonNavigator.js new file mode 100644 index 0000000000..8c03ae4aa7 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/ButtonNavigator.js @@ -0,0 +1,130 @@ +'use strict' +var EventManager = require('../../../../lib/events') +var yo = require('yo-yo') + +var csjs = require('csjs-inject') + +var css = csjs` + .buttons { + display: flex; + flex-wrap: wrap; + } + .stepButtons { + width: 100%; + display: flex; + justify-content: center; + } + .stepButton { + } + .jumpButtons { + width: 100%; + display: flex; + justify-content: center; + } + .jumpButton { + } + .navigator { + } + .navigator:hover { + } +` + +function ButtonNavigator () { + this.event = new EventManager() + this.intoBackDisabled = true + this.overBackDisabled = true + this.intoForwardDisabled = true + this.overForwardDisabled = true + this.jumpOutDisabled = true + this.jumpNextBreakpointDisabled = true + this.jumpPreviousBreakpointDisabled = true + + this.view +} + +ButtonNavigator.prototype.render = function () { + var self = this + var view = yo`
+
+ + + + +
+ +
+ + + +
+ +
` + if (!this.view) { + this.view = view + } + return view +} + +ButtonNavigator.prototype.reset = function () { + this.intoBackDisabled = true + this.overBackDisabled = true + this.intoForwardDisabled = true + this.overForwardDisabled = true + this.jumpOutDisabled = true + this.jumpNextBreakpointDisabled = true + this.jumpPreviousBreakpointDisabled = true + this.resetWarning('') +} + +ButtonNavigator.prototype.stepChanged = function (stepState, jumpOutDisabled) { + if (stepState === 'invalid') { + // TODO: probably not necessary, already implicit done in the next steps + this.reset() + this.updateAll() + return + } + + this.intoBackDisabled = (stepState === 'initial') + this.overBackDisabled = (stepState === 'initial') + this.jumpPreviousBreakpointDisabled = (stepState === 'initial') + this.jumpNextBreakpointDisabled = (stepState === 'end') + this.intoForwardDisabled = (stepState === 'end') + this.overForwardDisabled = (stepState === 'end') + this.jumpNextBreakpointDisabled = jumpOutDisabled + + this.updateAll() +} + +ButtonNavigator.prototype.updateAll = function () { + this.updateDisabled('intoback', this.intoBackDisabled) + this.updateDisabled('overback', this.overBackDisabled) + this.updateDisabled('overforward', this.overForwardDisabled) + this.updateDisabled('intoforward', this.intoForwardDisabled) + this.updateDisabled('jumpout', this.jumpOutDisabled) + this.updateDisabled('jumptoexception', this.jumpOutDisabled) + this.updateDisabled('jumpnextbreakpoint', this.jumpNextBreakpointDisabled) + this.updateDisabled('jumppreviousbreakpoint', this.jumpPreviousBreakpointDisabled) +} + +ButtonNavigator.prototype.updateDisabled = function (id, disabled) { + if (disabled) { + document.getElementById(id).setAttribute('disabled', true) + } else { + document.getElementById(id).removeAttribute('disabled') + } +} + +ButtonNavigator.prototype.resetWarning = function (revertedReason) { + if (!this.view) return + this.view.querySelector('#reverted #outofgas').style.display = (revertedReason === 'outofgas') ? 'inline' : 'none' + this.view.querySelector('#reverted #parenthasthrown').style.display = (revertedReason === 'parenthasthrown') ? 'inline' : 'none' + this.view.querySelector('#reverted').style.display = (revertedReason === '') ? 'none' : 'block' +} + +module.exports = ButtonNavigator diff --git a/src/app/tabs/debugger/debuggerUI/Slider.js b/src/app/tabs/debugger/debuggerUI/Slider.js new file mode 100644 index 0000000000..d67be06dc2 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/Slider.js @@ -0,0 +1,57 @@ +'use strict' +var EventManager = require('../../../../lib/events') +var yo = require('yo-yo') + +class Slider { + constructor () { + this.event = new EventManager() + this.max + this.disabled = true + this.view + this.previousValue = null + } + + setSliderLength (length) { + if (!this.view) return + this.view.querySelector('#slider').setAttribute('max', length - 1) + this.max = length - 1 + this.disabled = (length === 0) + + if (this.disabled) { + this.view.querySelector('#slider').setAttribute('disabled', true) + } else { + this.view.querySelector('#slider').removeAttribute('disabled') + } + + this.setValue(0) + } + + onChange (event) { + if (!this.view) return + var value = parseInt(this.view.querySelector('#slider').value) + if (value === this.previousValue) return + + this.previousValue = value + this.event.trigger('sliderMoved', [value]) + } + + setValue (value) { + if (!this.view) return + this.view.querySelector('#slider').value = value + } + + render () { + var self = this + var view = yo`
+ +
` + if (!this.view) { + this.view = view + } + return view + } + +} + +module.exports = Slider diff --git a/src/app/tabs/debugger/debuggerUI/StepManager.js b/src/app/tabs/debugger/debuggerUI/StepManager.js new file mode 100644 index 0000000000..045f9609a4 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/StepManager.js @@ -0,0 +1,58 @@ +var EventManager = require('../../../../lib/events') +var yo = require('yo-yo') + +var ButtonNavigator = require('./ButtonNavigator') +var Slider = require('./Slider') + +function StepManager (stepManager) { + this.event = new EventManager() + this.stepManager = stepManager + this.startSlider() + this.startButtonNavigator() + this.stepManager.event.register('stepChanged', this.updateStep.bind(this)) +} + +StepManager.prototype.startSlider = function () { + this.slider = new Slider() + this.slider.event.register('sliderMoved', this.stepManager.jumpTo.bind(this.stepManager)) + this.stepManager.event.register('traceLengthChanged', this.slider.setSliderLength.bind(this.slider)) +} + +StepManager.prototype.startButtonNavigator = function () { + this.buttonNavigator = new ButtonNavigator() + + this.stepManager.event.register('revertWarning', this.buttonNavigator.resetWarning.bind(this.buttonNavigator)) + + this.buttonNavigator.event.register('stepIntoBack', this.stepManager.stepIntoBack.bind(this.stepManager)) + this.buttonNavigator.event.register('stepIntoForward', this.stepManager.stepIntoForward.bind(this.stepManager)) + this.buttonNavigator.event.register('stepOverBack', this.stepManager.stepOverBack.bind(this.stepManager)) + this.buttonNavigator.event.register('stepOverForward', this.stepManager.stepOverForward.bind(this.stepManager)) + this.buttonNavigator.event.register('jumpOut', this.stepManager.jumpOut.bind(this.stepManager)) + this.buttonNavigator.event.register('jumpToException', this.stepManager.jumpToException.bind(this.stepManager)) + this.buttonNavigator.event.register('jumpNextBreakpoint', this.stepManager.jumpNextBreakpoint.bind(this.stepManager)) + this.buttonNavigator.event.register('jumpPreviousBreakpoint', this.stepManager.jumpPreviousBreakpoint.bind(this.stepManager)) +} + +StepManager.prototype.updateStep = function (step, stepState, jumpOutDisabled) { + if (!this.slider) return + this.slider.setValue(step) + this.buttonNavigator.stepChanged(stepState, jumpOutDisabled) + this.event.trigger('stepChanged', [step]) +} + +StepManager.prototype.remove = function () { + // used to stop listenning on event. bad and should be "refactored" + this.slider.view = null + this.slider = null + this.buttonNavigator.view = null + this.buttonNavigator = null +} + +StepManager.prototype.render = function () { + return yo`
+ ${this.slider.render()} + ${this.buttonNavigator.render()} +
` +} + +module.exports = StepManager diff --git a/src/app/tabs/debugger/debuggerUI/TxBrowser.js b/src/app/tabs/debugger/debuggerUI/TxBrowser.js new file mode 100644 index 0000000000..f395f904cb --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/TxBrowser.js @@ -0,0 +1,149 @@ +var EventManager = require('../../../../lib/events') +var yo = require('yo-yo') +var csjs = require('csjs-inject') + +var css = csjs` + .container { + display: flex; + flex-direction: column; + } + .txContainer { + display: flex; + flex-direction: column; + } + .txinputs { + width: 100%; + display: flex; + justify-content: center; + } + .txinput { + width: inherit; + font-size: small; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .txbuttons { + width: 100%; + display: flex; + justify-content: center; + } + .txbutton { + width: inherit; + } + .txbuttonstart { + } + .txbutton:hover { + } + .vmargin { + margin-top: 10px; + margin-bottom: 10px; + } +` + +function TxBrowser () { + this.event = new EventManager() + + this.state = { + txNumber: undefined, + debugging: false + } + this.view +} + +TxBrowser.prototype.submit = function () { + if (this.state.debugging) { + this.unload() + } else { + this.event.trigger('requestDebug', [undefined, this.state.txNumber]) + } + yo.update(this.view, this.render()) +} + +TxBrowser.prototype.updateTxN = function (ev) { + this.state.txNumber = ev.target.value + if (this.view) { + yo.update(this.view, this.render()) + } +} + +TxBrowser.prototype.load = function (txHash, tx) { + this.state.txNumber = txHash +} + +TxBrowser.prototype.unload = function () { + this.event.trigger('unloadRequested') +} + +TxBrowser.prototype.setState = function (state) { + this.state = {...this.state, ...state} + if (this.view) { + yo.update(this.view, this.render()) + } +} + +TxBrowser.prototype.render = function () { + var self = this + this.state.txNumberInput = yo` + + ` + let txButton = yo` + + ` + var view = yo` +
+
+
+ ${this.state.txNumberInput} +
+
+ ${txButton} +
+
+ +
+ ` + if (this.state.debugging) { + view.querySelectorAll('input').forEach(element => { element.setAttribute('disabled', '') }) + } + if (!this.state.txNumber) { + view.querySelector("button[id='load']").setAttribute('disabled', '') + } else if (!this.state.debugging) { + this.state.txNumberInput.removeAttribute('disabled') + } + if (!this.view) { + this.view = view + } + + return view +} + +TxBrowser.prototype.txInputChanged = function (event) { + // todo check validation of txnumber in the input element, use + // required + // oninvalid="setCustomValidity('Please provide a valid transaction number, must start with 0x and have length of 22')" + // pattern="^0[x,X]+[0-9a-fA-F]{22}" + // this.state.txNumberInput.setCustomValidity('') + + this.state.txNumber = event.target.value + yo.update(this.view, this.render()) +} + +module.exports = TxBrowser diff --git a/src/app/tabs/debugger/debuggerUI/VmDebugger.js b/src/app/tabs/debugger/debuggerUI/VmDebugger.js new file mode 100644 index 0000000000..f65dab1daa --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/VmDebugger.js @@ -0,0 +1,167 @@ +'use strict' +var csjs = require('csjs-inject') +var yo = require('yo-yo') + +var CodeListView = require('./vmDebugger/CodeListView') +var CalldataPanel = require('./vmDebugger/CalldataPanel') +var MemoryPanel = require('./vmDebugger/MemoryPanel') +var CallstackPanel = require('./vmDebugger/CallstackPanel') +var StackPanel = require('./vmDebugger/StackPanel') +var StoragePanel = require('./vmDebugger/StoragePanel') +var StepDetail = require('./vmDebugger/StepDetail') +var SolidityState = require('./vmDebugger/SolidityState') +var SolidityLocals = require('./vmDebugger/SolidityLocals') +var FullStoragesChangesPanel = require('./vmDebugger/FullStoragesChanges') +var DropdownPanel = require('./vmDebugger/DropdownPanel') + +var css = csjs` + .asmCode { + width: 100%; + } + .stepDetail { + width: 100%; + } + .vmheadView { + margin-top:10px; + } +` + +function VmDebugger (vmDebuggerLogic) { + var self = this + this.view + + this.vmDebuggerLogic = vmDebuggerLogic + + this.asmCode = new CodeListView() + this.vmDebuggerLogic.event.register('codeManagerChanged', this.asmCode.changed.bind(this.asmCode)) + this.vmDebuggerLogic.event.register('traceUnloaded', this.asmCode.reset.bind(this.asmCode)) + + this.calldataPanel = new CalldataPanel() + this.vmDebuggerLogic.event.register('traceManagerCallDataUpdate', this.calldataPanel.update.bind(this.calldataPanel)) + + this.memoryPanel = new MemoryPanel() + this.vmDebuggerLogic.event.register('traceManagerMemoryUpdate', this.memoryPanel.update.bind(this.memoryPanel)) + + this.callstackPanel = new CallstackPanel() + this.vmDebuggerLogic.event.register('traceManagerCallStackUpdate', this.callstackPanel.update.bind(this.callstackPanel)) + + this.stackPanel = new StackPanel() + this.vmDebuggerLogic.event.register('traceManagerStackUpdate', this.stackPanel.update.bind(this.stackPanel)) + + this.storagePanel = new StoragePanel() + this.vmDebuggerLogic.event.register('traceManagerStorageUpdate', this.storagePanel.update.bind(this.storagePanel)) + + this.stepDetail = new StepDetail() + this.vmDebuggerLogic.event.register('traceUnloaded', this.stepDetail.reset.bind(this.stepDetail)) + this.vmDebuggerLogic.event.register('newTraceLoaded', this.stepDetail.reset.bind(this.stepDetail)) + + this.vmDebuggerLogic.event.register('traceCurrentStepUpdate', function (error, step) { + self.stepDetail.updateField('execution step', (error ? '-' : step)) + }) + + this.vmDebuggerLogic.event.register('traceMemExpandUpdate', function (error, addmem) { + self.stepDetail.updateField('add memory', (error ? '-' : addmem)) + }) + + this.vmDebuggerLogic.event.register('traceStepCostUpdate', function (error, gas) { + self.stepDetail.updateField('gas', (error ? '-' : gas)) + }) + + this.vmDebuggerLogic.event.register('traceCurrentCalledAddressAtUpdate', function (error, address) { + self.stepDetail.updateField('loaded address', (error ? '-' : address)) + }) + + this.vmDebuggerLogic.event.register('traceRemainingGasUpdate', function (error, remainingGas) { + self.stepDetail.updateField('remaining gas', (error ? '-' : remainingGas)) + }) + + this.vmDebuggerLogic.event.register('indexUpdate', function (index) { + self.stepDetail.updateField('vm trace step', index) + }) + + this.solidityState = new SolidityState() + this.vmDebuggerLogic.event.register('solidityState', this.solidityState.update.bind(this.solidityState)) + this.vmDebuggerLogic.event.register('solidityStateMessage', this.solidityState.setMessage.bind(this.solidityState)) + this.vmDebuggerLogic.event.register('solidityStateUpdating', this.solidityState.setUpdating.bind(this.solidityState)) + + this.solidityLocals = new SolidityLocals() + this.vmDebuggerLogic.event.register('solidityLocals', this.solidityLocals.update.bind(this.solidityLocals)) + this.vmDebuggerLogic.event.register('solidityLocalsMessage', this.solidityLocals.setMessage.bind(this.solidityLocals)) + this.vmDebuggerLogic.event.register('solidityLocalsUpdating', this.solidityLocals.setUpdating.bind(this.solidityLocals)) + + this.returnValuesPanel = new DropdownPanel('Return Value', {json: true}) + this.returnValuesPanel.data = {} + this.vmDebuggerLogic.event.register('traceReturnValueUpdate', this.returnValuesPanel.update.bind(this.returnValuesPanel)) + + this.fullStoragesChangesPanel = new FullStoragesChangesPanel() + this.addresses = [] + + this.vmDebuggerLogic.event.register('traceAddressesUpdate', function (_addresses) { + self.fullStoragesChangesPanel.update({}) + }) + + this.vmDebuggerLogic.event.register('traceStorageUpdate', this.fullStoragesChangesPanel.update.bind(this.fullStoragesChangesPanel)) + + this.vmDebuggerLogic.event.register('newTrace', () => { + if (!self.view) return + + self.asmCode.basicPanel.show() + self.stackPanel.basicPanel.show() + self.storagePanel.basicPanel.show() + self.memoryPanel.basicPanel.show() + self.calldataPanel.basicPanel.show() + self.callstackPanel.basicPanel.show() + }) + + this.vmDebuggerLogic.event.register('newCallTree', () => { + if (!self.view) return + self.solidityLocals.basicPanel.show() + self.solidityState.basicPanel.show() + }) + + this.vmDebuggerLogic.start() +} + +VmDebugger.prototype.renderHead = function () { + const headView = yo` +
+
+
${this.asmCode.render()}
+
${this.stepDetail.render()}
+
+
+ ` + if (!this.headView) { + this.headView = headView + } + return headView +} + +VmDebugger.prototype.remove = function () { + // used to stop listenning on event. bad and should be "refactored" + this.view = null +} + +VmDebugger.prototype.render = function () { + const view = yo` +
+
+ ${this.solidityLocals.render()} + ${this.solidityState.render()} + ${this.stackPanel.render()} + ${this.memoryPanel.render()} + ${this.storagePanel.render()} + ${this.callstackPanel.render()} + ${this.calldataPanel.render()} + ${this.returnValuesPanel.render()} + ${this.fullStoragesChangesPanel.render()} +
+
+ ` + if (!this.view) { + this.view = view + } + return view +} + +module.exports = VmDebugger diff --git a/src/app/tabs/debugger/debuggerUI/styles/basicStyles.js b/src/app/tabs/debugger/debuggerUI/styles/basicStyles.js new file mode 100644 index 0000000000..1517f06c8d --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/styles/basicStyles.js @@ -0,0 +1,84 @@ +'use strict' +module.exports = { + truncate: { + 'white-space': 'nowrap', + 'overflow': 'hidden', + 'text-overflow': 'ellipsis', + 'margin-right': '5px' + }, + font: { + 'font-family': 'arial,sans-serif' + }, + innerShift: { + 'padding': '2px', + 'margin-left': '10px' + }, + container: { + 'margin': '10px', + 'padding': '5px' + }, + statusMessage: { + 'margin-left': '15px' + }, + address: { + 'font-style': 'italic' + }, + instructionsList: { + 'width': '52%', + 'overflow-y': 'scroll', + 'max-height': '250px', + 'margin': '0', + 'margin-left': '10px', + 'padding': '2px' + }, + transactionInfo: { + 'margin-top': '5px' + }, + panel: { + container: { + 'border': '1px solid', + 'width': '70%' + }, + tableContainer: { + 'height': '50%', + 'overflow-y': 'auto' + }, + table: { + 'padding': '5px' + }, + title: { + 'padding': '5px', + 'font-style': 'italic' + } + }, + hidden: { + 'display': 'none' + }, + display: { + 'display': 'block' + }, + inline: { + 'display': 'inline-block' + }, + vmargin: { + 'margin-top': '10px', + 'margin-bottom': '10px' + }, + button: { + 'border-color': 'transparent', + 'border-radius': '3px', + 'border': '.3px solid hsla(0, 0%, 40%, 1)', + 'cursor': 'pointer', + 'min-height': '25px', + 'max-height': '25px', + 'padding': '3px', + 'min-width': '100px', + 'font-size': '12px', + 'overflow': 'hidden', + 'word-break': 'normal', + 'background-color': 'hsla(0, 0%, 40%, .2)', + 'color': 'hsla(0, 0%, 40%, 1)', + 'margin': '3px', + 'text-decoration': 'none' + } +} diff --git a/src/app/tabs/debugger/debuggerUI/styles/dropdownPanel.js b/src/app/tabs/debugger/debuggerUI/styles/dropdownPanel.js new file mode 100644 index 0000000000..bb9a1e7f2b --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/styles/dropdownPanel.js @@ -0,0 +1,31 @@ +'use strict' +module.exports = { + title: { + 'border': '1px solid #dadada', + 'background-color': 'white', + 'width': '100%', + 'color': '#363f47', + 'margin-top': '5px', + 'cursor': 'pointer' + }, + titleInner: { + 'display': 'inline-block' + }, + content: { + 'color': '#111111', + 'width': '100%', + 'min-height': '20px' + }, + inner: { + 'padding': '2px', + 'word-break': 'break-all' + }, + copyBtn: { + 'float': 'right', + 'margin-top': '3px' + }, + caret: { + 'margin-left': '10px', + 'margin-right': '10px' + } +} diff --git a/src/app/tabs/debugger/debuggerUI/styles/sliderStyles.js b/src/app/tabs/debugger/debuggerUI/styles/sliderStyles.js new file mode 100644 index 0000000000..45912b6380 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/styles/sliderStyles.js @@ -0,0 +1,6 @@ +'use strict' +module.exports = { + rule: { + 'width': '100%' + } +} diff --git a/src/app/tabs/debugger/debuggerUI/styles/treeView.js b/src/app/tabs/debugger/debuggerUI/styles/treeView.js new file mode 100644 index 0000000000..b50bacd24f --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/styles/treeView.js @@ -0,0 +1,30 @@ +'use strict' +module.exports = { + cssUl: { + 'list-style-type': 'none', + '-webkit-margin-before': '0px', + '-webkit-margin-after': '0px', + '-webkit-margin-start': '0px', + '-webkit-margin-end': '0px', + '-webkit-padding-start': '0px' + }, + cssLi: { + 'list-style-type': 'none', + '-webkit-margin-before': '0px', + '-webkit-margin-after': '0px', + '-webkit-margin-start': '0px', + '-webkit-margin-end': '0px', + '-webkit-padding-start': '0px', + 'margin-left': '10px' + }, + label: { + 'vertical-align': 'top', + 'font-family': 'arial,sans-serif' + }, + caret: { + 'margin-top': '3px', + 'width': '10px' + }, + data: { + } +} diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/CalldataPanel.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/CalldataPanel.js new file mode 100644 index 0000000000..07c9f88cdc --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/CalldataPanel.js @@ -0,0 +1,17 @@ +'use strict' +var DropdownPanel = require('./DropdownPanel') +var yo = require('yo-yo') + +function CalldataPanel () { + this.basicPanel = new DropdownPanel('Call Data', {json: true}) +} + +CalldataPanel.prototype.update = function (calldata) { + this.basicPanel.update(calldata) +} + +CalldataPanel.prototype.render = function () { + return yo`
${this.basicPanel.render()}
` +} + +module.exports = CalldataPanel diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/CallstackPanel.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/CallstackPanel.js new file mode 100644 index 0000000000..ab22c41c4d --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/CallstackPanel.js @@ -0,0 +1,18 @@ +'use strict' +var DropdownPanel = require('./DropdownPanel') +var yo = require('yo-yo') + +function CallstackPanel () { + this.basicPanel = new DropdownPanel('Call Stack', {json: true}) +} + +CallstackPanel.prototype.update = function (calldata) { + this.basicPanel.update(calldata) +} + +CallstackPanel.prototype.render = function () { + return yo`
${this.basicPanel.render()}
` +} + +module.exports = CallstackPanel + diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/CodeListView.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/CodeListView.js new file mode 100644 index 0000000000..26ccbc3871 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/CodeListView.js @@ -0,0 +1,78 @@ +'use strict' +var style = require('../styles/basicStyles') +var yo = require('yo-yo') +var DropdownPanel = require('./DropdownPanel') +var EventManager = require('../../../../../lib/events') +var csjs = require('csjs-inject') + +var css = csjs` + .instructions { + overflow-y: scroll; + max-height: 150px; + } +` +function CodeListView () { + this.event = new EventManager() + this.code + this.address + this.itemSelected + this.basicPanel = new DropdownPanel('Instructions', {json: false, displayContentOnly: true}) + this.basicPanel.event.register('hide', () => { + this.event.trigger('hide', []) + }) + this.basicPanel.event.register('show', () => { + this.event.trigger('show', []) + }) +} + +CodeListView.prototype.render = function () { + this.view = yo`
${this.basicPanel.render({height: style.instructionsList.height})}
` + return this.view +} + +CodeListView.prototype.indexChanged = function (index) { + if (index < 0) return + if (this.itemSelected) { + this.itemSelected.removeAttribute('selected') + this.itemSelected.removeAttribute('style') + if (this.itemSelected.firstChild) { + this.itemSelected.firstChild.removeAttribute('style') + } + } + let codeView = this.view.querySelector('#asmitems') + this.itemSelected = codeView.children[index] + this.itemSelected.style.setProperty('background-color', 'var(--info)') + this.itemSelected.style.setProperty('color', 'var(--light)') + this.itemSelected.setAttribute('selected', 'selected') + if (this.itemSelected.firstChild) { + this.itemSelected.firstChild.setAttribute('style', 'margin-left: 2px') + } + codeView.scrollTop = this.itemSelected.offsetTop - parseInt(codeView.offsetTop) +} + +CodeListView.prototype.reset = function () { + this.changed([], '', -1) +} + +CodeListView.prototype.changed = function (code, address, index) { + if (this.address === address) { + return this.indexChanged(index) + } + this.code = code + this.address = address + this.basicPanel.setContent(this.renderAssemblyItems()) + this.indexChanged(index) +} + +CodeListView.prototype.renderAssemblyItems = function () { + if (this.code) { + var codeView = this.code.map(function (item, i) { + return yo`
${item}
` + }) + return yo`
+ ${codeView} +
` + } +} + +module.exports = CodeListView diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/DropdownPanel.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/DropdownPanel.js new file mode 100644 index 0000000000..07b0e5228b --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/DropdownPanel.js @@ -0,0 +1,190 @@ +'use strict' +var yo = require('yo-yo') +const copy = require('copy-text-to-clipboard') +var EventManager = require('../../../../../lib/events') +var TreeView = require('../../../../ui/TreeView') // TODO setup a direct reference to the UI components + +var csjs = require('csjs-inject') + +var css = csjs` + .title { + display: flex; + align-items: center; + } + .name { + font-weight: bold; + } + .nameDetail { + font-weight: bold; + margin-left: 3px; + } + .icon { + margin-right: 5%; + } + .eyeButton { + margin: 3px; + } + .eyeButton:hover { + } + .dropdownpanel { + width: 100%; + word-break: break-word; + } + .dropdownrawcontent { + padding: 2px; + word-break: break-word; + } + .message { + padding: 2px; + word-break: break-word; + } + .refresh { + display: none; + margin-left: 4px; + margin-top: 4px; + animation: spin 2s linear infinite; + } +` + +function DropdownPanel (_name, _opts) { + this.event = new EventManager() + if (!_opts) { + _opts = {} + } + this.name = _name + this.header = '' + this.json = _opts.json + this.displayContentOnly = _opts.displayContentOnly + if (this.json) { + this.treeView = new TreeView(_opts) + } + this.view +} + +DropdownPanel.prototype.setMessage = function (message) { + if (!this.view) return + this.view.querySelector('.dropdownpanel .dropdownrawcontent').style.display = 'none' + this.view.querySelector('.dropdownpanel .dropdowncontent').style.display = 'none' + this.view.querySelector('.dropdownpanel > i').style.display = 'none' + this.message(message) +} + +DropdownPanel.prototype.setLoading = function () { + if (!this.view) return + this.view.querySelector('.dropdownpanel .dropdownrawcontent').style.display = 'none' + this.view.querySelector('.dropdownpanel .dropdowncontent').style.display = 'none' + this.view.querySelector('.dropdownpanel > i').style.display = 'inline-block' + this.message('') +} + +DropdownPanel.prototype.setUpdating = function () { + if (!this.view) return +} + +DropdownPanel.prototype.update = function (_data, _header) { + if (!this.view) return + this.view.querySelector('.dropdownpanel > i').style.display = 'none' + this.view.querySelector('.dropdownpanel .dropdowncontent').style.display = 'block' + this.view.querySelector('.dropdownpanel .dropdownrawcontent').innerText = JSON.stringify(_data, null, '\t') + if (!this.displayContentOnly) { + this.view.querySelector('.title div.btn').style.display = 'block' + this.view.querySelector('.title span').innerText = _header || ' ' + } + this.message('') + if (this.json) { + this.treeView.update(_data) + } +} + +DropdownPanel.prototype.setContent = function (node) { + if (!this.view) return + yo.update(this.view, this.render(null, node)) +} + +DropdownPanel.prototype.render = function (overridestyle, node) { + var content = yo`
Empty
` + if (this.json) { + content = this.treeView.render({}) + } + overridestyle === undefined ? {} : overridestyle + var self = this + var title = !self.displayContentOnly ? yo`
+
+
${this.name}
+
+
` : yo`
` + + var contentNode = yo`` + var view = yo` +
+ + ${title} + ${contentNode} +
` + if (!this.view) { + this.view = view + } + if (self.displayContentOnly) contentNode.style.display = 'block' + return view +} + +DropdownPanel.prototype.copyClipboard = function () { + var content = this.view.querySelector('.dropdownpanel .dropdownrawcontent') + if (content) copy(content.innerText ? content.innerText : content.textContent) +} + +DropdownPanel.prototype.toggle = function () { + var el = this.view.querySelector('.dropdownpanel') + var caret = this.view.querySelector('.title').firstElementChild + if (el.style.display === '') { + el.style.display = 'none' + caret.className = `${css.icon} fas fa-caret-right` + this.event.trigger('hide', []) + } else { + el.style.display = '' + caret.className = `${css.icon} fas fa-caret-down` + this.event.trigger('show', []) + } +} + +DropdownPanel.prototype.hide = function () { + if (!(this.view && !this.displayContentOnly)) return + var caret = this.view.querySelector('.title').firstElementChild + var el = this.view.querySelector('.dropdownpanel') + el.style.display = 'none' + caret.className = `${css.icon} fas fa-caret-right` + this.event.trigger('hide', []) +} + +DropdownPanel.prototype.show = function () { + if (!(this.view && !this.displayContentOnly)) return + var caret = this.view.querySelector('.title').firstElementChild + var el = this.view.querySelector('.dropdownpanel') + el.style.display = '' + caret.className = `${css.icon} fas fa-caret-down` + this.event.trigger('show', []) +} + +DropdownPanel.prototype.message = function (message) { + if (!this.view) return + var mes = this.view.querySelector('.dropdownpanel .message') + mes.innerText = message + mes.style.display = (message === '') ? 'none' : 'block' +} + +module.exports = DropdownPanel diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/FullStoragesChanges.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/FullStoragesChanges.js new file mode 100644 index 0000000000..32c1cc15b7 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/FullStoragesChanges.js @@ -0,0 +1,21 @@ +var DropdownPanel = require('./DropdownPanel') +var yo = require('yo-yo') + +function FullStoragesChanges () { + this.view + this.basicPanel = new DropdownPanel('Full Storages Changes', {json: true}) +} + +FullStoragesChanges.prototype.update = function (storageData) { + this.basicPanel.update(storageData) +} + +FullStoragesChanges.prototype.render = function () { + var view = yo`
${this.basicPanel.render()}
` + if (!this.view) { + this.view = view + } + return view +} + +module.exports = FullStoragesChanges diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/MemoryPanel.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/MemoryPanel.js new file mode 100644 index 0000000000..d4ed48dd80 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/MemoryPanel.js @@ -0,0 +1,21 @@ +'use strict' +var DropdownPanel = require('./DropdownPanel') +var yo = require('yo-yo') + +function MemoryPanel () { + this.basicPanel = new DropdownPanel('Memory', { + json: true, + css: { + 'font-family': 'monospace' + }}) +} + +MemoryPanel.prototype.update = function (calldata) { + this.basicPanel.update(calldata) +} + +MemoryPanel.prototype.render = function () { + return yo`
${this.basicPanel.render()}
` +} + +module.exports = MemoryPanel diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/SolidityLocals.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/SolidityLocals.js new file mode 100644 index 0000000000..592b2ef060 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/SolidityLocals.js @@ -0,0 +1,37 @@ +'use strict' +var EventManager = require('../../../../../lib/events') +var DropdownPanel = require('./DropdownPanel') +var solidityTypeFormatter = require('./utils/SolidityTypeFormatter') +var yo = require('yo-yo') + +class SolidityLocals { + + constructor (_parent, _traceManager, _internalTreeCall) { + this.event = new EventManager() + this.basicPanel = new DropdownPanel('Solidity Locals', { + json: true, + formatSelf: solidityTypeFormatter.formatSelf, + extractData: solidityTypeFormatter.extractData + }) + this.view + } + + update (data) { + this.basicPanel.update(data) + } + + setMessage (message) { + this.basicPanel.setMessage(message) + } + + setUpdating () { + this.basicPanel.setUpdating() + } + + render () { + this.view = yo`
${this.basicPanel.render()}
` + return this.view + } +} + +module.exports = SolidityLocals diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/SolidityState.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/SolidityState.js new file mode 100644 index 0000000000..7fb8455571 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/SolidityState.js @@ -0,0 +1,35 @@ +var DropdownPanel = require('./DropdownPanel') +var solidityTypeFormatter = require('./utils/SolidityTypeFormatter') +var yo = require('yo-yo') + +function SolidityState () { + this.basicPanel = new DropdownPanel('Solidity State', { + json: true, + // TODO: used by TreeView ui + formatSelf: solidityTypeFormatter.formatSelf, + extractData: solidityTypeFormatter.extractData + }) + this.view +} + +SolidityState.prototype.update = function (data) { + this.basicPanel.update(data) +} + +SolidityState.prototype.setMessage = function (message) { + this.basicPanel.setMessage(message) +} + +SolidityState.prototype.setUpdating = function () { + this.basicPanel.setUpdating() +} + +SolidityState.prototype.render = function () { + if (this.view) return + this.view = yo`
+ ${this.basicPanel.render()} +
` + return this.view +} + +module.exports = SolidityState diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/StackPanel.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/StackPanel.js new file mode 100644 index 0000000000..a29cdb7661 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/StackPanel.js @@ -0,0 +1,17 @@ +'use strict' +var DropdownPanel = require('./DropdownPanel') +var yo = require('yo-yo') + +function StackPanel () { + this.basicPanel = new DropdownPanel('Stack', {json: true, displayContentOnly: false}) +} + +StackPanel.prototype.update = function (calldata) { + this.basicPanel.update(calldata) +} + +StackPanel.prototype.render = function () { + return yo`
${this.basicPanel.render()}
` +} + +module.exports = StackPanel diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/StepDetail.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/StepDetail.js new file mode 100644 index 0000000000..0bcc30395b --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/StepDetail.js @@ -0,0 +1,23 @@ +var yo = require('yo-yo') +var DropdownPanel = require('./DropdownPanel') + +function StepDetail () { + this.basicPanel = new DropdownPanel('Step detail', {json: true, displayContentOnly: true}) + this.detail = { 'vm trace step': '-', 'execution step': '-', 'add memory': '', 'gas': '', 'remaining gas': '-', 'loaded address': '-' } +} + +StepDetail.prototype.reset = function () { + this.detail = { 'vm trace step': '-', 'execution step': '-', 'add memory': '', 'gas': '', 'remaining gas': '-', 'loaded address': '-' } + this.basicPanel.update(this.detail) +} + +StepDetail.prototype.updateField = function (key, value) { + this.detail[key] = value + this.basicPanel.update(this.detail) +} + +StepDetail.prototype.render = function () { + return yo`
${this.basicPanel.render()}
` +} + +module.exports = StepDetail diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/StoragePanel.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/StoragePanel.js new file mode 100644 index 0000000000..c48ce2da01 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/StoragePanel.js @@ -0,0 +1,17 @@ +'use strict' +var DropdownPanel = require('./DropdownPanel') +var yo = require('yo-yo') + +function StoragePanel (_parent, _traceManager) { + this.basicPanel = new DropdownPanel('Storage', {json: true}) +} + +StoragePanel.prototype.update = function (storage, header) { + this.basicPanel.update(storage, header) +} + +StoragePanel.prototype.render = function () { + return yo`
${this.basicPanel.render()}
` +} + +module.exports = StoragePanel diff --git a/src/app/tabs/debugger/debuggerUI/vmDebugger/utils/SolidityTypeFormatter.js b/src/app/tabs/debugger/debuggerUI/vmDebugger/utils/SolidityTypeFormatter.js new file mode 100644 index 0000000000..249ca56e48 --- /dev/null +++ b/src/app/tabs/debugger/debuggerUI/vmDebugger/utils/SolidityTypeFormatter.js @@ -0,0 +1,75 @@ +var yo = require('yo-yo') +var BN = require('ethereumjs-util').BN + +module.exports = { + formatSelf: formatSelf, + extractData: extractData +} + +function formatSelf (key, data) { + const style = fontColor(data) + const keyStyle = data.isProperty ? 'color: var(--info)' : '' + if (data.type === 'string') { + data.self = JSON.stringify(data.self) + } + return yo `` +} + +function extractData (item, parent, key) { + var ret = {} + if (item.isProperty) { + return item + } + if (item.type.lastIndexOf(']') === item.type.length - 1) { + ret.children = (item.value || []).map(function (item, index) { + return {key: index, value: item} + }) + ret.children.unshift({ + key: 'length', + value: { + self: (new BN(item.length.replace('0x', ''), 16)).toString(10), + type: 'uint', + isProperty: true + } + }) + ret.isArray = true + ret.self = parent.isArray ? '' : item.type + } else if (item.type.indexOf('struct') === 0) { + ret.children = Object.keys((item.value || {})).map(function (key) { + return {key: key, value: item.value[key]} + }) + ret.self = item.type + ret.isStruct = true + } else if (item.type.indexOf('mapping') === 0) { + ret.children = Object.keys((item.value || {})).map(function (key) { + return {key: key, value: item.value[key]} + }) + ret.isMapping = true + ret.self = item.type + } else { + ret.children = null + ret.self = item.value + ret.type = item.type + } + return ret +} + +function fontColor (data) { + let color = 'var(--primary)' + if (data.isArray || data.isStruct || data.isMapping) { + color = 'var(--info)' + } else if ( + data.type.indexOf('uint') === 0 || + data.type.indexOf('int') === 0 || + data.type.indexOf('bool') === 0 || + data.type.indexOf('enum') === 0 + ) { + color = 'var(--green)' + } else if (data.type === 'string') { + color = 'var(--teal)' + } else if (data.self == 0x0) { // eslint-disable-line + color = 'var(--gray)' + } + return 'color:' + color +} + diff --git a/src/app/tabs/network-module.js b/src/app/tabs/network-module.js new file mode 100644 index 0000000000..2174040135 --- /dev/null +++ b/src/app/tabs/network-module.js @@ -0,0 +1,70 @@ +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +export const profile = { + name: 'network', + description: 'Manage the network (mainnet, ropsten, goerli...) and the provider (web3, vm, injected)', + methods: ['getNetworkProvider', 'getEndpoint', 'detectNetwork', 'addNetwork', 'removeNetwork'], + version: packageJson.version, + kind: 'network' +} + +// Network API has : +// - events: ['providerChanged'] +// - methods: ['getNetworkProvider', 'getEndpoint', 'detectNetwork', 'addNetwork', 'removeNetwork'] + +export class NetworkModule extends Plugin { + constructor (blockchain) { + super(profile) + this.blockchain = blockchain + // TODO: See with remix-lib to make sementic coherent + this.blockchain.event.register('contextChanged', (provider) => { + this.emit('providerChanged', provider) + }) + /* + // Events that could be implemented later + executionContext.event.register('removeProvider', (provider) => { + this.events.emit('networkRemoved', provider) + }) + executionContext.event.register('addProvider', (provider) => { + this.events.emit('networkAdded', provider) + }) + executionContext.event.register('web3EndpointChanged', (provider) => { + this.events.emit('web3EndpointChanged', provider) + }) + */ + } + + /** Return the current network provider (web3, vm, injected) */ + getNetworkProvider () { + return this.blockchain.getProvider() + } + + /** Return the current network */ + detectNetwork () { + return new Promise((resolve, reject) => { + this.blockchain.detectNetwork((error, network) => { + error ? reject(error) : resolve(network) + }) + }) + } + + /** Return the url only if network provider is 'web3' */ + getEndpoint () { + const provider = this.blockchain.getProvider() + if (provider !== 'web3') { + throw new Error('no endpoint: current provider is either injected or vm') + } + return this.blockchain.web3().currentProvider.host + } + + /** Add a custom network to the list of available networks */ + addNetwork (customNetwork) { + this.blockchain.addProvider(customNetwork) + } + + /** Remove a network to the list of availble networks */ + removeNetwork (name) { + this.blockchain.removeProvider(name) + } +} diff --git a/src/app/tabs/plugin-tab.js b/src/app/tabs/plugin-tab.js new file mode 100644 index 0000000000..a92f92939f --- /dev/null +++ b/src/app/tabs/plugin-tab.js @@ -0,0 +1,24 @@ +var yo = require('yo-yo') +var css = require('./styles/plugin-tab-styles') + +class PluginTab { + + constructor (json) { + this.el = null + this.data = { json } + } + + render () { + if (this.el) return this.el + + this.el = yo` +
+ +
` + + return this.el + } + +} + +module.exports = PluginTab diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js new file mode 100644 index 0000000000..5135854478 --- /dev/null +++ b/src/app/tabs/runTab/contractDropdown.js @@ -0,0 +1,333 @@ +var yo = require('yo-yo') +var css = require('../styles/run-tab-styles') +var modalDialogCustom = require('../../ui/modal-dialog-custom') +var remixLib = require('remix-lib') +var EventManager = remixLib.EventManager +var confirmDialog = require('../../ui/confirmDialog') +var modalDialog = require('../../ui/modaldialog') +var MultiParamManager = require('../../ui/multiParamManager') + +import publishToStorage from '../../../publishToStorage' + +class ContractDropdownUI { + constructor (blockchain, dropdownLogic, logCallback, runView) { + this.blockchain = blockchain + this.dropdownLogic = dropdownLogic + this.logCallback = logCallback + this.runView = runView + this.event = new EventManager() + + this.listenToEvents() + this.ipfsCheckedState = false + this.exEnvironment = blockchain.getProvider() + this.listenToContextChange() + } + + listenToEvents () { + this.dropdownLogic.event.register('newlyCompiled', (success, data, source, compiler, compilerFullName, file) => { + if (!document.querySelector(`.${css.contractNames.classNames[0]}`)) return + var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) + contractNames.innerHTML = '' + if (success) { + this.selectContractNames.removeAttribute('disabled') + this.dropdownLogic.getCompiledContracts(compiler, compilerFullName).forEach((contract) => { + contractNames.appendChild(yo``) + }) + } else { + this.selectContractNames.setAttribute('disabled', true) + } + this.setInputParamsPlaceHolder() + + if (success) { + this.compFails.style.display = 'none' + } else { + this.compFails.style.display = 'block' + } + }) + } + + listenToContextChange () { + this.blockchain.event.register('contextChanged', () => { + this.blockchain.updateNetwork((err, {name} = {}) => { + if (err) { + console.log(`can't detect network`) + return + } + this.exEnvironment = this.blockchain.getProvider() + this.networkName = name + + const savedConfig = window.localStorage.getItem(`ipfs/${this.exEnvironment}/${this.networkName}`) + + // check if an already selected option exist else use default workflow + if (savedConfig !== null) { + this.setCheckedState(savedConfig) + } else { + this.setCheckedState(this.networkName === 'Main') + } + }) + }) + } + + setCheckedState (value) { + value = value === 'true' ? true : value === 'false' ? false : value + this.ipfsCheckedState = value + if (this.ipfsCheckbox) this.ipfsCheckbox.checked = value + } + + toggleCheckedState () { + if (this.exEnvironment === 'vm') this.networkName = 'VM' + this.ipfsCheckedState = !this.ipfsCheckedState + window.localStorage.setItem(`ipfs/${this.exEnvironment}/${this.networkName}`, this.ipfsCheckedState) + } + + render () { + this.compFails = yo`` + var info = yo`` + this.atAddress = yo`` + this.atAddressButtonInput = yo`` + this.selectContractNames = yo`` + + if (this.exEnvironment === 'vm') this.networkName = 'VM' + + const savedConfig = window.localStorage.getItem(`ipfs/${this.exEnvironment}/${this.networkName}`) + this.ipfsCheckedState = savedConfig === 'true' ? true : false // eslint-disable-line + + this.ipfsCheckbox = this.ipfsCheckedState === true + ? yo`` + : yo`` + + this.deployCheckBox = yo` +
+ ${this.ipfsCheckbox} + +
+ ` + this.createPanel = yo`
` + this.orLabel = yo`
or
` + + let el = yo` +
+ +
+ ${this.selectContractNames} ${this.compFails} ${info} +
+
+ ${this.createPanel} + ${this.orLabel} +
+ ${this.atAddress} + ${this.atAddressButtonInput} +
+
+
+ ` + this.selectContractNames.addEventListener('change', this.setInputParamsPlaceHolder.bind(this)) + this.setInputParamsPlaceHolder() + if (!this.el) { + this.el = el + } + return el + } + + atAddressChanged (event) { + if (!this.atAddressButtonInput.value) { + this.atAddress.setAttribute('disabled', 'true') + } else { + this.atAddress.removeAttribute('disabled') + } + } + + changeCurrentFile (currentFile) { + if (!document.querySelector(`.${css.contractNames}`)) return + var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) + if (/.(.abi)$/.exec(currentFile)) { + this.createPanel.style.display = 'none' + this.orLabel.style.display = 'none' + this.compFails.style.display = 'none' + contractNames.appendChild(yo``) + this.selectContractNames.setAttribute('disabled', true) + } else if (/.(.sol)$/.exec(currentFile)) { + this.createPanel.style.display = 'block' + this.orLabel.style.display = 'block' + } + } + + setInputParamsPlaceHolder () { + this.createPanel.innerHTML = '' + if (this.selectContractNames.selectedIndex < 0 || this.selectContractNames.children.length <= 0) { + this.createPanel.innerHTML = 'No compiled contracts' + return + } + + const selectedContract = this.getSelectedContract() + const clickCallback = async (valArray, inputsValues) => { + var selectedContract = this.getSelectedContract() + this.createInstance(selectedContract, inputsValues) + } + const createConstructorInstance = new MultiParamManager( + 0, + selectedContract.getConstructorInterface(), + clickCallback, + selectedContract.getConstructorInputs(), + 'Deploy', + selectedContract.bytecodeObject, + true + ) + this.createPanel.appendChild(createConstructorInstance.render()) + this.createPanel.appendChild(this.deployCheckBox) + } + + getSelectedContract () { + var contract = this.selectContractNames.children[this.selectContractNames.selectedIndex] + var contractName = contract.getAttribute('value') + var compilerAtributeName = contract.getAttribute('compiler') + + return this.dropdownLogic.getSelectedContract(contractName, compilerAtributeName) + } + + async createInstance (selectedContract, args) { + if (selectedContract.bytecodeObject.length === 0) { + return modalDialogCustom.alert('This contract may be abstract, not implement an abstract parent\'s methods completely or not invoke an inherited contract\'s constructor correctly.') + } + + var continueCb = (error, continueTxExecution, cancelCb) => { + if (error) { + var msg = typeof error !== 'string' ? error.message : error + modalDialog('Gas estimation failed', yo`
Gas estimation errored with the following message (see below). + The transaction execution will likely fail. Do you want to force sending?
+ ${msg} +
`, + { + label: 'Send Transaction', + fn: () => { + continueTxExecution() + }}, { + label: 'Cancel Transaction', + fn: () => { + cancelCb() + } + }) + } else { + continueTxExecution() + } + } + + var promptCb = (okCb, cancelCb) => { + modalDialogCustom.promptPassphrase('Passphrase requested', 'Personal mode is enabled. Please provide passphrase of account', '', okCb, cancelCb) + } + + var statusCb = (msg) => { + return this.logCallback(msg) + } + + var finalCb = (error, contractObject, address) => { + this.event.trigger('clearInstance') + + if (error) { + return this.logCallback(error) + } + + this.event.trigger('newContractInstanceAdded', [contractObject, address, contractObject.name]) + if (this.ipfsCheckedState) { + publishToStorage('ipfs', this.runView.fileProvider, this.runView.fileManager, selectedContract) + } + } + + let contractMetadata + try { + contractMetadata = await this.runView.call('compilerMetadata', 'deployMetadataOf', selectedContract.name) + } catch (error) { + return statusCb(`creation of ${selectedContract.name} errored: ` + error) + } + + const compilerContracts = this.dropdownLogic.getCompilerContracts() + const confirmationCb = this.getConfirmationCb(modalDialog, confirmDialog) + + if (selectedContract.isOverSizeLimit()) { + return modalDialog('Contract code size over limit', yo`
Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails.
+ More info: eip-170 +
`, + { + label: 'Force Send', + fn: () => { + this.deployContract(selectedContract, args, contractMetadata, compilerContracts, {continueCb, promptCb, statusCb, finalCb}, confirmationCb) + }}, { + label: 'Cancel', + fn: () => { + this.logCallback(`creation of ${selectedContract.name} canceled by user.`) + } + }) + } + this.deployContract(selectedContract, args, contractMetadata, compilerContracts, {continueCb, promptCb, statusCb, finalCb}, confirmationCb) + } + + deployContract (selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) { + const { statusCb } = callbacks + if (!contractMetadata || (contractMetadata && contractMetadata.autoDeployLib)) { + return this.blockchain.deployContractAndLibraries(selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) + } + if (Object.keys(selectedContract.bytecodeLinkReferences).length) statusCb(`linking ${JSON.stringify(selectedContract.bytecodeLinkReferences, null, '\t')} using ${JSON.stringify(contractMetadata.linkReferences, null, '\t')}`) + this.blockchain.deployContractWithLibrary(selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) + } + + getConfirmationCb (modalDialog, confirmDialog) { + // this code is the same as in recorder.js. TODO need to be refactored out + const confirmationCb = (network, tx, gasEstimation, continueTxExecution, cancelCb) => { + if (network.name !== 'Main') { + return continueTxExecution(null) + } + const amount = this.blockchain.fromWei(tx.value, true, 'ether') + const content = confirmDialog(tx, amount, gasEstimation, null, this.blockchain.determineGasFees(tx), this.blockchain.determineGasPrice.bind(this.blockchain)) + + modalDialog('Confirm transaction', content, + { label: 'Confirm', + fn: () => { + this.blockchain.config.setUnpersistedProperty('doNotShowTransactionConfirmationAgain', content.querySelector('input#confirmsetting').checked) + // TODO: check if this is check is still valid given the refactor + if (!content.gasPriceStatus) { + cancelCb('Given gas price is not correct') + } else { + var gasPrice = this.blockchain.toWei(content.querySelector('#gasprice').value, 'gwei') + continueTxExecution(gasPrice) + } + }}, { + label: 'Cancel', + fn: () => { + return cancelCb('Transaction canceled by user.') + } + } + ) + } + + return confirmationCb + } + + loadFromAddress () { + this.event.trigger('clearInstance') + + var address = this.atAddressButtonInput.value + this.dropdownLogic.loadContractFromAddress(address, + (cb) => { + modalDialogCustom.confirm(null, 'Do you really want to interact with ' + address + ' using the current ABI definition?', cb) + }, + (error, loadType, abi) => { + if (error) { + return modalDialogCustom.alert(error) + } + if (loadType === 'abi') { + return this.event.trigger('newContractABIAdded', [abi, address]) + } + var selectedContract = this.getSelectedContract() + this.event.trigger('newContractInstanceAdded', [selectedContract.object, address, this.selectContractNames.value]) + } + ) + } +} + +module.exports = ContractDropdownUI diff --git a/src/app/tabs/runTab/model/dropdownlogic.js b/src/app/tabs/runTab/model/dropdownlogic.js new file mode 100644 index 0000000000..c2dc932aa1 --- /dev/null +++ b/src/app/tabs/runTab/model/dropdownlogic.js @@ -0,0 +1,107 @@ +var ethJSUtil = require('ethereumjs-util') +var remixLib = require('remix-lib') +var txHelper = remixLib.execution.txHelper +var CompilerAbstract = require('../../../compiler/compiler-abstract') +var EventManager = remixLib.EventManager + +class DropdownLogic { + constructor (compilersArtefacts, config, editor, runView) { + this.compilersArtefacts = compilersArtefacts + this.config = config + this.editor = editor + this.runView = runView + + this.event = new EventManager() + + this.listenToCompilationEvents() + } + + // TODO: can be moved up; the event in contractDropdown will have to refactored a method instead + listenToCompilationEvents () { + let broadcastCompilationResult = (file, source, languageVersion, data) => { + // TODO check whether the tab is configured + let compiler = new CompilerAbstract(languageVersion, data, source) + this.compilersArtefacts[languageVersion] = compiler + this.compilersArtefacts['__last'] = compiler + this.event.trigger('newlyCompiled', [true, data, source, compiler, languageVersion, file]) + } + this.runView.on('solidity', 'compilationFinished', (file, source, languageVersion, data) => + broadcastCompilationResult(file, source, languageVersion, data) + ) + this.runView.on('vyper', 'compilationFinished', (file, source, languageVersion, data) => + broadcastCompilationResult(file, source, languageVersion, data) + ) + this.runView.on('lexon', 'compilationFinished', (file, source, languageVersion, data) => + broadcastCompilationResult(file, source, languageVersion, data) + ) + } + + loadContractFromAddress (address, confirmCb, cb) { + if (!ethJSUtil.isValidAddress(address)) { + return cb('Invalid address.') + } + if (/[a-f]/.test(address) && /[A-F]/.test(address) && !ethJSUtil.isValidChecksumAddress(address)) { + return cb('Invalid checksum address.') + } + if (/.(.abi)$/.exec(this.config.get('currentFile'))) { + confirmCb(() => { + var abi + try { + abi = JSON.parse(this.editor.currentContent()) + } catch (e) { + return cb('Failed to parse the current file as JSON ABI.') + } + cb(null, 'abi', abi) + }) + } else { + cb(null, 'instance') + } + } + + getCompiledContracts (compiler, compilerFullName) { + var contracts = [] + compiler.visitContracts((contract) => { + contracts.push(contract) + }) + return contracts + } + + getSelectedContract (contractName, compilerAtributeName) { + if (!contractName) return null + + var compiler = this.compilersArtefacts[compilerAtributeName] + if (!compiler) return null + + var contract = compiler.getContract(contractName) + + return { + name: contractName, + contract: contract, + compiler: compiler, + abi: contract.object.abi, + bytecodeObject: contract.object.evm.bytecode.object, + bytecodeLinkReferences: contract.object.evm.bytecode.linkReferences, + object: contract.object, + deployedBytecode: contract.object.evm.deployedBytecode, + getConstructorInterface: () => { + return txHelper.getConstructorInterface(contract.object.abi) + }, + getConstructorInputs: () => { + var constructorInteface = txHelper.getConstructorInterface(contract.object.abi) + return txHelper.inputParametersDeclarationToString(constructorInteface.inputs) + }, + isOverSizeLimit: () => { + var deployedBytecode = contract.object.evm.deployedBytecode + return (deployedBytecode && deployedBytecode.object.length / 2 > 24576) + }, + metadata: contract.object.metadata + } + } + + getCompilerContracts () { + return this.compilersArtefacts['__last'].getData().contracts + } + +} + +module.exports = DropdownLogic diff --git a/src/app/tabs/runTab/model/recorder.js b/src/app/tabs/runTab/model/recorder.js new file mode 100644 index 0000000000..1308483adc --- /dev/null +++ b/src/app/tabs/runTab/model/recorder.js @@ -0,0 +1,329 @@ +var async = require('async') +var ethutil = require('ethereumjs-util') +var remixLib = require('remix-lib') +var EventManager = remixLib.EventManager +var format = remixLib.execution.txFormat +var txHelper = remixLib.execution.txHelper +var helper = require('../../../../lib/helper.js') + +/** + * Record transaction as long as the user create them. + * + * + */ +class Recorder { + constructor (blockchain, fileManager, config) { + var self = this + self.event = new EventManager() + self.blockchain = blockchain + self.data = { _listen: true, _replay: false, journal: [], _createdContracts: {}, _createdContractsReverse: {}, _usedAccounts: {}, _abis: {}, _contractABIReferences: {}, _linkReferences: {} } + this.fileManager = fileManager + this.config = config + + this.blockchain.event.register('initiatingTransaction', (timestamp, tx, payLoad) => { + if (tx.useCall) return + var { from, to, value } = tx + + // convert to and from to tokens + if (this.data._listen) { + var record = { value, parameters: payLoad.funArgs } + if (!to) { + var abi = payLoad.contractABI + var keccak = ethutil.bufferToHex(ethutil.keccak(abi)) + record.abi = keccak + record.contractName = payLoad.contractName + record.bytecode = payLoad.contractBytecode + record.linkReferences = payLoad.linkReferences + if (record.linkReferences && Object.keys(record.linkReferences).length) { + for (var file in record.linkReferences) { + for (var lib in record.linkReferences[file]) { + self.data._linkReferences[lib] = '
' + } + } + } + self.data._abis[keccak] = abi + + this.data._contractABIReferences[timestamp] = keccak + } else { + var creationTimestamp = this.data._createdContracts[to] + record.to = `created{${creationTimestamp}}` + record.abi = this.data._contractABIReferences[creationTimestamp] + } + record.name = payLoad.funAbi.name + record.inputs = txHelper.serializeInputs(payLoad.funAbi) + record.type = payLoad.funAbi.type + for (var p in record.parameters) { + var thisarg = record.parameters[p] + var thistimestamp = this.data._createdContracts[thisarg] + if (thistimestamp) record.parameters[p] = `created{${thistimestamp}}` + } + + this.blockchain.getAccounts((error, accounts) => { + if (error) return console.log(error) + record.from = `account{${accounts.indexOf(from)}}` + self.data._usedAccounts[record.from] = from + self.append(timestamp, record) + }) + } + }) + + this.blockchain.event.register('transactionExecuted', (error, from, to, data, call, txResult, timestamp, _payload, rawAddress) => { + if (error) return console.log(error) + if (call) return + + if (!rawAddress) return // not a contract creation + const stringAddress = this.addressToString(rawAddress) + const address = ethutil.toChecksumAddress(stringAddress) + // save back created addresses for the convertion from tokens to real adresses + this.data._createdContracts[address] = timestamp + this.data._createdContractsReverse[timestamp] = address + }) + this.blockchain.event.register('contextChanged', this.clearAll.bind(this)) + this.event.register('newTxRecorded', (count) => { + this.event.trigger('recorderCountChange', [count]) + }) + this.event.register('cleared', () => { + this.event.trigger('recorderCountChange', [0]) + }) + } + + /** + * stop/start saving txs. If not listenning, is basically in replay mode + * + * @param {Bool} listen + */ + setListen (listen) { + this.data._listen = listen + this.data._replay = !listen + } + + extractTimestamp (value) { + var stamp = /created{(.*)}/g.exec(value) + if (stamp) { + return stamp[1] + } + return null + } + + /** + * convert back from/to from tokens to real addresses + * + * @param {Object} record + * @param {Object} accounts + * @param {Object} options + * + */ + resolveAddress (record, accounts, options) { + if (record.to) { + var stamp = this.extractTimestamp(record.to) + if (stamp) { + record.to = this.data._createdContractsReverse[stamp] + } + } + record.from = accounts[record.from] + // @TODO: writing browser test + return record + } + + /** + * save the given @arg record + * + * @param {Number/String} timestamp + * @param {Object} record + * + */ + append (timestamp, record) { + var self = this + self.data.journal.push({ timestamp, record }) + self.event.trigger('newTxRecorded', [self.data.journal.length]) + } + + /** + * basically return the records + associate values (like abis / accounts) + * + */ + getAll () { + var self = this + var records = [].concat(self.data.journal) + return { + accounts: self.data._usedAccounts, + linkReferences: self.data._linkReferences, + transactions: records.sort((A, B) => { + var stampA = A.timestamp + var stampB = B.timestamp + return stampA - stampB + }), + abis: self.data._abis + } + } + + /** + * delete the seen transactions + * + */ + clearAll () { + var self = this + self.data._listen = true + self.data._replay = false + self.data.journal = [] + self.data._createdContracts = {} + self.data._createdContractsReverse = {} + self.data._usedAccounts = {} + self.data._abis = {} + self.data._contractABIReferences = {} + self.data._linkReferences = {} + self.event.trigger('cleared', []) + } + + /** + * run the list of records + * + * @param {Object} accounts + * @param {Object} options + * @param {Object} abis + * @param {Function} newContractFn + * + */ + run (records, accounts, options, abis, linkReferences, confirmationCb, continueCb, promptCb, alertCb, logCallBack, newContractFn) { + var self = this + self.setListen(false) + logCallBack(`Running ${records.length} transaction(s) ...`) + async.eachOfSeries(records, function (tx, index, cb) { + var record = self.resolveAddress(tx.record, accounts, options) + var abi = abis[tx.record.abi] + if (!abi) { + return alertCb('cannot find ABI for ' + tx.record.abi + '. Execution stopped at ' + index) + } + /* Resolve Library */ + if (record.linkReferences && Object.keys(record.linkReferences).length) { + for (var k in linkReferences) { + var link = linkReferences[k] + var timestamp = self.extractTimestamp(link) + if (timestamp && self.data._createdContractsReverse[timestamp]) { + link = self.data._createdContractsReverse[timestamp] + } + tx.record.bytecode = format.linkLibraryStandardFromlinkReferences(k, link.replace('0x', ''), tx.record.bytecode, tx.record.linkReferences) + } + } + /* Encode params */ + var fnABI + if (tx.record.type === 'constructor') { + fnABI = txHelper.getConstructorInterface(abi) + } else if (tx.record.type === 'fallback') { + fnABI = txHelper.getFallbackInterface(abi) + } else if (tx.record.type === 'receive') { + fnABI = txHelper.getReceiveInterface(abi) + } else { + fnABI = txHelper.getFunction(abi, record.name + record.inputs) + } + if (!fnABI) { + alertCb('cannot resolve abi of ' + JSON.stringify(record, null, '\t') + '. Execution stopped at ' + index) + return cb('cannot resolve abi') + } + if (tx.record.parameters) { + /* check if we have some params to resolve */ + try { + tx.record.parameters.forEach((value, index) => { + var isString = true + if (typeof value !== 'string') { + isString = false + value = JSON.stringify(value) + } + for (var timestamp in self.data._createdContractsReverse) { + value = value.replace(new RegExp('created\\{' + timestamp + '\\}', 'g'), self.data._createdContractsReverse[timestamp]) + } + if (!isString) value = JSON.parse(value) + tx.record.parameters[index] = value + }) + } catch (e) { + return alertCb('cannot resolve input parameters ' + JSON.stringify(tx.record.parameters) + '. Execution stopped at ' + index) + } + } + var data = format.encodeData(fnABI, tx.record.parameters, tx.record.bytecode) + if (data.error) { + alertCb(data.error + '. Record:' + JSON.stringify(record, null, '\t') + '. Execution stopped at ' + index) + return cb(data.error) + } + logCallBack(`(${index}) ${JSON.stringify(record, null, '\t')}`) + logCallBack(`(${index}) data: ${data.data}`) + record.data = { dataHex: data.data, funArgs: tx.record.parameters, funAbi: fnABI, contractBytecode: tx.record.bytecode, contractName: tx.record.contractName, timestamp: tx.timestamp } + + self.blockchain.runTx(record, confirmationCb, continueCb, promptCb, + function (err, txResult, rawAddress) { + if (err) { + console.error(err) + return logCallBack(err + '. Execution failed at ' + index) + } + if (rawAddress) { + const stringAddress = self.addressToString(rawAddress) + const address = ethutil.toChecksumAddress(stringAddress) + // save back created addresses for the convertion from tokens to real adresses + self.data._createdContracts[address] = tx.timestamp + self.data._createdContractsReverse[tx.timestamp] = address + newContractFn(abi, address, record.contractName) + } + cb(err) + } + ) + }, () => { self.setListen(true); self.clearAll() }) + } + + addressToString (address) { + if (!address) return null + if (typeof address !== 'string') { + address = address.toString('hex') + } + if (address.indexOf('0x') === -1) { + address = '0x' + address + } + return address + } + + runScenario (continueCb, promptCb, alertCb, confirmationCb, logCallBack, cb) { + var currentFile = this.config.get('currentFile') + this.fileManager.fileProviderOf(currentFile).get(currentFile, (error, json) => { + if (error) { + return cb('Invalid Scenario File ' + error) + } + if (!currentFile.match('.json$')) { + return cb('A scenario file is required. Please make sure a scenario file is currently displayed in the editor. The file must be of type JSON. Use the "Save Transactions" Button to generate a new Scenario File.') + } + try { + var obj = JSON.parse(json) + var txArray = obj.transactions || [] + var accounts = obj.accounts || [] + var options = obj.options || {} + var abis = obj.abis || {} + var linkReferences = obj.linkReferences || {} + } catch (e) { + return cb('Invalid Scenario File, please try again') + } + + if (!txArray.length) { + return + } + + this.run(txArray, accounts, options, abis, linkReferences, confirmationCb, continueCb, promptCb, alertCb, logCallBack, (abi, address, contractName) => { + cb(null, abi, address, contractName) + }) + }) + } + + saveScenario (promptCb, cb) { + var txJSON = JSON.stringify(this.getAll(), null, 2) + var path = this.fileManager.currentPath() + promptCb(path, input => { + var fileProvider = this.fileManager.fileProviderOf(path) + if (!fileProvider) return + var newFile = path + '/' + input + helper.createNonClashingName(newFile, fileProvider, (error, newFile) => { + if (error) return cb('Failed to create file. ' + newFile + ' ' + error) + if (!fileProvider.set(newFile, txJSON)) return cb('Failed to create file ' + newFile) + this.fileManager.open(newFile) + }) + }) + } + +} + +module.exports = Recorder diff --git a/src/app/tabs/runTab/recorder.js b/src/app/tabs/runTab/recorder.js new file mode 100644 index 0000000000..ba7da014e3 --- /dev/null +++ b/src/app/tabs/runTab/recorder.js @@ -0,0 +1,125 @@ +var yo = require('yo-yo') +var remixLib = require('remix-lib') +var EventManager = remixLib.EventManager +var csjs = require('csjs-inject') +var css = require('../styles/run-tab-styles') + +var modalDialogCustom = require('../../ui/modal-dialog-custom') +var modalDialog = require('../../ui/modaldialog') +var confirmDialog = require('../../ui/confirmDialog') + +class RecorderUI { + + constructor (blockchain, recorder, logCallBack, config) { + this.blockchain = blockchain + this.recorder = recorder + this.logCallBack = logCallBack + this.config = config + this.event = new EventManager() + } + + render () { + var css2 = csjs` + .container {} + .runTxs {} + .recorder {} + ` + + this.runButton = yo`` + this.recordButton = yo` + ` + + this.runButton.onclick = this.runScenario.bind(this) + } + + runScenario () { + var continueCb = (error, continueTxExecution, cancelCb) => { + if (error) { + var msg = typeof error !== 'string' ? error.message : error + modalDialog('Gas estimation failed', yo`
Gas estimation errored with the following message (see below). + The transaction execution will likely fail. Do you want to force sending?
+ ${msg} +
`, + { + label: 'Send Transaction', + fn: () => { + continueTxExecution() + }}, { + label: 'Cancel Transaction', + fn: () => { + cancelCb() + } + }) + } else { + continueTxExecution() + } + } + + var promptCb = (okCb, cancelCb) => { + modalDialogCustom.promptPassphrase('Passphrase requested', 'Personal mode is enabled. Please provide passphrase of account', '', okCb, cancelCb) + } + + var alertCb = (msg) => { + modalDialogCustom.alert(msg) + } + + const confirmationCb = this.getConfirmationCb(modalDialog, confirmDialog) + + // TODO: there is still a UI dependency to remove here, it's still too coupled at this point to remove easily + this.recorder.runScenario(continueCb, promptCb, alertCb, confirmationCb, this.logCallBack, (error, abi, address, contractName) => { + if (error) { + return modalDialogCustom.alert(error) + } + + this.event.trigger('newScenario', [abi, address, contractName]) + }) + } + + getConfirmationCb (modalDialog, confirmDialog) { + // this code is the same as in contractDropdown.js. TODO need to be refactored out + const confirmationCb = (network, tx, gasEstimation, continueTxExecution, cancelCb) => { + if (network.name !== 'Main') { + return continueTxExecution(null) + } + const amount = this.blockchain.fromWei(tx.value, true, 'ether') + const content = confirmDialog(tx, amount, gasEstimation, null, this.blockchain.determineGasFees(tx), this.blockchain.determineGasPrice.bind(this.blockchain)) + + modalDialog('Confirm transaction', content, + { label: 'Confirm', + fn: () => { + this.config.setUnpersistedProperty('doNotShowTransactionConfirmationAgain', content.querySelector('input#confirmsetting').checked) + // TODO: check if this is check is still valid given the refactor + if (!content.gasPriceStatus) { + cancelCb('Given gas price is not correct') + } else { + var gasPrice = this.blockchain.toWei(content.querySelector('#gasprice').value, 'gwei') + continueTxExecution(gasPrice) + } + }}, { + label: 'Cancel', + fn: () => { + return cancelCb('Transaction canceled by user.') + } + } + ) + } + + return confirmationCb + } + + triggerRecordButton () { + this.recorder.saveScenario( + (path, cb) => { + modalDialogCustom.prompt('Save transactions as scenario', 'Transactions will be saved in a file under ' + path, 'scenario.json', cb) + }, + (error) => { + if (error) return modalDialogCustom.alert(error) + } + ) + } + +} + +module.exports = RecorderUI diff --git a/src/app/tabs/runTab/settings.js b/src/app/tabs/runTab/settings.js new file mode 100644 index 0000000000..30333f8755 --- /dev/null +++ b/src/app/tabs/runTab/settings.js @@ -0,0 +1,366 @@ +const $ = require('jquery') +const yo = require('yo-yo') +const remixLib = require('remix-lib') +const EventManager = remixLib.EventManager +const css = require('../styles/run-tab-styles') +const copyToClipboard = require('../../ui/copy-to-clipboard') +const modalDialogCustom = require('../../ui/modal-dialog-custom') +const addTooltip = require('../../ui/tooltip') +const helper = require('../../../lib/helper.js') +const globalRegistry = require('../../../global/registry') + +class SettingsUI { + + constructor (blockchain, networkModule) { + this.blockchain = blockchain + this.event = new EventManager() + this._components = {} + + this.blockchain.event.register('transactionExecuted', (error, from, to, data, lookupOnly, txResult) => { + if (error) return + if (!lookupOnly) this.el.querySelector('#value').value = '0' + this.updateAccountBalances() + }) + this._components = { + registry: globalRegistry, + networkModule: networkModule + } + this._components.registry = globalRegistry + this._deps = { + config: this._components.registry.get('config').api + } + + this._deps.config.events.on('settings/personal-mode_changed', this.onPersonalChange.bind(this)) + + setInterval(() => { + this.updateAccountBalances() + }, 10 * 1000) + + this.accountListCallId = 0 + this.loadedAccounts = {} + } + + updateAccountBalances () { + if (!this.el) return + var accounts = $(this.el.querySelector('#txorigin')).children('option') + accounts.each((index, account) => { + this.blockchain.getBalanceInEther(account.value, (err, balance) => { + if (err) return + account.innerText = helper.shortenAddress(account.value, balance) + }) + }) + } + + render () { + this.netUI = yo`` + + var environmentEl = yo` +
+ +
+ + +
+
+ ` + const networkEl = yo` +
+
+
+
+ ${this.netUI} +
+
+ ` + const accountEl = yo` +
+ +
+ +
${copyToClipboard(() => document.querySelector('#runTabView #txorigin').value)}
+ +
+
+ ` + + const gasPriceEl = yo` +
+ + +
+ ` + + const valueEl = yo` +
+ +
+ + +
+
+ ` + + const el = yo` +
+ ${environmentEl} + ${networkEl} + ${accountEl} + ${gasPriceEl} + ${valueEl} +
+ ` + + var selectExEnv = environmentEl.querySelector('#selectExEnvOptions') + this.setDropdown(selectExEnv) + + this.blockchain.event.register('contextChanged', (context, silent) => { + this.setFinalContext() + }) + + setInterval(() => { + this.updateNetwork() + }, 5000) + + this.el = el + + this.fillAccountsList() + return el + } + + setDropdown (selectExEnv) { + this.selectExEnv = selectExEnv + + this.blockchain.event.register('addProvider', (network) => { + selectExEnv.appendChild(yo``) + addTooltip(`${network.name} [${network.url}] added`) + }) + + this.blockchain.event.register('removeProvider', (name) => { + var env = selectExEnv.querySelector(`option[value="${name}"]`) + if (env) { + selectExEnv.removeChild(env) + addTooltip(`${name} removed`) + } + }) + + selectExEnv.addEventListener('change', (event) => { + let context = selectExEnv.options[selectExEnv.selectedIndex].value + this.blockchain.changeExecutionContext(context, () => { + modalDialogCustom.prompt('External node request', this.web3ProviderDialogBody(), 'http://127.0.0.1:8545', (target) => { + this.blockchain.setProviderFromEndpoint(target, context, (alertMsg) => { + if (alertMsg) addTooltip(alertMsg) + this.setFinalContext() + }) + }, this.setFinalContext.bind(this)) + }, (alertMsg) => { + addTooltip(alertMsg) + }, this.setFinalContext.bind(this)) + }) + + selectExEnv.value = this.blockchain.getProvider() + } + + web3ProviderDialogBody () { + const thePath = '' + + return yo` +
+ Note: To use Geth & https://remix.ethereum.org, configure it to allow requests from Remix:(see Geth Docs on rpc server) +
geth --rpc --rpccorsdomain https://remix.ethereum.org
+
+ To run Remix & a local Geth test node, use this command: (see Geth Docs on Dev mode) +
geth --rpc --rpccorsdomain="${window.origin}" --rpcapi web3,eth,debug,personal,net --vmdebug --datadir ${thePath} --dev console
+
+
+ WARNING: It is not safe to use the --rpccorsdomain flag with a wildcard: --rpccorsdomain * +
+
For more info: Remix Docs on Web3 Provider +
+
+ Web3 Provider Endpoint +
+ ` + } + + setFinalContext () { + // set the final context. Cause it is possible that this is not the one we've originaly selected + this.selectExEnv.value = this.blockchain.getProvider() + this.event.trigger('clearInstance', []) + this.updateNetwork() + this.updatePlusButton() + } + + updatePlusButton () { + // enable/disable + button + let plusBtn = document.getElementById('remixRunPlus') + let plusTitle = document.getElementById('remixRunPlusWraper') + switch (this.selectExEnv.value) { + case 'injected': { + plusBtn.classList.add(css.disableMouseEvents) + plusTitle.title = "Unfortunately it's not possible to create an account using injected web3. Please create the account directly from your provider (i.e metamask or other of the same type)." + } + break + case 'vm': { + plusBtn.classList.remove(css.disableMouseEvents) + plusTitle.title = 'Create a new account' + } + break + case 'web3': { + this.onPersonalChange() + } + break + default: + } + } + + onPersonalChange () { + let plusBtn = document.getElementById('remixRunPlus') + let plusTitle = document.getElementById('remixRunPlusWraper') + if (!this._deps.config.get('settings/personal-mode')) { + plusBtn.classList.add(css.disableMouseEvents) + plusTitle.title = 'Creating an account is possible only in Personal mode. Please go to Settings to enable it.' + } else { + plusBtn.classList.remove(css.disableMouseEvents) + plusTitle.title = 'Create a new account' + } + } + + newAccount () { + this.blockchain.newAccount( + '', + (cb) => { + modalDialogCustom.promptPassphraseCreation((error, passphrase) => { + if (error) { + return modalDialogCustom.alert(error) + } + cb(passphrase) + }, () => {}) + }, + (error, address) => { + if (error) { + return addTooltip('Cannot create an account: ' + error) + } + addTooltip(`account ${address} created`) + } + ) + } + + signMessage () { + this.blockchain.getAccounts((err, accounts) => { + if (err) { + return addTooltip(`Cannot get account list: ${err}`) + } + + var signMessageDialog = { 'title': 'Sign a message', 'text': 'Enter a message to sign', 'inputvalue': 'Message to sign' } + var $txOrigin = this.el.querySelector('#txorigin') + if (!$txOrigin.selectedOptions[0] && (this.blockchain.isInjectedWeb3() || this.blockchain.isWeb3Provider())) { + return addTooltip(`Account list is empty, please make sure the current provider is properly connected to remix`) + } + + var account = $txOrigin.selectedOptions[0].value + + var promptCb = (passphrase) => { + const modal = modalDialogCustom.promptMulti(signMessageDialog, (message) => { + this.blockchain.signMessage(message, account, passphrase, (err, msgHash, signedData) => { + if (err) { + return addTooltip(err) + } + modal.hide() + modalDialogCustom.alert(yo` +
+ hash:
+ ${msgHash} +
signature:
+ ${signedData} +
+ `) + }) + }, false) + } + + if (this.blockchain.isWeb3Provider()) { + return modalDialogCustom.promptPassphrase( + 'Passphrase to sign a message', + 'Enter your passphrase for this account to sign the message', + '', + promptCb, + false + ) + } + promptCb() + }) + } + + updateNetwork () { + this.blockchain.updateNetwork((err, {id, name} = {}) => { + if (err) { + this.netUI.innerHTML = 'can\'t detect network ' + return + } + let network = this._components.networkModule.getNetworkProvider.bind(this._components.networkModule) + this.netUI.innerHTML = (network() !== 'vm') ? `${name} (${id || '-'}) network` : '' + }) + this.fillAccountsList() + } + + // TODO: unclear what's the goal of accountListCallId, feels like it can be simplified + fillAccountsList () { + this.accountListCallId++ + var callid = this.accountListCallId + var txOrigin = this.el.querySelector('#txorigin') + this.blockchain.getAccounts((err, accounts) => { + if (this.accountListCallId > callid) return + this.accountListCallId++ + if (err) { addTooltip(`Cannot get account list: ${err}`) } + for (var loadedaddress in this.loadedAccounts) { + if (accounts.indexOf(loadedaddress) === -1) { + txOrigin.removeChild(txOrigin.querySelector('option[value="' + loadedaddress + '"]')) + delete this.loadedAccounts[loadedaddress] + } + } + for (var i in accounts) { + var address = accounts[i] + if (!this.loadedAccounts[address]) { + txOrigin.appendChild(yo``) + this.loadedAccounts[address] = 1 + } + } + txOrigin.setAttribute('value', accounts[0]) + }) + } + +} + +module.exports = SettingsUI diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js new file mode 100644 index 0000000000..8b168bac45 --- /dev/null +++ b/src/app/tabs/settings-tab.js @@ -0,0 +1,172 @@ +const yo = require('yo-yo') +const globalRegistry = require('../../global/registry') +const tooltip = require('../ui/tooltip') +const copyToClipboard = require('../ui/copy-to-clipboard') +const EventManager = require('../../lib/events') +const css = require('./styles/settings-tab-styles') +import { ViewPlugin } from '@remixproject/engine' +import * as packageJson from '../../../package.json' + +const profile = { + name: 'settings', + displayName: 'Settings', + methods: ['getGithubAccessToken'], + events: [], + icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMTUyIDg5NnEwLTEwNi03NS0xODF0LTE4MS03NS0xODEgNzUtNzUgMTgxIDc1IDE4MSAxODEgNzUgMTgxLTc1IDc1LTE4MXptNTEyLTEwOXYyMjJxMCAxMi04IDIzdC0yMCAxM2wtMTg1IDI4cS0xOSA1NC0zOSA5MSAzNSA1MCAxMDcgMTM4IDEwIDEyIDEwIDI1dC05IDIzcS0yNyAzNy05OSAxMDh0LTk0IDcxcS0xMiAwLTI2LTlsLTEzOC0xMDhxLTQ0IDIzLTkxIDM4LTE2IDEzNi0yOSAxODYtNyAyOC0zNiAyOGgtMjIycS0xNCAwLTI0LjUtOC41dC0xMS41LTIxLjVsLTI4LTE4NHEtNDktMTYtOTAtMzdsLTE0MSAxMDdxLTEwIDktMjUgOS0xNCAwLTI1LTExLTEyNi0xMTQtMTY1LTE2OC03LTEwLTctMjMgMC0xMiA4LTIzIDE1LTIxIDUxLTY2LjV0NTQtNzAuNXEtMjctNTAtNDEtOTlsLTE4My0yN3EtMTMtMi0yMS0xMi41dC04LTIzLjV2LTIyMnEwLTEyIDgtMjN0MTktMTNsMTg2LTI4cTE0LTQ2IDM5LTkyLTQwLTU3LTEwNy0xMzgtMTAtMTItMTAtMjQgMC0xMCA5LTIzIDI2LTM2IDk4LjUtMTA3LjV0OTQuNS03MS41cTEzIDAgMjYgMTBsMTM4IDEwN3E0NC0yMyA5MS0zOCAxNi0xMzYgMjktMTg2IDctMjggMzYtMjhoMjIycTE0IDAgMjQuNSA4LjV0MTEuNSAyMS41bDI4IDE4NHE0OSAxNiA5MCAzN2wxNDItMTA3cTktOSAyNC05IDEzIDAgMjUgMTAgMTI5IDExOSAxNjUgMTcwIDcgOCA3IDIyIDAgMTItOCAyMy0xNSAyMS01MSA2Ni41dC01NCA3MC41cTI2IDUwIDQxIDk4bDE4MyAyOHExMyAyIDIxIDEyLjV0OCAyMy41eiIvPjwvc3ZnPg==', + description: 'Remix-IDE settings', + kind: 'settings', + location: 'sidePanel', + documentation: 'https://remix-ide.readthedocs.io/en/latest/settings.html', + version: packageJson.version, + permission: true +} + +module.exports = class SettingsTab extends ViewPlugin { + constructor (config, editor, appManager) { + super(profile) + this.config = config + this.editor = editor + this.appManager = appManager + this._components = {} + this._deps = { + themeModule: globalRegistry.get('themeModule').api + } + this._view = { /* eslint-disable */ + el: null, + optionVM: null, + personal: null, + warnPersonalMode: null, + generateContractMetadata: null, + config: { + general: null, themes: null + } + } /* eslint-enable */ + this.event = new EventManager() + } + + createThemeCheckies () { + let themes = this._deps.themeModule.getThemes() + const onswitchTheme = (event, name) => { + this._deps.themeModule.switchTheme(name) + } + if (themes) { + return yo`
+ ${themes.map((aTheme) => { + let el = yo`
+ { onswitchTheme(event, aTheme.name) }} class="align-middle form-check-input" name="theme" id="${aTheme.name}" data-id="settingsTabTheme${aTheme.name}" > + +
` + if (this._deps.themeModule.active === aTheme.name) el.querySelector('input').setAttribute('checked', 'checked') + return el + })} +
` + } + } + + render () { + const self = this + if (self._view.el) return self._view.el + + // Gist settings + const token = this.config.get('settings/gist-access-token') + const gistAccessToken = yo`` + if (token) gistAccessToken.value = token + const removeToken = () => { self.config.set('settings/gist-access-token', ''); gistAccessToken.value = ''; tooltip('Access token removed') } + const saveToken = () => { this.config.set('settings/gist-access-token', gistAccessToken.value); tooltip('Access token saved') } + const gistAddToken = yo` saveToken()} value="Save" type="button">` + const gistRemoveToken = yo` removeToken()}" type="button">` + this._view.gistToken = yo`
${gistAccessToken}${gistAddToken}${copyToClipboard(() => gistAccessToken.value)}${gistRemoveToken}
` + this._view.optionVM = yo`` + if (this.config.get('settings/always-use-vm') === undefined) this.config.set('settings/always-use-vm', true) + if (this.config.get('settings/always-use-vm')) this._view.optionVM.setAttribute('checked', '') + this._view.personal = yo`` + if (this.config.get('settings/personal-mode')) this._view.personal.setAttribute('checked', '') + this._view.generateContractMetadata = yo`` + + if (this.config.get('settings/generate-contract-metadata')) this._view.generateContractMetadata.setAttribute('checked', '') + + this._view.pluginInput = yo`` + + this._view.themes = this._deps.themeModule.getThemes() + this._view.themesCheckBoxes = this.createThemeCheckies() + this._view.config.homePage = yo` + +
+
+
Have a question?
+ +
+
` + + const warnText = `Transaction sent over Web3 will use the web3.personal API - be sure the endpoint is opened before enabling it. + This mode allows to provide the passphrase in the Remix interface without having to unlock the account. + Although this is very convenient, you should completely trust the backend you are connected to (Geth, Parity, ...). + Remix never persist any passphrase.`.split('\n').map(s => s.trim()).join(' ') + this._view.warnPersonalMode = yo`` + + this._view.config.general = yo` +
+
+
General settings
+
+
${this._view.generateContractMetadata}
+ +
+
+
${this._view.optionVM}
+ +
+
+
+ +
+
+
${this._view.personal}>
+ +
+
+
+ ` + this._view.gistToken = yo` +
+
+
Github Access Token
+

Manage the access token used to publish to Gist and retrieve Github contents.

+

Go to github token page (link below) to create a new token and save it in Remix. Make sure this token has only 'create gist' permission.

+

https://github.com/settings/tokens

+
${this._view.gistToken}
+
+
` + this._view.config.themes = yo` +
+
+
Themes
+ ${this._view.themesCheckBoxes} +
+
` + this._view.el = yo` +
+ ${this._view.config.homePage} + ${this._view.config.general} + ${this._view.gistToken} + ${this._view.config.themes} +
` + + function onchangeGenerateContractMetadata (event) { + self.config.set('settings/generate-contract-metadata', !self.config.get('settings/generate-contract-metadata')) + } + function onchangeOption (event) { + self.config.set('settings/always-use-vm', !self.config.get('settings/always-use-vm')) + } + function onchangePersonal (event) { + self.config.set('settings/personal-mode', !self.config.get('settings/personal-mode')) + } + + this._deps.themeModule.switchTheme() + return this._view.el + } + + getGithubAccessToken () { + return this.config.get('settings/gist-access-token') + } +} diff --git a/src/app/tabs/staticanalysis/staticAnalysisView.js b/src/app/tabs/staticanalysis/staticAnalysisView.js new file mode 100644 index 0000000000..2723c73754 --- /dev/null +++ b/src/app/tabs/staticanalysis/staticAnalysisView.js @@ -0,0 +1,299 @@ +'use strict' +var StaticAnalysisRunner = require('remix-analyzer').CodeAnalysis +var yo = require('yo-yo') +var $ = require('jquery') +var remixLib = require('remix-lib') +var utils = remixLib.util +var css = require('./styles/staticAnalysisView-styles') +var Renderer = require('../../ui/renderer') +const SourceHighlighter = require('../../editor/sourceHighlighter') + +var EventManager = require('../../../lib/events') + +function staticAnalysisView (localRegistry, analysisModule) { + var self = this + this.event = new EventManager() + this.view = null + this.runner = new StaticAnalysisRunner() + this.modulesView = this.renderModules() + this.lastCompilationResult = null + this.lastCompilationSource = null + this.currentFile = 'No file compiled' + this.sourceHighlighter = new SourceHighlighter() + this.analysisModule = analysisModule + self._components = { + renderer: new Renderer() + } + self._components.registry = localRegistry + // dependencies + self._deps = { + offsetToLineColumnConverter: self._components.registry.get('offsettolinecolumnconverter').api + } + + analysisModule.on('solidity', 'compilationFinished', (file, source, languageVersion, data) => { + self.lastCompilationResult = null + self.lastCompilationSource = null + if (languageVersion.indexOf('soljson') !== 0) return + self.lastCompilationResult = data + self.lastCompilationSource = source + self.currentFile = file + self.correctRunBtnDisabled() + if (self.view && self.view.querySelector('#autorunstaticanalysis').checked) { + self.run() + } + }) +} + +staticAnalysisView.prototype.render = function () { + this.runBtn = yo`` + const view = yo` +
+
+
+
+ + +
+
+ + +
+ ${this.runBtn} +
+
+
+ ${this.modulesView} +
+
+ last results for: + ${this.currentFile} +
+
+
+ ` + + if (!this.view) { + this.view = view + } + this.correctRunBtnDisabled() + return view +} + +staticAnalysisView.prototype.selectedModules = function () { + if (!this.view) { + return [] + } + const selected = this.view.querySelectorAll('[name="staticanalysismodule"]:checked') + var toRun = [] + for (var i = 0; i < selected.length; i++) { + toRun.push(selected[i].attributes['index'].value) + } + return toRun +} + +staticAnalysisView.prototype.run = function () { + if (!this.view) { + return + } + const highlightLocation = async (location, fileName) => { + await this.analysisModule.call('editor', 'discardHighlight') + await this.analysisModule.call('editor', 'highlight', location, fileName) + } + const selected = this.selectedModules() + const warningContainer = $('#staticanalysisresult') + warningContainer.empty() + this.view.querySelector('#staticAnalysisCurrentFile').innerText = this.currentFile + var self = this + if (this.lastCompilationResult && selected.length) { + this.runBtn.removeAttribute('disabled') + let warningCount = 0 + this.runner.run(this.lastCompilationResult, selected, (results) => { + const groupedModules = utils.groupBy(preProcessModules(this.runner.modules()), 'categoryId') + results.map((result, j) => { + let moduleName + Object.keys(groupedModules).map((key) => { + groupedModules[key].forEach((el) => { + if (el.name === result.name) { + moduleName = groupedModules[key][0].categoryDisplayName + return + } + }) + }) + let alreadyExistedEl = this.view.querySelector(`[id="staticAnalysisModule${moduleName}"]`) + if (!alreadyExistedEl) { + warningContainer.append(` +
+ ${moduleName} +
+ `) + } + + result.report.map((item, i) => { + let location = '' + let locationString = 'not available' + let column = 0 + let row = 0 + let fileName = this.currentFile + if (item.location) { + var split = item.location.split(':') + var file = split[2] + location = { + start: parseInt(split[0]), + length: parseInt(split[1]) + } + location = self._deps.offsetToLineColumnConverter.offsetToLineColumn(location, + parseInt(file), + self.lastCompilationSource.sources, + self.lastCompilationResult.sources + ) + row = location.start.line + column = location.start.column + locationString = (row + 1) + ':' + column + ':' + fileName = Object.keys(self.lastCompilationResult.contracts)[file] + } + warningCount++ + const msg = yo` + + ${result.name} + ${item.warning} + ${item.more ? yo`more` : yo``} + Pos: ${locationString} + ` + self._components.renderer.error( + msg, + this.view.querySelector(`[id="staticAnalysisModule${moduleName}"]`), + { + click: () => highlightLocation(location, fileName), + type: 'warning', + useSpan: true, + errFile: fileName, + errLine: row, + errCol: column + } + ) + }) + }) + // hide empty staticAnalysisModules sections + this.view.querySelectorAll('[name="staticAnalysisModules"]').forEach((section) => { + if (!section.getElementsByClassName('alert-warning').length) section.hidden = true + }) + self.event.trigger('staticAnaysisWarning', [warningCount]) + }) + } else { + this.runBtn.setAttribute('disabled', 'disabled') + if (selected.length) { + warningContainer.html('No compiled AST available') + } + self.event.trigger('staticAnaysisWarning', [-1]) + } +} +staticAnalysisView.prototype.checkModule = function (event) { + const selected = this.view.querySelectorAll('[name="staticanalysismodule"]:checked') + const checkAll = this.view.querySelector('[id="checkAllEntries"]') + this.correctRunBtnDisabled() + if (event.target.checked) { + checkAll.checked = true + } else if (!selected.length) { + checkAll.checked = false + } +} +staticAnalysisView.prototype.correctRunBtnDisabled = function () { + const selected = this.view.querySelectorAll('[name="staticanalysismodule"]:checked') + if (this.lastCompilationResult && selected.length !== 0) { + this.runBtn.removeAttribute('disabled') + } else { + this.runBtn.setAttribute('disabled', 'disabled') + } +} +staticAnalysisView.prototype.checkAll = function (event) { + if (!this.view) { + return + } + // checks/unchecks all + const checkBoxes = this.view.querySelectorAll('[name="staticanalysismodule"]') + checkBoxes.forEach((checkbox) => { checkbox.checked = event.target.checked }) + this.correctRunBtnDisabled() +} + +staticAnalysisView.prototype.handleCollapse = function (e) { + const downs = e.toElement.parentElement.getElementsByClassName('fas fa-angle-double-right') + const iEls = document.getElementsByTagName('i') + for (var i = 0; i < iEls.length; i++) { iEls[i].hidden = false } + downs[0].hidden = true +} + +staticAnalysisView.prototype.renderModules = function () { + const groupedModules = utils.groupBy(preProcessModules(this.runner.modules()), 'categoryId') + const moduleEntries = Object.keys(groupedModules).map((categoryId, i) => { + const category = groupedModules[categoryId] + const entriesDom = category.map((item, i) => { + return yo` +
+ + +
+ ` + }) + return yo` +
+ this.handleCollapse(e)}"/> + +
+ ${entriesDom} +
+
+ ` + }) + // collaps first module + moduleEntries[0].getElementsByTagName('input')[0].checked = true + moduleEntries[0].getElementsByTagName('i')[0].hidden = true + return yo` +
+ ${moduleEntries} +
` +} + +module.exports = staticAnalysisView + +/** + * @dev Process & categorize static analysis modules to show them on UI + * @param arr list of static analysis modules received from remix-analyzer module + */ +function preProcessModules (arr) { + return arr.map((Item, i) => { + const itemObj = new Item() + itemObj['_index'] = i + itemObj.categoryDisplayName = itemObj.category.displayName + itemObj.categoryId = itemObj.category.id + return itemObj + }) +} diff --git a/src/app/tabs/staticanalysis/styles/staticAnalysisView-styles.js b/src/app/tabs/staticanalysis/styles/staticAnalysisView-styles.js new file mode 100644 index 0000000000..bd277a03aa --- /dev/null +++ b/src/app/tabs/staticanalysis/styles/staticAnalysisView-styles.js @@ -0,0 +1,36 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .analysis { + display: flex; + flex-direction: column; + } + .result { + margin-top: 1%; + max-height: 300px; + word-break: break-word; + } + .buttons { + margin: 1rem 0; + } + .label { + display: flex; + align-items: center; + } + .label { + display: flex; + align-items: center; + user-select: none; + } + .block input[type='radio']:checked ~ .entries{ + height: auto; + transition: .5s ease-in; + } + .entries{ + height: 0; + overflow: hidden; + transition: .5s ease-out; + } +` + +module.exports = css diff --git a/src/app/tabs/styles/analysis-tab-styles.js b/src/app/tabs/styles/analysis-tab-styles.js new file mode 100644 index 0000000000..a98d5b70af --- /dev/null +++ b/src/app/tabs/styles/analysis-tab-styles.js @@ -0,0 +1,6 @@ +var csjs = require('csjs-inject') + +const css = csjs` +` + +module.exports = css diff --git a/src/app/tabs/styles/compile-tab-styles.js b/src/app/tabs/styles/compile-tab-styles.js new file mode 100644 index 0000000000..dc0b7c9842 --- /dev/null +++ b/src/app/tabs/styles/compile-tab-styles.js @@ -0,0 +1,237 @@ +const csjs = require('csjs-inject') + +const css = csjs` + .title { + font-size: 1.1em; + font-weight: bold; + margin-bottom: 1em; + } + .panicError { + color: red; + font-size: 20px; + } + .crow { + display: flex; + overflow: auto; + clear: both; + padding: .2em; + } + .checkboxText { + font-weight: normal; + } + .crow label { + cursor:pointer; + } + .crowNoFlex { + overflow: auto; + clear: both; + } + .info { + padding: 10px; + word-break: break-word; + } + .contract { + display: block; + margin: 3% 0; + } + .nightlyBuilds { + display: flex; + flex-direction: row; + align-items: center; + } + .autocompileContainer { + display: flex; + align-items: center; + } + .hideWarningsContainer { + display: flex; + align-items: center; + } + .autocompile {} + .autocompileTitle { + font-weight: bold; + margin: 1% 0; + } + .autocompileText { + margin: 1% 0; + font-size: 12px; + overflow: hidden; + word-break: normal; + line-height: initial; + } + .warnCompilationSlow { + margin-left: 1%; + } + .compilerConfig { + display: flex; + align-items: center; + } + .compilerConfig label { + margin: 0; + } + .compilerSection { + padding: 12px 24px 16px; + } + .compilerLabel { + margin-bottom: 2px; + font-size: 11px; + line-height: 12px; + text-transform: uppercase; + } + .copyButton { + padding: 6px; + font-weight: bold; + font-size: 11px; + line-height: 15px; + } + .name { + display: flex; + } + .size { + display: flex; + } + .checkboxes { + display: flex; + width: 100%; + justify-content: space-between; + flex-wrap: wrap; + } + .compileButton { + width: 100%; + margin: 15px 0 10px 0; + font-size: 12px; + } + .container { + margin: 0; + margin-bottom: 2%; + } + .optimizeContainer { + display: flex; + } + .noContractAlert { + display: flex; + justify-content: center; + align-items: center; + } + .contractHelperButtons { + margin-top: 6px; + display: flex; + align-items: center; + justify-content: space-between; + float: right; + } + .copyToClipboard { + font-size: 1rem; + } + .copyIcon { + margin-right: 5px; + } + .log { + display: flex; + flex-direction: column; + margin-bottom: 5%; + overflow: visible; + } + .key { + margin-right: 5px; + text-transform: uppercase; + width: 100%; + } + .value { + display: flex; + width: 100%; + margin-top: 1.5%; + } + .questionMark { + margin-left: 2%; + cursor: pointer; + } + .questionMark:hover { + } + .detailsJSON { + padding: 8px 0; + border: none; + } + .icon { + margin-right: 0.3em; + } + .errorBlobs { + padding-left: 5px; + padding-right: 5px; + word-break: break-word; + } + .storageLogo { + width: 20px; + height: 20px; + } + .spinningIcon { + display: inline-block; + position: relative; + animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + } + @keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + } + @-webkit-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + } + @-moz-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + } + @-o-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + } + @-ms-keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } + } + + .bouncingIcon { + display: inline-block; + position: relative; + -moz-animation: bounce 2s infinite linear; + -o-animation: bounce 2s infinite linear; + -webkit-animation: bounce 2s infinite linear; + animation: bounce 2s infinite linear; + } + + @-webkit-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } + } + @-moz-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } + } + @-o-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } + } + @-ms-keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } + } + @keyframes bounce { + 0% { top: 0; } + 50% { top: -0.2em; } + 70% { top: -0.3em; } + 100% { top: 0; } + } +` + +module.exports = css diff --git a/src/app/tabs/styles/debugger-tab-styles.js b/src/app/tabs/styles/debugger-tab-styles.js new file mode 100644 index 0000000000..6a15d2cf56 --- /dev/null +++ b/src/app/tabs/styles/debugger-tab-styles.js @@ -0,0 +1,12 @@ +var csjs = require('csjs-inject') + +const css = csjs` + .debuggerTabView { + padding: 2%; + } + .debugger { + margin-bottom: 1%; + } +` + +module.exports = css diff --git a/src/app/tabs/styles/plugin-tab-styles.js b/src/app/tabs/styles/plugin-tab-styles.js new file mode 100644 index 0000000000..45c593ac46 --- /dev/null +++ b/src/app/tabs/styles/plugin-tab-styles.js @@ -0,0 +1,15 @@ +var csjs = require('csjs-inject') + +const css = csjs` + .pluginTabView { + height: 100%; + width: 100%; + } + .iframe { + height: 100%; + width: 100%; + border: 0; + } +` + +module.exports = css diff --git a/src/app/tabs/styles/run-tab-styles.js b/src/app/tabs/styles/run-tab-styles.js new file mode 100644 index 0000000000..8d93dd92fd --- /dev/null +++ b/src/app/tabs/styles/run-tab-styles.js @@ -0,0 +1,221 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .runTabView { + display: flex; + flex-direction: column; + } + .runTabView::-webkit-scrollbar { + display: none; + } + .settings { + padding: 0 24px 16px; + } + .crow { + display: block; + margin-top: 8px; + } + .col1 { + width: 30%; + float: left; + align-self: center; + } + .settingsLabel { + font-size: 11px; + margin-bottom: 4px; + text-transform: uppercase; + } + .environment { + display: flex; + align-items: center; + position: relative; + width: 100%; + } + .environment a { + margin-left: 7px; + } + .account { + display: flex; + align-items: center; + } + .account i { + margin-left: 12px; + } + .col2 { + border-radius: 3px; + } + .col2_1 { + width: 164px; + min-width: 164px; + } + .col2_2 { + } + .select { + font-weight: normal; + width: 100%; + } + .instanceContainer { + display: flex; + flex-direction: column; + margin-bottom: 2%; + border: none; + text-align: center; + padding: 0 14px 16px; + } + .pendingTxsContainer { + display: flex; + flex-direction: column; + margin-top: 2%; + border: none; + text-align: center; + } + .container { + padding: 0 24px 16px; + } + .recorderDescription { + margin: 0 15px 15px 0; + } + .contractNames { + width: 100%; + border: 1px solid + } + .subcontainer { + display: flex; + flex-direction: row; + align-items: center; + margin-bottom: 8px; + } + .subcontainer i { + width: 16px; + display: flex; + justify-content: center; + margin-left: 1px; + } + .button button{ + flex: none; + } + .button { + display: flex; + align-items: center; + margin-top: 13px; + } + .transaction { + } + .atAddress { + margin: 0; + min-width: 100px; + width: 100px; + height: 100%; + word-break: inherit; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: 0; + } + .atAddressSect { + margin-top: 8px; + height: 32px; + } + .atAddressSect input { + height: 32px; + border-top-left-radius: 0 !important; + border-bottom-left-radius: 0 !important; + } + .ataddressinput { + padding: .25rem; + } + .create { + } + .input { + font-size: 10px !important; + } + .noInstancesText { + font-style: italic; + text-align: left; + padding-left: 15px; + } + .pendingTxsText { + font-style: italic; + display: flex; + justify-content: space-evenly; + align-items: center; + flex-wrap: wrap; + } + .item { + margin-right: 1em; + display: flex; + align-items: center; + } + .pendingContainer { + display: flex; + align-items: baseline; + } + .pending { + height: 25px; + text-align: center; + padding-left: 10px; + border-radius: 3px; + margin-left: 5px; + } + .disableMouseEvents { + pointer-events: none; + } + .icon { + cursor: pointer; + font-size: 12px; + cursor: pointer; + margin-left: 5px; + } + .icon:hover { + font-size: 12px; + color: var(--warning); + } + .errorIcon { + color: var(--warning); + margin-left: 15px; + } + .failDesc { + color: var(--warning); + padding-left: 10px; + display: inline; + } + .network { + margin-left: 8px; + pointer-events: none; + } + .networkItem { + margin-right: 5px; + } + .transactionActions { + display: flex; + justify-content: space-evenly; + width: 145px; + } + .orLabel { + text-align: center; + text-transform: uppercase; + } + .infoDeployAction { + margin-left: 1px; + font-size: 13px; + color: var(--info); + } + .gasValueContainer { + flex-direction: row; + display: flex; + } + .gasNval { + width: 55%; + font-size: 0.8rem; + } + .gasNvalUnit { + width: 41%; + margin-left: 10px; + font-size: 0.8rem; + } + .deployDropdown { + text-align: center; + text-transform: uppercase; + } +` + +module.exports = css diff --git a/src/app/tabs/styles/settings-tab-styles.js b/src/app/tabs/styles/settings-tab-styles.js new file mode 100644 index 0000000000..3d80a30682 --- /dev/null +++ b/src/app/tabs/styles/settings-tab-styles.js @@ -0,0 +1,75 @@ +var csjs = require('csjs-inject') + +const css = csjs` + .settingsTabView { + padding: 2%; + } + .info { + margin-bottom: .6rem; + word-break: break-word; + font-size: .8rem; + } + .info h7 { + margin-bottom: .5rem; + } + .frow { + margin-bottom: .5rem; + } + .crow label { + cursor:pointer; + } + .crowNoFlex { + overflow: auto; + clear: both; + } + .attention { + margin-bottom: 1em; + padding: .5em; + font-weight: bold; + } + .heading { + margin-bottom: 0; + } + .explaination { + margin-top: 3px; + margin-bottom: 3px; + } + input { + width: inherit; + } + input[type=radio] { + margin-top: 2px; + } + .pluginTextArea { + font-family: unset; + } + + .removePlugin { + cursor: pointer; + } + .icon { + margin-right: .5em; + } + .aPlugin { + display: inline-block; + padding-left: 10px; + padding-top: 4px; + padding-bottom: 6px; + max-width: 100px; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + vertical-align: middle; + } + .removePlugin{ + padding-left: 7px; + padding-right: 7px; + margin-left: 10px; + } + .inline { + display: inline; + width: 32%; + } +` + +module.exports = css diff --git a/src/app/tabs/styles/support-tab-styles.js b/src/app/tabs/styles/support-tab-styles.js new file mode 100644 index 0000000000..7debd88c3f --- /dev/null +++ b/src/app/tabs/styles/support-tab-styles.js @@ -0,0 +1,80 @@ +const csjs = require('csjs-inject') + +const css = csjs` + .supportTabView { + height: 100%; + padding: 2%; + padding-bottom: 3em; + display: flex; + flex-direction: column; + overflow: hidden; + overflow-y: auto; + } + .chat { + display: flex; + flex-direction: column; + align-items: center; + height: 85%; + padding: 0; + } + .chatTitle { + height: 40px; + width: 90%; + display: flex; + align-items: center; + justify-content: center; + margin-top: 15px; + } + .chatTitle:hover { + cursor: pointer; + } + .icon { + height: 70%; + margin-right: 2%; + } + .chatTitleText { + font-size: 17px; + font-weight: bold; + } + .chatTitleText { + opacity: 0.8; + } + .chatIframe { + width: 100%; + height: 100%; + transform: scale(0.9); + padding: 0; + border: none; + } + .infoBox { + } + .remixdinstallation { + padding: 3px; + border-radius: 2px; + margin-left: 5px; + } + .info { + margin-top: 1em; + word-break: break-word; + } + .title { + font-size: 1.1em; + font-weight: bold; + margin-bottom: 1em; + } + .crow { + display: flex; + overflow: auto; + clear: both; + padding: .2em; + } + .crow label { + cursor:pointer; + } + .crowNoFlex { + overflow: auto; + clear: both; + } +` + +module.exports = css diff --git a/src/app/tabs/styles/tabbed-menu-styles.js b/src/app/tabs/styles/tabbed-menu-styles.js new file mode 100644 index 0000000000..f0adb87f55 --- /dev/null +++ b/src/app/tabs/styles/tabbed-menu-styles.js @@ -0,0 +1,42 @@ +const csjs = require('csjs-inject') +const styles = require('../../ui/styles-guide/theme-chooser').chooser() + +const css = csjs` + .menu { + display: flex; + background-color: ${styles.rightPanel.BackgroundColor_Pre}; + list-style: none; + margin: 0; + padding: 0; + } + .active { + background-color: ${styles.rightPanel.backgroundColor_Tab}; + color: ${styles.appProperties.mainText_Color} + } + .options { + float: left; + padding-top: 0.7em; + min-width: 60px; + font-size: 0.9em; + cursor: pointer; + font-size: 1em; + text-align: center; + } + .optionViews { + background-color: ${styles.rightPanel.backgroundColor_Tab}; + overflow: scroll; + height: 100%; + } + .optionViews > div { + display: none; + } + .optionViews .pre { + word-wrap: break-word; + background-color: ${styles.rightPanel.BackgroundColor_Pre}; + border-radius: 3px; + display: inline-block; + padding: 0 0.6em; + } +` + +module.exports = css diff --git a/src/app/tabs/styles/test-tab-styles.js b/src/app/tabs/styles/test-tab-styles.js new file mode 100644 index 0000000000..ce267b02bf --- /dev/null +++ b/src/app/tabs/styles/test-tab-styles.js @@ -0,0 +1,52 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .testTabView {} + .infoBox { + margin: 5%; + } + .tests {} + .testList { + line-height: 2em; + display: flex; + flex-direction: column; + margin: 5%; + max-height: 300px; + overflow-y: auto; + + } + .container { + margin: 2%; + padding-bottom: 5%; + max-height: 300px; + overflow-y: auto; + } + .summaryTitle { + font-weight: bold; + } + .testPass { + } + .testLog { + margin-bottom: 1%; + border-radius: 4px; + padding: 1% 1% 1% 5%; + } + .testFailure { + } + .testFailureSummary { + } + .title { + font-size: 1.1em; + font-weight: bold; + margin-bottom: 1em; + } + .label { + display: flex; + align-items: center; + white-space: nowrap; + } + .labelOnBtn { + border: hidden; + } +` +module.exports = css diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js new file mode 100644 index 0000000000..aec8e5292c --- /dev/null +++ b/src/app/tabs/test-tab.js @@ -0,0 +1,525 @@ +var yo = require('yo-yo') +var async = require('async') +var tooltip = require('../ui/tooltip') +var css = require('./styles/test-tab-styles') +var remixTests = require('remix-tests') +import { ViewPlugin } from '@remixproject/engine' +import { canUseWorker, baseUrl } from '../compiler/compiler-utils' + +const TestTabLogic = require('./testTab/testTab') + +const profile = { + name: 'solidityUnitTesting', + displayName: 'Solidity unit testing', + methods: ['testFromPath', 'testFromSource'], + events: [], + icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4wUDEhQZ0zbrmQAAAfNJREFUWMPF17lrFVEUx/EPaIKovfAScSndjUtULFQSYhHF0r/Dwsa/RywUiTaWgvaChWsiKkSMZte4o7G5A49x7r0zLy/PA6eZOef3PXebuYfu2xCmcQ9b9NgOYw6rwR9ia6/gR7HQBi/8PjavN/w4FivghV9bT/gwlhLwHzjTVPQ8rqAvE3ciA/+O8abwy/gVBG4lijiJ5czIL64FXvhNbCzFnaoBv9AUPo7fEcEb2BDiTuNTAv4NYxX6u/EIM7GZuZoQXcX1sJk+J2K+YrRCexfetsX9xKVyUB9uZ4r4k3j3BSMR+JvIMv2zQfsxkSkiBj9XAd8ZgRf+vmop+nGnAXwlcs534HUm93FsQ9YtIjby7XiVyZ3BntSpyBWxgrMR+FQG/gF76xzNftxtMO1rgo+G5AdBqLBN4d9eCCyHD1En8Oi0j4UPSBE4hcFSERN4Fz7BZRvEZKcjHynBC5/EQI1lGqgJ3xcTmE4kvswUMRBiUvCPKTg8zQi8QKsirxXe5eD7c1N4ALMZoeelIlrhWSpnNmjXsoM1iihmYhueZGIXcKTp7/hQ6UZb5c+Cp2LmglZHVqeIlC+G2/GarNMiFnGsWzfdpkV0Fd7e5czXgC+FvmDdWq35/wVvbzbnI/DhXvV9Q6W+r6fw9hZsKnjX4H8B0Aamri7CrBsAAAAASUVORK5CYII=', + description: 'Fast tool to generate unit tests for your contracts', + location: 'sidePanel', + documentation: 'https://remix-ide.readthedocs.io/en/latest/unittesting.html' +} + +module.exports = class TestTab extends ViewPlugin { + constructor (fileManager, filePanel, compileTab, appManager, renderer) { + super(profile) + this.compileTab = compileTab + this._view = { el: null } + this.fileManager = fileManager + this.filePanel = filePanel + this.data = {} + this.appManager = appManager + this.renderer = renderer + this.hasBeenStopped = false + this.runningTestsNumber = 0 + this.readyTestsNumber = 0 + this.areTestsRunning = false + appManager.event.on('activate', (name) => { + if (name === 'solidity') this.updateRunAction(fileManager.currentFile()) + }) + appManager.event.on('deactivate', (name) => { + if (name === 'solidity') this.updateRunAction(fileManager.currentFile()) + }) + } + + onActivationInternal () { + this.testTabLogic = new TestTabLogic(this.fileManager) + this.listenToEvents() + } + + listenToEvents () { + this.filePanel.event.register('newTestFileCreated', file => { + var testList = this.view.querySelector("[class^='testList']") + var test = this.createSingleTest(file) + testList.appendChild(test) + this.data.allTests.push(file) + this.data.selectedTests.push(file) + }) + + this.fileManager.events.on('noFileSelected', () => { + this.updateGenerateFileAction() + this.updateRunAction() + this.updateTestFileList() + }) + + this.fileManager.events.on('currentFileChanged', (file, provider) => this.updateForNewCurrent(file)) + } + + updateForNewCurrent (file) { + this.updateGenerateFileAction(file) + if (!this.areTestsRunning) this.updateRunAction(file) + this.testTabLogic.getTests((error, tests) => { + if (error) return tooltip(error) + this.data.allTests = tests + this.data.selectedTests = [...this.data.allTests] + this.updateTestFileList(tests) + if (!this.testsOutput) return + }) + } + + createSingleTest (testFile) { + return yo` +
+ this.toggleCheckbox(e.target.checked, testFile)} type="checkbox" checked="true"> + +
+ ` + } + + listTests () { + return this.data.allTests.map( + testFile => this.createSingleTest(testFile) + ) + } + + toggleCheckbox (eChecked, test) { + if (!this.data.selectedTests) { + this.data.selectedTests = this._view.el.querySelectorAll('.singleTest:checked') + } + let selectedTests = this.data.selectedTests + selectedTests = eChecked ? [...selectedTests, test] : selectedTests.filter(el => el !== test) + this.data.selectedTests = selectedTests + let checkAll = this._view.el.querySelector('[id="checkAllTests"]') + const runBtn = document.getElementById('runTestsTabRunAction') + + if (eChecked) { + checkAll.checked = true + if ((this.readyTestsNumber === this.runningTestsNumber || this.hasBeenStopped) && document.getElementById('runTestsTabStopAction').innerText === 'Stop') { + runBtn.removeAttribute('disabled') + runBtn.setAttribute('title', 'Run tests') + } + } else if (!selectedTests.length) { + checkAll.checked = false + runBtn.setAttribute('disabled', 'disabled') + runBtn.setAttribute('title', 'No test file selected') + } + } + + checkAll (event) { + const checkBoxes = this._view.el.querySelectorAll('.singleTest') + const checkboxesLabels = this._view.el.querySelectorAll('.singleTestLabel') + // checks/unchecks all + for (let i = 0; i < checkBoxes.length; i++) { + checkBoxes[i].checked = event.target.checked + this.toggleCheckbox(event.target.checked, checkboxesLabels[i].innerText) + } + } + + testCallback (result) { + this.testsOutput.hidden = false + if (result.type === 'contract') { + this.testSuite = result.value + if (this.testSuites) { + this.testSuites.push(this.testSuite) + } else { + this.testSuites = [this.testSuite] + } + this.rawFileName = result.filename + this.runningTestFileName = this.cleanFileName(this.rawFileName, this.testSuite) + this.outputHeader = yo` +
+ ${this.testSuite} (${this.rawFileName}) +
+ ` + this.testsOutput.appendChild(this.outputHeader) + } else if (result.type === 'testPass') { + this.testsOutput.appendChild(yo` +
+ ✓ ${result.value} +
+ `) + } else if (result.type === 'testFailure') { + this.testsOutput.appendChild(yo` +
+ ✘ ${result.value} + "${result.errMsg}" +
+ `) + } + } + + resultsCallback (_err, result, cb) { + // total stats for the test + // result.passingNum + // result.failureNum + // result.timePassed + cb() + } + + cleanFileName (fileName, testSuite) { + return fileName ? fileName.replace(/\//g, '_').replace(/\./g, '_') + testSuite : fileName + } + + setHeader (status) { + if (status) { + const label = yo` +
+ PASS +
+ ` + + this.outputHeader && yo.update(this.outputHeader, yo` +
+ ${label} ${this.testSuite} (${this.rawFileName}) +
+ `) + } else { + const label = yo` +
+ FAIL +
+ ` + + this.outputHeader && yo.update(this.outputHeader, yo` +
+ ${label} ${this.testSuite} (${this.rawFileName}) +
+ `) + } + } + + updateFinalResult (_errors, result, filename) { + ++this.readyTestsNumber + this.testsOutput.hidden = false + if (!result && (_errors || _errors.errors || Array.isArray(_errors) && (_errors[0].message || _errors[0].formattedMessage))) { + this.testCallback({ type: 'contract', filename }) + this.setHeader(false) + } + if (_errors && _errors.errors) { + _errors.errors.forEach((err) => this.renderer.error(err.formattedMessage || err.message, this.testsOutput, {type: err.severity})) + } else if (_errors && Array.isArray(_errors) && (_errors[0].message || _errors[0].formattedMessage)) { + _errors.forEach((err) => this.renderer.error(err.formattedMessage || err.message, this.testsOutput, {type: err.severity})) + } else if (_errors && !_errors.errors && !Array.isArray(_errors)) { + // To track error like this: https://github.com/ethereum/remix/pull/1438 + this.renderer.error(_errors.formattedMessage || _errors.message, this.testsOutput, {type: 'error'}) + } + yo.update(this.resultStatistics, this.createResultLabel()) + if (result) { + const totalTime = parseFloat(result.totalTime).toFixed(2) + + if (result.totalPassing > 0 && result.totalFailing > 0) { + this.testsOutput.appendChild(yo` +
+ Result for ${filename} + Passing: ${result.totalPassing} + Failing: ${result.totalFailing} + Total time: ${totalTime}s +
+ `) + } else if (result.totalPassing > 0 && result.totalFailing <= 0) { + this.testsOutput.appendChild(yo` +
+ Result for ${filename} + Passing: ${result.totalPassing} + Total time: ${totalTime}s +
+ `) + } else if (result.totalPassing <= 0 && result.totalFailing > 0) { + this.testsOutput.appendChild(yo` +
+ Result for ${filename} + Failing: ${result.totalFailing} + Total time: ${totalTime}s +
+ `) + } + // fix for displaying right label for multiple tests (testsuites) in a single file + this.testSuites.forEach(testSuite => { + this.testSuite = testSuite + this.runningTestFileName = this.cleanFileName(filename, this.testSuite) + this.outputHeader = document.querySelector(`#${this.runningTestFileName}`) + this.setHeader(true) + }) + + result.errors.forEach((error, index) => { + this.testSuite = error.context + this.runningTestFileName = this.cleanFileName(filename, error.context) + this.outputHeader = document.querySelector(`#${this.runningTestFileName}`) + const isFailingLabel = document.querySelector(`.failed_${this.runningTestFileName}`) + if (!isFailingLabel) this.setHeader(false) + }) + this.testsOutput.appendChild(yo` +
+

+
+ `) + } + if (this.hasBeenStopped && (this.readyTestsNumber !== this.runningTestsNumber)) { + // if all tests has been through before stopping no need to print this. + this.testsExecutionStopped.hidden = false + } + if (_errors) this.testsExecutionStoppedError.hidden = false + if (_errors || this.hasBeenStopped || this.readyTestsNumber === this.runningTestsNumber) { + // All tests are ready or the operation has been canceled or there was a compilation error in one of the test files. + const stopBtn = document.getElementById('runTestsTabStopAction') + stopBtn.setAttribute('disabled', 'disabled') + const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel') + stopBtnLabel.innerText = 'Stop' + if (this.data.selectedTests.length !== 0) { + const runBtn = document.getElementById('runTestsTabRunAction') + runBtn.removeAttribute('disabled') + } + this.areTestsRunning = false + } + } + + async testFromPath (path) { + const fileContent = await this.fileManager.readFile(path) + return this.testFromSource(fileContent, path) + } + + /* + Test is not associated with the UI + */ + testFromSource (content, path = 'browser/unit_test.sol') { + return new Promise((resolve, reject) => { + let runningTest = {} + runningTest[path] = { content } + const {currentVersion, evmVersion, optimize} = this.compileTab.getCurrentCompilerConfig() + const currentCompilerUrl = baseUrl + '/' + currentVersion + const compilerConfig = { + currentCompilerUrl, + evmVersion, + optimize, + usingWorker: canUseWorker(currentVersion) + } + remixTests.runTestSources(runningTest, compilerConfig, () => {}, () => {}, (error, result) => { + if (error) return reject(error) + resolve(result) + }, (url, cb) => { + return this.compileTab.compileTabLogic.importFileCb(url, cb) + }) + }) + } + + runTest (testFilePath, callback) { + if (this.hasBeenStopped) { + this.updateFinalResult() + return + } + this.resultStatistics.hidden = false + this.fileManager.readFile(testFilePath).then((content) => { + const runningTest = {} + runningTest[testFilePath] = { content } + const {currentVersion, evmVersion, optimize} = this.compileTab.getCurrentCompilerConfig() + const currentCompilerUrl = baseUrl + '/' + currentVersion + const compilerConfig = { + currentCompilerUrl, + evmVersion, + optimize, + usingWorker: canUseWorker(currentVersion) + } + remixTests.runTestSources( + runningTest, + compilerConfig, + (result) => this.testCallback(result), + (_err, result, cb) => this.resultsCallback(_err, result, cb), + (error, result) => { + this.updateFinalResult(error, result, testFilePath) + callback(error) + }, (url, cb) => { + return this.compileTab.compileTabLogic.importFileCb(url, cb) + } + ) + }).catch((error) => { + if (error) return + }) + } + + runTests () { + this.areTestsRunning = true + this.hasBeenStopped = false + this.readyTestsNumber = 0 + this.runningTestsNumber = this.data.selectedTests.length + yo.update(this.resultStatistics, this.createResultLabel()) + const stopBtn = document.getElementById('runTestsTabStopAction') + stopBtn.removeAttribute('disabled') + const runBtn = document.getElementById('runTestsTabRunAction') + runBtn.setAttribute('disabled', 'disabled') + this.call('editor', 'clearAnnotations') + this.testsOutput.innerHTML = '' + this.testsOutput.hidden = true + this.testsExecutionStopped.hidden = true + this.testsExecutionStoppedError.hidden = true + const tests = this.data.selectedTests + if (!tests) return + this.resultStatistics.hidden = tests.length === 0 + async.eachOfSeries(tests, (value, key, callback) => { + if (this.hasBeenStopped) return + this.runTest(value, callback) + }) + } + + stopTests () { + this.hasBeenStopped = true + const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel') + stopBtnLabel.innerText = 'Stopping' + const stopBtn = document.getElementById('runTestsTabStopAction') + stopBtn.setAttribute('disabled', 'disabled') + const runBtn = document.getElementById('runTestsTabRunAction') + runBtn.setAttribute('disabled', 'disabled') + } + + updateGenerateFileAction (currentFile) { + let el = yo`` + if ( + !currentFile || + (currentFile && currentFile.split('.').pop().toLowerCase() !== 'sol') + ) { + el.setAttribute('disabled', 'disabled') + el.setAttribute('title', 'No solidity file selected') + } + if (!this.generateFileActionElement) { + this.generateFileActionElement = el + } else { + yo.update(this.generateFileActionElement, el) + } + return this.generateFileActionElement + } + + updateRunAction (currentFile) { + let el = yo` + + ` + const isSolidityActive = this.appManager.actives.includes('solidity') + if (!currentFile || !isSolidityActive || (currentFile && currentFile.split('.').pop().toLowerCase() !== 'sol')) { + el.setAttribute('disabled', 'disabled') + if (!currentFile || (currentFile && currentFile.split('.').pop().toLowerCase() !== 'sol')) { + el.setAttribute('title', 'No solidity file selected') + } else { + el.setAttribute('title', 'The "Solidity Plugin" should be activated') + // @todo(#2747) we can activate the plugin here + } + } + if (!this.runActionElement) { + this.runActionElement = el + } else { + yo.update(this.runActionElement, el) + } + return this.runActionElement + } + + updateStopAction () { + return yo` + + ` + } + + updateTestFileList (tests) { + const testsMessage = (tests && tests.length ? this.listTests() : 'No test file available') + let el = yo`
${testsMessage}
` + if (!this.testFilesListElement) { + this.testFilesListElement = el + } else { + yo.update(this.testFilesListElement, el) + } + return this.testFilesListElement + } + + selectAll () { + return yo` +
+ + +
+ ` + } + + infoButton () { + return yo` + + + + ` + } + + createResultLabel () { + if (!this.data.selectedTests) return yo`` + const ready = this.readyTestsNumber ? `${this.readyTestsNumber}` : '0' + return yo`Progress: ${ready} finished (of ${this.runningTestsNumber})` + } + + render () { + this.onActivationInternal() + this.testsOutput = yo`` + + this.recorderCard = new Card({}, {}, { title: 'Transactions recorded', collapsedView: collapsedView }) + this.recorderCard.event.register('expandCollapseCard', (arrow, body, status) => { + body.innerHTML = '' + status.innerHTML = '' + if (arrow === 'down') { + status.appendChild(collapsedView) + body.appendChild(expandedView) + } else if (arrow === 'up') { + status.appendChild(collapsedView) + } + }) + } + + render () { + this.udappUI = new UniversalDAppUI(this.blockchain, this.logCallback) + this.blockchain.resetAndInit(this.config, { + getAddress: (cb) => { + cb(null, $('#txorigin').val()) + }, + getValue: (cb) => { + try { + const number = document.querySelector('#value').value + const select = document.getElementById('unit') + const index = select.selectedIndex + const selectedUnit = select.querySelectorAll('option')[index].dataset.unit + let unit = 'ether' // default + if (['ether', 'finney', 'gwei', 'wei'].indexOf(selectedUnit) >= 0) { + unit = selectedUnit + } + cb(null, Web3.utils.toWei(number, unit)) + } catch (e) { + cb(e) + } + }, + getGasLimit: (cb) => { + try { + cb(null, '0x' + new ethJSUtil.BN($('#gasLimit').val(), 10).toString(16)) + } catch (e) { + cb(e.message) + } + } + }) + this.renderInstanceContainer() + this.renderSettings() + this.renderDropdown(this.udappUI, this.fileManager, this.compilersArtefacts, this.config, this.editor, this.logCallback) + this.renderRecorder(this.udappUI, this.fileManager, this.config, this.logCallback) + this.renderRecorderCard() + return this.renderContainer() + } +} diff --git a/src/app/ui/TreeView.js b/src/app/ui/TreeView.js new file mode 100644 index 0000000000..6cb5bea2ad --- /dev/null +++ b/src/app/ui/TreeView.js @@ -0,0 +1,196 @@ +'use strict' +var yo = require('yo-yo') +var csjs = require('csjs-inject') +var css = csjs` + .li_tv { + list-style-type: none; + -webkit-margin-before: 0px; + -webkit-margin-after: 0px; + -webkit-margin-start: 0px; + -webkit-margin-end: 0px; + -webkit-padding-start: 0px; + margin-left: 10px; + } + .ul_tv { + list-style-type: none; + -webkit-margin-before: 0px; + -webkit-margin-after: 0px; + -webkit-margin-start: 0px; + -webkit-margin-end: 0px; + -webkit-padding-start: 0px; + } + .caret_tv { + width: 10px; + flex-shrink: 0; + } + .label_tv { + align-items: center; + } + .label_tv>span { + word-break: break-word; + } +` + +var EventManager = require('../../lib/events') + +/** + * TreeView + * - extendable by specifying custom `extractData` and `formatSelf` function + * - trigger `nodeClick` and `leafClick` + */ +class TreeView { + + constructor (opts) { + this.event = new EventManager() + this.extractData = opts.extractData || this.extractDataDefault + this.formatSelf = opts.formatSelf || this.formatSelfDefault + this.view = null + this.expandPath = [] + } + + render (json, expand) { + var view = this.renderProperties(json, expand) + if (!this.view) { + this.view = view + } + return view + } + + update (json) { + if (this.view) { + yo.update(this.view, this.render(json)) + } + } + + renderObject (item, parent, key, expand, keyPath) { + var data = this.extractData(item, parent, key) + var children = (data.children || []).map((child, index) => { + return this.renderObject(child.value, data, child.key, expand, keyPath + '/' + child.key) + }) + return this.formatData(key, data, children, expand, keyPath) + } + + renderProperties (json, expand, key) { + key = key || '' + var children = Object.keys(json).map((innerkey) => { + return this.renderObject(json[innerkey], json, innerkey, expand, innerkey) + }) + return yo`
    ${children}
` + } + + formatData (key, data, children, expand, keyPath) { + var self = this + var li = yo`
  • ` + var caret = yo`
    ` + var label = yo` +
    + ${caret} + ${self.formatSelf(key, data, li)} +
    ` + const expanded = self.expandPath.includes(keyPath) + li.appendChild(label) + if (data.children) { + var list = yo`
      ${children}
    ` + list.style.display = expanded ? 'block' : 'none' + caret.className = list.style.display === 'none' ? `fas fa-caret-right caret ${css.caret_tv}` : `fas fa-caret-down caret ${css.caret_tv}` + caret.setAttribute('data-id', `treeViewToggle${keyPath}`) + label.onclick = function () { + self.expand(keyPath) + if (self.isExpanded(keyPath)) { + if (!self.expandPath.includes(keyPath)) self.expandPath.push(keyPath) + } else { + self.expandPath = self.expandPath.filter(path => path !== keyPath) + } + } + label.oncontextmenu = function (event) { + self.event.trigger('nodeRightClick', [keyPath, data, label, event]) + } + li.appendChild(list) + } else { + caret.style.visibility = 'hidden' + label.oncontextmenu = function (event) { + self.event.trigger('leafRightClick', [keyPath, data, label, event]) + } + label.onclick = function (event) { + self.event.trigger('leafClick', [keyPath, data, label, event]) + } + } + return li + } + + isExpanded (path) { + var current = this.nodeAt(path) + if (current) { + return current.style.display !== 'none' + } + return false + } + + expand (path) { + var caret = this.caretAt(path) + var node = this.nodeAt(path) + if (node) { + node.style.display = node.style.display === 'none' ? 'block' : 'none' + caret.className = node.style.display === 'none' ? `fas fa-caret-right caret ${css.caret_tv}` : `fas fa-caret-down caret ${css.caret_tv}` + this.event.trigger('nodeClick', [path, node]) + } + } + + caretAt (path) { + var label = this.labelAt(path) + if (label) { + return label.querySelector('.caret') + } + } + + itemAt (path) { + return this.view.querySelector(`li[key="${path}"]`) + } + + labelAt (path) { + return this.view.querySelector(`div[key="${path}"]`) + } + + nodeAt (path) { + return this.view.querySelector(`ul[key="${path}"]`) + } + + updateNodeFromJSON (path, jsonTree, expand) { + var newTree = this.renderProperties(jsonTree, expand, path) + var current = this.nodeAt(path) + if (current && current.parentElement) { + current.parentElement.replaceChild(newTree, current) + } + } + + formatSelfDefault (key, data) { + return yo`` + } + + extractDataDefault (item, parent, key) { + var ret = {} + if (item instanceof Array) { + ret.children = item.map((item, index) => { + return {key: index, value: item} + }) + ret.self = 'Array' + ret.isNode = true + ret.isLeaf = false + } else if (item instanceof Object) { + ret.children = Object.keys(item).map((key) => { + return {key: key, value: item[key]} + }) + ret.self = 'Object' + ret.isNode = true + ret.isLeaf = false + } else { + ret.self = item + ret.children = null + ret.isNode = false + ret.isLeaf = true + } + return ret + } +} + +module.exports = TreeView diff --git a/src/app/ui/auto-complete-popup.js b/src/app/ui/auto-complete-popup.js new file mode 100644 index 0000000000..9a472c503d --- /dev/null +++ b/src/app/ui/auto-complete-popup.js @@ -0,0 +1,213 @@ +var yo = require('yo-yo') +var remixLib = require('remix-lib') +var EventManager = remixLib.EventManager +var Commands = require('../../lib/commands') + +// -------------- styling ---------------------- +var css = require('./styles/auto-complete-popup-styles') + +/* USAGE: + + var autoCompletePopup = new AutoCompletePopup({ + options: [] + }) + autoCompletePopup.event.register('handleSelect', function (input) { }) + autoCompletePopup.event.register('updateList', function () { }) + +*/ + +class AutoCompletePopup { + constructor (opts = {}) { + var self = this + self.event = new EventManager() + self.isOpen = false + self.opts = opts + self.data = { + _options: [] + } + self._components = {} + self._view + self._startingElement = 0 + self._elementsToShow = 4 + self._selectedElement = 0 + this.extraCommands = [] + this.extendAutocompletion() + } + + render () { + var self = this + let autoComplete = yo` +
    +
    + ${self.data._options.map((item, index) => { + return yo` +
    +
    { self.handleSelect(event.srcElement.innerText) }}> + ${getKeyOf(item)} +
    +
    + ${getValueOf(item)} +
    +
    + ` + })} +
    +
    +
    Page ${(self._startingElement / self._elementsToShow) + 1} of ${Math.ceil(self.data._options.length / self._elementsToShow)}
    +
    +
    + ` + function setUpPopUp (autoComplete) { + handleOpenPopup(autoComplete) + handleListSize(autoComplete) + } + + function handleOpenPopup (autoComplete) { + autoComplete.style.display = self.data._options.length > 0 ? 'block' : 'none' + } + + function handleListSize (autoComplete) { + if (self.data._options.length >= self._startingElement) { + for (let i = self._startingElement; i < (self._elementsToShow + self._startingElement); i++) { + let el = autoComplete.querySelectorAll('.item')[i] + if (el) { + el.classList.remove(css.listHandlerHide) + el.classList.add(css.listHandlerShow) + } + } + } + } + setUpPopUp(autoComplete) + if (!this._view) this._view = autoComplete + return autoComplete + } + + handleSelect (text) { + this.removeAutoComplete() + this.event.trigger('handleSelect', [text]) + } + + moveUp () { + if (this._selectedElement === 0) return + this._selectedElement-- + this._startingElement = this._selectedElement > 0 ? this._selectedElement - 1 : 0 + this.event.trigger('updateList') + yo.update(this._view, this.render()) + } + + moveDown () { + if (this.data._options.length <= this._selectedElement + 1) return + this._selectedElement++ + this._startingElement = this._selectedElement - 1 + this.event.trigger('updateList') + yo.update(this._view, this.render()) + } + + handleAutoComplete (event, inputString) { + if (this.isOpen && (event.which === 27 || event.which === 8 || event.which === 46)) { + // backspace or any key that should remove the autocompletion + this.removeAutoComplete() + return true + } + if (this.isOpen && (event.which === 13 || event.which === 9)) { + // enter and tab (validate completion) + event.preventDefault() + if (this.data._options[this._selectedElement]) { + this.handleSelect(getKeyOf(this.data._options[this._selectedElement])) + } + this.removeAutoComplete() + return true + } + if (this.isOpen && event.which === 38) { + // move up + event.preventDefault() + this.isOpen = true + this.moveUp() + return true + } + if (this.isOpen && event.which === 40) { + // move down + event.preventDefault() + this.isOpen = true + this.moveDown() + return true + } + if (event.which === 13 || event.which === 9) { + // enter || tab and autocompletion is off, just returning false + return false + } + let textList = inputString.split(' ') + let autoCompleteInput = textList.length > 1 ? textList[textList.length - 1] : textList[0] + if (inputString.length >= 2) { + // more than 2 letters, start completion + this.data._options = [] + Commands.allPrograms.forEach(item => { + const program = getKeyOf(item) + if (program.substring(0, program.length - 1).includes(autoCompleteInput.trim())) { + this.data._options.push(item) + } else if (autoCompleteInput.trim().includes(program) || (program === autoCompleteInput.trim())) { + Commands.allCommands.forEach(item => { + const command = getKeyOf(item) + if (command.includes(autoCompleteInput.trim())) { + this.data._options.push(item) + } + }) + } + }) + this.extraCommands.forEach(item => { + const command = getKeyOf(item) + if (command.includes(autoCompleteInput.trim())) { + this.data._options.push(item) + } + }) + + if (this.data._options.length === 1 && event.which === 9) { + // if only one option and tab is pressed, we resolve it + event.preventDefault() + textList.pop() + textList.push(getKeyOf(this.data._options[0])) + this.handleSelect(`${textList}`.replace(/,/g, ' ')) + this.removeAutoComplete() + return + } + if (this.data._options.length) this.isOpen = true + yo.update(this._view, this.render()) + return true + } + return false + } + + removeAutoComplete () { + if (!this.isOpen) return + this._view.style.display = 'none' + this.isOpen = false + this.data._options = [] + this._startingElement = 0 + this._selectedElement = 0 + yo.update(this._view, this.render()) + } + + extendAutocompletion () { + // TODO: this is not using the appManager interface. Terminal should be put as module + this.opts.appManager.event.on('activate', async (profile) => { + if (!profile.methods) return + profile.methods.forEach((method) => { + const key = `remix.call({name: '${profile.name}', key:'${method}', payload: []}).then((result) => { console.log(result) }).catch((error) => { console.log(error) })` + const keyValue = {} + keyValue[key] = `call ${profile.name} - ${method}` + if (this.extraCommands.includes(keyValue)) return + this.extraCommands.push(keyValue) + }) + }) + } +} + +function getKeyOf (item) { + return Object.keys(item)[0] +} + +function getValueOf (item) { + return Object.values(item)[0] +} + +module.exports = AutoCompletePopup diff --git a/src/app/ui/card.js b/src/app/ui/card.js new file mode 100644 index 0000000000..182d61659f --- /dev/null +++ b/src/app/ui/card.js @@ -0,0 +1,70 @@ +var yo = require('yo-yo') +var csjs = require('csjs-inject') +var EventManager = require('../../lib/events') + +module.exports = class Card { + constructor (api, events, opts) { + const self = this + self._api = api + self._events = events + self._opts = opts + self._view = {} + self.event = new EventManager() + } + render () { + const self = this + if (self._view.el) return self._view.el + + self._view.cardBody = yo`
    ` + self._view.arrow = yo`` + + self._view.expandCollapseButton = yo` +
    ${self._view.arrow}
    ` + + self._view.statusBar = yo`
    ${self._opts.collapsedView}
    ` + self._view.cardHeader = yo` +
    trigger(self._view.arrow)}> +
    +
    ${self._opts.title}
    + ${self._view.statusBar} +
    +
    ${self._view.expandCollapseButton}
    +
    ` + + function trigger (el) { + var body = self._view.cardBody + var status = self._view.statusBar + if (el.classList) { + el.classList.toggle('fa-angle-up') + var arrow = el.classList.toggle('fa-angle-down') ? 'up' : 'down' + self.event.trigger('expandCollapseCard', [arrow, body, status]) + } + } + + // HTML + self._view.el = yo` +
    + ${self._view.cardHeader} + ${self._view.cardBody} +
    ` + + return self._view.el + } + +} + +const css = csjs` + .cardContainer { + padding : 0 24px 16px; + margin : 0; + background : none; + } + .arrow { + font-weight : bold; + cursor : pointer; + font-size : 14px; + } + .arrow:hover { + } + +` diff --git a/src/app/ui/confirmDialog.js b/src/app/ui/confirmDialog.js new file mode 100644 index 0000000000..596b84d423 --- /dev/null +++ b/src/app/ui/confirmDialog.js @@ -0,0 +1,64 @@ +var yo = require('yo-yo') +var csjs = require('csjs-inject') +const copyToClipboard = require('./copy-to-clipboard') + +var css = csjs` + .txInfoBox { + } + .wrapword { + white-space: pre-wrap; /* Since CSS 2.1 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ + } +` + +// TODO: self is not actually used and can be removed +function confirmDialog (tx, amount, gasEstimation, self, newGasPriceCb, initialParamsCb) { + var onGasPriceChange = function () { + var gasPrice = el.querySelector('#gasprice').value + newGasPriceCb(gasPrice, (txFeeText, priceStatus) => { + el.querySelector('#txfee').innerHTML = txFeeText + el.gasPriceStatus = priceStatus + }) + } + + var el = yo` +
    +
    You are creating a transaction on the main network. Click confirm if you are sure to continue.
    +
    +
    From: ${tx.from}
    +
    To: ${tx.to ? tx.to : '(Contract Creation)'}
    +
    Amount: ${amount} Ether
    +
    Gas estimation: ${gasEstimation}
    +
    Gas limit: ${tx.gas}
    +
    Gas price: Gwei (visit ethgasstation.info to get more info about gas price)
    +
    Max transaction fee:
    +
    Data:
    +
    ${tx.data && tx.data.length > 50 ? tx.data.substring(0, 49) + '...' : tx.data} ${copyToClipboard(() => { return tx.data })}
    +
    +
    + + Do not ask for confirmation again. (the setting will not be persisted for the next page reload) +
    +
    + ` + + initialParamsCb((txFeeText, gasPriceValue, gasPriceStatus) => { + if (txFeeText) { + el.querySelector('#txfee').innerHTML = txFeeText + } + if (gasPriceValue) { + el.querySelector('#gasprice').value = gasPriceValue + onGasPriceChange() + } + if (gasPriceStatus !== undefined) { + el.gasPriceStatus = gasPriceStatus + } + }) + + return el +} + +module.exports = confirmDialog diff --git a/src/app/ui/contextMenu.js b/src/app/ui/contextMenu.js new file mode 100644 index 0000000000..f97720c6cd --- /dev/null +++ b/src/app/ui/contextMenu.js @@ -0,0 +1,69 @@ +var yo = require('yo-yo') +// -------------- copyToClipboard ---------------------- +var csjs = require('csjs-inject') + +var css = csjs` + .container + { + display: none; + position: fixed; + border-radius: 2px; + z-index: 1000; + box-shadow: 0 0 4px var(--dark); + } + .liitem + { + padding: 2px; + padding-left: 6px; + cursor: pointer; + color: var(--text-dark); + background-color: var(--light); + } + .liitem:hover + { + background-color: var(--secondary); + } + #menuitems + { + list-style: none; + margin: 0px; + } +` + +module.exports = (event, items) => { + event.preventDefault() + + function hide (event, force) { + if (container && container.parentElement && (force || (event.target !== container))) { + container.parentElement.removeChild(container) + } + window.removeEventListener('click', hide) + } + + const menu = Object.keys(items).map((item, index) => { + const current = yo`` + current.onclick = () => { hide(null, true); items[item]() } + return current + }) + const container = yo`` + + container.style.left = event.pageX + 'px' + container.style.top = event.pageY + 'px' + container.style.display = 'block' + document.querySelector('body').appendChild(container) + + const menuItemsContainer = document.getElementById('menuItemsContainer') + const boundary = menuItemsContainer.getBoundingClientRect() + + if (boundary.bottom > (window.innerHeight || document.documentElement.clientHeight)) { + menuItemsContainer.style.position = 'absolute' + menuItemsContainer.style.bottom = '10px' + menuItemsContainer.style.top = null + } + + setTimeout(() => { + window.addEventListener('click', hide) + }, 500) + + return { hide } +} diff --git a/src/app/ui/copy-to-clipboard.js b/src/app/ui/copy-to-clipboard.js new file mode 100644 index 0000000000..85f88d0dd9 --- /dev/null +++ b/src/app/ui/copy-to-clipboard.js @@ -0,0 +1,39 @@ +var yo = require('yo-yo') +// -------------- copyToClipboard ---------------------- +const copy = require('copy-text-to-clipboard') +var addTooltip = require('./tooltip') +// -------------- styling ---------------------- +var csjs = require('csjs-inject') + +var css = csjs` + .copyIcon { + margin-left: 5px; + cursor: pointer; + } +` + +module.exports = function copyToClipboard (getContent, tip = 'Copy value to clipboard', icon = 'fa-copy') { + var copyIcon = yo`` + copyIcon.onclick = (event) => { + event.stopPropagation() + var copiableContent + try { + copiableContent = getContent() + } catch (e) { + addTooltip(e.message) + return + } + if (copiableContent) { // module `copy` keeps last copied thing in the memory, so don't show tooltip if nothing is copied, because nothing was added to memory + try { + if (typeof copiableContent !== 'string') { + copiableContent = JSON.stringify(copiableContent, null, '\t') + } + } catch (e) {} + copy(copiableContent) + addTooltip('Copied value to clipboard.') + } else { + addTooltip('Cannot copy empty content!') + } + } + return copyIcon +} diff --git a/src/app/ui/draggableContent.js b/src/app/ui/draggableContent.js new file mode 100644 index 0000000000..77892a7e45 --- /dev/null +++ b/src/app/ui/draggableContent.js @@ -0,0 +1,127 @@ +'use strict' +var yo = require('yo-yo') +var csjs = require('csjs-inject') + +var css = csjs` + .containerDraggableModal { + position: absolute; + z-index: 1000; + text-align: center; + width: 500px; + height: 500px; + overflow-y: hidden; + } + + .headerDraggableModal { + cursor: move; + z-index: 10; + text-overflow: ellipsis; + overflow-x: hidden; + } + + .modalActions { + float: right; + } + + .modalAction { + padding-right: 1px; + padding-left: 1px; + cursor: pointer; + } +` + +module.exports = + class DraggableContent { + constructor (closeCb) { + this.closeCb = closeCb + this.isMaximised = false + } + + render (title, url, content) { + this.content = content + var el = yo` +
    +
    +
    ${title} - ${url} +
    + { this.minimize() }} class="fas fa-window-minimize ${css.modalAction}"> + { this.maximise() }} class="fas fa-window-maximize ${css.modalAction}"> + { this.close() }} class="fas fa-window-close-o ${css.modalAction}"> +
    +
    +
    + ${content} +
    ` + dragElement(el) + el.style.top = '20%' + el.style.left = '50%' + this.el = el + return el + } + setTitle (title) { + this.el.querySelector('.title span').innerHTML = title + } + minimize () { + this.isMaximised = false + this.content.style.display = 'none' + this.el.style.height = 'inherit' + this.el.style.width = '150px' + this.el.querySelector('.title').style.width = '146px' + } + maximise () { + this.content.style.display = 'block' + var body = document.querySelector('body') + this.el.style.height = this.isMaximised ? '500px' : body.offsetHeight + 'px' + this.el.style.width = this.isMaximised ? '500px' : body.offsetWidth + 'px' + this.isMaximised = !this.isMaximised + this.el.style.top = this.isMaximised ? '0%' : '20%' + this.el.style.left = this.isMaximised ? '0%' : '50%' + this.el.querySelector('.title').style.width = 'inherit' + } + close () { + if (this.closeCb) this.closeCb() + if (this.el.parentElement) { + this.el.parentElement.removeChild(this.el) + } + } +} + +function dragElement (elmnt) { + var pos1 = 0 + var pos2 = 0 + var pos3 = 0 + var pos4 = 0 + + elmnt.querySelector('.title').onmousedown = dragMouseDown + + function dragMouseDown (e) { + e = e || window.event + if (e.button !== 0) return + e.preventDefault() + // get the mouse cursor position at startup: + pos3 = e.clientX + pos4 = e.clientY + document.onmouseup = closeDragElement + // call a function whenever the cursor moves: + document.onmousemove = elementDrag + } + + function elementDrag (e) { + e = e || window.event + e.preventDefault() + // calculate the new cursor position: + pos1 = pos3 - e.clientX + pos2 = pos4 - e.clientY + pos3 = e.clientX + pos4 = e.clientY + // set the element's new position: + elmnt.style.top = (elmnt.offsetTop - pos2) + 'px' + elmnt.style.left = (elmnt.offsetLeft - pos1) + 'px' + } + + function closeDragElement () { + /* stop moving when mouse button is released: */ + document.onmouseup = null + document.onmousemove = null + } +} diff --git a/src/app/ui/dropdown.js b/src/app/ui/dropdown.js new file mode 100644 index 0000000000..4edad93849 --- /dev/null +++ b/src/app/ui/dropdown.js @@ -0,0 +1,127 @@ +var yo = require('yo-yo') +var EventManager = require('../../lib/events') + +// -------------- styling ---------------------- + +var css = require('./styles/dropdown-styles') + +/* USAGE: + + var dropdown = new Dropdown({ + options: [ + 'knownTransaction', + 'unknownTransaction', + 'log', + 'info', + 'error' + ], + defaults: ['knownTransaction'] + }) + dropdown.event.register('deselect', function (label) { }) + dropdown.event.register('select', function (label) { }) + +*/ +class Dropdown { + constructor (opts = {}) { + var self = this + self.event = new EventManager() + self.data = { + _options: opts.options || [], + _dependencies: opts.dependencies || [], + selected: opts.defaults || [], + _elements: [] + } + self._view = {} + self._api = opts.api + self._events = opts.events + } + render () { + var self = this + if (self._view.el) return self._view.el + self._view.selected = yo` +
    + [${self.data.selected.length}] ${self.data.selected.join(', ')} + +
    + ` + self._view.el = yo` +
    + ${self._view.selected} + +
    + ` + return self._view.el + function emit (event) { + var input = event.currentTarget + var label = input.nextSibling.innerText + if (input.checked) { + self.data.selected.push(label) + if (event.type === 'change') { + self.event.trigger('select', [label]) + updateDependencies(label) + } + } else { + var idx = self.data.selected.indexOf(label) + self.data.selected.splice(idx, 1) + if (event.type === 'change') { + self.event.trigger('deselect', [label]) + updateDependencies(label) + } + } + self._view.selected.children[0].innerText = `[${self.data.selected.length}] ${self.data.selected.join(', ')}` + } + function updateDependencies (changed) { + if (self.data._dependencies[changed]) { + for (var dep in self.data._dependencies[changed]) { + var label = self.data._dependencies[changed][dep] + var el = self.data._elements[self.data._options.indexOf(label)] + el.checked = !el.checked + emit({currentTarget: el, type: 'changeDependencies'}) + } + } + } + function show (event) { + event.stopPropagation() + var options = event.currentTarget.children[1] + var parent = event.target.parentElement + var isOption = parent === options || parent.parentElement === options + if (isOption) return + if (options.style.display === 'none') { + options.style.display = '' + document.body.addEventListener('click', handler) + } else { + options.style.display = 'none' + document.body.removeEventListener('click', handler) + } + function handler (event) { + options.style.display = 'none' + document.body.removeEventListener('click', handler) + } + } + } +} + +module.exports = Dropdown diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js new file mode 100644 index 0000000000..7127ab451d --- /dev/null +++ b/src/app/ui/landing-page/landing-page.js @@ -0,0 +1,301 @@ +let yo = require('yo-yo') +let csjs = require('csjs-inject') +let globalRegistry = require('../../../global/registry') +let CompilerImport = require('../../compiler/compiler-imports') +var modalDialogCustom = require('../modal-dialog-custom') +var tooltip = require('../tooltip') +var GistHandler = require('../../../lib/gist-handler') +var QueryParams = require('../../../lib/query-params.js') +import * as packageJson from '../../../../package.json' +import { ViewPlugin } from '@remixproject/engine' + +let css = csjs` + .text { + cursor: pointer; + font-weight: normal; + max-width: 300px; + user-select: none; + } + .text:hover { + text-decoration: underline; + } + .homeContainer { + user-select:none; + } + .thisJumboton { + padding: 2.5rem 0rem; + margin-bottom: 4rem; + display: flex; + align-items: center; + } + .hpLogoContainer { + margin:30px; + padding-right: 90px; + } + .jumboBtnContainer { + } + .headlineContainer { + margin: 0 50px 0 70px; + } + .hpSections { + min-width: 640px; + } + .labelIt { + margin-bottom: 0; + } + .seeAll { + margin-top: 7px; + white-space: nowrap; + } + .importFrom p { + margin-right: 10px; + } + .logoContainer { + float: left; + } + .logoContainer img{ + height: 150px; + opacity: 0.7; + } + .enviroments { + display: flex; + } + .envLogo { + height: 16px; + } + .envLabel { + cursor: pointer; + } + .envButton { + width: 120px; + height: 70px; + } +} +` + +const profile = { + name: 'home', + displayName: 'Home', + methods: [], + events: [], + description: ' - ', + icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbEAAAGRCAYAAADrfI2HAAAACXBIWXMAACxKAAAsSgF3enRNAAAgAElEQVR4nO2d4XEUR9OA11/t/QZHAESAHAFyBBYRICKwiAARgUUEliKwFIGlCCxFYBTBy/3WVfHVQK9Zbu9OuzfdPTM7z1OlwqXD4rS3O890T0/PT1++fGkAAABK5P/41AAAoFSQGAAAFAsSAwCAYkFiAABQLEgMAACKBYkBAECxIDEAACgWJAYAAMWCxAAAoFiQGAAAFAsSAwCAYmn56AB0aNvFQdM0T0f+sNvV6uHz4LsAMAkaAAOs0baL503TPJfvHsqfQU4Hvb/5avA/xnPfNM2n3k+5lj+D7G7Df6xWD9cG/y5AsSAxqBKJmp6LmJ73vp4Vcj3uRG7XPcl9Wq0ePg3+JsCMQWIwa3pR1WFPWC9n/mvfSER3K2lLojeYLUgMZkPbLrqU32FPWk/4hL9y10ktRG+r1cPt4G8AFAgSg2KRKOuwJ665R1ja3Eg68ppoDUoFiUExSKR12PtCWrp0UrskUoNSQGKQNRJtHcmXRUUgbGYZZNaTGtsBIEuQGGSHVA4ei7hKqRacOzcitUsqICEnkBhkAeIqilAkco7QIAeQGCQDcc2CILQzUo6QCiQGrkhxxrF8UZgxL65ChLZaPVzWfiHADyQGLrTt4lDE9YYrPnvuZf3sjHQjWIPEwIxe1HVCurBabkRmRGdgAhIDdaQs/lTWuuiYAY1EZ2eSbmTtDNRAYqCGpAxP2c8FO+j2n52SagQNkBhE07aLY5EXKUOYwoWkGukOAnuDxGBvKpLXjfz5qXfe139nfPX4PGZA7jUq7rP+vf45ZjV03T+lfyPsAxKDycxQXpvO5holJE8kXduI4J72jpaZy+eAzGAySAxGMwN5dScnX/cOkZxFKksE1x3yeVD4uiQyg9EgMXiUguV10xPWdW1VcdIR5aDgo2rC5ukTCkBgF0gMtlJYteGyOxuLQx83s3Zo6FFBUrsQmVGaDwOQGAyQfV5hT89vgxfzgvOvIlg7ny33/pVLuSfPkBn0QWLwHzKohe4a7zO9KpxxZUghZ7fdS1RGBxD4ChKDr7Tt4khmurnNxpe9c6wYuJyQCU0ntBwj8hCFH7NeBkiscmT2fZ7ZzBtxZUTmQvtAirFukFjFtO3iNLPU4ZWI63zwCmRBL+WYU1Pne4nKKMmvECRWIVJ1eJ7JIHTfO1SR1FBBSAn/SUaNnq9EZkRlFYHEKkLSQiH6+j2D3/pK0kDMngunl27MYS/hUkRGGroSkFglZBJ9LeU9cFjiTJH77CSDtTOiskpAYhXQtouzxNHXvczSKYuvhEzOlCMqqwAkNmNkzeI8YWeGe+mBR6FGpfT2Hp4klNlHuQ+ZQM0QJDZT2nYRBo0/Ev12NHCFH8hAZmFCdURnl/mBxGaGDBbnidYkkBfsJAOZvVutHs4G34ViQWIzQtKHlwmKN0gbwiQSy4yijxmBxGZCovQh8oIoRGYhMnrjfCVJL84EJFY4iQYBOoqDKglPTnjLJKxskFjBJKo+vJDoi31eoE6i/YwXq9XD8eC7UARIrFDkYb90XE+4kyMwKNoAcyQ9fup8fx+SWSiP/6v9ApSIPOB/Oz3gS6noOkBg4IVUED6XIgwPQjbjk2Q3oCCQWGG07eLcsYAjDCAHlCRDCkJUtFo9hI4fv0ohhjVhUnjdtgtSiwVBOrEQpIDj0uncL9r1rCHXv5ulhz+fbvnvo8ciVpmIhMG5q4z7vOW/b0lvfSNB82r2kxUCEisAeYCvnQo4qt1D0xNVJ6lD+XPKdd9ZJCD/xqeJqeA7Ed11T3hVCs658GPnZwl5gMQyR3L01w7rX1VFX1LSfSjrLociLq1r/GJb9abyfr6lCO26J7aN/+6ccI7KLqSgiYg4U5BYxjgKbPbRl8zgO1kdGl/TD6vVw+ngu9/exyfjKGIp98zXrzlv5nWMyqhczBgklimyuHxmPNguZc/X7HL/MgE4lLUnj3XEPsvV6uHp+jfbdhHey1+Dv238XuYsNcdeoYgsU5BYhojA/jR+Z3cSfc1mUBNJHIm8Up8wPOgE0baL6wRCXedeCoSu55Q6dpr0ze6ZmQNILDOcBDaLPH/vWPyjDE4SXucu7K3rvidrcP8O/lZaliK0yzkIzamDzVIiMkSWCUgsIxwEthR5Fd0rrhdxeTeNncqvXbm9lNXn/H5nITSnXqKILCOQWCY4CKzort09caU87n4qX0u09yyrT0kntPNSu7Q4nOqAyDIBiWWAg8BuRGDFpg/bdlHqjfpCxJvqlO0Yblarh8MC3/dXHPqLIrIMoO1UYhwEFqIBqqrScSwHP4IzEkUeSEGGBV2bKvotJgSJJcRBYG/pOJCc9xlUSlaLbP4+lGImCxBZYpBYIowFtpSiAg77A1Ok6jJrpJFweN4+Gr3PTmTZX4s5gsQSYCywe8nTZ78gH65D6GDRtotbKX6AgpD7+FY+w+wj/tXqIaR13w5e0CGI7JL72B8k5oykHaw6ZNzJ0SlZLzSHBfcgLhH5M9nXc80AUA69idgT+Qz/DJu5pZgiWyQ78VqyFdpwHycAiTli3Asx+7Y4Iq9rOdBzfUPqS1Iy2bExmt+RSQjdSP4WmWW7RiT74A4tRTb4LpiBxJzoHadiIbALOXk5S4EFMclm378fabv0UtJTLJJnStsuzrYIrE/4jP8Jn3mukxLJVpiJTO53cACJOeAgsCzXI8Lv3baLUzkmZGwHhVyqvZayv+6jYUHAY4T1zQ/y798YDbijkYF5yvEnb2RSsrGjf2pEZFYl+G9E+GAMm50dMGz8mrPAjmTtb9/y8mX/lGTjzc733Xlc3dlc61GtrOF5HEraZ3C6cO/gzsPeAZ5WJfz/HSmj0DbrXprnZpdqMz50dtAIGnRBYsYY9szLUmCSPjpXlPbXQUBZYne940lGHSS5Yx3IiiDx52NSxHLNO7EdKg7GH2QionnUyZX078zq8E5jkf1aavuuEkBihhj2b8tVYKfSnUI7bfpWOl/EiPFGBuPLfdcO23bx2bH/4d6fce/U6tPIKO2jshQ7sjzHzlBktKcyBIkZIaXGfxv89OwE5ngERoxAtp62PBaR9PuYnzGBF7HRSibnl+3iRlKM2URlhiLjUE0jKOwwQAZ1i+MschRYGNj/cVgvyqEDvNfaxk1u6TYjXknhRza9JUUyhwbFHi+NxoTqQWLK9I5L1x50sxKYlM1fO0YmyRGxWPXg61NTVVt4Tv6QvWVZbBI2FNkrKhb1QWL6WKTVchPYkVTy5ZyqssI6GrufwynLexDupU9ybyVHRHZssK3h91x+x7mAxBSRtIj2Mfl3uQhM9n2FQfyvgg54VEWqzKyO9mgqi8LWCffUX7lEK4Ybos/Z0K8HElNCbkrtSsQ7eYiS02uZlfMR+15YDbJLx3W3nPldmkIn7/ZhJLInIjJ6LCqAxBSQm1E7BXSfSzWTpD+s9tAUh2xeteiesXf5/wzpWpAlT72JyLSLT15WHnWrgcR0OFfumtB1q8hBYGc1pw93YDEAZdmeKSFdejH5dZGJi/YxLm9KOMImd5BYJEbrYEepN0bK+tflxF55NaGd9qulrH4f3ksz4aTpNxGZdnXqGSc3xIHEIjBaB3ubukWNPFTXBnKeDQbl9qSWdvMmh7O6pMjqZvDC/jxh/1gcSCwO7dn4x9TNQkXMKZrdlojWZ1VrWf1UXkoZfurKviPlCtWXuXb6LwEktieyVqQ50N/I8enJ6BVweKx/JT1WRAPFcnurKMxzsF86fabJj+ox2kP2nrL7/UBieyB9ETXXiu5ldpcMWWD2KuAIjWWfO3W/sCZWQJZl9V7FOEspQ3/udPbaEzl0M1lRhKxZa//7l5TdTweJTaTXVkqL5JWIUpziccxIiFp+CRFn+H1lfaFokSmU25deVv9fh3b5TMO99KtMzKz5M7HILuW4Gi2eUaE6HSQ2ndjjLdY5SVmJKB04LI6LWSd0kT9Y/11FZO8Gf7ssYqKxkgetjUeMhDTravXgFZX9mXI9SU5G0Cz0+F0yPTASJDYBgzTiRcpCDsMDO/t00dfWgUbOldLeg+PJvp9hyWX1d3Jo59YJmGNU9l7u5VQcKf+OdPOYABKbhuaDcmfQBWA0UphiLbCPm2bqmzDaTNrHbC9ORLl9qWX1o8/GkuKXA4e08ZtUR7rIddBc036WcmwoDSQ2EklZaKURl3IYYMq1EMt/O/x+r7u1r8GrWxCRvTaqcrPeUDp1glNqWf3kwx17659vjSsYk11Pmahpro9RrTgSJDYC2fyreW7WaQZHlZ8ZDShhkDvYd4CW/8+ic7gpe5TblxiFXci65l4TIJmkWJzTFbhKnZo1WB9jA/wIkNg4NNOIV7IGlBQZiLRnrt0gFzWYGB6BYc3Yz7XEbvUqZ9r1Plv19k2D76RBc//Yq5xOvc4VJPYIUsKrdfjj0mBvSQxbiy324K3muWe9wc7y7C5VJpTbl1ZWr3ooay+9qFW9eJO6VVuHTOA0n/FTijx2g8R2IDeP5gwv9TrYDzget78XJYps5P1SUln9O8NDWbUG56zSbpISvxq8sB9PSCvuBont5kSx68FVpgv5Wg+IyUAn0i9JZI+lCUsqq39rlfqWdWaN6thcC2Q004pv2Du2HSS2BeVijtzSiP8h0Y7GYvQrqwetJzLNRXMTRkS3pcyq3xrvYdSKRrOManv9FbWgk8cWkNh2ik4jhvLctl2ERqknI84ryn5AkXUUi4IAC7YN/iWU1XfbI7b9DtFIml4rCtv6PuVMvONwLl7bLj57ry0ppxVfcYDmZpDYBiSi0DpLyz2N2Ovv+EpaSv0rD/LxpgdZsRv7K+sD/krot7jjeuYehXVtpKzvV62Ku4HA+uJqmuZ/0hP0t677/eAn2KOZViQa2wAS24zWzZIqjbjpmJjf5IH+3xahaQ2w5g+acmWbFevXM/ey+o19ELWRe05DYsv+Nd4irnVeSqcaNyQDoyXtZ5w7NuSnL1++DL5ZMxKya3V0f+e9J0z2lUxp6Hsl+8Uu5TBMja4kLzyKFyZ+VjeSjnQjpLB6hUGqZepjaNvF2If7TlLe5hvw97g/t/FB7tcj+ZpSgGW93jcgpPaVtuospWdlyScfqILE1mjbxSelgfwubPwdfNcQaVPzT8S/cK/0u3/0OuBzgshSSOy0VxzkIva1f3/Mwz25jVQMis9XDC5RZx+FZ7PPh10NtWuDdGIPGRC1HjDXnfaSpoldy9D63TeuvVng0Dg4hm62715WP7JS1Ftgms9XDE+8O8WLMLVS4CdsgP4OEvsRrdnNRYIOAueZDBCNDBJuEheR/ZJbm6peuX2OBR03ngITcooeXib4XE6V7lE2QPdAYoLiLHGZIAo72bKQnRLXa5Bxv8XTDMvqwyTLVWASGeYyyep441m2rlzk8ca6ErgUkNh3tGaJZ86Dw4HTycxTeeK9ryVHkWXYncO9wETIdQ3nzFMGkjXYtP1iH6pfF2uQ2DcUo7B7zzC/tx8sV9wfMhHZ88L6LXrxMYXAJArTaqKtzZME55ARjSmCxL6h1rEiwRrD+n6wnHiWosvAln6LtR8w+NarYnQDuXeaeOm5/0rWy7VaqFXfxaP6EnvFfWGhBY7brEhmt38PXsgP960GHRKpXneiX60efhr8pZmydn+474vqkEjh38ELefKLV9m94nWpft8YkZheFOY2IyogjdjnZaoO3L2IrIR+i1YkE5hQ0rqN23VSPAbJtRI4R6qOxBSjGdeNtNI65/fBC/nivtF4nXDNEqbT3JGCn8ZzQ+86hUVhHW4biTWjsdXqodp9Y7VLTKsVzK9e+8IKSiOu45aqgTxY61hSEp5pxXOljv6pI+5kVCsxxTYw3lHYbebFHNtIVdoNCZCU9yfFQ2U9cXumFaMx1zX5nKh5TUwrteSW85eZbYkCaygHrg7NU9G9cTu7S3Ft7Fmtpz9XGYnJLPF/gxem4z1juy14YGiIxuohk0a/MbhV/SlGY+HswqPBd2dOrZGY2aF8hpwWLrDAEY1L509GjX5jeOKVZVGMxn6rMdtRq8Q0ooGdR6NrImkCjcXfRmaYH6W7iDfVlwNXQoqy+nu5r18PXtmf37sqTwe0Ov1U93xVJ7G2XRwpzRI9H1TNfyt0FTmRReBfEgiNYyRmjOLzNYalRDChmvC53NehhdQ7xX/DpY2cVENqdPGoLl1f3ZqYHGEe2/HdbV+G8knTW9fwZMZ5LKfkWg9C1ZYDzx3FbSvbWHYnke86HUD5fbhsoZEJwF+DF6ZT1fNVlcQUCzo8N0RqLZCHh/9gTFf1ntCOjdbhqi0HnjOGexhHiauP8knKbver0vNeVYFHbelErVDbay1Mc4H8dOyxICG1IamZp7LGcKF8vEmSxsBgjuZ6TJcqfB3uw1DVOuVcNknPfRi8sB+e96vG5LiqAo/aIjGNWY5LmbjyZlGVJryS7ui+Yt9XssbAoI9mmXiYJGodJKqYyXCJxhSf+3er1UMVpz9XE4lJekHjZvbKNWtuFlWRbhhYZEasEaElawwMJsREEEFcb5um+TmkwZRPwtaacLpEY7IvTeP3r6ZKsZpITKlpbmmzscYjcuxFaFO3AWwtNIFy2DMKu+qtc5luKFYq5mocn3+t9bwq+pXWtCamsdDpFZ5rFVQsPWZkXYQWZtIyo74a/KXNvHLchwN2jJ0krUdc507nYJ0orel6RWO3SieTV7HuXEUkpli6+rNTGxqtPL5bFeU6Ek12EdquWTCtqApmRNbgTiZ/5hHXLhQ76ntFYxpba6qoAq5FYhrHHbiUrZZ60vQuRgjtxdjKSciLLXK4k7Xjy1w+V+UUvfk+LMXtQG7HRKWilnSihny8Cjq0IqdsTtQNM3BJHR31Uo797gQlnf4LP9JF0XfSKSNMSMJ+xLOcJiYSBWql1r0KPDT6Kc5+v9jsIzGlDZguHToUN4sWkUaQgoCvERoFHuUh65mHOUVcj6GYqjePcJSWQWafUqwhEqsxCiui5UwY+GTGjsAKRDbFZxVx7UJSdFrrch7R2KVCQcqzuRdPIbFxmEtBohKtXm/vZa0CAL4/X9eKh8p6HfKqMfbMunBqdunEtQ20z0up8FEqPlmHyj+oHolErg36gHrswdTYM3a/JrLPc9o/VoTEJA1wIFLqfzXGHbMDH0MfwcF3FVGsRNrEjaw5JStvBkiFrCudGzWydjn92eGU7KWcGt/In59F+kXILjuJyYB+KNI6FGGlPCXWfNd72y6CJP8YvKBHqBw7RGRQE8rHGG3Do8BDo9tQDHcit69fuZXsZyExmS0dypdWzloDr6rEpzJb3LSHSu13EZHNvg0NgMPA/7Ubjse5XYrNGjS5kbZh16nHlGQSk1lSJy+LUF8D1zUlo3WxPktJLc568yPUjdNz5DohbNvF54zHyXsR2nkKoblKTBYpT5SO8vDgtXJH7UdxSC02nKwMc0QyGpoViJsIqbVj78HaQcxa3EubMa++mD4Sk6jr2KEIQ5XV6uGnFP+uUy4/WV9FAG2k3P3SQWBJ1padxgRtLqYcxrsvphKTXO5Z4sKMfUl6xLdhWXAfSvCheJyelSuJwJIURxlXMFtjKjOTzc5hr1bbLq5lMbJEgTXyUCRD0hWHEp5bETZsXssDAlAcMlH2mOwl3aYi/7bG8SwpCGnQf0OxjcVYoyqx8AalKujv0lKHG0he/CAiOzC+ecPnhMigOCTF9pexwN5llK1wXZ83IFSLfpKJhxpqEpNOGbeJ9zNocZ9LKbrMwA4nHDS5Dy/l5uKASigCmSxbrxGFAiivg3DHMIeq4jDh+Cuctq01cVaRmFTU/V1w6nCdrG4WEdmpcUT2RCIymvFC1kilnvVkOUwan8rSyKFTn8SdzGxrTNgTe6sxcY4u7Cio9HMKLiXo8gF2s5FOHl2LrSZhtxJK8CE7nErox3DX64bfieWzRzcLqTUofalmnajxph18Z+z/mM8NZYH1jajR1NOSP8PMkxJ8yAWnEvqx9N/DD0Jp24X1KeVzlFgYb5p9RbZXOnHmAls6nI9UQsruvUTZAEmRSd9tIeON9bM91247f0qhzmT2XRObq8Aap5uklHUnSvAhKU4l9JqYPtszbxm3l8gmS0xm53MVWNM7ksCSkoonKMGHJDiV0Gvj8WyXul9sDH9OLcGftCYmVYipiziWvTNv+n82cgO9H/wf0/BYDyvpoWx6Jfh0wQcXMjh+ZF+eyXqy9bpYbCDxa++/O/F2hWap19zOwzg59hqOlpgMvtaNadfphHUtX592/WIa5eEO4XqpJexdCT5d8MGUGVQ8H8rRSlZoTCT7B14OnmcppDnone3oKbYnUsQzqvx+SiTmtcjftfW/3GOwjBWER5he8j6scHP93bYLSvBBnRkVjJUgsYNdP0eChU9dl5DeYcVHTqeQvGzbxemYCulRa2LhhxnfWCHi+iinKIdQ/GTP2X7shsStUZ4ic+iK8afcEwAqyMx/LgVj1sUdW+UzgUljZWi4EI6lCi245KDg18ZdhBqpkH70fT4qMTHwyeAFHULU9TZcUBFX7IcTuzHYdL1HPpC5dDWhBB9UKKyEfgzPHAqhYrNGUaIVoYWI7IV0qbfi0TFmTCR2ZhA6LuU8qyAvlcPTlNolWa/1zK03ISX4EEWBJfRjsV42iJ1wq7TRCmlHaZD8wigye/XY2L5TYjI4aS+w3oTB3KAbhMaHYp1OnGODXUrwYS8KLaEfi/WzHjtWqWaERGZHUvW4HPyFOHa6YqfEDNKIIfo63FVhGEG0xOjUMZkb+foki70AU/gkywkf5Ouqd0+VTvadOyxOrZBahufKn+GrXWtjj1Unap6jY13RFvuBeDw4JURi3XXo77/71Jv53aY8HBDmw5jiLYnw+w2xu8Gs29P0NNO1tNwjsabXfFyV7vgo5a0SJ9uCqq0Sk1y1VsjpUZId+4GYRmEyk0iVNkFMUCRyX46KOuQZW5dcs3ZChJfwngQBWz1XIWsUmuZGcmhZBxDWyuQ9aojseLLEFNNDH5z2FMVuxrNOJW4Nh/cEMQH06O1tah4bnJ2Ed2BcLBYqFGPeo8c69olch9hr+UQaLQxOt94lMY2c7l1Bx3lYt1PSuJ4/IyaAeB4Tnkju38h/yDTS6Z1pti/myxthvJICHo2jpw67zdd9NhZ2yIKfRipRc01tK0rl9dZyiI3E7hEYgA8iudgqO+tIp4j2b7L/98PghelsHOc3SmzbX57IVWHNYq3fawndRADgO7FjQu6FXJ79EM8UJgUvN23l2SYxjYt/NviOHdHv1yHKiX2PNN0F8CWLDcU7KGZMkPF1kArcg8E4uk1iGqkvzws8sPNE7h3eY2xlIpEYgC9ZbSi2wGKv2A40CvwGWcJtEosNM71nCLmX1w8u/B4gMQBfopcYjCWhsQTi1mlHAhv1dcZtEovFW2KxN0oJBRMcRgngS7YbihufJRAL1NcZBxJTmjmUFjVkX15PZSKAL0pt6KzXxWLxboWnHuAMJKY0cyBq0MXjsE4AGBK7Xm4tsTn0mZzCIMjaJLFoEkQNnqWi+xB7IxOFAaSBtWhdYiOxQYGc1ZpYaViv4bFHDKBOcj+5YhDZlAYSKwMkBpCG3PdixS7dFH8OIBLzgQMjAcCC6pcaipeY82a9fYnt4EwkBlAmuVcnFs8cIrEaqimRGECZZN+1o3R2HcVSDQXswbps28W19B67ZM8YgA3SYPZICjKONlXDzYzilzqQWBmEB+k3+fqzbRc3PaERpQFEIGeHdeL6rbBrGfv8e510bQYSK5NX8vVH2y7uekJjkznACGQt/VDOPCx5IK9+EovEjNl0/o0yL+Xrfdsu7kVo15uO8QaoGWnEfSRfrFXNBCRmj2f1ZHgwfw9fbbtYdkJjHQ1qRCaQfXHNfX2rBGI3fw9a8CGx+RIe2DfyFdbRrnpRWvUpCJgnvcKMowLXt+BxBpNxJFYPXWFII+to5yI01tGgaHqFGaWvb8EemEgs3FTM9rMmPOh/NN8+q/teYUgxx51D3UhhxjHrWzCQWBjI2nYRe2GeUzVTDJvW0S4pDIHcaNvFEetbsM5AYlA1/62jyUTmig3WkIq19a1DxAWbQGKwi/4G624djQ3WYEZvfeuogHMCc6D65uJ0sYexdOto/7bt4lPbLs4Kab4MBdC2i+O2XYQio3/lPpuLwGJPhn6M2GdwULJujHpDZCRmjBRLvGia5l2CG8aKZ/LwkGIEFVarh3NJXS9ncEXv5Hl/sVo95N7F3vsZjr0eg+KzbRKLvZE8Z+jRH4Ls5DcjpN9Wq4ez1eohXJefm6Z5K+tNJRJmlr+uVg+HpBVBk9Xq4VQGuY8FXtgrea6DuA7keef5cGCbxIo5LbS0fU6hQCLMOlerh6PV6uGnpmleN01zUcAMNLy/t2FmSSk+WCHPx4lkL3Ke6C3luQ3P78/yPJ8jLn8o7EiMlLJ/LWfPdO9LeFjPwhcViuCFyOBIsiSnmayR5binsrTCDvX3uy0SgwSEqFJmoeHBvcngMwgzzZAaOUVgkIIgi5C6llSddZHEGG4zy0TELt14R47qp9xvk1jsgFVa1VoW7zfsi2nbxalUaKWceQaB/rJaPRyTHoEckMKP8Jx+SJh6fybbTa6t19EdKe35HrzfbRIrZk1MiI1akofkocRYPqD3gxf9CDPd11K0QU9FyApZL+uKPy4Svrcwwfy7bReXsq8NErJNYuBEmNGFfVdhhpewI0GY2b6Tog3aTUHWiMyOpfgjZdr9N9k3eepwbuA2itlPZ7Wv1EpipBMfIXygIS0RZnSJizhCeibI62zwCkDGyNaVkNb7NfF6WciehAYAJ4NX8sdzfS9a9JvWI7dJbPAXJ+IdUcS+X7dZVEg/tO0i5Pf/STyLupA9LRRtQNFI8cdzKf5ItV4Wxrw/pJvN0eBVAxJGf1mxTWLRFHaBzfPavaKNW2mym4ob2axM0QbMCin+eJ5B8cdfTsUfGhkkzwls7PXY+Jluk5jGLxWu3ScAABFHSURBVFZS1w6PdN6tpB1SrXv1izbYrAyzpFf8cZBD8cfgu5lRWAHXxve6UWIFVqZFv1+HyDHVuleYvXygaANqQtbLQvHHLwmLP6x7pZZW5l9UYUfDBR6Q4kH6KEUbp4NXACpAGggcSnso7+KP3NP13mNSbKCwMVjZJbFiOq4rpcesI7GNH4ARV1K0cULRBsC39m5S/PFu29qKAdbPfG2BwsaxbJfENv4PEyAS+xGPWVlXtHFE0QbAENlK0hV/WGO99mwS2RgSWw+wcUzbJbHS1sViQ2PrCkXL63kvHeYp2gB4hF7xxwvj4o+Ng64isX0I3bI0ShudN17PXRKL/QW990DFvl9TiRnJZSkzygMpLwaAkfSKP341WB9aWmZDlNpdFbXROUkk5txXLPb9ekhXc53xoivaYN0LYH+MOuVbZ7I0xtaS9og12yYFuySm8Qt6SmzjLzgFB+lq3Ng3UrRxjLwA9JBDLbXWy7Iv6nDeShU7tm4NALZKTCn95VncoRG6lyAxjj0HsEVjP2XukZj3doPY97t1wr5VYkLsL+oWiRUiXY336NKXDaBizIoQFCntMMzY5ZqtY+djEov9Rb27w8dK1/T9Svgeu0dlLofxAeRK9DjgUCUcW5noVtRhWZnYjJBY7C8ae6GnsvUXHYmHdGOv6TMO4gMwJXaiuHX9RgOlxsKekZjGeLX1/VpHYmYHoW1BQxDWnTtKW2sEqI3Yybf1epjGmOpZ1GEa2ZpLzHnA1fhgrKW79cOYAOtiAAYoRTnZS8y5MjH2mu5cJtopsV32m4BnJKbxwZhKl3UxgKwpIcqJfY/ejX9jizp2Xs+dEhNi87tuA66UnpcgiOiTs53TtAC1oLH/yqxoQpY7ck93/ofSOLXz/Y6R2M4fMALvQoTY9+shB419KKQUAfTJuqijwPUwjaBg56RgjMR2/oCReKa/SohyWBcDyAx57mM7rVuXrpewZtfHPLL1iMSaAos7rNfFPinsaXvpUEkJUBMlCKK0dlPmke2jEiuwEGGntUfi8X5JKQLkhXnqS4HYIgm3og6p9DSPbMdEYqN+0CM88ypEkKa4sVFOCcUdDRIDUOW3yB92b3z8isbz7nn8isb7fTRq9JJY4zzg1rIuRqk9gAKFCKKESLGPxjV9NGOFxLZjvS72WSG0f6L08AHUThUS8zr5XSrSnw1emMbdmOOmRklM1sU0ChG8Su1Lka7GuhjRGEA8WUtMxs7Y/WGem5zdrufYSGz0D3yE490v66BU/ffKofqP4g6AxEg2I7YA4c74nL/SUokng+9MR11iGgOui8SE7AWhJFu3ohmAmVJCKrGYog4Zj2JTicvV6mHUGO4diT1TarA5hppK7UkpAuyBZFtcChAiia2cXHqth3lGYc0UickC29Xghel4RWOlrIsVk6YFmCEaqURTQZRUWp9iUjAlEpv0g3fwxqPTRCnVfxIyx24m9yyaAZgTGhNA6yishEixQ2NS0OQusUYp3BxDKYUTFHgAOCNrN7EdMJpCJOaVSjwdfGc6V2NK6zsmSUwxpYjEfoSUIoA/GuPQ6AKEfSikcvIrUu8QW9DRTB23p0ZigfPBd6YT0nTmg65S9Z/HhmKNhyCkFE9IKwLsJkRgbbs4C0sbO//iOIjCvqMRhYVJwSTHTJaY0hpOo/QLj6GEUnutCPePpmn+bdvFLUID+E4nrrZdhIntP03T/K50ec4G39FFY+zRCDx2IlFYktTsPpFYo3RRQrm9R1pR470eFbLxueMlQoPa2SIujXRXx53lsSaSrYpNJd47Hb2iFZRMnhT89OXLl8E3H0MGxH8f+WtjCBHd8ymLePsgN3Hszft2apg7BZHk/6x+vnAnUr/0yJEDeCPFGscSwWgKaxPWY8Klwv6wj6vVg2mwIMstfw1emE6YFExu3LBXJCYDoEYfridOacWaUoq7IEKD2eEQcW1iabkeJpPaWIE1HqlExZTqXj9nr0is+Z4D/Xvwwn78YhyWH8jNHcsL4/OCwgzyz8EL9hChQVE4R1ybuFitHsyK02Sp5Y/BC9MIqUTTSWrbLkIQ8n7wwnRCQcdeSzZ7S6zRS9MFblarB9PWSUrv9cNq9WAWOTqlFB8DoUGWZCCuPtYTWo3xyjSVqBgcNDFj676FHR1aA/orhyKP7BsYO6UUH4OUI2RDolThY1wYC0xrv5V1KlHr5y9jUpJRkVijG401lmlFxWKU18abG1OlFB+DCA1cyCzi2oR1FHausIdtryKJsSimEZvYDJeGxDQH3TBQHlpVK4bIQuNgOYfU52el/mNWIDRQpQBxdYSWSGZFXopLCu9WqweTPWzK9RDRFeqx6cRGSkxju2J0vDQOgTU+1FcO6TXrDZSxkHKEaDJNFe5i6dAyT+vnm4yj8pxrZqLOYoOW6Eis0TdzY7UgqTjLMa1Mar6912ulHfCeEKHBTgqKuDZhFt10KC3PmESLMn5eK2SzOkLwc5CFxBqbQddkI6FSvtl8k7bcMLcFPugdCA2+Uri4OjyWEbSWZkzW7XMd4zUlplU40UddZIpRo2m5ffP94b/OfH1sDAitMmYirg7TtfoOpTV7k71hSpP/PmqTAjWJNfoVKx0WItMI2c03EjbfpXs5A5F1ILSZMjNxdXgJLNvJtYHAGs1KdFWJNXqziXVURaYYtpv2TuuYUUS2DkIrnJmKq8NFYI1uqk6t/F+WNC4N1uZVRWshMc1d3H3Uiinkw/mk1CHapSpvxiLrQGiFMHNxdXgKTCsK0xwjuypE7YBEff9adIn9OhIifhi8EM8bKeeOvgByY2osfD7zONyz+X5dD5XOcssRyvYzpsBy+BjcBCZoRSUqWSHpnmSRUWssuh6pR2IdRmnFjovwwcfM2BULUdyisaaOiGwdIrREVBJxreMqMMUoLLpQQt7LqeHWHpMtCpYSey42txxsL2Sz3F4LhErn9TRea2MdFYqsA6EZU6m4OrwjMM21sL3GIFlaOZJN1lZBR2PZ6cRMYo3NJuht3PcGt9FCU3x/rtFYU7fIOhCaEpWLqyOFwJKMPyKuQ/m8jxzGENNrayqxRu9cnCksZXAPX7er1cP1rv839UwoBkT2HwhtIojrB9wF1uiOPTvTdPJZPxdxHRpHXOss5dqanRdpLrHGbp/BFO6lGjFcyM/y391gd6AkWfdorEFkm0BoW0BcG0klMM0s1WsZ157KeNaIrJ46C2sTvz4WSMTiIrEmD5F5YN7FYxOIbCvVCw1x7SSJwJpye6NOxSU75Saxxr5iMQfMeypuA5E9SjVCQ1yjSCmwXM8M1MRtecVbYtpdkHPE9EjwXTiI7GYms8fZCW1m4ur2QlrdxykFVnpj7zG41ge4Sqz5/iGeK5W254rpya+7MBbZnQySXWXTHD7DYoU2Q3FdytdTw0glmcAau/6yOeFe4OYusY6Zr5GZH9uwCweRfR0EentMEJoTcxVXd3SIcaottcA89s6mxF1gTUqJNd8+1DNpXzNHTM70mXBtXUTW+/cQmhFzF1fHnAXW6DZXyI3wmR5ZVyFuI6nEmu837tkMZycqp5bG4C2yDoQWTy3i6qhAYF6NH7wJ1/bYch/YYySXWPP9gT2fYcFHkpL7PqlE1oHQxlObuDrmLrBG7wzD3PgoPWyTXtssJNYhi54nM4vK1A5/25fUIutAaENqFVdHJQKbWzHHvURfSdKH62Qlseb74ufpjIo+1M/P2YdcRNZRs9BqF1dHJQKzOl8xBUuJvLa2uEpBdhLrmJnMdvY28yI3kXXUIDTE9SM1CKyZT2eOpdQtnOVwTdfJVmIdIrMTGQBKTTMupchj5wzdg1xF1jFToT1FXN+pSGDezc+1uRNxuZfNTyF7ifVp20U3uJUYnSXdO9Ynd5F1zFBopaEmro6KBFbqnrB7+czPU6/lj6UoifXpCe2woFluFmnFpiCRdSA0N9TF1VGLwJry+sTeyFgw6TzGXChWYn1k1nMoxxAcZJ6DTtaSap3SRNaB0NQxE1dHZQLLOY24lAjx65mLuVQYxjALiW1CxPa8d65OVyFoKbj73jll3dlln7v/znGWU6rIOhDa3piLq6MmgfWRDc6NjEGNjEFP5b8tx6Flb/zp/3mb43WKZbYSewwZ/DaVvvdvtD7dzfADc5jJlC6yDoT2KG7i6qhVYFPoTbjX2fb9/qG+HVlOkj2oVmLwI3MRWQdC+w93cXUgMPAAicF/zE1kHRUKLZm4OhAYeIHE4AfmKrKOGQstubg6EBh4gsRgwNxF1jEDoWUjrg4EBt4gMdhILSLrKEho2YmrA4FBCpAYbKU2kXVkKLRsxdWBwCAVSAx2UqvIOhIKLXtxdSAwSAkSg0epXWQdDkIrRlwdCAxSg8RgFIjsRxSFVpy4OhAY5AASg9Egss3sIbRixdWBwCAXkBhMApHtZofQihdXBwKDnEBiMBlENo6e0D6XLq4OBAa5gcRgLxBZfSAwyJH/41OBfZCO2YeSJtMmHCZ4LZEMZAACg1xBYrA3iKwOEBjkDBKDKBDZvEFgkDtIDKJBZPMEgUEJIDFQAZHNCwQGpYDEQA1ENg8QGJQEEgNVEFnZIDAoDSQG6iCyMkFgUCJIDExAZGWBwKBUkBiYgcjKAIFBySAxMAWR5Q0Cg9JBYmAOIssTBAZzAImBC4gsLxAYzAUkBm4gsjxAYDAnkBi4gsjSgsBgbiAxcAeRpQGBwRxBYpAEROYLAoO5gsQgGYjMBwQGcwaJQVIQmS0IDOYOEoPkIDIbEBjUABKDLEBkuiAwqAUkBtmAyHRAYFATSAyyApHFgcCgNpAYZAci2w8EBjWCxCBLENk0EBjUChKDbEFk40BgUDNIDLIGke0GgUHtIDHIHkS2GQQGgMSgEBDZjyAwgG8gMSgGRPYNBAbwHSQGRVG7yBAYwI8gMSiOWkWGwACGIDEoktpEhsAANoPEoFhqERkCA9gOEoOimbvIEBjAbpAYFM9cRYbAAB4HicEsmJvIEBjAOJAYzIa5iAyBAYwHicGsKF1kCAxgGkgMZkepIkNgANNBYjBLShMZAgPYDyQGs6UUkSEwgP1BYjBrchcZAgOIA4nB7MlVZAgMIB4kBlWQm8gQGIAOSAyqIReRITAAPZAYVEVqkSEwAF2QGFRHKpEhMAB9kBhUibfIEBiADT99+fKFSwvV0raLgyCcpmmeGFyDOxHlEQIDsAGJQfUYi+y+aZpng+/qgMCgepAYgL3ILEBgUD0Na2IA3zBeI9MGgQEISAxAKERkCAygBxID6JG5yBAYwBpIDGCNTEWGwAA2gMQANpCZyBAYwBaQGMAWMhEZAgPYARID2EFikSEwgEdAYgCPkEhkCAxgBEgMYATOIkNgACNBYgAjcRIZAgOYABIDmICxyBAYwESQGMBEjESGwAD2AIkB7IGyyBAYwJ4gMYA9URIZAgOIAIkBRBApMgQGEAkSA4hkT5EhMAAFkBiAAhNFdoPAAHRAYgBKiMgOJMraxsVq9YDAAJRAYgCKrFYPnyQiu9jwU9+uVg/Hg+8CwN789OXLF64egAFtuzhqmuakaZoQdZ1KpAYAiiAxAAAoFtKJAABQLEgMAACKBYkBAECxIDEAACgWJAYAAMWCxAAAoFiQGAAAFAsSAwCAYkFiAABQLEgMAACKBYkBAECxIDEAACgWJAYAAMWCxAAAoFiQGAAAFAsSAwCAYkFiAABQLEgMAACKBYkBAECxIDEAACgWJAYAAMWCxAAAoFiQGAAAFAsSAwCAYkFiAABQLEgMAACKBYkBAECxIDEAACgWJAYAAMWCxAAAoFiQGAAAFAsSAwCAYkFiAABQLEgMAACKBYkBAECxIDEAACgWJAYAAMWCxAAAoFiQGAAAFAsSAwCAYkFiAABQLEgMAACKBYkBAECxIDEAACgWJAYAAGXSNM3/A5yTSJhuzFo7AAAAAElFTkSuQmCC', + location: 'mainPanel', + version: packageJson.version +} + +export class LandingPage extends ViewPlugin { + + constructor (appManager, verticalIcons) { + super(profile) + this.profile = profile + this.appManager = appManager + this.verticalIcons = verticalIcons + this.gistHandler = new GistHandler() + } + + render () { + let load = (service, item, examples, info) => { + let compilerImport = new CompilerImport() + let fileProviders = globalRegistry.get('fileproviders').api + const msg = yo` +
    + Enter the ${item} you would like to load. +
    ${info}
    +
    e.g ${examples.map((url) => { return yo`` })}
    +
    ` + + modalDialogCustom.prompt(`Import from ${service}`, msg, null, (target) => { + if (target !== '') { + compilerImport.import( + target, + (loadingMsg) => { tooltip(loadingMsg) }, + (error, content, cleanUrl, type, url) => { + if (error) { + modalDialogCustom.alert(error) + } else { + fileProviders['browser'].addExternal(type + '/' + cleanUrl, content, url) + this.verticalIcons.select('fileExplorers') + } + } + ) + } + }) + } + + const learnMore = () => { window.open('https://remix-ide.readthedocs.io/en/latest/layout.html', '_blank') } + + const startSolidity = () => { + this.appManager.ensureActivated('solidity') + this.appManager.ensureActivated('udapp') + this.appManager.ensureActivated('solidityStaticAnalysis') + this.appManager.ensureActivated('solidityUnitTesting') + this.verticalIcons.select('solidity') + } + const startVyper = () => { + this.appManager.ensureActivated('vyper') + this.appManager.ensureActivated('udapp') + this.verticalIcons.select('vyper') + } + /* + const startWorkshop = () => { + this.appManager.ensureActivated('box') + this.appManager.ensureActivated('solidity') + this.appManager.ensureActivated('solidityUnitTesting') + this.appManager.ensureActivated('workshops') + this.verticalIcons.select('workshops') + } + */ + + const startPipeline = () => { + this.appManager.ensureActivated('solidity') + this.appManager.ensureActivated('pipeline') + this.appManager.ensureActivated('udapp') + } + const startDebugger = () => { + this.appManager.ensureActivated('debugger') + this.verticalIcons.select('debugger') + } + const startMythX = () => { + this.appManager.ensureActivated('solidity') + this.appManager.ensureActivated('mythx') + this.verticalIcons.select('mythx') + } + const startSourceVerify = () => { + this.appManager.ensureActivated('solidity') + this.appManager.ensureActivated('source-verification') + this.verticalIcons.select('source-verification') + } + const startPluginManager = () => { + this.appManager.ensureActivated('pluginManager') + this.verticalIcons.select('pluginManager') + } + + const createNewFile = () => { + let fileExplorer = globalRegistry.get('fileexplorer/browser').api + fileExplorer.createNewFile() + } + const connectToLocalhost = () => { + this.appManager.ensureActivated('remixd') + } + const importFromGist = () => { + this.gistHandler.loadFromGist({gist: ''}, globalRegistry.get('filemanager').api) + this.verticalIcons.select('fileExplorers') + } + + globalRegistry.get('themeModule').api.events.on('themeChanged', () => { + globalRegistry.get('themeModule').api.fixInvert(document.getElementById('remixLogo')) + globalRegistry.get('themeModule').api.fixInvert(document.getElementById('solidityLogo')) + globalRegistry.get('themeModule').api.fixInvert(document.getElementById('vyperLogo')) + globalRegistry.get('themeModule').api.fixInvert(document.getElementById('pipelineLogo')) + globalRegistry.get('themeModule').api.fixInvert(document.getElementById('debuggerLogo')) + globalRegistry.get('themeModule').api.fixInvert(document.getElementById('workshopLogo')) + globalRegistry.get('themeModule').api.fixInvert(document.getElementById('moreLogo')) + }) + + const createEnvButton = (imgPath, envID, envText, callback) => { + return yo` + + ` + } + // main + const solEnv = createEnvButton('/assets/img/solidityLogo.webp', 'solidityLogo', 'Solidity', startSolidity) + const vyperEnv = createEnvButton('/assets/img/vyperLogo.webp', 'vyperLogo', 'Vyper', startVyper) + // Featured + const pipelineEnv = createEnvButton('assets/img/pipelineLogo.webp', 'pipelineLogo', 'Pipeline', startPipeline) + const debuggerEnv = createEnvButton('assets/img/debuggerLogo.webp', 'debuggerLogo', 'Debugger', startDebugger) + const mythXEnv = createEnvButton('assets/img/mythxLogo.webp', 'mythxLogo', 'MythX', startMythX) + const sourceVerifyEnv = createEnvButton('assets/img/sourceVerifyLogo.webp', 'sourceVerifyLogo', 'Source Verify', startSourceVerify) + const moreEnv = createEnvButton('assets/img/moreLogo.webp', 'moreLogo', 'More', startPluginManager) + + const invertNum = (globalRegistry.get('themeModule').api.currentTheme().quality === 'dark') ? 1 : 0 + solEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + vyperEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + pipelineEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + debuggerEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + mythXEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + sourceVerifyEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + moreEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + + let switchToPreviousVersion = () => { + const query = new QueryParams() + query.update({appVersion: '0.7.7'}) + document.location.reload() + } + const img = yo`` + const container = yo`
    +
    +
    +
    +
    ${img}
    +
    +
    + + +
    +
    +
    +
    +
    +
    +

    Environments

    +
    + ${solEnv} + ${vyperEnv} +
    +
    +
    +

    File

    +

    createNewFile()}>New File

    +

    +

    + Open Files + +

    +

    +

    connectToLocalhost()}>Connect to Localhost

    +

    +
    + + + + + + +
    +
    +
    +
    +
    +

    Featured Plugins

    +
    + ${pipelineEnv} + ${mythXEnv} + ${sourceVerifyEnv} + ${debuggerEnv} + ${moreEnv} +
    +
    + +
    +
    +
    ` + + return container + } +} diff --git a/src/app/ui/landing-page/workspace.js b/src/app/ui/landing-page/workspace.js new file mode 100644 index 0000000000..c415d596dd --- /dev/null +++ b/src/app/ui/landing-page/workspace.js @@ -0,0 +1,48 @@ +export class Workspace { + constructor (title, description, isMain, activate, deactivate) { + this.title = title + this.description = description + this.isMain = isMain + this.activate = activate + this.deactivate = deactivate + } +} + +export const defaultWorkspaces = (appManager) => { + return [ + new Workspace( + 'Solidity', + 'Writing smart contracts. It is used for implementing smart contracts on various blockchain platforms', + true, + () => { + appManager.ensureActivated('solidity') + appManager.ensureActivated('udapp') + appManager.ensureActivated('solidityStaticAnalysis') + appManager.ensureActivated('solidityUnitTesting') + }, () => {}), + new Workspace( + 'Vyper', + 'Vyper is a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM)', + true, + () => { + appManager.ensureActivated('vyper') + appManager.ensureActivated('udapp') + }, () => {}), + new Workspace( + 'Lexon', + 'Lexon is a language modelling legal contracts that compiles down to ethereum smart contracts', + true, + () => { + appManager.ensureActivated('lexon') + appManager.ensureActivated('udapp') + }, () => {}), + new Workspace('Debugger', 'Debug transactions with remix', false, () => { + appManager.ensureActivated('debugger') + }, () => {}), + new Workspace('Pipeline', '', false, () => { + appManager.ensureActivated('solidity') + appManager.ensureActivated('pipeline') + appManager.ensureActivated('udapp') + }) + ] +} diff --git a/src/app/ui/modal-dialog-custom.js b/src/app/ui/modal-dialog-custom.js new file mode 100644 index 0000000000..ec4535ecc6 --- /dev/null +++ b/src/app/ui/modal-dialog-custom.js @@ -0,0 +1,80 @@ +var modal = require('./modaldialog.js') +var yo = require('yo-yo') +var css = require('./styles/modal-dialog-custom-styles') + +module.exports = { + alert: function (title, text) { + if (text) return modal(title, yo`
    ${text}
    `, null, { label: null }) + return modal('', yo`
    ${title}
    `, null, { label: null }) + }, + prompt: function (title, text, inputValue, ok, cancel, focus) { + return prompt(title, text, false, inputValue, ok, cancel, focus) + }, + promptPassphrase: function (title, text, inputValue, ok, cancel) { + return prompt(title, text, true, inputValue, ok, cancel) + }, + promptPassphraseCreation: function (ok, cancel) { + var text = 'Please provide a Passphrase for the account creation' + var input = yo`
    + +
    +
    + +
    ` + return modal(null, yo`
    ${text}
    ${input}
    `, + { + fn: () => { + if (typeof ok === 'function') { + if (input.querySelector('#prompt1').value === input.querySelector('#prompt2').value) { + ok(null, input.querySelector('#prompt1').value) + } else { + ok('Passphase does not match') + } + } + } + }, + { + fn: () => { + if (typeof cancel === 'function') cancel() + } + } + ) + }, + promptMulti: function ({ title, text, inputValue }, ok, cancel) { + if (!inputValue) inputValue = '' + var input = yo`` + return modal(title, yo`
    ${text}
    ${input}
    `, + { + fn: () => { if (typeof ok === 'function') ok(document.getElementById('prompt_text').value) } + }, + { + fn: () => { if (typeof cancel === 'function') cancel() } + } + ) + }, + confirm: function (title, text, ok, cancel) { + return modal(title, yo`
    ${text}
    `, + { + fn: () => { if (typeof ok === 'function') ok() } + }, + { + fn: () => { if (typeof cancel === 'function') cancel() } + } + ) + } +} + +function prompt (title, text, hidden, inputValue, ok, cancel, focus) { + if (!inputValue) inputValue = '' + var type = hidden ? 'password' : 'text' + var input = yo`` + modal(title, yo`
    ${text}
    ${input}
    `, + { + fn: () => { if (typeof ok === 'function') ok(document.getElementById('prompt_text').value) } + }, + { + fn: () => { if (typeof cancel === 'function') cancel() } + }, + focus ? '#prompt_text' : undefined + ) +} diff --git a/src/app/ui/modaldialog.js b/src/app/ui/modaldialog.js new file mode 100644 index 0000000000..a72b4a0941 --- /dev/null +++ b/src/app/ui/modaldialog.js @@ -0,0 +1,150 @@ +var yo = require('yo-yo') +var css = require('./styles/modaldialog-styles') + +let incomingModal = false // in case modals are queued, ensure we are not hiding the last one. +module.exports = (title, content, ok, cancel, focusSelector, opts) => { + let agreed = true + let footerIsActive = false + opts = opts || {} + var container = document.querySelector(`.modal`) + if (!container) { + document.querySelector('body').appendChild(html(opts)) + container = document.querySelector(`.modal`) + incomingModal = false + } else incomingModal = true + + var closeDiv = document.getElementById('modal-close') + if (opts.hideClose) closeDiv.style.display = 'none' + + var okDiv = document.getElementById('modal-footer-ok') + okDiv.innerHTML = (ok && ok.label !== undefined) ? ok.label : 'OK' + okDiv.style.display = okDiv.innerHTML === '' ? 'none' : 'inline-block' + + var cancelDiv = document.getElementById('modal-footer-cancel') + cancelDiv.innerHTML = (cancel && cancel.label !== undefined) ? cancel.label : 'Cancel' + cancelDiv.style.display = cancelDiv.innerHTML === '' ? 'none' : 'inline-block' + + var modal = document.querySelector(`.modal-body`) + var modalTitle = document.querySelector(`.modal-header h6`) + + modalTitle.innerHTML = '' + if (title) modalTitle.innerText = title + + modal.innerHTML = '' + if (content) modal.appendChild(content) + + setFocusOn('ok') + + show() + + function setFocusOn (btn) { + var okDiv = document.getElementById('modal-footer-ok') + var cancelDiv = document.getElementById('modal-footer-cancel') + if (btn === 'ok') { + okDiv.className = okDiv.className.replace(/\bbtn-light\b/g, 'btn-dark') + cancelDiv.className = cancelDiv.className.replace(/\bbtn-dark\b/g, 'btn-light') + } else { + cancelDiv.className = cancelDiv.className.replace(/\bbtn-light\b/g, 'btn-dark') + okDiv.className = okDiv.className.replace(/\bbtn-dark\b/g, 'btn-light') + } + } + + function okListener () { + removeEventListener() + if (ok && ok.fn && agreed) ok.fn() + if (!incomingModal) hide() + incomingModal = false + } + + function cancelListener () { + removeEventListener() + if (cancel && cancel.fn) cancel.fn() + if (!incomingModal) hide() + incomingModal = false + } + + function modalKeyEvent (e) { + if (e.keyCode === 27) { // Esc + cancelListener() + } else if (e.keyCode === 13) { // Enter + e.preventDefault() + okListener() + } else if (e.keyCode === 37 && footerIsActive) { // Arrow Left + e.preventDefault() + agreed = true + setFocusOn('ok') + } else if (e.keyCode === 39 && footerIsActive) { // Arrow Right + e.preventDefault() + agreed = false + setFocusOn('cancel') + } + } + + function hide () { + if (!container) return + container.style.display = 'none' + if (container.parentElement) container.parentElement.removeChild(container) + container = null + incomingModal = false + } + + function show () { + if (!container) return + container.style.display = 'block' + if (focusSelector) { + const focusTarget = document.querySelector(`.modal ${focusSelector}`) + if (focusTarget) { + focusTarget.focus() + if (typeof focusTarget.setSelectionRange === 'function') { + focusTarget.setSelectionRange(0, focusTarget.value.length) + } + } + } + } + + function removeEventListener () { + okDiv.removeEventListener('click', okListener) + cancelDiv.removeEventListener('click', cancelListener) + closeDiv.removeEventListener('click', cancelListener) + document.removeEventListener('keydown', modalKeyEvent) + if (document.getElementById('modal-background')) { + document.getElementById('modal-background').removeEventListener('click', cancelListener) + } + } + okDiv.addEventListener('click', okListener) + cancelDiv.addEventListener('click', cancelListener) + closeDiv.addEventListener('click', cancelListener) + document.addEventListener('keydown', modalKeyEvent) + + let modalDialog = document.getElementById('modal-dialog') + if (modalDialog) { + modalDialog.addEventListener('click', (e) => { + footerIsActive = document.activeElement === modalDialog + if (e.toElement === modalDialog) { + cancelListener() // click is outside of modal-content + } + }) + } + return { container, okListener, cancelListener, hide } +} + +function html (opts) { + return yo` + ` +} diff --git a/src/app/ui/multiParamManager.js b/src/app/ui/multiParamManager.js new file mode 100644 index 0000000000..1da41dab74 --- /dev/null +++ b/src/app/ui/multiParamManager.js @@ -0,0 +1,229 @@ +'use strict' + +var yo = require('yo-yo') +var css = require('../../universal-dapp-styles') +var copyToClipboard = require('./copy-to-clipboard') +var remixLib = require('remix-lib') +var txFormat = remixLib.execution.txFormat + +class MultiParamManager { + + /** + * + * @param {bool} lookupOnly + * @param {Object} funABI + * @param {Function} clickMultiCallBack + * @param {string} inputs + * @param {string} title + * @param {string} evmBC + * + */ + constructor (lookupOnly, funABI, clickCallBack, inputs, title, evmBC, isDeploy) { + this.lookupOnly = lookupOnly + this.funABI = funABI + this.clickCallBack = clickCallBack + this.inputs = inputs + this.title = title + this.evmBC = evmBC + this.basicInputField + this.multiFields + this.isDeploy = isDeploy + } + + switchMethodViewOn () { + this.contractActionsContainerSingle.style.display = 'none' + this.contractActionsContainerMulti.style.display = 'flex' + this.makeMultiVal() + } + + switchMethodViewOff () { + this.contractActionsContainerSingle.style.display = 'flex' + this.contractActionsContainerMulti.style.display = 'none' + var multiValString = this.getMultiValsString() + if (multiValString) this.basicInputField.value = multiValString + } + + getValue (item, index) { + var valStr = item.value.join('') + return valStr + } + + getMultiValsString () { + var valArray = this.multiFields.querySelectorAll('input') + var ret = '' + var valArrayTest = [] + + for (var j = 0; j < valArray.length; j++) { + if (ret !== '') ret += ',' + var elVal = valArray[j].value + valArrayTest.push(elVal) + elVal = elVal.replace(/(^|,\s+|,)(\d+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted number by quoted number + elVal = elVal.replace(/(^|,\s+|,)(0[xX][0-9a-fA-F]+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted hex string by quoted hex string + try { + JSON.parse(elVal) + } catch (e) { + elVal = '"' + elVal + '"' + } + ret += elVal + } + var valStringTest = valArrayTest.join('') + if (valStringTest) { + return ret + } else { + return '' + } + } + + emptyInputs () { + var valArray = this.multiFields.querySelectorAll('input') + for (var k = 0; k < valArray.length; k++) { + valArray[k].value = '' + } + this.basicInputField.value = '' + } + + makeMultiVal () { + var inputString = this.basicInputField.value + if (inputString) { + inputString = inputString.replace(/(^|,\s+|,)(\d+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted number by quoted number + inputString = inputString.replace(/(^|,\s+|,)(0[xX][0-9a-fA-F]+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted hex string by quoted hex string + var inputJSON = JSON.parse('[' + inputString + ']') + var multiInputs = this.multiFields.querySelectorAll('input') + for (var k = 0; k < multiInputs.length; k++) { + if (inputJSON[k]) { + multiInputs[k].value = JSON.stringify(inputJSON[k]) + } + } + } + } + + createMultiFields () { + if (this.funABI.inputs) { + return yo`
    + ${this.funABI.inputs.map(function (inp) { + return yo`
    ` + })} +
    ` + } + } + + render () { + var title + if (this.title) { + title = this.title + } else if (this.funABI.name) { + title = this.funABI.name + } else { + title = this.funABI.type === 'receive' ? '(receive)' : '(fallback)' + } + + this.basicInputField = yo`` + this.basicInputField.setAttribute('placeholder', this.inputs) + this.basicInputField.setAttribute('title', this.inputs) + this.basicInputField.setAttribute('data-id', this.inputs) + + var onClick = () => { + this.clickCallBack(this.funABI.inputs, this.basicInputField.value) + } + const width = this.isDeploy ? '' : 'w-50' + let funcButton = yo`` + this.contractActionsContainerSingle = yo` +
    + ${funcButton} + ${this.basicInputField} + this.switchMethodViewOn()} title=${title} > +
    ` + + this.multiFields = this.createMultiFields() + + var multiOnClick = () => { + var valsString = this.getMultiValsString() + if (valsString) { + this.clickCallBack(this.funABI.inputs, valsString) + } else { + this.clickCallBack(this.funABI.inputs, '') + } + } + + var expandedButton = yo`` + + this.contractActionsContainerMulti = yo`
    +
    +
    { this.switchMethodViewOff() }} class="${css.multiHeader}"> +
    ${title}
    + +
    + ${this.multiFields} +
    + ${copyToClipboard( + () => { + var multiString = this.getMultiValsString() + var multiJSON = JSON.parse('[' + multiString + ']') + var encodeObj + if (this.evmBC) { + encodeObj = txFormat.encodeData(this.funABI, multiJSON, this.evmBC) + } else { + encodeObj = txFormat.encodeData(this.funABI, multiJSON) + } + if (encodeObj.error) { + throw new Error(encodeObj.error) + } else { + return encodeObj.data + } + }, 'Encode values of input fields & copy to clipboard', 'fa-clipboard')} + ${expandedButton} +
    +
    +
    ` + + var contractProperty = yo` +
    + ${this.contractActionsContainerSingle} ${this.contractActionsContainerMulti} +
    + ` + if (this.lookupOnly) { + // call. stateMutability is either pure or view + expandedButton.setAttribute('title', (title + ' - call')) + expandedButton.innerHTML = 'call' + expandedButton.classList.add('btn-info') + expandedButton.setAttribute('data-id', (title + ' - call')) + funcButton.setAttribute('title', (title + ' - call')) + funcButton.classList.add('btn-info') + funcButton.setAttribute('data-id', (title + ' - call')) + } else if (this.funABI.stateMutability === 'payable' || this.funABI.payable) { + // transact. stateMutability = payable + expandedButton.setAttribute('title', (title + ' - transact (payable)')) + expandedButton.innerHTML = 'transact' + expandedButton.classList.add('btn-danger') + expandedButton.setAttribute('data-id', (title + ' - transact (payable)')) + funcButton.setAttribute('title', (title + ' - transact (payable)')) + funcButton.classList.add('btn-danger') + funcButton.setAttribute('data-id', (title + ' - transact (payable)')) + } else { + // transact. stateMutability = nonpayable + expandedButton.setAttribute('title', (title + ' - transact (not payable)')) + expandedButton.innerHTML = 'transact' + expandedButton.classList.add('btn-warning') + expandedButton.setAttribute('data-id', (title + ' - transact (not payable)')) + funcButton.classList.add('btn-warning') + funcButton.setAttribute('title', (title + ' - transact (not payable)')) + funcButton.setAttribute('data-id', (title + ' - transact (not payable)')) + } + + if (this.funABI.inputs && this.funABI.inputs.length > 0) { + contractProperty.classList.add(css.hasArgs) + } else if (this.funABI.type === 'fallback' || this.funABI.type === 'receive') { + contractProperty.classList.add(css.hasArgs) + this.basicInputField.setAttribute('title', `'(${this.funABI.type}')`) // probably should pass name instead + this.contractActionsContainerSingle.querySelector('i').style.visibility = 'hidden' + this.basicInputField.setAttribute('data-id', `'(${this.funABI.type}')`) + } else { + this.contractActionsContainerSingle.querySelector('i').style.visibility = 'hidden' + this.basicInputField.style.visibility = 'hidden' + } + + return contractProperty + } +} + +module.exports = MultiParamManager diff --git a/src/app/ui/persmission-handler.js b/src/app/ui/persmission-handler.js new file mode 100644 index 0000000000..03566be4e9 --- /dev/null +++ b/src/app/ui/persmission-handler.js @@ -0,0 +1,202 @@ +/* global localStorage */ +const yo = require('yo-yo') +const csjs = require('csjs-inject') +const addTooltip = require('./tooltip') +const modalDialog = require('./modaldialog') +const globalRegistry = require('../../global/registry') + +const css = csjs` +.permission h4 { + text-transform: uppercase; + text-align: center; +} +.permission h6 { + text-transform: uppercase; +} +.remember { + display: flex; + justify-content: space-between; + align-items: center; +} +.images { + display: flex; + justify-content: center; + align-items: center; + padding: 10px; +} +.images img { + width: 40px; + height: 40px; +} +.images i { + margin: 0 20px; +} +` + +function notAllowWarning (from, to, method) { + return `${from.displayName || from.name} is not allowed to call ${method} method of ${to.displayName || to.name}.` +} + +export class PermissionHandler { + + constructor () { + this.permissions = this._getFromLocal() + this.currentVersion = 1 + // here we remove the old permissions saved before adding 'permissionVersion' + // since with v1 the structure has been changed because of new engine ^0.2.0-alpha.6 changes + if (!localStorage.getItem('permissionVersion')) { + localStorage.setItem('plugins/permissions', '') + localStorage.setItem('permissionVersion', this.currentVersion) + } + } + + _getFromLocal () { + const permission = localStorage.getItem('plugins/permissions') + return permission ? JSON.parse(permission) : {} + } + + persistPermissions () { + const permissions = JSON.stringify(this.permissions) + localStorage.setItem('plugins/permissions', permissions) + } + + clear () { + localStorage.removeItem('plugins/permissions') + addTooltip('All Permissions have been reset') + } + + /** + * Show a message to ask the user for a permission + * @param {PluginProfile} from The name and hash of the plugin that make the call + * @param {ModuleProfile} to The name of the plugin that receive the call + * @param {string} method The name of the function to be called + * @param {string} message from the caller plugin to add more details if needed + * @returns {Promise<{ allow: boolean; remember: boolean }} Answer from the user to the permission + */ + async openPermission (from, to, method, message) { + return new Promise((resolve, reject) => { + modalDialog( + `Permission needed for ${to.displayName || to.name}`, + this.form(from, to, method, message), + { + label: 'Accept', + fn: () => { + if (this.permissions[to.name][method][from.name]) { + this.permissions[to.name][method][from.name] = { + allow: true, + hash: from.hash + } + this.persistPermissions() + } + resolve(true) + } + }, + { + label: 'Decline', + fn: () => { + if (this.permissions[to.name][method][from.name]) { + this.permissions[to.name][method][from.name] = { + allow: false, + hash: from.hash + } + this.persistPermissions() + } + reject(notAllowWarning(from, to, method)) + } + } + ) + }) + } + + /** + * Check if a plugin has the permission to call another plugin and askPermission if needed + * @param {PluginProfile} from the profile of the plugin that make the call + * @param {ModuleProfile} to The profile of the module that receive the call + * @param {string} method The name of the function to be called + * @param {string} message from the caller plugin to add more details if needed + * @returns {Promise} + */ + async askPermission (from, to, method, message) { + try { + this.permissions = this._getFromLocal() + if (!this.permissions[to.name]) this.permissions[to.name] = {} + if (!this.permissions[to.name][method]) this.permissions[to.name][method] = {} + if (!this.permissions[to.name][method][from.name]) return this.openPermission(from, to, method, message) + + const { allow, hash } = this.permissions[to.name][method][from.name] + if (!allow) { + const warning = notAllowWarning(from, to, method) + addTooltip(warning) + return false + } + return hash === from.hash + ? true // Allow + : this.openPermission(from, to, method, message) // New version of a plugin + } catch (err) { + throw new Error(err) + } + } + + /** + * The permission form + * @param {PluginProfile} from The name and hash of the plugin that make the call + * @param {ModuleProfile} to The name of the plugin that receive the call + * @param {string} method The name of te methode to be called + * @param {string} message from the caller plugin to add more details if needed + */ + form (from, to, method, message) { + const fromName = from.displayName || from.name + const toName = to.displayName || to.name + const remember = this.permissions[to.name][method][from.name] + + const switchMode = (e) => { + e.target.checked + ? this.permissions[to.name][method][from.name] = {} + : delete this.permissions[to.name][method][from.name] + } + const rememberSwitch = remember + ? yo`` + : yo`` + const text = `"${fromName}" ${(remember ? `has changed and` : ``)} would like to access to "${method}" of "${toName}"` + const imgFrom = yo`` + const imgTo = yo`` + const pluginsImages = yo` +
    + ${imgFrom} + + ${imgTo} +
    + ` + + globalRegistry.get('themeModule').api.fixInvert(imgFrom) + globalRegistry.get('themeModule').api.fixInvert(imgTo) + + const pluginMessage = message ? yo` +
    +
    Description
    +

    ${message}

    +
    + ` : `` + return yo` +
    + ${pluginsImages} +
    +

    ${text} :

    +
    ${fromName}
    +

    ${from.description || yo`No description Provided`}

    +
    ${toName} :

    +

    ${to.description || yo`No description Provided`}

    + ${pluginMessage} +
    + +
    +
    + ${rememberSwitch} + +
    + +
    +
    + ` + } +} diff --git a/src/app/ui/renderer.js b/src/app/ui/renderer.js new file mode 100644 index 0000000000..e948adbc9f --- /dev/null +++ b/src/app/ui/renderer.js @@ -0,0 +1,130 @@ +'use strict' + +var $ = require('jquery') +var yo = require('yo-yo') +var css = require('./styles/renderer-styles') +var globlalRegistry = require('../../global/registry') + +/** + * After refactor, the renderer is only used to render error/warning + * TODO: This don't need to be an object anymore. Simplify and just export the renderError function. + * + */ +function Renderer (localRegistry) { + const self = this + self._components = {} + self._components.registry = localRegistry || globlalRegistry + // dependencies + self._deps = { + fileManager: self._components.registry.get('filemanager').api, + config: self._components.registry.get('config').api + } + if (document && document.head) { + document.head.appendChild(css) + } +} + +Renderer.prototype._error = function (file, error) { + const self = this + const editor = self._components.registry.get('editor').api + if (file === self._deps.config.get('currentFile')) { + editor.addAnnotation(error) + } +} + +Renderer.prototype._errorClick = function (errFile, errLine, errCol) { + const self = this + const editor = self._components.registry.get('editor').api + if (errFile !== self._deps.config.get('currentFile')) { + // TODO: refactor with this._components.contextView.jumpTo + var provider = self._deps.fileManager.fileProviderOf(errFile) + if (provider) { + provider.exists(errFile, (error, exist) => { + if (error) return console.log(error) + self._deps.fileManager.open(errFile) + editor.gotoLine(errLine, errCol) + }) + } + } else { + editor.gotoLine(errLine, errCol) + } +} + +/** + * format msg like error or warning, + * + * @param {String or DOMElement} message + * @param {DOMElement} container + * @param {Object} options { + * useSpan, + * noAnnotations, + * click:(Function), + * type:( + * warning, + * error + * ), + * errFile, + * errLine, + * errCol + * } + */ +Renderer.prototype.error = function (message, container, opt) { + if (!message) return + if (container === undefined) return + opt = opt || {} + + var text + if (typeof message === 'string') { + text = message + message = yo`${message}` + } else if (message.innerText) { + text = message.innerText + } + + var errLocation = text.match(/^([^:]*):([0-9]*):(([0-9]*):)? /) + if ((!opt.errFile || !opt.errCol || !opt.errLine) && errLocation) { + errLocation = parseRegExError(errLocation) + opt.errFile = errLocation.errFile + opt.errLine = errLocation.errLine + opt.errCol = errLocation.errCol + } + + if (!opt.noAnnotations && errLocation) { + this._error(errLocation.errFile, { + row: errLocation.errLine, + column: errLocation.errCol, + text: text, + type: opt.type + }) + } + + var $pre = $(opt.useSpan ? yo`` : yo`
    `).html(message)
    +
    +  let classList = opt.type === 'error' ? 'alert alert-danger' : 'alert alert-warning'
    +  var $error = $(yo`
    `).prepend($pre) + $(container).append($error) + + $error.click((ev) => { + if (opt.click) { + opt.click(message) + } else if (opt.errFile && opt.errLine && opt.errCol) { + this._errorClick(opt.errFile, opt.errLine, opt.errCol) + } + }) + + $error.find('.close').click(function (ev) { + ev.preventDefault() + $error.remove() + return false + }) +} + +function parseRegExError (err) { + return { + errFile: err[1], + errLine: parseInt(err[2], 10) - 1, + errCol: err[4] ? parseInt(err[4], 10) : 0 + } +} + +module.exports = Renderer diff --git a/src/app/ui/sendTxCallbacks.js b/src/app/ui/sendTxCallbacks.js new file mode 100644 index 0000000000..b531ad20c0 --- /dev/null +++ b/src/app/ui/sendTxCallbacks.js @@ -0,0 +1,109 @@ +const yo = require('yo-yo') +const remixLib = require('remix-lib') +const confirmDialog = require('./confirmDialog') +const modalCustom = require('./modal-dialog-custom') +const modalDialog = require('./modaldialog') +const typeConversion = remixLib.execution.typeConversion +const Web3 = require('web3') + +module.exports = { + getCallBacksWithContext: (udappUI, blockchain) => { + let callbacks = {} + callbacks.confirmationCb = confirmationCb + callbacks.continueCb = continueCb + callbacks.promptCb = promptCb + callbacks.udappUI = udappUI + callbacks.blockchain = blockchain + return callbacks + } +} + +const continueCb = function (error, continueTxExecution, cancelCb) { + if (error) { + const msg = typeof error !== 'string' ? error.message : error + modalDialog( + 'Gas estimation failed', + yo` +
    Gas estimation errored with the following message (see below). + The transaction execution will likely fail. Do you want to force sending?
    ${msg}
    + `, + { + label: 'Send Transaction', + fn: () => continueTxExecution() + }, + { + label: 'Cancel Transaction', + fn: () => cancelCb() + } + ) + } else { + continueTxExecution() + } +} + +const promptCb = function (okCb, cancelCb) { + modalCustom.promptPassphrase('Passphrase requested', 'Personal mode is enabled. Please provide passphrase of account', '', okCb, cancelCb) +} + +const confirmationCb = function (network, tx, gasEstimation, continueTxExecution, cancelCb) { + let self = this + if (network.name !== 'Main') { + return continueTxExecution(null) + } + var amount = Web3.utils.fromWei(typeConversion.toInt(tx.value), 'ether') + var content = confirmDialog(tx, amount, gasEstimation, self.udappUI, + (gasPrice, cb) => { + let txFeeText, priceStatus + // TODO: this try catch feels like an anti pattern, can/should be + // removed, but for now keeping the original logic + try { + var fee = Web3.utils.toBN(tx.gas).mul(Web3.utils.toBN(Web3.utils.toWei(gasPrice.toString(10), 'gwei'))) + txFeeText = ' ' + Web3.utils.fromWei(fee.toString(10), 'ether') + ' Ether' + priceStatus = true + } catch (e) { + txFeeText = ' Please fix this issue before sending any transaction. ' + e.message + priceStatus = false + } + cb(txFeeText, priceStatus) + }, + (cb) => { + self.blockchain.web3().eth.getGasPrice((error, gasPrice) => { + const warnMessage = ' Please fix this issue before sending any transaction. ' + if (error) { + return cb('Unable to retrieve the current network gas price.' + warnMessage + error) + } + try { + var gasPriceValue = Web3.utils.fromWei(gasPrice.toString(10), 'gwei') + cb(null, gasPriceValue) + } catch (e) { + cb(warnMessage + e.message, null, false) + } + }) + } + ) + modalDialog( + 'Confirm transaction', + content, + { label: 'Confirm', + fn: () => { + self.blockchain.config.setUnpersistedProperty( + 'doNotShowTransactionConfirmationAgain', + content.querySelector('input#confirmsetting').checked + ) + // TODO: check if this is check is still valid given the refactor + if (!content.gasPriceStatus) { + cancelCb('Given gas price is not correct') + } else { + var gasPrice = Web3.utils.toWei(content.querySelector('#gasprice').value, 'gwei') + continueTxExecution(gasPrice) + } + } + }, + { + label: 'Cancel', + fn: () => { + return cancelCb('Transaction canceled by user.') + } + } + ) +} diff --git a/src/app/ui/styles-guide/styleGuideClean.js b/src/app/ui/styles-guide/styleGuideClean.js new file mode 100644 index 0000000000..19ab6ca254 --- /dev/null +++ b/src/app/ui/styles-guide/styleGuideClean.js @@ -0,0 +1,855 @@ +// var csjs = require('csjs-inject') + +module.exports = styleGuideClean + +function styleGuideClean () { + /* -------------------------------------------------------------------------- + + CSS PROPERTIES + + -------------------------------------------------------------------------- */ + var cssProperties = { + /* ------------------------------------------------------ + COLORS + ------------------------------------------------------ */ + colors: { + // BASIC COLORS (B&W and transparent) + transparent: 'transparent', + white: 'hsl(0, 0%, 100%)', + black: 'black', + opacityBlack: 'hsla(0, 0%, 0%, .4)', + + // BLUE + blue: 'hsla(229, 75%, 87%, 1)', + lightBlue: 'hsla(229, 75%, 87%, .5)', + backgroundBlue: 'hsla(229, 100%, 97%, 1)', + brightBlue: 'hsla(233, 91%, 58%, 1)', + azure: '#dbe9f4', + // GREY + grey: 'hsla(0, 0%, 40%, 1)', + lightGrey: 'hsla(0, 0%, 40%, .5)', + veryLightGrey: 'hsla(0, 0%, 40%, .2)', + // RED + strongRed: 'hsla(0, 100%, 71%, 1)', + red: 'hsla(0, 82%, 82%, 1)', + lightRed: 'hsla(0, 82%, 82%, .5)', + // GREEN + green: 'hsla(141, 75%, 84%, 1)', + lightGreen: 'hsla(141, 75%, 84%, .5)', + greenZing: 'hsla(148, 79%, 47%, 1)', + // PINK + pink: 'hsla(300, 69%, 76%, 1)', + lightPink: 'hsla(300, 69%, 76%, .5)', + // ORANGE + orange: 'hsla(44, 100%, 50%, 1)', + lightOrange: 'hsla(44, 100%, 50%, .5)', + // VIOLET + violet: 'hsla(240, 64%, 68%, 1)', + lightViolet: 'hsla(240, 64%, 68%, .5)' + }, + + /* ------------------------------------------------------ + FONTS + ------------------------------------------------------ */ + fonts: { + font: '14px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif' + }, + + /* ------------------------------------------------------ + BORDERS + ------------------------------------------------------ */ + borders: { + secondary_borderRadius: '5px' + } + } + + /* -------------------------------------------------------------------------- + + APP PROPERTIES + + -------------------------------------------------------------------------- */ + + var appProperties = { + + /* ------------------------------------------------------ + ACE THEME + ------------------------------------------------------ */ + + aceTheme: '', + + /* ------------------------------------------------------ + BACKGROUND COLORS + ------------------------------------------------------ */ + primary_BackgroundColor: cssProperties.colors.white, + secondary_BackgroundColor: cssProperties.colors.white, + tertiary_BackgroundColor: cssProperties.colors.white, + quaternary_BackgroundColor: cssProperties.colors.white, + fifth_BackgroundColor: cssProperties.colors.white, + seventh_BackgroundColor: cssProperties.colors.white, + dark_BackgroundColor: cssProperties.colors.black, + light_BackgroundColor: cssProperties.colors.white, + debuggingMode_BackgroundColor: cssProperties.colors.veryLightGrey, + highlight_BackgroundColor: cssProperties.colors.veryLightGrey, + /* ------------------------------------------------------ + RESIZING + ******************************************************** */ + ghostBar: cssProperties.colors.veryLightGrey, + draggingBar: cssProperties.colors.veryLightGrey, + + /* ------------------------------------------------------ + TEXT COLORS + ******************************************************** */ + mainText_Color: cssProperties.colors.black, + supportText_Color: cssProperties.colors.grey, + + sub_supportText_Color: cssProperties.colors.black, + specialText_Color: cssProperties.colors.greenZing, + brightText_Color: cssProperties.colors.brightBlue, + oppositeText_Color: cssProperties.colors.black, + additionalText_Color: cssProperties.colors.veryLightGrey, + + errorText_Color: cssProperties.colors.strongRed, + warningText_Color: cssProperties.colors.orange, + infoText_Color: cssProperties.colors.violet, + greyedText_color: cssProperties.colors.veryLightGrey, + /* ------------------------------------------------------ + ICONS + ******************************************************** */ + icon_Color: cssProperties.colors.black, + icon_AltColor: cssProperties.colors.white, + icon_HoverColor: cssProperties.colors.grey, + icon_ConstantColor: cssProperties.colors.black, + + /* ------------------------------------------------------ + MESSAGES + ******************************************************** */ + // Success + success_TextColor: cssProperties.colors.black, + success_BackgroundColor: cssProperties.colors.lightGreen, + success_BorderColor: cssProperties.colors.green, + + // Danger + danger_TextColor: cssProperties.colors.black, + danger_BackgroundColor: cssProperties.colors.lightRed, + danger_BorderColor: cssProperties.colors.red, + + // Warning + warning_TextColor: cssProperties.colors.black, + warning_BackgroundColor: cssProperties.colors.lightOrange, + warning_BorderColor: cssProperties.colors.orange, + + // Tooltip + tooltip_Color: cssProperties.colors.white, + tooltip_BackgroundColor: cssProperties.colors.grey, + tooltip_BorderColor: cssProperties.colors.grey, + + /* ------------------------------------------------------ + DROPDOWN + ******************************************************** */ + dropdown_TextColor: cssProperties.colors.black, + dropdown_BackgroundColor: cssProperties.colors.white, + dropdown_SecondaryBackgroundColor: cssProperties.colors.white, + dropdown_BorderColor: cssProperties.colors.veryLightGrey, + + /* ------------------------------------------------------ + INPUT + ******************************************************** */ + input_TextColor: cssProperties.colors.black, + input_BackgroundColor: cssProperties.colors.white, + input_BorderColor: cssProperties.colors.veryLightGrey, + + /* ------------------------------------------------------ + SOLID BORDER BOX + ******************************************************** */ + solidBorderBox_TextColor: cssProperties.colors.black, + solidBorderBox_BackgroundColor: cssProperties.colors.white, + solidBorderBox_BorderColor: cssProperties.colors.white, + + /* ------------------------------------------------------ + SOLID BOX + ******************************************************** */ + solidBox_TextColor: cssProperties.colors.black, + solidBox_BackgroundColor: cssProperties.colors.white, + + /* ------------------------------------------------------ + BUTTONS + ******************************************************** */ + + /* ................. + PRIMARY + .................. */ + primaryButton_TextColor: cssProperties.colors.black, + primaryButton_BackgroundColor: cssProperties.colors.white, + primaryButton_BorderColor: cssProperties.colors.black, + primaryButton_BorderWidth: '1px', + + /* ................. + SECONDARY + .................. */ + secondaryButton_TextColor: cssProperties.colors.black, + secondaryButton_BackgroundColor: cssProperties.colors.white, + secondaryButton_BorderColor: cssProperties.colors.black, + + /* ................. + Teriary + .................. */ + teriaryButton_TextColor: cssProperties.colors.black, + teriaryButton_BackgroundColor: cssProperties.colors.white, + teriaryButton_BorderColor: cssProperties.colors.black, + /* ................. + + /* ................. + Quaternary + .................. */ + quaternaryButton_TextColor: cssProperties.colors.black, + quaternaryButton_BackgroundColor: cssProperties.colors.white, + quaternaryButton_BorderColor: cssProperties.colors.black, + /* ................. + + /* ................. + Fifth + .................. */ + fifthButton_TextColor: cssProperties.colors.black, + fifthButton_BackgroundColor: cssProperties.colors.white, + fifthButton_BorderColor: cssProperties.colors.black, + /* ................. + + /* ................. + Sixth + .................. */ + sixthButton_TextColor: cssProperties.colors.black, + sixthButton_BackgroundColor: cssProperties.colors.white, + sixthButton_BorderColor: cssProperties.colors.black, + /* ................. + + SUCCESS + .................. */ + successButton_TextColor: cssProperties.colors.white, + successButton_BackgroundColor: cssProperties.colors.green, + successButton_BorderColor: cssProperties.colors.green, + + /* ................. + DANGER + .................. */ + dangerButton_TextColor: cssProperties.colors.white, + dangerButton_BackgroundColor: cssProperties.colors.red, + dangerButton_BorderColor: cssProperties.colors.red, + + /* ................. + WARNING + .................. */ + warningButton_TextColor: cssProperties.colors.white, + warningButton_BackgroundColor: cssProperties.colors.lightOrange, + warningButton_BorderColor: cssProperties.colors.lightOrange, + + /* ................. + INFO + .................. */ + infoButton_TextColor: cssProperties.colors.black, + infoButton_BackgroundColor: cssProperties.colors.white, + infoButton_BorderColor: cssProperties.colors.black, + + /* ................. + SOLIDITY + .................. */ + + // CALL + callButton_TextColor: cssProperties.colors.black, + callButton_BackgroundColor: cssProperties.colors.lightBlue, + callButton_BorderColor: cssProperties.colors.lightBlue, + + // TRANSACTION + transactButton_TextColor: cssProperties.colors.black, + transactButton_BackgroundColor: cssProperties.colors.lightRed, + transactButton_BorderColor: cssProperties.colors.lightRed, + + // CONSTANT + constantButton_TextColor: cssProperties.colors.black, + constantButton_BackgroundColor: cssProperties.colors.lightBlue, + constantButton_BorderColor: cssProperties.colors.lightBlue, + + // PAYABLE TRANSACTION + transactPayableButton_TextColor: cssProperties.colors.black, + transactPayableButton_BackgroundColor: cssProperties.colors.red, + transactPayableButton_BorderColor: cssProperties.colors.red, + + /* ------------------------------------------------------ + UI ELEMENTS + ******************************************************** */ + + uiElements: { + solidBorderBox: (opts = {}) => ` + background-color : ${opts.BackgroundColor}; + border : 1px solid ${opts.BorderColor}; + color : ${opts.Color}; + border-radius : ${cssProperties.borders.primary_borderRadius} + font-size : 12px; + padding : 10px 15px; + line-height : 20px; + overflow : hidden; + word-break : break-word; + width : 100%; + `, + + solidBox: (opts = {}) => ` + background-color : ${opts.BackgroundColor}; + color : ${opts.Color}; + font-size : 12px; + padding : 10px 15px; + line-height : 20px; + overflow : hidden; + word-break : break-word; + width : 100%; + `, + + dottedBorderBox: (opts = {}) => ` + background-color : ${opts.BackgroundColor}; + border : .2em dotted ${opts.BorderColor}; + color : ${opts.Color}; + border-radius : ${cssProperties.borders.secondary_borderRadius}; + line-height : 20px; + padding : 8px 15px; + margin-bottom : 1em; + overflow : hidden; + word-break : break-word; + `, + + inputField: (opts = {}) => ` + background-color : ${opts.BackgroundColor}; + border : 1px solid ${opts.BorderColor}; + color : ${opts.Color}; + border-radius : ${cssProperties.borders.secondary_borderRadius}; + height : 25px; + width : 250px; + padding : 0 8px; + overflow : hidden; + word-break : normal; + `, + + dropdown: (opts = {}) => ` + background-color : ${opts.BackgroundColor}; + border : 1px solid ${opts.BorderColor}; + color : ${opts.Color}; + font-size : 12px; + font-weight : bold; + padding : 0 8px; + text-decoration : none; + cursor : pointer; + border-radius : 3px; + height : 25px; + width : 100%; + text-align : center; + overflow : hidden; + word-break : normal; + `, + + button: (opts = {}) => ` + margin : 1px; + background-color : ${opts.BackgroundColor}; + color : ${opts.Color}; + border : 1px solid; + display : flex; + align-items : center; + justify-content : center; + cursor : pointer; + min-height : 25px; + max-height : 25px; + width : 70px; + min-width : 70px; + font-size : 12px; + overflow : hidden; + word-break : normal; + border-radius : ${opts.BorderRadius}; + border-width : ${opts.BorderWidth}; + border-color : ${opts.BorderColor}; + border-style : ${opts.BorderStyle}; + ` + } + } + + /* -------------------------------------------------------------------------- + + REMIX PROPERTIES + + -------------------------------------------------------------------------- */ + + var remixProperties = { + /* ------------------------------------------------------ + REMIX GENERAL + /* ------------------------------------------------------ */ + remix: { + modalDialog_BackgroundColor_Primary: appProperties.primary_BackgroundColor, + modalDialog_text_Primary: appProperties.mainText_Color, + modalDialog_text_Secondary: appProperties.supportText_Color, + modalDialog_text_Link: appProperties.brightText_Color, + modalDialog_text_Em: appProperties.specialText_Color, + modalDialog_Header_Footer_BackgroundColor: appProperties.secondary_BackgroundColor, + modalDialog_Header_Footer_Color: appProperties.mainText_Color, + modalDialog_BoxDottedBorder_BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + modalDialog_BoxDottedBorder_BorderColor: appProperties.solidBorderBox_BorderColor, + modalDialog_BoxDottedBorder_Color: appProperties.solidBorderBox_TextColor, + + tooltip_CopyToClipboard_BackgroundColor: appProperties.tooltip_BackgroundColor, + tooltip_CopyToClipboard_Color: appProperties.tooltip_Color, + + icon_Color_CopyToClipboard: appProperties.icon_Color, + icon_HoverColor_CopyToClipboard: appProperties.icon_HoverColor, + + solidBox: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.solidBox_BackgroundColor, + Color: appProperties.solidBox_TextColor + }) + }, + + /* ------------------------------------------------------ + LEFT PANEL (FILE PANEL) + /* ------------------------------------------------------ */ + leftPanel: { + backgroundColor_Panel: appProperties.primary_BackgroundColor, + backgroundColor_FileExplorer: appProperties.tertiary_BackgroundColor, + + text_Primary: appProperties.mainText_Color, + text_Secondary: appProperties.supportText_Color, + text_Teriary: appProperties.sub_supportText_Color, + + bar_Ghost: appProperties.ghostBar, + bar_Dragging: appProperties.draggingBar, + dragbarBorderRight: '2px solid ' + cssProperties.colors.veryLightGrey, + + icon_Color_Menu: appProperties.icon_Color, + icon_HoverColor_Menu: appProperties.icon_HoverColor, + + icon_Color_TogglePanel: appProperties.icon_Color, + icon_HoverColor_TogglePanel: appProperties.icon_HoverColor + + }, + + /* ------------------------------------------------------ + EDITOR + /* ------------------------------------------------------ */ + editor: { + backgroundColor_Panel: appProperties.primary_BackgroundColor, + backgroundColor_Editor: appProperties.light_BackgroundColor, + backgroundColor_Tabs_Highlights: appProperties.secondary_BackgroundColor, + backgroundColor_Editor_Context_Highlights: appProperties.secondary_BackgroundColor, + backgroundColor_Editor_Context_Error_Highlights: appProperties.error_BackgroundColor, + backgroundColor_DebuggerMode: appProperties.debuggingMode_BackgroundColor, + + text_Primary: appProperties.mainText_Color, + text_Secondary: appProperties.supportText_Color, + text_Teriary: appProperties.sub_supportText_Color, + text_Editor: '', + + icon_Color_Editor: appProperties.icon_Color, + icon_HoverColor_Editor: appProperties.icon_HoverColor + + }, + + /* ------------------------------------------------------ + TERMINAL + /* ------------------------------------------------------ */ + terminal: { + backgroundColor_Menu: appProperties.secondary_BackgroundColor, + backgroundColor_Terminal: appProperties.seventh_BackgroundColor, + backgroundColor_TerminalCLI: appProperties.seventh_BackgroundColor, + backgroundImage_Terminal: "url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCgk8ZyBvcGFjaXR5PSIwLjEiPg0KCQk8Zz4NCgkJCTxwYXRoIGZpbGw9IiM0MTQwNDIiIGQ9Ik03MC41ODIsNDI4LjkwNGMwLjgxMSwwLDEuNjIyLDAuMjg1LDIuNDM3LDAuODUzYzAuODExLDAuNTcxLDEuMjE4LDEuMzQsMS4yMTgsMi4zMTQNCgkJCQljMCwyLjI3Ny0xLjA1OSwzLjQ5Ni0zLjE2OCwzLjY1NmMtNS4wMzgsMC44MTQtOS4zODEsMi4zNTYtMTMuMDM3LDQuNjNjLTMuNjU1LDIuMjc2LTYuNjYzLDUuMTE3LTkuMDE2LDguNTI4DQoJCQkJYy0yLjM1NywzLjQxMS00LjEwNCw3LjI3Mi01LjIzOSwxMS41NzVjLTEuMTM5LDQuMzA3LTEuNzA2LDguODE0LTEuNzA2LDEzLjUyNHYzMi42NTNjMCwyLjI3My0xLjEzOSwzLjQxMS0zLjQxMiwzLjQxMQ0KCQkJCWMtMi4yNzcsMC0zLjQxMi0xLjEzOC0zLjQxMi0zLjQxMXYtNzQuMzIzYzAtMi4yNzMsMS4xMzUtMy40MTEsMy40MTItMy40MTFjMi4yNzMsMCwzLjQxMiwxLjEzOCwzLjQxMiwzLjQxMXYxNS4xMDgNCgkJCQljMS40NjItMi40MzcsMy4yMDYtNC43NTIsNS4yMzktNi45NDVjMi4wMjktMi4xOTMsNC4yNjQtNC4xNDMsNi43MDEtNS44NDhjMi40MzctMS43MDYsNS4wNzYtMy4wODUsNy45MTktNC4xNDMNCgkJCQlDNjQuNzcxLDQyOS40MzMsNjcuNjU4LDQyOC45MDQsNzAuNTgyLDQyOC45MDR6Ii8+DQoJCQk8cGF0aCBmaWxsPSIjNDE0MDQyIiBkPSJNMTM3Ljc3Myw0MjcuMTk4YzUuNjg1LDAsMTAuOTY2LDEuMTgxLDE1LjgzOSwzLjUzNGM0Ljg3NCwyLjM1Niw5LjA1NSw1LjQ4MiwxMi41NSw5LjM4MQ0KCQkJCWMzLjQ5MiwzLjg5OSw2LjIxNCw4LjQwNyw4LjE2NCwxMy41MjRjMS45NDksNS4xMTcsMi45MjQsMTAuNDQsMi45MjQsMTUuOTYxYzAsMC45NzYtMC4zNjYsMS43OS0xLjA5NywyLjQzOA0KCQkJCWMtMC43MzEsMC42NS0xLjU4MywwLjk3NS0yLjU1OSwwLjk3NWgtNjcuOTg3YzAuNDg3LDQuMjI2LDEuNTg0LDguMjg1LDMuMjksMTIuMTg0YzEuNzA2LDMuODk5LDMuOTM3LDcuMzEyLDYuNzAxLDEwLjIzNA0KCQkJCWMyLjc2MSwyLjkyNSw2LjAwOCw1LjI4MSw5Ljc0OCw3LjA2N2MzLjczNSwxLjc4OSw3Ljg3NywyLjY4MSwxMi40MjgsMi42ODFjMTIuMDIxLDAsMjEuMzYtNC43OSwyOC4wMjMtMTQuMzc3DQoJCQkJYzAuNjQ3LTEuMTM2LDEuNjIyLTEuNzA2LDIuOTI0LTEuNzA2YzIuMjczLDAsMy40MTIsMS4xMzksMy40MTIsMy40MTJjMCwwLjE2My0wLjE2NCwwLjczLTAuNDg3LDEuNzA1DQoJCQkJYy0zLjQxMiw2LjAxMy04LjIwNSwxMC40NzktMTQuMzc3LDEzLjQwMmMtNi4xNzYsMi45MjQtMTIuNjcxLDQuMzg3LTE5LjQ5NSw0LjM4N2MtNS42ODksMC0xMC45MjgtMS4xODEtMTUuNzE4LTMuNTMzDQoJCQkJYy00Ljc5My0yLjM1NC04LjkzNi01LjQ4My0xMi40MjgtOS4zODJjLTMuNDk1LTMuODk5LTYuMjE0LTguNDA3LTguMTYzLTEzLjUyNGMtMS45NS01LjExOC0yLjkyNC0xMC40MzctMi45MjQtMTUuOTYyDQoJCQkJYzAtNS41MjEsMC45NzUtMTAuODQ0LDIuOTI0LTE1Ljk2MWMxLjk0OS01LjExNyw0LjY2OC05LjYyNSw4LjE2My0xMy41MjRjMy40OTItMy44OTgsNy42MzQtNy4wMjQsMTIuNDI4LTkuMzgxDQoJCQkJQzEyNi44NDYsNDI4LjM3OSwxMzIuMDg0LDQyNy4xOTgsMTM3Ljc3Myw0MjcuMTk4eiBNMTY5Ljk0LDQ2Ni4xODhjLTAuMzI4LTQuMjIzLTEuMzQxLTguMjg1LTMuMDQ2LTEyLjE4NA0KCQkJCWMtMS43MDYtMy44OTktMy45ODItNy4zMTItNi44MjMtMTAuMjM1Yy0yLjg0NC0yLjkyNC02LjE3NS01LjI3Ny05Ljk5MS03LjA2N2MtMy44MTktMS43ODUtNy45Mi0yLjY4LTEyLjMwNi0yLjY4DQoJCQkJYy00LjU1LDAtOC42OTIsMC44OTUtMTIuNDI4LDIuNjhjLTMuNzM5LDEuNzktNi45ODcsNC4xNDQtOS43NDgsNy4wNjdjLTIuNzY0LDIuOTI0LTQuOTk1LDYuMzM2LTYuNzAxLDEwLjIzNQ0KCQkJCWMtMS43MDYsMy44OTgtMi44MDIsNy45NjEtMy4yOSwxMi4xODRIMTY5Ljk0eiIvPg0KCQkJPHBhdGggZmlsbD0iIzQxNDA0MiIgZD0iTTMwNC42OSw0MjcuNDQxYzUuMDM0LDAsOS41MDQsMS4wMTgsMTMuNDAyLDMuMDQ3YzMuODk5LDIuMDMzLDcuMTg5LDQuNjcyLDkuODcsNy45Mg0KCQkJCWMyLjY4LDMuMjUxLDQuNzA5LDcuMDY2LDYuMDkyLDExLjQ1MmMxLjM3OSw0LjM4NywyLjA3LDguODU2LDIuMDcsMTMuNDAydjQzLjYyYzAsMC45NzUtMC4zNjUsMS43ODktMS4wOTcsMi40MzgNCgkJCQljLTAuNzMsMC42NDYtMS41MDMsMC45NzUtMi4zMTMsMC45NzVjLTIuMjc2LDAtMy40MTItMS4xNC0zLjQxMi0zLjQxMnYtNDMuNjJjMC0zLjU3MS0wLjUyOS03LjEwNC0xLjU4NC0xMC42DQoJCQkJYy0xLjA1OS0zLjQ5MS0yLjYwMi02LjYxOC00LjYzLTkuMzgyYy0yLjAzMy0yLjc2MS00LjU5Mi00Ljk1My03LjY3Ny02LjU4Yy0zLjA4OC0xLjYyMS02LjY2Mi0yLjQzNi0xMC43MjItMi40MzYNCgkJCQljLTUuMiwwLTkuNTg3LDEuMjE4LTEzLjE1OSwzLjY1NGMtMy41NzQsMi40MzgtNi40NTcsNS41NjYtOC42NSw5LjM4MmMtMi4xOTMsMy44MTktMy44MTgsOC4wNDItNC44NzQsMTIuNjcyDQoJCQkJYy0xLjA1OSw0LjYzLTEuNTg0LDkuMDU4LTEuNTg0LDEzLjI4djMzLjYyOWMwLDAuOTc1LTAuMzY1LDEuNzg5LTEuMDk2LDIuNDM4Yy0wLjczMSwwLjY0Ni0xLjUwNSwwLjk3NS0yLjMxNSwwLjk3NQ0KCQkJCWMtMi4yNzYsMC0zLjQxMS0xLjE0LTMuNDExLTMuNDEydi00My42MmMwLTMuNTcxLTAuNTMtNy4xMDQtMS41ODUtMTAuNmMtMS4wNTgtMy40OTEtMi42MDEtNi42MTgtNC42MjktOS4zODINCgkJCQljLTIuMDM0LTIuNzYxLTQuNTkyLTQuOTUzLTcuNjc3LTYuNThjLTMuMDg3LTEuNjIxLTYuNjYzLTIuNDM2LTEwLjcyMi0yLjQzNmMtNS4wMzcsMC05LjM0NCwwLjg5NS0xMi45MTUsMi42OA0KCQkJCWMtMy41NzUsMS43OS02LjU0Miw0LjI2Ni04Ljg5NSw3LjQzM2MtMi4zNTcsMy4xNjctNC4wNjMsNi45NDQtNS4xMTcsMTEuMzMxYy0xLjA1OSw0LjM4Ni0xLjU4NCw5LjEtMS41ODQsMTQuMTM0djMuODk5djAuMjQzDQoJCQkJdjMyLjg5N2MwLDIuMjcyLTEuMTM4LDMuNDEyLTMuNDEyLDMuNDEyYy0yLjI3NiwwLTMuNDExLTEuMTQtMy40MTEtMy40MTJ2LTc0LjU2N2MwLTIuMjczLDEuMTM1LTMuNDExLDMuNDExLTMuNDExDQoJCQkJYzIuMjczLDAsMy40MTIsMS4xMzgsMy40MTIsMy40MTF2MTIuNDI4YzIuOTI0LTUuMTk3LDYuODYxLTkuMzgyLDExLjgxOS0xMi41NWM0Ljk1NC0zLjE2NywxMC41MTctNC43NTIsMTYuNjkyLTQuNzUyDQoJCQkJYzYuOTgzLDAsMTIuOTk1LDEuOTkxLDE4LjAzMiw1Ljk3YzUuMDMzLDMuOTgzLDguNjg4LDkuMjIzLDEwLjk2NiwxNS43MTljMi43Ni02LjMzNiw2LjczOS0xMS41MzMsMTEuOTQtMTUuNTk2DQoJCQkJQzI5MS4xMjUsNDI5LjQ3NSwyOTcuMzgsNDI3LjQ0MSwzMDQuNjksNDI3LjQ0MXoiLz4NCgkJCTxwYXRoIGZpbGw9IiM0MTQwNDIiIGQ9Ik0zNzguNzUzLDQyOS4zOTJjMC44MTEsMCwxLjU4NCwwLjM2NSwyLjMxNCwxLjA5N2MwLjczMSwwLjczLDEuMDk3LDEuNTA0LDEuMDk3LDIuMzE0djc0LjA4DQoJCQkJYzAsMC44MTQtMC4zNjUsMS41ODQtMS4wOTcsMi4zMTVjLTAuNzMsMC43My0xLjUwNCwxLjA5Ny0yLjMxNCwxLjA5N2MtMC45NzUsMC0xLjc5LTAuMzY2LTIuNDM4LTEuMDk3DQoJCQkJYy0wLjY1LTAuNzMxLTAuOTc1LTEuNTAxLTAuOTc1LTIuMzE1di03NC4wOGMwLTAuODExLDAuMzI0LTEuNTg0LDAuOTc1LTIuMzE0QzM3Ni45NjMsNDI5Ljc1NywzNzcuNzc4LDQyOS4zOTIsMzc4Ljc1Myw0MjkuMzkyeiINCgkJCQkvPg0KCQkJPHBhdGggZmlsbD0iIzQxNDA0MiIgZD0iTTQ3My4zNCw0MjguNjZjMi4yNzMsMCwzLjQxMiwxLjEzOSwzLjQxMiwzLjQxMWwtMC40ODcsMS45NWwtMjQuMzY4LDM1LjMzNGwyNC4zNjgsMzUuNTc3DQoJCQkJYzAuMzIzLDAuOTc2LDAuNDg3LDEuNjI2LDAuNDg3LDEuOTVjMCwyLjI3Mi0xLjEzOSwzLjQxMi0zLjQxMiwzLjQxMmMtMS4zMDIsMC0yLjE5My0wLjQ4OC0yLjY4LTEuNDYzbC0yMi45MDYtMzMuMzg0DQoJCQkJbC0yMi42NjMsMzMuMzg0Yy0wLjgxNCwwLjk3NS0xLjc5LDEuNDYzLTIuOTI0LDEuNDYzYy0yLjI3NywwLTMuNDExLTEuMTQtMy40MTEtMy40MTJjMC0wLjMyNCwwLjE1OS0wLjk3NSwwLjQ4Ni0xLjk1DQoJCQkJbDI0LjM2OS0zNS41NzdsLTI0LjM2OS0zNS4zMzRsLTAuNDg2LTEuOTVjMC0yLjI3MiwxLjEzNC0zLjQxMSwzLjQxMS0zLjQxMWMxLjEzNCwwLDIuMTA5LDAuNDg3LDIuOTI0LDEuNDYybDIyLjY2MywzMy4xNDENCgkJCQlsMjIuOTA2LTMzLjE0MUM0NzEuMTQ2LDQyOS4xNDcsNDcyLjAzOCw0MjguNjYsNDczLjM0LDQyOC42NnoiLz4NCgkJPC9nPg0KCQk8Zz4NCgkJCTxnPg0KCQkJCTxnIG9wYWNpdHk9IjAuNDUiPg0KCQkJCQk8Zz4NCgkJCQkJCTxwb2x5Z29uIGZpbGw9IiMwMTAxMDEiIHBvaW50cz0iMTUwLjczNCwxOTYuMjEyIDI1NS45NjksMzQ0LjUwOCAyNTUuOTY5LDI1OC4zODciLz4NCgkJCQkJPC9nPg0KCQkJCTwvZz4NCgkJCQk8ZyBvcGFjaXR5PSIwLjgiPg0KCQkJCQk8Zz4NCgkJCQkJCTxwb2x5Z29uIGZpbGw9IiMwMTAxMDEiIHBvaW50cz0iMjU1Ljk2OSwyNTguMzg3IDI1NS45NjksMzQ0LjUwOCAzNjEuMjY3LDE5Ni4yMTIiLz4NCgkJCQkJPC9nPg0KCQkJCTwvZz4NCgkJCQk8ZyBvcGFjaXR5PSIwLjYiPg0KCQkJCQk8Zz4NCgkJCQkJCTxwb2x5Z29uIGZpbGw9IiMwMTAxMDEiIHBvaW50cz0iMjU1Ljk2OSwxMjYuNzgxIDE1MC43MzMsMTc0LjYxMSAyNTUuOTY5LDIzNi44MTggMzYxLjIwNCwxNzQuNjExIi8+DQoJCQkJCTwvZz4NCgkJCQk8L2c+DQoJCQkJPGcgb3BhY2l0eT0iMC40NSI+DQoJCQkJCTxnPg0KCQkJCQkJPHBvbHlnb24gZmlsbD0iIzAxMDEwMSIgcG9pbnRzPSIxNTAuNzM0LDE3NC42MTIgMjU1Ljk2OSwyMzYuODE4IDI1NS45NjksMTI2Ljc4MiAyNTUuOTY5LDAuMDAxIi8+DQoJCQkJCTwvZz4NCgkJCQk8L2c+DQoJCQkJPGcgb3BhY2l0eT0iMC44Ij4NCgkJCQkJPGc+DQoJCQkJCQk8cG9seWdvbiBmaWxsPSIjMDEwMTAxIiBwb2ludHM9IjI1NS45NjksMCAyNTUuOTY5LDEyNi43ODEgMjU1Ljk2OSwyMzYuODE4IDM2MS4yMDQsMTc0LjYxMSIvPg0KCQkJCQk8L2c+DQoJCQkJPC9nPg0KCQkJPC9nPg0KCQk8L2c+DQoJPC9nPg0KPC9zdmc+DQo=')", + + text_Primary: appProperties.mainText_Color, + text_Secondary: appProperties.supportText_Color, + text_RegularLog: appProperties.mainText_Color, + text_InfoLog: appProperties.supportText_Color, + text_ErrorLog: appProperties.errorText_Color, + text_WarnLog: appProperties.warningText_Color, + text_Title_TransactionLog: appProperties.infoText_Color, + text_Regular_TransactionLog: appProperties.supportText_Color, + text_Button: appProperties.oppositeText_Color, + + blockBorderTop: '2px solid ' + cssProperties.colors.veryLightGrey, + + icon_Color_Log_Succeed: appProperties.success_BorderColor, + icon_Color_Log_Failed: appProperties.errorText_Color, + icon_BackgroundColor_Log_Call: appProperties.infoText_Color, + icon_Color_Log_Call: appProperties.icon_AltColor, + + icon_Color_TogglePanel: appProperties.icon_Color, + icon_HoverColor_TogglePanel: appProperties.icon_HoverColor, + icon_Color_Menu: appProperties.icon_Color, + icon_HoverColor_Menu: appProperties.icon_HoverColor, + + bar_Ghost: appProperties.ghostBar, + bar_Dragging: appProperties.draggingBar, + + input_Search_MenuBar: appProperties.uiElements.inputField({ + BackgroundColor: appProperties.input_BackgroundColor, + BorderColor: appProperties.input_BorderColor, + Color: appProperties.input_TextColor + }), + + dropdown_Filter_MenuBar: appProperties.uiElements.dropdown({ + BackgroundColor: appProperties.dropdown_BackgroundColor, + BorderColor: appProperties.dropdown_BorderColor, + Color: appProperties.dropdown_TextColor + }), + + button_Log_Debug: appProperties.uiElements.button({ + BackgroundColor: appProperties.quaternaryButton_BackgroundColor, + BorderColor: appProperties.infoButton_BorderColor, + Color: appProperties.infoButton_TextColor + }), + + button_Log_Details: appProperties.uiElements.button({ + BackgroundColor: appProperties.quaternaryButton_BackgroundColor, + BorderColor: appProperties.quaternaryButton_BorderColor, + Color: appProperties.quaternaryButton_TextColor + }) + + }, + + /* ------------------------------------------------------ + RIGHT PANEL + /* ------------------------------------------------------ */ + rightPanel: { + backgroundColor_Panel: appProperties.fifth_BackgroundColor, + backgroundColor_Tab: appProperties.fifth_BackgroundColor, + BackgroundColor_Pre: appProperties.primary_BackgroundColor, + + text_Primary: appProperties.mainText_Color, + text_Secondary: appProperties.supportText_Color, + text_Teriary: appProperties.sub_supportText_Color, + text_link: appProperties.brightText_Color, + + bar_Ghost: appProperties.ghostBar, + bar_Dragging: appProperties.draggingBar, + dragbarWidth: '2px', + dragbarBackgroundColor: cssProperties.colors.veryLightGrey, + + icon_Color_TogglePanel: appProperties.icon_Color, + icon_HoverColor_TogglePanel: appProperties.icon_HoverColor, + + message_Warning_BackgroundColor: appProperties.warning_BackgroundColor, + message_Warning_BorderColor: appProperties.warning_BorderColor, + message_Warning_Color: appProperties.warning_TextColor, + + message_Error_BackgroundColor: appProperties.danger_BackgroundColor, + message_Error_BorderColor: appProperties.danger_BorderColor, + message_Error_Color: appProperties.danger_TextColor, + + message_Success_BackgroundColor: appProperties.success_BackgroundColor, + message_Success_BorderColor: appProperties.success_BorderColor, + message_Success_Color: appProperties.success_TextColor, + + /* :::::::::::::: + COMPILE TAB + ::::::::::::::: */ + compileTab: { + button_Compile: appProperties.uiElements.button({ + BackgroundColor: appProperties.primaryButton_BackgroundColor, + BorderColor: appProperties.primaryButton_BorderColor, + Color: appProperties.primaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + button_Details: appProperties.uiElements.button({ + BackgroundColor: appProperties.secondaryButton_BackgroundColor, + BorderColor: appProperties.secondaryButton_BorderColor, + Color: appProperties.secondaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + button_Publish: appProperties.uiElements.button({ + BackgroundColor: appProperties.secondaryButton_BackgroundColor, + BorderColor: appProperties.secondaryButton_BorderColor, + Color: appProperties.secondaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + dropdown_CompileContract: appProperties.uiElements.dropdown({ + BackgroundColor: appProperties.dropdown_BackgroundColor, + BorderColor: appProperties.dropdown_BorderColor, + Color: appProperties.dropdown_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + box_CompileContainer: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.quaternary_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BackgroundColor, + Color: appProperties.solidBorderBox_TextColor + }), + + icon_WarnCompilation_Color: appProperties.warning_BackgroundColor + + }, + + /* :::::::::::::: + RUN TAB + ::::::::::::::: */ + runTab: { + + additionalText_Color: appProperties.additionalText_Color, + + box_RunTab: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.solidBox_BackgroundColor, + Color: appProperties.solidBox_TextColor + }), + + box_Info_RunTab: appProperties.uiElements.dottedBorderBox({ + BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BorderColor, + Color: appProperties.solidBorderBox_TextColor + }), + + dropdown_RunTab: appProperties.uiElements.dropdown({ + BackgroundColor: appProperties.dropdown_BackgroundColor, + BorderColor: appProperties.dropdown_BorderColor, + Color: appProperties.dropdown_TextColor + }), + titlebox_RunTab: appProperties.uiElements.dropdown({ + BackgroundColor: appProperties.dropdown_SecondaryBackgroundColor, + BorderColor: appProperties.dropdown_BorderColor, + Color: appProperties.dropdown_TextColor + }), + + input_RunTab: appProperties.uiElements.inputField({ + BackgroundColor: appProperties.input_BackgroundColor, + BorderColor: appProperties.input_BorderColor, + Color: appProperties.input_TextColor + }), + + box_Instance: appProperties.uiElements.solidBox({ + BackgroundColor: appProperties.solidBox_BackgroundColor, + Color: appProperties.solidBox_TextColor + }), + + borderBox_Instance: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.solidBox_BackgroundColor, + Color: appProperties.solidBox_TextColor, + BorderColor: appProperties.solidBorderBox_BorderColor + }), + + button_atAddress: appProperties.uiElements.button({ + BackgroundColor: appProperties.primaryButton_BackgroundColor, + BorderColor: appProperties.primaryButton_BorderColor, + Color: appProperties.primaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + button_Create: appProperties.uiElements.button({ + BackgroundColor: appProperties.transactButton_BackgroundColor, + BorderColor: appProperties.transactButton_BorderColor, + Color: appProperties.transactButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + button_Constant: appProperties.uiElements.button({ + BackgroundColor: appProperties.constantButton_BackgroundColor, + BorderColor: appProperties.constantButton_BorderColor, + Color: appProperties.constantButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + button_Instance_Call: appProperties.uiElements.button({ + BackgroundColor: appProperties.callButton_BackgroundColor, + BorderColor: appProperties.callButton_BorderColor, + Color: appProperties.callButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + button_Instance_Transact: appProperties.uiElements.button({ + BackgroundColor: appProperties.transactButton_BackgroundColor, + BorderColor: appProperties.transactButton_BorderColor, + Color: appProperties.transactButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + button_Instance_TransactPayable: appProperties.uiElements.button({ + BackgroundColor: appProperties.transactPayableButton_BackgroundColor, + BorderColor: appProperties.transactPayableButton_BorderColor, + Color: appProperties.transactPayableButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + icon_Color_Instance_CopyToClipboard: appProperties.icon_Color, + icon_AltColor_Instance_CopyToClipboard: appProperties.icon_AltColor, + icon_HoverColor_Instance_CopyToClipboard: appProperties.icon_HoverColor, + + icon_Color: appProperties.icon_Color, + icon_HoverColor: appProperties.icon_HoverColor + + }, + + /* :::::::::::::: + TEST TAB + ::::::::::::::: */ + testTab: { + box_listTests: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BackgroundColor, + Color: appProperties.solidBorderBox_TextColor + }), + + button_runTests: appProperties.uiElements.button({ + BackgroundColor: appProperties.primaryButton_BackgroundColor, + BorderColor: appProperties.primaryButton_BorderColor, + Color: appProperties.primaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + button_generateTestFile: appProperties.uiElements.button({ + BackgroundColor: appProperties.primaryButton_BackgroundColor, + BorderColor: appProperties.primaryButton_BorderColor, + Color: appProperties.primaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + color_testPass: appProperties.success_BackgroundColor, + color_testFail: appProperties.danger_BackgroundColor + }, + + /* :::::::::::::: + SETTINGS TAB + ::::::::::::::: */ + settingsTab: { + box_SolidityVersionInfo: appProperties.uiElements.dottedBorderBox({ + BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BorderColor, + Color: appProperties.solidBorderBox_TextColor + }), + + dropdown_SelectCompiler: appProperties.uiElements.dropdown({ + BackgroundColor: appProperties.dropdown_BackgroundColor, + BorderColor: appProperties.dropdown_BorderColor, + Color: appProperties.dropdown_TextColor + }), + + button_LoadPlugin: appProperties.uiElements.button({ + BackgroundColor: appProperties.secondaryButton_BackgroundColor, + BorderColor: appProperties.secondaryButton_BorderColor, + Color: appProperties.secondaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + button_initPlugin: appProperties.uiElements.button({ + BackgroundColor: appProperties.transactButton_BackgroundColor, + BorderColor: appProperties.transactButton_BorderColor, + Color: appProperties.secondaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }) + }, + + /* :::::::::::::: + DEBUGGER TAB + ::::::::::::::: */ + debuggerTab: { + text_Primary: appProperties.mainText_Color, + text_Secondary: appProperties.supportText_Color, + text_BgHighlight: appProperties.highlight_BackgroundColor, + + box_Debugger: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BackgroundColor, + Color: appProperties.solidBorderBox_TextColor + }), + + button_Debugger: appProperties.uiElements.button({ + BackgroundColor: appProperties.secondaryButton_BackgroundColor, + BorderColor: appProperties.secondaryButton_BorderColor, + Color: appProperties.secondaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + button_Debugger_icon_Color: appProperties.icon_ConstantColor, + button_Debugger_icon_HoverColor: appProperties.icon_HoverColor, + + dropdown_Debugger: appProperties.uiElements.dropdown({ + BackgroundColor: cssProperties.colors.veryLightGrey, + BorderColor: appProperties.dropdown_BorderColor, + Color: appProperties.dropdown_TextColor + }), + + input_Debugger: appProperties.uiElements.inputField({ + BackgroundColor: appProperties.input_BackgroundColor, + BorderColor: appProperties.input_BorderColor, + Color: appProperties.input_TextColor + }), + + debuggerDropdowns_Instructions_Highlight_BackgroundColor: appProperties.secondary_BackgroundColor + + }, + + /* :::::::::::::: + ANALYSIS TAB + ::::::::::::::: */ + analysisTab: { + button_Run_AnalysisTab: appProperties.uiElements.button({ + BackgroundColor: appProperties.primaryButton_BackgroundColor, + BorderColor: appProperties.primaryButton_BorderColor, + Color: appProperties.primaryButton_TextColor, + BorderWidth: appProperties.primaryButton_BorderWidth, + BorderRadius: cssProperties.borders.primary_borderRadius, + BorderStyle: 'solid' + }), + + box_AnalysisContainer: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BackgroundColor, + Color: appProperties.solidBorderBox_TextColor + }) + }, + + /* :::::::::::::: + SUPPORT TAB + ::::::::::::::: */ + supportTab: { + box_IframeContainer: appProperties.uiElements.solidBorderBox({ + BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BackgroundColor, + Color: appProperties.solidBorderBox_TextColor + }), + + box_SupportInfo: appProperties.uiElements.dottedBorderBox({ + BackgroundColor: appProperties.solidBorderBox_BackgroundColor, + BorderColor: appProperties.solidBorderBox_BorderColor, + Color: appProperties.solidBorderBox_TextColor + }) + + } + + } + } + + return { + colors: cssProperties.colors, + appProperties: appProperties, + borders: cssProperties.borders, + leftPanel: remixProperties.leftPanel, + editor: remixProperties.editor, + terminal: remixProperties.terminal, + rightPanel: remixProperties.rightPanel, + remix: remixProperties.remix + } +} diff --git a/src/app/ui/styles/auto-complete-popup-styles.js b/src/app/ui/styles/auto-complete-popup-styles.js new file mode 100644 index 0000000000..114cbce501 --- /dev/null +++ b/src/app/ui/styles/auto-complete-popup-styles.js @@ -0,0 +1,73 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .popup { + position : absolute; + text-align : left; + display : none; + width : 95%; + font-family : monospace; + background-color : var(--secondary); + overflow : auto; + padding-bottom : 13px; + z-index : 80; + bottom : 1em; + border-width : 4px; + left : 2em; + } + + .autoCompleteItem { + padding : 4px; + border-radius : 2px; + } + + .popup a { + cursor : pointer; + } + + .listHandlerShow { + display : block; + } + + .listHandlerHide { + display : none; + } + + .listHandlerButtonShow { + position : fixed; + width : 46%; + } + + .pageNumberAlignment { + font-size : 10px; + float : right; + } + + .modalContent { + position : absolute; + margin-left : 20%; + margin-bottom : 32px; + bottom : 0px; + padding : 0; + line-height : 18px; + font-size : 12px; + width : 40%; + box-shadow : 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); + -webkit-animation-name: animatebottom; + -webkit-animation-duration: 0.4s; + animation-name : animatetop; + animation-duration: 0.4s + } + + @-webkit-keyframes animatetop { + from {bottom: -300px; opacity: 0} + to {bottom: 0; opacity: 1} + } + + @keyframes animatetop { + from {bottom: -300px; opacity: 0} + to {bottom: 0; opacity: 1} + } +` + +module.exports = css diff --git a/src/app/ui/styles/dropdown-styles.js b/src/app/ui/styles/dropdown-styles.js new file mode 100644 index 0000000000..6868788b35 --- /dev/null +++ b/src/app/ui/styles/dropdown-styles.js @@ -0,0 +1,51 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .dropdown { + overflow : visible; + position : relative; + display : flex; + flex-direction : column; + margin-left : 10px; + width : auto; + margin-top : 2px; + max-height : 24px; + } + .selectbox { + display : flex; + align-items : center; + cursor : pointer; + } + .selected { + display : inline-block; + max-width : 30ch; + white-space : nowrap; + text-overflow : ellipsis; + overflow : hidden; + margin-right : 10px; + min-width : 200px; + } + .icon { + padding : 0px 5px; + } + .options { + position : absolute; + display : flex; + flex-direction : column; + align-items : end; + top : 23px; + left : 0; + width : 245px; + border : 1px solid var(--dark); + border-radius : 3px; + border-top : 0; + padding-left : 5px; + } + .option { + margin-left : 5px; + margin-top : 5px; + width : -webkit-fill-available; + } +` + +module.exports = css diff --git a/src/app/ui/styles/modal-dialog-custom-styles.js b/src/app/ui/styles/modal-dialog-custom-styles.js new file mode 100644 index 0000000000..6fb0055f2f --- /dev/null +++ b/src/app/ui/styles/modal-dialog-custom-styles.js @@ -0,0 +1,9 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .prompt_text { + width: 100%; + } +` + +module.exports = css diff --git a/src/app/ui/styles/modaldialog-styles.js b/src/app/ui/styles/modaldialog-styles.js new file mode 100644 index 0000000000..da028aafb9 --- /dev/null +++ b/src/app/ui/styles/modaldialog-styles.js @@ -0,0 +1,33 @@ +var csjs = require('csjs-inject') + +var css = csjs` + + .modalFooter { + } + .modalContent { + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); + -webkit-animation-name: animatetop; + -webkit-animation-duration: 0.4s; + animation-name: animatetop; + animation-duration: 0.4s + } + .modalBody { + word-break: break-word; + overflow-y: auto; + max-height: 600px; + } + .modalFooterOk { + } + .modalFooterCancel { + } + @-webkit-keyframes animatetop { + from {top: -300px; opacity: 0} + to {top: 0; opacity: 1} + } + @keyframes animatetop { + from {top: -300px; opacity: 0} + to {top: 0; opacity: 1} + } +` + +module.exports = css diff --git a/src/app/ui/styles/renderer-styles.js b/src/app/ui/styles/renderer-styles.js new file mode 100644 index 0000000000..7dc047c440 --- /dev/null +++ b/src/app/ui/styles/renderer-styles.js @@ -0,0 +1,52 @@ +var yo = require('yo-yo') + +var css = yo`` + +module.exports = css diff --git a/src/app/ui/styles/tooltip-styles.js b/src/app/ui/styles/tooltip-styles.js new file mode 100644 index 0000000000..da1bcdd904 --- /dev/null +++ b/src/app/ui/styles/tooltip-styles.js @@ -0,0 +1,50 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .tooltip { + z-index: 1001; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + min-height: 50px; + padding: 16px 24px 12px; + border-radius: 3px; + bottom: -300; + left: 40%; + font-size: 14px; + text-align: center; + bottom: 0; + flex-direction: row; + } + @-webkit-keyframes animatebottom { + 0% {bottom: -300px} + 100% {bottom: 0} + } + @keyframes animatebottom { + 0% {bottom: -300px} + 100% {bottom: 0} + } + @-webkit-keyframes animatetop { + 0% {bottom: 0} + 100% {bottom: -300px} + } + @keyframes animatetop { + 0% {bottom: 0} + 100% {bottom: -300px} + } + .animateTop { + -webkit-animation-name: animatetop; + -webkit-animation-duration: 2s; + animation-name: animatetop; + animation-duration: 2s; + } + .animateBottom { + -webkit-animation-name: animatebottom; + -webkit-animation-duration: 2s; + animation-name: animatebottom; + animation-duration: 2s; + } +` + +module.exports = css diff --git a/src/app/ui/svgLogo.js b/src/app/ui/svgLogo.js new file mode 100644 index 0000000000..ccce67bfef --- /dev/null +++ b/src/app/ui/svgLogo.js @@ -0,0 +1,9 @@ +import yo from 'yo-yo' +export function basicLogo () { + return yo` +remix_logo1 + + + +` +} diff --git a/src/app/ui/tooltip.js b/src/app/ui/tooltip.js new file mode 100644 index 0000000000..955a30fedc --- /dev/null +++ b/src/app/ui/tooltip.js @@ -0,0 +1,118 @@ +/* global Element */ +var yo = require('yo-yo') +var css = require('./styles/tooltip-styles') +var modal = require('./modal-dialog-custom') + +/** + * Open a tooltip + * @param {string} tooltipText The text shown by the tooltip + * @param {function} [action] Returns An HTMLElement to display for action + */ +module.exports = function addTooltip (tooltipText, action, opts) { + action = action || function () { return yo`
    ` } + let t = new Toaster() + return t.render(tooltipText, action(t), opts) +} + +class Toaster { + hide () { + if (this.id) clearTimeout(this.id) + setTimeout(() => { + // remove from body after the animation is finished + if (this.tooltip.parentElement) this.tooltip.parentElement.removeChild(this.tooltip) + }, 2000) + animation(this.tooltip, css.animateTop.className) + } + + /** + * Force resolve the promise to close + * the toaster ignoring timeout + */ + forceResolve () { + if (this.id) clearTimeout(this.id) + if (this.resolveFn) this.resolveFn() + } + + render (tooltipText, actionElement, opts) { + opts = defaultOptions(opts) + let canShorten = true + if (tooltipText instanceof Element) { + canShorten = false + } else { + if (typeof tooltipText === 'object') { + if (tooltipText.message) { + tooltipText = tooltipText.message + } else { + try { + tooltipText = JSON.stringify(tooltipText) + } catch (e) { + } + } + } + } + + return new Promise((resolve, reject) => { + const shortTooltipText = (canShorten && tooltipText.length > 201) ? tooltipText.substring(0, 200) + '...' : tooltipText + this.resolveFn = resolve + + function showFullMessage () { + modal.alert(tooltipText) + } + + function closeTheToaster (self) { + self.hide() + over() + resolve() + } + let button = tooltipText.length > 201 ? yo` + + ` : `` + + this.tooltip = yo` +
    { over() }} onmouseleave=${() => { out() }}> + + ${shortTooltipText} + ${button} + ${actionElement} + + + + +
    ` + let timeOut = () => { + return setTimeout(() => { + if (this.id) { + this.hide() + resolve() + } + }, opts.time) + } + let over = () => { + if (this.id) { + clearTimeout(this.id) + this.id = null + } + } + let out = () => { + if (!this.id) this.id = timeOut() + } + this.id = timeOut() + document.body.appendChild(this.tooltip) + animation(this.tooltip, css.animateBottom.className) + }) + } +} + +let defaultOptions = (opts) => { + opts = opts || {} + return { + time: opts.time || 7000 + } +} + +let animation = (tooltip, anim) => { + tooltip.classList.remove(css.animateTop.className) + tooltip.classList.remove(css.animateBottom.className) + void tooltip.offsetWidth // trick for restarting the animation + tooltip.classList.add(anim) +} diff --git a/src/app/ui/txLogger.js b/src/app/ui/txLogger.js new file mode 100644 index 0000000000..3af548f78a --- /dev/null +++ b/src/app/ui/txLogger.js @@ -0,0 +1,567 @@ +'use strict' +var yo = require('yo-yo') +var copyToClipboard = require('./copy-to-clipboard') + +// -------------- styling ---------------------- +var csjs = require('csjs-inject') +var remixLib = require('remix-lib') + +var EventManager = require('../../lib/events') +var helper = require('../../lib/helper') +var modalDialog = require('./modal-dialog-custom') +var typeConversion = remixLib.execution.typeConversion +var globlalRegistry = require('../../global/registry') + +var css = csjs` + .log { + display: flex; + cursor: pointer; + align-items: center; + cursor: pointer; + } + .log:hover { + opacity: 0.8; + } + .arrow { + color: var(--text-info); + font-size: 20px; + cursor: pointer; + display: flex; + margin-left: 10px; + } + .arrow:hover { + color: var(--secondary); + } + .txLog { + } + .txStatus { + display: flex; + font-size: 20px; + margin-right: 20px; + float: left; + } + .succeeded { + color: var(--success); + } + .failed { + color: var(--danger); + } + .notavailable { + } + .call { + font-size: 7px; + border-radius: 50%; + min-width: 20px; + min-height: 20px; + display: flex; + justify-content: center; + align-items: center; + color: var(--text-info); + text-transform: uppercase; + font-weight: bold; + } + .txItem { + color: var(--text-info); + margin-right: 5px; + float: left; + } + .txItemTitle { + font-weight: bold; + } + .tx { + color: var(--text-info); + font-weight: bold; + float: left; + margin-right: 10px; + } + .txTable, + .tr, + .td { + border-collapse: collapse; + font-size: 10px; + color: var(--text-info); + border: 1px solid var(--text-info); + } + #txTable { + margin-top: 1%; + margin-bottom: 5%; + align-self: center; + width: 85%; + } + .tr, .td { + padding: 4px; + vertical-align: baseline; + } + .td:first-child { + min-width: 30%; + width: 30%; + align-items: baseline; + font-weight: bold; + } + .tableTitle { + width: 25%; + } + .buttons { + display: flex; + margin-left: auto; + } + .debug { + white-space: nowrap; + } + .debug:hover { + opacity: 0.8; + }` +/** + * This just export a function that register to `newTransaction` and forward them to the logger. + * + */ +class TxLogger { + constructor (terminal, blockchain) { + this.event = new EventManager() + this.seen = {} + function filterTx (value, query) { + if (value.length) { + return helper.find(value, query) + } + return false + } + this.eventsDecoder = globlalRegistry.get('eventsDecoder').api + this.txListener = globlalRegistry.get('txlistener').api + this.terminal = terminal + // dependencies + this._deps = { + compilersArtefacts: globlalRegistry.get('compilersartefacts').api + } + + this.logKnownTX = this.terminal.registerCommand('knownTransaction', (args, cmds, append) => { + var data = args[0] + var el + if (data.tx.isCall) { + el = renderCall(this, data) + } else { + el = renderKnownTransaction(this, data, blockchain) + } + this.seen[data.tx.hash] = el + append(el) + }, { activate: true, filterFn: filterTx }) + + this.logUnknownTX = this.terminal.registerCommand('unknownTransaction', (args, cmds, append) => { + // triggered for transaction AND call + var data = args[0] + var el = renderUnknownTransaction(this, data, blockchain) + append(el) + }, { activate: false, filterFn: filterTx }) + + this.logEmptyBlock = this.terminal.registerCommand('emptyBlock', (args, cmds, append) => { + var data = args[0] + var el = renderEmptyBlock(this, data) + append(el) + }, { activate: true }) + + this.txListener.event.register('newBlock', (block) => { + if (!block.transactions || block.transactions && !block.transactions.length) { + this.logEmptyBlock({ block: block }) + } + }) + + this.txListener.event.register('newTransaction', (tx, receipt) => { + log(this, tx, receipt) + }) + + this.txListener.event.register('newCall', (tx) => { + log(this, tx, null) + }) + + this.terminal.updateJournal({ type: 'select', value: 'unknownTransaction' }) + this.terminal.updateJournal({ type: 'select', value: 'knownTransaction' }) + } +} + +function debug (e, data, self) { + e.stopPropagation() + if (data.tx.isCall && data.tx.envMode !== 'vm') { + modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.') + } else { + self.event.trigger('debuggingRequested', [data.tx.hash]) + } +} + +function log (self, tx, receipt) { + var resolvedTransaction = self.txListener.resolvedTransaction(tx.hash) + if (resolvedTransaction) { + var compiledContracts = null + if (self._deps.compilersArtefacts['__last']) { + compiledContracts = self._deps.compilersArtefacts['__last'].getContracts() + } + self.eventsDecoder.parseLogs(tx, resolvedTransaction.contractName, compiledContracts, (error, logs) => { + if (!error) { + self.logKnownTX({ tx: tx, receipt: receipt, resolvedData: resolvedTransaction, logs: logs }) + } + }) + } else { + // contract unknown - just displaying raw tx. + self.logUnknownTX({ tx: tx, receipt: receipt }) + } +} + +function renderKnownTransaction (self, data, blockchain) { + var from = data.tx.from + var to = data.resolvedData.contractName + '.' + data.resolvedData.fn + var obj = {from, to} + var txType = 'knownTx' + var tx = yo` + +
    txDetails(e, tx, data, obj)}> + ${checkTxStatus(data.receipt, txType)} + ${context(self, {from, to, data}, blockchain)} +
    +
    +
    + + +
    + ` + return tx +} + +function renderCall (self, data) { + var to = data.resolvedData.contractName + '.' + data.resolvedData.fn + var from = data.tx.from ? data.tx.from : ' - ' + var input = data.tx.input ? helper.shortenHexData(data.tx.input) : '' + var obj = {from, to} + var txType = 'call' + var tx = yo` + +
    txDetails(e, tx, data, obj)}> + ${checkTxStatus(data.tx, txType)} + + [call] +
    from: ${from}
    +
    to: ${to}
    +
    data: ${input}
    +
    +
    +
    debug(e, data, self)}>Debug
    +
    + +
    +
    + ` + return tx +} + +function renderUnknownTransaction (self, data, blockchain) { + var from = data.tx.from + var to = data.tx.to + var obj = {from, to} + var txType = 'unknown' + (data.tx.isCall ? 'Call' : 'Tx') + var tx = yo` + +
    txDetails(e, tx, data, obj)}> + ${checkTxStatus(data.receipt || data.tx, txType)} + ${context(self, {from, to, data}, blockchain)} +
    +
    debug(e, data, self)}>Debug
    +
    + +
    +
    + ` + return tx +} + +function renderEmptyBlock (self, data) { + return yo` + +
    [block:${data.block.number} - 0 transactions] + ` +} + +function checkTxStatus (tx, type) { + if (tx.status === '0x1' || tx.status === true) { + return yo`` + } + if (type === 'call' || type === 'unknownCall') { + return yo`call` + } else if (tx.status === '0x0' || tx.status === false) { + return yo`` + } else { + return yo`` + } +} + +function context (self, opts, blockchain) { + var data = opts.data || '' + var from = opts.from ? helper.shortenHexData(opts.from) : '' + var to = opts.to + if (data.tx.to) to = to + ' ' + helper.shortenHexData(data.tx.to) + var val = data.tx.value + var hash = data.tx.hash ? helper.shortenHexData(data.tx.hash) : '' + var input = data.tx.input ? helper.shortenHexData(data.tx.input) : '' + var logs = data.logs && data.logs.decoded && data.logs.decoded.length ? data.logs.decoded.length : 0 + var block = data.receipt ? data.receipt.blockNumber : data.tx.blockNumber || '' + var i = data.receipt ? data.receipt.transactionIndex : data.tx.transactionIndex + var value = val ? typeConversion.toInt(val) : 0 + if (blockchain.getProvider() === 'vm') { + return yo` +
    + + [vm] +
    from: ${from}
    +
    to: ${to}
    +
    value: ${value} wei
    +
    data: ${input}
    +
    logs: ${logs}
    +
    hash: ${hash}
    +
    +
    ` + } else if (blockchain.getProvider() !== 'vm' && data.resolvedData) { + return yo` +
    + + [block:${block} txIndex:${i}] +
    from: ${from}
    +
    to: ${to}
    +
    value: ${value} wei
    +
    data: ${input}
    +
    logs: ${logs}
    +
    hash: ${hash}
    +
    +
    ` + } else { + to = helper.shortenHexData(to) + hash = helper.shortenHexData(data.tx.blockHash) + return yo` +
    + + [block:${block} txIndex:${i}] +
    from: ${from}
    +
    to: ${to}
    +
    value: ${value} wei
    +
    +
    ` + } +} + +module.exports = TxLogger + +// helpers + +function txDetails (e, tx, data, obj) { + const from = obj.from + const to = obj.to + const arrowUp = yo`` + const arrowDown = yo`` + + let blockElement = e.target + while (true) { // get the parent block element + if (blockElement.className.startsWith('block')) break + else if (blockElement.parentElement) { + blockElement = blockElement.parentElement + } else break + } + + let table = blockElement.querySelector(`#${tx.id} [class^="txTable"]`) + const log = blockElement.querySelector(`#${tx.id} [class^='log']`) + const arrow = blockElement.querySelector(`#${tx.id} [class^='arrow']`) + + if (table && table.parentNode) { + tx.removeChild(table) + log.removeChild(arrow) + log.appendChild(arrowDown) + } else { + log.removeChild(arrow) + log.appendChild(arrowUp) + table = createTable({ + hash: data.tx.hash, + status: data.receipt ? data.receipt.status : null, + isCall: data.tx.isCall, + contractAddress: data.tx.contractAddress, + data: data.tx, + from, + to, + gas: data.tx.gas, + input: data.tx.input, + 'decoded input': data.resolvedData && data.resolvedData.params ? JSON.stringify(typeConversion.stringify(data.resolvedData.params), null, '\t') : ' - ', + 'decoded output': data.resolvedData && data.resolvedData.decodedReturnValue ? JSON.stringify(typeConversion.stringify(data.resolvedData.decodedReturnValue), null, '\t') : ' - ', + logs: data.logs, + val: data.tx.value, + transactionCost: data.tx.transactionCost, + executionCost: data.tx.executionCost + }) + tx.appendChild(table) + } +} + +function createTable (opts) { + var table = yo`
    ` + if (!opts.isCall) { + var msg = '' + if (opts.status !== undefined && opts.status !== null) { + if (opts.status === '0x0' || opts.status === false) { + msg = ' Transaction mined but execution failed' + } else if (opts.status === '0x1' || opts.status === true) { + msg = ' Transaction mined and execution succeed' + } + } else { + msg = ' Status not available at the moment' + } + table.appendChild(yo` + + status + ${opts.status}${msg} + `) + } + + var transactionHash = yo` + + transaction hash + ${opts.hash} + ${copyToClipboard(() => opts.hash)} + + + ` + table.appendChild(transactionHash) + + var contractAddress = yo` + + contract address + ${opts.contractAddress} + ${copyToClipboard(() => opts.contractAddress)} + + + ` + if (opts.contractAddress) table.appendChild(contractAddress) + + var from = yo` + + from + ${opts.from} + ${copyToClipboard(() => opts.from)} + + + ` + if (opts.from) table.appendChild(from) + + var toHash + var data = opts.data // opts.data = data.tx + if (data.to) { + toHash = opts.to + ' ' + data.to + } else { + toHash = opts.to + } + var to = yo` + + to + ${toHash} + ${copyToClipboard(() => data.to ? data.to : toHash)} + + + ` + if (opts.to) table.appendChild(to) + + var gas = yo` + + gas + ${opts.gas} gas + ${copyToClipboard(() => opts.gas)} + + + ` + if (opts.gas) table.appendChild(gas) + + var callWarning = '' + if (opts.isCall) { + callWarning = '(Cost only applies when called by a contract)' + } + if (opts.transactionCost) { + table.appendChild(yo` + + transaction cost + ${opts.transactionCost} gas ${callWarning} + ${copyToClipboard(() => opts.transactionCost)} + + `) + } + + if (opts.executionCost) { + table.appendChild(yo` + + execution cost + ${opts.executionCost} gas ${callWarning} + ${copyToClipboard(() => opts.executionCost)} + + `) + } + + var hash = yo` + + hash + ${opts.hash} + ${copyToClipboard(() => opts.hash)} + + + ` + if (opts.hash) table.appendChild(hash) + + var input = yo` + + input + ${helper.shortenHexData(opts.input)} + ${copyToClipboard(() => opts.input)} + + + ` + if (opts.input) table.appendChild(input) + + if (opts['decoded input']) { + var inputDecoded = yo` + + decoded input + ${opts['decoded input']} + ${copyToClipboard(() => opts['decoded input'])} + + ` + table.appendChild(inputDecoded) + } + + if (opts['decoded output']) { + var outputDecoded = yo` + + decoded output + ${opts['decoded output']} + ${copyToClipboard(() => opts['decoded output'])} + + ` + table.appendChild(outputDecoded) + } + + var stringified = ' - ' + if (opts.logs && opts.logs.decoded) { + stringified = typeConversion.stringify(opts.logs.decoded) + } + var logs = yo` + + logs + + ${JSON.stringify(stringified, null, '\t')} + ${copyToClipboard(() => JSON.stringify(stringified, null, '\t'))} + ${copyToClipboard(() => JSON.stringify(opts.logs.raw || '0'))} + + + ` + if (opts.logs) table.appendChild(logs) + + var val = opts.val != null ? typeConversion.toInt(opts.val) : 0 + val = yo` + + value + ${val} wei + ${copyToClipboard(() => `${val} wei`)} + + + ` + if (opts.val) table.appendChild(val) + + return table +} diff --git a/src/app/ui/universal-dapp-ui.js b/src/app/ui/universal-dapp-ui.js new file mode 100644 index 0000000000..c56f6f4650 --- /dev/null +++ b/src/app/ui/universal-dapp-ui.js @@ -0,0 +1,263 @@ +/* global */ +'use strict' + +var $ = require('jquery') +var yo = require('yo-yo') +var ethJSUtil = require('ethereumjs-util') +var BN = ethJSUtil.BN +var helper = require('../../lib/helper') +var copyToClipboard = require('./copy-to-clipboard') +var css = require('../../universal-dapp-styles') +var MultiParamManager = require('./multiParamManager') +var remixLib = require('remix-lib') +var txFormat = remixLib.execution.txFormat +const txHelper = remixLib.execution.txHelper +var TreeView = require('./TreeView') +var txCallBacks = require('./sendTxCallbacks') + +function UniversalDAppUI (blockchain, logCallback) { + this.blockchain = blockchain + this.logCallback = logCallback + this.compilerData = {contractsDetails: {}} +} + +function decodeResponseToTreeView (response, fnabi) { + var treeView = new TreeView({ + extractData: (item, parent, key) => { + var ret = {} + if (BN.isBN(item)) { + ret.self = item.toString(10) + ret.children = [] + } else { + ret = treeView.extractDataDefault(item, parent, key) + } + return ret + } + }) + return treeView.render(txFormat.decodeResponse(response, fnabi)) +} + +UniversalDAppUI.prototype.renderInstance = function (contract, address, contractName) { + var noInstances = document.querySelector('[data-id="deployAndRunNoInstanceText"]') + if (noInstances) { + noInstances.parentNode.removeChild(noInstances) + } + const abi = txHelper.sortAbiFunction(contract.abi) + return this.renderInstanceFromABI(abi, address, contractName) +} + +// TODO this function was named before "appendChild". +// this will render an instance: contract name, contract address, and all the public functions +// basically this has to be called for the "atAddress" (line 393) and when a contract creation succeed +// this returns a DOM element +UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address, contractName) { + let self = this + address = (address.slice(0, 2) === '0x' ? '' : '0x') + address.toString('hex') + address = ethJSUtil.toChecksumAddress(address) + var instance = yo`
    ` + const context = this.blockchain.context() + + var shortAddress = helper.shortenAddress(address) + var title = yo` +
    + +
    +
    + + ${contractName} at ${shortAddress} (${context}) + +
    +
    + +
    +
    +
    + ` + + var close = yo` + ` + title.querySelector('.btn-group').appendChild(close) + + var contractActionsWrapper = yo` +
    +
    + ` + + function remove () { + instance.remove() + // @TODO perhaps add a callack here to warn the caller that the instance has been removed + } + + function toggleClass (e) { + $(instance).toggleClass(`${css.hidesub} bg-light`) + // e.currentTarget.querySelector('i') + e.currentTarget.querySelector('i').classList.toggle(`fa-angle-right`) + e.currentTarget.querySelector('i').classList.toggle(`fa-angle-down`) + } + + instance.appendChild(title) + instance.appendChild(contractActionsWrapper) + + $.each(contractABI, (i, funABI) => { + if (funABI.type !== 'function') { + return + } + // @todo getData cannot be used with overloaded functions + contractActionsWrapper.appendChild(this.getCallButton({ + funABI: funABI, + address: address, + contractABI: contractABI, + contractName: contractName + })) + }) + + const calldataInput = yo` + + ` + const llIError = yo` + + ` + // constract LLInteractions elements + const lowLevelInteracions = yo` +
    +
    +
    + Low level interactions +
    + + + +
    +
    + +
    + ${calldataInput} + +
    +
    +
    + ${llIError} +
    +
    + ` + + function sendData () { + function setLLIError (text) { + llIError.innerText = text + } + + setLLIError('') + const fallback = txHelper.getFallbackInterface(contractABI) + const receive = txHelper.getReceiveInterface(contractABI) + const args = { + funABI: fallback || receive, + address: address, + contractName: contractName, + contractABI: contractABI + } + const amount = document.querySelector('#value').value + if (amount !== '0') { + // check for numeric and receive/fallback + if (!helper.isNumeric(amount)) { + return setLLIError('Value to send should be a number') + } else if (!receive && !(fallback && fallback.stateMutability === 'payable')) { + return setLLIError("In order to receive Ether transfer the contract should have either 'receive' or payable 'fallback' function") + } + } + let calldata = calldataInput.value + if (calldata) { + if (calldata.length < 2 || calldata.length < 4 && helper.is0XPrefixed(calldata)) { + return setLLIError('The calldata should be a valid hexadecimal value with size of at least one byte.') + } else { + if (helper.is0XPrefixed(calldata)) { + calldata = calldata.substr(2, calldata.length) + } + if (!helper.isHexadecimal(calldata)) { + return setLLIError('The calldata should be a valid hexadecimal value.') + } + } + if (!fallback) { + return setLLIError("'Fallback' function is not defined") + } + } + + if (!receive && !fallback) return setLLIError(`Both 'receive' and 'fallback' functions are not defined`) + + // we have to put the right function ABI: + // if receive is defined and that there is no calldata => receive function is called + // if fallback is defined => fallback function is called + if (receive && !calldata) args.funABI = receive + else if (fallback) args.funABI = fallback + + if (!args.funABI) return setLLIError(`Please define a 'Fallback' function to send calldata and a either 'Receive' or payable 'Fallback' to send ethers`) + self.runTransaction(false, args, null, calldataInput.value, null) + } + + contractActionsWrapper.appendChild(lowLevelInteracions) + return instance +} + +// TODO this is used by renderInstance when a new instance is displayed. +// this returns a DOM element. +UniversalDAppUI.prototype.getCallButton = function (args) { + let self = this + var outputOverride = yo`
    ` // show return value + const isConstant = args.funABI.constant !== undefined ? args.funABI.constant : false + const lookupOnly = args.funABI.stateMutability === 'view' || args.funABI.stateMutability === 'pure' || isConstant + const multiParamManager = new MultiParamManager( + lookupOnly, + args.funABI, + (valArray, inputsValues) => self.runTransaction(lookupOnly, args, valArray, inputsValues, outputOverride), + self.blockchain.getInputs(args.funABI) + ) + + const contractActionsContainer = yo`
    ${multiParamManager.render()}
    ` + contractActionsContainer.appendChild(outputOverride) + + return contractActionsContainer +} + +UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, inputsValues, outputOverride) { + const functionName = args.funABI.type === 'function' ? args.funABI.name : `(${args.funABI.type})` + const logMsg = `${lookupOnly ? 'call' : 'transact'} to ${args.contractName}.${functionName}` + + const callbacksInContext = txCallBacks.getCallBacksWithContext(this, this.blockchain) + + const outputCb = (returnValue) => { + if (outputOverride) { + const decoded = decodeResponseToTreeView(returnValue, args.funABI) + outputOverride.innerHTML = '' + outputOverride.appendChild(decoded) + } + } + const params = args.funABI.type !== 'fallback' ? inputsValues : '' + this.blockchain.runOrCallContractMethod( + args.contractName, + args.contractAbi, + args.funABI, + inputsValues, + args.address, + params, + lookupOnly, + logMsg, + this.logCallback, + outputCb, + callbacksInContext.confirmationCb.bind(callbacksInContext), + callbacksInContext.continueCb.bind(callbacksInContext), + callbacksInContext.promptCb.bind(callbacksInContext)) +} + +module.exports = UniversalDAppUI diff --git a/src/blockchain/blockchain.js b/src/blockchain/blockchain.js new file mode 100644 index 0000000000..7e71f57000 --- /dev/null +++ b/src/blockchain/blockchain.js @@ -0,0 +1,479 @@ +const remixLib = require('remix-lib') +const txFormat = remixLib.execution.txFormat +const txExecution = remixLib.execution.txExecution +const typeConversion = remixLib.execution.typeConversion +const Txlistener = remixLib.execution.txListener +const TxRunner = remixLib.execution.txRunner +const txHelper = remixLib.execution.txHelper +const EventManager = remixLib.EventManager +const executionContext = remixLib.execution.executionContext +const Web3 = require('web3') + +const async = require('async') +const { EventEmitter } = require('events') + +const { resultToRemixTx } = require('./txResultHelper') + +const VMProvider = require('./providers/vm.js') +const InjectedProvider = require('./providers/injected.js') +const NodeProvider = require('./providers/node.js') + +class Blockchain { + + // NOTE: the config object will need to be refactored out in remix-lib + constructor (config) { + this.event = new EventManager() + this.executionContext = executionContext + + this.events = new EventEmitter() + this.config = config + + this.txRunner = new TxRunner({}, { + config: config, + detectNetwork: (cb) => { + this.executionContext.detectNetwork(cb) + }, + personalMode: () => { + return this.getProvider() === 'web3' ? this.config.get('settings/personal-mode') : false + } + }, this.executionContext) + this.executionContext.event.register('contextChanged', this.resetEnvironment.bind(this)) + + this.networkcallid = 0 + this.setupEvents() + this.setupProviders() + } + + setupEvents () { + this.executionContext.event.register('contextChanged', (context, silent) => { + this.event.trigger('contextChanged', [context, silent]) + }) + + this.executionContext.event.register('addProvider', (network) => { + this.event.trigger('addProvider', [network]) + }) + + this.executionContext.event.register('removeProvider', (name) => { + this.event.trigger('removeProvider', [name]) + }) + } + + setupProviders () { + this.providers = {} + this.providers.vm = new VMProvider(this.executionContext) + this.providers.injected = new InjectedProvider(this.executionContext) + this.providers.web3 = new NodeProvider(this.executionContext, this.config) + } + + getCurrentProvider () { + const provider = this.getProvider() + return this.providers[provider] + } + + /** Return the list of accounts */ + // note: the dual promise/callback is kept for now as it was before + getAccounts (cb) { + return new Promise((resolve, reject) => { + this.getCurrentProvider().getAccounts((error, accounts) => { + if (cb) { + return cb(error, accounts) + } + if (error) { + reject(error) + } + resolve(accounts) + }) + }) + } + + deployContractAndLibraries (selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) { + const { continueCb, promptCb, statusCb, finalCb } = callbacks + const constructor = selectedContract.getConstructorInterface() + txFormat.buildData(selectedContract.name, selectedContract.object, compilerContracts, true, constructor, args, (error, data) => { + if (error) return statusCb(`creation of ${selectedContract.name} errored: ` + error) + + statusCb(`creation of ${selectedContract.name} pending...`) + this.createContract(selectedContract, data, continueCb, promptCb, confirmationCb, finalCb) + }, statusCb, (data, runTxCallback) => { + // called for libraries deployment + this.runTx(data, confirmationCb, continueCb, promptCb, runTxCallback) + }) + } + + deployContractWithLibrary (selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) { + const { continueCb, promptCb, statusCb, finalCb } = callbacks + const constructor = selectedContract.getConstructorInterface() + txFormat.encodeConstructorCallAndLinkLibraries(selectedContract.object, args, constructor, contractMetadata.linkReferences, selectedContract.bytecodeLinkReferences, (error, data) => { + if (error) return statusCb(`creation of ${selectedContract.name} errored: ` + error) + + statusCb(`creation of ${selectedContract.name} pending...`) + this.createContract(selectedContract, data, continueCb, promptCb, confirmationCb, finalCb) + }) + } + + createContract (selectedContract, data, continueCb, promptCb, confirmationCb, finalCb) { + if (data) { + data.contractName = selectedContract.name + data.linkReferences = selectedContract.bytecodeLinkReferences + data.contractABI = selectedContract.abi + } + + this.runTx({ data: data, useCall: false }, confirmationCb, continueCb, promptCb, + (error, txResult, address) => { + if (error) { + return finalCb(`creation of ${selectedContract.name} errored: ${error}`) + } + if (txResult.result.status && txResult.result.status === '0x0') { + return finalCb(`creation of ${selectedContract.name} errored: transaction execution failed`) + } + finalCb(null, selectedContract, address) + } + ) + } + + determineGasPrice (cb) { + this.getCurrentProvider().getGasPrice((error, gasPrice) => { + const warnMessage = ' Please fix this issue before sending any transaction. ' + if (error) { + return cb('Unable to retrieve the current network gas price.' + warnMessage + error) + } + try { + const gasPriceValue = this.fromWei(gasPrice, false, 'gwei') + cb(null, gasPriceValue) + } catch (e) { + cb(warnMessage + e.message, null, false) + } + }) + } + + getInputs (funABI) { + if (!funABI.inputs) { + return '' + } + return txHelper.inputParametersDeclarationToString(funABI.inputs) + } + + fromWei (value, doTypeConversion, unit) { + if (doTypeConversion) { + return Web3.utils.fromWei(typeConversion.toInt(value), unit || 'ether') + } + return Web3.utils.fromWei(value.toString(10), unit || 'ether') + } + + toWei (value, unit) { + return Web3.utils.toWei(value, unit || 'gwei') + } + + calculateFee (gas, gasPrice, unit) { + return Web3.utils.toBN(gas).mul(Web3.utils.toBN(Web3.utils.toWei(gasPrice.toString(10), unit || 'gwei'))) + } + + determineGasFees (tx) { + const determineGasFeesCb = (gasPrice, cb) => { + let txFeeText, priceStatus + // TODO: this try catch feels like an anti pattern, can/should be + // removed, but for now keeping the original logic + try { + const fee = this.calculateFee(tx.gas, gasPrice) + txFeeText = ' ' + this.fromWei(fee, false, 'ether') + ' Ether' + priceStatus = true + } catch (e) { + txFeeText = ' Please fix this issue before sending any transaction. ' + e.message + priceStatus = false + } + cb(txFeeText, priceStatus) + } + + return determineGasFeesCb + } + + changeExecutionContext (context, confirmCb, infoCb, cb) { + return this.executionContext.executionContextChange(context, null, confirmCb, infoCb, cb) + } + + setProviderFromEndpoint (target, context, cb) { + return this.executionContext.setProviderFromEndpoint(target, context, cb) + } + + updateNetwork (cb) { + this.executionContext.detectNetwork((err, { id, name } = {}) => { + if (err) { + return cb(err) + } + cb(null, {id, name}) + }) + } + + detectNetwork (cb) { + return this.executionContext.detectNetwork(cb) + } + + getProvider () { + return this.executionContext.getProvider() + } + + isWeb3Provider () { + const isVM = this.getProvider() === 'vm' + const isInjected = this.getProvider() === 'injected' + return (!isVM && !isInjected) + } + + isInjectedWeb3 () { + return this.getProvider() === 'injected' + } + + signMessage (message, account, passphrase, cb) { + this.getCurrentProvider().signMessage(message, account, passphrase, cb) + } + + web3 () { + return this.executionContext.web3() + } + + getTxListener (opts) { + opts.event = { + // udapp: this.udapp.event + udapp: this.event + } + const txlistener = new Txlistener(opts, this.executionContext) + return txlistener + } + + runOrCallContractMethod (contractName, contractAbi, funABI, value, address, callType, lookupOnly, logMsg, logCallback, outputCb, confirmationCb, continueCb, promptCb) { + // contractsDetails is used to resolve libraries + txFormat.buildData(contractName, contractAbi, {}, false, funABI, callType, (error, data) => { + if (error) { + return logCallback(`${logMsg} errored: ${error} `) + } + if (!lookupOnly) { + logCallback(`${logMsg} pending ... `) + } else { + logCallback(`${logMsg}`) + } + if (funABI.type === 'fallback') data.dataHex = value + + const useCall = funABI.stateMutability === 'view' || funABI.stateMutability === 'pure' + this.runTx({to: address, data, useCall}, confirmationCb, continueCb, promptCb, (error, txResult, _address, returnValue) => { + if (error) { + return logCallback(`${logMsg} errored: ${error} `) + } + if (lookupOnly) { + outputCb(returnValue) + } + }) + }, + (msg) => { + logCallback(msg) + }, + (data, runTxCallback) => { + // called for libraries deployment + this.runTx(data, confirmationCb, runTxCallback, promptCb, () => {}) + }) + } + + context () { + return (this.executionContext.isVM() ? 'memory' : 'blockchain') + } + + // NOTE: the config is only needed because exectuionContext.init does + // if config.get('settings/always-use-vm'), we can simplify this later + resetAndInit (config, transactionContextAPI) { + this.transactionContextAPI = transactionContextAPI + this.executionContext.init(config) + this.executionContext.stopListenOnLastBlock() + this.executionContext.listenOnLastBlock() + this.resetEnvironment() + } + + addNetwork (customNetwork) { + this.executionContext.addProvider(customNetwork) + } + + removeNetwork (name) { + this.executionContext.removeProvider(name) + } + + // TODO : event should be triggered by Udapp instead of TxListener + /** Listen on New Transaction. (Cannot be done inside constructor because txlistener doesn't exist yet) */ + startListening (txlistener) { + txlistener.event.register('newTransaction', (tx) => { + this.events.emit('newTransaction', tx) + }) + } + + resetEnvironment () { + this.getCurrentProvider().resetEnvironment() + // TODO: most params here can be refactored away in txRunner + // this.txRunner = new TxRunner(this.providers.vm.accounts, { + this.txRunner = new TxRunner(this.providers.vm.RemixSimulatorProvider.Accounts.accounts, { + // TODO: only used to check value of doNotShowTransactionConfirmationAgain property + config: this.config, + // TODO: to refactor, TxRunner already has access to executionContext + detectNetwork: (cb) => { + this.executionContext.detectNetwork(cb) + }, + personalMode: () => { + return this.getProvider() === 'web3' ? this.config.get('settings/personal-mode') : false + } + }, this.executionContext) + this.txRunner.event.register('transactionBroadcasted', (txhash) => { + this.executionContext.detectNetwork((error, network) => { + if (error || !network) return + this.event.trigger('transactionBroadcasted', [txhash, network.name]) + }) + }) + } + + /** + * Create a VM Account + * @param {{privateKey: string, balance: string}} newAccount The new account to create + */ + createVMAccount (newAccount) { + if (this.getProvider() !== 'vm') { + throw new Error('plugin API does not allow creating a new account through web3 connection. Only vm mode is allowed') + } + return this.providers.vm.createVMAccount(newAccount) + } + + newAccount (_password, passwordPromptCb, cb) { + return this.getCurrentProvider().newAccount(passwordPromptCb, cb) + } + + /** Get the balance of an address, and convert wei to ether */ + getBalanceInEther (address, cb) { + this.getCurrentProvider().getBalanceInEther(address, cb) + } + + pendingTransactionsCount () { + return Object.keys(this.txRunner.pendingTxs).length + } + + /** + * This function send a tx only to javascript VM or testnet, will return an error for the mainnet + * SHOULD BE TAKEN CAREFULLY! + * + * @param {Object} tx - transaction. + */ + sendTransaction (tx) { + return new Promise((resolve, reject) => { + this.executionContext.detectNetwork((error, network) => { + if (error) return reject(error) + if (network.name === 'Main' && network.id === '1') { + return reject(new Error('It is not allowed to make this action against mainnet')) + } + + this.txRunner.rawRun( + tx, + (network, tx, gasEstimation, continueTxExecution, cancelCb) => { continueTxExecution() }, + (error, continueTxExecution, cancelCb) => { if (error) { reject(error) } else { continueTxExecution() } }, + (okCb, cancelCb) => { okCb() }, + (error, result) => { + if (error) return reject(error) + try { + resolve(resultToRemixTx(result)) + } catch (e) { + reject(e) + } + } + ) + }) + }) + } + + runTx (args, confirmationCb, continueCb, promptCb, cb) { + const self = this + async.waterfall([ + function getGasLimit (next) { + if (self.transactionContextAPI.getGasLimit) { + return self.transactionContextAPI.getGasLimit(next) + } + next(null, 3000000) + }, + function queryValue (gasLimit, next) { + if (args.value) { + return next(null, args.value, gasLimit) + } + if (args.useCall || !self.transactionContextAPI.getValue) { + return next(null, 0, gasLimit) + } + self.transactionContextAPI.getValue(function (err, value) { + next(err, value, gasLimit) + }) + }, + function getAccount (value, gasLimit, next) { + if (args.from) { + return next(null, args.from, value, gasLimit) + } + if (self.transactionContextAPI.getAddress) { + return self.transactionContextAPI.getAddress(function (err, address) { + next(err, address, value, gasLimit) + }) + } + self.getAccounts(function (err, accounts) { + let address = accounts[0] + + if (err) return next(err) + if (!address) return next('No accounts available') + // if (self.executionContext.isVM() && !self.providers.vm.accounts[address]) { + if (self.executionContext.isVM() && !self.providers.vm.RemixSimulatorProvider.Accounts.accounts[address]) { + return next('Invalid account selected') + } + next(null, address, value, gasLimit) + }) + }, + function runTransaction (fromAddress, value, gasLimit, next) { + const tx = { to: args.to, data: args.data.dataHex, useCall: args.useCall, from: fromAddress, value: value, gasLimit: gasLimit, timestamp: args.data.timestamp } + const payLoad = { funAbi: args.data.funAbi, funArgs: args.data.funArgs, contractBytecode: args.data.contractBytecode, contractName: args.data.contractName, contractABI: args.data.contractABI, linkReferences: args.data.linkReferences } + let timestamp = Date.now() + if (tx.timestamp) { + timestamp = tx.timestamp + } + + self.event.trigger('initiatingTransaction', [timestamp, tx, payLoad]) + self.txRunner.rawRun(tx, confirmationCb, continueCb, promptCb, + function (error, result) { + if (error) return next(error) + + const rawAddress = self.executionContext.isVM() ? result.result.createdAddress : result.result.contractAddress + let eventName = (tx.useCall ? 'callExecuted' : 'transactionExecuted') + self.event.trigger(eventName, [error, tx.from, tx.to, tx.data, tx.useCall, result, timestamp, payLoad, rawAddress]) + + if (error && (typeof (error) !== 'string')) { + if (error.message) error = error.message + else { + try { error = 'error: ' + JSON.stringify(error) } catch (e) {} + } + } + next(error, result) + } + ) + } + ], + (error, txResult) => { + if (error) { + return cb(error) + } + + const isVM = this.executionContext.isVM() + if (isVM) { + const vmError = txExecution.checkVMError(txResult) + if (vmError.error) { + return cb(vmError.message) + } + } + + let address = null + let returnValue = null + if (txResult && txResult.result) { + address = isVM ? txResult.result.createdAddress : txResult.result.contractAddress + // if it's not the VM, we don't have return value. We only have the transaction, and it does not contain the return value. + returnValue = (txResult.result.execResult && isVM) ? txResult.result.execResult.returnValue : txResult.result + } + + cb(error, txResult, address, returnValue) + }) + } + +} + +module.exports = Blockchain diff --git a/src/blockchain/pluginUDapp.js b/src/blockchain/pluginUDapp.js new file mode 100644 index 0000000000..93c2f9e369 --- /dev/null +++ b/src/blockchain/pluginUDapp.js @@ -0,0 +1,35 @@ +const { EventEmitter } = require('events') + +class PluginUdapp { + + constructor (blockchain) { + this.blockchain = blockchain + this.events = new EventEmitter() + this.setupEvents() + } + + setupEvents () { + this.blockchain.events.on('newTransaction', (tx, receipt) => { + this.events.emit('newTransaction', tx, receipt) + }) + } + + createVMAccount (newAccount) { + return this.blockchain.createVMAccount(newAccount) + } + + sendTransaction (tx) { + return this.blockchain.sendTransaction(tx) + } + + getAccounts (cb) { + return this.blockchain.getAccounts(cb) + } + + pendingTransactionsCount () { + return this.blockchain.pendingTransactionsCount() + } + +} + +module.exports = PluginUdapp diff --git a/src/blockchain/providers/injected.js b/src/blockchain/providers/injected.js new file mode 100644 index 0000000000..81ff6764fb --- /dev/null +++ b/src/blockchain/providers/injected.js @@ -0,0 +1,53 @@ +const Web3 = require('web3') +const { stripHexPrefix, hashPersonalMessage } = require('ethereumjs-util') + +class InjectedProvider { + + constructor (executionContext) { + this.executionContext = executionContext + } + + getAccounts (cb) { + return this.executionContext.web3().eth.getAccounts(cb) + } + + newAccount (passwordPromptCb, cb) { + passwordPromptCb((passphrase) => { + this.executionContext.web3().personal.newAccount(passphrase, cb) + }) + } + + resetEnvironment () { + } + + getBalanceInEther (address, cb) { + address = stripHexPrefix(address) + this.executionContext.web3().eth.getBalance(address, (err, res) => { + if (err) { + return cb(err) + } + cb(null, Web3.utils.fromWei(res.toString(10), 'ether')) + }) + } + + getGasPrice (cb) { + this.executionContext.web3().eth.getGasPrice(cb) + } + + signMessage (message, account, _passphrase, cb) { + const messageHash = hashPersonalMessage(Buffer.from(message)) + try { + this.executionContext.web3().eth.sign(message, account, (error, signedData) => { + cb(error, '0x' + messageHash.toString('hex'), signedData) + }) + } catch (e) { + cb(e.message) + } + } + + getProvider () { + return 'injected' + } +} + +module.exports = InjectedProvider diff --git a/src/blockchain/providers/node.js b/src/blockchain/providers/node.js new file mode 100644 index 0000000000..ae30d547de --- /dev/null +++ b/src/blockchain/providers/node.js @@ -0,0 +1,62 @@ +const Web3 = require('web3') +const { stripHexPrefix, hashPersonalMessage } = require('ethereumjs-util') +const Personal = require('web3-eth-personal') + +class NodeProvider { + + constructor (executionContext, config) { + this.executionContext = executionContext + this.config = config + } + + getAccounts (cb) { + if (this.config.get('settings/personal-mode')) { + return this.executionContext.web3().personal.getListAccounts(cb) + } + return this.executionContext.web3().eth.getAccounts(cb) + } + + newAccount (passwordPromptCb, cb) { + if (!this.config.get('settings/personal-mode')) { + return cb('Not running in personal mode') + } + passwordPromptCb((passphrase) => { + this.executionContext.web3().personal.newAccount(passphrase, cb) + }) + } + + resetEnvironment () { + } + + getBalanceInEther (address, cb) { + address = stripHexPrefix(address) + this.executionContext.web3().eth.getBalance(address, (err, res) => { + if (err) { + return cb(err) + } + cb(null, Web3.utils.fromWei(res.toString(10), 'ether')) + }) + } + + getGasPrice (cb) { + this.executionContext.web3().eth.getGasPrice(cb) + } + + signMessage (message, account, passphrase, cb) { + const messageHash = hashPersonalMessage(Buffer.from(message)) + try { + const personal = new Personal(this.executionContext.web3().currentProvider) + personal.sign(message, account, passphrase, (error, signedData) => { + cb(error, '0x' + messageHash.toString('hex'), signedData) + }) + } catch (e) { + cb(e.message) + } + } + + getProvider () { + return this.executionContext.getProvider() + } +} + +module.exports = NodeProvider diff --git a/src/blockchain/providers/vm.js b/src/blockchain/providers/vm.js new file mode 100644 index 0000000000..7b8379cc34 --- /dev/null +++ b/src/blockchain/providers/vm.js @@ -0,0 +1,71 @@ +const Web3 = require('web3') +const { BN, privateToAddress, stripHexPrefix, hashPersonalMessage } = require('ethereumjs-util') +const RemixSimulator = require('remix-simulator') + +class VMProvider { + + constructor (executionContext) { + this.executionContext = executionContext + this.RemixSimulatorProvider = new RemixSimulator.Provider({executionContext: this.executionContext}) + this.RemixSimulatorProvider.init() + this.web3 = new Web3(this.RemixSimulatorProvider) + this.accounts = {} + } + + getAccounts (cb) { + this.web3.eth.getAccounts((err, accounts) => { + if (err) { + return cb('No accounts?') + } + return cb(null, accounts) + }) + } + + resetEnvironment () { + this.RemixSimulatorProvider.Accounts.resetAccounts() + this.accounts = {} + } + + // TODO: is still here because of the plugin API + // can be removed later when we update the API + createVMAccount (newAccount) { + const { privateKey, balance } = newAccount + this.RemixSimulatorProvider.Accounts._addAccount(privateKey, balance) + const privKey = Buffer.from(privateKey, 'hex') + return '0x' + privateToAddress(privKey).toString('hex') + } + + newAccount (_passwordPromptCb, cb) { + this.RemixSimulatorProvider.Accounts.newAccount(cb) + } + + getBalanceInEther (address, cb) { + address = stripHexPrefix(address) + this.web3.eth.getBalance(address, (err, res) => { + if (err) { + return cb(err) + } + cb(null, Web3.utils.fromWei(new BN(res).toString(10), 'ether')) + }) + } + + getGasPrice (cb) { + this.web3.eth.getGasPrice(cb) + } + + signMessage (message, account, _passphrase, cb) { + const messageHash = hashPersonalMessage(Buffer.from(message)) + this.web3.eth.sign(message, account, (error, signedData) => { + if (error) { + return cb(error) + } + cb(null, '0x' + messageHash.toString('hex'), signedData) + }) + } + + getProvider () { + return 'vm' + } +} + +module.exports = VMProvider diff --git a/src/blockchain/txResultHelper.js b/src/blockchain/txResultHelper.js new file mode 100644 index 0000000000..f608324062 --- /dev/null +++ b/src/blockchain/txResultHelper.js @@ -0,0 +1,46 @@ +'use strict' +const { bufferToHex, isHexString } = require('ethereumjs-util') + +function convertToPrefixedHex (input) { + if (input === undefined || input === null || isHexString(input)) { + return input + } else if (Buffer.isBuffer(input)) { + return bufferToHex(input) + } + return '0x' + input.toString(16) +} + +/* + txResult.result can be 3 different things: + - VM call or tx: ethereumjs-vm result object + - Node transaction: object returned from eth.getTransactionReceipt() + - Node call: return value from function call (not an object) + + Also, VM results use BN and Buffers, Node results use hex strings/ints, + So we need to normalize the values to prefixed hex strings +*/ +function resultToRemixTx (txResult) { + const { result, transactionHash } = txResult + const { status, execResult, gasUsed, createdAddress, contractAddress } = result + let returnValue, errorMessage + + if (isHexString(result)) { + returnValue = result + } else if (execResult !== undefined) { + returnValue = execResult.returnValue + errorMessage = execResult.exceptionError + } + + return { + transactionHash, + status, + gasUsed: convertToPrefixedHex(gasUsed), + error: errorMessage, + return: convertToPrefixedHex(returnValue), + createdAddress: convertToPrefixedHex(createdAddress || contractAddress) + } +} + +module.exports = { + resultToRemixTx +} diff --git a/src/config.js b/src/config.js new file mode 100644 index 0000000000..9b478b922f --- /dev/null +++ b/src/config.js @@ -0,0 +1,66 @@ +'use strict' + +var CONFIG_FILE = '.remix.config' +const EventEmitter = require('events') + +function Config (storage) { + this.items = {} + this.unpersistedItems = {} + this.events = new EventEmitter() + + // load on instantiation + try { + var config = storage.get(CONFIG_FILE) + if (config) { + this.items = JSON.parse(config) + } + } catch (exception) { + } + + this.exists = function (key) { + return this.items[key] !== undefined + } + + this.get = function (key) { + this.ensureStorageUpdated(key) + return this.items[key] + } + + this.set = function (key, content) { + this.items[key] = content + try { + storage.set(CONFIG_FILE, JSON.stringify(this.items)) + this.events.emit(key + '_changed', content) + } catch (exception) { + } + } + + this.ensureStorageUpdated = function (key) { + if (key === 'currentFile') { + if (this.items[key] && this.items[key] !== '' && + this.items[key].indexOf('config/') !== 0 && + this.items[key].indexOf('browser/') !== 0 && + this.items[key].indexOf('localhost/') !== 0 && + this.items[key].indexOf('swarm/') !== 0 && + this.items[key].indexOf('gist/') !== 0 && + this.items[key].indexOf('github/') !== 0 && + this.items[key].indexOf('ipfs/') !== 0 && + this.items[key].indexOf('http/') !== 0 && + this.items[key].indexOf('https/') !== 0) { + this.items[key] = 'browser/' + this.items[key] + } + } + } + + this.getUnpersistedProperty = function (key) { + return this.unpersistedItems[key] + } + + // TODO: this only used for *one* property "doNotShowTransactionConfirmationAgain" + // and can be removed once it's refactored away in txRunner + this.setUnpersistedProperty = function (key, value) { + this.unpersistedItems[key] = value + } +} + +module.exports = Config diff --git a/src/framingService.js b/src/framingService.js new file mode 100644 index 0000000000..fa8a0d3237 --- /dev/null +++ b/src/framingService.js @@ -0,0 +1,37 @@ +export class FramingService { + + constructor (sidePanel, verticalIcon, mainView, resizeFeature) { + this.sidePanel = sidePanel + this.verticalIcon = verticalIcon + this.mainPanel = mainView.getAppPanel() + this.mainView = mainView + this.resizeFeature = resizeFeature + } + + start () { + this.sidePanel.events.on('toggle', () => { + this.resizeFeature.panel.clientWidth !== 0 ? this.resizeFeature.hidePanel() : this.resizeFeature.showPanel() + }) + this.sidePanel.events.on('showing', () => { + this.resizeFeature.panel.clientWidth === 0 ? this.resizeFeature.showPanel() : '' + }) + this.mainPanel.events.on('toggle', () => { + this.resizeFeature.showPanel() + }) + + this.verticalIcon.select('fileExplorers') + + document.addEventListener('keypress', (e) => { + if (e.shiftKey && e.ctrlKey) { + if (e.code === 'KeyF') { // Ctrl+Shift+F + this.verticalIcon.select('fileExplorers') + } else if (e.code === 'KeyA') { // Ctrl+Shift+A + this.verticalIcon.select('pluginManager') + } else if (e.code === 'KeyS') { // Ctrl+Shift+S + this.verticalIcon.select('settings') + } + e.preventDefault() + } + }) + } +} diff --git a/src/global/registry.js b/src/global/registry.js new file mode 100644 index 0000000000..80a033ab23 --- /dev/null +++ b/src/global/registry.js @@ -0,0 +1 @@ +module.exports = new (require('../registry.js'))() diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000000..a982d36e52 --- /dev/null +++ b/src/index.js @@ -0,0 +1,10 @@ +'use strict' + +require('@babel/polyfill') +var App = require('./app.js') + +var app = new App({}) + +document.body.appendChild(app.render()) + +app.init() // @TODO: refactor to remove diff --git a/src/lib/cmdInterpreterAPI.js b/src/lib/cmdInterpreterAPI.js new file mode 100644 index 0000000000..290e40d573 --- /dev/null +++ b/src/lib/cmdInterpreterAPI.js @@ -0,0 +1,293 @@ +'use strict' +var yo = require('yo-yo') +var async = require('async') +var remixLib = require('remix-lib') +var EventManager = require('../lib/events') + +var CompilerImport = require('../app/compiler/compiler-imports') +var toolTip = require('../app/ui/tooltip') +var globalRegistry = require('../global/registry') +var SourceHighlighter = require('../app/editor/sourceHighlighter') +var RemixDebug = require('remix-debug').EthDebugger +var TreeView = require('../app/ui/TreeView') // TODO setup a direct reference to the UI components +var solidityTypeFormatter = require('../app/tabs/debugger/debuggerUI/vmDebugger/utils/SolidityTypeFormatter') +var GistHandler = require('./gist-handler') + +class CmdInterpreterAPI { + constructor (terminal, localRegistry, blockchain) { + const self = this + self.event = new EventManager() + self.blockchain = blockchain + self._components = {} + self._components.registry = localRegistry || globalRegistry + self._components.terminal = terminal + self._components.sourceHighlighter = new SourceHighlighter() + self._components.fileImport = new CompilerImport() + self._components.gistHandler = new GistHandler() + self._deps = { + fileManager: self._components.registry.get('filemanager').api, + editor: self._components.registry.get('editor').api, + compilersArtefacts: self._components.registry.get('compilersartefacts').api, + offsetToLineColumnConverter: self._components.registry.get('offsettolinecolumnconverter').api + } + self.commandHelp = { + 'remix.call(message: {name, key, payload})': 'Call a registered plugins', + 'remix.getFile(path)': 'Returns the content of the file located at the given path', + 'remix.setFile(path, content)': 'set the content of the file located at the given path', + 'remix.debug(hash)': 'Start debugging a transaction.', + 'remix.loadgist(id)': 'Load a gist in the file explorer.', + 'remix.loadurl(url)': 'Load the given url in the file explorer. The url can be of type github, swarm, ipfs or raw http', + 'remix.setproviderurl(url)': 'Change the current provider to Web3 provider and set the url endpoint.', + 'remix.execute(filepath)': 'Run the script specified by file path. If filepath is empty, script currently displayed in the editor is executed.', + 'remix.exeCurrent()': 'Run the script currently displayed in the editor', + 'remix.help()': 'Display this help message', + 'remix.debugHelp()': 'Display help message for debugging' + } + } + call (message) { + return this._components.terminal.externalApi.request(message) + } + log () { arguments[0] != null ? this._components.terminal.commands.html(arguments[0]) : this._components.terminal.commands.html(arguments[1]) } + highlight (rawLocation) { + var self = this + if (!rawLocation) { + self._components.sourceHighlighter.currentSourceLocation(null) + return + } + var lineColumnPos = self._deps.offsetToLineColumnConverter.offsetToLineColumn(rawLocation, rawLocation.file, + self._deps.compilersArtefacts['__last'].getSourceCode().sources, + self._deps.compilersArtefacts['__last'].getAsts()) + self._components.sourceHighlighter.currentSourceLocation(lineColumnPos, rawLocation) + } + debug (hash, cb) { + var self = this + delete self.d + self.blockchain.web3().eth.getTransaction(hash, (error, tx) => { + if (error) return cb(error) + var debugSession = new RemixDebug({ + compilationResult: () => { + return self._deps.compilersArtefacts['__last'].getData() + } + }) + debugSession.addProvider('web3', self.blockchain.web3()) + debugSession.switchProvider('web3') + debugSession.debug(tx) + self.d = debugSession + this._components.terminal.commands.log('A new debugging session is available at remix.d') + if (cb) cb(null, debugSession) + // helpers + self.d.highlight = (address, vmtraceIndex) => { + if (!address) return self.highlight() + self.d.sourceLocationFromVMTraceIndex(address, vmtraceIndex, (error, rawLocation) => { + if (!error && rawLocation) { + self.highlight(rawLocation) + } + }) + } + self.d.stateAt = (vmTraceIndex) => { + self.d.extractStateAt(vmTraceIndex, (error, state) => { + if (error) return self.log(error) + self.d.decodeStateAt(vmTraceIndex, state, (error, state) => { + if (error) return this._components.terminal.commands.html(error) + var treeView = new TreeView({ + json: true, + formatSelf: solidityTypeFormatter.formatSelf, + extractData: solidityTypeFormatter.extractData + }) + self.log('State at ' + vmTraceIndex) + self._components.terminal.commands.html(treeView.render(state, true)) + }) + }) + } + self.d.localsAt = (contractAddress, vmTraceIndex) => { + debugSession.sourceLocationFromVMTraceIndex(contractAddress, vmTraceIndex, (error, location) => { + if (error) return self.log(error) + debugSession.decodeLocalsAt(23, location, (error, locals) => { + if (error) return this._components.terminal.commands.html(error) + var treeView = new TreeView({ + json: true, + formatSelf: solidityTypeFormatter.formatSelf, + extractData: solidityTypeFormatter.extractData + }) + self.log('Locals at ' + vmTraceIndex) + self._components.terminal.commands.html(treeView.render(locals, true)) + }) + }) + } + self.d.goTo = (row) => { + if (self._deps.editor.current()) { + var breakPoint = new remixLib.code.BreakpointManager(self.d, (sourceLocation) => { + return self._deps.offsetToLineColumnConverter.offsetToLineColumn(sourceLocation, sourceLocation.file, + self._deps.compilersArtefacts['__last'].getSourceCode().sources, + self._deps.compilersArtefacts['__last'].getAsts()) + }) + breakPoint.event.register('breakpointHit', (sourceLocation, currentStep) => { + self.log(null, 'step index ' + currentStep) + self.highlight(sourceLocation) + self.d.stateAt(currentStep) + self.d.traceManager.getCurrentCalledAddressAt(currentStep, (error, address) => { + if (error) return self.log(address) + self.d.localsAt(address, currentStep) + }) + }) + breakPoint.event.register('NoBreakpointHit', () => { self.log('line ' + row + ' is not part of the current execution') }) + breakPoint.add({fileName: self._deps.editor.current(), row: row - 1}) + breakPoint.jumpNextBreakpoint(0, true) + } + } + }) + } + loadgist (id, cb) { + const self = this + self._components.gistHandler.loadFromGist({gist: id}, this._deps.fileManager) + if (cb) cb() + } + loadurl (url, cb) { + const self = this + self._components.fileImport.import(url, + (loadingMsg) => { toolTip(loadingMsg) }, + (err, content, cleanUrl, type, url) => { + if (err) { + toolTip(`Unable to load ${url}: ${err}`) + if (cb) cb(err) + } else { + self._deps.fileManager.writeFile(type + '/' + cleanUrl, content) + try { + content = JSON.parse(content) + async.eachOfSeries(content.sources, (value, file, callbackSource) => { + var url = value.urls[0] // @TODO retrieve all other contents ? + self._components.fileImport.import(url, + (loadingMsg) => { toolTip(loadingMsg) }, + async (error, content, cleanUrl, type, url) => { + if (error) { + toolTip(`Cannot retrieve the content of ${url}: ${error}`) + return callbackSource(`Cannot retrieve the content of ${url}: ${error}`) + } else { + try { + await self._deps.fileManager.writeFile(type + '/' + cleanUrl, content) + callbackSource() + } catch (e) { + callbackSource(e.message) + } + } + }) + }, (error) => { + if (cb) cb(error) + }) + } catch (e) {} + if (cb) cb() + } + }) + } + setproviderurl (url, cb) { + this.blockchain.setProviderFromEndpoint(url, 'web3', (error) => { + if (error) toolTip(error) + if (cb) cb() + }) + } + exeCurrent (cb) { + return this.execute(undefined, cb) + } + getFile (path, cb) { + var provider = this._deps.fileManager.fileProviderOf(path) + if (provider) { + provider.get(path, cb) + } else { + cb('file not found') + } + } + setFile (path, content, cb) { + cb = cb || function () {} + var provider = this._deps.fileManager.fileProviderOf(path) + if (provider) { + provider.set(path, content, (error) => { + if (error) return cb(error) + this._deps.fileManager.syncEditor(path) + cb() + }) + } else { + cb('file not found') + } + } + execute (file, cb) { + const self = this + + function _execute (content, cb) { + if (!content) { + toolTip('no content to execute') + if (cb) cb() + return + } + + self._components.terminal.commands.script(content) + } + + if (typeof file === 'undefined') { + var content = self._deps.editor.currentContent() + _execute(content, cb) + return + } + + var provider = self._deps.fileManager.fileProviderOf(file) + + if (!provider) { + toolTip(`provider for path ${file} not found`) + if (cb) cb() + return + } + + provider.get(file, (error, content) => { + if (error) { + toolTip(error) + if (cb) cb() + return + } + + _execute(content, cb) + }) + } + help (cb) { + const self = this + var help = yo`
    ` + for (var k in self.commandHelp) { + help.appendChild(yo`
    ${k}: ${self.commandHelp[k]}
    `) + help.appendChild(yo`
    `) + } + self._components.terminal.commands.html(help) + if (cb) cb() + return '' + } + debugHelp (cb) { + const self = this + var help = yo`
    Here are some examples of scripts that can be run (using remix.exeCurrent() or directly from the console)
    ` + help.appendChild(yo`
    `) + help.appendChild(yo`
    `) + help.appendChild(yo`
    remix.debug('0x3c247ac268afb9a9c183feb9d4e83df51efbc8a2f4624c740789b788dac43029', function (error, debugSession) { + remix.log = function () { arguments[0] != null ? console.log(arguments[0]) : console.log(arguments[1]) } + + remix.d.traceManager.getLength(remix.log) + remix.storageView = remix.d.storageViewAt(97, '0x692a70d2e424a56d2c6c27aa97d1a86395877b3a') + console.log('storage at 97 :') + remix.storageView.storageRange(remix.log) +})
    `) + help.appendChild(yo`
    remix.log = function () { arguments[0] != null ? console.log(arguments[0]) : console.log(arguments[1]) } + remix.d.extractStateAt(2, function (error, state) { + remix.d.decodeStateAt(97, state, remix.log) + })
    `) + help.appendChild(yo`
    `) + help.appendChild(yo`
    remix.highlight(contractAddress, vmTraceIndex)
    `) + help.appendChild(yo`
    `) + help.appendChild(yo`
    remix.goTo(row) (this log the index in the vm trace, state and local variables)
    `) + help.appendChild(yo`
    `) + help.appendChild(yo`
    remix.stateAt(vmTraceIndex)
    `) + help.appendChild(yo`
    `) + help.appendChild(yo`
    remix.localsAt(vmTraceIndex)
    `) + help.appendChild(yo`
    `) + help.appendChild(yo`
    Please see https://www.npmjs.com/package/remix-debug for more informations
    `) + self._components.terminal.commands.html(help) + if (cb) cb() + return '' + } +} + +module.exports = CmdInterpreterAPI diff --git a/src/lib/commands.js b/src/lib/commands.js new file mode 100644 index 0000000000..fe579ee037 --- /dev/null +++ b/src/lib/commands.js @@ -0,0 +1,58 @@ +const allPrograms = [ + {'ethers': 'The ethers.js library is a compact and complete JavaScript library for Ethereum.'}, + {'remix': 'Ethereum IDE and tools for the web.'}, + {'web3': 'The web3.js library is a collection of modules which contain specific functionality for the ethereum ecosystem.'}, + {'swarmgw': 'This library can be used to upload/download files to Swarm via https://swarm-gateways.net/.'} +] + +const allCommands = [ + {'remix.debug(hash)': 'Start debugging a transaction.'}, + {'remix.debugHelp()': 'Display help message for debugging'}, + {'remix.execute(filepath)': 'Run the script specified by file path. If filepath is empty, script currently displayed in the editor is executed.'}, + {'remix.exeCurrent()': 'Run the script currently displayed in the editor.'}, + {'remix.getFile(path)': 'Returns the content of the file located at the given path'}, + {'remix.help()': 'Display this help message.'}, + {'remix.loadgist(id)': 'Load a gist in the file explorer.'}, + {'remix.loadurl(url)': 'Load the given url in the file explorer. The url can be of type github, swarm or ipfs.'}, + {'remix.setFile(path, content)': 'set the content of the file located at the given path'}, + {'remix.setproviderurl(url)': 'Change the current provider to Web3 provider and set the url endpoint.'}, + + {'swarmgw.get(url, cb)': 'Download files from Swarm via https://swarm-gateways.net/'}, + {'swarmgw.put(content, cb)': 'Upload files to Swarm via https://swarm-gateways.net/'}, + + {'ethers.Contract': 'This API provides a graceful connection to a contract deployed on the blockchain, simplifying calling and querying its functions and handling all the binary protocol and conversion as necessarily.'}, + {'ethers.HDNode': 'A Hierarchical Deterministic Wallet represents a large tree of private keys which can reliably be reproduced from an initial seed.'}, + {'ethers.Interface': 'The Interface Object is a meta-class that accepts a Solidity (or compatible) Application Binary Interface (ABI) and populates functions to deal with encoding and decoding the parameters to pass in and results returned.'}, + {'ethers.providers': 'A Provider abstracts a connection to the Ethereum blockchain, for issuing queries and sending state changing transactions.'}, + {'ethers.SigningKey': 'The SigningKey interface provides an abstraction around the secp256k1 elliptic curve cryptography library.'}, + {'ethers.utils': 'The utility functions exposed in both the ethers umbrella package and the ethers-utils.'}, + {'ethers.utils.AbiCoder': 'Create a new ABI Coder object'}, + {'ethers.utils.RLP': 'This encoding method is used internally for several aspects of Ethereum, such as encoding transactions and determining contract addresses.'}, + {'ethers.Wallet': 'A wallet manages a private/public key pair which is used to cryptographically sign transactions and prove ownership on the Ethereum network.'}, + {'ethers.version': 'Contains the version of the ethers container object.'}, + + {'web3.bzz': 'Bzz module for interacting with the swarm network.'}, + {'web3.eth': 'Eth module for interacting with the Ethereum network.'}, + {'web3.eth.accounts': 'The web3.eth.accounts contains functions to generate Ethereum accounts and sign transactions and data.'}, + {'web3.eth.abi': 'The web3.eth.abi functions let you de- and encode parameters to ABI (Application Binary Interface) for function calls to the EVM (Ethereum Virtual Machine).'}, + {'web3.eth.ens': 'The web3.eth.ens functions let you interacting with ENS.'}, + {'web3.eth.Iban': 'The web3.eth.Iban function lets convert Ethereum addresses from and to IBAN and BBAN.'}, + {'web3.eth.net': 'Net module for interacting with network properties.'}, + {'web3.eth.personal': 'Personal module for interacting with the Ethereum accounts.'}, + {'web3.eth.subscribe': 'The web3.eth.subscribe function lets you subscribe to specific events in the blockchain.'}, + {'web3.givenProvider': 'When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser. Will return the given provider by the (browser) environment, otherwise null.'}, + {'web3.modules': 'Contains the version of the web3 container object.'}, + {'web3.providers': 'Contains the current available providers.'}, + {'web3.shh': 'Shh module for interacting with the whisper protocol'}, + {'web3.utils': 'This package provides utility functions for Ethereum dapps and other web3.js packages.'}, + {'web3.version': 'Contains the version of the web3 container object.'}, + + {'web3.eth.clearSubscriptions();': 'Resets subscriptions.'}, + {'web3.eth.Contract(jsonInterface[, address][, options])': 'The web3.eth.Contract object makes it easy to interact with smart contracts on the ethereum blockchain.'}, + {'web3.eth.accounts.create([entropy]);': 'The web3.eth.accounts contains functions to generate Ethereum accounts and sign transactions and data.'} +] + +module.exports = { + allPrograms, + allCommands +} diff --git a/src/lib/events.js b/src/lib/events.js new file mode 100644 index 0000000000..882da1893a --- /dev/null +++ b/src/lib/events.js @@ -0,0 +1,4 @@ +var remixLib = require('remix-lib') +var EventManager = remixLib.EventManager + +module.exports = EventManager diff --git a/src/lib/gist-handler.js b/src/lib/gist-handler.js new file mode 100644 index 0000000000..43477b4309 --- /dev/null +++ b/src/lib/gist-handler.js @@ -0,0 +1,71 @@ +'use strict' +var modalDialogCustom = require('../app/ui/modal-dialog-custom') +var request = require('request') + +// Allowing window to be overriden for testing +function GistHandler (_window) { + if (_window !== undefined) { + modalDialogCustom = _window + } + + this.handleLoad = function (params, cb) { + if (!cb) cb = () => {} + var loadingFromGist = false + var gistId + if (params['gist'] === '') { + loadingFromGist = true + modalDialogCustom.prompt('Load a Gist', 'Enter the ID of the Gist or URL you would like to load.', null, (target) => { + if (target !== '') { + gistId = getGistId(target) + if (gistId) { + cb(gistId) + } else { + modalDialogCustom.alert('Error while loading gist. Please provide a valid Gist ID or URL.') + } + } + }) + return loadingFromGist + } else { + gistId = params['gist'] + loadingFromGist = !!gistId + } + if (loadingFromGist) { + cb(gistId) + } + return loadingFromGist + } + + function getGistId (str) { + var idr = /[0-9A-Fa-f]{8,}/ + var match = idr.exec(str) + return match ? match[0] : null + } + + this.loadFromGist = (params, fileManager) => { + const gistProvider = fileManager.fileProviderOf('browser') + const self = this + return self.handleLoad(params, function (gistId) { + request.get({ + url: `https://api.github.com/gists/${gistId}`, + json: true + }, (error, response, data = {}) => { + if (error || !data.files) { + modalDialogCustom.alert(`Gist load error: ${error || data.message}`) + return + } + let obj = {} + Object.keys(data.files).forEach((element) => { + obj['/gists/' + gistId + '/' + element] = data.files[element] + }) + fileManager.setBatchFiles(obj, 'browser', true, (errorLoadingFile) => { + if (!errorLoadingFile) { + gistProvider.id = gistId + gistProvider.origGistFiles = data.files + } + }) + }) + }) + } +} + +module.exports = GistHandler diff --git a/src/lib/helper.js b/src/lib/helper.js new file mode 100644 index 0000000000..cda3bfe519 --- /dev/null +++ b/src/lib/helper.js @@ -0,0 +1,87 @@ +var async = require('async') + +module.exports = { + shortenAddress: function (address, etherBalance) { + var len = address.length + return address.slice(0, 5) + '...' + address.slice(len - 5, len) + (etherBalance ? ' (' + etherBalance.toString() + ' ether)' : '') + }, + shortenHexData: function (data) { + if (!data) return '' + if (data.length < 5) return data + var len = data.length + return data.slice(0, 5) + '...' + data.slice(len - 5, len) + }, + createNonClashingNameWithPrefix (name, fileProvider, prefix, cb) { + if (!name) name = 'Undefined' + var counter = '' + var ext = 'sol' + var reg = /(.*)\.([^.]+)/g + var split = reg.exec(name) + if (split) { + name = split[1] + ext = split[2] + } + var exist = true + async.whilst( + () => { return exist }, + (callback) => { + fileProvider.exists(name + counter + prefix + '.' + ext, (error, currentExist) => { + if (error) { + callback(error) + } else { + exist = currentExist + if (exist) counter = (counter | 0) + 1 + callback() + } + }) + }, + (error) => { cb(error, name + counter + prefix + '.' + ext) } + ) + }, + createNonClashingName (name, fileProvider, cb) { + this.createNonClashingNameWithPrefix(name, fileProvider, '', cb) + }, + checkSpecialChars (name) { + return name.match(/[:*?"<>\\'|]/) != null + }, + isHexadecimal (value) { + return /^[0-9a-fA-F]+$/.test(value) && (value.length % 2 === 0) + }, + is0XPrefixed (value) { + return value.substr(0, 2) === '0x' + }, + isNumeric (value) { + return /^\+?(0|[1-9]\d*)$/.test(value) + }, + find: find +} + +function findDeep (object, fn, found = { break: false, value: undefined }) { + if (typeof object !== 'object' || object === null) return + for (var i in object) { + if (found.break) break + var el = object[i] + if (el && el.innerText !== undefined && el.innerText !== null) el = el.innerText + if (fn(el, i, object)) { + found.value = el + found.break = true + break + } else { + findDeep(el, fn, found) + } + } + return found.value +} + +function find (args, query) { + query = query.trim() + var isMatch = !!findDeep(args, function check (value, key) { + if (value === undefined || value === null) return false + if (typeof value === 'function') return false + if (typeof value === 'object') return false + var contains = String(value).indexOf(query.trim()) !== -1 + return contains + }) + return isMatch +} + diff --git a/src/lib/offsetToLineColumnConverter.js b/src/lib/offsetToLineColumnConverter.js new file mode 100644 index 0000000000..46e192b120 --- /dev/null +++ b/src/lib/offsetToLineColumnConverter.js @@ -0,0 +1,42 @@ +'use strict' +var SourceMappingDecoder = require('remix-lib').SourceMappingDecoder +import { Plugin } from '@remixproject/engine' +import * as packageJson from '../../package.json' + +const profile = { + name: 'offsetToLineColumnConverter', + methods: [], + events: [], + version: packageJson.version +} + +export class OffsetToLineColumnConverter extends Plugin { + constructor () { + super(profile) + this.lineBreakPositionsByContent = {} + this.sourceMappingDecoder = new SourceMappingDecoder() + } + + offsetToLineColumn (rawLocation, file, sources, asts) { + if (!this.lineBreakPositionsByContent[file]) { + for (var filename in asts) { + var source = asts[filename] + if (source.id === file) { + this.lineBreakPositionsByContent[file] = this.sourceMappingDecoder.getLinebreakPositions(sources[filename].content) + break + } + } + } + return this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) + } + + clear () { + this.lineBreakPositionsByContent = {} + } + + activate () { + this.on('solidity', 'compilationFinished', () => { + this.clear() + }) + } +} diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js new file mode 100644 index 0000000000..5d4210d1ee --- /dev/null +++ b/src/lib/panels-resize.js @@ -0,0 +1,89 @@ +const yo = require('yo-yo') +const csjs = require('csjs-inject') + +const css = csjs` + .dragbar { + width : 2px; + height : 100%; + cursor : col-resize; + z-index : 999; + } + .ghostbar { + width : 3px; + background-color : var(--primary); + opacity : 0.5; + position : absolute; + cursor : col-resize; + z-index : 9999; + top : 0; + bottom : 0; + } +` + +export default class PanelsResize { + constructor (panel) { + this.panel = panel + const string = panel.style.minWidth + this.minWidth = string.length > 2 ? parseInt(string.substring(0, string.length - 2)) : 0 + } + + render () { + this.ghostbar = yo`
    ` + + const mousedown = (event) => { + event.preventDefault() + if (event.which === 1) { + moveGhostbar(event) + document.body.appendChild(this.ghostbar) + document.addEventListener('mousemove', moveGhostbar) + document.addEventListener('mouseup', removeGhostbar) + document.addEventListener('keydown', cancelGhostbar) + } + } + + const cancelGhostbar = (event) => { + if (event.keyCode === 27) { + document.body.removeChild(this.ghostbar) + document.removeEventListener('mousemove', moveGhostbar) + document.removeEventListener('mouseup', removeGhostbar) + document.removeEventListener('keydown', cancelGhostbar) + } + } + + const moveGhostbar = (event) => { + this.ghostbar.style.left = event.x + 'px' + } + + const removeGhostbar = (event) => { + document.body.removeChild(this.ghostbar) + document.removeEventListener('mousemove', moveGhostbar) + document.removeEventListener('mouseup', removeGhostbar) + document.removeEventListener('keydown', cancelGhostbar) + this.setPosition(event) + } + + return yo`
    ` + } + + calculatePanelWidth (event) { + return event.x - this.panel.offsetLeft + } + + setPosition (event) { + const panelWidth = this.calculatePanelWidth(event) + // close the panel if the width is less than a minWidth + if (panelWidth > this.minWidth - 10 || this.panel.style.display === 'none') { + this.panel.style.width = panelWidth + 'px' + this.showPanel() + } else this.hidePanel() + } + + hidePanel () { + this.panel.style.display = 'none' + } + + showPanel () { + this.panel.style.display = 'flex' + } +} + diff --git a/src/lib/publishOnIpfs.js b/src/lib/publishOnIpfs.js new file mode 100644 index 0000000000..52a55a02e7 --- /dev/null +++ b/src/lib/publishOnIpfs.js @@ -0,0 +1,121 @@ +'use strict' + +const async = require('async') +const IpfsClient = require('ipfs-mini') + +const ipfsNodes = [ + new IpfsClient({ host: 'ipfs.komputing.org', port: 443, protocol: 'https' }), + new IpfsClient({ host: 'ipfs.infura.io', port: 5001, protocol: 'https' }), + new IpfsClient({ host: '127.0.0.1', port: 5001, protocol: 'http' }) +] + +module.exports = (contract, fileManager, cb, ipfsVerifiedPublishCallBack) => { + // gather list of files to publish + var sources = [] + + var metadata + + try { + metadata = JSON.parse(contract.metadata) + } catch (e) { + return cb(e) + } + + if (metadata === undefined) { + return cb('No metadata') + } + + async.eachSeries(Object.keys(metadata.sources), function (fileName, cb) { + // find hash + let hash = null + try { + // we try extract the hash defined in the metadata.json + // in order to check if the hash that we get after publishing is the same as the one located in metadata.json + // if it's not the same, we throw "hash mismatch between solidity bytecode and uploaded content" + // if we don't find the hash in the metadata.json, the check is not done. + // + // TODO: refactor this with publishOnSwarm + if (metadata.sources[fileName].urls) { + metadata.sources[fileName].urls.forEach(url => { + if (url.includes('ipfs')) hash = url.match('dweb:/ipfs/(.+)')[1] + }) + } + } catch (e) { + return cb('Error while extracting the hash from metadata.json') + } + + fileManager.fileProviderOf(fileName).get(fileName, (error, content) => { + if (error) { + console.log(error) + } else { + sources.push({ + content: content, + hash: hash, + filename: fileName + }) + } + cb() + }) + }, function (error) { + if (error) { + cb(error) + } else { + // publish the list of sources in order, fail if any failed + var uploaded = [] + async.eachSeries(sources, function (item, cb) { + ipfsVerifiedPublish(item.content, item.hash, (error, result) => { + try { + item.hash = result.url.match('dweb:/ipfs/(.+)')[1] + } catch (e) { + item.hash = ' - ' + item.fileName + } + if (!error && ipfsVerifiedPublishCallBack) ipfsVerifiedPublishCallBack(item) + item.output = result + uploaded.push(item) + cb(error) + }) + }, () => { + const metadataContent = JSON.stringify(metadata) + ipfsVerifiedPublish(metadataContent, '', (error, result) => { + try { + contract.metadataHash = result.url.match('dweb:/ipfs/(.+)')[1] + } catch (e) { + contract.metadataHash = ' - metadata.json' + } + if (!error && ipfsVerifiedPublishCallBack) { + ipfsVerifiedPublishCallBack({ + content: metadataContent, + hash: contract.metadataHash + }) + } + uploaded.push({ + content: contract.metadata, + hash: contract.metadataHash, + filename: 'metadata.json', + output: result + }) + cb(error, uploaded) + }) + }) + } + }) +} + +async function ipfsVerifiedPublish (content, expectedHash, cb) { + try { + const results = await severalGatewaysPush(content) + if (expectedHash && results !== expectedHash) { + cb(null, { message: 'hash mismatch between solidity bytecode and uploaded content.', url: 'dweb:/ipfs/' + results, hash: results }) + } else { + cb(null, { message: 'ok', url: 'dweb:/ipfs/' + results, hash: results }) + } + } catch (error) { + cb(error) + } +} + +function severalGatewaysPush (content) { + const invert = p => new Promise((resolve, reject) => p.then(reject).catch(resolve)) // Invert res and rej + const promises = ipfsNodes.map((node) => invert(node.add(content))) + return invert(Promise.all(promises)) +} diff --git a/src/lib/publishOnSwarm.js b/src/lib/publishOnSwarm.js new file mode 100644 index 0000000000..10fd618cf6 --- /dev/null +++ b/src/lib/publishOnSwarm.js @@ -0,0 +1,109 @@ +'use strict' + +var async = require('async') +var swarmgw = require('swarmgw')() + +module.exports = (contract, fileManager, cb, swarmVerifiedPublishCallBack) => { + // gather list of files to publish + var sources = [] + + var metadata + try { + metadata = JSON.parse(contract.metadata) + } catch (e) { + return cb(e) + } + + if (metadata === undefined) { + return cb('No metadata') + } + + async.eachSeries(Object.keys(metadata.sources), function (fileName, cb) { + // find hash + let hash = null + try { + // we try extract the hash defined in the metadata.json + // in order to check if the hash that we get after publishing is the same as the one located in metadata.json + // if it's not the same, we throw "hash mismatch between solidity bytecode and uploaded content" + // if we don't find the hash in the metadata.json, the check is not done. + // + // TODO: refactor this with publishOnIpfs + if (metadata.sources[fileName].urls) { + metadata.sources[fileName].urls.forEach(url => { + if (url.includes('bzz')) hash = url.match('(bzzr|bzz-raw)://(.+)')[1] + }) + } + } catch (e) { + return cb('Error while extracting the hash from metadata.json') + } + + fileManager.fileProviderOf(fileName).get(fileName, (error, content) => { + if (error) { + console.log(error) + } else { + sources.push({ + content: content, + hash: hash, + filename: fileName + }) + } + cb() + }) + }, function (error) { + if (error) { + cb(error) + } else { + // publish the list of sources in order, fail if any failed + var uploaded = [] + async.eachSeries(sources, function (item, cb) { + swarmVerifiedPublish(item.content, item.hash, (error, result) => { + try { + item.hash = result.url.match('bzz-raw://(.+)')[1] + } catch (e) { + item.hash = ' - ' + item.fileName + } + if (!error && swarmVerifiedPublishCallBack) swarmVerifiedPublishCallBack(item) + item.output = result + uploaded.push(item) + // TODO this is a fix cause Solidity metadata does not contain the right swarm hash (poc 0.3) + metadata.sources[item.filename].urls[0] = result.url + cb(error) + }) + }, () => { + const metadataContent = JSON.stringify(metadata) + swarmVerifiedPublish(metadataContent, '', (error, result) => { + try { + contract.metadataHash = result.url.match('bzz-raw://(.+)')[1] + } catch (e) { + contract.metadataHash = ' - metadata.json' + } + if (!error && swarmVerifiedPublishCallBack) { + swarmVerifiedPublishCallBack({ + content: metadataContent, + hash: contract.metadataHash + }) + } + uploaded.push({ + content: contract.metadata, + hash: contract.metadataHash, + filename: 'metadata.json', + output: result + }) + cb(error, uploaded) + }) + }) + } + }) +} + +function swarmVerifiedPublish (content, expectedHash, cb) { + swarmgw.put(content, function (err, ret) { + if (err) { + cb(err) + } else if (expectedHash && ret !== expectedHash) { + cb(null, { message: 'hash mismatch between solidity bytecode and uploaded content.', url: 'bzz-raw://' + ret, hash: ret }) + } else { + cb(null, { message: 'ok', url: 'bzz-raw://' + ret, hash: ret }) + } + }) +} diff --git a/src/lib/query-params.js b/src/lib/query-params.js new file mode 100644 index 0000000000..739971fac2 --- /dev/null +++ b/src/lib/query-params.js @@ -0,0 +1,42 @@ +'use strict' + +// Allowing window to be overriden for testing +function QueryParams (_window) { + if (_window === undefined) _window = window + + this.get = function () { + var qs = _window.location.hash.substr(1) + + if (_window.location.search.length > 0) { + // use legacy query params instead of hash + _window.location.hash = _window.location.search.substr(1) + _window.location.search = '' + } + + var params = {} + var parts = qs.split('&') + for (var x in parts) { + var keyValue = parts[x].split('=') + if (keyValue[0] !== '') { + params[keyValue[0]] = keyValue[1] + } + } + return params + } + + this.update = function (params) { + var currentParams = this.get() + var keys = Object.keys(params) + for (var x in keys) { + currentParams[keys[x]] = params[keys[x]] + } + var queryString = '#' + var updatedKeys = Object.keys(currentParams) + for (var y in updatedKeys) { + queryString += updatedKeys[y] + '=' + currentParams[updatedKeys[y]] + '&' + } + _window.location.hash = queryString.slice(0, -1) + } +} + +module.exports = QueryParams diff --git a/src/lib/remixd.js b/src/lib/remixd.js new file mode 100644 index 0000000000..db789fc994 --- /dev/null +++ b/src/lib/remixd.js @@ -0,0 +1,145 @@ +'use strict' +var EventManager = require('../lib/events') +var modalDialog = require('../app/ui/modaldialog') +var yo = require('yo-yo') + +class Remixd { + constructor (port) { + this.event = new EventManager() + this.port = port + this.callbacks = {} + this.callid = 0 + this.socket = null + this.connected = false + this.receiveResponse() + } + + online () { + return this.socket !== null + } + + close () { + if (this.socket) { + this.socket.close() + this.socket = null + } + } + + start (cb) { + if (this.socket) { + try { + this.socket.close() + } catch (e) {} + } + this.event.trigger('connecting', []) + this.socket = new WebSocket('ws://localhost:' + this.port, 'echo-protocol') // eslint-disable-line + + this.socket.addEventListener('open', (event) => { + this.connected = true + this.event.trigger('connected', [event]) + cb() + }) + + this.socket.addEventListener('message', (event) => { + var data = JSON.parse(event.data) + if (data.type === 'reply') { + if (this.callbacks[data.id]) { + this.callbacks[data.id](data.error, data.result) + delete this.callbacks[data.id] + } + this.event.trigger('replied', [data]) + } else if (data.type === 'notification') { + this.event.trigger('notified', [data]) + } else if (data.type === 'system') { + if (data.error) { + this.event.trigger('system', [{ + error: data.error + }]) + } + } + }) + + this.socket.addEventListener('error', (event) => { + this.errored(event) + cb(event) + }) + + this.socket.addEventListener('close', (event) => { + if (event.wasClean) { + this.connected = false + this.event.trigger('closed', [event]) + } else { + this.errored(event) + } + this.socket = null + }) + } + + async receiveResponse (requestId) { + return new Promise((resolve, reject) => { + this.event.register('replied', (data) => { + if (data.id === requestId) { + if (data.error) reject(data.error) + else resolve(data.result) + } + }) + }) + } + + errored (event) { + function remixdDialog () { + return yo`
    Connection to Remixd closed. Localhost connection not available anymore.
    ` + } + if (this.connected) { + modalDialog('Lost connection to Remixd!', remixdDialog(), {}, {label: ''}) + } + this.connected = false + this.socket = null + this.event.trigger('errored', [event]) + } + + call (service, fn, args, callback) { + return new Promise((resolve, reject) => { + this.ensureSocket((error) => { + if (error) { + callback && typeof callback === 'function' && callback(error) + reject(error) + return + } + if (this.socket && this.socket.readyState === this.socket.OPEN) { + var data = this.format(service, fn, args) + this.callbacks[data.id] = callback + this.socket.send(JSON.stringify(data)) + resolve(data.id) + } else { + callback && typeof callback === 'function' && callback('Socket not ready. state:' + this.socket.readyState) + reject('Socket not ready. state:' + this.socket.readyState) + } + }) + }) + } + + ensureSocket (cb) { + if (this.socket) return cb(null, this.socket) + this.start((error) => { + if (error) { + cb(error) + } else { + cb(null, this.socket) + } + }) + } + + format (service, fn, args) { + var data = { + id: this.callid, + service: service, + fn: fn, + args: args + } + this.callid++ + return data + } +} + +module.exports = Remixd diff --git a/src/lib/transactionReceiptResolver.js b/src/lib/transactionReceiptResolver.js new file mode 100644 index 0000000000..06d1e08cdd --- /dev/null +++ b/src/lib/transactionReceiptResolver.js @@ -0,0 +1,23 @@ +'use strict' + +module.exports = class TransactionReceiptResolver { + constructor (blockchain) { + this._transactionReceipts = {} + this.blockchain = blockchain + } + + resolve (tx, cb) { + if (this._transactionReceipts[tx.hash]) { + return cb(null, this._transactionReceipts[tx.hash]) + } + this.blockchain.web3().eth.getTransactionReceipt(tx.hash, (error, receipt) => { + if (!error) { + this._transactionReceipts[tx.hash] = receipt + cb(null, receipt) + } else { + cb(error) + } + }) + } +} + diff --git a/src/loadFilesFromParent.js b/src/loadFilesFromParent.js new file mode 100644 index 0000000000..73d9006a1e --- /dev/null +++ b/src/loadFilesFromParent.js @@ -0,0 +1,22 @@ +module.exports = (fileManager) => { + // The event listener needs to be registered as early as possible, because the + // parent will send the message upon the "load" event. + let filesToLoad = null + let loadFilesCallback = function (files) { filesToLoad = files } // will be replaced later + + window.addEventListener('message', function (ev) { + if (typeof ev.data === typeof [] && ev.data[0] === 'loadFiles') { + loadFilesCallback(ev.data[1]) + } + }, false) + + // Replace early callback with instant response + loadFilesCallback = function (files) { + fileManager.setBatchFiles(files) + } + + // Run if we did receive an event from remote instance while starting up + if (filesToLoad !== null) { + fileManager.setBatchFiles(filesToLoad) + } +} diff --git a/src/migrateFileSystem.js b/src/migrateFileSystem.js new file mode 100644 index 0000000000..4e3cee7dcc --- /dev/null +++ b/src/migrateFileSystem.js @@ -0,0 +1,22 @@ + +import { Storage } from 'remix-lib' + +/* + Migrating the files to the BrowserFS storage instead or raw localstorage +*/ +export default (fileProvider) => { + const fileStorage = new Storage('sol:') + const flag = 'status' + const fileStorageBrowserFS = new Storage('remix_browserFS_migration:') + if (fileStorageBrowserFS.get(flag) === 'done') return + fileStorage.keys().forEach((path) => { + if (path !== '.remix.config') { + const content = fileStorage.get(path) + fileProvider.set(path, content) + // TODO https://github.com/ethereum/remix-ide/issues/2377 + // fileStorage.remove(path) we don't want to remove it as we are still supporting the old version + console.log('file migrated', path) + } + }) + fileStorageBrowserFS.set(flag, 'done') +} diff --git a/src/publishToStorage.js b/src/publishToStorage.js new file mode 100644 index 0000000000..f3c1ed5b6f --- /dev/null +++ b/src/publishToStorage.js @@ -0,0 +1,47 @@ +const yo = require('yo-yo') +const publishOnSwarm = require('./lib/publishOnSwarm') +const publishOnIpfs = require('./lib/publishOnIpfs') +const modalDialogCustom = require('./app/ui/modal-dialog-custom') + +export default function publish (storage, fileProvider, fileManager, contract) { + if (contract) { + if (contract.metadata === undefined || contract.metadata.length === 0) { + modalDialogCustom.alert('This contract may be abstract, may not implement an abstract parent\'s methods completely or not invoke an inherited contract\'s constructor correctly.') + } else { + if (storage === 'swarm') { + publishOnSwarm(contract, fileManager, function (err, uploaded) { + if (err) { + try { + err = JSON.stringify(err) + } catch (e) {} + console.log(`Failed to publish metadata file to swarm, please check the Swarm gateways is available ( swarm-gateways.net ) ${err}`) + } else { + var result = yo`
    ${uploaded.map((value) => { + return yo`
    ${value.filename} :
    ${value.output.url}
    ` + })}
    ` + modalDialogCustom.alert(`Published ${contract.name}'s Metadata`, yo`Metadata of "${contract.name.toLowerCase()}" was published successfully.
    ${result}
    `) + } + }, (item) => { // triggered each time there's a new verified publish (means hash correspond) + fileProvider.addExternal('swarm/' + item.hash, item.content) + }) + } else { + publishOnIpfs(contract, fileManager, function (err, uploaded) { + if (err) { + try { + err = JSON.stringify(err) + } catch (e) {} + modalDialogCustom.alert(yo`Failed to publish metadata file to ${storage}, please check the ${storage} gateways is available.
    + ${err}
    `) + } else { + var result = yo`
    ${uploaded.map((value) => { + return yo`
    ${value.filename} :
    ${value.output.url}
    ` + })}
    ` + modalDialogCustom.alert(`Published ${contract.name}'s Metadata`, yo`Metadata of "${contract.name.toLowerCase()}" was published successfully.
    ${result}
    `) + } + }, (item) => { // triggered each time there's a new verified publish (means hash correspond) + fileProvider.addExternal('ipfs/' + item.hash, item.content) + }) + } + } + } +} diff --git a/src/registry.js b/src/registry.js new file mode 100644 index 0000000000..951d076165 --- /dev/null +++ b/src/registry.js @@ -0,0 +1,24 @@ +// const moduleID = require('./module-id.js') + +module.exports = class registry { + constructor () { + this.state = {} + } + put ({ api, name }) { + // const serveruid = moduleID() + '.' + (name || '') + if (this.state[name]) return this.state[name] + const server = { + // uid: serveruid, + api + } + this.state[name] = { server } + return server + } + get (name) { + // const clientuid = moduleID() + const state = this.state[name] + if (!state) return + const server = state.server + return server + } +} diff --git a/src/remixAppManager.js b/src/remixAppManager.js new file mode 100644 index 0000000000..9d008ff582 --- /dev/null +++ b/src/remixAppManager.js @@ -0,0 +1,143 @@ +/* global localStorage, fetch */ +import { PluginManager, IframePlugin } from '@remixproject/engine' +import { EventEmitter } from 'events' +import QueryParams from './lib/query-params' +import { PermissionHandler } from './app/ui/persmission-handler' + +const requiredModules = [ // services + layout views + system views + 'manager', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme', 'fileManager', 'contentImport', 'web3Provider', 'scriptRunner', 'fetchAndCompile', + 'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', 'fileExplorers', + 'terminal', 'settings', 'pluginManager'] + +export function isNative (name) { + const nativePlugins = ['vyper', 'workshops'] + return nativePlugins.includes(name) || requiredModules.includes(name) +} + +export function canActivate (name) { + return ['manager', 'debugger'].includes(name) +} + +export class RemixAppManager extends PluginManager { + + constructor (plugins) { + super() + this.event = new EventEmitter() + this.pluginsDirectory = 'https://raw.githubusercontent.com/ethereum/remix-plugins-directory/master/build/metadata.json' + this.pluginLoader = new PluginLoader() + this.permissionHandler = new PermissionHandler() + } + + async canActivate (from, to) { + return canActivate(from.name) + } + + async canDeactivate (from, to) { + return from.name === 'manager' + } + + async canCall (from, to, method, message) { + // Make sure the caller of this methods is the target plugin + if (to !== this.currentRequest.from) { + return false + } + // skipping native plugins' requests + if (isNative(from)) { + return true + } + // ask the user for permission + return await this.permissionHandler.askPermission(this.profiles[from], this.profiles[to], method, message) + } + + onPluginActivated (plugin) { + this.pluginLoader.set(plugin, this.actives) + this.event.emit('activate', plugin) + } + + getAll () { + return Object.keys(this.profiles).map((p) => { + return this.profiles[p] + }) + } + + getIds () { + return Object.keys(this.profiles) + } + + onPluginDeactivated (plugin) { + this.pluginLoader.set(plugin, this.actives) + this.event.emit('deactivate', plugin) + } + + onRegistration (plugin) { + this.event.emit('added', plugin.name) + } + + async ensureActivated (apiName) { + await this.activatePlugin(apiName) + this.event.emit('ensureActivated', apiName) + } + + async ensureDeactivated (apiName) { + await this.deactivatePlugin(apiName) + this.event.emit('ensureDeactivated', apiName) + } + + deactivatePlugin (name) { + if (requiredModules.includes(name)) return + super.deactivatePlugin(name) + } + + isRequired (name) { + return requiredModules.includes(name) + } + + async registeredPlugins () { + const res = await fetch(this.pluginsDirectory) + const plugins = await res.json() + return plugins.map(plugin => new IframePlugin(plugin)) + } +} + +/** @class Reference loaders. + * A loader is a get,set based object which load a workspace from a defined sources. + * (localStorage, queryParams) + **/ +class PluginLoader { + get currentLoader () { + return this.loaders[this.current] + } + + constructor () { + const queryParams = new QueryParams() + this.donotAutoReload = ['remixd'] // that would be a bad practice to force loading some plugins at page load. + this.loaders = {} + this.loaders['localStorage'] = { + set: (plugin, actives) => { + if (!this.donotAutoReload.includes(plugin.name)) { + localStorage.setItem('workspace', JSON.stringify(actives)) + } + }, + get: () => { return JSON.parse(localStorage.getItem('workspace')) } + } + + this.loaders['queryParams'] = { + set: () => {}, + get: () => { + const { plugins } = queryParams.get() + if (!plugins) return [] + return plugins.split(',') + } + } + + this.current = queryParams.get()['plugins'] ? 'queryParams' : 'localStorage' + } + + set (plugin, actives) { + this.currentLoader.set(plugin, actives) + } + + get () { + return this.currentLoader.get() + } +} diff --git a/src/universal-dapp-styles.js b/src/universal-dapp-styles.js new file mode 100644 index 0000000000..8df1aa220e --- /dev/null +++ b/src/universal-dapp-styles.js @@ -0,0 +1,283 @@ +var csjs = require('csjs-inject') + +var css = csjs` + .instanceTitleContainer { + display: flex; + align-items: center; + } + .calldataInput{ + height: 32px; + } + .title { + display: flex; + justify-content: space-between; + font-size: 11px; + width: 100%; + overflow: hidden; + word-break: break-word; + line-height: initial; + overflow: visible; + padding: 0 0 8px; + margin: 0; + background: none; + border: none; + } + .title button { + background: none; + border: none; + } + .titleLine { + display: flex; + align-items: baseline; + } + .titleText { + word-break: break-word; + width: 100%; + border: none; + } + .spanTitleText { + line-height: 12px; + padding: 0; + font-size: 11px; + width:100%; + border: none; + background: none; + text-transform: uppercase; + } + .inputGroupText { + width: 100%; + } + .title .copy { + color: var(--primary); + } + .titleExpander { + padding: 5px 7px; + } + .nameNbuts { + display: contents; + flex-wrap: nowrap; + width: 100%; + } + .instance { + display: block; + flex-direction: column; + margin-bottom: 12px; + background: none; + border-radius: 2px; + } + .instance.hidesub { + border-bottom: 1px solid; + } + .instance.hidesub .title { + display: flex; + } + .instance.hidesub .udappClose { + display: flex; + } + .instance.hidesub > * { + display: none; + } + .methCaret { + min-width: 12px; + width: 12px; + margin-left: 4px; + cursor: pointer; + font-size: 16px; + line-height: 0.6; + vertical-align: middle; + padding: 0; + } + .cActionsWrapper { + border-top-left-radius: 0; + border-bottom-left-radius: 0.25rem; + border-top-rightt-radius: 0; + border-bottom-right-radius: 0.25rem; + padding: 8px 10px 7px; + } + .group:after { + content: ""; + display: table; + clear: both; + } + .buttonsContainer { + margin-top: 2%; + display: flex; + overflow: hidden; + } + .instanceButton { + height: 32px; + border-radius: 3px; + white-space: nowrap; + font-size: 11px; + overflow: hidden; + text-overflow: ellipsis; + } + .closeIcon { + font-size: 12px; + cursor: pointer; + margin-left: 5px; + } + .udappClose { + display: flex; + justify-content: flex-end; + } + .contractProperty { + width:100%; + } + .contractProperty.hasArgs input { + padding: .36em; + border-radius: 5px; + } + .contractProperty .contractActionsContainerSingle input{ + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .contractProperty button { + min-width: 100px; + width: 100px; + margin:0; + word-break: inherit; + } + .contractProperty button:disabled { + cursor: not-allowed; + background-color: white; + border-color: lightgray; + } + .contractProperty.constant button { + min-width: 100px; + width: 100px; + margin:0; + word-break: inherit; + outline: none; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .contractProperty > .value { + box-sizing: border-box; + float: left; + align-self: center; + margin-left: 4px; + } + .contractActionsContainer { + width: 100%; + margin-bottom: 8px; + } + .contractActionsContainerSingle { + display: flex; + width: 100%; + } + .contractActionsContainerSingle i { + line-height: 2; + } + .contractActionsContainerMulti { + display:none; + width: 100%; + } + .contractActionsContainerMultiInner { + width: 100%; + padding: 16px 8px 16px 14px; + border-radius: 3px; + margin-bottom: 8px; + } + .multiHeader { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; + text-align: left; + font-size: 10px; + font-weight: bold; + } + .contractActionsContainerMultiInner .multiTitle { + padding-left: 10px; + } + .contractProperty .multiTitle { + padding: 0; + line-height: 16px; + display: inline-block; + font-size: 12px; + font-weight: bold; + cursor: default; + } + .contractProperty .contractActionsContainerMultiInner .multiArg label{ + text-align: right; + } + .multiHeader .methCaret { + float: right; + margin-right: 0; + } + .contractProperty.constant .multiTitle { + display: inline-block; + width: 90%; + /* font-size: 10px; */ + height: 25px; + padding-left: 20px; + font-weight: bold; + line-height: 25px; + cursor: default; + } + .multiArg { + display: flex; + align-items: center; + justify-content: flex-end; + margin-top: 4px; + } + .multiArg input{ + padding: 5px; + } + .multiArg label { + width: auto; + padding: 0; + margin: 0 4px 0 0; + font-size: 10px; + line-height: 12px; + text-align: right; + word-break: initial; + } + .multiArg button { + max-width: 100px; + border-radius: 3px; + border-width: 1px; + width: inherit; + } + .multiHeader button { + display: inline-block; + width: 94%; + } + .hasArgs .multiArg input { + border-left: 1px solid #dddddd; + width: 67%; + } + .hasArgs input { + display: block; + height: 32px; + border: 1px solid #dddddd; + padding: .36em; + border-left: none; + padding: 8px 8px 8px 10px; + font-size: 10px !important; + } + .hasArgs button { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 11px; + } + .hasArgs .contractActionsContainerMulti button { + border-radius: 3px; + } + .contractActionsContainerMultiInner .multiArg i { + padding-right: 10px; + } + .hideWarningsContainer { + display: flex; + align-items: center; + margin-left: 2% + } +` + +module.exports = css diff --git a/team-best-practices.md b/team-best-practices.md new file mode 100644 index 0000000000..770621fc58 --- /dev/null +++ b/team-best-practices.md @@ -0,0 +1,229 @@ + +# Team best practices + +This document aims to address contibutors best practices of the following repositories: + - remix-ide https://github.com/ethereum/remix-ide + - remix https://github.com/ethereum/remix + - remixd https://github.com/ethereum/remixd + +This document is not in its final version, **a team meeting which aim to address new/old best practices, feedback, workflows, all kind of issues related to how the team work together occurs every 2 weeks.** +This document link to other specialised best practices (like coding best practices). + +Related links: + - Public WebSite: https://remix-project.org + - Remix basic FAQ: https://hackmd.io/KVooMJhWRImCGq6zkDgW9A + - Remix live: https://remix.ethereum.org + - Remix alpha live: https://remix-alpha.ethereum.org + - Remix beta live: https://remix-beta.ethereum.org + - Remix-ide NPM module: https://www.npmjs.com/package/remix-ide + - Remix-lib NPM module: https://www.npmjs.com/package/remix-lib + - Remix-tests NPM module: https://www.npmjs.com/package/remix-test + - Remix-solidity NPM module: https://www.npmjs.com/package/remix-solidity + - Remix-debug NPM module: https://www.npmjs.com/package/remix-debug + - Remix documentation: http://remix-ide.readthedocs.io/en/latest/ + - General gitter channel: https://gitter.im/ethereum/remix + - Dev gitter channel: https://gitter.im/ethereum/remix-dev + - Dev plugin gitter channel: https://gitter.im/ethereum/remix-dev-plugin + + +--- + +# Team communication + + ### 1) Team meetings: + + - Daily standup (1pm CET - 11am GMT) for taking care of the current issues. + + - A regular standup - each Tuesday (3pm CET - 1pm GMT) - which aim to + - Update every contributor on what others are doing. + - Update the prioritised issues / PRs list. + - Address little issues (possibly related to the current ongoing milestone). + - High level demo, explanation about specific points of the codebase or Ethereum related things. + + - A milestone standup - scheduled before the beginning of each milestone, roughly on a monthly basis - which aim to define what will be included in the **next milestone** and who will work on what. This standup also help to set a clear long term vision. + + - A retrospective standup - after each releases - which aim to talk about **best practices in general**: what is good, what is bad, how we can improve workflows. + + - A tour standup - Just after a release or whenever it is needed - which aim to demo, **explain in details** features, bug fixes or any part of the codebase. + + + ### 2) Group meetings: + + - When a story / bug fix is divided in parts, there should be a kickstart meeting with all the developers involved, so that all the devs have an good overview / understanding on: + - How the story fits into the Ethereum tech. + - How the backend (if any) works / will work (could be a smart contract). + - How the frontend works / will work. + - What is the general vision of the UX design for this particular story. + Later progress and discussion is updated directly on the issue or pull request (Github). + +--- + +# Prerequisites: + +Before starting coding, we should ensure all devs / contributors are aware of: +- Where the codebase is. +- How to setup and get started (always up to date). +- How to run tests. +- Where to find documentation. +- How to reach us through the communication channels - https://gitter.im/ethereum/remix, https://gitter.im/ethereum/remix-dev. +- The following best practices: + +--- + +# Story / Bug fix + +- Prioritised list of PRs / issues are tracked in a Github Project, Remix IDE issues are managed by a prioritized backlog. +- Every story can be executed by a single developer or a group of 2 or more developers (depending on the size and complexity) +- Each dev should take the part he/she feels the most confortable with. +- Later progress and discussion is updated directly on the issue or pull request (github). +- When a developer or team decides on the story they want to work on (at the start of milestone for instance), they assign themselves to the issue. +- Documentation update should be done together with the story, or an issue with the label "documentation" has to be created. + +--- + +# Pull Requests + + ### 1) PR Creator: + + - It is recommended to use the emoji responses to signal agreement or that you've seen a comment and will address it rather than replying. This reduces github inbox spam. + - Mark unfinished pull requests with the `Work in Progress` label + - Large pull requests (above 200-400 lines of code changed) cannot be effectively reviewed and should be split into smaller pieces. + - Code should comply to the `JavaScript standard style` - https://www.npmjs.com/package/standard + - You should not expect complete review on a pull request which is not passing CI. + - You can obviously ask for feedback on your approach. + - You should assign a reviewer(s). + - Pull requests should be used as a reference to update coding best practices whenever it is needed. + + ### 2) Review: + + - Everyone is free to review any pull request. + - You should add the label "change requested" or "accepted". + - When reviewing people's code consider the following two comments. + > I don't like the name of this function. + + vs. + + > What do you think about changing the name of this function to .... + + Your feedback will often be better received if you pose it in the form of a question. + + - Pull request should be reviewed to comply to coding best practices. + - You should take the responsability of the PR you are reviewing. + - You should make sure the app is viable after the PR is being merged. + - You should make sure the PR is correctly tested (e2e tests, unit tests) + - Ideally You should have enough knowledge to be able to fix related bugs. + + ### 3) Merge: + + - Merging is possible after Review and Tests are ok and when the PR is approved. + - After a merge, it is highly recommended to check the new code in `remix-alpha.ethereum.org` + +--- + +# Milestone + + - A milestone should **only** contain items we are sure to finish. + - The end of a milestone trigger a new release. + - Milestone items and duration should take in account time spent in bugs fixing and support. + - The team should commit to the milestone duration. + - If a dev finish early he/she can help other to push remaining tasks. + - If a dev finish early he/she can work on specifying / integrating the next milestone. + - A milestone duration is fixed at the start of the milestone (but should better not exceed 1 month). + - Progress and issues regarding a milestone are discussed on regular standups. + +--- + +# Releases + + ### 1) Process: + - Should be documented and updated. + - A new release is triggered: + - after an important bug fix + - at the end of a milestone + - We can release an `m.m.m-alpha.x` (whenever we need to release and for whatever reasons) being in between a feature / bug fix completion. + - We release an `m.m.x` whenever there is a bug fix. + - We release an `m.x.0` whenever there is a new feature. + - We release an `x.0.0` after each milestone we consider being an important progress. + - We release an `x.0.0` if there's an API breaking change in one of our libraries. + - After a new release we should stay in alert for possible regression and better not release Friday at 5pm :) + + ### 2) Community: + - Before the official release, we should select a group of power users and invite them to test and give feedbacks. + - Users need to know upfront a new release is coming and we should prepare them for it by showcasing some new features they can expect and when it will happen (fixed date, published at least 1 week in advance). + - Whenever we have a new release we have to communicate this efficiently (twitter, reddit, ...). + +--- + +# Maintenance + + +### 1) Bugs: +- A critical bug should get the label `Blocker`, and every effort should be put to fix it. +- Addressing a non critical and non planned bug can be done: + - After having notified in the `remix-dev` channel if the bug does not involves UX or public API changes. + - After a dev meeting (e.g the regular standup) if the bug involves any UX or public API changes. + +### 2) Support: + +- We should all keep an eye on the public non dev channel and file user feedback. + +### 3) Documentation: + +- The documentation is done / updated just after the feature / release in a team effort. +- Documentation work is filable as a github issue. +- It is encouraged to find and link associated doc produced by the community (blog posts, videos, tutorials, ...) + +--- + +# Coding best practices + + - https://github.com/ethereum/remix-ide/blob/master/best-practices.md + +--- + + +## Best practices to address later + +### meeting: + - Find a good calendar we can use to schedule meetings. + - Retrospective meeting: Someone can be responsible to record the findings (of the retrospective meeting) so we can review them in the following meeting and see if they were addressed or not, and if not discuss why and take new actions. If the issue was addressed then it can be discarded. + - pair programming meetings + +### merge process: + - All the contributors of the feature should be able to merge. + - Review should have 3 phases (1. code should work, 2. code should fit with current best practices, 3. update documentation) + - We should have a dedicated person to only do browser frontend tests and make it easy for others to run them + +### release process: + + - We release an `x.0.0` if there's a fundamental change in our UX design, which means users will need to readapt the way they use the app + - after a week finishes, we publish/release a new version as **remix-beta.ethereum.org** and inform users so early adopters can test. after another week, when then next finished work is released as **remix-beta.ethereum.org**, the previous one becomes **remix.ethereum.org** and all users can start using it + - a bot to automatically notify users about upcoming features on all channels whenever **remix-beta.ethereum.org** is updated + - in case it's a major version increase - this announcement should be specially marked so ppl can check early instead of being confronted with drastic changes when **remix.ethereum.org** updates +### maintenance: + - Setting up a "bug" time where we each take a bug for which: + - We feel confortable to deal with + or + - We don't feel confortable but interested in fixing it - that will need the help of another dev +### documentation: + - We set up a special day where we address all the necessary documentation work in a team effort. + - Change to markdown or gitbook + +### support: + - Remix channel - we rotate and each day one or two are responsible for support (It would also be important to know for those of us who are contracted, how this can be billed.). If they don't know the answer they ping team member who they think could answer. That team member checks the support chat that day only if she/he is mentioned. + - We should have a FAQ where basic answer are written down so we can drop the link regularly in the channel + - People should be pointed to the appropriate `best practice.md` files by team members + +### code best practices: + - for code quality: use codeclimate and address issues + - defining all global variables on top of the page + - 80-10 characters per line + - alphabetically list dependencies and separate npm from local for better readability + - Use code documentation tool + - Write modular code. +### community + - This should be a Remix team work, from time to time (maybe once every 6 months) we could also invite other EF members for a focus group. And every 6 months we could also organize a focus group of selected users from Remix channel. +### security + - https://github.com/pipermerriam/ethereum-dev-tactical-manual/blob/master/opsec.md +### bug bounty program + - https://github.com/pipermerriam/ethereum-dev-tactical-manual/blob/master/bug-bounty-program.md diff --git a/test-browser/commands/addAtAddressInstance.js b/test-browser/commands/addAtAddressInstance.js new file mode 100644 index 0000000000..8c2e7680f6 --- /dev/null +++ b/test-browser/commands/addAtAddressInstance.js @@ -0,0 +1,33 @@ +const EventEmitter = require('events') + +class addAtAddressInstance extends EventEmitter { + command (address, isValidFormat, isValidChecksum) { + this.api.perform((done) => { + addInstance(this.api, address, isValidFormat, isValidChecksum, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function addInstance (browser, address, isValidFormat, isValidChecksum, callback) { + browser.clickLaunchIcon('udapp').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () { + browser.click('button[id^="runAndDeployAtAdressButton"]') + .execute(function () { + var ret = document.querySelector('div[class^="modal-body"] div').innerHTML + document.querySelector('#modal-footer-ok').click() + return ret + }, [], function (result) { + if (!isValidFormat) { + browser.assert.equal(result.value, 'Invalid address.') + } else if (!isValidChecksum) { + browser.assert.equal(result.value, 'Invalid checksum address.') + } + callback() + }) + }) +} + +module.exports = addAtAddressInstance diff --git a/test-browser/commands/addFile.js b/test-browser/commands/addFile.js new file mode 100644 index 0000000000..5c5564d666 --- /dev/null +++ b/test-browser/commands/addFile.js @@ -0,0 +1,36 @@ +const EventEmitter = require('events') + +class AddFile extends EventEmitter { + command (name, content) { + this.api.perform((done) => { + addFile(this.api, name, content, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function addFile (browser, name, content, done) { + browser.clickLaunchIcon('udapp').clickLaunchIcon('fileExplorers').click('.newFile') + .waitForElementVisible('#modal-dialog') + .perform((client, done) => { + browser.execute(function (fileName) { + if (fileName !== 'Untitled.sol') { + document.querySelector('#modal-dialog #prompt_text').setAttribute('value', fileName) + } + document.querySelector('#modal-footer-ok').click() + }, [name], function (result) { + console.log(result) + done() + }) + }) + .setEditorValue(content.content) + .pause(1000) + .perform(function () { + done() + }) +} + +module.exports = AddFile diff --git a/test-browser/commands/checkElementStyle.js b/test-browser/commands/checkElementStyle.js new file mode 100644 index 0000000000..0e400439b8 --- /dev/null +++ b/test-browser/commands/checkElementStyle.js @@ -0,0 +1,26 @@ +const EventEmitter = require('events') + +class checkElementStyle extends EventEmitter { + command (cssSelector, styleProperty, expectedResult) { + this.api.perform((done) => { + checkStyle(this.api, cssSelector, styleProperty, expectedResult, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function checkStyle (browser, cssSelector, styleProperty, expectedResult, callback) { + browser.execute(function (cssSelector, styleProperty) { + return window.getComputedStyle(document.querySelector(cssSelector)).getPropertyValue(styleProperty) + }, [cssSelector, styleProperty], function (result) { + const value = result.value + + browser.assert.equal(value.trim(), expectedResult) + callback() + }) +} + +module.exports = checkElementStyle diff --git a/test-browser/commands/checkTerminalFilter.js b/test-browser/commands/checkTerminalFilter.js new file mode 100644 index 0000000000..8f78306fe2 --- /dev/null +++ b/test-browser/commands/checkTerminalFilter.js @@ -0,0 +1,35 @@ +const EventEmitter = require('events') + +class CheckTerminalFilter extends EventEmitter { + command (filter, test) { + this.api.perform((done) => { + checkFilter(this.api, filter, test, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function checkFilter (browser, filter, test, done) { + if (browser.options.desiredCapabilities.browserName === 'chrome') { // nightwatch deos not handle well that part.... works locally + done() + return + } + const filterClass = '[data-id="terminalInputSearch"]' + browser.setValue(filterClass, filter, function () { + browser.execute(function () { + return document.querySelector('[data-id="terminalJournal"]').innerHTML === test + }, [], function (result) { + browser.clearValue(filterClass).setValue(filterClass, '', function () { + if (!result.value) { + browser.assert.fail('useFilter on ' + filter + ' ' + test, 'info about error', '') + } + done() + }) + }) + }) +} + +module.exports = CheckTerminalFilter diff --git a/test-browser/commands/checkVariableDebug.js b/test-browser/commands/checkVariableDebug.js new file mode 100644 index 0000000000..d5ad7834e1 --- /dev/null +++ b/test-browser/commands/checkVariableDebug.js @@ -0,0 +1,38 @@ +const EventEmitter = require('events') +const deepequal = require('deep-equal') + +class CreateContract extends EventEmitter { + command (id, debugValue) { + this.api.perform((done) => { + checkDebug(this.api, id, debugValue, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function checkDebug (browser, id, debugValue, done) { + // id is soliditylocals or soliditystate + browser.execute(function (id) { + return document.querySelector('#' + id + ' .dropdownrawcontent').innerText + }, [id], function (result) { + console.log(id + ' ' + result.value) + var value + try { + value = JSON.parse(result.value) + } catch (e) { + browser.assert.fail('cant parse solidity state', e.message, '') + done() + return + } + var equal = deepequal(debugValue, value) + if (!equal) { + browser.assert.fail('checkDebug on ' + id, 'info about error\n ' + JSON.stringify(debugValue) + '\n ' + JSON.stringify(value), '') + } + done() + }) +} + +module.exports = CreateContract diff --git a/test-browser/commands/clickElementAtPosition.js b/test-browser/commands/clickElementAtPosition.js new file mode 100644 index 0000000000..b0ec4816f6 --- /dev/null +++ b/test-browser/commands/clickElementAtPosition.js @@ -0,0 +1,24 @@ +const EventEmitter = require('events') + +class ClickElement extends EventEmitter { + command (cssSelector, index = 0) { + this.api.perform((done) => { + _clickElement(this.api, cssSelector, index, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function _clickElement (browser, cssSelector, index, cb) { + browser.waitForElementPresent(cssSelector) + .execute(function (cssSelector, index) { + document.querySelectorAll(cssSelector)[index].click() + }, [cssSelector, index], function () { + cb() + }) +} + +module.exports = ClickElement diff --git a/test-browser/commands/clickFunction.js b/test-browser/commands/clickFunction.js new file mode 100644 index 0000000000..fce9b7f811 --- /dev/null +++ b/test-browser/commands/clickFunction.js @@ -0,0 +1,25 @@ +const EventEmitter = require('events') + +class ClickFunction extends EventEmitter { + command (fnFullName, expectedInput) { + this.api.waitForElementPresent('.instance button[title="' + fnFullName + '"]') + .perform(function (client, done) { + client.execute(function () { + document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight + }, [], function () { + if (expectedInput) { + client.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values, function () {}) + } + done() + }) + }) + .click('.instance button[title="' + fnFullName + '"]') + .pause(2000) + .perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = ClickFunction diff --git a/test-browser/commands/clickInstance.js b/test-browser/commands/clickInstance.js new file mode 100644 index 0000000000..2c01f08095 --- /dev/null +++ b/test-browser/commands/clickInstance.js @@ -0,0 +1,12 @@ +const EventEmitter = require('events') + +class ClickInstance extends EventEmitter { + command (index) { + index = index + 2 + let selector = '.instance:nth-of-type(' + index + ') > div > button' + this.api.waitForElementPresent(selector).scrollAndClick(selector).perform(() => { this.emit('complete') }) + return this + } +} + +module.exports = ClickInstance diff --git a/test-browser/commands/clickLaunchIcon.js b/test-browser/commands/clickLaunchIcon.js new file mode 100644 index 0000000000..6774813b20 --- /dev/null +++ b/test-browser/commands/clickLaunchIcon.js @@ -0,0 +1,12 @@ +const EventEmitter = require('events') + +class ClickLaunchIcon extends EventEmitter { + command (icon) { + this.api.waitForElementVisible('#icon-panel div[plugin="' + icon + '"]').click('#icon-panel div[plugin="' + icon + '"]').perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = ClickLaunchIcon diff --git a/test-browser/commands/createContract.js b/test-browser/commands/createContract.js new file mode 100644 index 0000000000..d351a9acd0 --- /dev/null +++ b/test-browser/commands/createContract.js @@ -0,0 +1,22 @@ +const EventEmitter = require('events') + +class CreateContract extends EventEmitter { + command (inputParams) { + this.api.perform((done) => { + createContract(this.api, inputParams, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function createContract (browser, inputParams, callback) { + browser.clickLaunchIcon('settings').clickLaunchIcon('udapp') + .setValue('div[class^="contractActionsContainerSingle"] input', inputParams, function () { + browser.click('#runTabView button[class^="instanceButton"]').pause(500).perform(function () { callback() }) + }) +} + +module.exports = CreateContract diff --git a/test-browser/commands/debugTransaction.js b/test-browser/commands/debugTransaction.js new file mode 100644 index 0000000000..7ef32af5a3 --- /dev/null +++ b/test-browser/commands/debugTransaction.js @@ -0,0 +1,25 @@ +const EventEmitter = require('events') + +class debugTransaction extends EventEmitter { + command (index = 0) { + this.api.perform((done) => { + checkStyle(this.api, index, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function checkStyle (browser, index, callback) { + browser.pause(2000).execute(function (index) { + const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] + + debugBtn.click() + }, [index], function () { + callback() + }) +} + +module.exports = debugTransaction diff --git a/test-browser/commands/editorScroll.js b/test-browser/commands/editorScroll.js new file mode 100644 index 0000000000..d2b08c9ebe --- /dev/null +++ b/test-browser/commands/editorScroll.js @@ -0,0 +1,21 @@ +const EventEmitter = require('events') + +// fix for editor scroll +class ScrollEditor extends EventEmitter { + command (direction, numberOfTimes) { + const browser = this.api + + browser.waitForElementPresent('.ace_text-input') + for (let i = 0; i < numberOfTimes; i++) { + if (direction.toLowerCase() === 'up') browser.sendKeys('.ace_text-input', browser.Keys.ARROW_UP) + if (direction.toLowerCase() === 'down') browser.sendKeys('.ace_text-input', browser.Keys.ARROW_DOWN) + } + browser.perform((done) => { + done() + this.emit('complete') + }) + return this + } +} + +module.exports = ScrollEditor diff --git a/test-browser/commands/executeScript.js b/test-browser/commands/executeScript.js new file mode 100644 index 0000000000..f3bf5b09e4 --- /dev/null +++ b/test-browser/commands/executeScript.js @@ -0,0 +1,18 @@ +const EventEmitter = require('events') + +class ExecuteScript extends EventEmitter { + command (script) { + this.api + .clearValue('*[data-id="terminalCliInput"]') + .click('*[data-id="terminalCli"]') + .sendKeys('*[data-id="terminalCliInput"]', script) + .sendKeys('*[data-id="terminalCliInput"]', this.api.Keys.ENTER) + .sendKeys('*[data-id="terminalCliInput"]', this.api.Keys.ENTER) + .perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = ExecuteScript diff --git a/test-browser/commands/getAddressAtPosition.js b/test-browser/commands/getAddressAtPosition.js new file mode 100644 index 0000000000..b0af766747 --- /dev/null +++ b/test-browser/commands/getAddressAtPosition.js @@ -0,0 +1,28 @@ +const EventEmitter = require('events') + +class GetAddressAtPosition extends EventEmitter { + command (index, cb) { + this.api.perform((done) => { + getAddressAtPosition(this.api, index, (pos) => { + done() + cb(pos) + this.emit('complete') + }) + }) + return this + } +} + +function getAddressAtPosition (browser, index, callback) { + browser.waitForElementPresent('*[data-shared="universalDappUiInstance"]') + .execute(function (index) { + const deployedContracts = document.querySelectorAll('*[data-shared="universalDappUiInstance"]') + const id = deployedContracts[index].getAttribute('id') + + return id.replace('instance', '') + }, [index], function (result) { + callback(result.value) + }) +} + +module.exports = GetAddressAtPosition diff --git a/test-browser/commands/getEditorValue.js b/test-browser/commands/getEditorValue.js new file mode 100644 index 0000000000..f62d88ba2f --- /dev/null +++ b/test-browser/commands/getEditorValue.js @@ -0,0 +1,18 @@ +const EventEmitter = require('events') + +class GetEditorValue extends EventEmitter { + command (callback) { + this.api.perform((client, done) => { + this.api.execute(function (value) { + return document.getElementById('input').editor.getValue() + }, [], (result) => { + done(result.value) + callback(result.value) + this.emit('complete') + }) + }) + return this + } +} + +module.exports = GetEditorValue diff --git a/test-browser/commands/getInstalledPlugins.js b/test-browser/commands/getInstalledPlugins.js new file mode 100644 index 0000000000..b595bdaea4 --- /dev/null +++ b/test-browser/commands/getInstalledPlugins.js @@ -0,0 +1,27 @@ +const EventEmitter = require('events') + +class GetInstalledPlugins extends EventEmitter { + command (cb) { + const browser = this.api + + browser.waitForElementPresent('[plugin]:not([plugin=""]') + .perform((done) => { + browser.execute(() => { + const pluginNames = [] + const plugins = document.querySelectorAll('[plugin]:not([plugin=""]') + + plugins.forEach(plugin => { + pluginNames.push(plugin.getAttribute('plugin')) + }) + return pluginNames + }, [], (result) => { + done() + cb(result.value) + this.emit('complete') + }) + }) + return this + } +} + +module.exports = GetInstalledPlugins diff --git a/test-browser/commands/getModalBody.js b/test-browser/commands/getModalBody.js new file mode 100644 index 0000000000..5467275c12 --- /dev/null +++ b/test-browser/commands/getModalBody.js @@ -0,0 +1,16 @@ +const EventEmitter = require('events') + +class GetModalBody extends EventEmitter { + command (callback) { + this.api.waitForElementVisible('.modal-body') + .getText('.modal-body', (result) => { + console.log(result) + callback(result.value, () => { + this.emit('complete') + }) + }) + return this + } +} + +module.exports = GetModalBody diff --git a/test-browser/commands/goToVMTraceStep.js b/test-browser/commands/goToVMTraceStep.js new file mode 100644 index 0000000000..b5a7854916 --- /dev/null +++ b/test-browser/commands/goToVMTraceStep.js @@ -0,0 +1,38 @@ +const EventEmitter = require('events') + +class GoToVmTraceStep extends EventEmitter { + command (step, incr) { + this.api.perform((done) => { + goToVMtraceStep(this.api, step, incr, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function goToVMtraceStep (browser, step, incr, done) { + if (!incr) incr = 0 + browser.execute(function (step) { + return document.querySelector('#stepdetail').innerHTML + }, [step], function (result) { + if (result.value.indexOf('vm trace step: ' + step) !== -1) { + done() + } else if (incr > 1000) { + console.log(result) + browser.assert.fail('goToVMtraceStep fails', 'info about error', '') + done() + } else { + incr++ + browser.click('#intoforward') + .perform(() => { + setTimeout(() => { + goToVMtraceStep(browser, step, incr, done) + }, 200) + }) + } + }) +} + +module.exports = GoToVmTraceStep diff --git a/test-browser/commands/journalChildIncludes.js b/test-browser/commands/journalChildIncludes.js new file mode 100644 index 0000000000..123365edfc --- /dev/null +++ b/test-browser/commands/journalChildIncludes.js @@ -0,0 +1,30 @@ +const EventEmitter = require('events') + +/* + Checks if any child elements of journal (console) contains a matching value. +*/ +class JournalChildIncludes extends EventEmitter { + command (val) { + let isTextFound = false + const browser = this.api + + this.api.elements('css selector', '*[data-id="terminalJournal"]', (res) => { + res.value.forEach(function (jsonWebElement) { + const jsonWebElementId = jsonWebElement.ELEMENT + + browser.elementIdText(jsonWebElementId, (jsonElement) => { + const text = jsonElement.value + + if (text.indexOf(val) !== -1) isTextFound = true + }) + }) + }) + browser.perform(() => { + browser.assert.ok(isTextFound, isTextFound ? `<*[data-id="terminalJournal"]> contains ${val}.` : `${val} not found in <*[data-id="terminalJournal"]> div:last-child>`) + this.emit('complete') + }) + return this + } +} + +module.exports = JournalChildIncludes diff --git a/test-browser/commands/journalLastChild.js b/test-browser/commands/journalLastChild.js new file mode 100644 index 0000000000..49d0fb3516 --- /dev/null +++ b/test-browser/commands/journalLastChild.js @@ -0,0 +1,14 @@ +const EventEmitter = require('events') + +class JournalLastChild extends EventEmitter { + command (val) { + this.api + .waitForElementVisible('*[data-id="terminalJournal"] > div:last-child', 10000) + .assert.containsText('*[data-id="terminalJournal"] > div:last-child', val).perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = JournalLastChild diff --git a/test-browser/commands/journalLastChildIncludes.js b/test-browser/commands/journalLastChildIncludes.js new file mode 100644 index 0000000000..c480694fbe --- /dev/null +++ b/test-browser/commands/journalLastChildIncludes.js @@ -0,0 +1,20 @@ +const EventEmitter = require('events') + +/* + Check if the last log in the console contains a specific text +*/ +class JournalLastChildIncludes extends EventEmitter { + command (val) { + this.api + .waitForElementVisible('*[data-id="terminalJournal"] > div:last-child', 10000) + .getText('*[data-id="terminalJournal"] > div:last-child', (result) => { + console.log('JournalLastChildIncludes', result.value) + if (result.value.indexOf(val) === -1) return this.api.assert.fail(`wait for ${val} in ${result.value}`) + else this.api.assert.ok(`<*[data-id="terminalJournal"] > div:last-child> contains ${val}.`) + this.emit('complete') + }) + return this + } +} + +module.exports = JournalLastChildIncludes diff --git a/test-browser/commands/modalFooterCancelClick.js b/test-browser/commands/modalFooterCancelClick.js new file mode 100644 index 0000000000..86adbc63b3 --- /dev/null +++ b/test-browser/commands/modalFooterCancelClick.js @@ -0,0 +1,17 @@ +const EventEmitter = require('events') + +class ModalFooterOKClick extends EventEmitter { + command () { + this.api.waitForElementVisible('#modal-footer-cancel').perform((client, done) => { + this.api.execute(function () { + document.querySelector('#modal-footer-cancel').click() + }, [], (result) => { + done() + this.emit('complete') + }) + }) + return this + } +} + +module.exports = ModalFooterOKClick diff --git a/test-browser/commands/modalFooterOKClick.js b/test-browser/commands/modalFooterOKClick.js new file mode 100644 index 0000000000..b6c0db5b7c --- /dev/null +++ b/test-browser/commands/modalFooterOKClick.js @@ -0,0 +1,17 @@ +const EventEmitter = require('events') + +class ModalFooterOKClick extends EventEmitter { + command () { + this.api.waitForElementVisible('#modal-footer-ok').perform((client, done) => { + this.api.execute(function () { + document.querySelector('#modal-footer-ok').click() + }, [], (result) => { + done() + this.emit('complete') + }) + }) + return this + } +} + +module.exports = ModalFooterOKClick diff --git a/test-browser/commands/notContainsText.js b/test-browser/commands/notContainsText.js new file mode 100644 index 0000000000..d2faa1d8ad --- /dev/null +++ b/test-browser/commands/notContainsText.js @@ -0,0 +1,18 @@ +const EventEmitter = require('events') + +class NotContainsText extends EventEmitter { + command (cssSelector, text) { + const browser = this.api + + browser.getText(cssSelector, (result) => { + if (result.value.includes(text)) return this.api.assert.fail(`${cssSelector} contains ${text}.`) + else this.api.assert.ok(`${cssSelector} does not contains ${text}.`) + }) + .perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = NotContainsText diff --git a/test-browser/commands/openFile.js b/test-browser/commands/openFile.js new file mode 100644 index 0000000000..3812afa0ed --- /dev/null +++ b/test-browser/commands/openFile.js @@ -0,0 +1,26 @@ +const EventEmitter = require('events') + +class OpenFile extends EventEmitter { + command (name) { + this.api.perform((done) => { + openFile(this.api, name, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +// click on fileExplorer can toggle it. We go through settings to be sure FE is open +function openFile (browser, name, done) { + browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers') + .waitForElementVisible('li[key="' + name + '"]') + .click('li[key="' + name + '"]') + .pause(2000) + .perform(() => { + done() + }) +} + +module.exports = OpenFile diff --git a/test-browser/commands/removeFile.js b/test-browser/commands/removeFile.js new file mode 100644 index 0000000000..c2ebb3b873 --- /dev/null +++ b/test-browser/commands/removeFile.js @@ -0,0 +1,46 @@ +const EventEmitter = require('events') + +class RemoveFile extends EventEmitter { + command (path) { + this.api.perform((done) => { + removeFile(this.api, path, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function removeFile (browser, path, done) { + browser.execute(function (path) { + function contextMenuClick (element) { + var evt = element.ownerDocument.createEvent('MouseEvents') + var RIGHT_CLICK_BUTTON_CODE = 2 // the same for FF and IE + evt.initMouseEvent('contextmenu', true, true, + element.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, + false, false, false, RIGHT_CLICK_BUTTON_CODE, null) + if (document.createEventObject) { + // dispatch for IE + return element.fireEvent('onclick', evt) + } else { + // dispatch for firefox + others + return !element.dispatchEvent(evt) + } + } + contextMenuClick(document.querySelector('[data-path="' + path + '"]')) + }, [path], function (result) { + browser + .waitForElementVisible('#menuitemdelete', 2000) + .click('#menuitemdelete') + .pause(500) + .waitForElementVisible('#modal-footer-ok', 2000) + .click('#modal-footer-ok') + .waitForElementNotPresent('[data-path="' + path + '"]') + .perform(() => { + done() + }) + }) +} + +module.exports = RemoveFile diff --git a/test-browser/commands/renameFile.js b/test-browser/commands/renameFile.js new file mode 100644 index 0000000000..840b0974d6 --- /dev/null +++ b/test-browser/commands/renameFile.js @@ -0,0 +1,54 @@ +const EventEmitter = require('events') + +class RenameFile extends EventEmitter { + command (path, newFileName, renamedPath) { + this.api.perform((done) => { + renameFile(this.api, path, newFileName, renamedPath, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function renameFile (browser, path, newFileName, renamedPath, done) { + browser.execute(function (path) { + function contextMenuClick (element) { + var evt = element.ownerDocument.createEvent('MouseEvents') + var RIGHT_CLICK_BUTTON_CODE = 2 // the same for FF and IE + evt.initMouseEvent('contextmenu', true, true, + element.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, + false, false, false, RIGHT_CLICK_BUTTON_CODE, null) + if (document.createEventObject) { + // dispatch for IE + return element.fireEvent('onclick', evt) + } else { + // dispatch for firefox + others + return !element.dispatchEvent(evt) + } + } + contextMenuClick(document.querySelector('[data-path="' + path + '"]')) + }, [path], function (result) { + browser + .click('#menuitemrename') + .perform((client, doneSetValue) => { + browser.execute(function (path, addvalue) { + document.querySelector('[data-path="' + path + '"]').innerHTML = addvalue + }, [path, newFileName], () => { + doneSetValue() + }) + }) + .click('body') // blur + .waitForElementVisible('#modal-footer-ok', 10000) + .pause(2000) + .click('#modal-footer-ok') + .waitForElementNotPresent('[data-path="' + path + '"]') + .waitForElementPresent('[data-path="' + renamedPath + '"]') + .perform(() => { + done() + }) + }) +} + +module.exports = RenameFile diff --git a/test-browser/commands/rightClick.js b/test-browser/commands/rightClick.js new file mode 100644 index 0000000000..827b5f02df --- /dev/null +++ b/test-browser/commands/rightClick.js @@ -0,0 +1,36 @@ +const EventEmitter = require('events') + +class RightClick extends EventEmitter { + command (cssSelector) { + this.api.perform((done) => { + rightClick(this.api, cssSelector, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function rightClick (browser, cssSelector, callback) { + browser.execute(function (cssSelector) { + const element = document.querySelector(cssSelector) + const evt = element.ownerDocument.createEvent('MouseEvents') + const RIGHT_CLICK_BUTTON_CODE = 2 + + evt.initMouseEvent('contextmenu', true, true, + element.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, + false, false, false, RIGHT_CLICK_BUTTON_CODE, null) + if (document.createEventObject) { + // dispatch for IE + return element.fireEvent('onclick', evt) + } else { + // dispatch for firefox + others + return !element.dispatchEvent(evt) + } + }, [cssSelector], function () { + callback() + }) +} + +module.exports = RightClick diff --git a/test-browser/commands/scrollAndClick.js b/test-browser/commands/scrollAndClick.js new file mode 100644 index 0000000000..ab44f47d57 --- /dev/null +++ b/test-browser/commands/scrollAndClick.js @@ -0,0 +1,15 @@ +const EventEmitter = require('events') + +class scrollAndClick extends EventEmitter { + command (target) { + this.api + .scrollInto(target) + .click(target) + .perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = scrollAndClick diff --git a/test-browser/commands/scrollInto.js b/test-browser/commands/scrollInto.js new file mode 100644 index 0000000000..e5727225c0 --- /dev/null +++ b/test-browser/commands/scrollInto.js @@ -0,0 +1,23 @@ +const EventEmitter = require('events') + +class ScrollInto extends EventEmitter { + command (target) { + this.api.perform((client, done) => { + _scrollInto(this.api, target, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function _scrollInto (browser, target, cb) { + browser.execute(function (target) { + document.querySelector(target).scrollIntoView(({block: 'center'})) + }, [target], function () { + cb() + }) +} + +module.exports = ScrollInto diff --git a/test-browser/commands/selectAccount.js b/test-browser/commands/selectAccount.js new file mode 100644 index 0000000000..132a52679e --- /dev/null +++ b/test-browser/commands/selectAccount.js @@ -0,0 +1,16 @@ +const EventEmitter = require('events') + +class SelectAccount extends EventEmitter { + command (account) { + if (account) { + this.api + .click(`select[data-id="runTabSelectAccount"] [value="${account}"]`) + .perform(() => { + this.emit('complete') + }) + } else this.emit('complete') + return this + } +} + +module.exports = SelectAccount diff --git a/test-browser/commands/selectContract.js b/test-browser/commands/selectContract.js new file mode 100644 index 0000000000..98a6eb7600 --- /dev/null +++ b/test-browser/commands/selectContract.js @@ -0,0 +1,22 @@ +const EventEmitter = require('events') + +class SelectContract extends EventEmitter { + command (contractName) { + this.api.perform((done) => { + selectContract(this.api, contractName, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function selectContract (browser, contractName, callback) { + browser.clickLaunchIcon('settings').clickLaunchIcon('udapp') + .setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => { + callback() + }) +} + +module.exports = SelectContract diff --git a/test-browser/commands/sendLowLevelTx.js b/test-browser/commands/sendLowLevelTx.js new file mode 100644 index 0000000000..1198482f2f --- /dev/null +++ b/test-browser/commands/sendLowLevelTx.js @@ -0,0 +1,19 @@ +const EventEmitter = require('events') +class sendLowLevelTx extends EventEmitter { + command (address, value, callData) { + console.log('low level transact to ', address, value, callData) + this.api.waitForElementVisible(`#instance${address} #deployAndRunLLTxSendTransaction`, 1000) + .clearValue(`#instance${address} #deployAndRunLLTxCalldata`) + .setValue(`#instance${address} #deployAndRunLLTxCalldata`, callData) + .waitForElementVisible('#value') + .clearValue('#value') + .setValue('#value', value) + .scrollAndClick(`#instance${address} #deployAndRunLLTxSendTransaction`) + .perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = sendLowLevelTx diff --git a/test-browser/commands/setEditorValue.js b/test-browser/commands/setEditorValue.js new file mode 100644 index 0000000000..1cf38a4027 --- /dev/null +++ b/test-browser/commands/setEditorValue.js @@ -0,0 +1,20 @@ +const EventEmitter = require('events') + +class SetEditorValue extends EventEmitter { + command (value, callback) { + this.api.perform((client, done) => { + this.api.execute(function (value) { + document.getElementById('input').editor.session.setValue(value) + }, [value], (result) => { + done() + if (callback) { + callback.call(this.api) + } + this.emit('complete') + }) + }) + return this + } +} + +module.exports = SetEditorValue diff --git a/test-browser/commands/setSolidityCompilerVersion.js b/test-browser/commands/setSolidityCompilerVersion.js new file mode 100644 index 0000000000..afca5d562f --- /dev/null +++ b/test-browser/commands/setSolidityCompilerVersion.js @@ -0,0 +1,15 @@ +const EventEmitter = require('events') + +class SetSolidityCompilerVersion extends EventEmitter { + command (version) { + this.api + .click(`#compileTabView #versionSelector [value="${version}"]`) + .pause(5000) + .perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = SetSolidityCompilerVersion diff --git a/test-browser/commands/setupMetamask.js b/test-browser/commands/setupMetamask.js new file mode 100644 index 0000000000..aec9717909 --- /dev/null +++ b/test-browser/commands/setupMetamask.js @@ -0,0 +1,38 @@ +const EventEmitter = require('events') + +class MetaMask extends EventEmitter { + command (passphrase, password) { + this.api.perform((done) => { + setupMetaMask(this.api, passphrase, password, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function setupMetaMask (browser, passphrase, password, done) { + browser + .switchBrowserWindow('chrome-extension://poemojpkcjbpmcccohjnomjffeinlafe/home.html#initialize/welcome', 'MetaMask', (browser) => { + browser.waitForElementPresent('.first-time-flow__button') + .click('.first-time-flow__button') + .waitForElementPresent('.select-action__select-button:nth-of-type(1) > .first-time-flow__button') + .click('.select-action__select-button:nth-of-type(1) > .first-time-flow__button') + .waitForElementPresent('.page-container__footer-button:nth-of-type(2)') + .click('.page-container__footer-button:nth-of-type(2)') + .waitForElementPresent('.first-time-flow__textarea') + .setValue('.first-time-flow__textarea', passphrase) + .setValue('*[autocomplete="new-password"]', password) + .setValue('*[autocomplete="confirm-password"]', password) + .click('.first-time-flow__checkbox') + .click('.first-time-flow__button') + .pause(5000) + .click('.first-time-flow__button') + .perform(() => { + done() + }) + }) +} + +module.exports = MetaMask diff --git a/test-browser/commands/signMessage.js b/test-browser/commands/signMessage.js new file mode 100644 index 0000000000..945107f172 --- /dev/null +++ b/test-browser/commands/signMessage.js @@ -0,0 +1,42 @@ +const EventEmitter = require('events') + +class SelectContract extends EventEmitter { + command (msg, callback) { + this.api.perform((done) => { + signMsg(this.api, msg, (hash, signature) => { + callback(hash, signature) + done() + this.emit('complete') + }) + }) + return this + } +} + +function signMsg (browser, msg, cb) { + let hash, signature + browser + .waitForElementPresent('i[id="remixRunSignMsg"]') + .click('i[id="remixRunSignMsg"]') + .waitForElementPresent('textarea[id="prompt_text"]') + .setValue('textarea[id="prompt_text"]', msg, () => { + browser.modalFooterOKClick().perform( + (client, done) => { + browser.waitForElementVisible('span[id="remixRunSignMsgHash"]').getText('span[id="remixRunSignMsgHash"]', (v) => { hash = v; done() }) + } + ) + .perform( + (client, done) => { + browser.waitForElementVisible('span[id="remixRunSignMsgSignature"]').getText('span[id="remixRunSignMsgSignature"]', (v) => { signature = v; done() }) + } + ) + .modalFooterOKClick() + .perform( + () => { + cb(hash, signature) + } + ) + }) +} + +module.exports = SelectContract diff --git a/test-browser/commands/switchBrowserTab.js b/test-browser/commands/switchBrowserTab.js new file mode 100644 index 0000000000..eca517cfed --- /dev/null +++ b/test-browser/commands/switchBrowserTab.js @@ -0,0 +1,20 @@ +const EventEmitter = require('events') + +/* + Switches between browser tabs +*/ + +class SwitchBrowserTab extends EventEmitter { + command (index) { + this.api.perform((browser, done) => { + browser.window_handles((result) => { + browser.switchWindow(result.value[index]) + done() + }) + this.emit('complete') + }) + return this + } +} + +module.exports = SwitchBrowserTab diff --git a/test-browser/commands/switchBrowserWindow.js b/test-browser/commands/switchBrowserWindow.js new file mode 100644 index 0000000000..a153de17a0 --- /dev/null +++ b/test-browser/commands/switchBrowserWindow.js @@ -0,0 +1,26 @@ +const EventEmitter = require('events') + +class SwitchBrowserWindow extends EventEmitter { + command (url, windowName, cb) { + this.api.perform((done) => { + switchWindow(this.api, url, windowName, cb) + done() + this.emit('complete') + }) + return this + } +} + +function switchWindow (browser, url, windowName, cb) { + browser.execute(function (windowName) { + return window.open('', windowName, 'width=2560, height=1440') + }, [windowName], (newWindow) => { + browser.switchWindow(windowName) + .url(url) + .pause(5000) + .assert.urlContains(url) + if (cb) cb(browser, newWindow) + }) +} + +module.exports = SwitchBrowserWindow diff --git a/test-browser/commands/testConstantFunction.js b/test-browser/commands/testConstantFunction.js new file mode 100644 index 0000000000..9282d9a10d --- /dev/null +++ b/test-browser/commands/testConstantFunction.js @@ -0,0 +1,36 @@ +const EventEmitter = require('events') + +class TestConstantFunction extends EventEmitter { + command (address, fnFullName, expectedInput, expectedOutput) { + console.log('TestConstantFunction ' + address + ' fnFullName') + this.api.perform((done) => { + testConstantFunction(this.api, address, fnFullName, expectedInput, expectedOutput, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function testConstantFunction (browser, address, fnFullName, expectedInput, expectedOutput, cb) { + browser.waitForElementPresent('.instance button[title="' + fnFullName + '"]').perform(function (client, done) { + client.execute(function () { + document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight + }, [], function () { + if (expectedInput) { + client.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values, function () {}) + } + done() + }) + }) + .click('.instance button[title="' + fnFullName + '"]') + .pause(1000) + .waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]') + .scrollInto('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]') + .assert.containsText('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]', expectedOutput).perform(() => { + cb() + }) +} + +module.exports = TestConstantFunction diff --git a/test-browser/commands/testContracts.js b/test-browser/commands/testContracts.js new file mode 100644 index 0000000000..ce253ee95a --- /dev/null +++ b/test-browser/commands/testContracts.js @@ -0,0 +1,27 @@ +const EventEmitter = require('events') + +class TestContracts extends EventEmitter { + command (fileName, contractCode, compiledContractNames) { + this.api.perform((done) => { + testContracts(this.api, fileName, contractCode, compiledContractNames, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function testContracts (browser, fileName, contractCode, compiledContractNames, callback) { + browser + .clickLaunchIcon('solidity') + .clearValue('#input textarea') + .addFile(fileName, contractCode) + .pause(1000) + .verifyContracts(compiledContractNames) + .perform(() => { + callback() + }) +} + +module.exports = TestContracts diff --git a/test-browser/commands/testEditorValue.js b/test-browser/commands/testEditorValue.js new file mode 100644 index 0000000000..331d844037 --- /dev/null +++ b/test-browser/commands/testEditorValue.js @@ -0,0 +1,13 @@ +const EventEmitter = require('events') + +class TestEditorValue extends EventEmitter { + command (testvalue) { + this.api.getEditorValue((value) => { + this.api.assert.equal(testvalue, value) + this.emit('complete') + }) + return this + } +} + +module.exports = TestEditorValue diff --git a/test-browser/commands/testFunction.js b/test-browser/commands/testFunction.js new file mode 100644 index 0000000000..f7227e4d15 --- /dev/null +++ b/test-browser/commands/testFunction.js @@ -0,0 +1,60 @@ +const EventEmitter = require('events') +const deepequal = require('deep-equal') + +class TestFunction extends EventEmitter { + command (txHash, expectedValue) { + const browser = this.api + const logs = {} + const setLog = (index, value) => { logs[Object.keys(logs)[index]] = value } + + browser.waitForElementVisible(`*[data-id="txLogger${txHash}"]`) + .click(`*[data-id="txLogger${txHash}"]`) + .waitForElementVisible(`*[data-id="txLoggerTable${txHash}"]`) + .click(`*[data-id="txLoggerTable${txHash}"]`) + + // fetch and format transaction logs as key => pair object + .elements('css selector', `*[data-shared="key_${txHash}"]`, (res) => { + res.value.forEach(function (jsonWebElement) { + const jsonWebElementId = jsonWebElement.ELEMENT + + browser.elementIdText(jsonWebElementId, (jsonElement) => { + const key = jsonElement.value.trim() + + logs[key] = null + }) + }) + }) + .elements('css selector', `*[data-shared="pair_${txHash}"]`, (res) => { + res.value.forEach(function (jsonWebElement, index) { + const jsonWebElementId = jsonWebElement.ELEMENT + + browser.elementIdText(jsonWebElementId, (jsonElement) => { + let value = jsonElement.value + + try { + value = JSON.parse(jsonElement.value) + setLog(index, value) + } catch (e) { + setLog(index, value) + } + }) + }) + }) + + browser.perform(() => { + Object.keys(expectedValue).forEach(key => { + const equal = deepequal(logs[key], expectedValue[key]) + + if (!equal) { + browser.assert.fail(`Expected ${expectedValue[key]} but got ${logs[key]}`) + } else { + browser.assert.ok(true, `Expected value matched returned value ${expectedValue[key]}`) + } + }) + this.emit('complete') + }) + return this + } +} + +module.exports = TestFunction diff --git a/test-browser/commands/verifyCallReturnValue.js b/test-browser/commands/verifyCallReturnValue.js new file mode 100644 index 0000000000..f8b4c0ad9e --- /dev/null +++ b/test-browser/commands/verifyCallReturnValue.js @@ -0,0 +1,33 @@ +const EventEmitter = require('events') + +class VerifyCallReturnValue extends EventEmitter { + command (address, checks) { + this.api.perform((done) => { + verifyCallReturnValue(this.api, address, checks, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function verifyCallReturnValue (browser, address, checks, done) { + browser.execute(function (address) { + var nodes = document.querySelectorAll('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]') + var ret = [] + for (var k = 0; k < nodes.length; k++) { + var text = nodes[k].innerText ? nodes[k].innerText : nodes[k].textContent + ret.push(text.replace('\n', '')) + } + return ret + }, [address], function (result) { + console.log('verifyCallReturnValue', result) + for (var k in checks) { + browser.assert.equal(result.value[k], checks[k]) + } + done() + }) +} + +module.exports = VerifyCallReturnValue diff --git a/test-browser/commands/verifyContracts.js b/test-browser/commands/verifyContracts.js new file mode 100644 index 0000000000..14f006504e --- /dev/null +++ b/test-browser/commands/verifyContracts.js @@ -0,0 +1,56 @@ +const EventEmitter = require('events') + +class VerifyContracts extends EventEmitter { + command (compiledContractNames, opts = { wait: 1000 }) { + this.api.perform((done) => { + verifyContracts(this.api, compiledContractNames, opts, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function getCompiledContracts (browser, opts, callback) { + browser + .clickLaunchIcon('solidity') + .pause(opts.wait) + .waitForElementPresent('*[data-id="compiledContracts"] option') + .execute(function () { + var contracts = document.querySelectorAll('*[data-id="compiledContracts"] option') + if (!contracts) { + return null + } else { + var ret = [] + for (var c = 0; c < contracts.length; c++) { + ret.push(contracts[c].value) + } + return ret + } + }, [], function (result) { + callback(result) + }) +} + +function verifyContracts (browser, compiledContractNames, opts, callback) { + getCompiledContracts(browser, opts, (result) => { + if (result.value) { + for (var contract in compiledContractNames) { + console.log(' - ' + compiledContractNames[contract], result.value) + if (result.value.indexOf(compiledContractNames[contract]) === -1) { + browser.assert.fail('compiled contract ' + compiledContractNames + ' not found', 'info about error', '') + browser.end() + return + } + } + } else { + browser.assert.fail('compiled contract ' + compiledContractNames + ' not found - none found', 'info about error', '') + browser.end() + } + console.log('contracts all found ' + compiledContractNames) + callback() + }) +} + +module.exports = VerifyContracts diff --git a/test-browser/commands/waitForElementContainsText.js b/test-browser/commands/waitForElementContainsText.js new file mode 100644 index 0000000000..b636b68a82 --- /dev/null +++ b/test-browser/commands/waitForElementContainsText.js @@ -0,0 +1,24 @@ +const EventEmitter = require('events') + +class WaitForElementContainsText extends EventEmitter { + command (id, value) { + let incr = 0 + let runid = setInterval(() => { + this.api.getText(id, (result) => { + if (value.indexOf(result.value || '') !== -1) { + clearInterval(runid) + this.api.assert.ok(true, `WaitForElementContainsText ${id} contains ${value}`) + this.emit('complete') + } else incr++ + if (incr > 50) { + clearInterval(runid) + this.api.assert.fail(`WaitForElementContainsText - expected ${value} but got ${result.value}`) + // throw new Error(`WaitForElementContainsText ${id} ${value}`) + } + }) + }, 200) + return this + } +} + +module.exports = WaitForElementContainsText diff --git a/test-browser/extensions/chrome/metamask.crx b/test-browser/extensions/chrome/metamask.crx new file mode 100644 index 0000000000..6cde846884 Binary files /dev/null and b/test-browser/extensions/chrome/metamask.crx differ diff --git a/test-browser/helpers/applytestmode.js b/test-browser/helpers/applytestmode.js new file mode 100644 index 0000000000..c97c4b7ce1 --- /dev/null +++ b/test-browser/helpers/applytestmode.js @@ -0,0 +1,13 @@ +/** + * This script is injected by NightWatch just before starting test + * + */ +console.log('applying test mode') +var editor = document.getElementById('input').editor +editor.setBehavioursEnabled(false) // disable bracket auto-match (i.e. automatic injection of closing brackets and other things), so we can enter raw source code. +editor.setOptions({ + enableBasicAutocompletion: false, + enableSnippets: false, + enableLiveAutocompletion: false +}) +console.log('test mode applied') diff --git a/test-browser/helpers/init.js b/test-browser/helpers/init.js new file mode 100644 index 0000000000..c4341a362b --- /dev/null +++ b/test-browser/helpers/init.js @@ -0,0 +1,40 @@ +require('dotenv').config() + +module.exports = function (browser, callback, url, preloadPlugins = true) { + browser + .url(url || 'http://127.0.0.1:8080') + .pause(5000) + .switchBrowserTab(0) + .injectScript('test-browser/helpers/applytestmode.js', function () { + browser.resizeWindow(2560, 1440, () => { + if (preloadPlugins) { + initModules(browser, () => { + browser.clickLaunchIcon('solidity') + .pause(2000) + .execute(() => { + document.getElementById('autoCompile').click() + }) + .perform(function () { + callback() + }) + }) + } else callback() + }) + }) +} + +function initModules (browser, callback) { + browser.pause(5000) + .click('#icon-panel div[plugin="pluginManager"]') + .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidity"] button') + .pause(5000) + .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_udapp"] button') + .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button') + .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_debugger"] button') + .scrollAndClick('#icon-panel div[plugin="fileExplorers"]') + .clickLaunchIcon('settings') + .setValue('#gistaccesstoken', process.env.gist_token) + .click('#savegisttoken') + .click('#settingsView #Flatly') // e2e tests were initially developed with Flatly. Some tests are failing with the default one (Dark), because the dark theme put uppercase everywhere. + .perform(() => { callback() }) +} diff --git a/test-browser/mockcompiler/compiler.js b/test-browser/mockcompiler/compiler.js new file mode 100644 index 0000000000..f3d0488ee6 --- /dev/null +++ b/test-browser/mockcompiler/compiler.js @@ -0,0 +1,38 @@ +'use strict' + +var Module = { // eslint-disable-line + cwrap: function () { return arguments[0] === 'version' ? version : compileStandard }, + writeStringToMemory: function () {}, + setValue: function () {}, + Pointer_stringify: function (value) { return value }, + Runtime: { + addFunction: function () { return arguments[0] }, + removeFunction: function () {} + }, + _compileJSONMulti: {}, + _compileJSONCallback: {}, + _compileJSON: {}, + _malloc: function () {}, + _compileStandard: compileStandard +} + +function compileStandard (source, missingInputs) { + source = source.replace(/(\t)|(\n)|(\\n)|( )/g, '') + var data = mockData[source] // eslint-disable-line + if (data === undefined) { + return JSON.stringify({ + errors: [{ formattedMessage: 'mock compiler: source not found', severity: 'error' }] + }) + } else { + data.missingInputs.map(function (item, i) { + if (missingInputs) { + missingInputs(item, '', '') + } + }) + } + return data.result +} + +function version () { + return mockCompilerVersion // eslint-disable-line +} diff --git a/test-browser/tests/ballot.test.js b/test-browser/tests/ballot.test.js new file mode 100644 index 0000000000..a53dd8a0e3 --- /dev/null +++ b/test-browser/tests/ballot.test.js @@ -0,0 +1,316 @@ +'use strict' +var examples = require('../../src/app/editor/example-contracts') +var init = require('../helpers/init') +var sauce = require('./sauce') + +var sources = [ + {'browser/Untitled.sol': {content: examples.ballot.content}} +] + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Deploy Ballot': function (browser) { + browser + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .clickLaunchIcon('solidity') + .testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot']) + .clickLaunchIcon('udapp') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') + .setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]') + .click('*[data-id="Deploy - transact (not payable)"]') + .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]') + .click('*[data-id="universalDappUiTitleExpander"]') + .clickFunction('delegate - transact (not payable)', {types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'}) + .testFunction('0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3', + { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3', + 'decoded input': { 'address to': '0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB' } + }) + }, + + 'Debug Ballot / delegate': function (browser) { + browser.pause(500) + .click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') + .pause(2000) + // .clickLaunchIcon('debugger') + .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + .pause(2000) + .goToVMTraceStep(79) + .pause(1000) + .checkVariableDebug('soliditystate', stateCheck) + .checkVariableDebug('soliditylocals', localsCheck) + }, + + 'Access Ballot via at address': function (browser) { + browser.clickLaunchIcon('udapp') + .click('*[data-id="universalDappUiUdappClose"]') + .addFile('ballot.abi', { content: ballotABI }) + .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) + .clickLaunchIcon('fileExplorers') + .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) + .pause(500) + .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]') + .click('*[data-id="universalDappUiTitleExpander"]') + .clickFunction('delegate - transact (not payable)', {types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'}) + .testFunction('0xca58080c8099429caeeffe43b8104df919c2c543dceb9edf9242fa55f045c803', + { + status: '0x0 Transaction mined but execution failed', + 'transaction hash': '0xca58080c8099429caeeffe43b8104df919c2c543dceb9edf9242fa55f045c803', + 'decoded input': { 'address to': '0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB' } + }) + }, + + 'Deploy and use Ballot using external web3': function (browser) { + browser + .click('*[data-id="settingsWeb3Mode"]') + .modalFooterOKClick() + .clickLaunchIcon('solidity') + .testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot']) + .clickLaunchIcon('udapp') + .setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]') + .click('*[data-id="Deploy - transact (not payable)"]') + .clickInstance(0) + .click('*[data-id="terminalClearConsole"]') + .clickFunction('delegate - transact (not payable)', {types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'}) + .journalLastChildIncludes('Ballot.delegate(address)') + .journalLastChildIncludes('data:0x5c1...a733c') + .end() + }, + + tearDown: sauce +} + +var localsCheck = { + 'to': { + 'value': '0x4B0897B0513FDC7C541B6D9D7E929C4E5364D2DB', + 'type': 'address' + } +} + +var stateCheck = { + 'chairperson': { + 'value': '0xCA35B7D915458EF540ADE6068DFE2F44E8FA733C', + 'type': 'address', + 'constant': false + }, + 'voters': { + 'value': { + '000000000000000000000000ca35b7d915458ef540ade6068dfe2f44e8fa733c': { + 'value': { + 'weight': { + 'value': '1', + 'type': 'uint256' + }, + 'voted': { + 'value': false, + 'type': 'bool' + }, + 'delegate': { + 'value': '0x0000000000000000000000000000000000000000', + 'type': 'address' + }, + 'vote': { + 'value': '0', + 'type': 'uint256' + } + }, + 'type': 'struct Ballot.Voter' + } + }, + 'type': 'mapping(address => struct Ballot.Voter)', + 'constant': false + }, + 'proposals': { + 'value': [ + { + 'value': { + 'name': { + 'value': '0x48656C6C6F20576F726C64210000000000000000000000000000000000000000', + 'type': 'bytes32' + }, + 'voteCount': { + 'value': '0', + 'type': 'uint256' + } + }, + 'type': 'struct Ballot.Proposal' + } + ], + 'length': '0x1', + 'type': 'struct Ballot.Proposal[]', + 'constant': false + } +} + +var ballotABI = `[ +{ + "inputs": [ + { + "internalType": "bytes32[]", + "name": "proposalNames", + "type": "bytes32[]" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" +}, +{ + "constant": true, + "inputs": [], + "name": "chairperson", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" +}, +{ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" +}, +{ + "constant": false, + "inputs": [ + { + "internalType": "address", + "name": "voter", + "type": "address" + } + ], + "name": "giveRightToVote", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" +}, +{ + "constant": true, + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposals", + "outputs": [ + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "voteCount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" +}, +{ + "constant": false, + "inputs": [ + { + "internalType": "uint256", + "name": "proposal", + "type": "uint256" + } + ], + "name": "vote", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" +}, +{ + "constant": true, + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "voters", + "outputs": [ + { + "internalType": "uint256", + "name": "weight", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "voted", + "type": "bool" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "internalType": "uint256", + "name": "vote", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" +}, +{ + "constant": true, + "inputs": [], + "name": "winnerName", + "outputs": [ + { + "internalType": "bytes32", + "name": "winnerName_", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" +}, +{ + "constant": true, + "inputs": [], + "name": "winningProposal", + "outputs": [ + { + "internalType": "uint256", + "name": "winningProposal_", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" +} +]` diff --git a/test-browser/tests/debugger.test.js b/test-browser/tests/debugger.test.js new file mode 100644 index 0000000000..65353b055f --- /dev/null +++ b/test-browser/tests/debugger.test.js @@ -0,0 +1,115 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + + before: function (browser, done) { + init(browser, done) + }, + + '@sources': function () { + return sources + }, + + 'Should launch debugger': function (browser) { + browser.addFile('blah.sol', sources[0]['browser/blah.sol']) + .clickLaunchIcon('udapp') + .waitForElementPresent('*[title="Deploy - transact (not payable)"]') + .click('*[title="Deploy - transact (not payable)"]') + .debugTransaction(0) + .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') + }, + + 'Should debug failing transaction': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') + .click('*[data-id="universalDappUiTitleExpander"]') + .scrollAndClick('*[title="string name, uint256 goal"]') + .setValue('*[title="string name, uint256 goal"]', '"toast", 999') + .click('*[data-id="createProject - transact (not payable)"]') + .debugTransaction(1) + .pause(2000) + .scrollAndClick('*[data-id="solidityLocals"]') + .assert.containsText('*[data-id="solidityLocals"]', 'toast') + .assert.containsText('*[data-id="solidityLocals"]', '999') + }, + + 'Should debug transaction using slider': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + .waitForElementVisible('*[data-id="slider"]') + .click('*[data-id="slider"]') + .setValue('*[data-id="slider"]', 50) + .pause(2000) + .assert.containsText('*[data-id="solidityLocals"]', 'no locals') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 92') + }, + + 'Should step back and forward transaction': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') + .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 91') + .assert.containsText('*[data-id="stepdetail"]', 'execution step: 91') + .click('*[data-id="buttonNavigatorIntoForward"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 92') + .assert.containsText('*[data-id="stepdetail"]', 'execution step: 92') + }, + + 'Should jump through breakpoints': function (browser) { + browser.waitForElementVisible('*[data-id="editorInput"]') + .click('.ace_gutter-cell:nth-of-type(10)') + .click('.ace_gutter-cell:nth-of-type(20)') + .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 0') + .assert.containsText('*[data-id="stepdetail"]', 'execution step: 0') + .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step: 140') + .assert.containsText('*[data-id="stepdetail"]', 'execution step: 140') + .end() + }, + + tearDown: sauce +} + +var sources = [ + { + 'browser/blah.sol': { + content: ` + pragma solidity >=0.4.22 <0.6.0; + + contract Kickstarter { + + enum State { Started, Completed } + + struct Project { + address owner; + string name; + uint goal; + State state; + } + + Project[] public projects; + + constructor() public { + + } + + function createProject(string memory name, uint goal) public { + Project storage project = projects[projects.length]; + project.name = name; + project.owner = msg.sender; + project.state = State.Started; + project.goal = goal; + } + } + ` + } + } +] diff --git a/test-browser/tests/defaultLayout.test.js b/test-browser/tests/defaultLayout.test.js new file mode 100644 index 0000000000..f4857c7f86 --- /dev/null +++ b/test-browser/tests/defaultLayout.test.js @@ -0,0 +1,78 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done, 'http://127.0.0.1:8080', false) + }, + 'Loads Icon\'s Panel': function (browser) { + browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000) + .waitForElementVisible('div[data-id="verticalIconsHomeIcon"]') + .waitForElementVisible('div[plugin="fileExplorers"]') + .waitForElementVisible('div[plugin="pluginManager"]') + .waitForElementVisible('div[plugin="settings"]') + }, + + 'Loads Side Panel': function (browser) { + browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') + .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') + .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') + .waitForElementVisible('li[key="browser/4_Ballot_test.sol"]') + }, + + 'Loads Main View': function (browser) { + browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]') + .waitForElementVisible('div[data-id="landingPageHomeContainer"]') + .waitForElementVisible('div[data-id="landingPageHpSections"]') + .waitForElementVisible('div[data-id="terminalContainer"]') + }, + + 'Loads terminal': function (browser) { + browser + .waitForElementVisible('div[data-id="terminalCli"]', 10000) + .journalLastChildIncludes('Welcome to Remix') + }, + + 'Toggles Side Panel': function (browser) { + browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') + .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') + .clickLaunchIcon('fileExplorers') + .assert.hidden('div[data-id="remixIdeSidePanel"]') + .clickLaunchIcon('fileExplorers') + .assert.visible('div[data-id="remixIdeSidePanel"]') + .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') + }, + + 'Toggles Terminal': function (browser) { + browser.waitForElementVisible('div[data-id="terminalContainer"]') + .assert.visible('div[data-id="terminalContainerDisplay"]') + .click('i[data-id="terminalToggleIcon"]') + .checkElementStyle('div[data-id="terminalToggleMenu"]', 'height', '35px') + .click('i[data-id="terminalToggleIcon"]') + .assert.visible('div[data-id="terminalContainerDisplay"]') + }, + + 'Toggles File Explorer Browser': function (browser) { + browser + .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') + .assert.visible('ul[key="browser"]') + .click('div[data-id="treeViewTogglebrowser"]') + .assert.hidden('ul[key="browser"]') + .click('div[data-id="treeViewTogglebrowser"]') + .assert.visible('ul[key="browser"]') + }, + + 'Switch Tabs using tabs icon': function (browser) { + browser + .waitForElementVisible('div[data-id="filePanelFileExplorerTree"]') + .openFile('browser/3_Ballot.sol') + .assert.containsText('div[title="browser/3_Ballot.sol"]', '3_Ballot.sol') + .click('span[class^=dropdownCaret]') + .click('#homeItem') + .assert.containsText('div[title="home"]', 'Home') + .end() + }, + + tearDown: sauce +} diff --git a/test-browser/tests/editor.test.js b/test-browser/tests/editor.test.js new file mode 100644 index 0000000000..de926370d7 --- /dev/null +++ b/test-browser/tests/editor.test.js @@ -0,0 +1,197 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') + +module.exports = { + + before: function (browser, done) { + init(browser, done) + }, + + 'Should zoom in editor': function (browser) { + browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]') + .openFile('browser/1_Storage.sol') + .waitForElementVisible('*[data-id="editorInput"]') + .checkElementStyle('*[data-id="editorInput"]', 'font-size', '12px') + .click('*[data-id="tabProxyZoomIn"]') + .click('*[data-id="tabProxyZoomIn"]') + .checkElementStyle('*[data-id="editorInput"]', 'font-size', '14px') + }, + + 'Should zoom out editor': function (browser) { + browser.waitForElementVisible('*[data-id="editorInput"]') + .checkElementStyle('*[data-id="editorInput"]', 'font-size', '14px') + .click('*[data-id="tabProxyZoomOut"]') + .click('*[data-id="tabProxyZoomOut"]') + .checkElementStyle('*[data-id="editorInput"]', 'font-size', '12px') + }, + + 'Should display compile error in editor': function (browser) { + browser.waitForElementVisible('*[data-id="editorInput"]') + .waitForElementVisible('*[class="ace_content"]') + .click('*[class="ace_content"]') + .sendKeys('*[class="ace_text-input"]', 'error') + .pause(2000) + .waitForElementVisible('.ace_error') + }, + + 'Should minimize and maximize codeblock in editor': function (browser) { + browser.waitForElementVisible('*[data-id="editorInput"]') + .waitForElementVisible('.ace_open') + .click('.ace_start:nth-of-type(1)') + .waitForElementVisible('.ace_closed') + .click('.ace_start:nth-of-type(1)') + .waitForElementVisible('.ace_open') + }, + + 'Should add breakpoint to editor': function (browser) { + browser.waitForElementVisible('*[data-id="editorInput"]') + .waitForElementNotPresent('.ace_breakpoint') + .click('.ace_gutter-cell:nth-of-type(1)') + .waitForElementVisible('.ace_breakpoint') + }, + + 'Should load syntax highlighter for ace light theme': function (browser) { + browser.waitForElementVisible('*[data-id="editorInput"]') + .checkElementStyle('.ace_keyword', 'color', aceThemes.light.keyword) + .checkElementStyle('.ace_comment.ace_doc', 'color', aceThemes.light.comment) + .checkElementStyle('.ace_function', 'color', aceThemes.light.function) + .checkElementStyle('.ace_variable', 'color', aceThemes.light.variable) + }, + + 'Should load syntax highlighter for ace dark theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') + .click('*[data-id="verticalIconsKindsettings"]') + .waitForElementVisible('*[data-id="settingsTabThemeDark"]') + .click('*[data-id="settingsTabThemeDark"]') + .pause(2000) + .waitForElementVisible('*[data-id="editorInput"]') + .checkElementStyle('.ace_keyword', 'color', aceThemes.dark.keyword) + .checkElementStyle('.ace_comment.ace_doc', 'color', aceThemes.dark.comment) + .checkElementStyle('.ace_function', 'color', aceThemes.dark.function) + .checkElementStyle('.ace_variable', 'color', aceThemes.dark.variable) + }, + + 'Should highlight source code': function (browser) { + browser.addFile('sourcehighlight.js', sourcehighlightScript) + .openFile('browser/sourcehighlight.js') + .executeScript('remix.exeCurrent()') + .editorScroll('down', 60) + .waitForElementPresent('.highlightLine32') + .checkElementStyle('.highlightLine32', 'background-color', 'rgb(8, 108, 181)') + .waitForElementPresent('.highlightLine40') + .checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)') + .waitForElementPresent('.highlightLine50') + .checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)') + }, + + 'Should remove 1 highlight from source code': function (browser) { + browser.addFile('removeSourcehighlightScript.js', removeSourcehighlightScript) + .openFile('browser/removeSourcehighlightScript.js') + .executeScript('remix.exeCurrent()') + .openFile('browser/3_Ballot.sol') + .editorScroll('down', 60) + .waitForElementNotPresent('.highlightLine32') + .checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)') + .checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)') + }, + + 'Should remove all highlights from source code': function (browser) { + browser.addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript) + .openFile('browser/removeAllSourcehighlightScript.js') + .executeScript('remix.exeCurrent()') + .openFile('browser/3_Ballot.sol') + .editorScroll('down', 60) + .waitForElementNotPresent('.highlightLine32') + .waitForElementNotPresent('.highlightLine40') + .waitForElementNotPresent('.highlightLine50') + .end() + }, + + tearDown: sauce +} + +var aceThemes = { + light: { + keyword: 'rgb(147, 15, 128)', + comment: 'rgb(35, 110, 36)', + function: 'rgb(0, 0, 162)', + variable: 'rgb(253, 151, 31)' + }, + dark: { + keyword: 'rgb(0, 105, 143)', + comment: 'rgb(85, 85, 85)', + function: 'rgb(0, 174, 239)', + variable: 'rgb(153, 119, 68)' + } +} + +const sourcehighlightScript = { + content: ` + (async () => { + try { + const pos = { + start: { + line: 32, + column: 3 + }, + end: { + line: 32, + column: 20 + } + } + await remix.call('editor', 'highlight', pos, 'browser/3_Ballot.sol') + + const pos2 = { + start: { + line: 40, + column: 3 + }, + end: { + line: 40, + column: 20 + } + } + await remix.call('editor', 'highlight', pos2, 'browser/3_Ballot.sol') + + const pos3 = { + start: { + line: 50, + column: 3 + }, + end: { + line: 50, + column: 20 + } + } + await remix.call('editor', 'highlight', pos3, 'browser/3_Ballot.sol') + } catch (e) { + console.log(e.message) + } + })() + ` +} + +const removeSourcehighlightScript = { + content: ` + (async () => { + try { + await remix.call('editor', 'discardHighlightAt', 32, 'browser/3_Ballot.sol') + } catch (e) { + console.log(e.message) + } + })() + ` +} + +const removeAllSourcehighlightScript = { + content: ` + (async () => { + try { + await remix.call('editor', 'discardHighlight') + } catch (e) { + console.log(e.message) + } + })() + ` +} diff --git a/test-browser/tests/fileExplorer.test.js b/test-browser/tests/fileExplorer.test.js new file mode 100644 index 0000000000..c39fb9ff04 --- /dev/null +++ b/test-browser/tests/fileExplorer.test.js @@ -0,0 +1,115 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') +const path = require('path') +const testData = { + testFile1: path.resolve(__dirname + '/editor.test.js'), // eslint-disable-line + testFile2: path.resolve(__dirname + '/fileExplorer.test.js'), // eslint-disable-line + testFile3: path.resolve(__dirname + '/generalSettings.test.js') // eslint-disable-line +} + +module.exports = { + + before: function (browser, done) { + init(browser, done) + }, + + 'Should create a new file `5_New_contract.sol` in file explorer': function (browser) { + browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') + .clickLaunchIcon('fileExplorers') + .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORERS') + .click('*[data-id="fileExplorerNewFilecreateNewFile"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .setValue('*[data-id="modalDialogCustomPromptText"]', '5_New_contract.sol') + .modalFooterOKClick() + .pause(2000) + .waitForElementVisible('*[data-id="treeViewLibrowser/5_New_contract.sol"]') + }, + + 'Should rename `5_New_contract.sol` to 5_Renamed_Contract.sol': function (browser) { + browser + .waitForElementVisible('*[data-id="treeViewLibrowser/5_New_contract.sol"]') + .rightClick('[data-path="browser/5_New_contract.sol"]') + .click('*[id="menuitemrename"]') + .sendKeys('[data-path="browser/5_New_contract.sol"]', '5_Renamed_Contract.sol') + .sendKeys('[data-path="browser/5_New_contract.sol"]', browser.Keys.ENTER) + .keys() + .waitForElementVisible('*[data-id="treeViewLibrowser/5_Renamed_Contract.sol"]') + }, + + 'Should delete file `5_Renamed_Contract.sol` from file explorer': function (browser) { + browser + .waitForElementVisible('*[data-id="treeViewLibrowser/5_Renamed_Contract.sol"]') + .rightClick('[data-path="browser/5_Renamed_Contract.sol"]') + .click('*[id="menuitemdelete"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .modalFooterOKClick() + .waitForElementNotPresent('*[data-id="treeViewLibrowser/5_Renamed_Contract.sol"') + }, + + 'Should create a new folder': function (browser) { + browser + .waitForElementVisible('*[data-id="treeViewLibrowser/1_Storage.sol"]') + .rightClick('[data-path="browser/1_Storage.sol"]') + .click('*[id="menuitemcreate folder"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .setValue('*[data-id="modalDialogCustomPromptText"]', 'Browser_Tests') + .modalFooterOKClick() + .waitForElementVisible('*[data-id="treeViewLibrowser/Browser_Tests"]') + }, + + 'Should rename Browser_Tests folder to Browser_E2E_Tests': function (browser) { + browser + .waitForElementVisible('*[data-id="treeViewLibrowser/Browser_Tests"]') + .rightClick('[data-path="browser/Browser_Tests"]') + .click('*[id="menuitemrename"]') + .sendKeys('[data-path="browser/Browser_Tests"]', 'Browser_E2E_Tests') + .sendKeys('[data-path="browser/Browser_Tests"]', browser.Keys.ENTER) + .waitForElementVisible('*[data-id="treeViewLibrowser/Browser_E2E_Tests"]') + }, + + 'Should delete Browser_E2E_Tests folder': function (browser) { + browser + .waitForElementVisible('*[data-id="treeViewLibrowser/Browser_E2E_Tests"]') + .rightClick('[data-path="browser/Browser_E2E_Tests"]') + .click('*[id="menuitemdelete"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .modalFooterOKClick() + .waitForElementNotPresent('*[data-id="treeViewLibrowser/Browser_E2E_Tests"]') + }, + + 'Should publish all explorer files to github gist': function (browser) { + const runtimeBrowser = browser.capabilities.browserName + + browser + .waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]') + .click('*[data-id="fileExplorerNewFilepublishToGist"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .modalFooterOKClick() + .pause(10000) + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .modalFooterOKClick() + .pause(2000) + .perform((done) => { + if (runtimeBrowser === 'chrome') { + browser.switchBrowserTab(1) + .assert.urlContains('https://gist.github.com') + .switchBrowserTab(0) + } + done() + }) + }, + + 'Should open local filesystem explorer': function (browser) { + browser.waitForElementVisible('*[data-id="filePanelFileExplorerTree"]') + .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile1) + .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile2) + .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile3) + .waitForElementVisible('*[key="browser/editor.test.js"]') + .waitForElementVisible('*[key="browser/fileExplorer.test.js"]') + .waitForElementVisible('*[key="browser/generalSettings.test.js"]') + .end() + }, + + tearDown: sauce +} diff --git a/test-browser/tests/generalSettings.test.js b/test-browser/tests/generalSettings.test.js new file mode 100644 index 0000000000..2e43472769 --- /dev/null +++ b/test-browser/tests/generalSettings.test.js @@ -0,0 +1,356 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done, 'http://127.0.0.1:8080', false) + }, + + 'Should display settings menu': function (browser) { + browser.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .click('*[data-id="landingPageStartSolidity"]') + .waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="verticalIconsKindsettings"]') + .waitForElementContainsText('h6[data-id="sidePanelSwapitTitle"]', 'SETTINGS') + }, + + 'Should open gitter channel in a new tab when `Gitter Channel Button` is clicked': function (browser) { + const runtimeBrowser = browser.capabilities.browserName + + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') + .waitForElementVisible('*[data-id="settingsTabGitterChannelButton"]', 5000) + .click('*[data-id="settingsTabGitterChannelButton"]') + .pause(2000) + .perform((done) => { if (runtimeBrowser === 'chrome') { browser.switchBrowserTab(1).assert.urlContains('https://gitter.im/ethereum/remix') } done() }) + }, + + 'Should activate `generate contract metadata`': function (browser) { + browser.switchBrowserTab(0) + .waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) + .waitForElementVisible('*[data-id="settingsTabGenerateContractMetadata"]', 5000) + .click('*[data-id="settingsTabGenerateContractMetadata"]') + .click('*[data-id="verticalIconsFileExplorerIcons"]') + .openFile('browser/3_Ballot.sol') + .click('*[data-id="verticalIconsKindsolidity"]') + .pause(2000) + .click('*[data-id="compilerContainerCompileBtn"]') + .pause(3000) + .click('*[data-id="verticalIconsKindfileExplorers"]') + .openFile('browser/artifacts') + .openFile('browser/artifacts/Ballot.json') + }, + + 'Should add new github access token': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="verticalIconsKindsettings"]') + .setValue('*[data-id="settingsTabGistAccessToken"]', '**********') + .click('*[data-id="settingsTabSaveGistToken"]') + .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000) + .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token saved') + .click('*[data-id="tooltipCloseButton"]') + }, + + 'Should copy github access token to clipboard': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="copyToClipboardCopyIcon"]') + .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000) + .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Copied value to clipboard.') + .click('*[data-id="tooltipCloseButton"]') + }, + + 'Should remove github access token': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabRemoveGistToken"]') + .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000) + .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token removed') + .assert.containsText('*[data-id="settingsTabGistAccessToken"]', '') + .click('*[data-id="tooltipCloseButton"]') + }, + + 'Should load dark theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeDark"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.dark.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.dark.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.dark.success) + .checkElementStyle(':root', '--info', remixIdeThemes.dark.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.dark.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.dark.danger) + }, + + 'Should load light theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeLight"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.light.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.light.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.light.success) + .checkElementStyle(':root', '--info', remixIdeThemes.light.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.light.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.light.danger) + }, + + 'Should load Cerulean theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeCerulean"]') + .pause(5000) + .checkElementStyle(':root', '--primary', remixIdeThemes.curelean.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.curelean.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.curelean.success) + .checkElementStyle(':root', '--info', remixIdeThemes.curelean.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.curelean.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.curelean.danger) + }, + + 'Should load Flatly theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeFlatly"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.flatly.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.flatly.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.flatly.success) + .checkElementStyle(':root', '--info', remixIdeThemes.flatly.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.flatly.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.flatly.danger) + }, + + 'Should load Lumen theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeLumen"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.lumen.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.lumen.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.lumen.success) + .checkElementStyle(':root', '--info', remixIdeThemes.lumen.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.lumen.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.lumen.danger) + }, + + 'Should load Minty theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeMinty"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.minty.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.minty.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.minty.success) + .checkElementStyle(':root', '--info', remixIdeThemes.minty.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.minty.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.minty.danger) + }, + + 'Should load Pulse theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemePulse"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.pulse.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.pulse.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.pulse.success) + .checkElementStyle(':root', '--info', remixIdeThemes.pulse.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.pulse.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.pulse.danger) + }, + + 'Should load Sandstone theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeSandstone"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.sandstone.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.sandstone.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.sandstone.success) + .checkElementStyle(':root', '--info', remixIdeThemes.sandstone.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.sandstone.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.sandstone.danger) + }, + + 'Should load Spacelab theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeSpacelab"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.spacelab.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.spacelab.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.spacelab.success) + .checkElementStyle(':root', '--info', remixIdeThemes.spacelab.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.spacelab.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.spacelab.danger) + }, + + 'Should load Yeti theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeYeti"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.yeti.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.yeti.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.yeti.success) + .checkElementStyle(':root', '--info', remixIdeThemes.yeti.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.yeti.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.yeti.danger) + }, + + 'Should load Cyborg theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeCyborg"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.cyborg.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.cyborg.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.cyborg.success) + .checkElementStyle(':root', '--info', remixIdeThemes.cyborg.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.cyborg.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.cyborg.danger) + }, + + 'Should load Darkly theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeDarkly"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.darkly.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.darkly.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.darkly.success) + .checkElementStyle(':root', '--info', remixIdeThemes.darkly.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.darkly.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.darkly.danger) + }, + + 'Should load Slate theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeSlate"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.slate.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.slate.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.slate.success) + .checkElementStyle(':root', '--info', remixIdeThemes.slate.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.slate.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.slate.danger) + }, + + 'Should load Superhero theme': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) + .click('*[data-id="settingsTabThemeSuperhero"]') + .pause(2000) + .checkElementStyle(':root', '--primary', remixIdeThemes.superhero.primary) + .checkElementStyle(':root', '--secondary', remixIdeThemes.superhero.secondary) + .checkElementStyle(':root', '--success', remixIdeThemes.superhero.success) + .checkElementStyle(':root', '--info', remixIdeThemes.superhero.info) + .checkElementStyle(':root', '--warning', remixIdeThemes.superhero.warning) + .checkElementStyle(':root', '--danger', remixIdeThemes.superhero.danger) + .end() + }, + + tearDown: sauce +} + +var remixIdeThemes = { + dark: { + primary: '#007aa6', + secondary: '#595c76', + success: '#32ba89', + info: '#086CB5', + warning: '#c97539', + danger: '#b84040' + }, + light: { + primary: '#007aa6', + secondary: '#a8b3bc', + success: '#32ba89', + info: '#007aa6', + warning: '#c97539', + danger: '#b84040' + }, + curelean: { + primary: '#2FA4E7', + secondary: '#e9ecef', + success: '#73A839', + info: '#033C73', + warning: '#DD5600', + danger: '#C71C22' + }, + flatly: { + primary: '#2C3E50', + secondary: '#95a5a6', + success: '#18BC9C', + info: '#3498DB', + warning: '#F39C12', + danger: '#E74C3C' + }, + lumen: { + primary: '#158CBA', + secondary: '#f0f0f0', + success: '#28B62C', + info: '#75CAEB', + warning: '#FF851B', + danger: '#FF4136' + }, + minty: { + primary: '#78C2AD', + secondary: '#F3969A', + success: '#56CC9D', + info: '#6CC3D5', + warning: '#FFCE67', + danger: '#FF7851' + }, + pulse: { + primary: '#593196', + secondary: '#A991D4', + success: '#13B955', + info: '#009CDC', + warning: '#EFA31D', + danger: '#FC3939' + }, + sandstone: { + primary: '#325D88', + secondary: '#8E8C84', + success: '#93C54B', + info: '#29ABE0', + warning: '#F47C3C', + danger: '#d9534f' + }, + spacelab: { + primary: '#446E9B', + secondary: '#999', + success: '#3CB521', + info: '#3399F3', + warning: '#D47500', + danger: '#CD0200' + }, + yeti: { + primary: '#008cba', + secondary: '#eee', + success: '#43ac6a', + info: '#5bc0de', + warning: '#E99002', + danger: '#F04124' + }, + cyborg: { + primary: '#2A9FD6', + secondary: '#555', + success: '#77B300', + info: '#9933CC', + warning: '#FF8800', + danger: '#CC0000' + }, + darkly: { + primary: '#375a7f', + secondary: '#444', + success: '#00bc8c', + info: '#3498DB', + warning: '#F39C12', + danger: '#E74C3C' + }, + slate: { + primary: '#3A3F44', + secondary: '#7A8288', + success: '#62c462', + info: '#5bc0de', + warning: '#f89406', + danger: '#ee5f5b' + }, + superhero: { + primary: '#DF691A', + secondary: '#4E5D6C', + success: '#5cb85c', + info: '#5bc0de', + warning: '#f0ad4e', + danger: '#d9534f' + } +} diff --git a/test-browser/tests/gist.test.js b/test-browser/tests/gist.test.js new file mode 100644 index 0000000000..5c01f6f5a9 --- /dev/null +++ b/test-browser/tests/gist.test.js @@ -0,0 +1,97 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') +const testData = { + validGistId: '1859c97c6e1efc91047d725d5225888e', + invalidGistId: '6368b389f9302v32902msk2402' +} +// 99266d6da54cc12f37f11586e8171546c7700d67 + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + 'UploadToGists': function (browser) { + /* + - set the access token + - publish to gist + - retrieve the gist + - switch to a file in the new gist + */ + console.log('token', process.env.gist_token) + const runtimeBrowser = browser.capabilities.browserName + + browser + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .clickLaunchIcon('fileExplorers') + .rightClick('[data-path="browser/1_Storage.sol"]') + .click('*[id="menuitemcreate folder"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .setValue('*[data-id="modalDialogCustomPromptText"]', 'Browser_Tests') + .modalFooterOKClick() + .waitForElementVisible('*[data-id="treeViewLibrowser/Browser_Tests"]') + .addFile('File.sol', { content: '' }) + .click('*[data-id="fileExplorerNewFilepublishToGist"]') + .modalFooterOKClick() + .getModalBody((value, done) => { + const reg = /gist.github.com\/([^.]+)/ + const id = value.match(reg) + console.log('gist regex', id) + if (!id) { + browser.assert.fail('cannot get the gist id', '', '') + } else { + let gistid = id[1] + browser + .modalFooterCancelClick() + .executeScript(`remix.loadgist('${gistid}')`) + .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('browser/gists') } done() }) + .openFile(`browser/gists/${gistid}`) + .openFile(`browser/gists/${gistid}/1_Storage.sol`) + .perform(done) + } + }) + }, + + 'Load Gist Modal': function (browser) { + browser.clickLaunchIcon('home') + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .clickLaunchIcon('fileExplorers') + .scrollAndClick('*[data-id="landingPageImportFromGistButton"]') + .waitForElementVisible('*[data-id="modalDialogModalTitle"]') + .assert.containsText('*[data-id="modalDialogModalTitle"]', 'Load a Gist') + .waitForElementVisible('*[data-id="modalDialogModalBody"]') + .assert.containsText('*[data-id="modalDialogModalBody"]', 'Enter the ID of the Gist or URL you would like to load.') + .waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') + .modalFooterCancelClick() + }, + + 'Display Error Message For Invalid Gist ID': function (browser) { + browser + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .clickLaunchIcon('fileExplorers') + .scrollAndClick('*[data-id="landingPageImportFromGistButton"]') + .waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') + .setValue('*[data-id="modalDialogCustomPromptText"]', testData.invalidGistId) + .modalFooterOKClick() + .waitForElementVisible('*[data-id="modalDialogModalBody"]') + .assert.containsText('*[data-id="modalDialogModalBody"]', 'Gist load error: Not Found') + .modalFooterOKClick() + }, + + 'Import From Gist For Valid Gist ID': function (browser) { + browser + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .clickLaunchIcon('fileExplorers') + .scrollAndClick('*[data-id="landingPageImportFromGistButton"]') + .waitForElementVisible('*[data-id="modalDialogCustomPromptText"]') + .setValue('*[data-id="modalDialogCustomPromptText"]', testData.validGistId) + .modalFooterOKClick() + .openFile(`browser/gists/${testData.validGistId}`) + .openFile(`browser/gists/${testData.validGistId}/ApplicationRegistry`) + .waitForElementVisible(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry']`) + .assert.containsText(`div[title='browser/gists/${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry') + .end() + }, + + tearDown: sauce +} diff --git a/test-browser/tests/libraryDeployment.test.js b/test-browser/tests/libraryDeployment.test.js new file mode 100644 index 0000000000..463dc47d65 --- /dev/null +++ b/test-browser/tests/libraryDeployment.test.js @@ -0,0 +1,118 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Add Lib Test File': function (browser) { + browser.addFile('Untitled5.sol', sources[0]['browser/Untitled5.sol']) + .clickLaunchIcon('udapp') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite + }, + 'Test Auto Deploy Lib': function (browser) { + let addressRef + browser.verifyContracts(['test']) + .selectContract('test') + .createContract('') + .getAddressAtPosition(0, (address) => { + console.log('testAutoDeployLib ' + address) + addressRef = address + }) + .waitForElementPresent('.instance:nth-of-type(2)') + .click('.instance:nth-of-type(2) > div > button') + .perform((done) => { + browser.testConstantFunction(addressRef, 'get - call', '', '0: uint256: 45').perform(() => { + done() + }) + }) + }, + 'Test Manual Deploy Lib': function (browser) { + console.log('testManualDeployLib') + browser.click('*[data-id="deployAndRunClearInstances"]') + .pause(5000) + .clickLaunchIcon('settings') + .click('#generatecontractmetadata') + .clickLaunchIcon('solidity') + .click('#compileTabView button[title="Compile"]') // that should generate the JSON artefact + .verifyContracts(['test']) + .selectContract('lib') // deploy lib + .createContract('') + .perform((done) => { + browser.getAddressAtPosition(0, (address) => { + console.log(address) + checkDeployShouldFail(browser, () => { + checkDeployShouldSucceed(browser, address, () => { + done() + }) + }) + }) + }) + .end() + }, + tearDown: sauce +} + +function checkDeployShouldFail (browser, callback) { + let config + browser.openFile('browser/artifacts').openFile('browser/artifacts/test.json') + .getEditorValue((content) => { + config = JSON.parse(content) + config.deploy['VM:-'].autoDeployLib = false + }) + .perform(() => { + browser.setEditorValue(JSON.stringify(config)) + }) + .openFile('browser/Untitled5.sol') + .selectContract('test') // deploy lib + .createContract('') + .assert.containsText('div[class^="terminal"]', '
    is not a valid address') + .perform(() => { callback() }) +} + +function checkDeployShouldSucceed (browser, address, callback) { + let addressRef + let config + browser.openFile('browser/artifacts').openFile('browser/artifacts/test.json') + .getEditorValue((content) => { + config = JSON.parse(content) + config.deploy['VM:-'].autoDeployLib = false + config.deploy['VM:-']['linkReferences']['browser/Untitled5.sol'].lib = address + }) + .perform(() => { + browser.setEditorValue(JSON.stringify(config)) + }) + .openFile('browser/Untitled5.sol') + .selectContract('test') // deploy lib + .createContract('') + .getAddressAtPosition(1, (address) => { + addressRef = address + }) + .waitForElementPresent('.instance:nth-of-type(3)') + .click('.instance:nth-of-type(3) > div > button') + .perform(() => { + browser + .testConstantFunction(addressRef, 'get - call', '', '0: uint256: 45') + .perform(() => { callback() }) + }) +} + +var sources = [ + { + 'browser/Untitled5.sol': {content: `library lib { + function getInt () public view returns (uint) { + return 45; + } + } + + contract test { + function get () public view returns (uint) { + return lib.getInt(); + } + }`} + } +] diff --git a/test-browser/tests/pluginManager.test.js b/test-browser/tests/pluginManager.test.js new file mode 100644 index 0000000000..e374d65c69 --- /dev/null +++ b/test-browser/tests/pluginManager.test.js @@ -0,0 +1,150 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') +const testData = { + pluginName: 'remixIde', + pluginDisplayName: 'Remix IDE', + pluginUrl: 'https://remix-project.org/' +} + +module.exports = { + before: function (browser, done) { + init(browser, done, 'http://127.0.0.1:8080', false) + }, + + 'Should Load Plugin Manager': function (browser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') + .pause(3000) + .click('*[plugin="pluginManager"]') + .waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'PLUGIN MANAGER') + }, + + 'Should Search for plugins': function (browser) { + browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .click('*[data-id="pluginManagerComponentSearchInput"]') + .keys('debugger') + .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]') + .clearValue('*[data-id="pluginManagerComponentSearchInput"]') + .click('*[data-id="pluginManagerComponentSearchInput"]') + .keys('Deploy & run transactions') + .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonudapp"]') + .clearValue('*[data-id="pluginManagerComponentSearchInput"]') + .click('*[data-id="pluginManagerComponentSearchInput"]') + .keys('ZoKrates') + .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonZoKrates"]') + .clearValue('*[data-id="pluginManagerComponentSearchInput"]') + .click('*[data-id="pluginManagerComponentSearchInput"]') + .keys(browser.Keys.ENTER) + }, + + 'Should activate plugins': function (browser) { + browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .click('*[data-id="pluginManagerComponentPluginManager"]') + .scrollAndClick('*[data-id="pluginManagerComponentActivateButtondebugger"]') + .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') + .scrollAndClick('*[data-id="pluginManagerComponentActivateButtonudapp"]') + .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonudapp"]') + .scrollAndClick('*[data-id="pluginManagerComponentActivateButtonZoKrates"]') + .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonZoKrates"]') + }, + + 'Should deactivate plugins': function (browser) { + browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .click('*[data-id="pluginManagerComponentPluginManager"]') + .scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') + .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]') + .scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtonudapp"]') + .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonudapp"]') + }, + + /* + 'Should grant plugin permission (ZOKRATES)': function (browser) { + browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .click('*[data-id="pluginManagerPermissionsButton"]') + .waitForElementVisible('*[data-id="pluginManagerSettingsPermissionForm"]') + .assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet') + .modalFooterOKClick() + .click('*[data-id="verticalIconsFileExplorerIcons"]') + .openFile('browser/3_Ballot.sol') + .click('*[plugin="ZoKrates"]') + .pause(5000) + .frame(0) + .useXpath().click("//span[text()='Compile']") + .pause(2000) + .frameParent() + .useCss().waitForElementVisible('*[data-id="modalDialogContainer"]') + .assert.containsText('*[data-id="permissionHandlerMessage"]', 'ZOKRATES" WOULD LIKE TO ACCESS "FILE MANAGER" :') + .pause(2000) + .click('*[data-id="permissionHandlerRememberChoice"]') + .pause(2000) + .modalFooterOKClick() + }, + + 'Should revert plugin permission (ZOKRATES)': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsSettingsIcons"]') + .click('*[data-id="verticalIconsSettingsIcons"]') + .waitForElementVisible('*[data-id="pluginManagerPermissionsButton"]') + .click('*[data-id="pluginManagerPermissionsButton"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .click('*[data-id="pluginManagerSettingsPermissionForm"]') + .pause(2000) + .click('*[data-id="pluginManagerSettingsClearAllPermission"]') + .pause(2000) + .assert.containsText('*[data-id="pluginManagerSettingsPermissionForm"]', 'No Permission requested yet') + .modalFooterOKClick() + }, + */ + + 'Should connect a local plugin': function (browser) { + browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .click('*[data-id="pluginManagerComponentPluginSearchButton"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .click('*[data-id="modalDialogModalBody"]') + .setValue('*[data-id="localPluginName"]', testData.pluginName) + .setValue('*[data-id="localPluginDisplayName"]', testData.pluginDisplayName) + .setValue('*[data-id="localPluginUrl"]', testData.pluginUrl) + .click('*[data-id="localPluginRadioButtoniframe"]') + .click('*[data-id="localPluginRadioButtonsidePanel"]') + .click('*[data-id="modalDialogModalFooter"]') + .modalFooterOKClick() + .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonremixIde"]') + }, + + 'Should display error message for creating already existing plugin': function (browser) { + browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .click('*[data-id="pluginManagerComponentPluginSearchButton"]') + .waitForElementVisible('*[data-id="modalDialogContainer"]') + .click('*[data-id="modalDialogModalBody"]') + .clearValue('*[data-id="localPluginName"]').setValue('*[data-id="localPluginName"]', testData.pluginName) + .clearValue('*[data-id="localPluginDisplayName"]').setValue('*[data-id="localPluginDisplayName"]', testData.pluginDisplayName) + .clearValue('*[data-id="localPluginUrl"]').setValue('*[data-id="localPluginUrl"]', testData.pluginUrl) + .click('*[data-id="localPluginRadioButtoniframe"]') + .click('*[data-id="localPluginRadioButtonsidePanel"]') + .click('*[data-id="modalDialogModalFooter"]') + .modalFooterOKClick() + .pause(5000) + .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)') + .pause(2000) + .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Cannot create Plugin : This name has already been used') + }, + + 'Should load back installed plugins after reload': function (browser) { + browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') + .getInstalledPlugins((plugins) => { + browser.refresh() + .waitForElementVisible('*[data-id="remixIdeSidePanel"]') + .pause(3000) + .perform((done) => { + plugins.forEach(plugin => { + if (plugin !== testData.pluginName) { + browser.waitForElementVisible(`[plugin="${plugin}"`) + } + }) + done() + }) + }) + .end() + }, + tearDown: sauce +} diff --git a/test-browser/tests/publishContract.test.js b/test-browser/tests/publishContract.test.js new file mode 100644 index 0000000000..eab1d26fdb --- /dev/null +++ b/test-browser/tests/publishContract.test.js @@ -0,0 +1,59 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return [] + }, + 'Publish on IPFS': function (browser) { + browser + .waitForElementVisible('#icon-panel', 10000) + .clickLaunchIcon('fileExplorers') + .openFile('browser/3_Ballot.sol') + .verifyContracts(['Ballot']) + .click('#publishOnIpfs') + .getModalBody((value, done) => { + if (value.indexOf('Metadata of "ballot" was published successfully.') === -1) browser.assert.fail('ipfs deploy failed', '', '') + if (value.indexOf('dweb:/ipfs') === -1) browser.assert.fail('ipfs deploy failed', '', '') + done() + }) + .modalFooterOKClick() + }, + 'Publish on Swarm': '' + function (browser) { + browser + .click('#publishOnSwarm') + .getModalBody((value, done) => { + if (value.indexOf('Metadata of "ballot" was successfully.') === -1) browser.assert.fail('swarm deploy failed', '', '') + if (value.indexOf('bzz') === -1) browser.assert.fail('swarm deploy failed', '', '') + done() + }) + .modalFooterOKClick() + }, + 'Should publish contract metadata to ipfs on deploy': function (browser) { + browser + .waitForElementVisible('#icon-panel') + .clickLaunchIcon('fileExplorers') + .openFile('browser/1_Storage.sol') + .clickLaunchIcon('udapp') + .waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]') + .click('*[data-id="contractDropdownIpfsCheckbox"]') + .click('*[data-id="Deploy - transact (not payable)"]') + .pause(5000) + .assert.containsText('*[data-id="modalDialogModalBody"]', 'Metadata of "storage" was published successfully.') + .modalFooterOKClick() + }, + 'Should remember choice after page refresh': function (browser) { + browser + .refresh() + .openFile('browser/1_Storage.sol') + .clickLaunchIcon('udapp') + .waitForElementVisible('*[data-id="contractDropdownIpfsCheckbox"]') + .verify.elementPresent('*[data-id="contractDropdownIpfsCheckbox"]:checked') + .end() + }, + tearDown: sauce +} diff --git a/test-browser/tests/recorder.test.js b/test-browser/tests/recorder.test.js new file mode 100644 index 0000000000..5d5df359ef --- /dev/null +++ b/test-browser/tests/recorder.test.js @@ -0,0 +1,297 @@ +'use strict' +var sauce = require('./sauce') +var init = require('../helpers/init') + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Test Recorder': function (browser) { + var addressRef + browser.addFile('scenario.json', {content: records}) + .pause(5000) + .clickLaunchIcon('udapp') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite + .click('div[class^="cardContainer"] i[class^="arrow"]') + .click('#runTabView .runtransaction') + .waitForElementPresent('.instance:nth-of-type(2)') + .click('.instance:nth-of-type(2) > div > button') + .waitForElementPresent('.instance:nth-of-type(3)') + .click('.instance:nth-of-type(3) > div > button') + .clickFunction('getInt - call') + .clickFunction('getAddress - call') + .clickFunction('getFromLib - call') + .waitForElementPresent('div[class^="contractActionsContainer"] div[class^="value"] ul') + .getAddressAtPosition(1, (address) => { + console.log('Test Recorder ' + address) + addressRef = address + }) + .perform((done) => { + browser.verifyCallReturnValue(addressRef, ['0: uint256: 1', '0: uint256: 3456', '0: address: 0xbBF289D846208c16EDc8474705C748aff07732dB']) + .perform(() => done()) + }) + .click('*[data-id="deployAndRunClearInstances"]') + .testContracts('testRecorder.sol', sources[0]['browser/testRecorder.sol'], ['testRecorder']) + .createContract('12') + .waitForElementPresent('.instance:nth-of-type(2)') + .click('.instance:nth-of-type(2) > div > button') + .clickFunction('set - transact (not payable)', {types: 'uint256 _p', values: '34'}) + .click('i.savetransaction') + .modalFooterOKClick() + .getEditorValue(function (result) { + var parsed = JSON.parse(result) + browser.assert.equal(JSON.stringify(parsed.transactions[0].record.parameters), JSON.stringify(scenario.transactions[0].record.parameters)) + browser.assert.equal(JSON.stringify(parsed.transactions[0].record.name), JSON.stringify(scenario.transactions[0].record.name)) + browser.assert.equal(JSON.stringify(parsed.transactions[0].record.type), JSON.stringify(scenario.transactions[0].record.type)) + browser.assert.equal(JSON.stringify(parsed.transactions[0].record.from), JSON.stringify(scenario.transactions[0].record.from)) + browser.assert.equal(JSON.stringify(parsed.transactions[0].record.contractName), JSON.stringify(scenario.transactions[0].record.contractName)) + + browser.assert.equal(JSON.stringify(parsed.transactions[1].record.parameters), JSON.stringify(scenario.transactions[1].record.parameters)) + browser.assert.equal(JSON.stringify(parsed.transactions[1].record.name), JSON.stringify(scenario.transactions[1].record.name)) + browser.assert.equal(JSON.stringify(parsed.transactions[1].record.type), JSON.stringify(scenario.transactions[1].record.type)) + browser.assert.equal(JSON.stringify(parsed.transactions[1].record.from), JSON.stringify(scenario.transactions[1].record.from)) + }) + .end() + }, + tearDown: sauce +} + +var sources = [{'browser/testRecorder.sol': {content: `contract testRecorder { + constructor(uint p) public { + + } + function set (uint _p) public { + + } +}`}}] + +var records = `{ + "accounts": { + "account{10}": "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c" + }, + "linkReferences": { + "testLib": "created{1512830014773}" + }, + "transactions": [ + { + "timestamp": 1512830014773, + "record": { + "value": "0", + "parameters": [], + "abi": "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a", + "contractName": "testLib", + "bytecode": "60606040523415600e57600080fd5b60968061001c6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680636d4ce63c146044575b600080fd5b604a6060565b6040518082815260200191505060405180910390f35b6000610d809050905600a165627a7a7230582022d123b15248b8176151f8d45c2dc132063bcc9bb8d5cd652aea7efae362c8050029", + "linkReferences": {}, + "inputs": "()", + "type": "constructor", + "from": "account{10}" + } + }, + { + "timestamp": 1512830015080, + "record": { + "value": "100", + "parameters": [ + 11 + ], + "abi": "0xc41589e7559804ea4a2080dad19d876a024ccb05117835447d72ce08c1d020ec", + "contractName": "test", + "bytecode": "60606040526040516020806102b183398101604052808051906020019091905050806000819055505061027a806100376000396000f300606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632f30c6f61461006757806338cc48311461009e57806362738998146100f357806387cc10e11461011c575b600080fd5b61009c600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610145565b005b34156100a957600080fd5b6100b1610191565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100fe57600080fd5b6101066101bb565b6040518082815260200191505060405180910390f35b341561012757600080fd5b61012f6101c4565b6040518082815260200191505060405180910390f35b8160008190555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008054905090565b600073__browser/ballot.sol:testLib____________636d4ce63c6000604051602001526040518163ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040160206040518083038186803b151561022e57600080fd5b6102c65a03f4151561023f57600080fd5b505050604051805190509050905600a165627a7a72305820e0b2510bb2890a0334bfe5613d96db3e72442e63b514cdeaee8fc2c6bbd19d3a0029", + "linkReferences": { + "browser/ballot.sol": { + "testLib": [ + { + "length": 20, + "start": 511 + } + ] + } + }, + "name": "", + "type": "constructor", + "inputs": "(uint256)", + "from": "account{10}" + } + }, + { + "timestamp": 1512830034180, + "record": { + "value": "1000000000000000000", + "parameters": [ + 1, + "created{1512830015080}" + ], + "to": "created{1512830015080}", + "abi": "0xc41589e7559804ea4a2080dad19d876a024ccb05117835447d72ce08c1d020ec", + "name": "set", + "inputs": "(uint256,address)", + "type": "function", + "from": "account{10}" + } + } + ], + "abis": { + "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a": [ + { + "constant": true, + "inputs": [], + "name": "get", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "0xc41589e7559804ea4a2080dad19d876a024ccb05117835447d72ce08c1d020ec": [ + { + "constant": true, + "inputs": [], + "name": "getInt", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getFromLib", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getAddress", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_t", + "type": "uint256" + }, + { + "name": "_add", + "type": "address" + } + ], + "name": "set", + "outputs": [], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_r", + "type": "uint256" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "constructor" + } + ] + } +}` + +var scenario = { + 'accounts': { + 'account{10}': '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' + }, + 'linkReferences': {}, + 'transactions': [ + { + 'timestamp': 1512912691086, + 'record': { + 'value': '0', + 'parameters': [ + "12" // eslint-disable-line + ], + 'abi': '0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798', + 'contractName': 'testRecorder', + 'bytecode': '6060604052341561000f57600080fd5b6040516020806100cd833981016040528080519060200190919050505060938061003a6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806360fe47b1146044575b600080fd5b3415604e57600080fd5b606260048080359060200190919050506064565b005b505600a165627a7a723058204839660366b94f5f3c8c6da233a2c5fe95ad5635b5c8a2bb630a8b845d68ecdd0029', + 'linkReferences': {}, + 'name': '', + 'type': 'constructor', + 'inputs': '(uint256)', + 'from': 'account{10}' + } + }, + { + 'timestamp': 1512912696128, + 'record': { + 'value': '0', + 'parameters': [ + "34" // eslint-disable-line + ], + 'to': 'created{1512912691086}', + 'abi': '0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798', + 'name': 'set', + 'inputs': '(uint256)', + 'type': 'function', + 'from': 'account{10}' + } + } + ], + 'abis': { + '0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798': [ + { + 'constant': false, + 'inputs': [ + { + 'name': '_p', + 'type': 'uint256' + } + ], + 'name': 'set', + 'outputs': [], + 'payable': false, + 'stateMutability': 'nonpayable', + 'type': 'function' + }, + { + 'inputs': [ + { + 'name': 'p', + 'type': 'uint256' + } + ], + 'payable': false, + 'stateMutability': 'nonpayable', + 'type': 'constructor' + } + ] + } +} diff --git a/test-browser/tests/remixd.test.js b/test-browser/tests/remixd.test.js new file mode 100644 index 0000000000..79142bc39c --- /dev/null +++ b/test-browser/tests/remixd.test.js @@ -0,0 +1,138 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +var assetsTestContract = `import "./contract.sol"; +contract Assets { + uint[] proposals; + function add(uint8 _numProposals) public { + proposals.length = _numProposals; + } +} +` + +var gmbhTestContract = `contract gmbh { + uint[] proposals; + function register(uint8 _numProposals) public { + proposals.length = _numProposals; + } +} +` +var sources = [ + { + 'localhost/folder1/contract2.sol': {content: 'contract test2 { function get () public returns (uint) { return 11; }}'} + }, + { + 'localhost/src/gmbh/company.sol': {content: assetsTestContract} + }, + { + 'localhost/src/gmbh/company.sol': {content: assetsTestContract}, + 'localhost/src/gmbh/contract.sol': {content: gmbhTestContract} + }, + { + 'browser/test_import_node_modules.sol': {content: 'import "openzeppelin-solidity/contracts/math/SafeMath.sol";'} + }, + { + 'browser/test_import_node_modules_with_github_import.sol': {content: 'import "openzeppelin-solidity/contracts/sample.sol";'} + } +] + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Remixd': function (browser) { + runTests(browser) + }, + 'Import from node_modules ': function (browser) { + /* + when a relative import is used (i.e import "openzeppelin-solidity/contracts/math/SafeMath.sol") + remix (as well as truffle) try to resolve it against the node_modules and installed_contracts folder. + */ + + browser.waitForElementVisible('#icon-panel', 2000) + .clickLaunchIcon('fileExplorers') + .addFile('test_import_node_modules.sol', sources[3]['browser/test_import_node_modules.sol']) + .clickLaunchIcon('solidity') + .testContracts('test_import_node_modules.sol', sources[3]['browser/test_import_node_modules.sol'], ['SafeMath']) + }, + 'Import from node_modules and reference a github import': function (browser) { + browser.waitForElementVisible('#icon-panel', 2000) + .clickLaunchIcon('fileExplorers') + .addFile('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol']) + .clickLaunchIcon('solidity') + .setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0 + .testContracts('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol'], ['ERC20', 'test11']) + .clickLaunchIcon('pluginManager') + .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button') + .end() + }, + tearDown: sauce +} + +function runTests (browser, testData) { + var browserName = browser.options.desiredCapabilities.browserName + if (browserName === 'safari' || browserName === 'internet explorer') { + console.log('do not run remixd test for ' + browserName + ': sauce labs doesn\'t seems to handle websocket') + browser.end() + return + } + + browser + .waitForElementVisible('#icon-panel', 2000) + .clickLaunchIcon('fileExplorers') + .clickLaunchIcon('pluginManager') + .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button') + .waitForElementVisible('#modal-footer-ok', 2000) + .pause(2000) + .click('#modal-footer-ok') + .clickLaunchIcon('fileExplorers') + .waitForElementVisible('[data-path="localhost/folder1"]') + .click('[data-path="localhost/folder1"]') + .waitForElementVisible('[data-path="localhost/contract1.sol"]') + .assert.containsText('[data-path="localhost/contract1.sol"]', 'contract1.sol') + .assert.containsText('[data-path="localhost/contract2.sol"]', 'contract2.sol') + .waitForElementVisible('[data-path="localhost/folder1/contract1.sol"]') + .assert.containsText('[data-path="localhost/folder1/contract1.sol"]', 'contract1.sol') + .assert.containsText('[data-path="localhost/folder1/contract2.sol"]', 'contract2.sol') // load and test sub folder + .click('[data-path="localhost/folder1/contract2.sol"]') + .click('[data-path="localhost/folder1/contract1.sol"]') // open localhost/folder1/contract1.sol + .pause(1000) + .testEditorValue('contract test1 { function get () returns (uint) { return 10; }}') // check the content and replace by another + .setEditorValue('contract test1Changed { function get () returns (uint) { return 10; }}') + .testEditorValue('contract test1Changed { function get () returns (uint) { return 10; }}') + .setEditorValue('contract test1 { function get () returns (uint) { return 10; }}') + .click('[data-path="localhost/folder1/contract_' + browserName + '.sol"]') // rename a file and check + .pause(1000) + .renameFile('localhost/folder1/contract_' + browserName + '.sol', 'renamed_contract_' + browserName + '.sol', 'localhost/folder1/renamed_contract_' + browserName + '.sol') + .pause(1000) + .removeFile('localhost/folder1/contract_' + browserName + '_toremove.sol') + .perform(function (done) { + testImportFromRemixd(browser, () => { done() }) + }) + .clickLaunchIcon('fileExplorers') + .waitForElementVisible('[data-path="localhost/folder1"]') + .click('[data-path="localhost/folder1"]') + .click('[data-path="localhost/folder1"]') // click twice because remixd does not return nested folder details after update + .waitForElementVisible('[data-path="localhost/folder1/contract1.sol"]') + .waitForElementVisible('[data-path="localhost/folder1/renamed_contract_' + browserName + '.sol"]') // check if renamed file is preset + .waitForElementNotPresent('[data-path="localhost/folder1/contract_' + browserName + '.sol"]') // check if renamed (old) file is not present + .waitForElementNotPresent('[data-path="localhost/folder1/contract_' + browserName + '_toremove.sol"]') // check if removed (old) file is not present + .click('[data-path="localhost/folder1/renamed_contract_' + browserName + '.sol"]') +} + +function testImportFromRemixd (browser, callback) { + browser + .waitForElementVisible('[data-path="localhost/src"]', 100000) + .click('[data-path="localhost/src"]') + .waitForElementVisible('[data-path="localhost/src/gmbh"]', 100000) + .click('[data-path="localhost/src/gmbh"]') + .waitForElementVisible('[data-path="localhost/src/gmbh/company.sol"]', 100000) + .click('[data-path="localhost/src/gmbh/company.sol"]') + .pause(1000) + .verifyContracts(['Assets', 'gmbh']) + .perform(() => { callback() }) +} diff --git a/test-browser/tests/runAndDeploy.js b/test-browser/tests/runAndDeploy.js new file mode 100644 index 0000000000..7f705171b3 --- /dev/null +++ b/test-browser/tests/runAndDeploy.js @@ -0,0 +1,209 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +const passphrase = process.env.account_passphrase +const password = process.env.account_password + +module.exports = { + + before: function (browser, done) { + init(browser, done) + }, + + '@sources': function () { + return sources + }, + + 'Should load run and deploy tab': function (browser) { + browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="sidePanelSwapitTitle"]') + .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEPLOY & RUN TRANSACTIONS') + }, + + 'Should sign message using account key': function (browser) { + browser.waitForElementPresent('*[data-id="settingsRemixRunSignMsg"]') + .click('*[data-id="settingsRemixRunSignMsg"]') + .waitForElementPresent('*[data-id="modalDialogContainer"]') + .click('*[data-id="modalDialogCustomPromptText"]') + .setValue('*[data-id="modalDialogCustomPromptText"]', 'Remix is cool!') + .assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgHash"]') + .assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgSignature"]') + .modalFooterOKClick() + .pause(2000) + .waitForElementPresent('*[data-id="modalDialogContainer"]') + .assert.elementPresent('*[data-id="settingsRemixRunSignMsgHash"]') + .assert.elementPresent('*[data-id="settingsRemixRunSignMsgSignature"]') + .modalFooterOKClick() + }, + + 'Should deploy contract on JavascriptVM': function (browser) { + browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .clickLaunchIcon('fileExplorers') + .addFile('Greet.sol', sources[0]['browser/Greet.sol']) + .clickLaunchIcon('udapp') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') + .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') + .click('*[data-id="Deploy - transact (not payable)"]') + .pause(5000) + .testFunction('0xe9b627a180f90a24feb6850f29e4121ea312f315f61756c31468ffbda2955a64', { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0xe9b627a180f90a24feb6850f29e4121ea312f315f61756c31468ffbda2955a64' + }) + }, + + 'Should run low level interaction (fallback function)': function (browser) { + browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') + .click('*[data-id="universalDappUiTitleExpander"]') + .waitForElementPresent('*[data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction"]') + .click('*[data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction"]') + .pause(5000) + .testFunction('0xfe718871ee0b4d03cdcac0e12e5b164efaf7e23ba952c07db76e62692867019b', { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0xfe718871ee0b4d03cdcac0e12e5b164efaf7e23ba952c07db76e62692867019b' + }) + }, + + 'Should connect to Goerli Test Network using MetaMask': function (browser) { + browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .setupMetamask(passphrase, password) + .click('.network-indicator__down-arrow') + .useXpath().click("//span[text()='Goerli Test Network']") + .useCss().switchBrowserTab(0) + .refresh() + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .click('*[data-id="landingPageStartSolidity"]') + .pause(5000) + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="settingsSelectEnvOptions"]') + .click('*[data-id="settingsSelectEnvOptions"] option[id="injected-mode"]') + .waitForElementPresent('*[data-id="settingsNetworkEnv"]') + .assert.containsText('*[data-id="settingsNetworkEnv"]', 'Goerli (5) network') + .switchBrowserTab(2) + .waitForElementPresent('.page-container__footer-button:nth-of-type(2)') + .click('.page-container__footer-button:nth-of-type(2)') + .switchBrowserTab(0) + }, + + 'Should deploy contract on Goerli Test Network using MetaMask': function (browser) { + browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') + .clickLaunchIcon('fileExplorers') + .openFile('browser/Greet.sol') + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') + .click('*[data-id="Deploy - transact (not payable)"]') + .switchBrowserTab(2) + .waitForElementPresent('.transaction-status--unapproved') + .click('.transaction-status--unapproved') + .waitForElementPresent('.page-container__footer-button:nth-of-type(2)') + .click('.page-container__footer-button:nth-of-type(2)') + .waitForElementPresent('.transaction-status--submitted') + .pause(25000) + .switchBrowserTab(0) + }, + + 'Should run low level interaction (fallback function) on Goerli Test Network using MetaMask': function (browser) { + browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') + .click('*[data-id="universalDappUiTitleExpander"]') + .waitForElementPresent('*[data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction"]') + .click('*[data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction"]') + .switchBrowserTab(2) + .waitForElementPresent('.transaction-status--unapproved') + .click('.transaction-status--unapproved') + .waitForElementPresent('.page-container__footer-button:nth-of-type(2)') + .click('.page-container__footer-button:nth-of-type(2)') + .waitForElementPresent('.transaction-status--submitted') + .pause(25000) + .switchBrowserTab(0) + }, + + 'Should connect to Ethereum Main Network using MetaMask': function (browser) { + browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .switchBrowserTab(2) + .waitForElementPresent('.network-indicator__down-arrow') + .click('.network-indicator__down-arrow') + .useXpath().click("//span[text()='Main Ethereum Network']") + .useCss().switchBrowserTab(0) + .refresh() + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .click('*[data-id="landingPageStartSolidity"]') + .pause(5000) + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="settingsSelectEnvOptions"]') + .click('*[data-id="settingsSelectEnvOptions"] option[id="injected-mode"]') + .waitForElementPresent('*[data-id="settingsNetworkEnv"]') + .assert.containsText('*[data-id="settingsNetworkEnv"]', 'Main (1) network') + }, + + 'Should deploy contract on Ethereum Main Network using MetaMask': function (browser) { + browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') + .clickLaunchIcon('fileExplorers') + .openFile('browser/Greet.sol') + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') + .click('*[data-id="Deploy - transact (not payable)"]') + .pause(2000) + .waitForElementPresent('*[data-id="modalDialogContainer"]') + .assert.containsText('*[data-id="modalDialogModalBody"]', 'You are creating a transaction on the main network. Click confirm if you are sure to continue.') + .modalFooterCancelClick() + }, + + /* + * This test is using 3 differents services: + * - Metamask for getting the transaction + * - Source Verifier service for fetching the contract code + * - Ropsten node for retrieving the trace and storage + * + */ + 'Should debug Ropsten transaction with source highlighting using the source verifier service and MetaMask': function (browser) { + browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) + .switchBrowserTab(2) + .waitForElementPresent('.network-indicator__down-arrow') + .click('.network-indicator__down-arrow') + .useXpath().click("//span[text()='Ropsten Test Network']") // switch to Ropsten + .useCss().switchBrowserTab(0) + .refresh() + .clickLaunchIcon('pluginManager') // load debugger and source verification + // .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_source-verification"] button') + // debugger already activated .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_debugger"] button') + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="settingsSelectEnvOptions"]') + .click('*[data-id="settingsSelectEnvOptions"] option[id="injected-mode"]') // switch to Ropsten in udapp + .waitForElementPresent('*[data-id="settingsNetworkEnv"]') + .assert.containsText('*[data-id="settingsNetworkEnv"]', 'Ropsten (3) network') + .clickLaunchIcon('debugger') + .setValue('*[data-id="debuggerTransactionInput"]', '0x959371506b8f6223d71c709ac2eb2d0158104dca2d76ca949f1662712cf0e6db') // debug tx + .click('*[data-id="debuggerTransactionStartButton"]') + .waitForElementVisible('*[data-id="treeViewDivto"]', 30000) + .assert.containsText('*[data-id="stepdetail"]', 'loaded address: 0x3c943Fb816694d7D1f4C738e3e7823818a88DD6C') + .assert.containsText('*[data-id="solidityLocals"]', 'to: 0x6C3CCC7FBA111707D5A1AAF2758E9D4F4AC5E7B1') + .end() + }, + tearDown: sauce +} + +var sources = [ + { + 'browser/Greet.sol': { + content: + ` + pragma solidity ^0.6.0; + + contract helloWorld { + string public message; + + fallback () external { + message = 'Hello World!'; + } + + function greet(string memory _message) public { + message = _message; + } + }` + } + } +] diff --git a/test-browser/tests/sauce.js b/test-browser/tests/sauce.js new file mode 100644 index 0000000000..5294a9d403 --- /dev/null +++ b/test-browser/tests/sauce.js @@ -0,0 +1,60 @@ + +// const https = require('https') + +module.exports = function sauce (callback) { + return callback() + /* + const currentTest = this.client.currentTest + const username = this.client.options.username + const sessionId = this.client.capabilities['webdriver.remote.sessionid'] + const accessKey = this.client.options.accessKey + + if (!username || !accessKey || !sessionId) { + console.log(this.client) + console.log('No username, accessKey or sessionId') + return callback() + } + + const passed = currentTest.results.passed === currentTest.results.tests + + const data = JSON.stringify({passed}) + + const requestPath = `/rest/v1/${username}/jobs/${sessionId}` + + function responseCallback (res) { + res.setEncoding('utf8') + console.log('Response: ', res.statusCode, JSON.stringify(res.headers)) + res.on('data', function onData (chunk) { + console.log('BODY: ' + chunk) + }) + res.on('end', function onEnd () { + console.info('Finished updating saucelabs') + callback() + }) + } + + try { + console.log('Updating saucelabs', requestPath) + + const req = https.request({ + hostname: 'saucelabs.com', + path: requestPath, + method: 'PUT', + auth: `${username}:${accessKey}`, + headers: { + 'Content-Type': 'application/json', + 'Content-Length': data.length + } + }, responseCallback) + + req.on('error', function onError (e) { + console.log('problem with request: ' + e.message) + }) + req.write(data) + req.end() + } catch (error) { + console.log('Error', error) + callback() + } + */ +} diff --git a/test-browser/tests/signingMessage.test.js b/test-browser/tests/signingMessage.test.js new file mode 100644 index 0000000000..a5a7c78433 --- /dev/null +++ b/test-browser/tests/signingMessage.test.js @@ -0,0 +1,94 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Test Signature': function (browser) { + let hash, signature + browser + .clickLaunchIcon('udapp') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite + .signMessage('test message', (h, s) => { + hash = h + signature = s + console.log('hash', hash) + console.log('signature', signature) + browser.assert.ok(typeof hash.value === 'string', 'type of hash.value must be String') + browser.assert.ok(typeof signature.value === 'string', 'type of signature.value must be String') + }) + .addFile('signMassage.sol', sources[0]['browser/signMassage.sol']) + .openFile('browser/signMassage.sol') + .pause(5000) + .selectContract('ECVerify') + .createContract('') + .clickInstance(0) + .perform((done) => { + browser.getAddressAtPosition(0, (address) => { + // skip 'instance' part of e.g. 'instance0x692a70d2e424a56d2c6c27aa97d1a86395877b3a' + console.log('Test Signature address', address) + var inputs = `"${hash.value}","${signature.value}"` + console.log('Test Signature Input', inputs) + browser.clickFunction('ecrecovery - call', { types: 'bytes32 hash, bytes sig', values: inputs }) + .pause(5000) + .verifyCallReturnValue( + address, + ['0: address: 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c']) + .perform(() => { + done() + }) + }) + }) + .end() + }, + tearDown: sauce +} + +var sources = [ + { + 'browser/signMassage.sol': {content: ` + pragma solidity >=0.4.22 <0.7.0; + contract SignMassageTest { + function testRecovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) public pure returns (address) { + return ecrecover(h, v, r, s); + } + } + + library ECVerify { + function ecrecovery(bytes32 hash, bytes memory sig) public pure returns (address) { + bytes32 r; + bytes32 s; + uint8 v; + + if (sig.length != 65) { + return address(0); + } + + assembly { + r := mload(add(sig, 32)) + s := mload(add(sig, 64)) + v := and(mload(add(sig, 65)), 255) + } + + if (v < 27) { + v += 27; + } + + if (v != 27 && v != 28) { + return address(0); + } + + return ecrecover(hash, v, r, s); + } + + function ecverify(bytes32 hash, bytes memory sig, address signer) public pure returns (bool) { + return signer == ecrecovery(hash, sig); + } + }`} + } +] diff --git a/test-browser/tests/solidityImport.test.js b/test-browser/tests/solidityImport.test.js new file mode 100644 index 0000000000..3a1290c88e --- /dev/null +++ b/test-browser/tests/solidityImport.test.js @@ -0,0 +1,85 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Test Simple Contract': function (browser) { + browser.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['test1', 'test2']) + }, + 'Test Success Import': function (browser) { + browser.addFile('Untitled1.sol', sources[1]['browser/Untitled1.sol']) + .addFile('Untitled2.sol', sources[1]['browser/Untitled2.sol']) + .openFile('browser/Untitled1.sol') + .verifyContracts(['test6', 'test4', 'test5']) + }, + + 'Test Failed Import': function (browser) { + browser.addFile('Untitled3.sol', sources[2]['browser/Untitled3.sol']) + .clickLaunchIcon('solidity') + .assert.containsText('#compileTabView .error pre', 'not found browser/Untitled11.sol') + }, + + 'Test Github Import - from master branch': function (browser) { + browser + .setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0 (master branch) + .addFile('Untitled4.sol', sources[3]['browser/Untitled4.sol']) + .clickLaunchIcon('fileExplorers') + .verifyContracts(['test7', 'ERC20', 'SafeMath'], {wait: 10000}) + }, + + 'Test Github Import - from other branch': function (browser) { + browser + .setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') // switch back to 0.5.0 : release-v2.3.0 branch is not solidity 0.6 compliant + .addFile('Untitled5.sol', sources[4]['browser/Untitled5.sol']) + .clickLaunchIcon('fileExplorers') + .verifyContracts(['test8', 'ERC20', 'SafeMath'], {wait: 10000}) + }, + + 'Test Github Import - no branch specified': function (browser) { + browser + .setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0 (master branch) + .addFile('Untitled6.sol', sources[5]['browser/Untitled6.sol']) + .clickLaunchIcon('fileExplorers') + .verifyContracts(['test10', 'ERC20', 'SafeMath'], {wait: 10000}) + }, + + 'Test Github Import - raw URL': function (browser) { + browser + .addFile('Untitled7.sol', sources[6]['browser/Untitled7.sol']) + .clickLaunchIcon('fileExplorers') + .verifyContracts(['test11', 'ERC20', 'SafeMath'], {wait: 10000}) + .end() + }, + tearDown: sauce +} + +var sources = [ + { + 'browser/Untitled.sol': {content: 'contract test1 {} contract test2 {}'} + }, + { + 'browser/Untitled1.sol': {content: 'import "./Untitled2.sol"; contract test6 {}'}, + 'browser/Untitled2.sol': {content: 'contract test4 {} contract test5 {}'} + }, + { + 'browser/Untitled3.sol': {content: 'import "./Untitled11.sol"; contract test6 {}'} + }, + { + 'browser/Untitled4.sol': {content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract test7 {}'} + }, + { + 'browser/Untitled5.sol': {content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.3.0/contracts/token/ERC20/ERC20.sol"; contract test8 {}'} + }, + { + 'browser/Untitled6.sol': {content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; contract test10 {}'} + }, + { + 'browser/Untitled7.sol': {content: 'import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"; contract test11 {}'} + } +] diff --git a/test-browser/tests/solidityUnittests.test.js b/test-browser/tests/solidityUnittests.test.js new file mode 100644 index 0000000000..3a4882ad51 --- /dev/null +++ b/test-browser/tests/solidityUnittests.test.js @@ -0,0 +1,366 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + + before: function (browser, done) { + init(browser, done) + }, + + '@sources': function () { + return sources + }, + + 'Should launch solidity unit test plugin': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .clickLaunchIcon('fileExplorers') + .addFile('simple_storage.sol', sources[0]['browser/simple_storage.sol']) + .addFile('ks2a.sol', sources[0]['browser/ks2a.sol']) + .clickLaunchIcon('pluginManager') + .scrollAndClick('*[data-id="pluginManagerComponentActivateButtonsolidityUnitTesting"]') + .click('*[data-id="verticalIconsKindsolidityUnitTesting"]') + .waitForElementPresent('*[data-id="sidePanelSwapitTitle"]') + .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'SOLIDITY UNIT TESTING') + }, + + 'Should generate test file': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .clickLaunchIcon('fileExplorers') + .openFile('browser/simple_storage.sol') + .click('*[data-id="verticalIconsKindsolidityUnitTesting"]') + .waitForElementPresent('*[data-id="testTabGenerateTestFile"]') + .click('*[data-id="testTabGenerateTestFile"]') + .waitForElementPresent('*[title="browser/simple_storage_test.sol"]') + .clickLaunchIcon('fileExplorers') + .removeFile('browser/simple_storage_test.sol') + }, + + 'Should run simple unit test `simple_storage_test.sol` ': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .addFile('simple_storage_test.sol', sources[0]['browser/simple_storage_test.sol']) + .click('*[data-id="verticalIconsKindsolidityUnitTesting"]') + .waitForElementPresent('*[data-id="testTabCheckAllTests"]') + .click('*[data-id="testTabCheckAllTests"]') + .clickElementAtPosition('.singleTestLabel', 1) + .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 80000) + .pause(5000) + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'MyTest (browser/simple_storage_test.sol)') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Initial value should be100') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Value is set200') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Should fail for wrong value200') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Passing: 2') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Failing: 1') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'FAIL MyTest (browser/simple_storage_test.sol)') + }, + + 'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` ': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .clickLaunchIcon('fileExplorers') + .addFile('ks2b_test.sol', sources[0]['browser/ks2b_test.sol']) + .click('*[data-id="verticalIconsKindsolidityUnitTesting"]') + .waitForElementPresent('*[data-id="testTabCheckAllTests"]') + .click('*[data-id="testTabCheckAllTests"]') + .clickElementAtPosition('.singleTestLabel', 2) + .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) + .pause(5000) + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/ks2b_test.sol') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Check project exists') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong project owner') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong sender') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong value') + .pause(5000) + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Check project is fundable') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'owner is incorrect') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'wrong sender') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'wrong value') + }, + + 'Should stop unit tests during test execution` ': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .waitForElementPresent('*[data-id="testTabRunTestsTabRunAction"]') + .clickElementAtPosition('.singleTestLabel', 0) + .clickElementAtPosition('.singleTestLabel', 1) + .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') + .pause(5000) + .click('*[data-id="testTabRunTestsTabStopAction"]') + .pause(2000) + .assert.containsText('*[data-id="testTabRunTestsTabStopAction"]', 'Stopping') + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/ks2b_test.sol') + .notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/4_Ballot_test.sol') + .notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/simple_storage_test.sol') + .pause(6000) + .assert.containsText('*[data-id="testTabTestsExecutionStopped"]', 'The test execution has been stopped') + }, + + 'Should fail on compilation': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .addFile('compilationError_test.sol', sources[0]['browser/compilationError_test.sol']) + .clickLaunchIcon('fileExplorers') + .openFile('browser/compilationError_test.sol') + .clickLaunchIcon('solidityUnitTesting') + .click('*[data-id="testTabCheckAllTests"]') + .clickElementAtPosition('.singleTestLabel', 3) + .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'SyntaxError: No visibility specified') + .assert.containsText('*[data-id="testTabTestsExecutionStoppedError"]', 'The test execution has been stopped because of error(s) in your test file') + }, + + 'Should fail on deploy': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .addFile('deployError_test.sol', sources[0]['browser/deployError_test.sol']) + .clickLaunchIcon('fileExplorers') + .openFile('browser/deployError_test.sol') + .clickLaunchIcon('solidityUnitTesting') + .click('*[data-id="testTabCheckAllTests"]') + .clickElementAtPosition('.singleTestLabel', 4) + .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'contract deployment failed after trying twice') + }, + + 'Should fail when parameters are to method in test contract': function (browser) { + browser.waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .addFile('methodFailure_test.sol', sources[0]['browser/methodFailure_test.sol']) + .clickLaunchIcon('fileExplorers') + .openFile('browser/methodFailure_test.sol') + .clickLaunchIcon('solidityUnitTesting') + .click('*[data-id="testTabCheckAllTests"]') + .clickElementAtPosition('.singleTestLabel', 5) + .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]') + .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', `Method 'add' can not have parameters inside a test contract`) + }, + + 'Solidity Unittests': function (browser) { + runTests(browser) + }, + + tearDown: sauce +} + +function runTests (browser) { + browser + .waitForElementPresent('*[data-id="verticalIconsKindfileExplorers"]') + .clickLaunchIcon('fileExplorers') + .openFile('browser/3_Ballot.sol') + .clickLaunchIcon('solidityUnitTesting') + .pause(500) + .scrollAndClick('#runTestsTabRunAction') + .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) + .pause(5000) + .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]') + .assert.containsText('#solidityUnittestsOutput', 'browser/4_Ballot_test.sol') + .assert.containsText('#solidityUnittestsOutput', '✓ Check winning proposal') + .assert.containsText('#solidityUnittestsOutput', '✓ Check winnin proposal with return value') + .end() +} + +var sources = [ + { + 'browser/simple_storage.sol': { + content: ` + pragma solidity >=0.4.22 <0.7.0; + + contract SimpleStorage { + uint public storedData; + + constructor() public { + storedData = 100; + } + + function set(uint x) public { + storedData = x; + } + + function get() public view returns (uint retVal) { + return storedData; + } + } + ` + }, + 'browser/simple_storage_test.sol': { + content: ` + pragma solidity >=0.4.22 <0.7.0; + import "remix_tests.sol"; + import "./simple_storage.sol"; + + contract MyTest { + SimpleStorage foo; + + function beforeEach() public { + foo = new SimpleStorage(); + } + + function initialValueShouldBe100() public returns (bool) { + return Assert.equal(foo.get(), 100, "initial value is not correct"); + } + + function valueIsSet200() public returns (bool) { + foo.set(200); + return Assert.equal(foo.get(), 200, "value is not 200"); + } + + function shouldFailForWrongValue200() public returns (bool) { + foo.set(300); + return Assert.equal(foo.get(), 200, "value is not 200"); + } + } + ` + }, + 'browser/ks2a.sol': { + content: ` + pragma solidity >=0.4.22 <0.6.0; + contract Kickstarter { + enum State { Started, Completed } + + struct Project { + address owner; + string name; + uint goal; + uint fundsAvailable; // added + uint amountContributed; // added + State state; + mapping(address => uint) funders; // added + } + + Project[] public projects; + + constructor() public { + } + + function createProject(string memory name, uint goal) public { + projects.length++; // new line + Project storage project = projects[projects.length - 1]; + project.name = name; + project.goal = goal; + project.owner = msg.sender; + project.state = State.Started; + } + + function fundProject(uint projectId) payable public { + Project storage project = projects[projectId]; + // require project exists + // PLEASE CHECK / or erase + // not this: require(projects[projectId].exists, "the project must exist to be funded"); + + // require for... underflow/overflow protection + project.funders[msg.sender] += msg.value; + project.amountContributed += msg.value; + project.fundsAvailable += msg.value; + + if (project.amountContributed >= project.goal) { + project.state = State.Completed; + } + } + + // this function is here because we can't use web3 when using the VM + function getContractBalance() public view returns(uint balance) { + return address(this).balance; + } + + } + ` + }, + 'browser/ks2b_test.sol': { + content: ` + pragma solidity >=0.4.22 <0.6.0; + pragma experimental ABIEncoderV2; + + import "remix_tests.sol"; // this import is automatically injected by Remix. + import "remix_accounts.sol"; + import "./ks2a.sol"; + + contract kickstarterTest { + enum State { Started, Completed } + + Kickstarter kickstarter; + + function beforeAll () public { + kickstarter = new Kickstarter(); + kickstarter.createProject("ProjectA", 123000); + kickstarter.createProject("ProjectB", 100); + } + + /// #sender: account-1 + /// #value: 10000000 + function checkProjectExists () public payable { + (address owner, string memory name, uint goal, uint fundsAvailable, uint amountContributed, Kickstarter.State state) = kickstarter.projects(0); + Assert.equal(name, "ProjectA", "project name is incorrect"); + Assert.equal(goal, 123000, "funding goal is incorrect"); + Assert.equal(owner, address(this), "owner is incorrect"); + Assert.equal(msg.sender, TestsAccounts.getAccount(1), "wrong sender"); + Assert.equal(msg.value, 10000000, "wrong value"); + } + + /// #sender: account-1 + /// #value: 10000000 + function checkWrongProjectOwner () public payable { + (address owner,,,,,) = kickstarter.projects(0); + Assert.equal(owner, TestsAccounts.getAccount(0), "owner is incorrect"); //failing case + } + + /// #sender: account-1 + /// #value: 10000000 + function checkWrongSender () public payable { + Assert.equal(msg.sender, TestsAccounts.getAccount(0), "wrong sender"); //failing case + } + + /// #sender: account-1 + /// #value: 10000000 + function checkWrongValue () public payable { + Assert.equal(msg.value, 5000000, "wrong value"); //failing case + } + + function checkProjectIsFundable () public { + kickstarter.fundProject.value(120000)(0); + (address owner, string memory name, uint goal, uint fundsAvailable, uint amountContributed, Kickstarter.State state) = kickstarter.projects(0); + Assert.equal(amountContributed, 120000, "contributed amount is incorrect"); + } + + } + ` + }, + 'browser/compilationError_test.sol': { + content: ` + pragma solidity ^0.6.1; + + contract failOnCompilation { + fallback() { + + } + } + ` + }, + 'browser/deployError_test.sol': { + content: ` + pragma solidity ^0.6.0; + + contract failingDeploy { + constructor() public { + revert('Deploy Failed'); + } + } + ` + }, + 'browser/methodFailure_test.sol': { + content: ` + pragma solidity ^0.6.0; + + contract methodfailure { + function add(uint a, uint b) public { + uint c = a+b; + Assert.equal(a+b, c, "wrong value"); + } + } + ` + } + } +] diff --git a/test-browser/tests/specialFunctions.test.js b/test-browser/tests/specialFunctions.test.js new file mode 100644 index 0000000000..53b6af7ddb --- /dev/null +++ b/test-browser/tests/specialFunctions.test.js @@ -0,0 +1,274 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Use special functions receive/fallback - both are declared, sending data': function (browser) { + browser.waitForElementVisible('#icon-panel', 10000) + .testContracts('receiveAndFallback.sol', sources[0]['browser/receiveAndFallback.sol'], ['CheckSpecials']) // compile + .clickLaunchIcon('udapp') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite + .selectContract('CheckSpecials') + .createContract('') // deploy + .clickInstance(0) + .perform((done) => { + browser.getAddressAtPosition(0, (address) => { + browser.sendLowLevelTx(address, '0', '0xaa') + .pause(1000) + .journalLastChildIncludes('to:CheckSpecials.(fallback)') + .journalLastChildIncludes('value:0 wei') + .journalLastChildIncludes('data:0xaa') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - both are declared, failing sending data < 1 byte': function (browser) { + // don't need to redeploy it, same contract + browser.perform((done) => { + browser.getAddressAtPosition(0, (address) => { + browser.sendLowLevelTx(address, '0', '0xa') + .pause(1000) + .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) + .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `The calldata should be a valid hexadecimal value with size of at least one byte.`) + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - both are declared, failing sending data with odd number of digits': function (browser) { + // don't need to redeploy it, same contract + browser.perform((done) => { + browser.getAddressAtPosition(0, (address) => { + browser.sendLowLevelTx(address, '0', '0x1aa') + .pause(1000) + .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) + .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `The calldata should be a valid hexadecimal value.`) + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - both are declared - receive called, sending wei': function (browser) { + // don't need to redeploy it, same contract + browser.perform((done) => { + browser.getAddressAtPosition(0, (address) => { + browser.sendLowLevelTx(address, '1', '') + .pause(1000) + .journalLastChildIncludes('to:CheckSpecials.(receive)') + .journalLastChildIncludes('value:1 wei') + .journalLastChildIncludes('data:0x') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - both are declared - fallback should fail cause not payable, sending data and wei': function (browser) { + // don't need to redeploy it, same contract + browser.perform((done) => { + browser.getAddressAtPosition(0, (address) => { + browser.sendLowLevelTx(address, '10', '0xaa') + .pause(1000) + .journalLastChildIncludes('to CheckSpecials.(fallback) errored:') + .journalLastChildIncludes('The called function should be payable if you send value') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - only receive is declared, sending wei': function (browser) { + browser.waitForElementVisible('#icon-panel', 10000) + .testContracts('receiveOnly.sol', sources[1]['browser/receiveOnly.sol'], ['CheckSpecials']) + .clickLaunchIcon('udapp') + .selectContract('CheckSpecials') + .createContract('') + .clickInstance(1) + .perform((done) => { + browser.getAddressAtPosition(1, (address) => { + browser.sendLowLevelTx(address, '1', '') + .pause(1000) + .journalLastChildIncludes('to:CheckSpecials.(receive)') + .journalLastChildIncludes('value:1 wei') + .journalLastChildIncludes('data:0x') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - only receive is declared, failing, fallback is not declared, sending data': function (browser) { + // don't need to redeploy it, same contract + browser.perform((done) => { + browser.getAddressAtPosition(1, (address) => { + browser.sendLowLevelTx(address, '0', '0xaa') + .pause(1000) + .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) + .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `'Fallback' function is not defined`) + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - only fallback declared and is payable, sending wei': function (browser) { + browser.waitForElementVisible('#icon-panel', 10000) + .testContracts('fallbackOnlyPayable.sol', sources[2]['browser/fallbackOnlyPayable.sol'], ['CheckSpecials']) + .clickLaunchIcon('udapp') + .selectContract('CheckSpecials') + .createContract('') + .clickInstance(2) + .perform((done) => { + browser.getAddressAtPosition(2, (address) => { + browser.sendLowLevelTx(address, '1', '') + .pause(1000) + .journalLastChildIncludes('to:CheckSpecials.(fallback)') + .journalLastChildIncludes('value:1 wei') + .journalLastChildIncludes('data:0x') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - only fallback is diclared and is payable, sending data and wei': function (browser) { + // don't need to redeploy it, same contract + browser.perform((done) => { + browser.getAddressAtPosition(2, (address) => { + browser.sendLowLevelTx(address, '1', '0xaa') + .pause(1000) + .journalLastChildIncludes('to:CheckSpecials.(fallback)') + .journalLastChildIncludes('value:1 wei') + .journalLastChildIncludes('data:0xaa') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - only fallback is declared, fallback should fail cause not payable, sending wei': function (browser) { + browser.waitForElementVisible('#icon-panel', 10000) + .testContracts('fallbackOnlyNotPayable.sol', sources[3]['browser/fallbackOnlyNotPayable.sol'], ['CheckSpecials']) + .clickLaunchIcon('udapp') + .selectContract('CheckSpecials') + .createContract('') + .clickInstance(3) + .perform((done) => { + browser.getAddressAtPosition(3, (address) => { + browser.sendLowLevelTx(address, '1', '') + .pause(1000) + .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) + .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `should have either 'receive' or payable 'fallback'`) + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - receive and fallback are declared, sending data and wei': function (browser) { + browser.waitForElementVisible('#icon-panel', 10000) + .testContracts('receiveAndFallbackBothPayable.sol', sources[4]['browser/receiveAndFallbackBothPayable.sol'], ['CheckSpecials']) + .clickLaunchIcon('udapp') + .selectContract('CheckSpecials') + .waitForElementVisible('#value') + .clearValue('#value') + .setValue('#value', 0) + .createContract('') + .clickInstance(4) + .pause(1000) + .perform((done) => { + browser.getAddressAtPosition(4, (address) => { + browser.sendLowLevelTx(address, '1', '0xaa') + .pause(1000) + .journalLastChildIncludes('to:CheckSpecials.(fallback)') + .journalLastChildIncludes('value:1 wei') + .journalLastChildIncludes('data:0xaa') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - receive and fallback are declared and payable, sending wei': function (browser) { + browser.perform((done) => { + browser.getAddressAtPosition(4, (address) => { + browser.sendLowLevelTx(address, '1', '') + .pause(1000) + .journalLastChildIncludes('to:CheckSpecials.(receive)') + .journalLastChildIncludes('value:1 wei') + .journalLastChildIncludes('data:0x') + .perform(done) + }) + }) + }, + 'Use special functions receive/fallback - receive and fallback are not declared, sending nothing': function (browser) { + browser.waitForElementVisible('#icon-panel', 10000) + .testContracts('notSpecial.sol', sources[5]['browser/notSpecial.sol'], ['CheckSpecials']) + .clickLaunchIcon('udapp') + .selectContract('CheckSpecials') + .waitForElementVisible('#value') + .clearValue('#value') + .setValue('#value', 0) + .createContract('') + .clickInstance(5) + .pause(1000) + .perform((done) => { + browser.getAddressAtPosition(5, (address) => { + browser.sendLowLevelTx(address, '0', '') + .pause(1000) + .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) + .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `Both 'receive' and 'fallback' functions are not defined`) + .perform(done) + }) + }) + .end() + }, + tearDown: sauce +} + +var sources = [ + { + 'browser/receiveAndFallback.sol': { + content: ` + contract CheckSpecials { + receive() payable external{} + fallback() external {} + } + ` + } + }, + { + 'browser/receiveOnly.sol': { + content: ` + contract CheckSpecials { + receive() payable external {} + } + ` + } + }, + { + 'browser/fallbackOnlyPayable.sol': { + content: ` + contract CheckSpecials { + fallback() payable external {} + } + ` + } + }, + { + 'browser/fallbackOnlyNotPayable.sol': { + content: ` + contract CheckSpecials { + fallback() external {} + } + ` + } + }, + { + 'browser/receiveAndFallbackBothPayable.sol': { + content: ` + contract CheckSpecials { + receive() payable external {} + fallback() payable external {} + } + ` + } + }, + { + 'browser/notSpecial.sol': { + content: ` + contract CheckSpecials { + function otherFallback() payable external {} + } + ` + } + } +] diff --git a/test-browser/tests/staticAnalysis.test.js b/test-browser/tests/staticAnalysis.test.js new file mode 100644 index 0000000000..4ee4183475 --- /dev/null +++ b/test-browser/tests/staticAnalysis.test.js @@ -0,0 +1,69 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +var sources = [ + { + 'browser/Untitled.sol': {content: ` +pragma solidity >=0.4.22 <0.6.0; +contract test1 { address test = tx.origin; } +contract test2 {} +contract TooMuchGas { + uint x; + function() external { + x++; + uint test; + uint test1; + } +}`}} +] + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + 'Static Analysis': function (browser) { + runTests(browser) + }, + tearDown: sauce +} + +function runTests (browser) { + browser + .waitForElementVisible('#icon-panel', 10000) + .clickLaunchIcon('solidity') + .testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['TooMuchGas', 'test1', 'test2']) + .clickLaunchIcon('solidityStaticAnalysis') + .click('#staticanalysisView button') + .waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () { + listSelectorContains(['Use of tx.origin', + 'Fallback function of contract TooMuchGas requires too much gas', + 'TooMuchGas.() : Variables have very similar names test and test1.'], + '#staticanalysisresult .warning', + browser, function () { + browser.end() + } + ) + }) +} + +function listSelectorContains (textsToFind, selector, browser, callback) { + browser.execute(function (selector) { + var items = document.querySelectorAll(selector) + var ret = [] + for (var k = 0; k < items.length; k++) { + ret.push(items[k].innerText) + } + return ret + }, [selector], function (result) { + console.log(result.value) + for (var k in textsToFind) { + console.log('testing `' + result.value[k] + '` against `' + textsToFind[k] + '`') + browser.assert.equal(result.value[k].indexOf(textsToFind[k]) !== -1, true) + } + callback() + }) +} diff --git a/test-browser/tests/terminal.test.js b/test-browser/tests/terminal.test.js new file mode 100644 index 0000000000..135fd59a1b --- /dev/null +++ b/test-browser/tests/terminal.test.js @@ -0,0 +1,116 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done, 'http://127.0.0.1:8080?plugins=solidity,udapp', false) + }, + + 'Should execution a simple console command': function (browser) { + browser + .waitForElementVisible('*[data-id="terminalCli"]', 10000) + .executeScript('console.log(1 + 1)') + .journalLastChild('2') + }, + + 'Should clear console': function (browser) { + browser + .waitForElementVisible('*[data-id="terminalCli"]') + .journalChildIncludes('Welcome to Remix') + .click('#clearConsole') + .assert.containsText('*[data-id="terminalJournal"]', '') + }, + + 'Should display auto-complete menu': function (browser) { + browser + .waitForElementVisible('*[data-id="terminalCli"]') + .click('*[data-id="terminalCli"]') + .sendKeys('*[data-id="terminalCliInput"]', 'remix.') + .assert.visible('*[data-id="autoCompletePopUpAutoCompleteItem"]') + }, + + 'Should execute remix.help() command': function (browser) { + browser + .waitForElementVisible('*[data-id="terminalCli"]') + .executeScript('remix.help()') + .journalChildIncludes('remix.call(message: {name, key, payload})') + .journalChildIncludes('remix.getFile(path)') + .journalChildIncludes('remix.debug(hash)') + .journalChildIncludes('remix.loadgist(id)') + .journalChildIncludes('remix.loadurl(url)') + .journalChildIncludes('remix.setproviderurl(url)') + .journalChildIncludes('remix.execute(filepath)') + .journalChildIncludes('remix.exeCurrent()') + .journalChildIncludes('remix.help()') + .journalChildIncludes('remix.debugHelp()') + }, + + 'Should execute remix.debugHelp() command': function (browser) { + browser + .waitForElementVisible('*[data-id="terminalCli"]') + .executeScript('remix.debugHelp()') + .journalChildIncludes('Here are some examples of scripts that can be run (using remix.exeCurrent() or directly from the console)') + .journalChildIncludes('Please see https://www.npmjs.com/package/remix-debug for more informations') + }, + + 'Async/Await Script': function (browser) { + browser + .addFile('asyncAwait.js', { content: asyncAwait }) + .openFile('browser/asyncAwait.js') + .executeScript(`remix.execute('browser/asyncAwait.js')`) + .journalLastChild('Waiting Promise') + .pause(5500) + .journalLastChild('result - Promise Resolved') + }, + + 'Call Remix File Manager from a script': function (browser) { + browser + .addFile('asyncAwaitWithFileManagerAccess.js', { content: asyncAwaitWithFileManagerAccess }) + .openFile('browser/asyncAwaitWithFileManagerAccess.js') + .pause(5000) + .executeScript(`remix.execute('browser/asyncAwaitWithFileManagerAccess.js')`) + .pause(6000) + .journalLastChildIncludes('contract Ballot {') + .end() + }, + + tearDown: sauce +} + +const asyncAwait = ` + var p = function () { + return new Promise(function (resolve, reject) { + setTimeout(function () { + resolve("Promise Resolved") + }, 5000) + }) + } + + var run = async () => { + console.log('Waiting Promise') + var result = await p() + console.log('result - ', result) + } + + run() +` + +const asyncAwaitWithFileManagerAccess = ` + var p = function () { + return new Promise(function (resolve, reject) { + setTimeout(function () { + resolve("Promise Resolved") + }, 0) + }) + } + + var run = async () => { + console.log('Waiting Promise') + var result = await p() + let text = await remix.call('fileManager', 'readFile', 'browser/3_Ballot.sol') + console.log('result - ', text) + } + + run() +` diff --git a/test-browser/tests/transactionExecution.test.js b/test-browser/tests/transactionExecution.test.js new file mode 100644 index 0000000000..cb073663d2 --- /dev/null +++ b/test-browser/tests/transactionExecution.test.js @@ -0,0 +1,210 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done) + }, + '@sources': function () { + return sources + }, + + 'Execute Simple Contract and Test Terminal': function (browser) { + browser.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['TestContract']) + .clickLaunchIcon('udapp') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite + .click('#runTabView button[class^="instanceButton"]') + .waitForElementPresent('.instance:nth-of-type(2)') + .click('.instance:nth-of-type(2) > div > button') + .click('#runTabView .instance div[class^="title"]') + .click('#runTabView .instance div[class^="title"]') + .clickFunction('f - transact (not payable)') + .testFunction('0x38bb944fa4709ed9e163d6c670259f97284b4defd916d512a2fcc3f35bb53e03', + { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0x38bb944fa4709ed9e163d6c670259f97284b4defd916d512a2fcc3f35bb53e03', + 'decoded output': { '0': 'uint256: 8' } + }) + .pause(500) + .checkTerminalFilter('0x12332162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92782', '') + .clickFunction('g - transact (not payable)') + .testFunction('0xab4f794ca0b531f27fc6eace623666b440facbf20e77615a057d728c67b500f0', + { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0xab4f794ca0b531f27fc6eace623666b440facbf20e77615a057d728c67b500f0', + 'decoded output': { + '0': 'uint256: 345', + '1': 'string: comment_comment_', + '2': 'bool: true', + '3': 'uint256: 4' + } + }) + .click('*[data-id="deployAndRunClearInstances"]') + }, + + 'Test Complex Return Values': function (browser) { + browser.testContracts('returnValues.sol', sources[1]['browser/returnValues.sol'], ['testReturnValues']) + .clickLaunchIcon('udapp') + .click('#runTabView button[class^="instanceButton"]') + .waitForElementPresent('.instance:nth-of-type(2)') + .click('.instance:nth-of-type(2) > div > button') + .clickFunction('retunValues1 - transact (not payable)') + .testFunction('0x09c6716a67f0f8c7a0ca2b3ddf59c25982da856a95aefd640b767f9b9feee39d', + { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0x09c6716a67f0f8c7a0ca2b3ddf59c25982da856a95aefd640b767f9b9feee39d', + 'decoded output': { + '0': 'bool: _b true', + '1': 'uint256: _u 345', + '2': 'int256: _i -345', + '3': 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' + } + }) + .clickFunction('retunValues2 - transact (not payable)') + .testFunction('0xe884953e0695399d60914af3e1ea2dad59fe41f3c0c20665c130fa40dd0fb6bf', + { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0xe884953e0695399d60914af3e1ea2dad59fe41f3c0c20665c130fa40dd0fb6bf', + 'decoded output': { + '0': 'bytes1: _b 0x12', + '1': 'bytes2: _b2 0x1223', + '2': 'bytes3: _b3 0x000000', + '3': 'bytes: _blit 0x123498', + '4': 'bytes5: _b5 0x0432450000', + '5': 'bytes6: _b6 0x234553253200', + '6': 'string: _str this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string', + '7': 'bytes7: _b7 0x03252353253253', + '8': 'bytes22: _b22 0x32523523532532532523532500000000000000000000', + '9': 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000' + } + }).pause(500) + .clickFunction('retunValues3 - transact (not payable)') + .testFunction('0xb4108649d5e65a4a0776d6ac98c2c356540a7e99d641705a82352a845d467eb5', + { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0xb4108649d5e65a4a0776d6ac98c2c356540a7e99d641705a82352a845d467eb5', + 'decoded output': { + '0': 'uint8: _en 2', + '1': 'int256[5][]: _a1 1,-45,-78,56,60,-1,42,334,-45455,-446,1,10,-5435,45,-7' + } + }).click('*[data-id="deployAndRunClearInstances"]') + }, + + 'Test Complex Input Values': function (browser) { + browser.testContracts('inputValues.sol', sources[2]['browser/inputValues.sol'], ['test']) + .clickLaunchIcon('udapp') + .click('#runTabView button[class^="instanceButton"]') + .waitForElementPresent('.instance:nth-of-type(2)') + .click('.instance:nth-of-type(2) > div > button') + .clickFunction('inputValue1 - transact (not payable)', {types: 'uint256 _u, int256 _i, string _str', values: '"2343242", "-4324324", "string _ string _ string _ string _ string _ string _ string _ string _ string _ string _"'}) + .testFunction('0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97', + { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97', + 'decoded output': { + '0': 'uint256: _uret 2343242', + '1': 'int256: _iret -4324324', + '2': 'string: _strret string _ string _ string _ string _ string _ string _ string _ string _ string _ string _' + } + }) + .pause(500) + .clickFunction('inputValue2 - transact (not payable)', {types: 'uint256[3] _n, bytes8[4] _b8', values: '[1,2,3], ["0x1234000000000000", "0x1234000000000000","0x1234000000000000","0x1234000000000000"]'}) + .testFunction('0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f', { + status: '0x1 Transaction mined and execution succeed', + 'transaction hash': '0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f', + 'decoded output': { + '0': 'uint256[3]: _nret 1,2,3', + '1': 'bytes8[4]: _b8ret 0x1234000000000000,0x1234000000000000,0x1234000000000000,0x1234000000000000' + }, + logs: [ + { + 'from': '0x8c1ed7e19abaa9f23c476da86dc1577f1ef401f5', + 'topic': '0xd30981760edbf605bda8689e945f622877f230c9a77cbfbd448aa4b7d8ac6e7f', + 'event': 'event1', + 'args': { + '0': '-123', + '1': '123', + '2': { + 'hash': '0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658', + 'type': 'Indexed' + }, + '3': '0x12340000', + '4': 'test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test ', + '_i': '-123', + '_u': '123', + '_str': { + 'hash': '0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658', + 'type': 'Indexed' + }, + '_b': '0x12340000', + '_notIndexed': 'test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test ', + 'length': 5 + } + } + ] + }) + .click('*[data-id="deployAndRunClearInstances"]') + .end() + }, + + tearDown: sauce +} + +// @TODO test: bytes8[3][] type as input + +var sources = [ + {'browser/Untitled.sol': {content: ` + contract TestContract { function f() public returns (uint) { return 8; } + function g() public returns (uint, string memory, bool, uint) { + uint payment = 345; + bool payed = true; + string memory comment = "comment_comment_"; + uint month = 4; + return (payment, comment, payed, month); } }`}}, + {'browser/returnValues.sol': {content: ` + contract testReturnValues { + enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } + function retunValues1 () public returns (bool _b, uint _u, int _i, address _a) { + _b = true; + _u = 345; + _i = -345; + _a = msg.sender; + } + + function retunValues2 () public returns (byte _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) { + _b = 0x12; + _b2 = 0x1223; + _b5 = hex"043245"; + _b6 = hex"2345532532"; + _b7 = hex"03252353253253"; + _b22 = hex"325235235325325325235325"; + _b32 = hex"032523532532523532523532523532"; + _blit = hex"123498"; + _str = "this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string"; + } + + function retunValues3 () public returns (ActionChoices _en, int[5][] memory _a1) { + _en = ActionChoices.GoStraight; + int[5][] memory a = new int[5][](3); + a[0] = [int(1),-45,-78,56,60]; + a[1] = [int(-1),42,334,-45455,-446]; + a[2] = [int(1),10,-5435,45,-7]; + _a1 = a; + } + }`}}, + {'browser/inputValues.sol': {content: ` + contract test { + event event1(int _i, uint indexed _u, string indexed _str, bytes4 _b, string _notIndexed); + function inputValue1 (uint _u, int _i, string memory _str) public returns (uint _uret, int _iret, string memory _strret) { + _uret = _u; + _iret = _i; + _strret = _str; + } + function inputValue2 (uint[3] memory _n, bytes8[4] memory _b8) public returns (uint[3] memory _nret, bytes8[4] memory _b8ret){ + _nret = _n; + _b8ret = _b8; + emit event1(-123, 123, "test", hex"1234", "test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test "); + } +}`}} +] diff --git a/test-browser/tests/workspace.test.js b/test-browser/tests/workspace.test.js new file mode 100644 index 0000000000..bf5069c5b5 --- /dev/null +++ b/test-browser/tests/workspace.test.js @@ -0,0 +1,17 @@ +'use strict' +const init = require('../helpers/init') +const sauce = require('./sauce') + +module.exports = { + before: function (browser, done) { + init(browser, done, 'http://127.0.0.1:8080?plugins=solidity,udapp', false) + }, + 'CheckSolidityActivatedAndUDapp': function (browser) { + browser + .waitForElementVisible('#icon-panel', 10000) + .clickLaunchIcon('solidity') + .clickLaunchIcon('udapp') + .end() + }, + tearDown: sauce +} diff --git a/test/compiler-test.js b/test/compiler-test.js new file mode 100644 index 0000000000..c7644c94b6 --- /dev/null +++ b/test/compiler-test.js @@ -0,0 +1,16 @@ +'use strict' + +var test = require('tape') + +var Compiler = require('remix-solidity').Compiler + +test('compiler.compile smoke', function (t) { + t.plan(1) + + var noop = function () {} + var fakeImport = function (url, cb) { cb('Not implemented') } + var compiler = new Compiler(fakeImport) + compiler.compileJSON = noop + compiler.compile({ 'test': '' }, 'test') + t.ok(compiler) +}) diff --git a/test/gist-handler-test.js b/test/gist-handler-test.js new file mode 100644 index 0000000000..07eaad830c --- /dev/null +++ b/test/gist-handler-test.js @@ -0,0 +1,52 @@ +'use strict' +var modalDialogCustom +if (typeof window !== 'undefined') { + modalDialogCustom = require('../app/ui/modal-dialog-custom') +} +// ^ this class can be load in a non browser context when running node unit testing. +// should not load UI in that case + +// Allowing window to be overriden for testing +function GistHandler (_window) { + if (_window !== undefined) { + modalDialogCustom = _window + } + + this.handleLoad = function (params, cb) { + if (!cb) cb = () => {} + var loadingFromGist = false + var gistId + if (params['gist'] === '') { + loadingFromGist = true + modalDialogCustom.prompt( + 'Load a Gist', + 'Enter the URL or ID of the Gist you would like to load.', + null, + target => { + if (target !== '') { + gistId = getGistId(target) + if (gistId) { + cb(gistId) + } + } + } + ) + return loadingFromGist + } else { + gistId = params['gist'] + loadingFromGist = !!gistId + } + if (loadingFromGist) { + cb(gistId) + } + return loadingFromGist + } + + function getGistId (str) { + var idr = /[0-9A-Fa-f]{8,}/ + var match = idr.exec(str) + return match ? match[0] : null + } +} + +module.exports = GistHandler diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000000..84d8a5c68f --- /dev/null +++ b/test/index.js @@ -0,0 +1,5 @@ +'use strict' + +require('./compiler-test') +require('./gist-handler-test') +require('./query-params-test') diff --git a/test/query-params-test.js b/test/query-params-test.js new file mode 100644 index 0000000000..c9062f6da0 --- /dev/null +++ b/test/query-params-test.js @@ -0,0 +1,23 @@ +'use strict' + +var test = require('tape') + +var QueryParams = require('../src/lib/query-params') + +test('queryParams.get', function (t) { + t.plan(2) + + var fakeWindow = {location: {hash: '#wat=sup&foo=bar', search: ''}} + var params = new QueryParams(fakeWindow).get() + t.equal(params.wat, 'sup') + t.equal(params.foo, 'bar') +}) + +test('queryParams.update', function (t) { + t.plan(1) + + var fakeWindow = {location: {hash: '#wat=sup', search: ''}} + var qp = new QueryParams(fakeWindow) + qp.update({foo: 'bar'}) + t.equal(fakeWindow.location.hash, '#wat=sup&foo=bar') +})